]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Remove usage of find_inferior in linux_stabilize_threads
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
fcb056a5
SM
12017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2
3 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
4 return bool, remove data argument.
5 (linux_stabilize_threads): Use find_thread.
6
139720c5
SM
72017-11-19 Simon Marchi <simon.marchi@ericsson.com>
8
9 * linux-low.c (unsuspend_one_lwp): Remove.
10 (unsuspend_all_lwps): Use for_each_thread, inline code from
11 unsuspend_one_lwp.
12
6d1e5673
SM
132017-11-19 Simon Marchi <simon.marchi@ericsson.com>
14
15 * gdbthread.h (find_thread): Add overload with ptid_t filter.
16 * linux-low.c (struct iterate_over_lwps_args): Remove.
17 (iterate_over_lwps_filter): Remove.
18 (iterate_over_lwps): Use find_thread.
19
bbf550d5
SM
202017-11-19 Simon Marchi <simon.marchi@ericsson.com>
21
22 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
23 (linux_handle_new_gdb_connection): Use for_each_thread, inline
24 code from reset_lwp_ptrace_options_callback.
25
00192f77
SM
262017-11-19 Simon Marchi <simon.marchi@ericsson.com>
27
28 * linux-arm-low.c (struct update_registers_data): Remove.
29 (update_registers_callback): Return void, take arguments
30 directly, don't check thread's pid.
31 (arm_insert_point, arm_remove_point): Use for_each_thread.
32
2bee2b6c
SM
332017-11-19 Simon Marchi <simon.marchi@ericsson.com>
34
35 * win32-low.c (continue_one_thread): Return void, take argument
36 directly.
37 (child_continue): Use for_each_thread.
38
0b360f19
SM
392017-11-19 Simon Marchi <simon.marchi@ericsson.com>
40
41 * win32-i386-low.c (update_debug_registers_callback): Rename
42 to ...
43 (update_debug_registers): ... this, return void, remove pid_p arg.
44 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
45
f27866ba
SM
462017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
47
48 * inferiors.h (struct process_info): Add constructor, initialize
49 fields..
50 <syscalls_to_catch>: Change type to std::vector<int>.
51 * inferiors.c (add_process): Allocate process_info with new.
52 (remove_process): Free process_info with delete.
53 * linux-low.c (handle_extended_wait): Adjust.
54 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
55 * server.c (handle_general_set): Adjust.
56
e849ea89
PA
572017-11-16 Pedro Alves <palves@redhat.com>
58
59 * remote-utils.c (remote_close): Block SIGIO signals instead of
60 uninstalling the SIGIO handler.
61
1d0aa65c
AH
622017-11-16 Alan Hayward <alan.hayward@arm.com>
63
64 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
65
3491a34c
YQ
662017-11-16 Yao Qi <yao.qi@linaro.org>
67
68 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
69 (tic6x_store_gregset): Likewise.
70 (tic6x_usrregs_info): Move it up.
71
a602f924
AH
722017-11-15 Alan Hayward <alan.hayward@arm.com>
73
74 * Makefile.in: Update arch rules.
75 * configure.srv: Explicitly mark arch/ files.
76
5616b6c3
AS
772017-11-13 Andreas Schwab <schwab@suse.de>
78
79 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
80 function.
81 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
82
d1928160
PA
832017-11-06 Pedro Alves <palves@redhat.com>
84
85 * config.in, configure: Regenerate.
86
bac608e7
SM
872017-10-27 Simon Marchi <simon.marchi@ericsson.com>
88
89 * target.c (struct thread_search): Remove.
90 (thread_search_callback): Remove.
91 (prepare_to_access_memory): Use for_each_thread instead of
92 find_inferior. Inline code from thread_search_callback.
93
eaddb425
SM
942017-10-27 Simon Marchi <simon.marchi@ericsson.com>
95
96 * server.c (struct visit_actioned_threads_data): Remove.
97 (visit_actioned_threads): Change prototype to take arguments
98 directly.
99 (resume): Use find_thread instead of find_inferior.
100
99078d34
SM
1012017-10-27 Simon Marchi <simon.marchi@ericsson.com>
102
103 * server.c (queue_stop_reply_callback): Change prototype, return
104 void.
105 (find_status_pending_thread_callback): Remove.
106 (handle_status): Replace find_inferior with find_thread and
107 for_each_thread.
108
cc628f3d
AH
1092017-10-25 Alan Hayward <alan.hayward@arm.com>
110
111 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
112 with REGNO.
113 (aarch64_store_gregset): Likewise.
114 (aarch64_fill_fpregset): Likewise.
115 (aarch64_store_fpregset): Likewise.
116
4d3bb80e
SM
1172017-10-21 Simon Marchi <simon.marchi@ericsson.com>
118
119 * gdbthread.h (find_thread, for_each_thread): New functions.
120 * inferiors.c (thread_of_pid): Remove.
121 (find_any_thread_of_pid): Use find_thread.
122 * linux-low.c (num_lwps): Use for_each_thread.
123
7a7cdfa0
YQ
1242017-10-17 Yao Qi <yao.qi@linaro.org>
125
126 * Makefile.in: Remove one rule.
127 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
128
e675d170
YQ
1292017-10-17 Yao Qi <yao.qi@linaro.org>
130
131 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
132 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
133
7eb4e0f9
YQ
1342017-10-17 Yao Qi <yao.qi@linaro.org>
135
136 * configure.srv: Rename arm.o with arch/arm.o.
137
60d6cfc9
YQ
1382017-10-17 Yao Qi <yao.qi@linaro.org>
139
140 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
141 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
142 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
143 (arch-i386.o, arch-amd64.o): Remove rules.
144 (arch/%.o): New rule.
145 Update POSTCOMPILE and COMPILE.pre.
146 * configure.ac: Invoke AC_CONFIG_COMMANDS.
147 * configure: Re-generated.
148 * configure.srv: Replace arch-i386.o with arch/i386.o.
149 Replace arch-amd64.o with arch/amd64.o.
150
5bfda255
YQ
1512017-10-16 Yao Qi <yao.qi@linaro.org>
152
153 * configure: Regenerated.
154
9c80ecd6
SM
1552017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
156
157 * inferiors.h: (struct inferior_list): Remove.
158 (struct inferior_list_entry); Remove.
159 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
160 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
161 get_first_inferior): Remove.
162 (for_each_inferior, for_each_inferior_with_data, find_inferior,
163 find_inferior_id, find_inferior_in_random): Change signature.
164 * inferiors.c (all_threads): Change type to
165 std::list<thread_info *>.
166 (get_thread): Remove macro.
167 (find_inferior, find_inferior_id): Change signature, implement
168 using find_thread.
169 (find_inferior_in_random): Change signature, implement using
170 find_thread_in_random.
171 (for_each_inferior, for_each_inferior_with_data): Change
172 signature, implement using for_each_thread.
173 (add_inferior_to_list, remove_inferior): Remove.
174 (add_thread, get_first_thread, thread_of_pid,
175 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
176 (get_first_inferior, one_inferior_p, clear_inferior_list):
177 Remove.
178 (clear_inferiors, get_thread_process): Update.
179 * gdbthread.h: Include <list>.
180 (struct thread_info) <entry>: Remove field.
181 <id>: New field.
182 (all_threads): Change type to std::list<thread_info *>.
183 (get_first_inferior): Add doc.
184 (find_thread, for_each_thread, find_thread_in_random): New
185 functions.
186 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
187 * linux-arm-low.c (update_registers_callback): Update.
188 * linux-low.c (second_thread_of_pid_p): Update.
189 (kill_one_lwp_callback, linux_detach_lwp_callback,
190 delete_lwp_callback, status_pending_p_callback, same_lwp,
191 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
192 iterate_over_lwps, not_stopped_callback,
193 resume_stopped_resumed_lwps, count_events_callback,
194 select_singlestep_lwp_callback, select_event_lwp_callback,
195 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
196 suspend_and_send_sigstop_callback, wait_for_sigstop,
197 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
198 lwp_running, linux_set_resume_request, resume_status_pending_p,
199 need_step_over_p, start_step_over, linux_resume_one_thread,
200 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
201 reset_lwp_ptrace_options_callback): Update.
202 * linux-mips-low.c (update_watch_registers_callback): Update.
203 * regcache.c (regcache_invalidate_one, regcache_invalidate):
204 Update.
205 (free_register_cache_thread_one): Remove.
206 (regcache_release): Update.
207 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
208 handle_qxfer_threads_worker): Update.
209 (handle_query): Update, use list iterator.
210 (visit_actioned_threads, handle_pending_status,
211 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
212 clear_pending_status_callback, set_pending_status_callback,
213 find_status_pending_thread_callback, handle_status,
214 process_serial_event): Update.
215 * target.c (thread_search_callback): Update.
216 * thread-db.c (thread_db_get_tls_address): Update.
217 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
218 Update.
219 * win32-i386-low.c (update_debug_registers_callback): Update.
220 * win32-low.c (delete_thread_info, child_delete_thread,
221 continue_one_thread, suspend_one_thread,
222 get_child_debug_event): Adjust.
223
9179355e
SM
2242017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
225
226 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
227 * inferiors.h: Include <list>.
228 (struct process_info) <entry>: Remove field.
229 <pid>: New field.
230 (pid_of): Change macro to function.
231 (ptid_of, lwpid_of): Remove macro.
232 (all_processes): Change type to std::list<process_info *>.
233 (ALL_PROCESSES): Remove macro.
234 (for_each_process, find_process): New function.
235 * inferiors.c (all_processes): Change type to
236 std::list<process_info *>.
237 (find_thread_process): Adjust.
238 (add_process): Likewise.
239 (remove_process): Likewise.
240 (find_process_pid): Likewise.
241 (get_first_process): Likewise.
242 (started_inferior_callback): Remove.
243 (have_started_inferiors_p): Adjust.
244 (attached_inferior_callback): Remove.
245 (have_attached_inferiors_p): Adjust.
246 * linux-low.c (check_zombie_leaders): Likewise.
247 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
248 (x86_linux_update_xmltarget): Adjust.
249 * server.c (handle_query): Likewise.
250 (gdb_reattached_process): Remove.
251 (handle_status): Adjust.
252 (kill_inferior_callback): Likewise.
253 (detach_or_kill_inferior): Remove.
254 (print_started_pid): Likewise.
255 (print_attached_pid): Likewise.
256 (detach_or_kill_for_exit): Update.
257 (process_serial_event): Likewise.
258 * linux-arm-low.c (arm_new_fork): Likewise.
259
c9cb8905
SM
2602017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
261
262 * dll.h: Include <list>.
263 (struct dll_info): Add constructor.
264 <entry>: Remove field.
265 (all_dlls): Change type to std::list<dll_info>.
266 * dll.c: Include <algorithm>.
267 (get_dll): Remove macro.
268 (all_dlls): Change type to std::list<dll_info *>.
269 (free_one_dll): Remove.
270 (match_dll): Likewise.
271 (loaded_dll): Adjust.
272 (unloaded_dll): Adjust to all_dlls type change, use
273 std::find_if. Inline code from match_dll.
274 (clear_dlls): Adjust to all_dlls type change.
275 * server.c (emit_dll_description): Remove.
276 (handle_qxfer_libraries): Adjust to all_dlls type change,
277 integrate emit_dll_description's functionality.
278
04ec7890
SM
2792017-10-12 Simon Marchi <simon.marchi@ericsson.com>
280
281 * linux-low.h (struct linux_target_ops) <delete_process>: New
282 field.
283 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
284 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
285 (struct linux_target_ops): Add delete_process callback.
286 * linux-arm-low.c (arm_delete_process): New.
287 (struct linux_target_ops): Add delete_process callback.
288 * linux-bfin-low.c (struct linux_target_ops): Likewise.
289 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
290 * linux-m32r-low.c (struct linux_target_ops): Likewise.
291 * linux-mips-low.c (mips_linux_delete_process): New.
292 (struct linux_target_ops): Add delete_process callback.
293 * linux-ppc-low.c (struct linux_target_ops): Likewise.
294 * linux-s390-low.c (struct linux_target_ops): Likewise.
295 * linux-sh-low.c (struct linux_target_ops): Likewise.
296 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
297 * linux-tile-low.c (struct linux_target_ops): Likewise.
298 * linux-x86-low.c (x86_linux_delete_process): New.
299 (struct linux_target_ops): Add delete_process callback.
300 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
301
466eecee
SM
3022017-10-12 Simon Marchi <simon.marchi@ericsson.com>
303
304 * linux-aarch64-low.c (the_low_target): Add thread delete
305 callback.
306 * linux-arm-low.c (arm_delete_thread): New function.
307 (the_low_target): Add thread delete callback.
308 * linux-bfin-low.c (the_low_target): Likewise.
309 * linux-crisv32-low.c (the_low_target): Likewise.
310 * linux-low.c (delete_lwp): Invoke delete_thread callback if
311 set.
312 * linux-low.h (struct linux_target_ops) <delete_thread>: New
313 field.
314 * linux-m32r-low.c (the_low_target): Add thread delete callback.
315 * linux-mips-low.c (mips_linux_delete_thread): New function.
316 (the_low_target): Add thread delete callback.
317 * linux-ppc-low.c (the_low_target): Likewise.
318 * linux-s390-low.c (the_low_target): Likewise.
319 * linux-sh-low.c (the_low_target): Likewise.
320 * linux-tic6x-low.c (the_low_target): Likewise.
321 * linux-tile-low.c (the_low_target): Likewise.
322 * linux-x86-low.c (the_low_target): Likewise.
323 * linux-xtensa-low.c (the_low_target): Likewise.
324
b79f7801
YZ
3252017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
326
327 * win32-low.c: Include "common-inferior.h".
328
bc3b087d
SDJ
3292017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
330
331 * inferiors.c (set_inferior_cwd): New function.
332 * server.c (handle_general_set): Handle QSetWorkingDir packet.
333 (handle_query): Inform that QSetWorkingDir is supported.
334 * win32-low.c (create_process): Pass the inferior's cwd to
335 CreateProcess.
336
d092c5a2
SDJ
3372017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
338
339 * inferiors.c (current_inferior_cwd): New global variable.
340 (get_inferior_cwd): New function.
341 * inferiors.h (struct process_info) <cwd>: New field.
342
7da0a886
SDJ
3432017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
344
345 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
346 (OBS): Add gdb_tilde_expand.o.
347
289a6840
SM
3482017-10-02 Simon Marchi <simon.marchi@ericsson.com>
349
350 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
351 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
352
256642e8
PA
3532017-09-29 Pedro Alves <palves@redhat.com>
354
355 * ax.c (gdb_parse_agent_expr): Constify.
356 * ax.h (gdb_parse_agent_expr): Constify.
357 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
358 Constify.
359 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
360 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
361 * remote-utils.h (read_ptid): Constify.
362 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
363 (process_point_options, process_serial_event): Constify.
364 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
365 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
366 (cmd_qtbuffer): Constify.
367
5b9ca4d4
PA
3682017-09-29 Pedro Alves <palves@redhat.com>
369
370 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
371 fails.
372
94c207e0
PA
3732017-09-29 Pedro Alves <palves@redhat.com>
374
375 * linux-low.c (handle_extended_wait): Pass parent thread instead
376 of process to thread_db_notice_clone.
377 * linux-low.h (thread_db_notice_clone): Replace parent process
378 parameter with parent thread parameter.
379 * thread-db.c (find_one_thread): Add comment.
380 (thread_db_notice_clone): Replace parent process parameter with
381 parent thread parameter. Temporarily switch to the parent thread.
382
75352e28
SDJ
3832017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
384
385 * gdbthread.h: Include "common-gdbthread.h".
386 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
387 "if" when validating the ptid.
388 * remote-utils.c: Include "gdbthread.h".
389 (prepare_resume_reply): Use "switch_to_thread".
390 * target.c (done_accessing_memory): Likewise.
391
ad339634
AA
3922017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
393
394 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
395 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
396 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
397 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
398 s390x-gs-linux64-ipa.o to ipa_obj.
399 * linux-s390-low.c (HWCAP_S390_GS): New define.
400 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
401 New functions.
402 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
403 (s390_arch_setup): Check for guarded-storage support and choose
404 appropriate tdesc.
405 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
406 init_registers_s390x_gs_linux64.
407 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
408 enum value.
409 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
410 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
411
cc4d742f
SM
4122017-09-22 Simon Marchi <simon.marchi@ericsson.com>
413
414 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
415
f6327dcb
KB
4162017-09-21 Kevin Buettner <kevinb@redhat.com>
417
418 * linux-low.h (struct lwp_info): Add new field, thread_handle.
419 (thread_db_thread_handle): Declare.
420 * linux-low.c (linux_target_ops): Initialize thread_handle.
421 * server.c (handle_qxfer_threads_worker): Add support for
422 "handle" attribute.
423 * target.h (struct target_ops): Add new function pointer,
424 thread_handle.
425 (target_thread_handle): Define.
426 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
427 field in lwp.
428 (thread_db_thread_handle): New function.
429
86299109
KB
4302017-09-21 Kevin Buettner <kevinb@redhat.com>
431
432 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
433 * linux-low.h (thread_db_notice_clone): Declare.
434 * thread-db.c (thread_db_notice_clone): New function.
435
f557a88a
PA
4362017-09-21 Pedro Alves <palves@redhat.com>
437
438 * server.c (gdb_read_memory, handle_status, process_serial_event)
439 (handle_serial_event, handle_target_event): Adjust to
440 set_desired_thread prototype change.
441 * target.c (set_desired_thread): Remove 'use_general' parameter
442 and adjust.
443 * target.h (set_desired_thread): Remove 'use_general' parameter.
444
223ffa71
TT
4452017-09-20 Tom Tromey <tom@tromey.com>
446
447 * target.c (target_terminal::terminal_state): Define.
448 (target_terminal::init): Rename from target_terminal_init.
449 (target_terminal::inferior): Rename from
450 target_terminal_inferior.
451 (target_terminal::ours): Rename from target_terminal_ours.
452 (target_terminal::ours_for_output, target_terminal::info): New.
453
04fd3ba9
SM
4542017-09-16 Simon Marchi <simon.marchi@ericsson.com>
455
456 * server.c (accumulate_file_name_length): Remove.
457 (emit_dll_description): Adjust to std::string change.
458 (handle_qxfer_libraries): Use std::string to hold document.
459
5e187554
SM
4602017-09-16 Simon Marchi <simon.marchi@ericsson.com>
461
462 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
463 return type of xml_escape_text.
464 * server.c (emit_dll_description): Likewise.
465
1526853e
SM
4662017-09-16 Simon Marchi <simon.marchi@ericsson.com>
467
468 * server.c (captured_main): Accept argument for --selftest.
469 Update run_tests call.
470 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
471 when registering selftests.
472
c4dfafab
SDJ
4732017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
474
475 * regcache.c (get_thread_regcache): Update code to use "std::vector"
476 instead of "VEC" for "target_desc.reg_defs".
477 (regcache_cpy): Likewise.
478 (registers_to_string): Likewise.
479 (registers_from_string): Likewise.
480 (find_regno): Likewise.
481 (supply_regblock): Likewise.
482 (regcache_raw_read_unsigned): Likewise.
483 * tdesc.c (init_target_desc): Likewise.
484 (tdesc_create_reg): Likewise.
485 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
486 (struct target_desc) <reg_defs>: Convert to "std::vector".
487 (target_desc): Do not initialize "reg_defs".
488 (~target_desc): Update code to use "std::vector" instead of "VEC"
489 for "target_desc.reg_defs".
490 (operator==): Likewise.
491
124aceb4
SM
4922017-09-15 Simon Marchi <simon.marchi@ericsson.com>
493
494 * inferiors.h (thread_to_gdb_id): Remove.
495 * inferiors.c (thread_to_gdb_id): Remove.
496 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
497 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
498 lynx_store_registers, lynx_read_memory, lynx_write_memory):
499 Likewise.
500 * nto-low.c (nto_fetch_registers, nto_store_registers,
501 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
502
96cde54f
SM
5032017-09-15 Simon Marchi <simon.marchi@ericsson.com>
504
505 * inferiors.h (gdb_id_to_thread_id): Remove.
506 * inferiors.c (gdb_id_to_thread_id): Remove.
507 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
508 removal. Move pid declaration closer to where it's used.
509
e8ca139e
SM
5102017-09-15 Simon Marchi <simon.marchi@ericsson.com>
511
512 * server.c (handle_detach): New function.
513 (process_serial_event): Move code out, call handle_detach.
514
f8a4e119
SM
5152017-09-15 Simon Marchi <simon.marchi@ericsson.com>
516
517 * server.c (require_running): Rename to ...
518 (require_running_or_return): ... this ...
519 (require_running_or_break): ... and this.
520 (handle_query, process_serial_event): Adjust.
521
0eb0a407
SM
5222017-09-15 Simon Marchi <simon.marchi@ericsson.com>
523
524 * linux-low.c (linux_set_resume_request): Remove unused
525 variables.
526
785922a5
SM
5272017-09-15 Simon Marchi <simon.marchi@ericsson.com>
528
529 * server.c (first_thread_of): Remove.
530 (process_serial_event): Replace usage of first_thread_of with
531 find_any_thread_of_pid.
532 * tracepoint.c (same_process_p): Remove.
533 (gdb_agent_about_to_close): Replace usage of same_process_p with
534 find_any_thread_of_pid.
535 * linux-x86-low.c (same_process_callback): Remove.
536 (x86_arch_setup_process_callback): Replace usage of
537 same_process_callback with find_any_thread_of_pid.
538 * thread-db.c (any_thread_of): Remove.
539 (switch_to_process): Replace usage of any_thread_of with
540 find_any_thread_of_pid.
541 * inferiors.c (thread_pid_matches_callback): Remove.
542 (find_thread_process): Adjust to use find_any_thread_of_pid.
543
a059f00c
SDJ
5442017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
545
546 * regcache.c (get_thread_regcache): Guard calls to "memset"
547 with "!VEC_empty".
548
cc397f3a
SDJ
5492017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
550
551 * linux-low.c (handle_extended_wait): Use
552 "allocate_target_description" instead of "XNEW".
553 * linux-x86-low.c (initialize_low_arch): Likewise.
554
22916b07
YQ
5552017-09-05 Yao Qi <yao.qi@linaro.org>
556
557 * configure.srv (srv_i386_regobj): Remove.
558 (srv_amd64_regobj): Remove.
559 (srv_regobj): Set it to "" for x86 non-linux targets.
560 * linux-x86-tdesc.c (i386_linux_read_description):
561 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
562 (init_registers_i386): Remove the declaration.
563 (tdesc_i386): Remove the declaration.
564 (lynx_i386_arch_setup): Call i386_create_target_description.
565 * nto-x86-low.c: Likewise.
566 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
567 [!__x86_64__]: include arch/i386.h.
568 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
569
38602d55
YQ
5702017-09-05 Yao Qi <yao.qi@linaro.org>
571
572 * configure.srv (srv_amd64_linux_xmlfiles): Remove
573 i386/amd64-XXX-linux from it.
574
44b886ff
YQ
5752017-09-05 Yao Qi <yao.qi@linaro.org>
576
577 * configure.srv: Empty srv_amd64_linux_regobj if $development is
578 false.
579 (ipa_amd64_linux_regobj): Remove.
580 (ipa_x32_linux_regobj): Remove.
581
b4570e4b
YQ
5822017-09-05 Yao Qi <yao.qi@linaro.org>
583
584 * Makefile.in (arch-amd64.o): New rule.
585 * configure.srv: Append arch-amd64.o.
586 * linux-amd64-ipa.c: Include common/x86-xstate.h.
587 (get_ipa_tdesc): Call amd64_linux_read_description.
588 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
589 and init_registers_amd64_XXX.
590 * linux-x86-low.c (x86_linux_read_description): Call
591 amd64_linux_read_description.
592 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
593 (initialize_low_arch): Don't call init_registers_x32_XXX and
594 init_registers_amd64_XXX.
595 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
596 and tdesc_amd64_XXX.
597 [__x86_64__] (amd64_tdesc_test): New function.
598 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
599 and init_registers_amd64_XXX.
600 * linux-x86-tdesc.c: Include arch/amd64.h.
601 (xcr0_to_tdesc_idx): New function.
602 (i386_linux_read_description): New function.
603 (amd64_get_ipa_tdesc_idx): New function.
604 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
605 (amd64_get_ipa_tdesc): Declare.
606
d1f28ea2
YQ
6072017-09-05 Yao Qi <yao.qi@linaro.org>
608
609 * configure.srv (srv_i386_linux_xmlfiles): Remove
610 i386/i386-XXX-linux.xml from it.
611
25a93583
YQ
6122017-09-05 Yao Qi <yao.qi@linaro.org>
613
614 * configure.srv: Set srv_i386_linux_regobj empty if $development
615 is false.
616 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
617 initialize_low_tdesc.
618 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
619 with #if initialize_low_tdesc.
620 * linux-x86-tdesc-selftest.c: New file.
621 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
622
5f035c07
YQ
6232017-09-05 Yao Qi <yao.qi@linaro.org>
624
625 * Makefile.in (arch-i386.o): New rule.
626 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
627 (x86_64-*-linux*): Likewise.
628 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
629 include arch/i386.h.
630 (i386_linux_read_description): Remove code and call
631 i386_create_target_description.
632 * tdesc.c (allocate_target_description): New function.
633 * tdesc.h (set_tdesc_architecture): Remove declaration.
634 (set_tdesc_osabi): Likewise.
635
0abe8a89
YQ
6362017-09-05 Yao Qi <yao.qi@linaro.org>
637
638 * linux-x86-tdesc.c: Don't include <inttypes.h>.
639 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
640 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
641 .xmltarget.
642 * server.c (get_features_xml): Call tdesc_get_features_xml.
643 * tdesc.c (set_tdesc_architecture): New function.
644 (set_tdesc_osabi): New function.
645 (tdesc_get_features_xml): New function.
646 (tdesc_create_feature): Add an argument.
647 * tdesc.h (struct target_desc) <features>: New field.
648 <arch, osabi>: New field.
649 (~target_desc): xfree features, arch, and osabi.
650 (target_desc::oerator==): Don't compare .xmltarget.
651 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
652 (set_tdesc_osabi): Likewise.
653 (tdesc_get_features_xml): Likewise.
654
0a188386
YQ
6552017-09-05 Yao Qi <yao.qi@linaro.org>
656
657 * linux-x86-tdesc.c: Include selftest.h.
658 (i386_tdesc_test): New function.
659 (initialize_low_tdesc): Call selftests::register_test.
660 * tdesc.h: Include regdef.h.
661 (target_desc): Override operator == and !=.
662
f49ff000
YQ
6632017-09-05 Yao Qi <yao.qi@linaro.org>
664
665 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
666 (ipa_obj): Likewise.
667 * linux-i386-ipa.c: Include common/x86-xstate.h
668 (get_ipa_tdesc): Call i386_linux_read_description.
669 (initialize_low_tracepoint): Don't call init_registers_XXX
670 functions, call initialize_low_tdesc instead.
671 * linux-x86-low.c (x86_linux_read_description): Call
672 i386_linux_read_description.
673 (initialize_low_arch): Don't call init_registers_i386_XXX
674 functions, call initialize_low_tdesc.
675 * linux-x86-tdesc.c: New file.
676 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
677 (i386_get_ipa_tdesc_idx): Declare.
678 (i386_get_ipa_tdesc): Declare.
679 (initialize_low_tdesc): Declare.
680
2b68ef2f
YQ
6812017-09-05 Yao Qi <yao.qi@linaro.org>
682
683 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
684 instead of 0.
685
f7000548
YQ
6862017-09-05 Yao Qi <yao.qi@linaro.org>
687
688 * Makefile.in (IPA_OBJS): Add vec-ipa.o
689 * regcache.c (get_thread_regcache): Use VEC_length.
690 (init_register_cache): Likewise.
691 (regcache_cpy): Likewise.
692 (registers_to_string): Iterate reg_defs via VEC_iterate.
693 (find_regno): Likewise.
694 (find_register_by_number): Use VEC_index.
695 (register_size): Call find_register_by_number.
696 (register_data): Call find_register_by_number.
697 (supply_regblock): Use VEC_length.
698 (regcache_raw_read_unsigned): Likewise.
699 * tdesc.c (init_target_desc): Iterate reg_defs via
700 VEC_iterate.
701 (default_description): Update initializer.
702 (copy_target_description): Don't update field num_registers.
703 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
704 <num_registers>: Remove.
705
50a421ac
SM
7062017-09-04 Simon Marchi <simon.marchi@ericsson.com>
707
708 * Makefile.in (.SECONDARY): Define target.
709
23fdd69e
SM
7102017-09-03 Simon Marchi <simon.marchi@ericsson.com>
711
712 * linux-low.c (linux_wait_1): Adjust.
713 * server.c (queue_stop_reply_callback): Adjust.
714
0a2dde4a
SDJ
7152017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
716
717 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
718 QEnvironmentUnset and QEnvironmentReset packets.
719 (handle_query): Inform remote that QEnvironmentHexEncoded,
720 QEnvironmentUnset and QEnvironmentReset are supported.
721
6afd337d
SM
7222017-08-25 Simon Marchi <simon.marchi@ericsson.com>
723
724 * inferiors.h (inferior_target_data): Rename to ...
725 (thread_target_data): ... this.
726 (inferior_regcache_data): Rename to ...
727 (thread_regcache_data): ... this.
728 (set_inferior_regcache_data): Rename to ...
729 (set_thread_regcache_data): ... this.
730 * inferiors.c (inferior_target_data): Rename to ...
731 (thread_target_data): ... this.
732 (inferior_regcache_data): Rename to ...
733 (thread_regcache_data): ... this.
734 (set_inferior_regcache_data): Rename to ...
735 (set_thread_regcache_data): ... this.
736 (free_one_thread): Update.
737 * linux-low.h (get_thread_lwp): Update.
738 * regcache.c (get_thread_regcache): Update.
739 (regcache_invalidate_thread): Update.
740 (free_register_cache_thread): Update.
741 * win32-i386-low.c (update_debug_registers_callback): Update.
742 (win32_get_current_dr): Update.
743 * win32-low.c (thread_rec): Update.
744 (delete_thread_info): Update.
745 (continue_one_thread): Update.
746 (suspend_one_thread): Update.
747
a160cc46
SM
7482017-08-24 Simon Marchi <simon.marchi@ericsson.com>
749
750 * inferiors.c (set_inferior_target_data): Remove.
751 * inferiors.h (set_inferior_target_data): Remove.
752
6d580b63
YQ
7532017-08-18 Yao Qi <yao.qi@linaro.org>
754
755 * Makefile.in (OBS): Add selftest.o.
756 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
757 * configure, config.in: Re-generated.
758 * server.c: Include common/sefltest.h.
759 (captured_main): Handle option --selftest.
760
f5a29eb0
YQ
7612017-08-09 Yao Qi <yao.qi@linaro.org>
762
763 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
764 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
765 i386-avx-mpx.o and i386-mmx.o.
766 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
767 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
768 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
769 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
770 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
771 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
772 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
773 i386/amd64-avx-mpx.xml.
774
57757c2f
YQ
7752017-08-09 Yao Qi <yao.qi@linaro.org>
776
777 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
778 and x32-avx-avx512.o.
779 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
780 i386/x32-avx-avx512.xml.
781
229d26fc
SM
7822017-07-26 Simon Marchi <simon.marchi@ericsson.com>
783
784 * tracepoint.h (enum class fast_tpoint_collect_result): New
785 enumeration.
786 (fast_tracepoint_collecting): Change return type to
787 fast_tpoint_collect_result.
788 * tracepoint.c (fast_tracepoint_collecting): Likewise.
789 * linux-low.h: Include tracepoint.h.
790 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
791 fast_tpoint_collect_result.
792 * linux-low.c (handle_tracepoints): Adjust.
793 (linux_fast_tracepoint_collecting): Change return type to
794 fast_tpoint_collect_result.
795 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
796 linux_wait_1, stuck_in_jump_pad_callback,
797 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
798 proceed_one_lwp): Adjust to type change.
799
2e1e43e1
YQ
8002017-07-10 Yao Qi <yao.qi@linaro.org>
801
802 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
803
adc764e7
YQ
8042017-06-29 Yao Qi <yao.qi@linaro.org>
805
806 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
807 Remove.
808 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
809
a206891a
SM
8102017-06-20 Simon Marchi <simon.marchi@ericsson.com>
811
812 * Makefile.in (IPA_OBJS): Sort and format one item per line.
813
9a6c7d9c
SDJ
8142017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
815
816 * linux-low.c (linux_create_inferior): Adjust code to access the
817 environment information via 'gdb_environ' class.
818 * lynx-low.c (lynx_create_inferior): Likewise.
819 * server.c (our_environ): Make it an instance of 'gdb_environ'.
820 (get_environ): Return a pointer to 'our_environ'.
821 (captured_main): Initialize 'our_environ'.
822 * server.h (get_environ): Adjust prototype.
823 * spu-low.c (spu_create_inferior): Adjust code to access the
824 environment information via 'gdb_environ' class.
825
ae3e2ccf
SM
8262017-06-17 Simon Marchi <simon.marchi@ericsson.com>
827
828 * linux-low.c (linux_read_memory, linux_write_memory): Remove
829 usage of "register" keyword.
830
3e019bdc
SM
8312017-06-17 Simon Marchi <simon.marchi@ericsson.com>
832
833 * configure: Re-generate.
834
8465943a
SM
8352017-06-17 Simon Marchi <simon.marchi@ericsson.com>
836
837 * configure: Re-generate.
838
cf0dd6f0
SM
8392017-06-17 Simon Marchi <simon.marchi@ericsson.com>
840
841 * Makefile.in (COMPILE.pre): Add "-x c++".
842
9845682b
SDJ
8432017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
844
845 * fork-child.c: Conditionally include <signal.h>.
846
aefd8b33
SDJ
8472017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
848
849 * server.c (handle_general_set): Handle new packet
850 "QStartupWithShell".
851 (handle_query): Add "QStartupWithShell" to the list of supported
852 packets.
853 (gdbserver_usage): Add help text explaining the
854 new "--startup-with-shell" and "--no-startup-with-shell" CLI
855 options.
856 (captured_main): Recognize and act upon the presence of the new
857 CLI options.
858
2090129c
SDJ
8592017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
860 Pedro Alves <palves@redhat.com>
861
862 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
863 * configure: Regenerate.
864 * configure.srv (srv_linux_obj): Add "fork-child.o" and
865 "fork-inferior.o".
866 (i[34567]86-*-lynxos*): Likewise.
867 (spu*-*-*): Likewise.
868 * fork-child.c: New file.
869 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
870 and "environ.h".
871 (linux_ptrace_fun): New function.
872 (linux_create_inferior): Adjust function prototype to reflect
873 change on "target.h". Adjust function code to use
874 "fork_inferior".
875 (linux_request_interrupt): Delete "signal_pid".
876 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
877 (lynx_ptrace_fun): New function.
878 (lynx_create_inferior): Adjust function prototype to reflect
879 change on "target.h". Adjust function code to use
880 "fork_inferior".
881 * nto-low.c (nto_create_inferior): Adjust function prototype and
882 code to reflect change on "target.h". Update comments.
883 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
884 "common-terminal.h" and "environ.h".
885 (terminal_fd): Moved to fork-child.c.
886 (old_foreground_pgrp): Likewise.
887 (restore_old_foreground_pgrp): Likewise.
888 (last_status): Make it global.
889 (last_ptid): Likewise.
890 (our_environ): New variable.
891 (startup_with_shell): Likewise.
892 (program_name): Likewise.
893 (program_argv): Rename to...
894 (program_args): ...this.
895 (wrapper_argv): New variable.
896 (start_inferior): Delete function.
897 (get_exec_wrapper): New function.
898 (get_exec_file): Likewise.
899 (get_environ): Likewise.
900 (prefork_hook): Likewise.
901 (post_fork_inferior): Likewise.
902 (postfork_hook): Likewise.
903 (postfork_child_hook): Likewise.
904 (handle_v_run): Update code to deal with arguments coming from the
905 remote host. Update calls from "start_inferior" to
906 "create_inferior".
907 (captured_main): Likewise. Initialize environment variable. Call
908 "have_job_control".
909 * server.h (post_fork_inferior): New prototype.
910 (get_environ): Likewise.
911 (last_status): Declare.
912 (last_ptid): Likewise.
913 (signal_pid): Likewise.
914 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
915 (spu_ptrace_fun): New function.
916 (spu_create_inferior): Adjust function prototype to reflect change
917 on "target.h". Adjust function code to use "fork_inferior".
918 * target.c (target_terminal_init): New function.
919 (target_terminal_inferior): Likewise.
920 (target_terminal_ours): Likewise.
921 * target.h: Include <vector>.
922 (struct target_ops) <create_inferior>: Update prototype.
923 (create_inferior): Update macro.
924 * utils.c (gdb_flush_out_err): New function.
925 * win32-low.c (win32_create_inferior): Adjust function prototype
926 and code to reflect change on "target.h".
927
043a4934
SDJ
9282017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
929
930 * inferiors.c (switch_to_thread): New function.
931
15652511
SDJ
9322017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
933
934 * Makefile.in (SFILE): Add "common/job-control.c".
935 (OBS): Add "job-control.o".
936
21ea5acd
SDJ
9372017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
938
939 * Makefile: Remove "@host_makefile_frag@".
940
e13cb306
PA
9412017-05-05 Pedro Alves <palves@redhat.com>
942
943 * configure: Regenerate.
944
c94fee56
SDJ
9452017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
946
947 * configure: Regenerate.
948
a0ff9e1a
SM
9492017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
950
951 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
952 software_single_step change of return type to
953 std::vector<CORE_ADDR>.
954 * linux-low.c (install_software_single_step_breakpoints):
955 Likewise.
956 * linux-low.h (install_software_single_step_breakpoints):
957 Likewise.
958
be628ab8
SDJ
9592017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
960
961 * remote-utils.c: Include "gdb_termios.h" instead of
962 "terminal.h".
963 * terminal.h: Delete file.
964
7c5ded6a
SDJ
9652017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
966
967 * server.c: Include <vector>.
968 <program_argv, wrapper_argv>: Convert to std::vector.
969 (start_inferior): Rewrite function to use C++.
970 (handle_v_run): Likewise. Update code that calculates the argv
971 based on the vRun packet; use C++.
972 (captured_main): Likewise.
973
436252de
SM
9742017-04-06 Simon Marchi <simon.marchi@ericsson.com>
975
976 * server.c (handle_v_cont): Initialize thread_resume::thread
977 with null_ptid.
978
9bf2a700
PA
9792017-04-05 Pedro Alves <palves@redhat.com>
980
981 * configure: Regenerate.
982
a121b7c1
PA
9832017-04-05 Pedro Alves <palves@redhat.com>
984
985 * gdbreplay.c (sync_error): Constify.
986 * linux-x86-low.c (push_opcode): Constify.
987
21c8a587
PA
9882017-04-05 Pedro Alves <palves@redhat.com>
989
990 * win32-low.c (get_child_debug_event)
991 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
992 Report TARGET_WAITKIND_SPURIOUS instead.
993
fb32b4f7
PA
9942017-04-05 Pedro Alves <palves@redhat.com>
995
996 * remote-utils.c (remote_prepare, remote_open): Constify.
997 * remote-utils.h (remote_prepare, remote_open): Constify.
998 * server.c (captured_main): Constify 'port' handling.
999
65dd1e59
SM
10002017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1001
1002 * Makefile.in (clean): Clear .deps.
1003
8fa5b777
SM
10042017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1005
1006 * .gitignore: Remove generated files, replace with wildcard.
1007 * (clean): Replace removal of generated files with wildcard.
1008 (version.c): Replace with...
1009 (version-generated.c): ...this.
1010 (xml-builtin.c): Replace with...
1011 (xml-builtin-generated.c): ...this.
1012 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1013 (%.c: *regformats*): Replace with...
1014 (%-generated.c: *regformats*): ...this.
1015
a12e714b
MF
10162017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1017
1018 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1019 (xtensa_fill_gregset): Call collect_register_by_name for
1020 threadptr register.
1021 (xtensa_store_gregset): Call supply_register_by_name for
1022 threadptr register.
1023
1a09b50a
MF
10242017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1025
1026 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1027 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1028 (xtensa_store_gregset): Call supply_register for all registers in
1029 a0_regnum..a0_regnum + C0_NREGS range.
1030
1a01e7c6
SM
10312017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1032
1033 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1034 (ax-ipa.o: ax.c): Remove.
1035 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1036 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1037 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1038 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1039 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1040
36bc18a8
SM
10412017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1042
1043 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1044 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1045 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1046 (errors-ipa.o: ../common/errors.c): Remove.
1047 (format-ipa.o: ../common/format.c): Remove.
1048 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1049
a8ebe3d5
SM
10502017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1051
1052 * Makefile.in (%-ipa.o: %.c): New rule.
1053 (tracepoint-ipa.o: tracepoint.c): Remove.
1054 (utils-ipa.o: utils.c): Remove.
1055 (remote-utils-ipa.o: remote-utils.c): Remove.
1056 (regcache-ipa.o: regcache.c): Remove.
1057 (i386-linux-ipa.o: i386-linux.c): Remove.
1058 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1059 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1060 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1061 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1062 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1063 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1064 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1065 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1066 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1067 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1068 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1069 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1070 (aarch64-ipa.o: aarch64.c): Remove.
1071 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1072 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1073 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1074 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1075 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1076 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1077 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1078 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1079 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1080 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1081 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1082 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1083 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1084 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1085 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1086 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1087 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1088 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1089 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1090 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1091 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1092 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1093 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1094 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1095 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1096 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1097 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1098 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1099 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1100 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1101 (tdesc-ipa.o: tdesc.c): Remove.
1102 (x32-linux-ipa.o: x32-linux.c): Remove.
1103 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1104 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1105
50cfacb7
SM
11062017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1107
1108 * Makefile.in (%.o: ../arch/%.c): New rule.
1109 (arm.o: ../arch/arm.c): Remove.
1110 (arm-linux.o: ../arch/arm-linux.c): Remove.
1111 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1112 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1113
c5a22423
SM
11142017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1115
1116 * Makefile.in (%.o: ../nat/%.c): New rule.
1117 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1118 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1119 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1120 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1121 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1122 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1123 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1124 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1125 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1126 (linux-personality.o: ../nat/linux-personality.c): Remove.
1127 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1128 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1129 (x86-linux.o: ../nat/x86-linux.c): Remove.
1130 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1131 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1132
6bda016b
SM
11332017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1134
1135 * Makefile.in (%.o: ../common/%.c): New rule.
1136 (signals.o: ../common/signals.c): Remove.
1137 (print-utils.o: ../common/print-utils.c): Remove.
1138 (rsp-low.o: ../common/rsp-low.c): Remove.
1139 (common-utils.o: ../common/common-utils.c): Remove.
1140 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1141 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1142 (vec.o: ../common/vec.c): Remove.
1143 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1144 (xml-utils.o: ../common/xml-utils.c): Remove.
1145 (ptid.o: ../common/ptid.c): Remove.
1146 (buffer.o: ../common/buffer.c): Remove.
1147 (format.o: ../common/format.c): Remove.
1148 (filestuff.o: ../common/filestuff.c): Remove.
1149 (agent.o: ../common/agent.c): Remove.
1150 (errors.o: ../common/errors.c): Remove.
1151 (environ.o: ../common/environ.c): Remove.
1152 (common-debug.o: ../common/common-debug.c): Remove.
1153 (cleanups.o: ../common/cleanups.c): Remove.
1154 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1155 (fileio.o: ../common/fileio.c): Remove.
1156 (common-regcache.o: ../common/common-regcache.c): Remove.
1157 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1158 (new-op.o: ../common/new-op.c): Remove.
1159 (btrace-common.o: ../common/btrace-common.c): Remove.
1160
21122961
SM
11612017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1162
1163 * Makefile.in (%.o: ../target/%.c): New rule.
1164 (waitstatus.o: ../target/waitstatus.c): Remove.
1165
c362e621
SM
11662017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1167
1168 * Makefile.in
1169 (%.c: ../regformats/%.dat,
1170 (%.c: ../regformats/arm/%.dat,
1171 (%.c: ../regformats/i386/%.dat,
1172 (%.c: ../regformats/rs6000/%.dat): New rules.
1173 (aarch64.c): Remove.
1174 (reg-arm.c): Remove.
1175 (arm-with-iwmmxt.c): Remove.
1176 (arm-with-vfpv2.c): Remove.
1177 (arm-with-vfpv3.c): Remove.
1178 (arm-with-neon.c): Remove.
1179 (reg-bfin.c): Remove.
1180 (reg-cris.c): Remove.
1181 (reg-crisv32.c): Remove.
1182 (i386.c): Remove.
1183 (i386-linux.c): Remove.
1184 (i386-avx.c): Remove.
1185 (i386-avx-linux.c): Remove.
1186 (i386-avx-avx512.c): Remove.
1187 (i386-avx-avx512-linux.c): Remove.
1188 (i386-mpx.c): Remove.
1189 (i386-mpx-linux.c): Remove.
1190 (i386-avx-mpx-avx512-pku.c): Remove.
1191 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1192 (i386-avx-mpx.c): Remove.
1193 (i386-avx-mpx-linux.c): Remove.
1194 (i386-mmx.c): Remove.
1195 (i386-mmx-linux.c): Remove.
1196 (reg-ia64.c): Remove.
1197 (reg-m32r.c): Remove.
1198 (reg-m68k.c): Remove.
1199 (reg-cf.c): Remove.
1200 (mips-linux.c): Remove.
1201 (mips-dsp-linux.c): Remove.
1202 (mips64-linux.c): Remove.
1203 (mips64-dsp-linux.c): Remove.
1204 (nios2-linux.c): Remove.
1205 (powerpc-32.c): Remove.
1206 (powerpc-32l.c): Remove.
1207 (powerpc-altivec32l.c): Remove.
1208 (powerpc-cell32l.c): Remove.
1209 (powerpc-vsx32l.c): Remove.
1210 (powerpc-isa205-32l.c): Remove.
1211 (powerpc-isa205-altivec32l.c): Remove.
1212 (powerpc-isa205-vsx32l.c): Remove.
1213 (powerpc-e500l.c): Remove.
1214 (powerpc-64l.c): Remove.
1215 (powerpc-altivec64l.c): Remove.
1216 (powerpc-cell64l.c): Remove.
1217 (powerpc-vsx64l.c): Remove.
1218 (powerpc-isa205-64l.c): Remove.
1219 (powerpc-isa205-altivec64l.c): Remove.
1220 (powerpc-isa205-vsx64l.c): Remove.
1221 (s390-linux32.c): Remove.
1222 (s390-linux32v1.c): Remove.
1223 (s390-linux32v2.c): Remove.
1224 (s390-linux64.c): Remove.
1225 (s390-linux64v1.c): Remove.
1226 (s390-linux64v2.c): Remove.
1227 (s390-te-linux64.c): Remove.
1228 (s390-vx-linux64.c): Remove.
1229 (s390-tevx-linux64.c): Remove.
1230 (s390x-linux64.c): Remove.
1231 (s390x-linux64v1.c): Remove.
1232 (s390x-linux64v2.c): Remove.
1233 (s390x-te-linux64.c): Remove.
1234 (s390x-vx-linux64.c): Remove.
1235 (s390x-tevx-linux64.c): Remove.
1236 (tic6x-c64xp-linux.c): Remove.
1237 (tic6x-c64x-linux.c): Remove.
1238 (tic6x-c62x-linux.c): Remove.
1239 (reg-sh.c): Remove.
1240 (reg-sparc64.c): Remove.
1241 (reg-spu.c): Remove.
1242 (amd64.c): Remove.
1243 (amd64-linux.c): Remove.
1244 (amd64-avx.c): Remove.
1245 (amd64-avx-linux.c): Remove.
1246 (amd64-avx-avx512.c): Remove.
1247 (amd64-avx-avx512-linux.c): Remove.
1248 (amd64-mpx.c): Remove.
1249 (amd64-mpx-linux.c): Remove.
1250 (amd64-avx-mpx-avx512-pku.c): Remove.
1251 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1252 (amd64-avx-mpx.c): Remove.
1253 (amd64-avx-mpx-linux.c): Remove.
1254 (x32.c): Remove.
1255 (x32-linux.c): Remove.
1256 (x32-avx.c): Remove.
1257 (x32-avx-linux.c): Remove.
1258 (x32-avx-avx512.c): Remove.
1259 (x32-avx-avx512-linux.c): Remove.
1260 (reg-xtensa.c): Remove.
1261 (reg-tilegx.c): Remove.
1262 (reg-tilegx32.c): Remove.
1263
1672e0d9
SDJ
12642017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1265
1266 * Makefile.in (SFILES): Add "common/environ.c".
1267 (OBJS): Add "common/environ.h".
1268
239b6d10
WT
12692017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1270
1271 * configure.ac: Check if the fs_base and gs_base members of
1272 `struct user_regs_struct' exist.
1273 * config.in: Regenerated.
1274 * configure: Likewise.
1275
694b382c
AT
12762017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1277
1278 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1279 target_read_memory.
1280 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1281 (get_next_pcs_syscall_next_pc): Likewise.
1282
7dc53023
LM
12832016-12-23 Luis Machado <lgustavo@codesourcery.com>
1284
1285 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1286 * nto-x86-low.c: Likewise.
1287
ad02e4fe
SM
12882016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1289
1290 * Makefile.in: Include disable-implicit-rules.mk.
1291
dcb07cfa
PA
12922016-11-23 Pedro Alves <palves@redhat.com>
1293
1294 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1295 (debug_vprintf): Use std::chrono::steady_clock instead of
1296 gettimeofday. Use '.' instead of ':'.
1297 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1298 (get_timestamp): Use std::chrono::steady_clock instead of
1299 gettimeofday.
1300
8629c02c
SM
13012016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1302
1303 * Makefile.in: Fix whitespace formatting.
1304
b593ecca
SM
13052016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1306
1307 * Makefile.in (SFILES, OBS): Flatten list and order
1308 alphabetically.
1309
9986ba08
PA
13102016-11-23 Pedro Alves <palves@redhat.com>
1311
1312 * event-loop.c (handle_file_event): Use warning.
1313 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1314 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1315 Use warning.
1316
4eefa7bc
PA
13172016-11-23 Pedro Alves <palves@redhat.com>
1318
1319 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1320 output.
1321 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1322 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1323 debug_printf and debug_flush for debug output.
1324 * server.c (handle_general_set): Likewise.
1325 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1326 output.
1327
5443506e
SM
13282016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1329
1330 * Makefile.in (.c.o): Replace rule with ...
1331 (%.o: %.c): ... this one.
1332
3b165252
SM
13332016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1334
1335 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1336 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1337 make.
1338 * configure.ac: Remove checks for the make program.
1339 * configure: Re-generate.
1340
0bcda685
PA
13412016-10-28 Pedro Alves <palves@redhat.com>
1342
1343 * Makefile.in (CXX_DIALECT): Get from configure.
1344 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1345 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1346 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1347 * config.in: Regenerate.
1348 * configure: Regenerate.
1349
c3805894
YQ
13502016-10-27 Yao Qi <yao.qi@linaro.org>
1351
1352 * linux-low.c (linux_supports_range_stepping): Return true if
1353 can_software_single_step return true.
1354
89342618
YQ
13552016-10-27 Yao Qi <yao.qi@linaro.org>
1356
1357 * inferiors.c (find_inferior_in_random): New function.
1358 * inferiors.h (find_inferior_in_random): Declare.
1359 * linux-low.c (linux_wait_for_event_filtered): Call
1360 find_inferior_in_random instead of find_inferior.
1361
e3652c84
YQ
13622016-10-27 Yao Qi <yao.qi@linaro.org>
1363
1364 * linux-low.c (linux_wait_1): If single-step breakpoints are
1365 inserted, remove them.
1366
5a04c4cf
PA
13672016-10-26 Pedro Alves <palves@redhat.com>
1368
1369 * linux-low.c (handle_extended_wait): Link parent/child fork
1370 threads.
1371 (linux_wait_1): Unlink them.
1372 (linux_set_resume_request): Ignore resume requests for
1373 already-resumed and unhandled fork child threads.
1374 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1375 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1376 New functions.
1377 (handle_v_requests) <vCont>: Don't call require_running.
1378 * server.h (in_queued_stop_replies): New declaration.
1379
cb93dc7f
YQ
13802016-10-24 Yao Qi <yao.qi@linaro.org>
1381
1382 PR server/20733
1383 * linux-aarch64-low.c (append_insns): Cast the return value to
1384 'uint32_t *'.
1385
a1078bea
YQ
13862016-10-10 Yao Qi <yao.qi@linaro.org>
1387
1388 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1389
1fb77080
SDJ
13902016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1391
1392 * target.c (target_supports_multi_process): New function, moved
1393 from...
1394 * target.h (target_supports_multi_process): ... here. Remove
1395 macro.
1396
39b5a3b9
TT
13972016-10-05 Tom Tromey <tom@tromey.com>
1398
1399 PR remote/20655:
1400 * tracepoint.c (handle_tracepoint_bkpts): Check
1401 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1402
c1d0b70a
YQ
14032016-10-05 Yao Qi <yao.qi@linaro.org>
1404
1405 * configure.srv: Update the path of arm-*.xml files.
1406
0a69eedb
YQ
14072016-10-05 Terry Guo <terry.guo@arm.com>
1408 Yao Qi <yao.qi@linaro.org>
1409
1410 * Makefile.in: Adjust the path of rules.
1411 * configure.srv: Update the path of xml files.
1412 * regformats/arm-with-iwmmxt.dat: Regenerated.
1413 * regformats/arm-with-neon.dat: Likewise.
1414 * regformats/arm-with-vfpv2.dat: Likewise.
1415 * regformats/arm-with-vfpv3.dat Likewise.
1416
17e16485
YQ
14172016-09-30 Yao Qi <yao.qi@linaro.org>
1418
1419 PR gdbserver/20627
1420 * target.c (target_stop_and_wait): Don't call
1421 target_continue_no_signal, use resume_stop instead.
1422
edeeb602
YQ
14232016-09-26 Yao Qi <yao.qi@linaro.org>
1424
1425 * linux-low.c (linux_wait_1): Call debug_exit.
1426
503b1c39
PA
14272016-09-23 Pedro Alves <palves@redhat.com>
1428
1429 * Makefile.in (SFILES): Add common/new-op.c.
1430 (OBS): Add common/new-op.o.
1431 (new-op.o): New rule.
1432
74172ecf
SM
14332016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1434
1435 * .gitinore: Ignore more files.
1436
fc6cda2e
YQ
14372016-09-21 Yao Qi <yao.qi@linaro.org>
1438
1439 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1440 23.
1441
bc1e6c81
SDJ
14422016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1443
1444 * server.c (start_inferior): Call target_mourn_inferior instead of
1445 mourn_inferior; pass ptid_t argument to it.
1446 (resume): Likewise.
1447 (handle_target_event): Likewise.
1448 * target.c (target_mourn_inferior): New function.
1449 * target.h (mourn_inferior): Delete macro.
1450
0e00e962
AA
14512016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1452
1453 * linux-low.c (lwp_is_stepping): New function.
1454
1d8cb77d
CL
14552016-09-06 Carl Love <cel@us.ibm.com>
1456
1457 * server.c (start_inferior): Fixed comment, requested comment change
1458 didn't get updated correctly. Removed reference to ptrace () call as
1459 it is only true on Linux systems.
1460
7313bced
CL
14612016-09-06 Carl Love <cel@us.ibm.com>
1462
1463 * server.c (start_inferior): Do not call
1464 function target_post_create_inferior () if the
1465 inferior process has already exited.
1466
cf6de44d
PA
14672016-09-05 Pedro Alves <palves@redhat.com>
1468
1469 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1470 (COMPILE.pre, CC_LD): Use CXX directly.
1471 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1472 * acinclude.m4: Don't include build-with-cxx.m4.
1473 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1474 * configure: Regenerate.
1475
c1da6748
AT
14762016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1477
1478 PR gdb/19495
1479 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1480 call writing data to own_buf.
1481
f2b9e3df
SDJ
14822016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1483
1484 * target.c (mywait): Call target_wait instead of
1485 the_target->wait.
1486 (target_wait): New function.
1487
049a8570
SDJ
14882016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1489
1490 * server.c (start_inferior): New variable 'ptid'. Replace calls
1491 to the_target->resume by target_continue{,_no_signal}, depending
1492 on the case.
1493 * target.c (target_stop_and_wait): Call target_continue_no_signal
1494 instead of the_target->resume.
1495 (target_continue): New function.
1496
3aa5cfa0
AT
14972016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1498
1499 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1500
754653a7
AZ
15012016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1502
1503 PR server/20491
1504 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1505 ps_prochandle.
1506 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1507 * linux-arm-low.c (ps_get_thread_area): Likewise.
1508 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1509 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1510 * linux-mips-low.c (ps_get_thread_area): Likewise.
1511 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1512 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1513 * linux-x86-low.c (ps_get_thread_area): Likewise.
1514 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1515
ed036b40
PA
15162016-08-19 Pedro Alves <palves@redhat.com>
1517
1518 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1519
c8ef42ee
PA
15202016-08-19 Pedro Alves <palves@redhat.com>
1521
1522 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1523 comment. Use memcpy instead of casting through unsigned long.
1524
9c235a72
PA
15252016-08-19 Pedro Alves <palves@redhat.com>
1526
1527 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1528 allocating around 0x80000000.
1529
201506da
PA
15302016-08-19 Pedro Alves <palves@redhat.com>
1531
1532 PR gdb/20415
1533 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1534 (x32-avx512-linux-ipa.o): New rules.
1535 * configure.ac (x86_64-*-linux*): New x32 check.
1536 * configure.srv (ipa_x32_linux_regobj): New.
1537 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1538 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1539 descriptions.
1540 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1541 descriptions.
1542 * configure: Regenerate.
1543
f348d89a
PA
15442016-08-09 Pedro Alves <palves@redhat.com>
1545
1546 PR gdb/18653
1547 * Makefile.in (OBS): Add signals-state-save-restore.o.
1548 (signals-state-save-restore.o): New rule.
1549 * config.in: Regenerate.
1550 * configure: Regenerate.
1551 * linux-low.c: Include "signals-state-save-restore.h".
1552 (linux_create_inferior): Call
1553 restore_original_signals_state.
1554 * server.c: Include "dispositions-save-restore.h".
1555 (captured_main): Call save_original_signals_state.
1556
1baf5149
PA
15572016-08-05 Pedro Alves <palves@redhat.com>
1558
1559 * configure: Regenerate.
1560
fcd4a73d
YQ
15612016-08-04 Yao Qi <yao.qi@linaro.org>
1562
1563 * linux-low.c (regsets_fetch_inferior_registers): Check
1564 errno is ESRCH or not.
1565
979659d0
YQ
15662016-08-02 Yao Qi <yao.qi@linaro.org>
1567
1568 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1569 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1570 (thread_db_load_search): Update.
1571 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1572 td_ta_set_event and td_ta_event_getmsg.
1573
6598661d
PA
15742016-07-26 Pedro Alves <palves@redhat.com>
1575
1576 PR server/20414
1577 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1578 of unsigned long for 64-bit registers and use uint32_t instead of
1579 unsigned int for 32-bit registers.
1580
9cf12d57
PA
15812016-07-26 Pedro Alves <palves@redhat.com>
1582
1583 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1584 to 'ptrace'.
1585
305450ed
TT
15862016-07-21 Tom Tromey <tom@tromey.com>
1587
1588 * configure: Rebuild.
1589
2583da7c
YQ
15902016-07-21 Yao Qi <yao.qi@linaro.org>
1591
1592 * mem-break.c (find_gdb_breakpoint): Cast bp to
1593 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1594
21536b36
YQ
15952016-07-21 Yao Qi <yao.qi@linaro.org>
1596
1597 * server.c (handle_v_requests): Support s and S actions
1598 if target_supports_software_single_step return true.
1599
8901d193
YQ
16002016-07-21 Yao Qi <yao.qi@linaro.org>
1601
1602 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1603 is resume_step, call maybe_hw_step.
1604 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1605 and unstop them.
1606 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1607 breakpoints or not.
1608 (proceed_one_lwp): If resume request is resume_step, install
1609 reinsert breakpoints and call maybe_hw_step.
1610
0e9a339e
YQ
16112016-07-21 Yao Qi <yao.qi@linaro.org>
1612
1613 * linux-low.c (proceed_one_lwp): Declare.
1614 (linux_resume_one_thread): Remove local variable 'step'.
1615 Lift code enqueue signal. Call proceed_one_lwp instead of
1616 linux_resume_one_lwp.
1617
4281b351
YQ
16182016-07-21 Yao Qi <yao.qi@linaro.org>
1619
1620 * linux-low.c (linux_resume_one_thread): Call
1621 enqueue_pending_signal.
1622
984a2c04
YQ
16232016-07-21 Yao Qi <yao.qi@linaro.org>
1624
1625 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1626 * inferiors.c (do_restore_current_thread_cleanup): New function.
1627 (make_cleanup_restore_current_thread): Likewise.
1628 * linux-low.c (install_software_single_step_breakpoints): Call
1629 make_cleanup_restore_current_thread. Switch current_thread to
1630 thread.
1631
bec903c9
YQ
16322016-07-21 Yao Qi <yao.qi@linaro.org>
1633
1634 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1635 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1636 (clone_one_breakpoint): Likewise.
1637 (delete_reinsert_breakpoints): Change parameter to thread.
1638 Callers updated.
1639 (has_reinsert_breakpoints): Likewise.
1640 (uninsert_reinsert_breakpoints): Likewise.
1641 (reinsert_reinsert_breakpoints): Likewise.
1642 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1643 (delete_reinsert_breakpoints): Likewise.
1644 (reinsert_reinsert_breakpoints): Likewise.
1645 (uninsert_reinsert_breakpoints): Likewise.
1646 (has_reinsert_breakpoints): Likewise.
1647
63c40ec7
YQ
16482016-07-21 Yao Qi <yao.qi@linaro.org>
1649
1650 * inferiors.c (get_thread_process): Make parameter const.
1651 * inferiors.h (get_thread_process): Update declaration.
1652 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1653 Add new parameters child_thread and parent_thread. Callers
1654 updated.
1655 * mem-break.h (clone_all_breakpoints): Update declaration.
1656
9aa76cd0
YQ
16572016-07-21 Yao Qi <yao.qi@linaro.org>
1658
1659 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1660 <command_list, handler>: Remove.
1661 (struct gdb_breakpoint): New.
1662 (struct other_breakpoint): New.
1663 (struct reinsert_breakpoint): New.
1664 (is_gdb_breakpoint): New function.
1665 (any_persistent_commands): Update command_list if
1666 is_gdb_breakpoint returns true.
1667 (set_breakpoint): Create breakpoints according to their types.
1668 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1669 (set_gdb_breakpoint_1): Likewise.
1670 (set_gdb_breakpoint): Likewise.
1671 (clear_breakpoint_conditions): Change parameter type to
1672 'struct gdb_breakpoint *'.
1673 (clear_breakpoint_commands): Likewise.
1674 (clear_breakpoint_conditions_and_commands): Likewise.
1675 (add_condition_to_breakpoint): Likewise.
1676 (add_breakpoint_condition): Likewise.
1677 (add_commands_to_breakpoint): Likewise.
1678 (check_breakpoints): Check other_breakpoint.
1679 (clone_one_breakpoint): Clone breakpopint according to its type.
1680 * mem-break.h (struct gdb_breakpoint): Declare.
1681 (set_gdb_breakpoint): Update declaration.
1682 (clear_breakpoint_conditions_and_commands): Likewise.
1683 (add_breakpoint_condition): Likewise.
1684 (add_breakpoint_commands): Likewise.
1685 * server.c (process_point_options): Change parameter type to
1686 'struct gdb_breakpoint *'.
1687
811f8301
YQ
16882016-07-21 Yao Qi <yao.qi@linaro.org>
1689
1690 * mem-break.c (set_breakpoint_at): Rename it to ...
1691 (set_breakpoint_type_at): ... it.
1692 (set_breakpoint_at): Call set_breakpoint_type_at.
1693 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1694 * mem-break.h (set_breakpoint_at): Update comments.
1695
b1c51e36
CLT
16962016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1697
1698 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1699 to buf parameter.
1700 (nios2_store_gregset): Likewise.
1701
ced2dffb
PA
17022016-07-01 Pedro Alves <palves@redhat.com>
1703 Antoine Tremblay <antoine.tremblay@ericsson.com>
1704
1705 * linux-low.c: Change interface to take the target lwp_info
1706 pointer directly and return void. Handle detaching from a zombie
1707 thread.
1708 (linux_detach_lwp_callback): New function.
1709 (linux_detach): Detach from the leader thread after detaching from
1710 the clone threads.
1711
2ac09a5b
YQ
17122016-06-28 Yao Qi <yao.qi@linaro.org>
1713
1714 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1715 for variable new_offset.
1716 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1717 (aarch64_ftrace_insn_reloc_cb): Likewise.
1718 (aarch64_ftrace_insn_reloc_tb): Likewise.
1719 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1720 PRIx64 instead of PRIx32.
1721
79e7fd4f
YQ
17222016-06-28 Yao Qi <yao.qi@linaro.org>
1723
1724 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1725 (the_low_target): Install arm_get_syscall_trapinfo.
1726
061fc021
YQ
17272016-06-28 Yao Qi <yao.qi@linaro.org>
1728
1729 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1730 function.
1731 (the_low_target): Install aarch64_get_syscall_trapinfo.
1732
4cc32bec
YQ
17332016-06-28 Yao Qi <yao.qi@linaro.org>
1734
1735 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1736 Callers updated.
1737 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1738 Remove parameter sysno.
1739 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1740 sysret.
1741
782c1122
AA
17422016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1743
1744 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1745 (s390_emit_ne_goto): Likewise.
1746 (s390_emit_lt_goto): Likewise.
1747 (s390_emit_le_goto): Likewise.
1748 (s390_emit_gt_goto): Likewise.
1749 (s390_emit_ge_goto): Likewise.
1750 (s390x_emit_eq_goto): Likewise.
1751 (s390x_emit_ne_goto): Likewise.
1752 (s390x_emit_lt_goto): Likewise.
1753 (s390x_emit_le_goto): Likewise.
1754 (s390x_emit_gt_goto): Likewise.
1755 (s390x_emit_ge_goto): Likewise.
1756 (s390_emit_ops_impl): Mark variable static.
1757 (s390x_emit_ops): Likewise.
1758
2e7b624b
YQ
17592016-06-17 Yao Qi <yao.qi@linaro.org>
1760
1761 * linux-low.c (handle_extended_wait): Call
1762 uninsert_reinsert_breakpoints for the parent process. Remove
1763 reinsert breakpoints from the child process. Reinsert them to
1764 the parent process when vfork is done.
1765 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1766 (reinsert_reinsert_breakpoints): New function.
1767 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1768 (reinsert_reinsert_breakpoints): Declare.
1769
8a81c5d7
YQ
17702016-06-17 Yao Qi <yao.qi@linaro.org>
1771
1772 * linux-low.c (handle_extended_wait): If the parent is doing
1773 step-over, remove the reinsert breakpoints from the forked child.
1774
f50bf8e5
YQ
17752016-06-17 Yao Qi <yao.qi@linaro.org>
1776
1777 * linux-low.c (unsuspend_all_lwps): Declare.
1778 (linux_low_filter_event): If thread exited, call finish_step_over.
1779 If step-over is finished, unsuspend other threads.
1780
8376a3cb
YQ
17812016-06-17 Yao Qi <yao.qi@linaro.org>
1782
1783 * linux-low.c (linux_resume_one_lwp_throw): Assert
1784 has_reinsert_breakpoints returns false.
1785 * mem-break.c (delete_disabled_breakpoints): Assert
1786 bp type isn't reinsert_breakpoint.
1787
f79b145d
YQ
17882016-06-17 Yao Qi <yao.qi@linaro.org>
1789
1790 * linux-low.c (maybe_hw_step): New function.
1791 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1792 (finish_step_over): Switch current_thread to lwp temporarily,
1793 and assert has_reinsert_breakpoints returns true.
1794 (proceed_one_lwp): Call maybe_hw_step.
1795 * mem-break.c (has_reinsert_breakpoints): New function.
1796 * mem-break.h (has_reinsert_breakpoints): Declare.
1797
0ae534d2
JT
17982016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1799
1800 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1801
fcdad592
YQ
18022016-05-17 Yao Qi <yao.qi@linaro.org>
1803
1804 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1805 instead of find_inferior.
1806
9e784964
YQ
18072016-05-05 Yao Qi <yao.qi@linaro.org>
1808
1809 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1810 Initialize res to zero.
1811
cf2ebb6e
YQ
18122016-05-05 Yao Qi <yao.qi@linaro.org>
1813
1814 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1815 to uint32_t.
1816
c1aebf87
UW
18172016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1818
1819 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1820 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1821 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1822
35fd2deb 18232016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 1824 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
1825
1826 * tracepoint.c (write_inferior_int8): New function.
1827 (cmd_qtenable_disable): Write enable flag using
1828 write_inferior_int8.
1829
484b3c32
YQ
18302016-04-25 Yao Qi <yao.qi@linaro.org>
1831
1832 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1833 (need_step_over_p): Return zero if the LWP has pending signals
1834 can be delivered on software single step target.
1835
85ba7d86
YQ
18362016-04-25 Yao Qi <yao.qi@linaro.org>
1837
1838 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1839 return instead of error.
1840
3539aa13
YQ
18412016-04-22 Yao Qi <yao.qi@linaro.org>
1842
1843 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1844 to 23.
1845
5b061e98
YQ
18462016-04-22 Yao Qi <yao.qi@linaro.org>
1847
1848 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1849 signal when stepping over breakpoint with software single
1850 step.
1851
3451269c
PA
18522016-04-21 Pedro Alves <palves@redhat.com>
1853
1854 * linux-s390-low.c (s390_collect_ptrace_register)
1855 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1856 add casts.
1857 (s390_check_regset): Use void * instead of gdb_byte *.
1858
a2358508
PA
18592016-04-20 Pedro Alves <palves@redhat.com>
1860
1861 * configure: Renegerate.
1862
6885166d
YQ
18632016-04-20 Yao Qi <yao.qi@linaro.org>
1864
1865 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1866 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1867 number 16.
1868 (arm_store_gregset): Likewise.
1869
2b863f51
WT
18702016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1871
1872 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1873 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1874 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1875 (amd64-avx-mpx-linux.c): New rules.
1876 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1877 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1878 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1879 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1880 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1881 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1882 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1883 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1884 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1885 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1886 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1887 * linux-x86-low.c (x86_linux_read_description): Add case for
1888 X86_XSTATE_AVX_MPX_MASK.
1889 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1890 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1891 init_registers_i386_avx_mpx_linux.
1892 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1893 (initialize_low_tracepoint): Call
1894 init_registers_i386_avx_mpx_linux.
1895 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1896 (initialize_low_tracepoint): Call
1897 init_registers_amd64_avx_mpx_linux.
1898 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1899 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1900 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1901 declarations.
1902
9b30624b
PA
19032016-04-18 Pedro Alves <palves@redhat.com>
1904
1905 * configure: Regenerate.
1906
45e3745e
AT
19072016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1908
1909 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1910 (aarch64_emit_sub): Likewise.
1911
2afc13ff
PA
19122016-04-12 Pedro Alves <palves@redhat.com>
1913
1914 * utils.c (prepare_to_throw_exception): Delete.
1915
6e774b13
SM
19162016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1917
1918 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1919
4dca19f8
MK
19202016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1921
1922 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1923
d0a9981f
MK
19242016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1925
1926 * linux-aarch64-ipa.c: Add <elf.h> include.
1927 * linux-ppc-ipa.c: Add <elf.h> include.
1928 * linux-s390-ipa.c: Add <elf.h> include.
1929
252db07e
MK
19302016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1931
1932 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1933 (get_raw_reg_ptr): Likewise.
1934 (get_trace_state_variable_value_ptr): Likewise.
1935 (set_trace_state_variable_value_ptr): Likewise.
1936 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1937 char *.
1938
14e2b6d9
MK
19392016-03-31 Wei-cheng Wang <cole945@gmail.com>
1940 Marcin Kościelnicki <koriakin@0x04.net>
1941
1942 PR/17221
1943 * linux-ppc-low.c (emit_insns): New function.
1944 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1945 (ppc_emit_prologue): New function.
1946 (ppc_emit_epilogue): New function.
1947 (ppc_emit_add): New function.
1948 (ppc_emit_sub): New function.
1949 (ppc_emit_mul): New function.
1950 (ppc_emit_lsh): New function.
1951 (ppc_emit_rsh_signed): New function.
1952 (ppc_emit_rsh_unsigned): New function.
1953 (ppc_emit_ext): New function.
1954 (ppc_emit_zero_ext): New function.
1955 (ppc_emit_log_not): New function.
1956 (ppc_emit_bit_and): New function.
1957 (ppc_emit_bit_or): New function.
1958 (ppc_emit_bit_xor): New function.
1959 (ppc_emit_bit_not): New function.
1960 (ppc_emit_equal): New function.
1961 (ppc_emit_less_signed): New function.
1962 (ppc_emit_less_unsigned): New function.
1963 (ppc_emit_ref): New function.
1964 (ppc_emit_const): New function.
1965 (ppc_emit_reg): New function.
1966 (ppc_emit_pop): New function.
1967 (ppc_emit_stack_flush): New function.
1968 (ppc_emit_swap): New function.
1969 (ppc_emit_stack_adjust): New function.
1970 (ppc_emit_call): New function.
1971 (ppc_emit_int_call_1): New function.
1972 (ppc_emit_void_call_2): New function.
1973 (ppc_emit_if_goto): New function.
1974 (ppc_emit_goto): New function.
1975 (ppc_emit_eq_goto): New function.
1976 (ppc_emit_ne_goto): New function.
1977 (ppc_emit_lt_goto): New function.
1978 (ppc_emit_le_goto): New function.
1979 (ppc_emit_gt_goto): New function.
1980 (ppc_emit_ge_goto): New function.
1981 (ppc_write_goto_address): New function.
1982 (ppc_emit_ops_impl): New static variable.
1983 (ppc64v1_emit_prologue): New function.
1984 (ppc64v2_emit_prologue): New function.
1985 (ppc64_emit_epilogue): New function.
1986 (ppc64_emit_add): New function.
1987 (ppc64_emit_sub): New function.
1988 (ppc64_emit_mul): New function.
1989 (ppc64_emit_lsh): New function.
1990 (ppc64_emit_rsh_signed): New function.
1991 (ppc64_emit_rsh_unsigned): New function.
1992 (ppc64_emit_ext): New function.
1993 (ppc64_emit_zero_ext): New function.
1994 (ppc64_emit_log_not): New function.
1995 (ppc64_emit_bit_and): New function.
1996 (ppc64_emit_bit_or): New function.
1997 (ppc64_emit_bit_xor): New function.
1998 (ppc64_emit_bit_not): New function.
1999 (ppc64_emit_equal): New function.
2000 (ppc64_emit_less_signed): New function.
2001 (ppc64_emit_less_unsigned): New function.
2002 (ppc64_emit_ref): New function.
2003 (ppc64_emit_const): New function.
2004 (ppc64v1_emit_reg): New function.
2005 (ppc64v2_emit_reg): New function.
2006 (ppc64_emit_pop): New function.
2007 (ppc64_emit_stack_flush): New function.
2008 (ppc64_emit_swap): New function.
2009 (ppc64v1_emit_call): New function.
2010 (ppc64v2_emit_call): New function.
2011 (ppc64v1_emit_int_call_1): New function.
2012 (ppc64v2_emit_int_call_1): New function.
2013 (ppc64v1_emit_void_call_2): New function.
2014 (ppc64v2_emit_void_call_2): New function.
2015 (ppc64_emit_if_goto): New function.
2016 (ppc64_emit_eq_goto): New function.
2017 (ppc64_emit_ne_goto): New function.
2018 (ppc64_emit_lt_goto): New function.
2019 (ppc64_emit_le_goto): New function.
2020 (ppc64_emit_gt_goto): New function.
2021 (ppc64_emit_ge_goto): New function.
2022 (ppc64v1_emit_ops_impl): New static variable.
2023 (ppc64v2_emit_ops_impl): New static variable.
2024 (ppc_emit_ops): New function.
2025 (linux_low_target): Wire in ppc_emit_ops.
2026
a2174ba4
MK
20272016-03-31 Wei-cheng Wang <cole945@gmail.com>
2028 Marcin Kościelnicki <koriakin@0x04.net>
2029
2030 PR/17221
2031 * Makefile.in: Add powerpc-*-ipa.o
2032 * configure.srv: Add ipa_obj for powerpc*-linux.
2033 * linux-ppc-ipa.c: New file.
2034 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2035 includes.
2036 (PPC_FIELD): New macro.
2037 (PPC_SEXT): New macro.
2038 (PPC_OP6): New macro.
2039 (PPC_BO): New macro.
2040 (PPC_LI): New macro.
2041 (PPC_BD): New macro.
2042 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2043 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2044 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2045 (ppc_get_thread_area): New function.
2046 (is_elfv2_inferior): New function.
2047 (gen_ds_form): New function.
2048 (GEN_STD): New macro.
2049 (GEN_STDU): New macro.
2050 (GEN_LD): New macro.
2051 (GEN_LDU): New macro.
2052 (gen_d_form): New function.
2053 (GEN_ADDI): New macro.
2054 (GEN_ADDIS): New macro.
2055 (GEN_LI): New macro.
2056 (GEN_LIS): New macro.
2057 (GEN_ORI): New macro.
2058 (GEN_ORIS): New macro.
2059 (GEN_LWZ): New macro.
2060 (GEN_STW): New macro.
2061 (GEN_STWU): New macro.
2062 (gen_xfx_form): New function.
2063 (GEN_MFSPR): New macro.
2064 (GEN_MTSPR): New macro.
2065 (GEN_MFCR): New macro.
2066 (GEN_MTCR): New macro.
2067 (GEN_SYNC): New macro.
2068 (GEN_LWSYNC): New macro.
2069 (gen_x_form): New function.
2070 (GEN_OR): New macro.
2071 (GEN_MR): New macro.
2072 (GEN_LWARX): New macro.
2073 (GEN_STWCX): New macro.
2074 (GEN_CMPW): New macro.
2075 (gen_md_form): New function.
2076 (GEN_RLDICL): New macro.
2077 (GEN_RLDICR): New macro.
2078 (gen_i_form): New function.
2079 (GEN_B): New macro.
2080 (GEN_BL): New macro.
2081 (gen_b_form): New function.
2082 (GEN_BNE): New macro.
2083 (GEN_LOAD): New macro.
2084 (GEN_STORE): New macro.
2085 (gen_limm): New function.
2086 (gen_atomic_xchg): New function.
2087 (gen_call): New function.
2088 (ppc_relocate_instruction): New function.
2089 (ppc_install_fast_tracepoint_jump_pad): New function.
2090 (ppc_get_min_fast_tracepoint_insn_len): New function.
2091 (ppc_get_ipa_tdesc_idx): New function.
2092 (the_low_target): Wire in the new functions.
2093 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2094 tdescs.
2095 * linux-ppc-tdesc.h: New file.
2096
a13c4696
MK
20972016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2098
2099 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2100 (alloc_jump_pad_buffer): New function.
2101 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2102 (alloc_jump_pad_buffer): New function.
2103 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2104 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2105 (alloc_jump_pad_buffer): New function.
2106 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2107 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2108 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2109 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2110
1cda1512
MK
21112016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2112
2113 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2114 * linux-amd64-ipa.c: Likewise.
2115 * linux-i386-ipa.c: Likewise.
2116 * linux-s390-ipa.c: Likewise.
2117 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2118 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2119 set_trace_state_variable_value_ptr.
2120 (struct ipa_sym_addresses): Likewise.
2121 (symbol_list): Likewise.
2122 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2123 accessing gdb_collect directly.
2124 (gdb_collect_ptr_type): New typedef.
2125 (get_raw_reg_ptr_type): New typedef.
2126 (get_trace_state_variable_value_ptr_type): New typedef.
2127 (set_trace_state_variable_value_ptr_type): New typedef.
2128 (gdb_collect_ptr): New global.
2129 (get_raw_reg_ptr): New global.
2130 (get_trace_state_variable_value_ptr): New global.
2131 (set_trace_state_variable_value_ptr): New global.
2132 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2133 accessing get_raw_reg directly.
2134 (get_get_tsv_func_addr): Likewise for
2135 get_trace_state_variable_value_ptr.
2136 (get_set_tsv_func_addr): Likewise for
2137 set_trace_state_variable_value_ptr.
2138 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2139
72fb5488
SM
21402016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2141
2142 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2143
28170b88
MK
21442016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2145
2146 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2147 packets.
2148 (relocate_instruction): Remove own_buf.
2149 * server.c (own_buf): Make global.
2150 (handle_v_requests): Make global.
2151 * server.h (own_buf): New declaration.
2152 (handle_v_requests): New prototype.
2153
f39e8743
MK
21542016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2155
2156 PR 18377
2157 * linux-s390-low.c (add_insns): New function.
2158 (s390_emit_prologue): New function.
2159 (s390_emit_epilogue): New function.
2160 (s390_emit_add): New function.
2161 (s390_emit_sub): New function.
2162 (s390_emit_mul): New function.
2163 (s390_emit_lsh): New function.
2164 (s390_emit_rsh_signed): New function.
2165 (s390_emit_rsh_unsigned): New function.
2166 (s390_emit_ext): New function.
2167 (s390_emit_log_not): New function.
2168 (s390_emit_bit_and): New function.
2169 (s390_emit_bit_or): New function.
2170 (s390_emit_bit_xor): New function.
2171 (s390_emit_bit_not): New function.
2172 (s390_emit_equal): New function.
2173 (s390_emit_less_signed): New function.
2174 (s390_emit_less_unsigned): New function.
2175 (s390_emit_ref): New function.
2176 (s390_emit_if_goto): New function.
2177 (s390_emit_goto): New function.
2178 (s390_write_goto_address): New function.
2179 (s390_emit_litpool): New function.
2180 (s390_emit_const): New function.
2181 (s390_emit_call): New function.
2182 (s390_emit_reg): New function.
2183 (s390_emit_pop): New function.
2184 (s390_emit_stack_flush): New function.
2185 (s390_emit_zero_ext): New function.
2186 (s390_emit_swap): New function.
2187 (s390_emit_stack_adjust): New function.
2188 (s390_emit_set_r2): New function.
2189 (s390_emit_int_call_1): New function.
2190 (s390_emit_void_call_2): New function.
2191 (s390_emit_eq_goto): New function.
2192 (s390_emit_ne_goto): New function.
2193 (s390_emit_lt_goto): New function.
2194 (s390_emit_le_goto): New function.
2195 (s390_emit_gt_goto): New function.
2196 (s390_emit_ge_goto): New function.
2197 (s390x_emit_prologue): New function.
2198 (s390x_emit_epilogue): New function.
2199 (s390x_emit_add): New function.
2200 (s390x_emit_sub): New function.
2201 (s390x_emit_mul): New function.
2202 (s390x_emit_lsh): New function.
2203 (s390x_emit_rsh_signed): New function.
2204 (s390x_emit_rsh_unsigned): New function.
2205 (s390x_emit_ext): New function.
2206 (s390x_emit_log_not): New function.
2207 (s390x_emit_bit_and): New function.
2208 (s390x_emit_bit_or): New function.
2209 (s390x_emit_bit_xor): New function.
2210 (s390x_emit_bit_not): New function.
2211 (s390x_emit_equal): New function.
2212 (s390x_emit_less_signed): New function.
2213 (s390x_emit_less_unsigned): New function.
2214 (s390x_emit_ref): New function.
2215 (s390x_emit_if_goto): New function.
2216 (s390x_emit_const): New function.
2217 (s390x_emit_call): New function.
2218 (s390x_emit_reg): New function.
2219 (s390x_emit_pop): New function.
2220 (s390x_emit_stack_flush): New function.
2221 (s390x_emit_zero_ext): New function.
2222 (s390x_emit_swap): New function.
2223 (s390x_emit_stack_adjust): New function.
2224 (s390x_emit_int_call_1): New function.
2225 (s390x_emit_void_call_2): New function.
2226 (s390x_emit_eq_goto): New function.
2227 (s390x_emit_ne_goto): New function.
2228 (s390x_emit_lt_goto): New function.
2229 (s390x_emit_le_goto): New function.
2230 (s390x_emit_gt_goto): New function.
2231 (s390x_emit_ge_goto): New function.
2232 (s390_emit_ops): New function.
2233 (struct linux_target_ops): Fill in emit_ops hook.
2234
abd9baf9
MK
22352016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2236
2237 PR 18377
2238 * Makefile.in: Add s390 IPA files.
2239 * configure.srv: Build IPA for s390.
2240 * linux-s390-ipa.c: New file.
2241 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2242 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2243 (tdesc_s390_linux32): Likewise.
2244 (init_registers_s390_linux32v1): Likewise.
2245 (tdesc_s390_linux32v1): Likewise.
2246 (init_registers_s390_linux32v2): Likewise.
2247 (tdesc_s390_linux32v2): Likewise.
2248 (init_registers_s390_linux64): Likewise.
2249 (tdesc_s390_linux64): Likewise.
2250 (init_registers_s390_linux64v1): Likewise.
2251 (tdesc_s390_linux64v1): Likewise.
2252 (init_registers_s390_linux64v2): Likewise.
2253 (tdesc_s390_linux64v2): Likewise.
2254 (init_registers_s390_te_linux64): Likewise.
2255 (tdesc_s390_te_linux64): Likewise.
2256 (init_registers_s390_vx_linux64): Likewise.
2257 (tdesc_s390_vx_linux64): Likewise.
2258 (init_registers_s390_tevx_linux64): Likewise.
2259 (tdesc_s390_tevx_linux64): Likewise.
2260 (init_registers_s390x_linux64): Likewise.
2261 (tdesc_s390x_linux64): Likewise.
2262 (init_registers_s390x_linux64v1): Likewise.
2263 (tdesc_s390x_linux64v1): Likewise.
2264 (init_registers_s390x_linux64v2): Likewise.
2265 (tdesc_s390x_linux64v2): Likewise.
2266 (init_registers_s390x_te_linux64): Likewise.
2267 (tdesc_s390x_te_linux64): Likewise.
2268 (init_registers_s390x_vx_linux64): Likewise.
2269 (tdesc_s390x_vx_linux64): Likewise.
2270 (init_registers_s390x_tevx_linux64): Likewise.
2271 (tdesc_s390x_tevx_linux64): Likewise.
2272 (have_hwcap_s390_vx): New static variable.
2273 (s390_arch_setup): Fill have_hwcap_s390_vx.
2274 (s390_get_thread_area): New function.
2275 (s390_ft_entry_gpr_esa): New const.
2276 (s390_ft_entry_gpr_zarch): New const.
2277 (s390_ft_entry_misc): New const.
2278 (s390_ft_entry_fr): New const.
2279 (s390_ft_entry_vr): New const.
2280 (s390_ft_main_31): New const.
2281 (s390_ft_main_64): New const.
2282 (s390_ft_exit_fr): New const.
2283 (s390_ft_exit_vr): New const.
2284 (s390_ft_exit_misc): New const.
2285 (s390_ft_exit_gpr_esa): New const.
2286 (s390_ft_exit_gpr_zarch): New const.
2287 (append_insns): New function.
2288 (s390_relocate_instruction): New function.
2289 (s390_install_fast_tracepoint_jump_pad): New function.
2290 (s390_get_min_fast_tracepoint_insn_len): New function.
2291 (s390_get_ipa_tdesc_idx): New function.
2292 (struct linux_target_ops): Wire in the above functions.
2293 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2294 * linux-s390-tdesc.h: New file.
2295
a4105d04
MK
22962016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2297
2298 * linux-s390-low.c (s390_supports_tracepoints): New function.
2299 (struct linux_target_ops): Fill supports_tracepoints hook.
2300
35ac8b3e
YQ
23012016-03-18 Yao Qi <yao.qi@linaro.org>
2302
2303 * linux-low.c (lwp_signal_can_be_delivered): New function.
2304 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2305
94610ec4
YQ
23062016-03-18 Yao Qi <yao.qi@linaro.org>
2307
2308 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2309 0 if signal is enqueued. Remove 'signal' from one debugging
2310 message. Move one debugging message to some lines below.
2311 Remove code setting 'signal' to 0.
2312
80aea927
YQ
23132016-03-18 Yao Qi <yao.qi@linaro.org>
2314
2315 * linux-low.c (linux_low_filter_event): Remove redundant
2316 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2317
b04fd3be
MK
23182016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2319
2320 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2321 (struct linux_target_ops): Wire in the above.
2322
c40c8d4b
YQ
23232016-03-03 Yao Qi <yao.qi@linaro.org>
2324
2325 * linux-low.c: Update comments to start_step_over.
2326
0f8288ae
YQ
23272016-03-03 Yao Qi <yao.qi@linaro.org>
2328
2329 PR server/19736
2330 * linux-low.c (handle_extended_wait): Set child suspended
2331 if event_lwp->bp_reinsert isn't zero.
2332
fdbd04a8
YQ
23332016-03-02 Yao Qi <yao.qi@linaro.org>
2334
2335 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2336 enqueue_pending_signal.
2337
6896a8fa
MK
23382016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2339
2340 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2341 is actually loaded.
2342
ab503087
MK
23432016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2344
2345 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2346 (s390_regmap_3264) [!__s390x__]: New global.
2347 (s390_collect_ptrace_register): Skip map entries containing -1.
2348 (s390_supply_ptrace_register): Ditto.
2349 (s390_fill_gprs_high): New function.
2350 (s390_store_gprs_high): New function.
2351 (s390_regsets): Add NT_S390_HIGH_GPRS.
2352 (s390_get_hwcap): Enable on 31-bit.
2353 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2354 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2355 Detect NT_S390_HIGH_GPRS.
2356 (s390_usrregs_info_3264): Enable on 31-bit.
2357 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2358 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2359
ae91f625
MK
23602016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2361
2362 PR gdb/13808
2363 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2364 * configure.srv: Ditto.
2365 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2366 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2367 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2368 (init_registers_amd64_linux): Remove prototype.
2369 (tdesc_amd64_linux): Remove declaration.
2370 (get_ipa_tdesc): New function.
2371 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2372 initialize remaining tdescs.
2373 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2374 (init_registers_i386_linux): Remove prototype.
2375 (tdesc_i386_linux): Remove declaration.
2376 (get_ipa_tdesc): New function.
2377 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2378 initialize remaining tdescs.
2379 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2380 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2381 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2382 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2383 (x86_get_ipa_tdesc_idx): New function.
2384 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2385 * linux-x86-tdesc.h: New file.
2386 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2387 (target_get_ipa_tdesc_idx): New macro.
2388 * tracepoint.c (ipa_tdesc_idx): New macro.
2389 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2390 (symbol_list): Add ipa_tdesc_idx.
2391 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2392 (ipa_tdesc): Remove.
2393 (ipa_tdesc_idx): New variable.
2394 (get_context_regcache): Use get_ipa_tdesc.
2395 (gdb_collect): Ditto.
2396 (gdb_probe): Ditto.
2397 * tracepoint.h (get_ipa_tdesc): New prototype.
2398 (ipa_tdesc): Remove.
2399
e7ad2f14
PA
24002016-02-24 Pedro Alves <palves@redhat.com>
2401
2402 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2403 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2404 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2405 Factor out common code between the USE_SIGTRAP_SIGINFO and
2406 !USE_SIGTRAP_SIGINFO blocks.
2407 (linux_low_filter_event): Call save_stop_reason instead of
2408 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2409 Update comments.
2410 (linux_wait_1): Update comments.
2411
657f9cde
WW
24122016-02-24 Wei-cheng Wang <cole945@gmail.com>
2413
2414 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2415 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2416 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2417 ppc_insert_point, ppc_remove_point.
2418
b00b61e1
MK
24192016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2420
2421 * linux-s390-low.c (s390_supports_z_point_type): New function.
2422 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2423
553cb527
YQ
24242016-02-16 Yao Qi <yao.qi@linaro.org>
2425
2426 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2427 PC. Get pc from regcache_read_pc.
2428
a5652c21
YQ
24292016-02-12 Yao Qi <yao.qi@linaro.org>
2430
2431 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2432 or linux_get_pc_32bit.
2433 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2434
ed443b61
YQ
24352016-02-12 Yao Qi <yao.qi@linaro.org>
2436
2437 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2438 arm_linux_get_next_pcs_fixup.
2439
020ecd38
MK
24402016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2441
2442 * tracepoint.c (x_tracepoint_action_download): Change
2443 write_inferior_data_ptr to write_inferior_data_pointer.
2444 (cmd_qtstart): Likewise.
2445 (write_inferior_data_ptr): Remove.
2446 (download_agent_expr): Change write_inferior_data_ptr to
2447 write_inferior_data_pointer.
2448 (download_tracepoint_1): Likewise.
2449 (download_tracepoint): Likewise.
2450 (download_trace_state_variables): Likewise.
2451
7cae9051
WW
24522016-02-11 Wei-cheng Wang <cole945@gmail.com>
2453 Marcin Kościelnicki <koriakin@0x04.net>
2454
2455 * tracepoint.c (struct tracepoint_action_ops): Remove.
2456 (struct tracepoint_action): Remove ops.
2457 (m_tracepoint_action_download, r_tracepoint_action_download)
2458 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2459 size and offset accordingly.
2460 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2461 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2462 (tracepoint_action_send, tracepoint_action_download): New functions.
2463 Helpers for trace action handlers.
2464 (add_tracepoint_action): Remove setup actions ops.
2465 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2466
9f6a71b4
YQ
24672016-02-10 Yao Qi <yao.qi@linaro.org>
2468
2469 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2470
1e94266c
SM
24712016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2472
2473 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2474 to AC_OUTPUT.
2475 * configure: Regenerate.
2476
8adce034
SM
24772016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2478
2479 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2480 void * to gdb_byte *.
2481 * linux-low.c (siginfo_fixup): Likewise.
2482 (linux_xfer_siginfo): Likewise.
2483 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2484 Likewise.
2485 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2486
93813b37
WT
24872016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2488
2489 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2490 to srv_tgtobj.
2491 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2492 to srv_tgtobj.
2493 * linux-x86-low.c [__x86_64__]: Include
2494 "nat/amd64-linux-siginfo.h".
2495 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2496 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2497 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2498 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2499 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2500 (cpt_si_fd, si_timerid, si_overrun): Move from
2501 nat/amd64-linux-siginfo.c.
2502 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2503
8424cc97
SM
25042016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2505
2506 * server.c (skip_to_semicolon): Remove.
2507 (process_point_options): Use strchrnul instead of
2508 skip_to_semicolon.
2509
4d18591b
YQ
25102016-01-26 Yao Qi <yao.qi@linaro.org>
2511
2512 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2513 * linux-low.c (install_software_single_step_breakpoints): Don't
2514 call regcache_read_pc.
2515 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2516 argument pc.
2517
d8020970
YQ
25182016-01-26 Yao Qi <yao.qi@linaro.org>
2519
2520 * linux-low.c (install_software_single_step_breakpoints): Call
2521 regcache_read_pc instead of get_pc.
2522
8b207339
YQ
25232016-01-26 Yao Qi <yao.qi@linaro.org>
2524
2525 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2526 (unblock_async_io): Rename to ...
2527 (block_unblock_async_io): ... it. New function.
2528 (enable_async_io): Don't install SIGIO handler. Unblock it
2529 instead.
2530 (disable_async_io): Don't ignore SIGIO. Block it instead.
2531 (initialize_async_io): Install SIGIO handler. Don't call
2532 unblock_async_io.
2533
18879fef
YQ
25342016-01-26 Yao Qi <yao.qi@linaro.org>
2535
2536 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2537 first character is '\003', call *the_target->request_interrupt.
2538
a0f8e08a
YQ
25392016-01-25 Yao Qi <yao.qi@linaro.org>
2540
2541 * remote-utils.c (new_thread_notify): Remove.
2542 (dead_thread_notify): Likewise.
2543 * remote-utils.h (new_thread_notify): Remove declaration.
2544 (dead_thread_notify): Likewise.
2545
cc5fd9ab
MK
25462016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2547
2548 * gdb.trace/pending.exp: Fix expected message on continue.
2549
99e8eb11
MK
25502016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2551
2552 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2553 it works properly on big-endian machines where sizeof (CORE_ADDR)
2554 != sizeof (void *).
2555
a994041d
PA
25562016-01-21 Pedro Alves <palves@redhat.com>
2557
2558 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2559 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2560 * configure: Regenerate.
2561
f7a6a40d
YQ
25622016-01-21 Yao Qi <yao.qi@linaro.org>
2563
2564 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2565 is_thumb and set it according to CPSR saved on the stack.
2566 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2567 arm_sigreturn_next_pc.
2568
6f69e520
YQ
25692016-01-18 Yao Qi <yao.qi@linaro.org>
2570
2571 * linux-low.c (linux_set_pc_64bit): New function.
2572 (linux_get_pc_64bit): New function.
2573 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2574 Declare.
2575 * linux-sparc-low.c (debug_threads): Remove declaration.
2576 (sparc_get_pc): Remove.
2577 (the_low_target): Use linux_get_pc_64bit instead of
2578 sparc_get_pc.
2579 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2580 (the_low_target): Use linux_get_pc_64bit and
2581 linux_set_pc_64bit.
2582
276d4552
YQ
25832016-01-18 Yao Qi <yao.qi@linaro.org>
2584
2585 * linux-arm-low.c (debug_threads): Remove declaration.
2586 (arm_get_pc, arm_set_pc): Remove.
2587 (the_low_target): Use linux_get_pc_32bit and
2588 linux_set_pc_32bit.
2589 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2590 (the_low_target): Use linux_get_pc_32bit and
2591 linux_set_pc_32bit.
2592 * linux-cris-low.c (debug_threads): Remove declaration.
2593 (cris_get_pc, cris_set_pc,): Remove.
2594 (the_low_target): Use linux_get_pc_32bit and
2595 linux_set_pc_32bit.
2596 * linux-crisv32-low.c (debug_threads): Remove declaration.
2597 (cris_get_pc, cris_set_pc): Remove.
2598 (the_low_target): Use linux_get_pc_32bit and
2599 linux_set_pc_32bit.
2600 * linux-low.c: Include inttypes.h.
2601 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2602 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2603 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2604 (the_low_target): Use linux_get_pc_32bit and
2605 linux_set_pc_32bit.
2606 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2607 (the_low_target): Use linux_get_pc_32bit and
2608 linux_set_pc_32bit.
2609 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2610 (the_low_target): Use linux_get_pc_32bit and
2611 linux_set_pc_32bit.
2612 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2613 (the_low_target): Use linux_get_pc_32bit and
2614 linux_set_pc_32bit.
2615 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2616 (the_low_target): Use linux_get_pc_32bit and
2617 linux_set_pc_32bit.
2618
eb0edac8
GB
26192016-01-18 Gary Benson <gbenson@redhat.com>
2620
2621 * configure.ac (AC_FUNC_FORK): New check.
2622 * config.in: Regenerate.
2623 * configure: Likewise.
2624
1b451dda
YQ
26252016-01-14 Yao Qi <yao.qi@linaro.org>
2626
2627 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2628 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2629 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2630 arm_get_next_pcs_ctor.
2631
82075af2
JS
26322016-01-12 Josh Stone <jistone@redhat.com>
2633 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2634
2635 * inferiors.h: Include "gdb_vecs.h".
2636 (struct process_info): Add syscalls_to_catch.
2637 * inferiors.c (remove_process): Free syscalls_to_catch.
2638 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2639 syscall_return stops.
2640 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2641 * server.c (handle_general_set): Handle QCatchSyscalls.
2642 (handle_query): Report support for QCatchSyscalls.
2643 * target.h (struct target_ops): Add supports_catch_syscall.
2644 (target_supports_catch_syscall): New macro.
2645 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2646 (struct lwp_info): Add syscall_state.
2647 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2648 Maintain syscall_state and syscalls_to_catch across exec.
2649 (get_syscall_trapinfo): New function, proxy to the_low_target.
2650 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2651 (linux_low_filter_event): Toggle syscall_state entry/return for
2652 syscall traps, and set it ignored for all others.
2653 (gdb_catching_syscalls_p): New function.
2654 (gdb_catch_this_syscall_p): New function.
2655 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2656 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2657 (linux_supports_catch_syscall): New function.
2658 (linux_target_ops): Install it.
2659 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2660 (the_low_target): Install it.
2661
8f13a3ce
MF
26622016-01-12 Mike Frysinger <vapier@gentoo.org>
2663
2664 * acinclude.m4: Include new ../warning.m4 file.
2665 * configure: Regenerated.
2666 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2667
5b3da067
MF
26682016-01-12 Mike Frysinger <vapier@gentoo.org>
2669
2670 * ax.c (is_goto_target): Mark static.
2671 * linux-low.c (register_addr): Likewise.
2672 (linux_fetch_registers, linux_store_registers): Likewise.
2673 * mem-break.c (any_persistent_commands): Fix old prototype.
2674 (add_commands_to_breakpoint): Mark static.
2675 * regcache.c (find_register_by_name): Delete unused func.
2676 * remote-utils.c (hex_or_minus_one): Mark static.
2677 * server.c (monitor_show_help): Mark static.
2678 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2679 handle_v_requests): Likewise.
2680
bc504a31
PA
26812016-01-12 Pedro Alves <palves@redhat.com>
2682
2683 Remove use of the registered trademark symbol throughout.
2684
5a0dd67a
YQ
26852016-01-08 Yao Qi <yao.qi@linaro.org>
2686
2687 * remote-utils.c (getpkt): If c is '\003', call target hook
2688 request_interrupt.
2689
b2ca446f
YQ
26902016-01-06 Yao Qi <yao.qi@linaro.org>
2691
2692 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2693 linux-aarch32-low.c.
2694 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2695 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2696 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2697 (thumb2_breakpoint): Declare.
2698 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2699 linux-aarch32-low.h.
2700 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2701 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2702 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2703
edd88788
JB
27042016-01-01 Joel Brobecker <brobecker@adacore.com>
2705
2706 * gdbreplay.c (gdbreplay_version): Change copyright year in
2707 version message.
2708 * server.c (gdbserver_version): Likewise.
2709
65da7f14
PP
27102015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2711
2712 * server.c (crc32_table): Delete.
2713 (crc32): Use libiberty's xcrc32 function.
2714
4abd5ed2
JB
27152015-12-22 Joel Brobecker <brobecker@adacore.com>
2716
2717 * lynx-low.c (lynx_delete_thread_callback): New function.
2718 (lynx_mourn): Properly delete our process and all of its
2719 threads. Remove call to clear_inferiors.
2720
0e50fe5c
JB
27212015-12-22 Joel Brobecker <brobecker@adacore.com>
2722
2723 * target.c (thread_search_callback): Add check that
2724 the thread_stopped target callback is not NULL before
2725 calling it.
2726
35adc03f
YQ
27272015-12-21 Yao Qi <yao.qi@linaro.org>
2728
2729 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2730 arm breakpoint.
2731
bd2b2909
AT
27322015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2733
2734 * server.c (handle_query): Call target_supports_software_single_step.
2735
7fe5e27e
AT
27362015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2737
2738 * linux-low.c (single_step): New function.
2739 (linux_resume_one_lwp_throw): Call single_step.
2740 (start_step_over): Likewise.
2741
d9311bfa
AT
27422015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2743
2744 * Makefile.in (SFILES): Append arch/arm-linux.c,
2745 arch/arm-get-next-pcs.c.
2746 (arm-linux.o): New rule.
2747 (arm-get-next-pcs.o): New rule.
2748 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2749 arm-linux.o.
2750 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2751 to linux-aarch32-low.c.
2752 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2753 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2754 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2755 (thumb2_breakpoint_len): Likewise.
2756 (arm_is_thumb_mode): Make non-static.
2757 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2758 from linux-aarch32-low.c.
2759 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2760 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2761 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2762 (thumb2_breakpoint_len): Likewise.
2763 (arm_is_thumb_mode): New declaration.
2764 * linux-arm-low.c: Include arch/arm-linux.h
2765 aarch/arm-get-next-pcs.h, sys/syscall.h.
2766 (get_next_pcs_ops): New struct.
2767 (get_next_pcs_addr_bits_remove): New function.
2768 (get_next_pcs_is_thumb): New function.
2769 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2770 (arm_sigreturn_next_pc): Likewise.
2771 (get_next_pcs_syscall_next_pc): Likewise.
2772 (arm_gdbserver_get_next_pcs): Likewise.
2773 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2774 Initialize.
2775 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2776 * server.h: Include gdb_vecs.h.
2777
68ce2059
AT
27782015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2779
2780 * Makefile.in (SFILES): Append common/common-regcache.c.
2781 (OBS): Append common-regcache.o.
2782 (common-regcache.o): New rule.
2783 * regcache.c (init_register_cache): Initialize cache to
2784 REG_UNAVAILABLE.
2785 (regcache_raw_read_unsigned): New function.
2786 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2787 register_status enum.
2788
fa5308bd
AT
27892015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2790
2791 * linux-aarch64-low.c (the_low_targets): Rename
2792 breakpoint_reinsert_addr to get_next_pcs.
2793 * linux-arm-low.c (the_low_targets): Likewise.
2794 * linux-bfin-low.c (the_low_targets): Likewise.
2795 * linux-cris-low.c (the_low_targets): Likewise.
2796 * linux-crisv32-low.c (the_low_targets): Likewise.
2797 * linux-low.c (can_software_single_step): Likewise.
2798 (install_software_single_step_breakpoints): New function.
2799 (start_step_over): Use install_software_single_step_breakpoints.
2800 * linux-low.h: New CORE_ADDR vector.
2801 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2802 get_next_pcs.
2803 * linux-mips-low.c (the_low_targets): Likewise.
2804 * linux-nios2-low.c (the_low_targets): Likewise.
2805 * linux-sparc-low.c (the_low_targets): Likewise.
2806
4a6ed09b
PA
28072015-12-17 Pedro Alves <palves@redhat.com>
2808
2809 * linux-low.c (linux_kill_one_lwp): Remove references to
2810 LinuxThreads.
2811 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2812 to 'kill'.
2813 (linux_init_signals): Delete.
2814 (initialize_low): Adjust.
2815 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2816
7544db95
PA
28172015-12-16 Pedro Alves <palves@redhat.com>
2818
2819 * configure.ac (compiler warning flags): When testing a
2820 -Wno-foo option, check whether -Wfoo works instead.
2821 * configure: Regenerate.
2822
8020350c
DB
28232015-12-11 Don Breazeal <donb@codesourcery.com>
2824
2825 * server.c (process_serial_event): Don't exit from gdbserver
2826 in remote mode if there are still active inferiors.
2827
db91f502
YQ
28282015-12-11 Yao Qi <yao.qi@linaro.org>
2829
2830 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2831 arm_breakpoint_at if the process is 32-bit.
2832
b37a6290
YQ
28332015-12-11 Yao Qi <yao.qi@linaro.org>
2834
2835 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2836 arm breakpoint.
2837
17b1509a
YQ
28382015-12-07 Yao Qi <yao.qi@linaro.org>
2839
2840 * configure.srv: Append arm.o to srv_tgtobj for
2841 aarch64*-*-linux* target.
2842 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2843 from linux-arm-low.c.
2844 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2845 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2846 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2847 (thumb2_breakpoint_len): Likewise.
2848 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2849 (arm_breakpoint_kinds): Likewise.
2850 (arm_breakpoint_kind_from_pc): Likewise.
2851 (arm_sw_breakpoint_from_kind): Likewise.
2852 (arm_breakpoint_kind_from_current_state): Likewise.
2853 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2854 (arm_sw_breakpoint_from_kind): Declare.
2855 (arm_breakpoint_kind_from_current_state): Declare.
2856 (arm_breakpoint_at): Declare.
2857 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2858 arm_sw_breakpoint_from_kind if process is 32-bit.
2859 (aarch64_breakpoint_kind_from_pc): New function.
2860 (aarch64_breakpoint_kind_from_current_state): New function.
2861 (the_low_target): Initialize fields breakpoint_kind_from_pc
2862 and breakpoint_kind_from_current_state.
2863 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2864 linux-aarch32-low.c.
2865 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2866 (arm_breakpoint, arm_breakpoint_len): Likewise.
2867 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2868 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2869 (arm_is_thumb_mode): Likewise.
2870 (arm_breakpoint_at): Likewise.
2871 (arm_breakpoint_kind_from_pc): Likewise.
2872 (arm_sw_breakpoint_from_kind): Likewise.
2873 (arm_breakpoint_kind_from_current_state): Likewise.
2874
2875 Revert:
2876 2015-08-04 Yao Qi <yao.qi@linaro.org>
2877
2878 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2879 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2880 * server.c (extended_protocol): Remove "static".
2881 * server.h (extended_protocol): Declare it.
2882
ece66d65
JS
28832015-12-04 Josh Stone <jistone@redhat.com>
2884
2885 * target.h (struct target_ops) <arch_setup>: Rename to ...
2886 (struct target_ops) <post_create_inferior>: ... this.
2887 (target_arch_setup): Rename to ...
2888 (target_post_create_inferior): ... this, calling post_create_inferior.
2889 * server.c (start_inferior): Update target_arch_setup calls to
2890 target_post_create_inferior.
2891 * linux-low.c (linux_low_ptrace_options): Forward declare.
2892 (linux_arch_setup): Update its comment for general use.
2893 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2894 (struct linux_target_ops): Use linux_post_create_inferior.
2895 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2896 to post_create_inferior.
2897 * nto-low.c (struct nto_target_ops): Likewise.
2898 * spu-low.c (struct spu_target_ops): Likewise.
2899 * win32-low.c (struct win32_target_ops): Likewise.
2900
e58c48b4
AT
29012015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2902
2903 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2904
fbec8956
AT
29052015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2906
2907 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2908 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2909 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2910 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2911 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2912 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2913 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2914 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2915 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2916 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2917 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2918 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2919
9b4c5f87
AT
29202015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2921
2922 * linux-low.c (linux_look_up_symbols): Don't call
2923 linux_supports_traceclone.
2924 * linux-low.h (thread_db_init): Remove use_events argument.
2925 * thread-db.c (thread_db_use_event): Remove global variable.
2926 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2927 (struct thread_db) <td_create_bp>: Remove field.
2928 (thread_db_create_event): Remove function.
2929 (thread_db_enable_reporting): Likewise.
2930 (find_one_thread): Don't check for thread_db_use_events.
2931 (attach_thread): Likewise.
2932 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2933 (try_thread_db_load_1): Don't check for thread_db_use_events.
2934 (thread_db_init): Remove use_events argument and thread events
2935 handling.
2936 (remove_thread_event_breakpoints): Remove function.
2937 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2938
7d00775e
AT
29392015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2940
2941 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2942 New function.
2943 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2944 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2945 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2946 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2947 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2948 Initialize.
2949 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2950 New function.
2951 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2952 * linux-low.c (can_hardware_single_step): Use
2953 supports_hardware_single_step.
2954 (can_software_single_step): New function.
2955 (start_step_over): Call can_software_single_step.
2956 (linux_supports_hardware_single_step): New function.
2957 (struct target_ops) <supports_software_single_step>: Initialize.
2958 * linux-low.h (struct linux_target_ops)
2959 <supports_hardware_single_step>: Initialize.
2960 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2961 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2962 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2963 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2964 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2965 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2966 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2967 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2968 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2969 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2970 Initialize.
2971 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2972 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2973 Initialize.
2974 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2975 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2976 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2977 New function.
2978 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2979 * target.h (struct target_ops): <supports_software_single_step>:
2980 New field.
2981 (target_supports_software_single_step): New macro.
2982
2d97cd35
AT
29832015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2984
2985 * linux-low.c (linux_wait_1): Fix pc advance condition.
2986 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2987 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2988
769ef81f
AT
29892015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2990
2991 * linux-arm-low.c (arm_is_thumb_mode): New function.
2992 (arm_breakpoint_at): Use arm_is_thumb_mode.
2993 (arm_breakpoint_kind_from_current_state): New function.
2994 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2995 Initialize.
2996 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2997 (linux_breakpoint_kind_from_current_state): New function.
2998 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2999 * linux-low.h (struct linux_target_ops)
3000 <breakpoint_kind_from_current_state>: New field.
3001 * target.h (struct target_ops): Likewise.
3002 (target_breakpoint_kind_from_current_state): New macro.
3003
1bebeeca
PA
30042015-11-30 Pedro Alves <palves@redhat.com>
3005
3006 * linux-low.c (linux_resume): Wake up the event loop before
3007 returning.
3008
a67a9fae
PA
30092015-11-30 Pedro Alves <palves@redhat.com>
3010
3011 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3012 check.
3013 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3014 to -1.
3015 * target.c (struct thread_search): New structure.
3016 (thread_search_callback): New function.
3017 (prev_general_thread): New global.
3018 (prepare_to_access_memory, done_accessing_memory): New functions.
3019 * target.h (prepare_to_access_memory, done_accessing_memory):
3020 Replace macros with function declarations.
3021
f2faf941
PA
30222015-11-30 Pedro Alves <palves@redhat.com>
3023
3024 PR 14618
3025 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3026 report TARGET_WAITKIND_NO_RESUMED.
3027 * remote-utils.c (prepare_resume_reply): Handle
3028 TARGET_WAITKIND_NO_RESUMED.
3029 * server.c (report_no_resumed): New global.
3030 (handle_query) <qSupported>: Handle "no-resumed+". Report
3031 "no-resumed+" support.
3032 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3033 return error if the client doesn't support no-resumed events.
3034 (push_stop_notification): New function.
3035 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3036 events if the client supports them.
3037
a681f9c9
PA
30382015-11-30 Pedro Alves <palves@redhat.com>
3039
3040 * linux-low.c (thread_still_has_status_pending_p): Don't check
3041 vCont;t here.
3042 (lwp_resumed): New function.
3043 (status_pending_p_callback): Return early if the LWP is not
3044 supposed to be resumed.
3045
65706a29
PA
30462015-11-30 Pedro Alves <palves@redhat.com>
3047
3048 * linux-low.c (handle_extended_wait): Assert that the LWP's
3049 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3050 thread create events, leave the new child's status pending.
3051 (linux_low_filter_event): If GDB wants to hear about thread exit
3052 events, leave the LWP marked dead and don't delete it.
3053 (linux_wait_for_event_filtered): Don't check for thread exit.
3054 (filter_exit_event): New function.
3055 (linux_wait_1): Use it, when returning an exit event.
3056 (linux_resume_one_lwp_throw): Assert that the LWP's
3057 waitstatus is TARGET_WAITKIND_IGNORE.
3058 * remote-utils.c (prepare_resume_reply): Handle
3059 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3060 * server.c (report_thread_events): New global.
3061 (handle_general_set): Handle QThreadEvents.
3062 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3063 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3064 TARGET_WAITKIND_THREAD_EXITED.
3065 * server.h (report_thread_events): Declare.
3066
56cf4bed
PA
30672015-11-30 Pedro Alves <palves@redhat.com>
3068
3069 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3070 the thread's last_resume_kind was resume_stop.
3071
500c1d85
PA
30722015-11-30 Pedro Alves <palves@redhat.com>
3073
3074 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3075 before returning.
3076
de979965
PA
30772015-11-30 Pedro Alves <palves@redhat.com>
3078
3079 * server.c (handle_v_requests): Handle vCtrlC.
3080
34c65914
PA
30812015-11-30 Pedro Alves <palves@redhat.com>
3082
3083 * gdbthread.h (find_any_thread_of_pid): Declare.
3084 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3085 functions.
3086 * server.c (handle_query): If current_thread is NULL, look for
3087 another thread of the selected process.
3088
79efa585 30892015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 3090 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
3091
3092 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3093 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3094 name in reply.
3095 * target.h (struct target_ops) <thread_name>: New field.
3096 (target_thread_name): New macro.
3097
80d82c19
JB
30982015-11-23 Joel Brobecker <brobecker@adacore.com>
3099
3100 * regcache.h (regcache_invalidate_pid): Add declaration.
3101 * regcache.c (regcache_invalidate_pid): New function, extracted
3102 from regcache_invalidate.
3103 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3104 Add trivial documentation comment.
3105 * lynx-low.c: Use regcache_invalidate_pid instead of
3106 regcache_invalidate.
3107
64da5dd5
JB
31082015-11-23 Joel Brobecker <brobecker@adacore.com>
3109
3110 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3111 and Elf64_auxv_t if the target is Android.
3112
37ce4055
DE
31132015-11-22 Doug Evans <xdje42@gmail.com>
3114
3115 * target.h: #include <sys/types.h>.
3116
06e03fff
PA
31172015-11-19 Pedro Alves <palves@redhat.com>
3118
3119 * linux-low.c (linux_process_qsupported): Change prototype.
3120 Adjust.
3121 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3122 Change prototype.
3123 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3124 and adjust to loop over all features.
3125 * server.c (handle_query) <qSupported>: Adjust to call
3126 target_process_qsupported once, passing it a vector of unprocessed
3127 features.
3128 * target.h (struct target_ops) <process_qsupported>: Change
3129 prototype.
3130 (target_process_qsupported): Adjust.
3131
9a084706
PA
31322015-11-19 Pedro Alves <palves@redhat.com>
3133
3134 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3135 mode.
3136 * configure: Regenerate.
3137
dad44a1f
PA
31382015-11-19 Pedro Alves <palves@redhat.com>
3139
3140 * configure: Regenerate.
3141
231c0592
YQ
31422015-11-19 Yao Qi <yao.qi@linaro.org>
3143
3144 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3145 type to uint32_t.
3146
6c1c9a8b
YQ
31472015-11-19 Yao Qi <yao.qi@linaro.org>
3148
3149 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3150 (struct aarch64_operand): Move enum out.
3151
9caa3311
YQ
31522015-11-19 Yao Qi <yao.qi@linaro.org>
3153
3154 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3155 struct user_fpsimd_state *.
3156 (aarch64_store_fpregset): Likewise.
3157
6a69a054
YQ
31582015-11-19 Yao Qi <yao.qi@linaro.org>
3159
3160 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3161 struct user_pt_regs *.
3162 (aarch64_store_gregset): Likewise.
3163
1798301e
PA
31642015-11-18 Pedro Alves <palves@redhat.com>
3165
3166 * Makefile.in (all_object_files): Add $IPA_OBJS.
3167
ce7715e2
PA
31682015-11-17 Pedro Alves <palves@redhat.com>
3169
3170 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3171 GDB_SIGNAL_0 and gdb_signal_to_string.
3172
c0879059
PA
31732015-11-17 Pedro Alves <palves@redhat.com>
3174
3175 * win32-low.c (handle_output_debug_string): Remove parameter.
3176 (win32_kill): Remove our_status local and adjust call to
3177 handle_output_debug_string.
3178 (get_child_debug_event): Adjust call to
3179 handle_output_debug_string.
3180
1996e237
SM
31812015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3182
3183 * linux-mips-low.c (mips_fill_gregset): Add cast.
3184 (mips_store_gregset): Likewise.
3185 (mips_fill_fpregset): Likewise.
3186 (mips_store_fpregset): Likewise.
3187
cbec665b
SM
31882015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3189
3190 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3191 priv.
3192
eb3e3c67
SM
31932015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3194
3195 * linux-mips-low.c (mips_linux_new_thread): Change type of
3196 watch_type to enum target_hw_bp_type.
3197
171de4b8
SM
31982015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3199
3200 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3201 Change return type to arm_hwbp_type.
3202
04248ead
SM
32032015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3204
3205 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3206 (arm_store_gregset): Likewise.
3207 * linux-arm-low.c (arm_get_hwcap): Likewise.
3208 (arm_read_description): Likewise.
3209
04b3479c
SM
32102015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3211
3212 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3213
2bc84e8a
SM
32142015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3215
3216 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3217 (ppc_fill_vsxregset): Likewise.
3218 (ppc_store_vsxregset): Likewise.
3219 (ppc_fill_vrregset): Likewise.
3220 (ppc_store_vrregset): Likewise.
3221 (ppc_fill_evrregset): Likewise.
3222 (ppc_store_evrregset): Likewise.
3223
e6c5bb05
SM
32242015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3225
3226 * linux-ppc-low.c (ppc_usrregs_info): Remove
3227 forward-declaration.
3228 (ppc_arch_setup): Move lower in file.
3229
7ea45d72
SM
32302015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3231
3232 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3233 (ps_pdwrite): Likewise.
3234
69291610
HW
32352015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3236
3237 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3238 to after assert checks.
3239
b42945fd
SM
32402015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3241
3242 * proc-service.c (ps_pdread): Add/adjust casts.
3243 (ps_pdwrite): Add/adjust casts.
3244
d6f85c84
SM
32452015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3246
3247 * server.c (handle_search_memory_1): Cast return value of
3248 memmem.
3249
f98cd059
SM
32502015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3251
3252 * server.c (write_qxfer_response): Change type of data to
3253 gdb_byte *.
3254
d2412fa5
PA
32552015-10-29 Pedro Alves <palves@redhat.com>
3256
3257 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3258
c17414a2
PA
32592015-10-29 Pedro Alves <palves@redhat.com>
3260
3261 * tracepoint.c (clear_installed_tracepoints): Add casts.
3262
e053fbc4
PA
32632015-10-29 Pedro Alves <palves@redhat.com>
3264
3265 * server.c (handle_v_cont, process_serial_event): Add enum
3266 gdb_signal casts to signal parsing code.
3267
add67df8
PA
32682015-10-29 Pedro Alves <palves@redhat.com>
3269
3270 * linux-low.h (NULL_REGSET): Define.
3271 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3272 * linux-arm-low.c (arm_regsets): Likewise.
3273 * linux-crisv32-low.c (cris_regsets): Likewise.
3274 * linux-m68k-low.c (m68k_regsets): Likewise.
3275 * linux-mips-low.c (mips_regsets): Likewise.
3276 * linux-nios2-low.c (nios2_regsets): Likewise.
3277 * linux-ppc-low.c (ppc_regsets): Likewise.
3278 * linux-s390-low.c (s390_regsets): Likewise.
3279 * linux-sh-low.c (sh_regsets): Likewise.
3280 * linux-sparc-low.c (sparc_regsets): Likewise.
3281 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3282 * linux-tile-low.c (tile_regsets): Likewise.
3283 * linux-x86-low.c (x86_regsets): Likewise.
3284 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3285
50bc912a
PA
32862015-10-29 Pedro Alves <palves@redhat.com>
3287
3288 * linux-low.h (NULL_REGSET): Define.
3289 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3290 * linux-arm-low.c (arm_regsets): Likewise.
3291 * linux-crisv32-low.c (cris_regsets): Likewise.
3292 * linux-m68k-low.c (m68k_regsets): Likewise.
3293 * linux-mips-low.c (mips_regsets): Likewise.
3294 * linux-nios2-low.c (nios2_regsets): Likewise.
3295 * linux-ppc-low.c (ppc_regsets): Likewise.
3296 * linux-s390-low.c (s390_regsets): Likewise.
3297 * linux-sh-low.c (sh_regsets): Likewise.
3298 * linux-sparc-low.c (sparc_regsets): Likewise.
3299 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3300 * linux-tile-low.c (tile_regsets): Likewise.
3301 * linux-x86-low.c (x86_regsets): Likewise.
3302 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3303
682b2546
DE
33042015-10-26 Doug Evans <dje@google.com>
3305
3306 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3307
963843d4
DE
33082015-10-26 Doug Evans <dje@google.com>
3309
3310 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3311
d41401ac
DE
33122015-10-26 Doug Evans <dje@google.com>
3313
3314 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3315 for debug_printf.
3316 (attach_thread, find_new_threads_callback): Ditto.
3317
3db28855
AT
33182015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3319
3320 * mem-break.h (set_breakpoint_data): Remove.
3321
fb78e89c
AT
33222015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3323
3324 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3325 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3326 (initialize_low): Remove set_breakpoint_data call.
3327 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3328 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3329 (initialize_low): Remove set_breakpoint_data call.
3330 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3331 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3332 (initialize_low): Remove set_breakpoint_data call.
3333
2e6ee069
AT
33342015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3335
3336 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3337 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3338 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3339 * target.h (target_breakpoint_kind_from_pc): New macro.
3340
1652a986
AT
33412015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3342
3343 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3344 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3345 the default breakpoint kind.
3346
abeead09
AT
33472015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3348
3349 * linux-arm-low.c (arm_supports_z_point_type): Add software
3350 breakpoint support.
3351
b0b4b501
AT
33522015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3353
3354 * linux-arm-low.c: Refactor breakpoint definitions.
3355 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3356 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3357
8689682c
AT
33582015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3359
3360 * Makefile.in: Add arm.c/o.
3361 * configure.srv: Likewise.
3362 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3363 (arm_breakpoint_kind_from_pc): New function.
3364 (arm_sw_breakpoint_from_kind): Return proper kind.
3365 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3366
27165294
AT
33672015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3368
3369 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3370 removal.
3371 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3372 (struct raw_breakpoint) <size>: Remove.
3373 (struct raw_breakpoint) <kind>: Add.
3374 (bp_size): New function.
3375 (bp_opcode): Likewise.
3376 (find_raw_breakpoint_at): Adjust for kind.
3377 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3378 (remove_memory_breakpoint): Adjust for kind call bp_size.
3379 (set_raw_breakpoint_at): Adjust for kind.
3380 (set_breakpoint): Likewise.
3381 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3382 (delete_raw_breakpoint): Adjust for kind.
3383 (delete_breakpoint): Likewise.
3384 (find_gdb_breakpoint): Likewise.
3385 (set_gdb_breakpoint_1): Likewise.
3386 (set_gdb_breakpoint): Likewise.
3387 (delete_gdb_breakpoint_1): Likewise.
3388 (delete_gdb_breakpoint): Likewise.
3389 (uninsert_raw_breakpoint): Likewise.
3390 (reinsert_raw_breakpoint): Likewise.
3391 (set_breakpoint_data): Remove.
3392 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3393 (check_mem_read): Adjust for kind call bp_size.
3394 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3395 (clone_one_breakpoint): Adjust for kind.
3396 * mem-break.h (set_gdb_breakpoint): Likewise.
3397 (delete_gdb_breakpoint): Likewise.
3398 * server.c (process_serial_event): Likewise.
3399
dd373349
AT
34002015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3401
3402 * linux-aarch64-low.c (aarch64_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-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3408 (arm_sw_breakpoint_from_kind): New function.
3409 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3410 (struct linux_target_ops) <breakpoint>: Remove.
3411 (struct linux_target_ops) <breakpoint_len>: Remove.
3412 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3413 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3414 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3415 (struct linux_target_ops) <breakpoint>: Remove.
3416 (struct linux_target_ops) <breakpoint_len>: Remove.
3417 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3418 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3419 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3420 (struct linux_target_ops) <breakpoint>: Remove.
3421 (struct linux_target_ops) <breakpoint_len>: Remove.
3422 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3423 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3424 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3425 and sw_breakpoint_from_kind to increment the pc.
3426 (linux_breakpoint_kind_from_pc): New function.
3427 (linux_sw_breakpoint_from_kind): New function.
3428 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3429 (initialize_low): Call breakpoint_kind_from_pc and
3430 sw_breakpoint_from_kind to replace breakpoint_data/len.
3431 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3432 New field.
3433 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3434 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3435 (struct linux_target_ops) <breakpoint>: Remove.
3436 (struct linux_target_ops) <breakpoint_len>: Remove.
3437 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3438 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3439 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3440 (struct linux_target_ops) <breakpoint>: Remove.
3441 (struct linux_target_ops) <breakpoint_len>: Remove.
3442 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3443 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3444 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3445 (struct linux_target_ops) <breakpoint>: Remove.
3446 (struct linux_target_ops) <breakpoint_len>: Remove.
3447 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3448 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3449 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3450 (struct linux_target_ops) <breakpoint>: Remove.
3451 (struct linux_target_ops) <breakpoint_len>: Remove.
3452 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3453 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3454 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3455 (struct linux_target_ops) <breakpoint>: Remove.
3456 (struct linux_target_ops) <breakpoint_len>: Remove.
3457 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3458 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3459 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3460 (struct linux_target_ops) <breakpoint>: Remove.
3461 (struct linux_target_ops) <breakpoint_len>: Remove.
3462 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3463 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3464 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3465 (struct linux_target_ops) <breakpoint>: Remove.
3466 (struct linux_target_ops) <breakpoint_len>: Remove.
3467 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3468 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3469 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3470 (struct linux_target_ops) <breakpoint>: Remove.
3471 (struct linux_target_ops) <breakpoint_len>: Remove.
3472 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3473 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3474 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3475 (struct linux_target_ops) <breakpoint>: Remove.
3476 (struct linux_target_ops) <breakpoint_len>: Remove.
3477 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3478 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3479 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3480 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3481 (struct linux_target_ops) <breakpoint>: Remove.
3482 (struct linux_target_ops) <breakpoint_len>: Remove.
3483 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3484 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3485 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3486 (struct linux_target_ops) <breakpoint>: Remove.
3487 (struct linux_target_ops) <breakpoint_len>: Remove.
3488 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3489 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3490
4cd98a19
AT
34912015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3492
3493 * linux-cris-low.c (cris_get_pc): Remove void arg.
3494
774ee6d2
AR
34952015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3496
3497 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3498 variable name.
3499
833dcd29
AR
35002015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3501
3502 * inferiors.c (thread_pid_matches_callback): New function.
3503 (find_thread_process): New function.
3504 (remove_thread): Reset current_thread.
3505 (remove_process): Assert threads have been removed first.
3506
8d689ee5
YQ
35072015-10-15 Yao Qi <yao.qi@linaro.org>
3508
3509 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3510 if it is 3.
3511 (aarch64_remove_point): Likewise.
3512 * regcache.c (regcache_register_size): New function.
3513
1c2e1515
YQ
35142015-10-12 Yao Qi <yao.qi@linaro.org>
3515
3516 * linux-aarch64-low.c: Update all callers as emit_load_store
3517 is renamed to aarch64_emit_load_store.
3518
e1c587c3
YQ
35192015-10-12 Yao Qi <yao.qi@linaro.org>
3520
3521 * linux-aarch64-low.c: Update all callers of function renaming
3522 from emit_insn to aarch64_emit_insn.
3523
b6542f81
YQ
35242015-10-12 Yao Qi <yao.qi@linaro.org>
3525
3526 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3527 arch/aarch64-insn.h.
3528 (struct aarch64_memory_operand): Likewise.
3529 (ENCODE): Likewise.
3530 (emit_insn): Move to arch/aarch64-insn.c.
3531 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3532 (emit_load_store): Move to arch/aarch64-insn.c.
3533 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3534 (can_encode_int32): Remove.
3535
246994ce
YQ
35362015-10-12 Yao Qi <yao.qi@linaro.org>
3537
3538 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3539 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3540 (aarch64_relocate_instruction): Likewise.
3541 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3542 (struct aarch64_insn_visitor): Likewise.
3543
0badd99f
YQ
35442015-10-12 Yao Qi <yao.qi@linaro.org>
3545
3546 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3547 (struct aarch64_insn_visitor): New.
3548 (struct aarch64_insn_relocation_data): New.
3549 (aarch64_ftrace_insn_reloc_b): New function.
3550 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3551 (aarch64_ftrace_insn_reloc_cb): Likewise.
3552 (aarch64_ftrace_insn_reloc_tb): Likewise.
3553 (aarch64_ftrace_insn_reloc_adr): Likewise.
3554 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3555 (aarch64_ftrace_insn_reloc_others): Likewise.
3556 (visitor): New.
3557 (aarch64_relocate_instruction): Use visitor.
3558
dfaffe9d
YQ
35592015-10-12 Yao Qi <yao.qi@linaro.org>
3560
3561 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3562 int. Add argument buf.
3563 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3564 aarch64_relocate_instruction.
3565
70b439f0
YQ
35662015-10-12 Yao Qi <yao.qi@linaro.org>
3567
3568 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3569 argument insn. Remove local variable insn. Don't call
3570 target_read_uint32.
3571 (aarch64_install_fast_tracepoint_jump_pad): Call
3572 target_read_uint32.
3573
7781c06f
YQ
35742015-09-30 Yao Qi <yao.qi@linaro.org>
3575
3576 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3577 (emit_load_store_pair): Likewise.
3578
9a3c8263
SM
35792015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3580
3581 * dll.c (match_dll): Add cast(s).
3582 (unloaded_dll): Likewise.
3583 * linux-low.c (second_thread_of_pid_p): Likewise.
3584 (delete_lwp_callback): Likewise.
3585 (count_events_callback): Likewise.
3586 (select_event_lwp_callback): Likewise.
3587 (linux_set_resume_request): Likewise.
3588 * server.c (accumulate_file_name_length): Likewise.
3589 (emit_dll_description): Likewise.
3590 (handle_qxfer_threads_worker): Likewise.
3591 (visit_actioned_threads): Likewise.
3592 * thread-db.c (any_thread_of): Likewise.
3593 * tracepoint.c (same_process_p): Likewise.
3594 (match_blocktype): Likewise.
3595 (build_traceframe_info_xml): Likewise.
3596
224c3ddb
SM
35972015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3598
3599 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3600 assignment.
3601 (gdb_unparse_agent_expr): Likewise.
3602 * hostio.c (require_data): Likewise.
3603 (handle_pread): Likewise.
3604 * linux-low.c (disable_regset): Likewise.
3605 (fetch_register): Likewise.
3606 (store_register): Likewise.
3607 (get_dynamic): Likewise.
3608 (linux_qxfer_libraries_svr4): Likewise.
3609 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3610 (set_fast_tracepoint_jump): Likewise.
3611 (uninsert_fast_tracepoint_jumps_at): Likewise.
3612 (reinsert_fast_tracepoint_jumps_at): Likewise.
3613 (validate_inserted_breakpoint): Likewise.
3614 (clone_agent_expr): Likewise.
3615 * regcache.c (init_register_cache): Likewise.
3616 * remote-utils.c (putpkt_binary_1): Likewise.
3617 (decode_M_packet): Likewise.
3618 (decode_X_packet): Likewise.
3619 (look_up_one_symbol): Likewise.
3620 (relocate_instruction): Likewise.
3621 (monitor_output): Likewise.
3622 * server.c (handle_search_memory): Likewise.
3623 (handle_qxfer_exec_file): Likewise.
3624 (handle_qxfer_libraries): Likewise.
3625 (handle_qxfer): Likewise.
3626 (handle_query): Likewise.
3627 (handle_v_cont): Likewise.
3628 (handle_v_run): Likewise.
3629 (captured_main): Likewise.
3630 * target.c (write_inferior_memory): Likewise.
3631 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3632 * tracepoint.c (init_trace_buffer): Likewise.
3633 (add_tracepoint_action): Likewise.
3634 (add_traceframe): Likewise.
3635 (add_traceframe_block): Likewise.
3636 (cmd_qtdpsrc): Likewise.
3637 (cmd_qtdv): Likewise.
3638 (cmd_qtstatus): Likewise.
3639 (response_source): Likewise.
3640 (response_tsv): Likewise.
3641 (cmd_qtnotes): Likewise.
3642 (gdb_collect): Likewise.
3643 (initialize_tracepoint): Likewise.
3644
afbe19f8
PL
36452015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3646
3647 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3648 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3649 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3650 <NOP>: New.
3651 (enum aarch64_condition_codes): New enum.
3652 (w0): New static global.
3653 (fp): Likewise.
3654 (lr): Likewise.
3655 (struct aarch64_memory_operand) <type>: New
3656 MEMORY_OPERAND_POSTINDEX type.
3657 (postindex_memory_operand): New helper function.
3658 (emit_ret): New function.
3659 (emit_load_store_pair): New function, factored out of emit_stp
3660 with support for MEMORY_OPERAND_POSTINDEX.
3661 (emit_stp): Rewrite using emit_load_store_pair.
3662 (emit_ldp): New function.
3663 (emit_load_store): Likewise.
3664 (emit_ldr): Mention post-index instruction in comment.
3665 (emit_ldrh): New function.
3666 (emit_ldrb): New function.
3667 (emit_ldrsw): Mention post-index instruction in comment.
3668 (emit_str): Likewise.
3669 (emit_subs): New function.
3670 (emit_cmp): Likewise.
3671 (emit_and): Likewise.
3672 (emit_orr): Likewise.
3673 (emit_orn): Likewise.
3674 (emit_eor): Likewise.
3675 (emit_mvn): Likewise.
3676 (emit_lslv): Likewise.
3677 (emit_lsrv): Likewise.
3678 (emit_asrv): Likewise.
3679 (emit_mul): Likewise.
3680 (emit_sbfm): Likewise.
3681 (emit_sbfx): Likewise.
3682 (emit_ubfm): Likewise.
3683 (emit_ubfx): Likewise.
3684 (emit_csinc): Likewise.
3685 (emit_cset): Likewise.
3686 (emit_nop): Likewise.
3687 (emit_ops_insns): New helper function.
3688 (emit_pop): Likewise.
3689 (emit_push): Likewise.
3690 (aarch64_emit_prologue): New function.
3691 (aarch64_emit_epilogue): Likewise.
3692 (aarch64_emit_add): Likewise.
3693 (aarch64_emit_sub): Likewise.
3694 (aarch64_emit_mul): Likewise.
3695 (aarch64_emit_lsh): Likewise.
3696 (aarch64_emit_rsh_signed): Likewise.
3697 (aarch64_emit_rsh_unsigned): Likewise.
3698 (aarch64_emit_ext): Likewise.
3699 (aarch64_emit_log_not): Likewise.
3700 (aarch64_emit_bit_and): Likewise.
3701 (aarch64_emit_bit_or): Likewise.
3702 (aarch64_emit_bit_xor): Likewise.
3703 (aarch64_emit_bit_not): Likewise.
3704 (aarch64_emit_equal): Likewise.
3705 (aarch64_emit_less_signed): Likewise.
3706 (aarch64_emit_less_unsigned): Likewise.
3707 (aarch64_emit_ref): Likewise.
3708 (aarch64_emit_if_goto): Likewise.
3709 (aarch64_emit_goto): Likewise.
3710 (aarch64_write_goto_address): Likewise.
3711 (aarch64_emit_const): Likewise.
3712 (aarch64_emit_call): Likewise.
3713 (aarch64_emit_reg): Likewise.
3714 (aarch64_emit_pop): Likewise.
3715 (aarch64_emit_stack_flush): Likewise.
3716 (aarch64_emit_zero_ext): Likewise.
3717 (aarch64_emit_swap): Likewise.
3718 (aarch64_emit_stack_adjust): Likewise.
3719 (aarch64_emit_int_call_1): Likewise.
3720 (aarch64_emit_void_call_2): Likewise.
3721 (aarch64_emit_eq_goto): Likewise.
3722 (aarch64_emit_ne_goto): Likewise.
3723 (aarch64_emit_lt_goto): Likewise.
3724 (aarch64_emit_le_goto): Likewise.
3725 (aarch64_emit_gt_goto): Likewise.
3726 (aarch64_emit_ge_got): Likewise.
3727 (aarch64_emit_ops_impl): New static global variable.
3728 (aarch64_emit_ops): New target function, return
3729 &aarch64_emit_ops_impl.
3730 (struct linux_target_ops): Install it.
3731
bb903df0
PL
37322015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3733
3734 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3735 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3736 aarch64-ipa.o.
3737 * linux-aarch64-ipa.c: New file.
3738 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3739 and endian.h.
3740 (aarch64_get_thread_area): New target method.
3741 (extract_signed_bitfield): New helper function.
3742 (aarch64_decode_ldr_literal): New function.
3743 (enum aarch64_opcodes): New enum.
3744 (struct aarch64_register): New struct.
3745 (struct aarch64_operand): New struct.
3746 (x0): New static global.
3747 (x1): Likewise.
3748 (x2): Likewise.
3749 (x3): Likewise.
3750 (x4): Likewise.
3751 (w2): Likewise.
3752 (ip0): Likewise.
3753 (sp): Likewise.
3754 (xzr): Likewise.
3755 (aarch64_register): New helper function.
3756 (register_operand): Likewise.
3757 (immediate_operand): Likewise.
3758 (struct aarch64_memory_operand): New struct.
3759 (offset_memory_operand): New helper function.
3760 (preindex_memory_operand): Likewise.
3761 (enum aarch64_system_control_registers): New enum.
3762 (ENCODE): New macro.
3763 (emit_insn): New helper function.
3764 (emit_b): New function.
3765 (emit_bcond): Likewise.
3766 (emit_cb): Likewise.
3767 (emit_tb): Likewise.
3768 (emit_blr): Likewise.
3769 (emit_stp): Likewise.
3770 (emit_ldp_q_offset): Likewise.
3771 (emit_stp_q_offset): Likewise.
3772 (emit_load_store): Likewise.
3773 (emit_ldr): Likewise.
3774 (emit_ldrsw): Likewise.
3775 (emit_str): Likewise.
3776 (emit_ldaxr): Likewise.
3777 (emit_stxr): Likewise.
3778 (emit_stlr): Likewise.
3779 (emit_data_processing_reg): Likewise.
3780 (emit_data_processing): Likewise.
3781 (emit_add): Likewise.
3782 (emit_sub): Likewise.
3783 (emit_mov): Likewise.
3784 (emit_movk): Likewise.
3785 (emit_mov_addr): Likewise.
3786 (emit_mrs): Likewise.
3787 (emit_msr): Likewise.
3788 (emit_sevl): Likewise.
3789 (emit_wfe): Likewise.
3790 (append_insns): Likewise.
3791 (can_encode_int32_in): New helper function.
3792 (aarch64_relocate_instruction): New function.
3793 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3794 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3795 (struct linux_target_ops): Install aarch64_get_thread_area,
3796 aarch64_install_fast_tracepoint_jump_pad and
3797 aarch64_get_min_fast_tracepoint_insn_len.
3798
787749ea
PL
37992015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3800
3801 * Makefile.in (aarch64-insn.o): New rule.
3802 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3803
9812b2e6
YQ
38042015-09-21 Yao Qi <yao.qi@linaro.org>
3805
3806 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3807
18fe412b
YQ
38082015-09-21 Yao Qi <yao.qi@linaro.org>
3809
3810 * tracepoint.c (max_jump_pad_size): Remove.
3811
a0cc84cd
YQ
38122015-09-18 Yao Qi <yao.qi@linaro.org>
3813
3814 * linux-aarch64-low.c: Don't include sys/uio.h.
3815 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3816
d78908cf
WW
38172015-09-16 Wei-cheng Wang <cole945@gmail.com>
3818
3819 * tracepoint.c (eval_result_type): Change prototype.
3820 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3821
d57e0d50
PA
38222015-09-15 Pedro Alves <palves@redhat.com>
3823
3824 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3825 Check whether to report exec events instead of checking whether
3826 multiprocess is enabled.
3827
5a676acc
PA
38282015-09-15 Pedro Alves <palves@redhat.com>
3829
3830 PR remote/18965
3831 * remote-utils.c (prepare_resume_reply): Merge
3832 TARGET_WAITKIND_VFORK_DONE switch case with the
3833 TARGET_WAITKIND_FORKED case.
3834
7c5d0fad
YQ
38352015-09-15 Yao Qi <yao.qi@linaro.org>
3836
3837 * server.c (handle_query): Check string comparison using
3838 "else if" instead of "if".
3839
750ce8d1
YQ
38402015-09-15 Yao Qi <yao.qi@linaro.org>
3841
3842 * server.c (vCont_supported): New global variable.
3843 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3844 matches. Append ";vContSupported+" to own_buf.
3845 (handle_v_requests): Append ";s;S" to own_buf if target supports
3846 hardware single step or vCont_supported is false.
3847 (capture_main): Set vCont_supported to zero.
3848
70b90b91
YQ
38492015-09-15 Yao Qi <yao.qi@linaro.org>
3850
3851 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3852 it to ...
3853 (linux_supports_hardware_single_step): ... New function.
3854 (linux_target_ops): Update.
3855 * lynx-low.c (lynx_target_ops): Set field
3856 supports_hardware_single_step to target_can_do_hardware_single_step.
3857 * nto-low.c (nto_target_ops): Likewise.
3858 * spu-low.c (spu_target_ops): Likewise.
3859 * win32-low.c (win32_target_ops): Likewise.
3860 * target.c (target_can_do_hardware_single_step): New function.
3861 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3862 Remove. <supports_hardware_single_step>: New field.
3863 (target_supports_conditional_breakpoints): Remove.
3864 (target_supports_hardware_single_step): New macro.
3865 (target_can_do_hardware_single_step): Declare.
3866 * server.c (handle_query): Use target_supports_hardware_single_step
3867 instead of target_supports_conditional_breakpoints.
3868
ade90bde
YQ
38692015-09-15 Yao Qi <yao.qi@linaro.org>
3870
3871 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3872 function.
3873 (struct linux_target_ops the_low_target): Install
3874 aarch64_linux_siginfo_fixup.
3875
94585166
DB
38762015-09-11 Don Breazeal <donb@codesourcery.com>
3877 Luis Machado <lgustavo@codesourcery.com>
3878
3879 * linux-low.c (linux_mourn): Static declaration.
3880 (linux_arch_setup): Move in front of
3881 handle_extended_wait.
3882 (linux_arch_setup_thread): New function.
3883 (handle_extended_wait): Handle exec events. Call
3884 linux_arch_setup_thread. Make event_lwp argument a
3885 pointer-to-a-pointer.
3886 (check_zombie_leaders): Do not check stopped threads.
3887 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3888 (linux_low_filter_event): Add lwp and thread for exec'ing
3889 non-leader thread if leader thread has been deleted.
3890 Refactor code into linux_arch_setup_thread and call it.
3891 Pass child lwp pointer by reference to handle_extended_wait.
3892 (linux_wait_for_event_filtered): Update comment.
3893 (linux_wait_1): Prevent clobbering exec event status.
3894 (linux_supports_exec_events): New function.
3895 (linux_target_ops) <supports_exec_events>: Initialize new member.
3896 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3897 new member.
3898 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3899 * server.c (report_exec_events): New global variable.
3900 (handle_query): Handle qSupported query for exec-events feature.
3901 (captured_main): Initialize report_exec_events.
3902 * server.h (report_exec_events): Declare new global variable.
3903 * target.h (struct target_ops) <supports_exec_events>: New
3904 member.
3905 (target_supports_exec_events): New macro.
3906 * win32-low.c (win32_target_ops) <supports_exec_events>:
3907 Initialize new member.
3908
0568462b
MM
39092015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3910
3911 * linux-low.c (linux_low_enable_btrace): Remove.
3912 (linux_target_ops): Replace linux_low_enable_btrace with
3913 linux_enable_btrace.
3914
39edd165
YQ
39152015-09-03 Yao Qi <yao.qi@linaro.org>
3916
3917 * linux-aarch64-low.c (aarch64_insert_point): Call
3918 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3919 returns true.
3920
1db33b5a
UW
39212015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3922
3923 * linux-low.c (check_stopped_by_breakpoint): Use
3924 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3925
ab290430
PA
39262015-08-27 Pedro Alves <palves@redhat.com>
3927
3928 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3929
8d749320
SM
39302015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3931
6711b7f8
SM
3932 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3933 the XNEW-family equivalent.
8d749320
SM
3934 (compile_bytecodes): Likewise.
3935 * dll.c (loaded_dll): Likewise.
3936 * event-loop.c (append_callback_event): Likewise.
3937 (create_file_handler): Likewise.
3938 (create_file_event): Likewise.
3939 * hostio.c (handle_open): Likewise.
3940 * inferiors.c (add_thread): Likewise.
3941 (add_process): Likewise.
3942 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3943 * linux-arm-low.c (arm_new_process): Likewise.
3944 (arm_new_thread): Likewise.
3945 * linux-low.c (add_to_pid_list): Likewise.
3946 (linux_add_process): Likewise.
3947 (handle_extended_wait): Likewise.
3948 (add_lwp): Likewise.
3949 (enqueue_one_deferred_signal): Likewise.
3950 (enqueue_pending_signal): Likewise.
3951 (linux_resume_one_lwp_throw): Likewise.
3952 (linux_resume_one_thread): Likewise.
3953 (linux_read_memory): Likewise.
3954 (linux_write_memory): Likewise.
3955 * linux-mips-low.c (mips_linux_new_process): Likewise.
3956 (mips_linux_new_thread): Likewise.
3957 (mips_add_watchpoint): Likewise.
3958 * linux-x86-low.c (initialize_low_arch): Likewise.
3959 * lynx-low.c (lynx_add_process): Likewise.
3960 * mem-break.c (set_raw_breakpoint_at): Likewise.
3961 (set_breakpoint): Likewise.
3962 (add_condition_to_breakpoint): Likewise.
3963 (add_commands_to_breakpoint): Likewise.
3964 (clone_agent_expr): Likewise.
3965 (clone_one_breakpoint): Likewise.
3966 * regcache.c (new_register_cache): Likewise.
3967 * remote-utils.c (look_up_one_symbol): Likewise.
3968 * server.c (queue_stop_reply): Likewise.
3969 (start_inferior): Likewise.
3970 (queue_stop_reply_callback): Likewise.
3971 (handle_target_event): Likewise.
3972 * spu-low.c (fetch_ppc_memory): Likewise.
3973 (store_ppc_memory): Likewise.
3974 * target.c (set_target_ops): Likewise.
3975 * thread-db.c (thread_db_load_search): Likewise.
3976 (try_thread_db_load_1): Likewise.
3977 * tracepoint.c (add_tracepoint): Likewise.
3978 (add_tracepoint_action): Likewise.
3979 (create_trace_state_variable): Likewise.
3980 (cmd_qtdpsrc): Likewise.
3981 (cmd_qtro): Likewise.
3982 (add_while_stepping_state): Likewise.
3983 * win32-low.c (child_add_thread): Likewise.
3984 (get_image_name): Likewise.
3985
ed8b7b42
YQ
39862015-08-25 Yao Qi <yao.qi@linaro.org>
3987
3988 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3989
db3cb7cb
YQ
39902015-08-25 Yao Qi <yao.qi@linaro.org>
3991
3992 * Makefile.in (aarch64-linux.o): New rule.
3993 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3994 srv_tgtobj.
3995 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3996 (aarch64_init_debug_reg_state): Make it extern.
3997 (aarch64_linux_prepare_to_resume): Remove.
3998
f6011a1c
YQ
39992015-08-25 Yao Qi <yao.qi@linaro.org>
4000
4001 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4002 lwp_arch_private_info and ptid_of_lwp.
4003
88e2cf7e
YQ
40042015-08-25 Yao Qi <yao.qi@linaro.org>
4005
4006 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4007 Find proc_info by find_process_pid. All callers updated.
4008
5e35436e
YQ
40092015-08-25 Yao Qi <yao.qi@linaro.org>
4010
4011 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4012 Remove.
4013 (debug_reg_change_callback): Remove.
4014 (aarch64_notify_debug_reg_change): Remove.
4015
4a8a7965
YQ
40162015-08-25 Yao Qi <yao.qi@linaro.org>
4017
4018 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4019 Call current_lwp_ptid.
4020
32a271ee
YQ
40212015-08-25 Yao Qi <yao.qi@linaro.org>
4022
4023 * linux-aarch64-low.c (debug_reg_change_callback): Use
4024 debug_printf.
4025
0d51c8d7
YQ
40262015-08-25 Yao Qi <yao.qi@linaro.org>
4027
4028 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4029
31a43dd5
YQ
40302015-08-25 Yao Qi <yao.qi@linaro.org>
4031
4032 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4033
8ee52567
YQ
40342015-08-25 Yao Qi <yao.qi@linaro.org>
4035
4036 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4037 the code.
4038
ff3f0f45
YQ
40392015-08-25 Yao Qi <yao.qi@linaro.org>
4040
4041 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4042 Remove.
4043 (debug_reg_change_callback): Remove argument entry and add argument
4044 lwp. Remove local variable thread. Don't print thread id in the
4045 debugging output. Don't check whether pid of thread equals to pid.
4046 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4047 iterate_over_lwps instead find_inferior.
4048
3d40fbb5
PA
40492015-08-24 Pedro Alves <palves@redhat.com>
4050
4051 * inferiors.c (get_first_process): New function.
4052 * inferiors.h (get_first_process): New declaration.
4053 * remote-utils.c (read_ptid): Default to the first process in the
4054 list, instead of to the current thread's process.
4055
438e1e42
PA
40562015-08-24 Pedro Alves <palves@redhat.com>
4057
4058 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4059 * event-loop.c: Likewise.
4060 * remote-utils.c: Likewise.
4061 * tracepoint.c: Likewise.
4062
a8c6d4fc
PA
40632015-08-24 Pedro Alves <palves@redhat.com>
4064
4065 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4066 ptid_get_lwp.
4067
99b0bb12
PA
40682015-08-21 Pedro Alves <palves@redhat.com>
4069
4070 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4071 instead of literal 1.
4072
f8904751
PA
40732015-08-21 Pedro Alves <palves@redhat.com>
4074
4075 * tdesc.c (default_description): Explicitly zero-initialize.
4076
465a859e
PA
40772015-08-21 Pedro Alves <palves@redhat.com>
4078
4079 PR gdb/18749
4080 * inferiors.c (remove_thread): Discard any pending stop reply for
4081 this thread.
4082 * server.c (remove_all_on_match_pid): Rename to ...
4083 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4084 instead of a pid.
4085 (discard_queued_stop_replies): Change parameter to a ptid. Now
4086 extern.
4087 (handle_v_kill, kill_inferior_callback, captured_main)
4088 (process_serial_event): Adjust.
4089 * server.h (discard_queued_stop_replies): Declare.
4090
f0db101d
PA
40912015-08-21 Pedro Alves <palves@redhat.com>
4092
4093 * linux-low.c (wait_for_sigstop): Always switch to no thread
4094 selected if the previously current thread dies.
4095 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4096 process instead of the current thread's.
4097 * remote-utils.c (input_interrupt): Don't check if there's no
4098 current thread.
4099 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4100 current thread to the general thread fails, error out.
4101 (handle_qxfer_auxv, handle_qxfer_libraries)
4102 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4103 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4104 (handle_query): Check if there's a thread selected instead of
4105 checking whether there's any thread in the thread list.
4106 (handle_qxfer_threads, handle_qxfer_btrace)
4107 (handle_qxfer_btrace_conf): Don't error out early if there's no
4108 thread in the thread list.
4109 (handle_v_cont, myresume): Don't set the current thread to the
4110 continue thread.
4111 (process_serial_event) <Hg handling>: Also set thread_id if the
4112 previous general thread is still alive.
4113 (process_serial_event) <g/G handling>: If setting the current
4114 thread to the general thread fails, error out.
4115 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4116 thread's lwp instead of the current thread's.
4117 * target.c (set_desired_thread): If the desired thread was not
4118 found, leave the current thread pointing to NULL. Return an int
4119 (boolean) indicating success.
4120 * target.h (set_desired_thread): Change return type to int.
4121
40045d91
MF
41222015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4123
4124 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4125 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4126 #includes.
4127 (ps_get_thread_area): New function.
4128
45face3b
GB
41292015-08-19 Gary Benson <gbenson@redhat.com>
4130
4131 * hostio.c (handle_pread): Do not attempt to read more data
4132 than hostio_reply_with_data can fit in a packet.
4133
16d5f642
JB
41342015-08-18 Joel Brobecker <brobecker@adacore.com>
4135
4136 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4137
a738da3a
MF
41382015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4139
4140 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4141
33ebda9d
PA
41422015-08-06 Pedro Alves <palves@redhat.com>
4143
4144 * tracepoint.c (expr_eval_result): Now an int.
4145
a44892be
PA
41462015-08-06 Pedro Alves <palves@redhat.com>
4147
4148 * gdbthread.h (struct regcache): Forward declare.
4149 (struct thread_info) <regcache_data>: Now a struct regcache
4150 pointer.
4151 * inferiors.c (inferior_regcache_data)
4152 (set_inferior_regcache_data): Now work with struct regcache
4153 pointers.
4154 * inferiors.h (struct regcache): Forward declare.
4155 (inferior_regcache_data, set_inferior_regcache_data): Now work
4156 with struct regcache pointers.
4157 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4158 (free_register_cache_thread): Remove struct regcache pointer
4159 casts.
4160
608a1e46
PA
41612015-08-06 Pedro Alves <palves@redhat.com>
4162
4163 * server.c (captured_main): On error, print the exception message
4164 to stderr, and if run_once is set, throw a quit.
4165
f0ce0d3a
PA
41662015-08-06 Pedro Alves <palves@redhat.com>
4167
4168 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4169 the current thread.
4170
bf47e248
PA
41712015-08-06 Pedro Alves <palves@redhat.com>
4172
4173 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4174 reading beyond the passed in buffer length.
4175
b6b9ffcc
PL
41762015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4177
4178 * tracepoint.c (symbol_list) <required>: Remove.
4179
863d01bd
PA
41802015-08-06 Pedro Alves <palves@redhat.com>
4181
4182 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4183 count if stopping and suspending threads.
4184 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4185 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4186 (linux_detach): Complete an ongoing step-over.
4187 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4188 throughout.
4189 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4190 (linux_wait_1): If passing a signal to the inferior after
4191 finishing a step-over, unsuspend and re-resume all lwps. If we
4192 see a single-step event but the thread should be continuing, don't
4193 pass the trap to gdb.
4194 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4195 internal_error instead of gdb_assert.
4196 (enqueue_pending_signal): New function.
4197 (check_ptrace_stopped_lwp_gone): Add debug output.
4198 (start_step_over): Use internal_error instead of gdb_assert.
4199 (complete_ongoing_step_over): New function.
4200 (linux_resume_one_thread): Don't resume a suspended thread.
4201 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4202 it stepping.
4203
00db26fa
PA
42042015-08-06 Pedro Alves <palves@redhat.com>
4205
4206 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4207 (linux_thread_alive): Use lwp_is_marked_dead.
4208 (extended_event_reported): Delete.
4209 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4210 instead of extended_event_reported.
4211 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4212 as well.
4213 (lwp_is_marked_dead): New function.
4214 (lwp_running): Use lwp_is_marked_dead.
4215 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4216 comment.
4217
ad071a30
PA
42182015-08-06 Pedro Alves <palves@redhat.com>
4219
4220 * linux-low.c (linux_wait_1): Move fork event output out of the
4221 !report_to_gdb check. Pass event_child->waitstatus to
4222 target_waitstatus_to_string instead of ourstatus.
4223
524b57e6
YQ
42242015-08-04 Yao Qi <yao.qi@linaro.org>
4225
4226 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4227 if current_thread is 32 bit.
4228
6085d6f6
YQ
42292015-08-04 Yao Qi <yao.qi@linaro.org>
4230
4231 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4232 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4233 * server.c (extended_protocol): Remove "static".
4234 * server.h (extended_protocol): Declare it.
4235
8a7e4587
YQ
42362015-08-04 Yao Qi <yao.qi@linaro.org>
4237
4238 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4239 both aarch64 and aarch32.
4240 (aarch64_set_pc): Likewise.
4241
3b53ae99
YQ
42422015-08-04 Yao Qi <yao.qi@linaro.org>
4243
4244 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4245 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4246 arm-with-neon.xml to srv_xmlfiles.
4247 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4248 (is_64bit_tdesc): New function.
4249 (aarch64_linux_read_description): New function.
4250 (aarch64_arch_setup): Call aarch64_linux_read_description.
4251 (regs_info): Rename to regs_info_aarch64.
4252 (aarch64_regs_info): Return right regs_info.
4253 (initialize_low_arch): Call initialize_low_arch_aarch32.
4254
bd9e6534
YQ
42552015-08-04 Yao Qi <yao.qi@linaro.org>
4256
4257 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4258 * linux-aarch32-low.c: New file.
4259 * linux-aarch32-low.h: New file.
4260 * linux-arm-low.c (arm_fill_gregset): Move it to
4261 linux-aarch32-low.c.
4262 (arm_store_gregset): Likewise.
4263 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4264 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4265 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4266 (regs_info): Rename to regs_info_arm.
4267 (arm_regs_info): Return regs_info_aarch32 if
4268 have_ptrace_getregset is 1 and target description is
4269 arm_with_neon or arm_with_vfpv3.
4270 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4271 Call initialize_low_arch_aarch32 instead.
4272
ded48a5e
YQ
42732015-08-04 Yao Qi <yao.qi@linaro.org>
4274
4275 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4276 * linux-low.c: ... here.
4277 * linux-low.h (have_ptrace_getregset): Declare it.
4278
96e9210f
PA
42792015-08-04 Pedro Alves <palves@redhat.com>
4280
4281 * thread-db.c (struct thread_db): Use new typedefs.
4282 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4283 CHK calls.
4284 (disable_thread_event_reporting): Cast result of dlsym to
4285 destination function pointer type.
4286 (thread_db_mourn): Use td_ta_delete_ftype.
4287
af60a1ef
SL
42882015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4289
4290 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4291 arch variant.
4292 (CDX_BREAKPOINT): Define for R2.
4293 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4294 (the_low_target): Add comments.
4295
e8b41681
YQ
42962015-07-30 Yao Qi <yao.qi@linaro.org>
4297
4298 * linux-arm-low.c (arm_hwcap): Remove it.
4299 (arm_read_description): New local variable arm_hwcap. Don't
4300 set arm_hwcap to zero.
4301
89abb039
YQ
43022015-07-30 Yao Qi <yao.qi@linaro.org>
4303
4304 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4305 Use regcache->tdesc instead.
4306 (arm_store_wmmxregset): Likewise.
4307 (arm_fill_vfpregset): Likewise.
4308 (arm_store_vfpregset): Likewise.
4309
deca266c
YQ
43102015-07-30 Yao Qi <yao.qi@linaro.org>
4311
4312 * linux-arm-low.c: Include arch/arm.h.
4313 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4314 (arm_store_gregset): Likewise.
4315
aa58a496
SM
43162015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4317
4318 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4319 ptrace's 4th parameter.
4320
50904b25
YQ
43212015-07-27 Yao Qi <yao.qi@linaro.org>
4322
4323 * configure.srv (case aarch64*-*-linux*): Don't set
4324 srv_linux_usrregs.
4325
5826e159
PA
43262015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4327
4328 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4329 sys/ptrace.h.
4330 * linux-arm-low.c: Likewise.
4331 * linux-cris-low.c: Likewise.
4332 * linux-crisv32-low.c: Likewise.
4333 * linux-low.c: Likewise.
4334 * linux-m68k-low.c: Likewise.
4335 * linux-mips-low.c: Likewise.
4336 * linux-nios2-low.c: Likewise.
4337 * linux-s390-low.c: Likewise.
4338 * linux-sparc-low.c: Likewise.
4339 * linux-tic6x-low.c: Likewise.
4340 * linux-tile-low.c: Likewise.
4341 * linux-x86-low.c: Likewise.
4342
54019719
PA
43432015-07-24 Pedro Alves <palves@redhat.com>
4344
4345 * config.in: Regenerate.
4346 * configure: Regenerate.
4347
eb7aa561
PA
43482015-07-24 Pedro Alves <palves@redhat.com>
4349
4350 * acinclude.m4: Include ../ptrace.m4.
4351 * configure.ac: Call GDB_AC_PTRACE.
4352 * config.in, configure: Regenerate.
4353
55d7b841
YQ
43542015-07-24 Yao Qi <yao.qi@linaro.org>
4355
4356 * linux-low.c (linux_create_inferior): Remove setting to
4357 proc->priv->new_inferior.
4358 (linux_attach): Likewise.
4359 (linux_low_filter_event): Likewise.
4360 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4361
c06cbd92
YQ
43622015-07-24 Yao Qi <yao.qi@linaro.org>
4363
4364 * linux-low.c (linux_arch_setup): New function.
4365 (linux_low_filter_event): If proc->tdesc is NULL and
4366 proc->attached is true, call the_low_target.arch_setup.
4367 Otherwise, keep status pending, and return.
4368 (linux_resume_one_lwp_throw): Don't call get_pc if
4369 thread->while_stepping isn't NULL. Don't call
4370 get_thread_regcache if proc->tdesc is NULL.
4371 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4372 (linux_target_ops): Install arch_setup.
4373 * server.c (start_inferior): Call the_target->arch_setup.
4374 * target.h (struct target_ops) <arch_setup>: New field.
4375 (target_arch_setup): New marco.
4376 * lynx-low.c (lynx_target_ops): Update.
4377 * nto-low.c (nto_target_ops): Update.
4378 * spu-low.c (spu_target_ops): Update.
4379 * win32-low.c (win32_target_ops): Update.
4380
5ae3ebba
YQ
43812015-07-24 Yao Qi <yao.qi@linaro.org>
4382
4383 * linux-low.c (linux_add_process): Don't set
4384 proc->priv->new_inferior.
4385 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4386 (linux_attach): Likewise.
4387
eb97750b
YQ
43882015-07-24 Yao Qi <yao.qi@linaro.org>
4389
4390 * server.c (start_inferior): Code refactor.
4391
51aee833
YQ
43922015-07-24 Yao Qi <yao.qi@linaro.org>
4393
4394 * server.c (process_serial_event): Set general_thread.
4395
af1b22f3
YQ
43962015-07-21 Yao Qi <yao.qi@linaro.org>
4397
4398 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4399 aarch64_linux_get_debug_reg_capacity.
4400
554717a3
YQ
44012015-07-17 Yao Qi <yao.qi@linaro.org>
4402
4403 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4404 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4405 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4406 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4407 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4408 (AARCH64_HWP_ALIGNMENT): Likewise.
4409 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4410 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4411 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4412 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4413 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4414 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4415 (struct aarch64_debug_reg_state): Likewise.
4416 (struct arch_lwp_info): Likewise.
4417 (aarch64_align_watchpoint): Likewise.
4418 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4419 (aarch64_watchpoint_length): Likewise.
4420 (aarch64_point_encode_ctrl_reg): Likewise
4421 (aarch64_point_is_aligned): Likewise.
4422 (aarch64_align_watchpoint): Likewise.
4423 (aarch64_linux_set_debug_regs):
4424 (aarch64_dr_state_insert_one_point): Likewise.
4425 (aarch64_dr_state_remove_one_point): Likewise.
4426 (aarch64_handle_breakpoint): Likewise.
4427 (aarch64_handle_aligned_watchpoint): Likewise.
4428 (aarch64_handle_unaligned_watchpoint): Likewise.
4429 (aarch64_handle_watchpoint): Likewise.
4430
c67ca4de
YQ
44312015-07-17 Yao Qi <yao.qi@linaro.org>
4432
4433 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4434 and don't aarch64_get_debug_reg_state. All callers update.
4435 (aarch64_handle_aligned_watchpoint): Likewise.
4436 (aarch64_handle_unaligned_watchpoint): Likewise.
4437 (aarch64_handle_watchpoint): Likewise.
4438 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4439 (aarch64_remove_point): Likewise.
4440
25abf979
YQ
44412015-07-17 Yao Qi <yao.qi@linaro.org>
4442
4443 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4444 debug_printf.
4445 (aarch64_handle_unaligned_watchpoint): Likewise.
4446
db1ff28b
JK
44472015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4448
4449 Revert the previous 3 commits:
4450 Move gdb_regex* to common/
4451 Move linux_find_memory_regions_full & co.
4452 gdbserver build-id attribute generator
4453
700ca40f
JK
44542015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4455 Jan Kratochvil <jan.kratochvil@redhat.com>
4456
4457 gdbserver build-id attribute generator.
4458 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4459 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4460 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4461 (find_phdr): New.
4462 (get_dynamic): Use find_pdhr to traverse program headers.
4463 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4464 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4465 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4466 (get_hex_build_id): New.
4467 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4468 to reply XML document.
4469
9904185c
JK
44702015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4471 Jan Kratochvil <jan.kratochvil@redhat.com>
4472
4473 * target.c: Include target/target-utils.h and fcntl.h.
4474 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4475 (target_fileio_read_stralloc): New functions.
4476
6e5b4429
JK
44772015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4478
4479 * Makefile.in (OBS): Add gdb_regex.o.
4480 (gdb_regex.o): New.
4481 * config.in: Rebuilt.
4482 * configure: Rebuilt.
4483
ddc98fbf
JK
44842015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4485 Jan Kratochvil <jan.kratochvil@redhat.com>
4486
4487 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4488 * Makefile.in (OBS): Add target-utils.o.
4489 (linux-maps.o, target-utils.o): New.
4490 * configure.srv (srv_linux_obj): Add linux-maps.o.
4491
e57bb7a0
PL
44922015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4493
4494 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4495 function, return 1.
4496 (the_low_target): Install it.
4497
586b02a9
PA
44982015-07-14 Pedro Alves <palves@redhat.com>
4499
4500 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4501 Instead, ignore ECHILD, and throw an error for other errnos.
4502
58c1b36c
PA
45032015-07-10 Pedro Alves <palves@redhat.com>
4504
4505 * event-loop.c (struct callback_event) <data>: Change type to
4506 gdb_client_data instance instead of gdb_client_data pointer.
4507 (append_callback_event): Adjust.
4508
421530db
PL
45092015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4510
4511 * linux-aarch64-low.c: Add comments for each linux_target_ops
4512 method. Remove comments already covered in target_ops and
4513 linux_target_ops definitions.
4514 (the_low_target): Add comments for each unimplemented method.
4515
c2d65f38
YQ
45162015-07-09 Yao Qi <yao.qi@linaro.org>
4517
4518 * linux-aarch64-low.c (aarch64_regmap): Remove.
4519 (aarch64_usrregs_info): Remove.
4520 (regs_info): Set field usrregs to NULL.
4521
b20a6524
MM
45222015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4523
4524 * linux-low.c: Include "rsp-low.h"
4525 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4526 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4527 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4528 (handle_btrace_enable_pt): New.
4529 (handle_btrace_general_set): Support "pt".
4530 (handle_btrace_conf_general_set): Support "pt:size".
4531
96c97461
PL
45322015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4533
4534 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4535 Z_PACKET_SW_BP.
4536
37d66942
PL
45372015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4538
4539 * linux-aarch64-low.c: Remove comment about endianness.
4540 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4541 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4542 memcmp.
4543
dc06243f
GB
45442015-06-24 Gary Benson <gbenson@redhat.com>
4545
4546 * linux-i386-ipa.c (stdint.h): Do not include.
4547 * lynx-i386-low.c (stdint.h): Likewise.
4548 * lynx-ppc-low.c (stdint.h): Likewise.
4549 * mem-break.c (stdint.h): Likewise.
4550 * thread-db.c (stdint.h): Likewise.
4551 * tracepoint.c (stdint.h): Likewise.
4552 * win32-low.c (stdint.h): Likewise.
4553
124e13d9
SM
45542015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4555
4556 * server.c (write_qxfer_response): Update call to
4557 remote_escape_output.
4558
909c2cda
JK
45592015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4560 Jan Kratochvil <jan.kratochvil@redhat.com>
4561
4562 Merge multiple hex conversions.
4563 * gdbreplay.c (tohex): Rename to 'fromhex'.
4564 (logchar): Use fromhex.
4565
24c05f46
JK
45662015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4567
4568 * server.c (handle_qxfer_libraries): Set `version' attribute for
4569 <library-list>.
4570
14d2069a
GB
45712015-06-10 Gary Benson <gbenson@redhat.com>
4572
4573 * target.h (struct target_ops) <multifs_open>: New field.
4574 <multifs_unlink>: Likewise.
4575 <multifs_readlink>: Likewise.
4576 * linux-low.c (nat/linux-namespaces.h): New include.
4577 (linux_target_ops): Initialize the_target->multifs_open,
4578 the_target->multifs_unlink and the_target->multifs_readlink.
4579 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4580 * hostio.c (hostio_fs_pid): New static variable.
4581 (hostio_handle_new_gdb_connection): New function.
4582 (handle_setfs): Likewise.
4583 (handle_open): Use the_target->multifs_open as appropriate.
4584 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4585 (handle_readlink): Use the_target->multifs_readlink as
4586 appropriate.
4587 (handle_vFile): Handle vFile:setfs packets.
4588 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4589 after target_handle_new_gdb_connection.
4590
4b8b5e72
GB
45912015-06-10 Gary Benson <gbenson@redhat.com>
4592
4593 * configure.ac (AC_CHECK_FUNCS): Add setns.
4594 * config.in: Regenerate.
4595 * configure: Likewise.
4596 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4597 (linux-namespaces.o): New rule.
4598 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4599
3ac2e371
GB
46002015-06-09 Gary Benson <gbenson@redhat.com>
4601
4602 * hostio.c (handle_open): Process mode argument with
4603 fileio_to_host_mode.
4604
ca9b78ce
YQ
46052015-06-01 Yao Qi <yao.qi@linaro.org>
4606
4607 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4608 * linux-x86-low.c: Likewise.
4609
bfacd19d
DB
46102015-05-28 Don Breazeal <donb@codesourcery.com>
4611
4612 * linux-low.c (handle_extended_wait): Initialize
4613 thread_info.last_resume_kind for new fork children.
4614
452003ef
PA
46152015-05-15 Pedro Alves <palves@redhat.com>
4616
4617 * target.h (target_handle_new_gdb_connection): Rewrite using if
4618 wrapped in do/while.
4619
1041a03c
JB
46202015-05-14 Joel Brobecker <brobecker@adacore.com>
4621
4622 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4623 * configure, config.in: Regenerate.
4624 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4625 Declare typedef.
4626
c269dbdb
DB
46272015-05-12 Don Breazeal <donb@codesourcery.com>
4628
4629 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4630 PTRACE_EVENT_VFORK_DONE.
4631 (linux_low_ptrace_options, extended_event_reported): Add vfork
4632 events.
4633 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4634 and "vforkdone" for RSP 'T' Stop Reply Packet.
4635 * server.h (report_vfork_events): Declare
4636 global variable.
4637
3a8a0396
DB
46382015-05-12 Don Breazeal <donb@codesourcery.com>
4639
4640 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4641 (the_low_target) <new_fork>: Initialize new member.
4642 * linux-arm-low.c (arm_new_fork): New function.
4643 (the_low_target) <new_fork>: Initialize new member.
4644 * linux-low.c (handle_extended_wait): Call new target function
4645 new_fork.
4646 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4647 * linux-mips-low.c (mips_add_watchpoint): New function
4648 extracted from mips_insert_point.
4649 (the_low_target) <new_fork>: Initialize new member.
4650 (mips_linux_new_fork): New function.
4651 (mips_insert_point): Call mips_add_watchpoint.
4652 * linux-x86-low.c (x86_linux_new_fork): New function.
4653 (the_low_target) <new_fork>: Initialize new member.
4654
de0d863e
DB
46552015-05-12 Don Breazeal <donb@codesourcery.com>
4656
4657 * linux-low.c (handle_extended_wait): Implement return value,
4658 rename argument 'event_child' to 'event_lwp', handle
4659 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4660 (linux_low_ptrace_options): New function.
4661 (linux_low_filter_event): Call linux_low_ptrace_options,
4662 use different argument fo linux_enable_event_reporting,
4663 use return value from handle_extended_wait.
4664 (extended_event_reported): New function.
4665 (linux_wait_1): Call extended_event_reported and set
4666 status to report fork events.
4667 (linux_write_memory): Add pid to debug message.
4668 (reset_lwp_ptrace_options_callback): New function.
4669 (linux_handle_new_gdb_connection): New function.
4670 (linux_target_ops): Initialize new structure member.
4671 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4672 * lynx-low.c: Initialize new structure member.
4673 * remote-utils.c (prepare_resume_reply): Implement stop reason
4674 "fork" for "T" stop message.
4675 * server.c (handle_query): Call handle_new_gdb_connection.
4676 * server.h (report_fork_events): Declare global flag.
4677 * target.h (struct target_ops) <handle_new_gdb_connection>:
4678 New member.
4679 (target_handle_new_gdb_connection): New macro.
4680 * win32-low.c: Initialize new structure member.
4681
ddcbc397
DB
46822015-05-12 Don Breazeal <donb@codesourcery.com>
4683
4684 * mem-break.c (APPEND_TO_LIST): Define macro.
4685 (clone_agent_expr): New function.
4686 (clone_one_breakpoint): New function.
4687 (clone_all_breakpoints): New function.
4688 * mem-break.h: Declare new functions.
4689
89245bc0
DB
46902015-05-12 Don Breazeal <donb@codesourcery.com>
4691
4692 * linux-low.c (linux_supports_fork_events): New function.
4693 (linux_supports_vfork_events): New function.
4694 (linux_target_ops): Initialize new structure members.
4695 (initialize_low): Call linux_check_ptrace_features.
4696 * lynx-low.c (lynx_target_ops): Initialize new structure
4697 members.
4698 * server.c (report_fork_events, report_vfork_events):
4699 New global flags.
4700 (handle_query): Add new features to qSupported packet and
4701 response.
4702 (captured_main): Initialize new global variables.
4703 * target.h (struct target_ops) <supports_fork_events>:
4704 New member.
4705 <supports_vfork_events>: New member.
4706 (target_supports_fork_events): New macro.
4707 (target_supports_vfork_events): New macro.
4708 * win32-low.c (win32_target_ops): Initialize new structure
4709 members.
4710
835205d0
GB
47112015-05-12 Gary Benson <gbenson@redhat.com>
4712
4713 * server.c (handle_qxfer_exec_file): Use current process
4714 if annex is empty.
4715
21e94bd9
SL
47162015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4717
4718 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4719 Remove HAVE_PTRACE_GETREGS conditionals.
4720 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4721 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4722
45614f15
YQ
47232015-05-08 Yao Qi <yao.qi@linaro.org>
4724
4725 * linux-low.c (linux_supports_conditional_breakpoints): New
4726 function.
4727 (linux_target_ops): Install new target method.
4728 * lynx-low.c (lynx_target_ops): Install NULL hook for
4729 supports_conditional_breakpoints.
4730 * nto-low.c (nto_target_ops): Likewise.
4731 * spu-low.c (spu_target_ops): Likewise.
4732 * win32-low.c (win32_target_ops): Likewise.
4733 * server.c (handle_query): Check
4734 target_supports_conditional_breakpoints.
4735 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4736 New field.
4737 (target_supports_conditional_breakpoints): New macro.
4738
80ad801e
PA
47392015-05-06 Pedro Alves <palves@redhat.com>
4740
4741 PR server/18081
4742 * server.c (start_inferior): If the process exits, mourn it.
4743
819843c7
GB
47442015-04-21 Gary Benson <gbenson@redhat.com>
4745
4746 * hostio.c (fileio_open_flags_to_host): Factored out to
4747 fileio_to_host_openflags in common/fileio.c. Single use
4748 updated.
4749
a2d5a9d7
MF
47502015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4751
4752 * linux-xtensa-low.c (xtensa_fill_gregset)
4753 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4754 XCHAL_HAVE_LOOP.
4755
deb44829
MF
47562015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4757
4758 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4759 (regs_info): Replace usrregs pointer with NULL.
4760
e57f1de3
GB
47612015-04-17 Gary Benson <gbenson@redhat.com>
4762
4763 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4764 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4765 * server.c (handle_qxfer_exec_file): New function.
4766 (qxfer_packets): Add exec-file entry.
4767 (handle_query): Report qXfer:exec-file:read as supported packet.
4768
62828379
RN
47692015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4770
4771 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4772
b88bb450
GB
47732015-04-09 Gary Benson <gbenson@redhat.com>
4774
4775 * hostio-errno.c (errno_to_fileio_error): Remove function.
4776 Update caller to use remote_fileio_to_fio_error.
4777
c8f4bfdd
YQ
47782015-04-09 Yao Qi <yao.qi@linaro.org>
4779
4780 * linux-low.c (linux_insert_point): Call
4781 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4782 (linux_remove_point): Call remove_memory_breakpoint if type is
4783 raw_bkpt_type_sw.
4784 * linux-x86-low.c (x86_insert_point): Don't call
4785 insert_memory_breakpoint.
4786 (x86_remove_point): Don't call remove_memory_breakpoint.
4787
41f98f02
PA
47882015-04-01 Pedro Alves <palves@redhat.com>
4789 Cleber Rosa <crosa@redhat.com>
4790
4791 * server.c (gdbserver_usage): Reorganize and extend the usage
4792 message.
4793
2bf6fb9d
PA
47942015-03-24 Pedro Alves <palves@redhat.com>
4795
4796 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4797 output. Also dump TRAP_TRACE.
4798 (linux_low_filter_event): In debug output, distinguish a
4799 resume_stop SIGSTOP from a delayed SIGSTOP.
4800
369f6daa
GB
48012015-03-24 Gary Benson <gbenson@redhat.com>
4802
4803 * linux-x86-low.c (x86_linux_new_thread): Moved to
4804 nat/x86-linux.c.
4805 (x86_linux_prepare_to_resume): Likewise.
4806
8e5d4070
GB
48072015-03-24 Gary Benson <gbenson@redhat.com>
4808
4809 * Makefile.in (x86-linux-dregs.o): New rule.
4810 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4811 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4812 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4813 (x86_linux_dr_get): Likewise.
4814 (x86_linux_dr_set): Likewise.
4815 (update_debug_registers_callback): Likewise.
4816 (x86_linux_dr_set_addr): Likewise.
4817 (x86_linux_dr_get_addr): Likewise.
4818 (x86_linux_dr_set_control): Likewise.
4819 (x86_linux_dr_get_control): Likewise.
4820 (x86_linux_dr_get_status): Likewise.
4821 (x86_linux_update_debug_registers): Likewise.
4822
2b95d440
GB
48232015-03-24 Gary Benson <gbenson@redhat.com>
4824
4825 * linux-x86-low.c (x86_linux_update_debug_registers):
4826 New function, factored out from...
4827 (x86_linux_prepare_to_resume): ...this.
4828
14b0bc68
GB
48292015-03-24 Gary Benson <gbenson@redhat.com>
4830
4831 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4832 (x86_linux_dr_set): Likewise.
4833 (update_debug_registers_callback): Likewise.
4834 (x86_linux_dr_set_addr): Likewise.
4835 (x86_linux_dr_get_addr): Likewise.
4836 (x86_linux_dr_set_control): Likewise.
4837 (x86_linux_dr_get_control): Likewise.
4838 (x86_linux_dr_get_status): Likewise.
4839 (x86_linux_prepare_to_resume): Likewise.
4840
5dfe6ca8
GB
48412015-03-24 Gary Benson <gbenson@redhat.com>
4842
4843 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4844 Use perror_with_name. Pass string through gettext.
4845 (x86_linux_dr_set): Likewise.
4846
d33472ad
GB
48472015-03-24 Gary Benson <gbenson@redhat.com>
4848
4849 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4850 (x86_linux_dr_set_addr): ...this.
4851 (x86_dr_low_get_addr): Rename to...
4852 (x86_linux_dr_get_addr): ...this.
4853 (x86_dr_low_set_control): Rename to...
4854 (x86_linux_dr_set_control): ...this.
4855 (x86_dr_low_get_control): Rename to...
4856 (x86_linux_dr_get_control): ...this.
4857 (x86_dr_low_get_status): Rename to...
4858 (x86_linux_dr_get_status): ...this.
4859 (x86_dr_low): Update with new function names.
4860
4b134ca1
GB
48612015-03-24 Gary Benson <gbenson@redhat.com>
4862
4863 * Makefile.in (x86-linux.o): New rule.
4864 * configure.srv: Add x86-linux.o to relevant targets.
4865 * linux-low.c (lwp_set_arch_private_info): New function.
4866 (lwp_arch_private_info): Likewise.
4867 * linux-x86-low.c: Include nat/x86-linux.h.
4868 (arch_lwp_info): Removed structure.
4869 (update_debug_registers_callback):
4870 Use lwp_set_debug_registers_changed.
4871 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4872 and lwp_set_debug_registers_changed.
4873 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4874
34c703da
GB
48752015-03-24 Gary Benson <gbenson@redhat.com>
4876
4877 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4878 * linux-arm-low.c (arm_new_thread): Likewise.
4879 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4880 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4881 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4882 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4883
cff068da
GB
48842015-03-24 Gary Benson <gbenson@redhat.com>
4885
4886 * linux-low.c (ptid_of_lwp): New function.
4887 (lwp_is_stopped): Likewise.
4888 (lwp_stop_reason): Likewise.
4889 * linux-x86-low.c (update_debug_registers_callback):
4890 Use lwp_is_stopped.
4891 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4892 lwp_stop_reason.
4893
b2f7c7e8
GB
48942015-03-24 Gary Benson <gbenson@redhat.com>
4895
4896 * linux-low.h (linux_stop_lwp): Remove declaration.
4897
6d4ee8c6
GB
48982015-03-24 Gary Benson <gbenson@redhat.com>
4899
4900 * linux-low.h: Include nat/linux-nat.h.
4901 * linux-low.c (iterate_over_lwps_args): New structure.
4902 (iterate_over_lwps_filter): New function.
4903 (iterate_over_lwps): Likewise.
4904 * linux-x86-low.c (update_debug_registers_callback):
4905 Update signature to what iterate_over_lwps expects.
4906 Remove PID check that iterate_over_lwps now performs.
4907 (x86_dr_low_set_addr): Use iterate_over_lwps.
4908 (x86_dr_low_set_control): Likewise.
4909
70a0bb6b
GB
49102015-03-24 Gary Benson <gbenson@redhat.com>
4911
4912 * linux-x86-low.c (x86_debug_reg_state): New function.
4913 (x86_linux_prepare_to_resume): Use the above.
4914
7b669087
GB
49152015-03-24 Gary Benson <gbenson@redhat.com>
4916
4917 * linux-low.c (current_lwp_ptid): New function.
4918 * linux-x86-low.c: Include nat/linux-nat.h.
4919 (x86_dr_low_get_addr): Use current_lwp_ptid.
4920 (x86_dr_low_get_control): Likewise.
4921 (x86_dr_low_get_status): Likewise.
4922
eef49a3d
PA
49232015-03-20 Pedro Alves <palves@redhat.com>
4924
4925 * tracepoint.c (cmd_qtstatus): Make "str" const.
4926
b2333d22
PA
49272015-03-20 Pedro Alves <palves@redhat.com>
4928
4929 * server.c (handle_general_set): Make "req_str" const.
4930
23f238d3
PA
49312015-03-19 Pedro Alves <palves@redhat.com>
4932
4933 * linux-low.c (linux_resume_one_lwp): Rename to ...
4934 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4935 instead call perror_with_name.
4936 (check_ptrace_stopped_lwp_gone): New function.
4937 (linux_resume_one_lwp): Reimplement as wrapper around
4938 linux_resume_one_lwp_throw that swallows errors if the LWP is
4939 gone.
4940
91baf43f
PA
49412015-03-19 Pedro Alves <palves@redhat.com>
4942
4943 * linux-low.c (count_events_callback, select_event_lwp_callback):
4944 No longer check whether the thread has resume_stop as last resume
4945 kind.
4946
8bf3b159
PA
49472015-03-19 Pedro Alves <palves@redhat.com>
4948
4949 * linux-low.c (count_events_callback, select_event_lwp_callback):
4950 Use the lwp's status_pending_p field, not the thread's.
4951
b90fc188
PA
49522015-03-19 Pedro Alves <palves@redhat.com>
4953
4954 * linux-low.c (select_event_lwp_callback): Update comments to
4955 no longer mention SIGTRAP.
4956
464b0089
GB
49572015-03-18 Gary Benson <gbenson@redhat.com>
4958
4959 * server.c (handle_query): Do not report vFile:fstat as supported.
4960
aa9e327f
GB
49612015-03-11 Gary Benson <gbenson@redhat.com>
4962
4963 * hostio.c (sys/types.h): New include.
4964 (sys/stat.h): Likewise.
4965 (common-remote-fileio.h): Likewise.
4966 (handle_fstat): New function.
4967 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 4968
791c0056
GB
49692015-03-11 Gary Benson <gbenson@redhat.com>
4970
4971 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4972 struct stat.st_blocks and struct stat.st_blksize.
4973 * configure: Regenerate.
4974 * config.in: Likewise.
4975 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4976 (OBS): Add common-remote-fileio.o.
4977 (common-remote-fileio.o): New rule.
4978
9a9df970
PA
49792015-03-09 Pedro Alves <palves@redhat.com>
4980
4981 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4982 'struct sockaddr' pointer in 'accept' call.
4983
9eb1356e
PA
49842015-03-09 Pedro Alves <palves@redhat.com>
4985
4986 Revert:
4987 2015-03-07 Pedro Alves <palves@redhat.com>
4988 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4989 or <winsock2.h> here. Instead include "gdb_socket.h".
4990 (remote_open): Use union gdb_sockaddr_u.
4991 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4992 or <winsock2.h> here. Instead include "gdb_socket.h".
4993 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4994 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4995 or <sys/un.h>.
4996 (init_named_socket, gdb_agent_helper_thread): Use union
4997 gdb_sockaddr_u.
4998
aac331e4
PA
49992015-03-07 Pedro Alves <palves@redhat.com>
5000
5001 * configure.ac (build_warnings): Move
5002 -Wdeclaration-after-statement to the C-specific set.
5003 * configure: Regenerate.
5004
366c75fc
PA
50052015-03-07 Pedro Alves <palves@redhat.com>
5006
5007 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5008 or <winsock2.h> here. Instead include "gdb_socket.h".
5009 (remote_open): Use union gdb_sockaddr_u.
5010 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5011 or <winsock2.h> here. Instead include "gdb_socket.h".
5012 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5013 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5014 or <sys/un.h>.
5015 (init_named_socket, gdb_agent_helper_thread): Use union
5016 gdb_sockaddr_u.
5017
492d29ea
PA
50182015-03-07 Pedro Alves <palves@redhat.com>
5019
5020 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5021 instead.
5022
60a191ed
YQ
50232015-03-06 Yao Qi <yao.qi@linaro.org>
5024
5025 * linux-aarch64-low.c (aarch64_insert_point): Use
5026 show_debug_regs as a boolean.
5027 (aarch64_remove_point): Likewise.
5028
f5771b1d
PA
50292015-03-05 Pedro Alves <palves@redhat.com>
5030
5031 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5032 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5033 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5034 * nto-low.c (nto_target_ops): Likewise.
5035 * spu-low.c (spu_target_ops): Likewise.
5036 * win32-low.c (win32_target_ops): Likewise.
5037
3e572f71
PA
50382015-03-04 Pedro Alves <palves@redhat.com>
5039
72f4393d 5040 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
5041 Decide whether a breakpoint triggered based on the SIGTRAP's
5042 siginfo.si_code.
72f4393d
L
5043 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5044 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
5045 (linux_low_filter_event): Check for breakpoints before checking
5046 watchpoints.
5047 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5048 siginfo.si_code.
72f4393d
L
5049 (linux_stopped_by_sw_breakpoint)
5050 (linux_supports_stopped_by_sw_breakpoint)
5051 (linux_stopped_by_hw_breakpoint)
5052 (linux_supports_stopped_by_hw_breakpoint): New functions.
5053 (linux_target_ops): Install new target methods.
3e572f71 5054
1ec68e26
PA
50552015-03-04 Pedro Alves <palves@redhat.com>
5056
5057 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5058 * server.c (swbreak_feature, hwbreak_feature): New globals.
5059 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5060 (captured_main): Clear swbreak_feature and hwbreak_feature.
5061 * server.h (swbreak_feature, hwbreak_feature): Declare.
5062 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5063 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5064 supports_stopped_by_hw_breakpoint>: New fields.
5065 (target_supports_stopped_by_sw_breakpoint)
5066 (target_stopped_by_sw_breakpoint)
5067 (target_supports_stopped_by_hw_breakpoint)
5068 (target_stopped_by_hw_breakpoint): Declare.
5069
15c66dd6
PA
50702015-03-04 Pedro Alves <palves@redhat.com>
5071
5072 enum lwp_stop_reason -> enum target_stop_reason
5073 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5074 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5075 (linux_wait_1, stuck_in_jump_pad_callback)
5076 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5077 (linux_stopped_by_watchpoint):
5078 * linux-low.h (enum lwp_stop_reason): Delete.
5079 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5080 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5081
98fc70d6
YQ
50822015-03-04 Yao Qi <yao.qi@linaro.org>
5083
5084 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5085
dd2ac174
GB
50862015-03-03 Gary Benson <gbenson@redhat.com>
5087
5088 * hostio.c (handle_vFile): Fix prefix lengths.
5089
d68e53f4
MM
50902015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5091
5092 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5093 ptr_bits.
5094
bf2d68ab
AA
50952015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5096
5097 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5098 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5099 (clean): Add "rm -f" for above C files.
5100 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5101 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5102 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5103 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5104 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5105 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5106 (init_registers_s390x_vx_linux64)
5107 (init_registers_s390x_tevx_linux64)
5108 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5109 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5110 declarations.
5111 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5112 (s390_store_vxrs_high): New functions.
5113 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5114 NT_S390_VXRS_HIGH.
5115 (s390_arch_setup): Add logic for selecting one of the new target
5116 descriptions. Activate the new vector regsets if applicable.
5117 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5118 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5119 and init_registers_s390x_tevx_linux64.
5120
c966a859
PA
51212015-03-01 Pedro Alves <palves@redhat.com>
5122
5123 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5124 parameter.
5125
4180215b
PA
51262015-02-27 Pedro Alves <palves@redhat.com>
5127
5128 * linux-x86-low.c (u_debugreg_offset): New function.
5129 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5130
749bab01
PA
51312015-02-27 Pedro Alves <palves@redhat.com>
5132
5133 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5134 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5135 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5136 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5137 (ps_lsetfpregs, ps_getpid)
5138 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5139 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5140 (ps_lsetxregs, ps_plog): Declare.
5141
3c14e5a3
PA
51422015-02-27 Pedro Alves <palves@redhat.com>
5143
5144 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5145 IP_AGENT_EXPORT_FUNC.
5146 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5147 IP_AGENT_EXPORT_FUNC.
5148 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5149 (IP_AGENT_EXPORT): Delete.
5150 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5151 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5152 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5153 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5154 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5155 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5156 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5157 (traceframe_read_count, traceframe_write_count)
5158 (traceframes_created, trace_state_variables, get_raw_reg)
5159 (get_trace_state_variable_value, set_trace_state_variable_value)
5160 (ust_loaded, helper_thread_id, cmd_buf): Use
5161 IPA_SYM_EXPORTED_NAME.
5162 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5163 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5164 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5165 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5166 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5167 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5168 EXTERN_C_PUSH/EXTERN_C_POP.
5169 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5170 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5171 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5172 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5173 (traceframe_write_count, traceframe_read_count)
5174 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5175 (about_to_request_buffer_space, get_trace_state_variable_value)
5176 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5177 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5178 EXTERN_C_PUSH/EXTERN_C_POP.
5179 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5180 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5181 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5182 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5183 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5184 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5185 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5186 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5187 Define.
5188 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5189 (IP_AGENT_EXPORT_VAR_DECL): Define.
5190 (tracing): Declare.
5191 (gdb_agent_get_raw_reg): Declare.
5192
fe978cb0
PA
51932015-02-27 Tom Tromey <tromey@redhat.com>
5194 Pedro Alves <palves@redhat.com>
5195
5196 Rename symbols whose names are reserved C++ keywords throughout.
5197
3bc3d82a
PA
51982015-02-27 Pedro Alves <palves@redhat.com>
5199
5200 * Makefile.in (COMPILER): New, get it from autoconf.
5201 (CXX): Get from autoconf instead.
5202 (COMPILE.pre): Use COMPILER.
5203 (CC-LD): Rename to ...
5204 (CC_LD): ... this. Use COMPILER.
5205 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5206 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5207 * acinclude.m4: Include build-with-cxx.m4.
5208 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5209 Disable -Werror by default if building in C++ mode.
5210 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5211 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5212 the C++ compiler. Save/restore CXXFLAGS too.
5213 * configure: Regenerate.
5214
07697489
PA
52152015-02-27 Pedro Alves <palves@redhat.com>
5216
5217 * acinclude.m4: Include libiberty.m4.
5218 * configure.ac: Call libiberty_INIT.
5219 * config.in, configure: Regenerate.
5220
9beb7c4e
PA
52212015-02-26 Pedro Alves <palves@redhat.com>
5222
5223 * linux-low.c (linux_wait_1): When incrementing the PC past a
5224 program breakpoint always use the_low_target.breakpoint_len as
5225 increment, rather than the maximum between that and
5226 the_low_target.decr_pc_after_break.
5227
8090aef2
PA
52282015-02-23 Pedro Alves <palves@redhat.com>
5229
5230 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5231 thread was doing a step-over; always adjust the PC if
5232 we stepped over a permanent breakpoint.
5233 (linux_wait_1): If we stepped over breakpoint that was on top of a
5234 permanent breakpoint, manually advance the PC past it.
5235
bc9540e8
PA
52362015-02-23 Pedro Alves <palves@redhat.com>
5237
5238 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5239 modes.
5240 (x86_fill_gregset, x86_store_gregset): Use it when handling
5241 $orig_eax.
5242
2db9a427
PA
52432015-02-20 Pedro Alves <palves@redhat.com>
5244
5245 * thread-db.c: Include "nat/linux-procfs.h".
5246 (thread_db_init): Skip listing new threads if the kernel supports
5247 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5248
afa8d396
PA
52492015-02-20 Pedro Alves <palves@redhat.com>
5250
5251 * linux-low.c (status_pending_p_callback): Use ptid_match.
5252
c9587f88
AT
52532015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5254
5255 PR breakpoints/16812
5256 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5257 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5258 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5259
b05ec7a5
AT
52602015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5261
5262 PR breakpoints/15956
5263 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5264
d33501a5
MM
52652015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5266
5267 * linux-low.c (linux_low_btrace_conf): Print size.
5268 * server.c (handle_btrace_conf_general_set): New.
5269 (hanle_general_set): Call handle_btrace_conf_general_set.
5270 (handle_query): Report Qbtrace-conf:bts:size as supported.
5271
f4abbc16
MM
52722015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5273
5274 * linux-low.c (linux_low_enable_btrace): Update parameters.
5275 (linux_low_btrace_conf): New.
5276 (linux_target_ops)<to_btrace_conf>: Initialize.
5277 * server.c (current_btrace_conf): New.
5278 (handle_btrace_enable): Rename to ...
5279 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5280 to target_enable_btrace. Update comment. Update users.
5281 (handle_qxfer_btrace_conf): New.
5282 (qxfer_packets): Add btrace-conf entry.
5283 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5284 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5285 (target_ops)<read_btrace_conf>: New.
5286 (target_enable_btrace): Update parameters.
5287 (target_read_btrace_conf): New.
5288
043c3577
MM
52892015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5290
5291 * server.c (handle_btrace_general_set): Remove call to
5292 target_supports_btrace.
5293 (supported_btrace_packets): New.
5294 (handle_query): Call supported_btrace_packets.
5295 * target.h: include btrace-common.h.
5296 (btrace_target_info): Removed.
5297 (supports_btrace, target_supports_btrace): Update parameters.
5298
734b0e4b
MM
52992015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5300
5301 * Makefile.in (SFILES): Add common/btrace-common.c.
5302 (OBS): Add common/btrace-common.o.
5303 (btrace-common.o): Add build rules.
5304 * linux-low: Include btrace-common.h.
5305 (linux_low_read_btrace): Use struct btrace_data. Call
5306 btrace_data_init and btrace_data_fini.
5307
d6c146e9
PA
53082015-02-06 Pedro Alves <palves@redhat.com>
5309
5310 * thread-db.c (find_new_threads_callback): Add debug output.
5311
20ba1ce6
PA
53122015-02-04 Pedro Alves <palves@redhat.com>
5313
5314 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5315 (resume_stopped_resumed_lwps): New function.
5316 (linux_wait_for_event_filtered): Use it.
5317
8cc73a39
SDJ
53182015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5319
5320 * Makefile.in (SFILES): Add linux-personality.c.
5321 (linux-personality.o): New rule.
5322 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5323 list of objects to be built.
5324 * linux-low.c: Include nat/linux-personality.h.
5325 (linux_create_inferior): Remove code to disable address space
5326 randomization (moved to ../nat/linux-personality.c). Create
5327 cleanup to disable address space randomization.
5328
fb23d554
SDJ
53292015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5330
5331 * Makefile.in (posix-strerror.o): New rule.
5332 (mingw-strerror.o): Likewise.
5333 * configure: Regenerated.
5334 * configure.ac: Source file ../common/common.host. Initialize new
5335 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5336
cdf43629
YQ
53372015-01-14 Yao Qi <yao@codesourcery.com>
5338
5339 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5340 (ppc-linux.o): New rule.
5341 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5342 * configure.ac: AC_CHECK_FUNCS(getauxval).
5343 * config.in: Re-generated.
5344 * configure: Re-generated.
5345 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5346 ppc64_64bit_inferior_p
5347
514c5338
YQ
53482015-01-14 Yao Qi <yao@codesourcery.com>
5349
5350 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5351 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5352 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5353 (PT_ORIG_R3, PT_TRAP): Likewise.
5354 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5355 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5356 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5357
3368c1e5
JB
53582015-01-10 Joel Brobecker <brobecker@adacore.com>
5359
5360 * i387-fp.c (i387_cache_to_xsave): In look over
5361 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5362 zmmh_low_space field by use of zmmh_high_space.
5363
582511be
PA
53642015-01-09 Pedro Alves <palves@redhat.com>
5365
5366 * linux-low.c (step_over_bkpt): Move higher up in the file.
5367 (handle_extended_wait): Don't store the stop_pc here.
5368 (get_stop_pc): Adjust comments and rename to ...
5369 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5370 stopped for a software breakpoint or hardware breakpoint.
5371 (thread_still_has_status_pending_p): New function.
5372 (status_pending_p_callback): Use
5373 thread_still_has_status_pending_p. If the event is no longer
5374 interesting, resume the LWP.
5375 (handle_tracepoints): Add assert.
5376 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5377 (wstatus_maybe_breakpoint): New function.
5378 (cancel_breakpoint): Delete function.
5379 (check_stopped_by_watchpoint): New function, factored out from
5380 linux_low_filter_event.
5381 (lp_status_maybe_breakpoint): Delete function.
5382 (linux_low_filter_event): Remove filter_ptid argument.
5383 Leave thread group exits pending here. Store the LWP's stop PC.
5384 Always leave events pending.
5385 (linux_wait_for_event_filtered): Pull all events out of the
5386 kernel, and leave them all pending.
5387 (count_events_callback, select_event_lwp_callback): Consider all
5388 events.
5389 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5390 (select_event_lwp): Only give preference to the stepping LWP in
5391 all-stop mode. Adjust comments.
5392 (ignore_event): New function.
5393 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5394 references to cancel_breakpoints. Adjust to renames. Also give
5395 equal priority to all LWPs that have had events in non-stop mode.
5396 If reporting a software breakpoint event, unadjust the LWP's PC.
5397 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5398 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5399 Adjust.
5400 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5401 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5402 (linux_stopped_by_watchpoint): Adjust.
5403 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5404 * linux-low.h (enum lwp_stop_reason): New.
5405 (struct lwp_info) <stop_pc>: Adjust comment.
5406 <stopped_by_watchpoint>: Delete field.
5407 <stop_reason>: New field.
5408 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5409 * mem-break.c (software_breakpoint_inserted_here)
5410 (hardware_breakpoint_inserted_here): New function.
5411 * mem-break.h (software_breakpoint_inserted_here)
5412 (hardware_breakpoint_inserted_here): Declare.
5413 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5414 (cancel_breakpoints): Delete.
5415 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5416 (upload_fast_traceframes): Remove references to
5417 cancel_breakpoints.
5418
a33e3959
PA
54192015-01-09 Pedro Alves <palves@redhat.com>
5420
5421 * thread-db.c (find_new_threads_callback): Ignore thread if the
5422 kernel thread ID is -1.
5423
8784d563
PA
54242015-01-09 Pedro Alves <palves@redhat.com>
5425
5426 * linux-low.c (linux_attach_fail_reason_string): Move to
5427 nat/linux-ptrace.c, and rename.
5428 (linux_attach_lwp): Update comment.
5429 (attach_proc_task_lwp_callback): New function.
5430 (linux_attach): Adjust to rename and use
5431 linux_proc_attach_tgid_threads.
5432 (linux_attach_fail_reason_string): Delete declaration.
5433
76f2b779
JB
54342015-01-01 Joel Brobecker <brobecker@adacore.com>
5435
5436 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5437 * server.c (gdbserver_version): Likewise.
5438
fafcc06a
SDJ
54392014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5440
5441 * remote-utils.c: Include ctype.h.
5442 (input_interrupt): Explicitly handle the case when the char
5443 received is the NUL byte. Improve the printing of non-ASCII
5444 characters.
5445
beed38b8
JB
54462014-12-16 Joel Brobecker <brobecker@adacore.com>
5447
5448 * linux-low.c (linux_low_filter_event): Update call to
5449 linux_enable_event_reporting following the addition of
5450 a new parameter to that function.
5451
bf330350
CU
54522014-12-16 Catalin Udma <catalin.udma@freescale.com>
5453
5454 PR server/17457
5455 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5456 (AARCH64_FPCR_REGNO): Likewise.
5457 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5458 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5459 (aarch64_store_fpregset): Likewise.
5460
5227d625
JB
54612014-12-15 Joel Brobecker <brobecker@adacore.com>
5462
5463 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5464 Remove FIXME comment about assumption about N.
5465
f93b65a0
JB
54662014-12-13 Joel Brobecker <brobecker@adacore.com>
5467
5468 * configure.ac: If large-file support is disabled in GDBserver,
5469 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5470 * configure: Regenerate.
5471
e5a9158d
AA
54722014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5473
5474 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5475 warning upon ENODATA from ptrace.
5476 * linux-s390-low.c (s390_store_tdb): New.
5477 (s390_regsets): Add regset for NT_S390_TDB.
5478
feea5f36
AA
54792014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5480
5481 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5482 without a fill_function.
5483 * linux-s390-low.c (s390_fill_last_break): Remove.
5484 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5485 (s390_arch_setup): Use regset's size instead of fill_function for
5486 loop end condition.
5487
098dbe61
AA
54882014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5489
5490 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5491 the regset's store function when ptrace returned an error.
5492 * regcache.c (get_thread_regcache): Invalidate register cache
5493 before fetching inferior's registers.
5494
28eef672
AA
54952014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5496
5497 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5498 while-loop as for-loop.
5499 (regsets_store_inferior_registers): Likewise.
5500
bdca27a2
YQ
55012014-11-28 Yao Qi <yao@codesourcery.com>
5502
5503 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5504 * config.in, configure: Re-generate.
5505 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5506 is defined.
5507
9c232dda
YQ
55082014-11-21 Yao Qi <yao@codesourcery.com>
5509
5510 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5511 (AC_CHECK_HEADERS): Remove malloc.h.
5512 * configure: Re-generated.
5513 * config.in: Re-generated.
5514 * server.h: Don't include alloca.h and malloc.h.
5515 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5516 Don't include malloc.h.
5517
43968415
JB
55182014-11-17 Joel Brobecker <brobecker@adacore.com>
5519
5520 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5521 corresponding ERRNO check in same block.
5522
40e91bc7
PA
55232014-11-12 Pedro Alves <palves@redhat.com>
5524
5525 * server.c (cont_thread): Update comment.
5526 (start_inferior, attach_inferior): No longer clear cont_thread.
5527 (handle_v_cont): No longer set cont_thread.
5528 (captured_main): Clear cont_thread each time a GDB connects.
5529
c2c118cf
PA
55302014-11-12 Pedro Alves <palves@redhat.com>
5531
5532 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5533 thread, and don't resume all threads if the Hc thread has exited.
5534
78708b7c
PA
55352014-11-12 Pedro Alves <palves@redhat.com>
5536
5537 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5538 the process group instead of to a specific LWP.
5539
a2abc7de
PA
55402014-10-15 Pedro Alves <palves@redhat.com>
5541
5542 PR server/17487
5543 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5544 parameter.
5545 (arm_set_thread_context): Delete.
5546 (the_low_target): Adjust.
5547 * win32-i386-low.c (debug_registers_changed)
5548 (debug_registers_used): Delete.
5549 (update_debug_registers_callback): New function.
5550 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5551 needing to update their debug registers.
5552 (win32_get_current_dr): New function.
5553 (x86_dr_low_get_addr, x86_dr_low_get_control)
5554 (x86_dr_low_get_status): Fetch the debug register from the thread
5555 record's context.
5556 (i386_initial_stuff): Adjust.
5557 (i386_get_thread_context): Remove current_event parameter. Don't
5558 clear debug_registers_changed nor copy DR values to
5559 debug_reg_state.
5560 (i386_set_thread_context): Delete.
5561 (i386_prepare_to_resume): New function.
5562 (i386_thread_added): Mark the thread as needing to update irs
5563 debug registers.
5564 (the_low_target): Remove i386_set_thread_context and install
5565 i386_prepare_to_resume.
5566 * win32-low.c (win32_get_thread_context): Adjust.
5567 (win32_set_thread_context): Use SetThreadContext
5568 directly.
5569 (win32_prepare_to_resume): New function.
5570 (win32_require_context): New function, factored out from ...
5571 (thread_rec): ... this.
5572 (continue_one_thread): Call win32_prepare_to_resume on each thread
5573 we're about to continue.
5574 (win32_resume): Call win32_prepare_to_resume on the event thread.
5575 * win32-low.h (struct win32_thread_info)
5576 <debug_registers_changed>: New field.
5577 (struct win32_target_ops): Change prototype of set_thread_context,
5578 delete set_thread_context and add prepare_to_resume.
5579 (win32_require_context): New declaration.
5580
a442d071
GB
55812014-10-08 Gary Benson <gbenson@redhat.com>
5582
5583 * server.h: Do not include common-exceptions.h.
5584
6f1947e8
GB
55852014-10-08 Gary Benson <gbenson@redhat.com>
5586
5587 * server.h: Do not include cleanups.h.
5588
63b434a4
JH
55892014-09-30 James Hogan <james.hogan@imgtec.com>
5590
5591 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5592 mips64-dsp-linux.c.
5593
c4d9ceb6
YQ
55942014-09-23 Yao Qi <yao@codesourcery.com>
5595
5596 * linux-low.c (lp_status_maybe_breakpoint): New function.
5597 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5598 (count_events_callback): Likewise.
5599 (select_event_lwp_callback): Likewise.
5600 (cancel_breakpoints_callback): Likewise.
5601
89a5711c
DB
56022014-09-19 Don Breazeal <donb@codesourcery.com>
5603
5604 * linux-low.c (handle_extended_wait): Call
5605 linux_ptrace_get_extended_event.
5606 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5607 linux_is_extended_waitstatus.
5608
bffc0964
JB
56092014-09-16 Joel Brobecker <brobecker@adacore.com>
5610
5611 * Makefile.in (CPPFLAGS): Define.
5612 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5613 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5614
0bfdf32f
GB
56152014-09-16 Gary Benson <gbenson@redhat.com>
5616
5617 * inferiors.h (current_inferior): Renamed as...
5618 (current_thread): New variable. All uses updated.
5619 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5620 (maybe_move_out_of_jump_pad): Likewise.
5621 (cancel_breakpoint): Likewise.
5622 (linux_low_filter_event): Likewise.
5623 (wait_for_sigstop): Likewise.
5624 (linux_resume_one_lwp): Likewise.
5625 (need_step_over_p): Likewise.
5626 (start_step_over): Likewise.
5627 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5628 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5629 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5630 and save_inferior as saved_thread.
5631 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5632 saved_thread.
5633 (regcache_invalidate_thread): Likewise.
5634 * remote-utils.c (prepare_resume_reply): Likewise.
5635 * thread-db.c (thread_db_get_tls_address): Likewise.
5636 (disable_thread_event_reporting): Likewise.
5637 (remove_thread_event_breakpoints): Likewise.
5638 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5639 as saved_thread.
5640 * target.h (set_desired_inferior): Renamed as...
5641 (set_desired_thread): New declaration. All uses updated.
5642 * server.c (myresume): Updated comment to reference thread instead
5643 of inferior.
5644 (handle_serial_event): Likewise.
5645 (handle_target_event): Likewise.
5646
361c8ade
GB
56472014-09-12 Tom Tromey <tromey@redhat.com>
5648 Gary Benson <gbenson@redhat.com>
5649
5650 * regcache.h: Include common-regcache.h.
5651 (regcache_read_pc): Don't declare.
5652 * regcache.c (get_thread_regcache_for_ptid): New function.
5653
bd9269f7
GB
56542014-09-11 Tom Tromey <tromey@redhat.com>
5655 Gary Benson <gbenson@redhat.com>
5656
5657 * symbol.c: New file.
5658 * Makefile.in (SFILES): Add symbol.c.
5659 (OBS): Add symbol.o.
5660
f8c1d06b
GB
56612014-09-11 Gary Benson <gbenson@redhat.com>
5662
5663 * target.c (target_stop_ptid, target_continue_ptid): New
5664 functions.
5665
721ec300
GB
56662014-09-11 Tom Tromey <tromey@redhat.com>
5667 Gary Benson <gbenson@redhat.com>
5668
5669 * target.h: Include target/target.h.
5670 * target.c (target_read_memory, target_read_uint32)
5671 (target_write_memory): New functions.
5672
c5e92cca
GB
56732014-09-11 Gary Benson <gbenson@redhat.com>
5674
5675 * server.h (debug_hw_points): Don't declare.
5676 * server.c (debug_hw_points): Don't define. Replace all uses
5677 with show_debug_regs.
5678 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5679 all uses with show_debug_regs.
5680
2e4bb98a
EBM
56812014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5682
5683 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5684 endianness into account.
5685 (ppc_supply_ptrace_register): Likewise.
5686
ac740bc7
JH
56872014-09-03 James Hogan <james.hogan@imgtec.com>
5688
5689 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5690 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5691
97ea6506
GB
56922014-09-03 Gary Benson <gbenson@redhat.com>
5693
5694 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5695 ALL_DEBUG_ADDRESS_REGISTERS.
5696
df7e5265
GB
56972014-09-02 Gary Benson <gbenson@redhat.com>
5698
5699 * i386-low.h: Renamed as...
5700 * x86-low.h: New file. All type, function and variable name
5701 prefixes changed from "i386_" to "x86_". All references updated.
5702 * i386-low.c: Renamed as...
5703 * x86-low.c: New file. All type, function and variable name
5704 prefixes changed from "i386_" to "x86_". All references updated.
5705
ed859da7
GB
57062014-09-02 Gary Benson <gbenson@redhat.com>
5707
5708 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5709 (x86_linux_new_thread): Likewise.
5710
860789c7
GB
57112014-08-29 Gary Benson <gbenson@redhat.com>
5712
5713 * server.h (setjmp.h): Do not include.
5714 (toplevel): Do not declare.
5715 (common-exceptions.h): Include.
5716 (cleanups.h): Likewise.
5717 * server.c (toplevel): Do not define.
5718 (exit_code): New static global.
5719 (detach_or_kill_for_exit_cleanup): New function.
5720 (main): New function. Original main renamed to...
5721 (captured_main): New function.
5722 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5723
ff55e1b5
GB
57242014-08-29 Gary Benson <gbenson@redhat.com>
5725
5726 * Makefile.in (SFILES): Add common/common-exceptions.c.
5727 (OBS): Add common-exceptions.o.
5728 (common-exceptions.o): New rule.
5729 * utils.c (prepare_to_throw_exception): New function.
5730
e9bcb658
GB
57312014-08-29 Gary Benson <gbenson@redhat.com>
5732
5733 * config.in: Regenerate.
5734 * configure: Likewise.
5735
e3180625
GB
57362014-08-29 Gary Benson <gbenson@redhat.com>
5737
5738 * Makefile.in (SFILES): Add common/cleanups.c.
5739 (OBS): cleanups.o.
5740 (cleanups.o): New rule.
5741
e3d6ba5d
GB
57422014-08-29 Gary Benson <gbenson@redhat.com>
5743
5744 * utils.c (internal_vwarning): New function.
5745
7096e886
GB
57462014-08-28 Gary Benson <gbenson@redhat.com>
5747
5748 * utils.h (fatal): Remove declaration.
5749 * utils.c (fatal): Remove function.
5750
14ce3192
GB
57512014-08-28 Gary Benson <gbenson@redhat.com>
5752
5753 * tracepoint.c (gdb_agent_init): Replace fatal with
5754 perror_with_name.
5755 (initialize_tracepoint): Likewise.
5756
50278d59
GB
57572014-08-28 Gary Benson <gbenson@redhat.com>
5758
5759 * remote-utils.c (remote_prepare): Replace fatal with error.
5760
aa96c426
GB
57612014-08-28 Gary Benson <gbenson@redhat.com>
5762
5763 * linux-low.c (linux_async): Replace fatal with warning.
5764 Tidy up and return.
5765 (linux_start_non_stop): Return -1 if linux_async failed.
5766
f7160e97
GB
57672014-08-28 Gary Benson <gbenson@redhat.com>
5768
5769 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5770 gdb_assert.
5771 (i386_dr_low_get_addr): Remove vague comment.
5772 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5773 gdb_assert.
5774
38e08fca
GB
57752014-08-28 Gary Benson <gbenson@redhat.com>
5776
5777 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5778 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5779 internal_error.
5780 (linux_resume_one_lwp): Likewise.
5781 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5782 gdb_assert.
5783 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5784 with internal_error.
5785 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5786 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5787 (find_register_by_name): Replace fatal with internal_error.
5788 (find_regno): Likewise.
5789 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5790 * thread-db.c (thread_db_create_event): Likewise.
5791 (thread_db_load_search): Likewise.
5792 (try_thread_db_load_1): Likewise.
5793 * tracepoint.c (get_jump_space_head): Replace fatal with
5794 internal_error.
5795 (claim_trampoline_space): Likewise.
5796 (have_fast_tracepoint_trampoline_buffer): Likewise.
5797 (cmd_qtstart): Likewise.
5798 (stop_tracing): Likewise.
5799 (fast_tracepoint_collecting): Likewise.
5800 (target_malloc): Likewise.
5801 (download_tracepoint): Likewise.
5802 (download_trace_state_variables): Replace check with gdb_assert.
5803 (upload_fast_traceframes): Replace fatal with internal_error.
5804
34abf635
GB
58052014-08-19 Tom Tromey <tromey@redhat.com>
5806 Gary Benson <gbenson@redhat.com>
5807
5808 * Makefile.in (SFILES): Add common/common-debug.c.
5809 (OBS): Add common-debug.o.
5810 (common-debug.o): New rule.
5811 * debug.h (debug_printf): Don't declare.
5812 * debug.c (debug_printf): Renamed and rewritten as...
5813 (debug_vprintf): New function.
5814
f6e94d78
GB
58152014-08-19 Gary Benson <gbenson@redhat.com>
5816
5817 * utils.h: Do not include print-utils.h.
5818
9239eeab
GB
58192014-08-19 Tom Tromey <tromey@redhat.com>
5820 Gary Benson <gbenson@redhat.com>
5821
5822 * server.h: Add static assertion.
5823 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5824
ef87c8bb
GB
58252014-08-19 Tom Tromey <tromey@redhat.com>
5826 Gary Benson <gbenson@redhat.com>
5827
5828 * Makefile.in (SFILES): Add common/errors.c.
5829 (OBS): Add errors.o.
5830 (IPA_OBS): Add errors-ipa.o.
5831 (errors.o): New rule.
5832 (errors-ipa.o): Likewise.
5833 * utils.h (perror_with_name, error, warning): Don't declare.
5834 * utils.c (warning): Renamed and rewritten as...
5835 (vwarning): New function.
5836 (error): Renamed and rewritten as...
5837 (verror): New function.
5838 (internal_error): Renamed and rewritten as...
5839 (internal_verror): New function.
5840
bb974a24
GB
58412014-08-07 Gary Benson <gbenson@redhat.com>
5842
5843 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5844 * configure: Regenerate.
5845 * config.in: Likewise.
5846 * server.h: Do not include errno.h.
5847 * event-loop.c: Likewise.
5848 * hostio-errno.c: Likewise.
5849 * linux-low.c: Likewise.
5850 * remote-utils.c: Likewise.
5851 * spu-low.c: Likewise.
5852 * utils.c: Likewise.
5853 * gdbreplay.c: Unconditionally include errno.h.
5854
6d3d12eb
GB
58552014-08-07 Gary Benson <gbenson@redhat.com>
5856
5857 * server.h: Do not include string.h.
5858 * event-loop.c: Likewise.
5859 * linux-low.c: Likewise.
5860 * regcache.c: Likewise.
5861 * remote-utils.c: Likewise.
5862 * spu-low.c: Likewise.
5863 * utils.c: Likewise.
5864
dccbb609
GB
58652014-08-07 Gary Benson <gbenson@redhat.com>
5866
5867 * server.h: Do not include gdb_assert.h.
5868
e76df0d0
GB
58692014-08-07 Gary Benson <gbenson@redhat.com>
5870
5871 * server.h: Do not include common-utils.h.
5872
4cb9c816
GB
58732014-08-07 Gary Benson <gbenson@redhat.com>
5874
5875 * server.h: Do not include ptid.h.
5876 * notif.h: Likewise.
5877
3995eeee
GB
58782014-08-07 Gary Benson <gbenson@redhat.com>
5879
5880 * server.h: Do not include gdb_locale.h.
5881
cb9f1a9b
GB
58822014-08-07 Gary Benson <gbenson@redhat.com>
5883
5884 * server.h: Do not include gdb/signals.h.
5885 * win32-low.c: Likewise.
5886
a5fceff8
GB
58872014-08-07 Gary Benson <gbenson@redhat.com>
5888
5889 * server.h: Do not include pathmax.h.
5890
b9391142
GB
58912014-08-07 Gary Benson <gbenson@redhat.com>
5892
5893 * server.h: Do not include libiberty.h.
5894 * linux-bfin-low.c: Likewise.
5895
0e443c87
GB
58962014-08-07 Gary Benson <gbenson@redhat.com>
5897
5898 * server.h: Do not include ansidecl.h.
5899
8ebb3f56
GB
59002014-08-07 Gary Benson <gbenson@redhat.com>
5901
5902 * linux-x86-low.c: Do not include stddef.h.
5903 * lynx-ppc-low.c: Likewise.
5904 * tracepoint.c: Likewise.
5905
8980bdf6
GB
59062014-08-07 Gary Benson <gbenson@redhat.com>
5907
5908 * server.h: Do not include stdarg.h.
5909 * nto-low.c: Likewise.
5910
d7096f71
GB
59112014-08-07 Gary Benson <gbenson@redhat.com>
5912
5913 * server.h: Do not include stdlib.h.
5914 * inferiors.c: Likewise.
5915 * linux-low.c: Likewise.
5916 * regcache.c: Likewise.
5917 * spu-low.c: Likewise.
5918 * tracepoint.c: Likewise.
5919 * utils.c: Likewise.
5920
d02f550d
GB
59212014-08-07 Gary Benson <gbenson@redhat.com>
5922
5923 * server.h: Do not include stdio.h.
5924 * linux-low.c: Likewise.
5925 * remote-utils.c: Likewise.
5926 * spu-low.c: Likewise.
5927 * utils.c: Likewise.
5928 * wincecompat.c: Likewise.
5929
87f6c4e3
GB
59302014-08-06 Gary Benson <gbenson@redhat.com>
5931
5932 * regcache.c (init_register_cache): Move conditionals inside if.
5933
7089dca4
GB
59342014-08-06 Gary Benson <gbenson@redhat.com>
5935
5936 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5937
462f517e
GB
59382014-07-31 Gary Benson <gbenson@redhat.com>
5939
5940 * ax.h: Do not include server.h.
5941 * gdbthread.h: Likewise.
5942 * lynx-low.h: Likewise.
5943 * notif.h: Likewise.
5944
976411d6
GB
59452014-07-30 Gary Benson <gbenson@redhat.com>
5946
5947 * server.h: Include common-defs.h.
5948 Do not include config.h or build-gnulib-gdbserver/config.h.
5949
d41f6d8e
GB
59502014-07-30 Gary Benson <gbenson@redhat.com>
5951
5952 * hostio-errno.c: Move server.h to top of includes list.
5953 * inferiors.c: Likewise.
5954 * linux-x86-low.c: Likewise.
5955 * notif.c: Include server.h.
5956
314c6a35
TT
59572014-07-24 Tom Tromey <tromey@redhat.com>
5958 Gary Benson <gbenson@redhat.com>
5959
5960 * server.h (CORE_ADDR): Now unsigned.
5961
69ff6be5
PA
59622014-07-16 Pedro Alves <palves@redhat.com>
5963
5964 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5965
ce9e3fe7
PA
59662014-07-15 Pedro Alves <palves@redhat.com>
5967
5968 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5969 copy.
5970
e76126e8
PA
59712014-07-11 Pedro Alves <palves@redhat.com>
5972
5973 * linux-low.c (kill_wait_lwp): New function, based on
5974 kill_one_lwp_callback, but use my_waitpid directly.
5975 (kill_one_lwp_callback, linux_kill): Use it.
5976
8e9db26e
PA
59772014-06-23 Pedro Alves <palves@redhat.com>
5978
5979 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5980 before setting DR0..DR3.
5981
698b3e08
GB
59822014-06-20 Gary Benson <gbenson@redhat.com>
5983
5984 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5985 * configure: Regenerated.
5986 * config.in: Likewise.
5987
125f8a3d
GB
59882014-06-20 Gary Benson <gbenson@redhat.com>
5989
5990 * Makefile.in (SFILES): Update locations for files moved
5991 from common to nat.
5992 (object file files): Reordered.
5993
42995dbd
GB
59942014-06-20 Gary Benson <gbenson@redhat.com>
5995
5996 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5997 (i386_dr_low_set_addr): Likewise.
5998 (i386_dr_low_get_addr): Likewise.
5999 (i386_dr_low_can_set_control): Likewise.
6000 (i386_dr_low_set_control): Likewise.
6001 (i386_dr_low_get_control): Likewise.
6002 (i386_dr_low_get_status): Likewise.
6003 (i386_get_debug_register_length): Likewise.
6004 * linux-x86-low.c (i386_dr_low_set_addr):
6005 Changed signature. Made static.
6006 (i386_dr_low_get_addr): Likewise.
6007 (i386_dr_low_set_control): Likewise.
6008 (i386_dr_low_get_control): Likewise.
6009 (i386_dr_low_get_status): Likewise.
6010 (i386_dr_low): New global variable.
6011 * win32-i386-low.c (i386_dr_low_set_addr):
6012 Changed signature. Made static.
6013 (i386_dr_low_get_addr): Likewise.
6014 (i386_dr_low_set_control): Likewise.
6015 (i386_dr_low_get_control): Likewise.
6016 (i386_dr_low_get_status): Likewise.
6017 (i386_dr_low): New global variable.
6018
e1d2394b
MS
60192014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6020
6021 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6022 * Makefile.in (AR, AR_FLAGS): Define.
6023 * configure: Regenerate.
6024
3a8ee006
GB
60252014-06-19 Gary Benson <gbenson@redhat.com>
6026
6027 * Makefile.in (i386-dregs.o): New rule.
6028 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6029 * i386-low.c (target.h): Remove include.
6030 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6031 (DR_CONTROL_SHIFT): Likewise.
6032 (DR_CONTROL_SIZE): Likewise.
6033 (DR_RW_EXECUTE): Likewise.
6034 (DR_RW_WRITE): Likewise.
6035 (DR_RW_READ): Likewise.
6036 (DR_RW_IORW): Likewise.
6037 (DR_LEN_1): Likewise.
6038 (DR_LEN_2): Likewise.
6039 (DR_LEN_4): Likewise.
6040 (DR_LEN_8): Likewise.
6041 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6042 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6043 (DR_ENABLE_SIZE): Likewise.
6044 (DR_LOCAL_SLOWDOWN): Likewise.
6045 (DR_GLOBAL_SLOWDOWN): Likewise.
6046 (DR_CONTROL_RESERVED): Likewise.
6047 (I386_DR_CONTROL_MASK): Likewise.
6048 (I386_DR_VACANT): Likewise.
6049 (I386_DR_LOCAL_ENABLE): Likewise.
6050 (I386_DR_GLOBAL_ENABLE): Likewise.
6051 (I386_DR_DISABLE): Likewise.
6052 (I386_DR_SET_RW_LEN): Likewise.
6053 (I386_DR_GET_RW_LEN): Likewise.
6054 (I386_DR_WATCH_HIT): Likewise.
6055 (i386_wp_op_t): Likewise.
6056 (i386_show_dr): Likewise.
6057 (i386_length_and_rw_bits): Likewise.
6058 (i386_insert_aligned_watchpoint): Likewise.
6059 (i386_remove_aligned_watchpoint): Likewise.
6060 (i386_handle_nonaligned_watchpoint): Likewise.
6061 i386_update_inferior_debug_regs(): Likewise.
6062 (i386_dr_insert_watchpoint): Likewise.
6063 (i386_dr_remove_watchpoint): Likewise.
6064 (i386_dr_region_ok_for_watchpoint): Likewise.
6065 (i386_dr_stopped_data_address): Likewise.
6066 (i386_dr_stopped_by_watchpoint): Likewise.
6067
8f26655c
GB
60682014-06-19 Gary Benson <gbenson@redhat.com>
6069
6070 * i386-low.c (i386_dr_show): Renamed to
6071 i386_show_dr and made static. All uses updated.
6072 (i386_dr_length_and_rw_bits): Renamed to
6073 i386_length_and_rw_bits and made static.
6074 All uses updated.
6075 (i386_dr_insert_aligned_watchpoint): Renamed to
6076 i386_insert_aligned_watchpoint and made static.
6077 All uses updated.
6078 (i386_dr_remove_aligned_watchpoint): Renamed to
6079 i386_remove_aligned_watchpoint and made static.
6080 All uses updated.
6081 (i386_dr_update_inferior_debug_regs): Renamed to
6082 i386_update_inferior_debug_regs and made static.
6083 All uses updated.
6084
b9228891
GB
60852014-06-18 Gary Benson <gbenson@redhat.com>
6086
5171def3
GB
6087 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6088 (i386_dr_low_can_set_control): Likewise.
6089 (i386_get_debug_register_length): Likewise.
6090 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6091 (i386_dr_low_can_set_control): Likewise.
6092 (i386_get_debug_register_length): Likewise.
6093
60942014-06-17 Gary Benson <gbenson@redhat.com>
6095
b9228891
GB
6096 * i386-low.h (i386-dregs.h): New include.
6097 (DR_FIRSTADDR): Now in i386-dregs.h.
6098 (DR_LASTADDR): Likewise.
6099 (DR_NADDR): Likewise.
6100 (DR_STATUS): Likewise.
6101 (DR_CONTROL): Likewise.
6102 (i386_debug_reg_state): Likewise.
6103 (i386_dr_insert_watchpoint): Likewise.
6104 (i386_dr_remove_watchpoint): Likewise.
6105 (i386_dr_region_ok_for_watchpoint): Likewise.
6106 (i386_dr_stopped_data_address): Likewise.
6107 (i386_dr_stopped_by_watchpoint): Likewise.
6108 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6109
4be83cc2
GB
61102014-06-18 Gary Benson <gbenson@redhat.com>
6111
6112 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6113 i386_dr_insert_watchpoint.
6114 (i386_low_remove_watchpoint): Renamed to
6115 i386_dr_remove_watchpoint.
6116 (i386_low_region_ok_for_watchpoint): Renamed to
6117 i386_dr_region_ok_for_watchpoint.
6118 (i386_low_stopped_data_address): Renamed to
6119 i386_dr_stopped_data_address.
6120 (i386_low_stopped_by_watchpoint): Renamed to
6121 i386_dr_stopped_by_watchpoint.
6122 * i386-low.c (i386_show_dr): Renamed to
6123 i386_dr_show and made nonstatic. All uses updated.
6124 (i386_length_and_rw_bits): Renamed to
6125 i386_dr_length_and_rw_bits and made nonstatic.
6126 All uses updated.
6127 (i386_insert_aligned_watchpoint): Renamed to
6128 i386_dr_insert_aligned_watchpoint and made nonstatic.
6129 All uses updated.
6130 (i386_remove_aligned_watchpoint): Renamed to
6131 i386_dr_remove_aligned_watchpoint and made nonstatic.
6132 All uses updated.
6133 (i386_update_inferior_debug_regs): Renamed to
6134 i386_dr_update_inferior_debug_regs and made nonstatic.
6135 All uses updated.
6136 (i386_low_insert_watchpoint): Renamed to
6137 i386_dr_insert_watchpoint. All uses updated.
6138 (i386_low_remove_watchpoint): Renamed to
6139 i386_dr_remove_watchpoint. All uses updated.
6140 (i386_low_region_ok_for_watchpoint): Renamed to
6141 i386_dr_region_ok_for_watchpoint. All uses updated.
6142 (i386_low_stopped_data_address): Renamed to
6143 i386_dr_stopped_data_address. All uses updated.
6144 (i386_low_stopped_by_watchpoint): Renamed to
6145 i386_dr_stopped_by_watchpoint. All uses updated.
6146
131aa0d4
GB
61472014-06-18 Gary Benson <gbenson@redhat.com>
6148
6149 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6150 (i386_dr_low_can_set_control): Likewise.
6151 (i386_insert_aligned_watchpoint): New check.
6152
d9305f7f
GB
61532014-06-18 Gary Benson <gbenson@redhat.com>
6154
6155 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6156 Renamed to state.
6157
e927c9fc
GB
61582014-06-18 Gary Benson <gbenson@redhat.com>
6159
6160 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6161 instead of fatal and error.
6162 (i386_handle_nonaligned_watchpoint): Likewise.
6163
1b6d4134
GB
61642014-06-18 Gary Benson <gbenson@redhat.com>
6165
6166 * i386-low.c (i386_get_debug_register_length): New macro.
6167 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6168 (i386_show_dr): Use debug_printf instead of fprintf. Use
6169 phex to format values.
6170
6e62758f
GB
61712014-06-18 Gary Benson <gbenson@redhat.com>
6172
6173 * i386-low.h: Comment changes.
6174 * i386-low.c: Likewise.
6175
fc6e2f03
GB
61762014-06-18 Gary Benson <gbenson@redhat.com>
6177
6178 * i386-low.c: Whitespace changes.
6179
f9d1eeed
TT
61802014-06-12 Tom Tromey <tromey@redhat.com>
6181
6182 * utils.c (freeargv): Remove.
6183
0b04e523
TT
61842014-06-12 Tom Tromey <tromey@redhat.com>
6185
6186 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6187 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6188 (parse_debug_format_options): Likewise.
6189 (gdbserver_usage): Likewise.
6190 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6191 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6192 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6193 against libiberty.
6194 ($(LIBGNU)): Depend on libiberty.
6195 (all-lib): Recurse into all subdirs.
6196 (install-only): Invoke "install" target in subdirs.
6197 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6198 targets.
6199 * configure: Rebuild.
6200 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6201 for vasprintf, vsnprintf, or gettimeofday.
6202 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6203 srv_tgtobj.
6204
270c9937
JB
62052014-06-05 Joel Brobecker <brobecker@adacore.com>
6206
6207 * development.sh: Delete.
6208 * Makefile.in (config.status): Adjust dependency on development.sh.
6209 * configure.ac: Adjust development.sh source call.
6210 * configure: Regenerate.
6211
0a261ed8
PA
62122014-06-02 Pedro Alves <palves@redhat.com>
6213
6214 * ax.c (gdb_free_agent_expr): New function.
6215 * ax.h (gdb_free_agent_expr): New declaration.
6216 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6217 list.
6218 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6219 static.
6220 (clear_breakpoint_conditions_and_commands): New function.
6221 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6222 (clear_breakpoint_conditions_and_commands): New declaration.
6223
e9dae05e
RR
62242014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6225
6226 * linux-aarch64-low.c (asm/ptrace.h): Include.
6227
5876f503
JK
62282014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6229
6230 Fix TLS access for -static -pthread.
6231 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6232 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6233 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6234
802e8e6d
PA
62352014-05-20 Pedro Alves <palves@redhat.com>
6236
6237 * linux-aarch64-low.c (aarch64_insert_point)
6238 (aarch64_remove_point): No longer check whether the type is
6239 supported here. Adjust to new interface.
6240 (the_low_target): Install aarch64_supports_z_point_type as
6241 supports_z_point_type method.
6242 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6243 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6244 instead of a Z packet char. Adjust.
6245 (arm_supports_z_point_type): New function.
6246 (arm_insert_point, arm_remove_point): Adjust to new interface.
6247 (the_low_target): Install arm_supports_z_point_type.
6248 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6249 (cris_insert_point, cris_remove_point): Adjust to new interface.
6250 Don't check whether the type is supported here.
6251 (the_low_target): Install cris_supports_z_point_type.
6252 * linux-low.c (linux_supports_z_point_type): New function.
6253 (linux_insert_point, linux_remove_point): Adjust to new interface.
6254 * linux-low.h (struct linux_target_ops) <insert_point,
6255 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6256 raw_breakpoint pointer parameter.
6257 <supports_z_point_type>: New method.
6258 * linux-mips-low.c (mips_supports_z_point_type): New function.
6259 (mips_insert_point, mips_remove_point): Adjust to new interface.
6260 Use mips_supports_z_point_type.
6261 (the_low_target): Install mips_supports_z_point_type.
6262 * linux-ppc-low.c (the_low_target): Install NULL as
6263 supports_z_point_type method.
6264 * linux-s390-low.c (the_low_target): Install NULL as
6265 supports_z_point_type method.
6266 * linux-sparc-low.c (the_low_target): Install NULL as
6267 supports_z_point_type method.
6268 * linux-x86-low.c (x86_supports_z_point_type): New function.
6269 (x86_insert_point): Adjust to new insert_point interface. Use
6270 insert_memory_breakpoint. Adjust to new
6271 i386_low_insert_watchpoint interface.
6272 (x86_remove_point): Adjust to remove_point interface. Use
6273 remove_memory_breakpoint. Adjust to new
6274 i386_low_remove_watchpoint interface.
6275 (the_low_target): Install x86_supports_z_point_type.
6276 * lynx-low.c (lynx_target_ops): Install NULL as
6277 supports_z_point_type callback.
6278 * nto-low.c (nto_supports_z_point_type): New.
6279 (nto_insert_point, nto_remove_point): Adjust to new interface.
6280 (nto_target_ops): Install nto_supports_z_point_type.
6281 * mem-break.c: Adjust intro comment.
6282 (struct raw_breakpoint) <raw_type, size>: New fields.
6283 <inserted>: Update comment.
6284 <shlib_disabled>: Delete field.
6285 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6286 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6287 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6288 (raw_bkpt_type_to_target_hw_bp_type): New function.
6289 (find_enabled_raw_code_breakpoint_at): New function.
6290 (find_raw_breakpoint_at): New type and size parameters. Use them.
6291 (insert_memory_breakpoint): New function, based off
6292 set_raw_breakpoint_at.
6293 (remove_memory_breakpoint): New function.
6294 (set_raw_breakpoint_at): Reimplement.
6295 (set_breakpoint): New, based on set_breakpoint_at.
6296 (set_breakpoint_at): Reimplement.
6297 (delete_raw_breakpoint): Go through the_target->remove_point
6298 instead of assuming memory breakpoints.
6299 (find_gdb_breakpoint_at): Delete.
6300 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6301 (find_gdb_breakpoint): New function.
6302 (set_gdb_breakpoint_at): Delete.
6303 (z_type_supported): New function.
6304 (set_gdb_breakpoint_1): New function, loosely based off
6305 set_gdb_breakpoint_at.
6306 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6307 (delete_gdb_breakpoint_at): Delete.
6308 (delete_gdb_breakpoint_1): New function, loosely based off
6309 delete_gdb_breakpoint_at.
6310 (delete_gdb_breakpoint): New function.
6311 (clear_gdb_breakpoint_conditions): Rename to ...
6312 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6313 breakpoint.
6314 (add_condition_to_breakpoint): Make static.
6315 (add_breakpoint_condition): Take a struct breakpoint pointer
6316 instead of an address. Adjust.
6317 (gdb_condition_true_at_breakpoint): Rename to ...
6318 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6319 z_type parameter.
6320 (gdb_condition_true_at_breakpoint): Reimplement.
6321 (add_breakpoint_commands): Take a struct breakpoint pointer
6322 instead of an address. Adjust.
6323 (gdb_no_commands_at_breakpoint): Rename to ...
6324 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6325 parameter. Return true if no breakpoint was found. Change debug
6326 output.
6327 (gdb_no_commands_at_breakpoint): Reimplement.
6328 (run_breakpoint_commands): Rename to ...
6329 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6330 and change return type to boolean.
6331 (run_breakpoint_commands): New function.
6332 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6333 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6334 breakpoint. Go through the_target->remove_point instead of
6335 assuming memory breakpoint.
6336 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6337 software and hardware breakpoints.
6338 (reinsert_raw_breakpoint): Go through the_target->insert_point
6339 instead of assuming memory breakpoint.
6340 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6341 software and hardware breakpoints.
6342 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6343 Check both software and hardware breakpoints.
6344 (validate_inserted_breakpoint): Assert the breakpoint is a
6345 software breakpoint. Set the inserted flag to -1 instead of
6346 setting shlib_disabled.
6347 (delete_disabled_breakpoints): Adjust.
6348 (validate_breakpoints): Only validate software breakpoints.
6349 Adjust to inserted flag change.
6350 (check_mem_read, check_mem_write): Skip breakpoint types other
6351 than software breakpoints. Adjust to inserted flag change.
6352 * mem-break.h (enum raw_bkpt_type): New enum.
6353 (raw_breakpoint, struct process_info): Forward declare.
6354 (Z_packet_to_target_hw_bp_type): Delete declaration.
6355 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6356 (set_gdb_breakpoint, delete_gdb_breakpoint)
6357 (clear_breakpoint_conditions): New declarations.
6358 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6359 (breakpoint_inserted_here): Update comment.
6360 (add_breakpoint_condition, add_breakpoint_commands): Replace
6361 address parameter with a breakpoint pointer parameter.
6362 (gdb_breakpoint_here): Update comment.
6363 (delete_gdb_breakpoint_at): Delete.
6364 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6365 * server.c (process_point_options): Take a struct breakpoint
6366 pointer instead of an address. Adjust.
6367 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6368 delete_gdb_breakpoint.
6369 * spu-low.c (spu_target_ops): Install NULL as
6370 supports_z_point_type method.
6371 * target.h: Include mem-break.h.
6372 (struct target_ops) <prepare_to_access_memory>: Update comment.
6373 <supports_z_point_type>: New field.
6374 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6375 instead of a char. Also take a raw breakpoint pointer.
6376 * win32-arm-low.c (the_low_target): Install NULL as
6377 supports_z_point_type.
6378 * win32-i386-low.c (i386_supports_z_point_type): New function.
6379 (i386_insert_point, i386_remove_point): Adjust to new interface.
6380 (the_low_target): Install i386_supports_z_point_type.
6381 * win32-low.c (win32_supports_z_point_type): New function.
6382 (win32_insert_point, win32_remove_point): Adjust to new interface.
6383 (win32_target_ops): Install win32_supports_z_point_type.
6384 * win32-low.h (struct win32_target_ops):
6385 <supports_z_point_type>: New method.
6386 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6387 instead of a char. Also take a raw breakpoint pointer.
6388
932539e3
PA
63892014-05-20 Pedro Alves <palves@redhat.com>
6390
6391 * mem-break.h: Include break-common.h.
6392 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6393 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6394 (Z_packet_to_target_hw_bp_type): New declaration.
6395 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6396 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6397 (Z_PACKET_ACCESS_WP): Delete macros.
6398 (Z_packet_to_hw_type): Delete function.
6399 * i386-low.h: Don't include break-common.h here.
6400 (Z_packet_to_hw_type): Delete declaration.
6401 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6402 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6403 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6404 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6405 * linux-aarch64-low.c: Don't include break-common.h here.
6406 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6407 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6408 (Z_packet_to_target_hw_bp_type): Delete function.
6409 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6410 function.
6411 (mips_insert_point, mips_remove_point): Use
6412 Z_packet_to_target_hw_bp_type.
6413
4ff0d3d8
PA
64142014-05-20 Pedro Alves <palves@redhat.com>
6415
6416 * linux-aarch64-low.c: Include break-common.h.
6417 (enum target_point_type): Delete.
6418 (Z_packet_to_point_type): Rename to ...
6419 (Z_packet_to_target_hw_bp_type): ... this, and return a
6420 target_hw_bp_type instead.
6421 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6422 instead of an enum target_point_type.
6423 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6424 breakpoint type.
6425 (aarch64_dr_state_insert_one_point)
6426 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6427 (aarch64_handle_aligned_watchpoint)
6428 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6429 Take an enum target_hw_bp_type instead of an enum
6430 target_point_type.
6431 (aarch64_supports_z_point_type): New function.
6432 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6433 use Z_packet_to_target_hw_bp_type.
6434
786dc519
JB
64352014-05-20 Joel Brobecker <brobecker@adacore.com>
6436
6437 * configure.ac: Only use -Werror by default when DEVELOPMENT
6438 is true.
6439 * configure: Regenerate.
6440
9e0aa64f
JK
64412014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6442
6443 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6444 * linux-x86-low.c (X86_64_USER_REGS): New.
6445 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6446
2b577b92
YQ
64472014-04-28 Yao Qi <yao@codesourcery.com>
6448
6449 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6450 name.
6451
94611da2
PA
64522014-04-25 Pedro Alves <palves@redhat.com>
6453
6454 PR server/16255
6455 * linux-low.c (linux_attach_fail_reason_string): New function.
6456 (linux_attach_lwp): Delete.
6457 (linux_attach_lwp_1): Rename to ...
6458 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6459 argument. Remove "initial" parameter. Return int instead of
6460 void. Don't error or warn here.
6461 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6462 failure to attach to the tgid. Call warning when failing to
6463 attach to an lwp.
6464 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6465 argument. Remove "initial" parameter. Return int instead of
6466 void. Don't error or warn here.
6467 (linux_attach_fail_reason_string): New declaration.
6468 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6469 interface change. Use linux_attach_fail_reason_string.
6470
01f9f808
MS
64712014-04-24 Michael Sturm <michael.sturm@mintel.com>
6472 Walfred Tedeschi <walfred.tedeschi@intel.com>
6473
6474 * Makefile.in: Added rules to handle new files
6475 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6476 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6477 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6478 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6479 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6480 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6481 x32-avx512-linux.o.
6482 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6483 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6484 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6485 i386/x32-avx512.xml.
6486 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6487 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6488 i386/x32-avx512-linux.xml.
6489 * i387-fp.c (num_avx512_k_registers): New constant for number
6490 of K registers.
6491 (num_avx512_zmmh_low_registers): New constant for number of
6492 lower ZMM registers (0-15).
6493 (num_avx512_zmmh_high_registers): New constant for number of
6494 higher ZMM registers (16-31).
6495 (num_avx512_ymmh_registers): New contant for number of higher
6496 YMM registers (ymm16-31 added by avx521 on x86_64).
6497 (num_avx512_xmm_registers): New constant for number of higher
6498 XMM registers (xmm16-31 added by AVX512 on x86_64).
6499 (struct i387_xsave): Add space for AVX512 registers.
6500 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6501 Add code to handle AVX512 registers.
6502 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6503 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6504 prototypei from generated file.
6505 (tdesc_amd64_avx512_linux): Likewise.
6506 (init_registers_x32_avx512_linux): Likewise.
6507 (tdesc_x32_avx512_linux): Likewise.
6508 (init_registers_i386_avx512_linux): Likewise.
6509 (tdesc_i386_avx512_linux): Likewise.
6510 (x86_64_regmap): Add AVX512 registers.
6511 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6512 mask.
6513 (initialize_low_arch): Add code to initialize AVX512 registers.
6514
51aa91f9
PA
65152014-04-23 Pedro Alves <palves@redhat.com>
6516
6517 * mem-break.c (find_gdb_breakpoint_at): Make static.
6518 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6519
a4165e94
PA
65202014-04-23 Pedro Alves <palves@redhat.com>
6521
6522 * i386-low.c: Don't include break-common.h here.
6523 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6524 prototype to take target_hw_bp_type as argument instead of a Z
6525 packet char.
6526 * i386-low.h: Include break-common.h here.
6527 (Z_packet_to_hw_type): Declare.
6528 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6529 prototypes.
6530 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6531 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6532 (x86_remove_point): Convert the packet number to a
6533 target_hw_bp_type before calling i386_low_remove_watchpoint.
6534 * win32-i386-low.c (i386_insert_point): Convert the packet number
6535 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6536 (i386_remove_point): Convert the packet number to a
6537 target_hw_bp_type before calling i386_low_remove_watchpoint.
6538
b8acf843
PA
65392014-04-23 Pedro Alves <palves@redhat.com>
6540
6541 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6542
d708bcd1
PA
65432014-04-10 Pedro Alves <palves@redhat.com>
6544
6545 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6546 Check if the condition or command is NULL before checking if the
6547 breakpoint is known. On success, return true.
6548 * mem-break.h (add_breakpoint_condition): Document return.
6549 (add_breakpoint_commands): Add describing comment.
6550 * server.c (skip_to_semicolon): New function.
6551 (process_point_options): Use it.
6552
2eec7d5b
PA
65532014-04-09 Pedro Alves <palves@redhat.com>
6554
6555 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6556 to lwpid_of.
6557
fa96cb38
PA
65582014-02-27 Pedro Alves <palves@redhat.com>
6559
6560 PR 12702
6561 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6562 macros.
6563 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6564 output.
6565 (last_thread_of_process_p): Take a PID argument instead of a
6566 thread pointer.
6567 (linux_wait_for_lwp): Delete.
6568 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6569 functions.
6570 (linux_low_filter_event): New function, party factored out from
6571 linux_wait_for_event.
6572 (linux_wait_for_event): Rename to ...
6573 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6574 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6575 sigsuspend. Check for zombie leaders.
6576 (linux_wait_for_event): Reimplement as wrapper around
6577 linux_wait_for_event_filtered.
6578 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6579 a normal or signal exit is seen, it's the whole process exiting.
6580 (wait_for_sigstop): No longer a for_each_inferior callback.
6581 Rewrite on top of linux_wait_for_event_filtered.
6582 (stop_all_lwps): Call wait_for_sigstop directly.
6583 * server.c (resume, handle_target_event): Handle
6584 TARGET_WAITKIND_NO_RESUMED.
6585
d763de10
JB
65862014-02-26 Joel Brobecker <brobecker@adacore.com>
6587
6588 * win32-low.c (psapi_get_dll_name,
6589 * win32_CreateToolhelp32Snapshot): Delete.
6590 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6591 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6592 Delete.
6593 (handle_load_dll): Add function description.
6594 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6595
850a0f76
JB
65962014-02-26 Joel Brobecker <brobecker@adacore.com>
6597
6598 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6599 Add comment.
6600 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6601 base address when calling win32_add_one_solib.
6602 (handle_load_dll): Delete local variable load_addr.
6603 Remove 0x1000 offset applied to DLL base address when calling
6604 win32_add_one_solib.
6605 (handle_unload_dll): Add comment.
6606
f25b3fc3
JB
66072014-02-26 Joel Brobecker <brobecker@adacore.com>
6608
6609 * win32-low.c (win32_add_all_dlls): Renames
6610 win32_ensure_ntdll_loaded. Rewrite function documentation.
6611 Adjust implementation to always load all DLLs.
6612 Add 0x1000 offset to DLL base address when calling
6613 win32_add_one_solib.
6614 (child_initialization_done): New static global.
6615 (do_initial_child_stuff): Set child_initialization_done to
6616 zero during child initialization, and 1 after. Replace call
6617 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6618 Add comment.
6619 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6620 (handle_unload_dll): Add function documentation.
6621 (get_child_debug_event): Ignore load and unload DLL events
6622 during child initialization.
6623
d86d4aaf
DE
66242014-02-20 Doug Evans <dje@google.com>
6625
3bc32da3 6626 Remove global all_lwps.
d86d4aaf
DE
6627 * inferiors.h (ptid_of): Move here from linux-low.h.
6628 (pid_of, lwpid_of): Ditto.
6629 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6630 parameter is a struct thread_info * now.
6631 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6632 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6633 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6634 directly.
6635 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6636 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6637 * linux-arm-low.c (update_registers_callback): Update, "entry"
6638 parameter is a struct thread_info * now.
6639 Fetch lwpid from current_inferior directly.
6640 (arm_insert_point): Pass &all_threads to find_inferior instead of
6641 &all_lwps.
6642 (arm_remove_point): Ditto.
6643 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6644 (arm_prepare_to_resume): Fetch pid from thread.
6645 (arm_read_description): Fetch lwpid from current_inferior directly.
6646 * linux-low.c (all_lwps): Delete.
6647 (delete_lwp): Delete call to remove_inferior.
6648 (handle_extended_wait): Fetch lwpid from thread.
6649 (add_lwp): Don't set lwp->entry.id. Remove call to
6650 add_inferior_to_list.
6651 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6652 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6653 (kill_one_lwp_callback): Ditto.
6654 (linux_kill): Don't dereference NULL pointer.
6655 Fetch ptid,lwpid from thread.
6656 (get_detach_signal): Fetch ptid from thread.
6657 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6658 Simplify call to regcache_invalidate_thread.
6659 (delete_lwp_callback): Update, "entry" parameter is a
6660 struct thread_info * now. Fetch pid from thread.
6661 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6662 (status_pending_p_callback): Update, "entry" parameter is a
6663 struct thread_info * now. Fetch ptid from thread.
6664 (find_lwp_pid): Update, "entry" parameter is a
6665 struct thread_info * now.
6666 (linux_wait_for_lwp): Fetch pid from thread.
6667 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6668 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6669 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6670 (dequeue_one_deferred_signal): Ditto.
6671 (cancel_breakpoint): Fetch ptid from current_inferior.
6672 (linux_wait_for_event): Pass &all_threads to find_inferior,
6673 not &all_lwps. Fetch ptid, lwpid from thread.
6674 (count_events_callback): Update, "entry" parameter is a
6675 struct thread_info * now.
6676 (select_singlestep_lwp_callback): Ditto.
6677 (select_event_lwp_callback): Ditto.
6678 (cancel_breakpoints_callback): Ditto.
6679 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6680 not &all_lwps.
6681 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6682 (unsuspend_one_lwp): Update, "entry" parameter is a
6683 struct thread_info * now.
6684 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6685 not &all_lwps.
6686 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6687 Fetch lwpid from thread, not lwp.
6688 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6689 Pass &all_threads to find_inferior, not &all_lwps.
6690 (send_sigstop): Fetch lwpid from thread, not lwp.
6691 (send_sigstop_callback): Update, "entry" parameter is a
6692 struct thread_info * now.
6693 (suspend_and_send_sigstop_callback): Ditto.
6694 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6695 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6696 struct thread_info * now.
6697 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6698 from thread, lwp.
6699 (lwp_running): Update, "entry" parameter is a
6700 struct thread_info * now.
6701 (stop_all_lwps): Fetch ptid from thread.
6702 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6703 (linux_resume_one_lwp): Fetch lwpid from thread.
6704 (linux_set_resume_request): Update, "entry" parameter is a
6705 struct thread_info * now. Fetch pid, lwpid from thread.
6706 (resume_status_pending_p): Update, "entry" parameter is a
6707 struct thread_info * now.
6708 (need_step_over_p): Ditto. Fetch lwpid from thread.
6709 (start_step_over): Fetch lwpid from thread.
6710 (linux_resume_one_thread): Update, "entry" parameter is a
6711 struct thread_info * now. Fetch lwpid from thread.
6712 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6713 (proceed_one_lwp): Update, "entry" parameter is a
6714 struct thread_info * now. Fetch lwpid from thread.
6715 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6716 struct thread_info * now.
6717 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6718 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6719 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6720 directly.
6721 (regsets_store_inferior_registers): Ditto.
6722 (fetch_register, store_register): Ditto.
6723 (linux_read_memory, linux_write_memory): Ditto.
6724 (linux_request_interrupt): Ditto.
6725 (linux_read_auxv): Ditto.
6726 (linux_xfer_siginfo): Ditto.
6727 (linux_qxfer_spu): Ditto.
6728 (linux_qxfer_libraries_svr4): Ditto.
6729 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6730 moved to inferiors.h.
6731 (get_lwp): Delete.
6732 (get_thread_lwp): Update.
6733 (struct lwp_info): Delete member "entry". Simplify comment for
6734 member "thread".
6735 (all_lwps): Delete.
6736 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6737 current_inferior directly.
6738 (update_watch_registers_callback): Update, "entry" parameter is a
6739 struct thread_info * now. Fetch pid from thread.
6740 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6741 (mips_insert_point): Fetch lwpid from current_inferior.
6742 Pass &all_threads to find_inferior, not &all_lwps.
6743 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6744 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6745 directly.
6746 (mips_stopped_data_address): Ditto.
6747 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6748 directly.
6749 * linux-tile-low.c (tile_arch_setup): Ditto.
6750 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6751 (update_debug_registers_callback): Update, "entry" parameter is a
6752 struct thread_info * now. Fetch pid from thread.
6753 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6754 Pass &all_threads to find_inferior, not &all_lwps.
6755 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6756 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6757 Pass &all_threads to find_inferior, not &all_lwps.
6758 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6759 (i386_dr_low_get_status): Ditto.
6760 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6761 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6762 (x86_linux_read_description): Ditto.
6763 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6764
3b8361aa
DE
67652014-02-20 Doug Evans <dje@google.com>
6766
6767 * inferiors.c (get_first_inferior): Fix buglet.
6768
f7667f0d
DE
67692014-02-19 Doug Evans <dje@google.com>
6770
6771 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6772 * inferiors.c (add_thread): Change result type to struct thread_info *.
6773 All callers updated.
6774 (add_lwp): Call add_thread here instead of in callers.
6775 All callers updated.
6776 * linux-low.h (get_lwp_thread): Rewrite.
6777 (struct lwp_info): New member "thread".
6778
b3312d80
DE
67792014-02-19 Doug Evans <dje@google.com>
6780
6781 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6782 All callers updated.
6783
ecc6f45c
DE
67842014-02-19 Doug Evans <dje@google.com>
6785
6786 * inferiors.c (add_thread): Fix whitespace.
6787
649ebbca
DE
67882014-02-19 Doug Evans <dje@google.com>
6789
6790 * dll.c (clear_dlls): Replace accessing list implemention details
6791 with API function.
6792 * gdbthread.h (get_first_thread): Declare.
6793 * inferiors.c (for_each_inferior_with_data): New function.
6794 (get_first_thread): New function.
6795 (find_thread_ptid): Simplify.
6796 (get_first_inferior): New function.
6797 (clear_list): Delete.
6798 (one_inferior_p): New function.
6799 (clear_inferior_list): New function.
6800 (clear_inferiors): Update.
6801 * inferiors.h (for_each_inferior_with_data): Declare.
6802 (clear_inferior_list): Declare.
6803 (one_inferior_p): Declare.
6804 (get_first_inferior): Declare.
6805 * linux-low.c (linux_wait_for_event): Replace accessing list
6806 implemention details with API function.
6807 * server.c (target_running): Ditto.
6808 (accumulate_file_name_length): New function.
6809 (emit_dll_description): New function.
6810 (handle_qxfer_libraries): Replace accessing list implemention
6811 details with API function.
6812 (handle_qxfer_threads_worker): New function.
6813 (handle_qxfer_threads_proper): Replace accessing list implemention
6814 details with API function.
6815 (handle_query): Ditto.
6816 (visit_actioned_threads_callback_ftype): New typedef.
6817 (visit_actioned_threads_data): New struct.
6818 (visit_actioned_threads): Rewrite to be find_inferior callback.
6819 (resume): Call find_inferior.
6820 (handle_status): Replace accessing list implemention
6821 details with API function.
6822 (process_serial_event): Replace accessing list implemention details
6823 with API function.
6824 * target.c (set_desired_inferior): Replace accessing list implemention
6825 details with API function.
6826 * tracepoint.c (same_process_p): New function.
6827 (gdb_agent_about_to_close): Replace accessing list implemention
6828 details with API function.
6829 * win32-low.c (child_delete_thread): Replace accessing list
6830 implemention details with API function.
6831 (match_dll_by_basename): New function.
6832 (dll_is_loaded_by_basename): New function.
6833 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6834 details call to dll_is_loaded_by_basename.
6835
80894984
DE
68362014-02-19 Doug Evans <dje@google.com>
6837
6838 * dll.h (struct dll_info): Add comment.
6839 * gdbthread.h (struct thread_info): Add comment.
6840 (current_ptid): Simplify.
6841 * inferiors.c (add_process): Update.
6842 (remove_process): Update.
6843 * inferiors.h (struct process_info): Rename member "head" to "entry".
6844 * linux-low.c (delete_lwp): Update.
6845 (add_lwp): Update.
6846 (last_thread_of_process_p): Update.
6847 (kill_one_lwp_callback, linux_kill): Update.
6848 (status_pending_p_callback): Update.
6849 (wait_for_sigstop): Update. Simplify read of ptid.
6850 (start_step_over): Update.
6851 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6852 (get_lwp_thread): Update.
6853 (struct lwp_info): Rename member "head" to "entry".
6854 * regcache.h (inferior_list_entry): Delete.
6855 * server.c (kill_inferior_callback): Update.
6856 (detach_or_kill_inferior_callback): Update.
6857 (print_started_pid): Update.
6858 (print_attached_pid): Update.
6859 (process_serial_event): Simplify read of ptid.
6860 * thread-db.c (thread_db_create_event): Update.
6861 (thread_db_get_tls_address): Update.
6862 * win32-low.c (current_inferior_ptid): Simplify.
6863
46917d26
TT
68642014-02-19 Tom Tromey <tromey@redhat.com>
6865
6866 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6867 argument.
6868 (target_supports_btrace): Update.
6869
0759a81e
YQ
68702014-02-14 Yao Qi <yao@codesourcery.com>
6871
6872 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6873 (rsp-low-ipa.o): New target.
6874
a7191e8b
TT
68752014-02-12 Tom Tromey <tromey@redhat.com>
6876
6877 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6878 convert_ascii_to_int.
6879 * regcache.c (registers_to_string): Likewise.
6880 * remote-utils.c (decode_M_packet): Likewise.
6881 * server.c (process_serial_event): Likewise.
6882
ff0e980e
TT
68832014-02-12 Tom Tromey <tromey@redhat.com>
6884
6885 * server.c (handle_query, handle_v_run): Use hex2bin, not
6886 unhexify.
6887 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6888
e9371aff
TT
68892014-02-12 Tom Tromey <tromey@redhat.com>
6890
6891 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6892 convert_int_to_ascii.
6893 * regcache.c (registers_to_string, collect_register_as_string):
6894 Likewise.
6895 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6896 Likewise.
6897 * server.c (process_serial_event): Likewise.
6898 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6899 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6900
971dc0b8
TT
69012014-02-12 Tom Tromey <tromey@redhat.com>
6902
6903 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6904 bin2hex, not hexify.
6905 * tracepoint.c (cmd_qtstatus): Likewise.
6906
0a822afb
TT
69072014-02-12 Tom Tromey <tromey@redhat.com>
6908
6909 * remote-utils.c (monitor_output): Pass explicit length to
6910 hexify.
6911
9c3d6531
TT
69122014-02-12 Tom Tromey <tromey@redhat.com>
6913
6914 * tracepoint.c: Include rsp-low.h.
6915 * server.c: Include rsp-low.h.
6916 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6917 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6918 declare.
6919 * remote-utils.c: Include rsp-low.h.
6920 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6921 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6922 (convert_int_to_ascii, convert_ascii_to_int): Move to
6923 common/rsp-low.c.
6924 * regcache.c: Include rsp-low.h.
6925 * ax.c: Include rsp-low.h.
6926 * Makefile.in (SFILES): Add common/rsp-low.c.
6927 (OBS): Add rsp-low.o.
6928 (rsp-low.o): New target.
6929
01fd3ea5
TT
69302014-02-12 Tom Tromey <tromey@redhat.com>
6931
6932 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6933 Include print-utils.h.
6934 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6935 (plongest, thirty_two, phex_nz): Remove.
6936 * Makefile.in (SFILES): Add common/print-utils.c.
6937 (OBS): Add print-utils.o.
6938 (print-utils-ipa.o): New target.
6939 (print-utils.o): New target.
6940 (IPA_OBJS): Add print-utils-ipa.o.
6941
e99dc820
TT
69422014-02-06 Tom Tromey <tromey@redhat.com>
6943
6944 * Makefile.in (SFILES): Fix indentation.
6945
ee1e2d4f
DE
69462014-02-05 Doug Evans <dje@google.com>
6947
6948 * linux-low.c (linux_wait_for_event): Improve comment.
6949 (linux_wait_1): Keep current_inferior in sync with event_child.
6950
f5a02773
DE
69512014-01-22 Doug Evans <dje@google.com>
6952
6953 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6954
87ce2a04
DE
69552014-01-22 Doug Evans <dje@google.com>
6956
6957 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6958 * configure: Regenerate.
6959 * config.in: Regenerate.
6960 * Makefile.in (SFILES): Add debug.c.
6961 (OBS): Add debug.o.
6962 * debug.c: New file.
6963 * debug.h: New file.
6964 * linux-aarch64-low.c (*): Update all debugging printfs to use
6965 debug_printf instead of fprintf.
6966 * linux-arm-low.c (*): Ditto.
6967 * linux-cris-low.c (*): Ditto.
6968 * linux-crisv32-low.c (*): Ditto.
6969 * linux-m32r-low.c (*): Ditto.
6970 * linux-sparc-low.c (*): Ditto.
6971 * linux-x86.c (*): Ditto.
6972 * linux-low.c (*): Ditto.
6973 (linux_wait_1): Add calls to debug_enter, debug_exit.
6974 (linux_wait): Remove redundant debugging printf.
6975 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6976 (linux_resume, unstop_all_lwps): Ditto.
6977 * mem-break.c (*): Update all debugging printfs to use
6978 debug_printf instead of fprintf.
6979 * remote-utils.c (*): Ditto.
6980 * thread-db.c (*): Ditto.
6981 * server.c #include <ctype.h>, "gdb_vecs.h".
6982 (debug_threads): Moved to debug.c.
6983 (*): Update all debugging printfs to use debug_printf instead of
6984 fprintf.
6985 (start_inferior): Replace call to fflush with call to debug_flush.
6986 (monitor_show_help): Mention set debug-format.
6987 (parse_debug_format_options): New function.
6988 (handle_monitor_command): Handle "monitor set debug-format".
6989 (gdbserver_usage): Mention --debug-format.
6990 (main): Parse --debug-format.
6991 * server.h (debug_threads): Declaration moved to debug.h.
6992 #include "debug.h".
6993 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6994 trace_debug_1 that uses debug_printf.
6995 (tracepoint_look_up_symbols): Update all debugging printfs to use
6996 debug_printf instead of fprintf.
6997
e671835b
BS
69982014-01-20 Baruch Siach <baruch@tkos.co.il>
6999
7000 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7001 sys/ptrace.h.
7002
b5737fa9
PA
70032014-01-17 Pedro Alves <palves@redhat.com>
7004
ea38d2a9 7005 PR build/16445
c7faa97a
PA
7006 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7007 defined after including gdb_proc_service.h.
b5737fa9 7008
40ed484e
DE
70092014-01-16 Doug Evans <dje@google.com>
7010
7011 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7012 (match_dll): Use it.
7013
969c39fb
MM
70142014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7015
7016 * target.h (target_ops) <read_btrace>: Change parameters and
7017 return type to allow error reporting.
7018 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7019 trace reading errors on.
7020 * linux-low.c (linux_low_read_btrace): Pass trace reading
7021 errors on.
7022 (linux_low_disable_btrace): New.
7023
ab7f45ba
DE
70242014-01-15 Doug Evans <dje@google.com>
7025
7026 * inferiors.c (thread_id_to_gdb_id): Delete.
7027 * inferiors.h (thread_id_to_gdb_id): Delete.
7028
66af0f44
EZ
70292014-01-13 Eli Zaretskii <eliz@gnu.org>
7030
7031 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7032 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7033 versions.
7034
9939e131
PA
70352014-01-08 Pedro Alves <palves@redhat.com>
7036
7037 * server.c (handle_status): Don't discard previous queued stop
7038 replies or thread's pending status here.
7039 (main) <disconnection>: Do it here instead.
7040
b7ea362b
PA
70412014-01-08 Pedro Alves <palves@redhat.com>
7042
7043 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7044 * server.c (visit_actioned_threads, handle_pending_status): New
7045 function.
7046 (handle_v_cont): Factor out parts to ...
7047 (resume): ... this new function. If in all-stop, and a thread
7048 being resumed has a pending status, report it without actually
7049 resuming.
7050 (myresume): Adjust to use the new 'resume' function.
7051 (clear_pending_status_callback, set_pending_status_callback)
7052 (find_status_pending_thread_callback): New functions.
7053 (handle_status): Handle the case of multiple threads having
7054 interesting statuses to report. Report threads' real last signal
7055 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7056 with an interesting thread to report the status for, instead of
7057 always reporting the status of the first thread.
7058
28498c42
JB
70592014-01-01 Joel Brobecker <brobecker@adacore.com>
7060
7061 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7062 * gdbreplay.c (gdbreplay_version): Likewise.
7063
f45c82da
YZ
70642013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7065
7066 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7067 iov.iov_len with the real length in use.
7068
379a5e2d
JB
70692013-12-13 Joel Brobecker <brobecker@adacore.com>
7070
7071 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7072 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7073 for all targets that use win32-low.c.
7074 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7075 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7076
4210d83e
PA
70772013-12-13 Pedro Alves <palves@redhat.com>
7078
7079 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7080 if equal to TARGET_WAITKIND_LOADED.
7081 * win32-low.c (cached_status): New static global.
7082 (win32_wait): Add declaration.
7083 (do_initial_child_stuff): Flush all initial pending debug events
7084 up to the initial breakpoint.
7085 (win32_wait): If CACHED_STATUS was set, return that instead
7086 of doing a real wait. Remove the code resuming the execution
7087 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7088 during the initial phase. Also remove the code changing
7089 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7090 TARGET_WAITKIND_STOPPED.
7091
e7f0d979
YQ
70922013-12-11 Yao Qi <yao@codesourcery.com>
7093
7094 * notif.c (handle_notif_ack): Return 0 if no notification
7095 matches.
7096
ebcf782c
DE
70972013-11-20 Doug Evans <dje@google.com>
7098
7099 * linux-low.c (linux_set_resume_request): Fix comment.
7100
20ad9378
DE
71012013-11-20 Doug Evans <dje@google.com>
7102
7103 * linux-low.c (resume_status_pending_p): Tweak comment.
7104
a196ebeb
WT
71052013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7106
7107 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7108 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7109 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7110 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7111 (srv_amd64_regobj): Add amd64-mpx.o.
7112 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7113 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7114 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7115 * i387-fp.c (num_pl_bnd_register) Added constant.
7116 (num_pl_bnd_cfg_registers) Added constant.
7117 (struct i387_xsave) Added reserved area and MPX fields.
7118 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7119 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7120 function.
7121 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7122 (init_registers_amd64_mpx_linux): Declare new function.
7123 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7124 (x86_64_regmap): Add MPX registers.
7125 (x86_linux_read_description): Add MPX case.
7126 (initialize_low_arch): Initialize MPX targets.
7127
0080a2f6
TT
71282013-11-18 Tom Tromey <tromey@redhat.com>
7129
7130 * configure: Rebuild.
7131 * configure.ac: Don't check for stdlib.h.
7132 * gdbreplay.c: Unconditionally include stdlib.h.
7133
2978b111
TT
71342013-11-18 Tom Tromey <tromey@redhat.com>
7135
7136 * config.in: Rebuild.
7137 * configure: Rebuild.
7138 * configure.ac: Don't use AC_HEADER_DIRENT.
7139
a3d08894
TT
71402013-11-18 Tom Tromey <tromey@redhat.com>
7141
7142 * server.h: Don't check HAVE_STRING_H.
7143 * gdbreplay.c: Don't check HAVE_STRING_H.
7144 * configure: Rebuild.
7145
0a5dd17d
TT
71462013-11-18 Tom Tromey <tromey@redhat.com>
7147
7148 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7149 LIBGNU.
7150
1bd2f0ba
TT
71512013-11-08 Tom Tromey <tromey@redhat.com>
7152
7153 * configure, config.in: Rebuild.
7154 * configure.ac: Remove unused configury.
7155
3266f10b
TT
71562013-11-08 Tom Tromey <tromey@redhat.com>
7157
7158 * acinclude.m4: Include common.m4, codeset.m4.
7159 * configure, config.in: Rebuild.
7160 * configure.ac: Use GDB_AC_COMMON.
7161
6682d959
AA
71622013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7163
7164 * linux-s390-low.c (HWCAP_S390_TE): New define.
7165 (s390_arch_setup): Consider the TE field in the HWCAP for
7166 determining 'have_regset_tdb'.
7167
fd0a4d76
SDJ
71682013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7169
7170 PR gdb/16014
7171 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7172 call to sizeof.
7173
1a3d890b
PA
71742013-10-02 Pedro Alves <palves@redhat.com>
7175
7176 * server.c (process_serial_event): Don't output "GDBserver
7177 exiting" if GDB is connected through stdio.
7178 * target.c (mywait): Likewise, be silent if GDB is connected
7179 through stdio.
7180
97ad4581
JB
71812013-10-01 Joel Brobecker <brobecker@adacore.com>
7182
7183 * lynx-low.c (lynx_add_threads_after_attach): New function.
7184 (lynx_attach): Remove call to add_thread. Add call to
7185 lynx_add_threads_after_attach instead.
7186
5b4e221c
MF
71872013-09-28 Mike Frysinger <vapier@gentoo.org>
7188
7189 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7190 * config.in, configure: Regenerated.
7191
ee47b2f8
YQ
71922013-09-18 Yao Qi <yao@codesourcery.com>
7193
7194 PR server/15959
7195 * server.c (start_inferior): Clear 'resume_info'.
7196
d6707650 71972013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7198
d6707650
JW
7199 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7200 for each register.
7201
9243dd0e 72022013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7203
9243dd0e
JW
7204 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7205 linux-tile-low.o to srv_tgtobj.
7206
c623a6ef
WN
72072013-09-16 Will Newton <will.newton@linaro.org>
7208
7209 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7210 out regs.
7211
fb71d39e
PA
72122013-09-06 Pedro Alves <palves@redhat.com>
7213
7214 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7215 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7216 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7217 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7218 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7219 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7220
8e7e9910
PA
72212013-09-06 Pedro Alves <palves@redhat.com>
7222
7223 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7224 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7225
7c3a12ca
PA
72262013-09-06 Pedro Alves <palves@redhat.com>
7227
7228 * linux-amd64-ipa.c: Include tracepoint.h.
7229 * linux-i386-ipa.c: Include tracepoint.h.
7230
8eb3d7b6
RW
72312013-09-06 Ricard Wanderlof <ricardw@axis.com>
7232
7233 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7234 (ps_get_thread_area): New function.
7235
eddddb9d
RW
72362013-09-06 Ricard Wanderlof <ricardw@axis.com>
7237
7238 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7239 (initialize_low_arch): Call init_registers_crisv32 rather than
7240 init_register_crisv32.
7241
533b0600
PA
72422013-09-05 Pedro Alves <palves@redhat.com>
7243
7244 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7245 to ...
7246 * hostio.h: ... this new file.
7247 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7248 win32-low.c: Include hostio.h.
7249
0ce3d3b5
PA
72502013-09-05 Pedro Alves <palves@redhat.com>
7251
7252 * server.h (gdb_client_data, handler_func, callback_handler_func)
7253 (delete_file_handler, add_file_handler, append_callback_event)
7254 (delete_callback_event, start_event_loop, initialize_event_loop):
7255 Move to event-loop.h and include it.
7256 * event-loop.h: New file.
7257
799cdc37
PA
72582013-09-05 Pedro Alves <palves@redhat.com>
7259
7260 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7261 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7262 (loaded_dll, unloaded_dll): Move to ...
7263 * dll.h: ... this new file.
7264 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7265
6a6bbd9d
PA
72662013-09-05 Pedro Alves <palves@redhat.com>
7267
7268 * server.h (current_process, get_thread_process, all_processes)
7269 (add_inferior_to_list, for_each_inferior, current_inferior)
7270 (remove_inferior, add_process, remove_process, find_process_pid)
7271 (have_started_inferiors_p, have_attached_inferiors_p)
7272 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7273 (clear_inferiors, find_inferior, find_inferior_id)
7274 (inferior_target_data, set_inferior_target_data)
7275 (inferior_regcache_data, set_inferior_regcache_data): Move to
7276 inferiors.h, and include it.
7277 * inferiors.h: New file.
7278
f699aaba
PA
72792013-09-05 Pedro Alves <palves@redhat.com>
7280
7281 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7282 Move ...
72f4393d 7283 * ax.h: ... here.
f699aaba 7284
c144c7a0
PA
72852013-09-05 Pedro Alves <palves@redhat.com>
7286
7287 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7288 tracepoint.h.
7289 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7290 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7291 (handle_tracepoint_general_set, handle_tracepoint_query)
7292 (tracepoint_finished_step, tracepoint_was_hit)
7293 (release_while_stepping_state_list, current_traceframe)
7294 (in_readonly_region, traceframe_read_mem)
7295 (fetch_traceframe_registers, traceframe_read_sdata)
7296 (traceframe_read_info, struct fast_tpoint_collect_status)
7297 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7298 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7299 (supply_fast_tracepoint_registers)
7300 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7301 (ipa_tdesc, claim_trampoline_space)
7302 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7303 (agent_mem_read, agent_get_trace_state_variable_value)
7304 (agent_set_trace_state_variable_value, agent_tsv_read)
7305 (agent_mem_read_string, get_raw_reg_func_addr)
7306 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7307 * tracepoint.h: ... this new file.
7308
ff42e6ab
PA
73092013-09-05 Pedro Alves <palves@redhat.com>
7310
7311 * server.h (perror_with_name, error, fatal, warning, paddress)
7312 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7313 include it.
7314 * utils.h: New file.
7315
541af0f4
PA
73162013-09-05 Pedro Alves <palves@redhat.com>
7317
7318 * server.h (remote_debug, noack_mode, transport_is_reliable)
7319 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7320 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7321 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7322 (write_enn, initialize_async_io, enable_async_io)
7323 (disable_async_io, check_remote_input_interrupt_request)
7324 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7325 (dead_thread_notify, prepare_resume_reply)
7326 (decode_address_to_semicolon, decode_address, decode_m_packet)
7327 (decode_M_packet, decode_X_packet, decode_xfer_write)
7328 (decode_search_memory_packet, unhexify, hexify)
7329 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7330 (look_up_one_symbol, relocate_instruction)
7331 (monitor_output): Move to remote-utils.h, and include it.
7332 * remote-utils.h: New file.
7333
eebdf26b
PA
73342013-09-05 Pedro Alves <palves@redhat.com>
7335
7336 * server.h (_): Delete.
7337
3aafd2ff
PA
73382013-09-02 Pedro Alves <palves@redhat.com>
7339
7340 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7341 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7342 allocated.
7343 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7344
cee83bcb
PM
73452013-09-02 Pierre Muller <muller@sourceware.org>
7346
7347 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7348 or WriteProcessMemory complete successfully and handle
7349 ERROR_PARTIAL_COPY error.
7350
9a13b2fa
PA
73512013-09-02 Pedro Alves <palves@redhat.com>
7352
7353 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7354 error instead of EIO.
7355
602e3198
JK
73562013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7357
7358 PR server/15604
7359 * linux-low.c: Include filestuff.h.
7360 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7361 * lynx-low.c: Include filestuff.h.
7362 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7363 * server.c: Include filestuff.h.
7364 (main): Call notice_open_fds.
7365 * spu-low.c: Include filestuff.h.
7366 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7367
96d7229d
LM
73682013-08-22 Luis Machado <lgustavo@codesourcery.com>
7369
7370 * Makefile.in: Explain why ../target and ../nat are not
7371 listed as include file search paths.
7372 (linux-waitpid.o): New object file rule.
7373 * configure.srv (srv_native_linux_obj): New variable.
7374 Replace all occurrences of linux native object files with
7375 $srv_native_linux_obj.
7376 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7377 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7378 (linux_enable_event_reporting): Remove declaration.
7379 (my_waitpid): Moved to common/linux-waitpid.c.
7380 (linux_wait_for_event): Pass ptid when calling
7381 linux_enable_event_reporting.
7382 (linux_supports_tracefork_flag): Remove.
7383 (linux_enable_event_reporting): Likewise.
7384 (linux_tracefork_grandchild): Remove.
7385 (STACK_SIZE): Moved to common/linux-ptrace.c.
7386 (linux_tracefork_child): Remove.
7387 (linux_test_for_tracefork): Remove.
7388 (linux_look_up_symbols): Call linux_supports_traceclone.
7389 (initialize_low): Remove call to linux_test_for_tracefork.
7390 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7391 common/linux-ptrace.h.
7392 (PTRACE_TYPE_ARG4): Likewise.
7393 Include linux-ptrace.h.
7394
32940073
PA
73952013-08-21 Pedro Alves <palves@redhat.com>
7396
7397 * config.in: Renegerate.
7398
33b60d58 73992013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 7400
33b60d58
LM
7401 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7402 (SFILES): Remove $(srcdir)/common/target-common.c and
7403 add $(srcdir)/target/waitstatus.c.
7404 (OBS): Remove target-common.o and add waitstatus.o.
7405 (server_h): Remove $(srcdir)/../common/target-common.h and
7406 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7407 and $(srcdir)/../target/waitstatus.h.
7408 (target-common.o): Remove.
7409 (waitstatus.o): New target object file.
7410 * target.h: Do not include target-common.h and
7411 include target/resume.h, target/wait.h and
7412 target/waitstatus.h.
7413
b8e1b30e
LM
74142013-08-13 Luis Machado <lgustavo@codesourcery.com>
7415
7416 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7417 to PTRACE_TYPE_ARG3.
7418 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7419 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7420 PTRACE_TYPE_ARG4.
7421 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7422 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7423
7a60ad40
YQ
74242013-07-27 Jie Zhang <jie@codesourcery.com>
7425 Daniel Jacobowitz <dan@codesourcery.com>
7426 Yao Qi <yao@codesourcery.com>
7427
7428 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7429 (mips-linux-watch.o): New rule.
7430 (mips_linux_watch_h): New variable.
7431 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7432 srv_tgtobj.
7433 * linux-mips-low.c: Include mips-linux-watch.h.
7434 (struct arch_process_info, struct arch_lwp_info): New.
7435 (update_watch_registers_callback): New function.
7436 (mips_linux_new_process, mips_linux_new_thread) New functions.
7437 (mips_linux_prepare_to_resume, mips_insert_point): New
7438 functions.
7439 (mips_remove_point, mips_stopped_by_watchpoint): New
7440 functions.
7441 (rsp_bp_type_to_target_hw_bp_type): New function.
7442 (mips_stopped_data_address): New function.
7443 (the_low_target): Add watchpoint support functions.
7444
de6f69ad
YQ
74452013-07-27 Yao Qi <yao@codesourcery.com>
7446
7447 * i386-low.c: Include break-common.h.
7448 (enum target_hw_bp_type): Remove.
7449
3360c0bf
LM
74502013-07-24 Luis Machado <lgustavo@codesourcery.com>
7451
7452 * Makefile.in (SFILES): /common/target-common.c.
7453 (OBS): Add target-common.o.
7454 (server_h): Add $(srcdir)/../common/target-common.h.
7455 (target-common.o): New target.
7456 * server.c (queue_stop_reply_callback): Free
7457 status string after use.
7458 * target.c (target_waitstatus_to_string): Remove.
7459 * target.h: Include target-common.h.
7460 (resume_kind): Likewise.
7461 (target_waitkind): Likewise.
7462 (target_waitstatus): Likewise.
7463 (TARGET_WNOHANG): Likewise.
7464
bd885420
YQ
74652013-07-04 Yao Qi <yao@codesourcery.com>
7466
7467 * Makefile.in (host_alias): Use @host_noncanonical@.
7468 (target_alias): Use @target_noncanonical@.
7469 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7470 ACX_NONCANONICAL_HOST.
7471 * configure: Regenerated.
7472
7473 Revert:
7474 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7475
7476 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7477 * configure: Rebuild.
7478 * Makefile.in (version_host, version_target): Get from configure.
7479 (version.c): Use $(version_host) and $(version_target).
7480
17ef446e
PA
74812013-07-03 Pedro Alves <palves@redhat.com>
7482
7483 * Makefile.in (config.status): Depend on development.sh.
7484 * acinclude.m4: Include libmcheck.m4.
7485 * configure: Regenerate.
7486
7a9a7487
MG
74872013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7488
7489 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7490 attribute inside the parentheses.
7491 (winapi_DebugSetProcessKillOnExit): Ditto.
7492 (winapi_DebugBreakProcess): Ditto.
7493 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 7494
49b64de6
MG
74952013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7496
7497 * notif.h (notif_event): Add a dummy member to avoid compiler
7498 errors.
7499
d5749ee7
PA
75002013-07-01 Pedro Alves <palves@redhat.com>
7501
7502 * hostio.c (HOSTIO_PATH_MAX): Define.
7503 (require_filename, handle_open, handle_unlink, handle_readlink):
7504 Use it.
7505
d8d2a3ee
PA
75062013-07-01 Pedro Alves <palves@redhat.com>
7507
7508 * server.h: Include "pathmax.h".
7509 * linux-low.c: Don't include sys/param.h.
7510 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7511 MAXPATHLEN.
7512 * win32-low.c: Don't include sys/param.h.
7513 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7514
bc7dea8d
PA
75152013-07-01 Pedro Alves <palves@redhat.com>
7516
7517 * event-loop.c: Don't check HAVE_UNISTD_H before including
7518 <unistd.h>.
7519 * gdbreplay.c: Likewise.
7520 * remote-utils.c: Likewise.
7521 * server.c: Likewise.
7522 * configure.ac: Don't check for unistd.h.
7523 * configure: Regenerate.
7524
d6c2da54
TT
75252013-06-28 Tom Tromey <tromey@redhat.com>
7526
7527 * Makefile.in (version.c): Use version.in, not
7528 common/version.in.
7529
257b6bec
MG
75302013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7531
7532 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7533 * configure: Rebuild.
7534 * Makefile.in (version_host, version_target): Get from configure.
7535 (version.c): Use $(version_host) and $(version_target).
7536
86ebe149
DK
75372013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7538
7539 Fix trace-status to output user name without trailing colon.
7540 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7541
f30aa5af
DK
75422013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7543
7544 Fix trace-status to output proper start-time and stop-time.
7545 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7546 output start time and stop time in hex as gdb expects.
7547
28a93511
YQ
75482013-06-26 Pedro Alves <pedro@codesourcery.com>
7549
7550 * tracepoint.c (build_traceframe_info_xml): Output trace state
7551 variables present in the trace buffer.
7552
01208463
TT
75532013-06-24 Tom Tromey <tromey@redhat.com>
7554
7555 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7556 create-version.sh.
7557 (version.o): Remove.
7558 * gdbreplay.c: Include version.h.
7559 (version, host_name): Don't declare.
7560 * server.h: Include version.h.
7561 (version, host_name): Don't declare.
7562
760256f9
PA
75632013-06-12 Pedro Alves <palves@redhat.com>
7564
7565 * linux-x86-low.c (linux_is_elf64): Delete global.
7566 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7567 with local linux_pid_exe_is_elf_64_file use.
7568
030031ee
PA
75692013-06-11 Pedro Alves <palves@redhat.com>
7570
7571 * linux-low.c (regset_disabled, disable_regset): New functions.
7572 (regsets_fetch_inferior_registers)
7573 (regsets_store_inferior_registers): Use them.
7574 (initialize_regsets_info); Don't allocate the disabled_regsets
7575 array here.
7576 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7577 comment.
7578
5da6eb0a
PA
75792013-06-11 Pedro Alves <palves@redhat.com>
7580
7581 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7582 xmalloc.
7583
7e5aaa09
PA
75842013-06-11 Pedro Alves <palves@redhat.com>
7585
7586 * linux-x86-low.c (initialize_low_arch): Call
7587 init_registers_x32_avx_linux.
7588
d878444c
JK
75892013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7590
7591 Fix compatibility with Android Bionic.
7592 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7593 it is not empty.
7594
3aee8918
PA
75952013-06-07 Pedro Alves <palves@redhat.com>
7596
5f2b57b5 7597 PR server/14823
3aee8918
PA
7598 * Makefile.in (OBS): Add tdesc.o.
7599 (IPA_OBJS): Add tdesc-ipa.o.
7600 (tdesc-ipa.o): New rule.
7601 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7602 interface.
7603 * linux-low.c (new_inferior): Delete.
7604 (disabled_regsets, num_regsets): Delete.
7605 (linux_add_process): Adjust to set the new per-process
7606 new_inferior flag.
7607 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7608 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7609 was a stop. When calling arch_setup, switch the current inferior
7610 to the thread that got an event.
7611 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7612 (regsets_fetch_inferior_registers)
7613 (regsets_store_inferior_registers): New regsets_info parameter.
7614 Adjust to use it.
7615 (linux_register_in_regsets): New regs_info parameter. Adjust to
7616 use it.
7617 (register_addr, fetch_register, store_register): New usrregs_info
7618 parameter. Adjust to use it.
7619 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7620 parameter regs_info. Adjust to use it.
7621 (linux_fetch_registers): Get the current inferior's regs_info, and
7622 adjust to use it.
7623 (linux_store_registers): Ditto.
7624 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7625 (initialize_low): Don't initialize the target_regsets here. Call
7626 initialize_low_arch.
7627 * linux-low.h (target_regsets): Delete declaration.
7628 (struct regsets_info): New.
7629 (struct usrregs_info): New.
7630 (struct regs_info): New.
7631 (struct process_info_private) <new_inferior>: New field.
7632 (struct linux_target_ops): Delete the num_regs, regmap, and
7633 regset_bitmap fields. New field regs_info.
7634 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7635 * i387-fp.c (num_xmm_registers): Delete.
7636 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7637 calls to new interface.
7638 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7639 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7640 Infer the number of xmm registers from the regcache's target
7641 description.
7642 * i387-fp.h (num_xmm_registers): Delete.
7643 * inferiors.c (add_thread): Don't install the thread's regcache
7644 here.
7645 * proc-service.c (gregset_info): Fetch the current inferior's
7646 regs_info. Adjust to use it.
7647 * regcache.c: Include tdesc.h.
7648 (register_bytes, reg_defs, num_registers)
7649 (gdbserver_expedite_regs): Delete.
7650 (get_thread_regcache): If the thread doesn't have a regcache yet,
7651 create one, instead of aborting gdbserver.
7652 (regcache_invalidate_one): Rename to ...
7653 (regcache_invalidate_thread): ... this.
7654 (regcache_invalidate_one): New.
7655 (regcache_invalidate): Only invalidate registers of the current
7656 process.
7657 (init_register_cache): Add target_desc parameter, and use it.
7658 (new_register_cache): Ditto. Assert the target description has a
7659 non zero registers_size.
7660 (regcache_cpy): Add assertions. Adjust.
7661 (realloc_register_cache, set_register_cache): Delete.
7662 (registers_to_string, registers_from_string): Adjust.
7663 (find_register_by_name, find_regno, find_register_by_number)
7664 (register_cache_size): Add target_desc parameter, and use it.
7665 (free_register_cache_thread, free_register_cache_thread_one)
7666 (regcache_release, register_cache_size): New.
7667 (register_size): Add target_desc parameter, and use it.
7668 (register_data, supply_register, supply_register_zeroed)
7669 (supply_regblock, supply_register_by_name, collect_register)
7670 (collect_register_as_string, collect_register_by_name): Adjust.
7671 * regcache.h (struct target_desc): Forward declare.
7672 (struct regcache) <tdesc>: New field.
7673 (init_register_cache, new_register_cache): Add target_desc
7674 parameter.
7675 (regcache_invalidate_thread): Declare.
7676 (regcache_invalidate_one): Delete declaration.
7677 (regcache_release): Declare.
7678 (find_register_by_number, register_cache_size, register_size)
7679 (find_regno): Add target_desc parameter.
7680 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7681 declarations.
7682 * remote-utils.c: Include tdesc.h.
7683 (outreg, prepare_resume_reply): Adjust.
7684 * server.c: Include tdesc.h.
7685 (gdbserver_xmltarget): Delete declaration.
7686 (get_features_xml, process_serial_event): Adjust.
7687 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7688 declare.
7689 (struct process_info) <tdesc>: New field.
7690 (ipa_tdesc): Declare.
7691 * tdesc.c: New file.
7692 * tdesc.h: New file.
7693 * tracepoint.c: Include tdesc.h.
7694 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7695 (get_context_regcache): Adjust to pass ipa_tdesc down.
7696 (do_action_at_tracepoint): Adjust to get the register cache size
7697 from the context regcache's description.
7698 (traceframe_walk_blocks): Adjust to get the register cache size
7699 from the current trace frame's description.
7700 (traceframe_get_pc): Adjust to get current trace frame's
7701 description and pass it down.
7702 (gdb_collect): Adjust to get the register cache size from the
7703 IPA's description.
7704 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7705 (gdbserver_xmltarget): Delete.
7706 (initialize_low_tracepoint): Set the ipa's target description.
7707 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7708 (initialize_low_tracepoint): Set the ipa's target description.
7709 * linux-x86-low.c: Include tdesc.h.
7710 [__x86_64__] (is_64bit_tdesc): New.
7711 (ps_get_thread_area, x86_get_thread_area): Use it.
7712 (i386_cannot_store_register): Rename to ...
7713 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7714 (i386_cannot_fetch_register): Rename to ...
7715 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7716 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7717 to new interface.
7718 (target_regsets): Rename to ...
7719 (x86_regsets): ... this.
7720 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7721 interface.
7722 (x86_siginfo_fixup): Use is_64bit_tdesc.
7723 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7724 (tdesc_x32_avx_linux, tdesc_x32_linux)
7725 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7726 Declare.
7727 (x86_linux_update_xmltarget): Delete.
7728 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7729 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7730 (AMD64_LINUX_USER64_CS): New.
7731 (x86_linux_read_description): New, based on
7732 x86_linux_update_xmltarget.
7733 (same_process_callback): New.
7734 (x86_arch_setup_process_callback): New.
7735 (x86_linux_update_xmltarget): New.
7736 (x86_regsets_info): New.
7737 (amd64_linux_regs_info): New.
7738 (i386_linux_usrregs_info): New.
7739 (i386_linux_regs_info): New.
7740 (x86_linux_regs_info): New.
7741 (x86_arch_setup): Reimplement.
7742 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7743 (x86_emit_ops): Ditto.
7744 (the_low_target): Adjust. Install x86_linux_regs_info,
7745 x86_cannot_fetch_register, and x86_cannot_store_register.
7746 (initialize_low_arch): New.
7747 * linux-ia64-low.c (tdesc_ia64): Declare.
7748 (ia64_fetch_register): Adjust.
7749 (ia64_usrregs_info, regs_info): New globals.
7750 (ia64_regs_info): New function.
7751 (the_low_target): Adjust.
7752 (initialize_low_arch): New function.
7753 * linux-sparc-low.c (tdesc_sparc64): Declare.
7754 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7755 Adjust.
7756 (sparc_arch_setup): New function.
7757 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7758 (the_low_target): Adjust.
7759 (initialize_low_arch): New function.
7760 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7761 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7762 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7763 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7764 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7765 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7766 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7767 (tdesc_powerpc_isa205_vsx64l): Declare.
7768 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7769 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7770 (ppc_set_pc, ppc_get_hwcap): Adjust.
7771 (ppc_usrregs_info): Forward declare.
7772 (!__powerpc64__) ppc_regmap_adjusted: New global.
7773 (ppc_arch_setup): Adjust to the current process'es target
7774 description.
7775 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7776 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7777 (ppc_store_evrregset): Adjust.
7778 (target_regsets): Rename to ...
7779 (ppc_regsets): ... this, and make static.
7780 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7781 (ppc_regs_info): New function.
7782 (the_low_target): Adjust.
7783 (initialize_low_arch): New function.
7784 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7785 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7786 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7787 (tdesc_s390x_linux64v2): Declare.
7788 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7789 (s390_fill_gregset, s390_store_last_break): Adjust.
7790 (target_regsets): Rename to ...
7791 (s390_regsets): ... this, and make static.
7792 (s390_get_pc, s390_set_pc): Adjust.
7793 (s390_get_hwcap): New target_desc parameter, and use it.
7794 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7795 (s390_arch_setup): Adjust to set the current process'es target
7796 description. Don't adjust the regmap.
7797 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7798 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7799 (regs_info_3264): New globals.
7800 (s390_regs_info): New function.
7801 (the_low_target): Adjust.
7802 (initialize_low_arch): New function.
7803 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7804 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7805 [__mips64] (init_registers_mips_linux)
7806 (init_registers_mips_dsp_linux): Delete defines.
7807 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7808 (have_dsp): New global.
7809 (mips_read_description): New, based on mips_arch_setup.
7810 (mips_arch_setup): Reimplement.
7811 (get_usrregs_info): New function.
7812 (mips_cannot_fetch_register, mips_cannot_store_register)
7813 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7814 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7815 (target_regsets): Rename to ...
7816 (mips_regsets): ... this, and make static.
7817 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7818 (dsp_regs_info, regs_info): New globals.
7819 (mips_regs_info): New function.
7820 (the_low_target): Adjust.
7821 (initialize_low_arch): New function.
7822 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7823 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7824 Declare.
7825 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7826 (arm_read_description): New, with bits factored from
7827 arm_arch_setup.
7828 (arm_arch_setup): Reimplement.
7829 (target_regsets): Rename to ...
7830 (arm_regsets): ... this, and make static.
7831 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7832 (arm_regs_info): New function.
7833 (the_low_target): Adjust.
7834 (initialize_low_arch): New function.
7835 * linux-m68k-low.c (tdesc_m68k): Declare.
7836 (target_regsets): Rename to ...
7837 (m68k_regsets): ... this, and make static.
7838 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7839 (m68k_regs_info): New function.
7840 (m68k_arch_setup): New function.
7841 (the_low_target): Adjust.
7842 (initialize_low_arch): New function.
7843 * linux-sh-low.c (tdesc_sharch): Declare.
7844 (target_regsets): Rename to ...
7845 (sh_regsets): ... this, and make static.
7846 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7847 (sh_regs_info, sh_arch_setup): New functions.
7848 (the_low_target): Adjust.
7849 (initialize_low_arch): New function.
7850 * linux-bfin-low.c (tdesc_bfin): Declare.
7851 (bfin_arch_setup): New function.
7852 (bfin_usrregs_info, regs_info): New globals.
7853 (bfin_regs_info): New function.
7854 (the_low_target): Adjust.
7855 (initialize_low_arch): New function.
7856 * linux-cris-low.c (tdesc_cris): Declare.
7857 (cris_arch_setup): New function.
7858 (cris_usrregs_info, regs_info): New globals.
7859 (cris_regs_info): New function.
7860 (the_low_target): Adjust.
7861 (initialize_low_arch): New function.
7862 * linux-cris-low.c (tdesc_crisv32): Declare.
7863 (cris_arch_setup): New function.
7864 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7865 (cris_regs_info): New function.
7866 (the_low_target): Adjust.
7867 (initialize_low_arch): New function.
7868 * linux-m32r-low.c (tdesc_m32r): Declare.
7869 (m32r_arch_setup): New function.
7870 (m32r_usrregs_info, regs_info): New globals.
7871 (m32r_regs_info): Adjust.
7872 (initialize_low_arch): New function.
7873 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7874 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7875 (tic6x_usrregs_info): Forward declare.
7876 (tic6x_read_description): New function, based on ...
7877 (tic6x_arch_setup): ... this. Reimplement.
7878 (target_regsets): Rename to ...
7879 (tic6x_regsets): ... this, and make static.
7880 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7881 (tic6x_regs_info): New function.
7882 (the_low_target): Adjust.
7883 (initialize_low_arch): New function.
7884 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7885 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7886 (target_regsets): Rename to ...
7887 (xtensa_regsets): ... this, and make static.
7888 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7889 globals.
7890 (xtensa_arch_setup, xtensa_regs_info): New functions.
7891 (the_low_target): Adjust.
7892 (initialize_low_arch): New function.
7893 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7894 (nios2_arch_setup): Set the current process'es tdesc.
7895 (target_regsets): Rename to ...
7896 (nios2_regsets): ... this.
7897 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7898 (nios2_regs_info): New function.
7899 (the_low_target): Adjust.
7900 (initialize_low_arch): New function.
a261b8f5
PA
7901 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7902 (aarch64_arch_setup): Set the current process'es tdesc.
7903 (target_regsets): Rename to ...
7904 (aarch64_regsets): ... this.
7905 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7906 (aarch64_regs_info): New function.
7907 (the_low_target): Adjust.
7908 (initialize_low_arch): New function.
3aee8918
PA
7909 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7910 globals.
7911 (target_regsets): Rename to ...
7912 (tile_regsets): ... this.
7913 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7914 (tile_regs_info): New function.
7915 (tile_arch_setup): Set the current process'es tdesc.
7916 (the_low_target): Adjust.
7917 (initialize_low_arch): New function.
7918 * spu-low.c (tdesc_spu): Declare.
7919 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7920 * win32-arm-low.c (tdesc_arm): Declare.
7921 (arm_arch_setup): New function.
7922 (the_low_target): Install arm_arch_setup instead of
7923 init_registers_arm.
7924 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7925 (init_windows_x86): Rename to ...
7926 (i386_arch_setup): ... this. Set `win32_tdesc'.
7927 (the_low_target): Adjust.
7928 * win32-low.c (win32_tdesc): New global.
7929 (child_add_thread): Don't create the thread cache here.
7930 (do_initial_child_stuff): Set the new process'es tdesc.
7931 * win32-low.h (struct target_desc): Forward declare.
7932 (win32_tdesc): Declare.
7933 * lynx-i386-low.c (tdesc_i386): Declare global.
7934 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7935 * lynx-low.c (lynx_tdesc): New global.
7936 (lynx_add_process): Set the new process'es tdesc.
7937 * lynx-low.h (struct target_desc): Forward declare.
7938 (lynx_tdesc): Declare global.
7939 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7940 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7941 * nto-low.c (nto_tdesc): New global.
7942 (do_attach): Set the new process'es tdesc.
7943 * nto-low.h (struct target_desc): Forward declare.
7944 (nto_tdesc): Declare.
7945 * nto-x86-low.c (tdesc_i386): Declare.
7946 (nto_x86_arch_setup): Set `nto_tdesc'.
7947
b1fbec62
GB
79482013-06-04 Gary Benson <gbenson@redhat.com>
7949
7950 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7951 to qSupported response when appropriate.
7952 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7953 with nonzero-length annex.
7954 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7955 arguments supplied in annex.
7956
d1ec4ce7
DE
79572013-05-31 Doug Evans <dje@google.com>
7958
ac44adcb 7959 PR server/15594
d1ec4ce7
DE
7960 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7961 64 bits in 64-cross-32 environment.
7962
9b25f2d3
PA
79632013-05-28 Pedro Alves <palves@redhat.com>
7964
7965 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7966 (aarch64-without-fpu.c): Delete rule.
7967 * configure.srv (aarch64*-*-linux*): Remove references to
7968 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7969 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7970 declaration.
7971
6740dc9c
PA
79722013-05-24 Pedro Alves <palves@redhat.com>
7973
7974 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7975 instead of strchr/decode_address. Error if the range isn't split
7976 with a ','. Don't assume there's be a ':' in the action.
7977
c2d6af84
PA
79782013-05-23 Yao Qi <yao@codesourcery.com>
7979 Pedro Alves <palves@redhat.com>
7980
7981 * linux-low.c (lwp_in_step_range): New function.
7982 (linux_wait_1): If the thread was range stepping and stopped
7983 outside the stepping range, report the stop to GDB. Otherwise,
7984 continue stepping. Add range stepping debug output.
7985 (linux_set_resume_request): Copy the step range from the resume
7986 request to the lwp.
7987 (linux_supports_range_stepping): New.
7988 (linux_target_ops) <supports_range_stepping>: Set to
7989 linux_supports_range_stepping.
7990 * linux-low.h (struct linux_target_ops)
7991 <supports_range_stepping>: New field.
7992 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7993 * linux-x86-low.c (x86_supports_range_stepping): New.
7994 (the_low_target) <supports_range_stepping>: Set to
7995 x86_supports_range_stepping.
7996 * server.c (handle_v_cont): Handle 'r' action.
7997 (handle_v_requests): Append ";r" if the target supports range
7998 stepping.
7999 * target.h (struct thread_resume) <step_range_start,
8000 step_range_end>: New fields.
8001 (struct target_ops) <supports_range_stepping>:
8002 New field.
8003 (target_supports_range_stepping): New macro.
8004
58794e1a
JB
80052013-05-17 Joel Brobecker <brobecker@adacore.com>
8006
8007 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8008 confusion in comment.
8009
d631c5a7
JB
80102013-05-17 Joel Brobecker <brobecker@adacore.com>
8011
8012 * lynx-low.c (struct process_info_private): New type.
8013 (lynx_add_process): New function.
8014 (lynx_create_inferior, lynx_attach): Replace calls to
8015 add_process by calls to lynx_add_process.
8016 (lynx_resume): If PTID is null, then try using
8017 current_process()->private->last_wait_event_ptid.
8018 Add comments.
8019 (lynx_clear_inferiors): Delete. The contents of that function
8020 has been inlined in lynx_mourn;
8021 (lynx_wait_1): Save the ptid in the process's private data.
8022 (lynx_mourn): Free the process' private data. Replace call
8023 to lynx_clear_inferiors by call to clear_inferiors.
8024
96f7a20f
YQ
80252013-05-17 Yao Qi <yao@codesourcery.com>
8026
8027 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8028 the right place.
8029
db0dfaa0
LM
80302013-05-16 Luis Machado <lgustavo@codesourcery.com>
8031
8032 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8033 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8034 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8035 PT_TEXT_END_ADDR guards. Update comments.
8036 (linux_target_op) <read_offsets>: Conditionally define to
8037 linux_read_offsets if the target is UCLIBC and if it defines
8038 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8039
68f5f838
SL
80402013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8041 Andrew Jenner <andrew@codesourcery.com>
8042
8043 * Makefile.in (SFILES): Add linux-nios2-low.c.
8044 (clean): Add action to delete nios2-linux.c.
8045 (nios2-linux.c): New rule.
8046 * configure.srv: Add nios2*-*-linux*.
8047 * linux-nios2-low.c: New.
8048
1ebff1fd
HAQ
80492013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8050
8051 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8052
f6150862
HZ
80532013-04-25 Hui Zhu <hui@codesourcery.com>
8054
8055 PR gdb/15186
f6150862
HZ
8056 * ax.c (ax_printf): Add fflush.
8057
614c279d
TT
80582013-04-22 Tom Tromey <tromey@redhat.com>
8059
8060 * Makefile.in (SFILES): Add filestuff.c.
8061 (OBS): Add filestuff.o.
8062 (filestuff.o): New target.
8063 * config.in, configure: Rebuild.
8064 * configure.ac: Check for fdwalk, pipe2.
8065
7d4e5717
PA
80662013-04-17 Pedro Alves <palves@redhat.com>
8067
8068 * configure.ac (USE_THREAD_DB): Delete variable.
8069 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8070 Don't AC_SUBST USE_THREAD_DB.
8071 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8072 * config.in, configure: Regenerate.
8073
d5c93e41
PA
80742013-04-16 Pedro Alves <palves@redhat.com>
8075
8076 * linux-low.h (struct lwp_info) <thread_known>: Move under
8077 the USE_THREAD_DB #ifdef.
8078
04f5fe89
PA
80792013-04-16 Pedro Alves <palves@redhat.com>
8080
8081 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8082 (linux-low.o): Delete rule.
8083 * linux-low.h: Always include "gdb_thread_db.h" instead of
8084 conditionally including thread_db.h.
8085 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8086 HAVE_THREAD_DB_H.
8087
480b27bf
JK
80882013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8089
8090 * Makefile.in (install-only): Fix make install regression.
8091
43662968
JK
80922013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8093
8094 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8095 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8096 installation.
8097 * gdbserver.1: Remove.
8098
3e74e146
PA
80992013-03-22 Pedro Alves <palves@redhat.com>
8100
8101 * linux-low.c (handle_extended_wait): Don't call
8102 linux_enable_event_reporting.
8103
a8347a2a
TT
81042013-03-15 Tony Theodore <tonyt@logyst.com>
8105
8106 PR build/9098:
8107 * Makefile.in (SHELL): Use @SHELL@.
8108
eeb56fa7
SDJ
81092013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8110
8111 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8112 compiler warning.
8113
4fa7e2ff
JB
81142013-03-13 Joel Brobecker <brobecker@adacore.com>
8115
8116 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8117 Remove extraneous NULL element.
8118
8ddb1965
YQ
81192013-03-13 Yao Qi <yao@codesourcery.com>
8120
8121 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8122 'V' block in trace frame.
8123
9accd112
MM
81242013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8125
8126 * target.h (struct target_ops): Add btrace ops.
8127 (target_supports_btrace): New macro.
8128 (target_enable_btrace): New macro.
8129 (target_disable_btrace): New macro.
8130 (target_read_btrace): New macro.
8131 * gdbthread.h (struct thread_info): Add btrace field.
8132 * server.c: Include btrace-common.h.
8133 (handle_btrace_general_set): New function.
8134 (handle_btrace_enable): New function.
8135 (handle_btrace_disable): New function.
8136 (handle_general_set): Call handle_btrace_general_set.
8137 (handle_qxfer_btrace): New function.
8138 (struct qxfer qxfer_packets[]): Add btrace entry.
8139 * inferiors.c (remove_thread): Disable btrace.
8140 * linux-low: Include linux-btrace.h.
8141 (linux_low_enable_btrace): New function.
8142 (linux_low_read_btrace): New function.
8143 (linux_target_ops): Add btrace ops.
8144 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8145 Add srv_linux_btrace=yes.
8146 (x86_64-*-linux*): Add linux-btrace.o.
8147 Add srv_linux_btrace=yes.
8148 * configure.ac: Define HAVE_LINUX_BTRACE.
8149 * config.in: Regenerated.
8150 * configure: Regenerated.
8151
5cc22e4c
MM
81522013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8153
8154 * server.c (handle_qxfer): Preserve error message if -3 is
8155 returned.
8156 (qxfer): Document the -3 return value.
8157
7c97f91e
MM
81582013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8159
8160 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8161 (linux_btrace_h): New variable.
8162 (linux-btrace.o): New rule.
8163
be9a119c 81642013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
8165 Hafiz Abid Qadeer <abidh@codesourcery.com>
8166
8167 * tracepoint.c (trace_buffer_size): New global.
8168 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8169 (init_trace_buffer): Change to one-argument function. Allocate
8170 trace buffer memory.
8171 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8172 handle QTBuffer:size packet.
8173 (cmd_bigqtbuffer_size): New function.
8174 (initialize_tracepoint): Call init_trace_buffer with
8175 DEFAULT_TRACE_BUFFER_SIZE.
8176 * server.c (handle_query): Add QTBuffer:size in the
8177 supported packets.
8178
e64f7499
YQ
81792013-03-07 Yao Qi <yao@codesourcery.com>
8180
8181 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8182 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8183 of -1.
8184 (cmd_qtsp): Adjust condition. Do post increment.
8185 Set cur_action and cur_step_action back to 0.
8186
f0ae6fc3
PA
81872013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8188
8189 PR server/15236
8190 * linux-low.c (linux_write_memory): Return early success if LEN is
8191 zero.
8192
b5b0b0af
CV
81932013-03-05 Corinna Vinschen <vinschen@redhat.de>
8194
334ad4a8 8195 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 8196
589bc927
TT
81972013-02-28 Tom Tromey <tromey@redhat.com>
8198
8199 * configure.ac: Invoke AC_SYS_LARGEFILE.
8200 * configure, config.in: Rebuild.
8201
dfe07582
CV
82022013-02-28 Corinna Vinschen <vinschen@redhat.com>
8203
8204 * win32-low.c: Throughout, fix format strings and casts of
8205 printf-like functions to avoid type related warnings on all
8206 platforms.
8207 (get_child_debug_event): Print dwDebugEventCode as hex since
8208 that's how it's usually documented.
8209
736cd585
YQ
82102013-02-28 Yao Qi <yao@codesourcery.com>
8211
8212 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8213 pulongest.
8214
e1f58301
JW
82152013-02-27 Jiong Wang <jiwang@tilera.com>
8216
8217 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8218 (reg-tilegx32.c): New rule.
8219 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8220 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8221 different register info initializer according to elf class.
8222 (init_registers_tilgx32): New function. The tilegx32 register info
8223 initializer.
8224 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8225 (tile_store_gregset): Likewise.
8226
d171ca78
YQ
82272013-02-27 Yao Qi <yao@codesourcery.com>
8228
8229 * server.c (process_point_options): Print debug message when
8230 debug_threads is true.
8231
282bbdf3
YQ
82322013-02-26 Yao Qi <yao@codesourcery.com>
8233
8234 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8235
aca22551
PA
82362013-02-19 Pedro Alves <palves@redhat.com>
8237 Kai Tietz <ktietz@redhat.com>
8238
8239 PR gdb/15161
8240
8241 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8242 instead of strtoul to extract address from packet.
8243 (process_serial_event) <'z'>: Likewise.
8244
4f3cee1c
YQ
82452013-02-18 Yao Qi <yao@codesourcery.com>
8246
8247 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8248
8e1d55a3
PA
82492013-02-14 Pedro Alves <palves@redhat.com>
8250
8251 Plug memory leak.
8252
8253 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8254 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8255
458820da
PA
82562013-02-14 Pedro Alves <palves@redhat.com>
8257
8258 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8259
baea0dae
PA
82602013-02-14 Pedro Alves <palves@redhat.com>
8261
8262 * tracepoint.c (save_string): Delete.
8263 (add_tracepoint_action): Use savestring instead of save_string.
8264
0b1afbb3
PA
82652013-02-12 Pedro Alves <palves@redhat.com>
8266
8267 * linux-xtensa-low.c: Ditto.
8268 * xtensa-xtregs.c: Ditto.
8269
8a4ac37e
PA
82702013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8271
8272 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8273 thread_db.
8274
148de6bb
MS
82752013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8276
8277 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8278 aarch64_num_wp_regs and aarch64_num_bp_regs to
8279 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8280
55fac6e0
MS
82812013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8282
8283 * linux-aarch64-low.c (ps_get_thread_area): Replace
8284 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8285
176eb98c
MS
82862013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8287 Marcus Shawcroft <marcus.shawcroft@arm.com>
8288 Nigel Stephens <nigel.stephens@arm.com>
8289 Yufeng Zhang <yufeng.zhang@arm.com>
8290
8291 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8292 (aarch64.c, aarch64-without-fpu.c): New targets.
8293 * configure.srv (aarch64*-*-linux*): New.
8294 * linux-aarch64-low.c: New file.
8295
56f7af9c
MS
82962013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8297
43aaf8b6 8298 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
8299 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8300 (dequeue_one_deferred_signal, linux_resume_one_thread)
8301 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8302 (linux_tracefork_grandchild, linux_test_for_tracefork)
8303 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8304 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8305 where the argument is 0.
8306
60f662b0
YQ
83072013-01-25 Yao Qi <yao@codesourcery.com>
8308
8309 * event-loop.c: Include "queue.h".
8310 (gdb_event_p): New typedef.
8311 (struct gdb_event) <next_event>: Remove.
8312 (event_queue): Change to QUEUE(gdb_event_p).
8313 (async_queue_event): Remove.
8314 (gdb_event_xfree): New.
8315 (initialize_event_loop): New.
8316 (process_event): Use API from QUEUE.
8317 (wait_for_event): Likewise.
8318 * server.c (main): Call initialize_event_loop.
8319 * server.h (initialize_event_loop): Declare.
8320
5ae4861a
YQ
83212013-01-18 Yao Qi <yao@codesourcery.com>
8322
8323 * ax.h (struct eval_agent_expr_context): New.
8324 (gdb_eval_agent_expr): Update declaration.
8325 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8326 TFRAME. Add new argument CTX.
8327 * server.h (struct eval_agent_expr_context): Declare.
8328 (agent_mem_read, agent_tsv_read): Update declaration.
8329 (agent_mem_read_string): Likewise.
8330 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8331 (add_traceframe_block): Add new argument TPOINT.
8332 Increase TPOINT->traceframe_usage.
8333 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8334 eval_tracepoint_agent_expr.
8335 (condition_true_at_tracepoint): Likewise.
8336 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8337 (agent_mem_read_string, agent_tsv_read): Likewise.
8338
85e00e85
YQ
83392013-01-16 Yao Qi <yao@codesourcery.com>
8340
8341 * linux-low.c (linux_resume_one_lwp): Don't check
8342 'lwp->bp_reinsert != 0'.
8343
4039cf45
JB
83442013-01-07 Joel Brobecker <brobecker@adacore.com>
8345 Pedro Alves <palves@redhat.com>
8346
8347 * lynx-low.c (ptrace_request_to_str): Define a temporary
8348 macro and use it to simplify this function's implementation.
8349
9044dee2
JB
83502013-01-07 Joel Brobecker <brobecker@adacore.com>
8351
8352 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8353 sets errno.
8354
e6352c8f
JB
83552013-01-07 Joel Brobecker <brobecker@adacore.com>
8356
8357 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8358
50681a27
JB
83592013-01-07 Joel Brobecker <brobecker@adacore.com>
8360
8361 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8362
3f6e77ef
JB
83632013-01-07 Joel Brobecker <brobecker@adacore.com>
8364
8365 * lynx-low.c (lynx_resume): Use the resume_info parameter
8366 to determine the ptid for the lynx_ptrace call, unless
8367 it is equal to minus_one_ptid, in which case we use the
8368 ptid of the current_inferior.
8369 (lynx_wait_1): After having received a thread create/exit
8370 event, resume the inferior's execution using the signaling
8371 thread's ptid, rather than the old ptid.
8372
7fda33ae
JB
83732013-01-07 Joel Brobecker <brobecker@adacore.com>
8374
8375 * lynx-low.c (lynx_resume): Delete variable ret.
8376
b9786c74
JB
83772013-01-01 Joel Brobecker <brobecker@adacore.com>
8378
8379 * gdbreplay.c (gdbreplay_version): Update copyright year.
8380 * server.c (gdbserver_version): Likewise.
8381
8b93d60f
JB
83822012-12-17 Joel Brobecker <brobecker@adacore.com>
8383
8384 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8385 new thread.
8386
037335a7
JB
83872012-12-17 Joel Brobecker <brobecker@adacore.com>
8388
8389 * lynx-low.c (ptrace_request_to_str): Add handling for
8390 PTRACE_GETTRACESIG.
8391
52d4cbd8
JB
83922012-12-17 Joel Brobecker <brobecker@adacore.com>
8393
8394 * lynx-low.c (lynx_attach): Delete variable new_process.
8395
ab8f6ca9
JB
83962012-12-17 Joel Brobecker <brobecker@adacore.com>
8397
8398 * lynx-low.c (lynx_create_inferior): Delete variable
8399 new_process.
8400
78cbc024
JB
84012012-12-17 Joel Brobecker <brobecker@adacore.com>
8402
8403 * lynx-low.c (ptrace_request_to_str): Do not handle
8404 PTRACE_GETTHREADLIST if this macro does not exist.
8405
14a00470
YQ
84062012-12-15 Yao Qi <yao@codesourcery.com>
8407
8408 * Makefile.in (OBS): Add notif.o.
8409 * notif.c, notif.h: New.
8410 * server.c: Include "notif.h".
8411 (struct vstop_notif) <next>: Remove.
8412 <base>: New field.
8413 (queue_stop_reply): Update.
8414 (push_event, send_next_stop_reply): Remove.
8415 (discard_queued_stop_replies): Update.
8416 (notif_stop): New variable.
8417 (handle_v_stopped): Remove.
8418 (handle_v_requests): Don't call handle_v_stopped. Call
8419 handle_ack_notif instead.
8420 (queue_stop_reply_callback): Call notif_event_enque instead
8421 of queue_stop_reply.
8422 (handle_status): Don't call send_next_stop_reply, call
8423 notif_write_event instead.
8424 (kill_inferior_callback): Likewise.
8425 (detach_or_kill_inferior_callback): Likewise.
8426 (main): Call initialize_notif.
8427 (process_serial_event): Call QUEUE_is_empty.
8428 (handle_target_event): Call notif_push instead of push event.
8429 * server.h (push_event): Remove declaration.
8430
61c125b9
TT
84312012-12-10 Tom Tromey <tromey@redhat.com>
8432
8433 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8434 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8435 macros.
8436 (.c.o): Rewrite.
8437 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8438 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8439 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8440 (amd64-linux-ipa.o, ax.o): Rewrite.
8441 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8442 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8443 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8444 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8445 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8446 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8447 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8448 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8449 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8450 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8451 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8452 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8453 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8454 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8455 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8456 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8457 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8458 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8459 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8460 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8461 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8462 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8463 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8464 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8465 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8466 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8467 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8468 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8469 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8470 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8471 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8472 (reg-tilegx.o): Remove.
8473 (all_object_files): New macro.
8474 Include .deps files.
8475 * aclocal.m4, configure: Rebuild.
8476 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8477 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8478 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8479
e90e9ad9
TT
84802012-12-05 Tom Tromey <tromey@redhat.com>
8481
8482 PR gdb/14917:
8483 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8484
02d403bf 84852012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
8486
8487 * configure.ac: Check for linux/perf_event.h.
8488 * config.in: Regenerated.
8489 * configure: Regenerated.
8490
0270a750
PA
84912012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8492
8493 * hostio.c (handle_readlink): Decrease buffer size
8494 parameter passed to readlink by one byte.
8495
8c29b58e
YQ
84962012-11-26 Yao Qi <yao@codesourcery.com>
8497
8498 * configure.ac (build_warnings): Append '-Wempty-body'.
8499 * configure: Regenerated.
8500 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8501 body.
8502
8bdce1ff
PM
85032012-11-15 Pierre Muller <muller@sourceware.org>
8504
8505 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8506 * config.in: Regenerate.
8507 * configure: Regenerate.
8508 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8509 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8510 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8511 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8512 header.
8513 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8514 instead of <sys/wait.h> header.
8515 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8516
02d403bf 85172012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
8518
8519 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8520 (various make rules): Remove -DGDBSERVER
8521
fbd5db48
YQ
85222012-11-09 Yao Qi <yao@codesourcery.com>
8523
8524 * spu-low.c (current_ptid): Move it to ..
8525 * gdbthread.h: ... here. New.
8526 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8527 * server.c (myresume, process_serial_event): Likewise.
8528 * thread-db.c (thread_db_find_new_threads): Likewise.
8529 * tracepoint.c (run_inferior_command): Likewise.
8530
b3dc46ff
AB
85312012-10-01 Andrew Burgess <aburgess@broadcom.com>
8532
8533 * server.c (handle_search_memory_1): Include access length in
8534 warning message.
8535
07c04788
HPN
85362012-09-05 Michael Brandt <michael.brandt@axis.com>
8537
8538 * linux-crisv32-low.c: Fix compile errors.
8539
918d227b
YQ
85402012-09-04 Yao Qi <yao@codesourcery.com>
8541
8542 * tracepoint.c (cmd_qtsv): Adjust debug message.
8543 Don't check CUR_TPOINT.
8544
18c1b81a
YQ
85452012-08-28 Yao Qi <yao@codesourcery.com>
8546
8547 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8548 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8549 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8550 Remove declarations of xmalloc, xreallloc, xstrdup and
8551 freeargv.
8552 * Makefile.in (libiberty_h): New.
8553 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8554 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8555
dc82f37b
YQ
85562012-08-23 Yao Qi <yao@codesourcery.com>
8557
8558 * server.h: Remove declaration of 'xsnprintf'.
8559
406b1477
KS
85602012-08-22 Keith Seitz <keiths@redhat.com>
8561
8562 * server.h: Include build-gnulib-gbserver/config.h.
8563 * gdbreplay.c: Likewise.
8564
e6712ff1
DE
85652012-08-08 Doug Evans <dje@google.com>
8566
8567 * Makefile.in (SFILES): Add gdb_vecs.c.
8568 (OBS): Add gdb_vecs.o.
8569 (gdb_vecs_h, host_defs_h): New variables.
8570 (thread-db.o): Add $(gdb_vecs_h) dependency.
8571 (gdb_vecs.o): New rule.
8572 * thread-db.c: #include "gdb_vecs.h".
8573 (thread_db_load_search): Use a vector to iterate over path elements.
8574 Handle text appearing after "$pdir".
8575
8576 * configure.ac: Add check for strstr.
8577 * config.in: Regenerate.
8578 * configure: Regenerate.
8579
7c3270ae
UW
85802012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8581
8582 * hostio.c (handle_pread): If pread fails, fall back to attempting
8583 lseek/read.
8584 (handle_pwrite): Likewise for pwrite.
8585
b62e2b27
UW
85862012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8587
8588 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8589 between unsupported TYPE and unimplementable ADDR/LEN combination.
8590 (arm_insert_point): Act on new return value.
8591
78a99e91
PA
85922012-07-31 Pedro Alves <palves@redhat.com>
8593
8594 * server.c (process_point_options): Only skip tokens if we find
8595 one that is unrecognized. Don't treat 'X' specially while
8596 skipping unrecognized tokens.
8597
fcf303ab
UW
85982012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8599
8600 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8601 to 4-byte-align HW breakpoint addresses for Thumb.
8602
7255706c
YQ
86032012-07-27 Yao Qi <yao@codesourcery.com>
8604
8605 PR remote/14161.
8606
8607 * server.h: Declare gdb_agent_about_to_close.
8608 * target.c (kill_inferior): Include "agent.h".
8609 New. Send command 'kill'.
8610 * target.h (kill_inferior): Removed macro.
8611 * tracepoint.c (gdb_agent_about_to_close): New.
8612 (gdb_agent_helper_thread): Handle command 'close'.
8613 Wait endlessly until the inferior stops.
8614 Install gdb_agent_remove_socket to atexit hook.
8615 (agent_socket_name): New static variable.
8616 (gdb_agent_socket_init): Replace local variable 'name' with
8617 'agent_socket_name'.
8618 (gdb_agent_remove_socket): New.
8619
5a3f286f
YQ
86202012-07-27 Yao Qi <yao@codesourcery.com>
8621
8622 * server.c (process_point_options): Stop at 'X' when parsing.
8623
961bd387
ME
86242012-07-19 Michael Eager <eager@eagercon.com>
8625
a261b8f5 8626 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
8627 to hw_execute.
8628 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8629 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8630 hardware breakpoint.
8631
aa7c7447
JK
86322012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8633
8634 * gdbserver/linux-low.c (initialize_low): Call
8635 linux_ptrace_init_warnings.
8636
7f216e7c
DE
86372012-07-02 Doug Evans <dje@google.com>
8638
8639 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8640 pointer to int.
8641
d3ce09f5
SS
86422012-07-02 Stan Shebs <stan@codesourcery.com>
8643
8644 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8645 (ax.o): Add it to build rule.
8646 (ax-ipa.o): Ditto.
8647 (OBS): Add format.o.
8648 (IPA_OBS): Add format.o.
8649 * server.c (handle_query): Claim support for breakpoint commands.
8650 (process_point_options): Add command case.
8651 (process_serial_event): Leave running if there are printfs in
8652 effect.
8653 * mem-break.h (any_persistent_commands): Declare.
8654 (add_breakpoint_commands): Declare.
8655 (gdb_no_commands_at_breakpoint): Declare.
8656 (run_breakpoint_commands): Declare.
8657 * mem-break.c (struct point_command_list): New struct.
8658 (struct breakpoint): New field command_list.
8659 (any_persistent_commands): New function.
8660 (add_commands_to_breakpoint): New function.
8661 (add_breakpoint_commands): New function.
8662 (gdb_no_commands_at_breakpoint): New function.
8663 (run_breakpoint_commands): New function.
8664 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8665 locally.
8666 * ax.c: Include format.h.
8667 (ax_printf): New function.
8668 (gdb_eval_agent_expr): Add printf opcode.
8669
2f8f6aed
YQ
86702012-06-13 Yao Qi <yao@codesourcery.com>
8671
8672 * server.c (start_inferior): Remove duplicated writes to fields
8673 'last_resume_kind' and 'last_status' of 'current_inferior'.
8674
0c9070b3
YQ
86752012-06-12 Yao Qi <yao@codesourcery.com>
8676 Pedro Alves <palves@redhat.com>
8677
8678 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8679 comment.
8680 * server.c (handle_v_cont): Extend comment.
8681
c52daf70
YQ
86822012-06-11 Yao Qi <yao@codesourcery.com>
8683
8684 * linux-low.c (linux_attach): Add 'static'.
8685
d38bbb0a
YQ
86862012-06-06 Yao Qi <yao@codesourcery.com>
8687
8688 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8689
89dc0afd
JK
86902012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8691
8692 Fix gcc -flto compilation warning.
8693 * server.c (main): Make variable multi_mode and attach volatile.
8694
75f62ce7
TJB
86952012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8696
8697 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8698 if the platform doesn't know about it.
8699
65f479b6
PA
87002012-05-30 Jeff Kenton <jkenton@tilera.com>
8701
8702 * Makefile.in (SFILES): Add linux-tile-low.c.
8703 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8704 * configure.srv: Handle tilegx-*-linux*.
8705 * linux-tile-low.c: New file.
8706
0c5bf5a9
JK
87072012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8708
8709 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8710
a493e3e2
PA
87112012-05-24 Pedro Alves <palves@redhat.com>
8712
8713 PR gdb/7205
8714
43aaf8b6 8715 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 8716
2ea28649
PA
87172012-05-24 Pedro Alves <palves@redhat.com>
8718
8719 PR gdb/7205
8720
8721 Replace target_signal with gdb_signal throughout.
8722
8d409d16
MR
87232012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8724
8725 * linux-low.c (linux_store_registers): Avoid the copying sequence
8726 when no data has been retrieved by ptrace.
8727
23512c01
MGD
87282012-05-22 Will Deacon <will.deacon@arm.com>
8729
8730 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8731 Include asm/ptrace.h.
8732 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8733 already defined.
8734
4934b29e
MR
87352012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8736
8737 * linux-low.c (linux_store_registers): Don't re-retrieve data
8738 with ptrace that has already been obtained from /proc. Always
8739 copy any data retrieved with ptrace to the buffer supplied.
8740
bde24c0a
PA
87412012-05-11 Yao Qi <yao@codesourcery.com>
8742 Pedro Alves <palves@redhat.com>
8743
8744 * linux-low.c (enum stopping_threads_kind): New.
8745 (stopping_threads): Change type to `enum stopping_threads_kind'.
8746 (handle_extended_wait): If stopping and suspending threads, leave
8747 the new_lwp suspended too.
8748 (linux_wait_for_event): Adjust.
8749 (stop_all_lwps): Set `stopping_threads' to
8750 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8751 whether we're suspending threads or just stopping them. Assert no
8752 recursion happens.
8753
623b6bdf
YQ
87542012-04-29 Yao Qi <yao@codesourcery.com>
8755
8756 * server.h: Move some code to ...
8757 * gdbthread.h: ... here. New.
8758 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8759 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8760 (nto-low.o, win32-low.o): Likewise.
8761 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8762 * regcache.c, remote-utils.c, server.c: Likewise.
8763 * target.c, tracepoint.c, win32-low.c: Likewise.
8764
f15f9948
TJB
87652012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8766
8767 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8768 (PTRACE_ARG4_TYPE): Likewise.
8769 (PTRACE_XFER_TYPE): Likewise.
8770 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8771 ptrace to PTRACE_ARG3_TYPE.
8772 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8773 (PTRACE_ARG4_TYPE): Likewise.
8774 (PTRACE_XFER_TYPE): Likewise.
8775 (linux_detach_one_lwp): Cast fourth argument of
8776 ptrace to long then PTRACE_ARG4_TYPE.
8777 (regsets_fetch_inferior_registers): Cast third argument of
8778 ptrace to long then PTRACE_ARG3_TYPE.
8779 (regsets_store_inferior_registers): Likewise.
8780
38ea300a
PA
87812012-04-20 Pedro Alves <palves@redhat.com>
8782
8783 * configure: Regenerate.
8784
c971b7fa
PA
87852012-04-19 Pedro Alves <palves@redhat.com>
8786
43aaf8b6 8787 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 8788 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
8789 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8790 (all, install-only, uninstall, clean-info, all-lib, clean): No
8791 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8792 (maintainer-clean realclean distclean): Use subdir_do.
8793 (subdir_do): New.
8794 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 8795 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
8796 * acinclude.m4: Include acx_configure_dir.m4.
8797 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8798 calls. Call AC_PROG_RANLIB. Configure gnulib using
8799 ACX_CONFIGURE_DIR.
8800 (GNULIB): New.
8801 (GNULIB_STDINT_H): Adjust.
8802 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8803 * gdbreplay.c: Include build-gnulib/config.h.
8804 * server.h: Likewise.
8805 * aclocal.m4: Regenerate.
8806 * config.in: Regenerate.
8807 * configure: Regenerate.
c971b7fa 8808
809277f8
PA
88092012-04-19 Pedro Alves <palves@redhat.com>
8810
8811 * Makefile.in (LIBGNU, INCGNU): Adjust.
8812 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8813 (all, install-only, uninstall, clean-info, all-lib, clean)
8814 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8815 * configure.ac: Adjust AC_OUTPUT output.
8816 * aclocal.m4: Regenerate.
8817 * configure: Regenerate.
8818
fd9bb8b8
PA
88192012-04-19 Pedro Alves <palves@redhat.com>
8820
8821 * Makefile.in (generated_files): New.
8822 (server_h): Remove the explicit dependency on config.h, and depend
8823 on $generated_files.
8824
1c298c66
PA
88252012-04-19 Pedro Alves <palves@redhat.com>
8826
8827 * Makefile.in (INCGNU): Add -Ignulib.
8828
57c4b50b
PA
88292012-04-19 Pedro Alves <palves@redhat.com>
8830
8831 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8832 (INCGNU): ... this, and spell out -I here.
8833 (GNULIB_LIB): Rename to ...
8834 (LIBGNU): ... this.
8835 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8836
1030e047
PA
88372012-04-19 Pedro Alves <palves@redhat.com>
8838
8839 * config.in: Regenerate.
8840
447d4319
PA
88412012-04-19 Pedro Alves <palves@redhat.com>
8842
8843 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8844 * server.h (memmem): Remove declaration.
8845 * config.in: Regenerate.
8846 * configure: Regenerate.
8847
aad9eab9
YQ
88482012-04-19 Yao Qi <yao@codesourcery.com>
8849
8850 * Makefile.in (SFILES): Add common/vec.c.
8851 (OBS): Add vec.o.
8852 (vec.o): New rule.
8853
3e10640f
YQ
88542012-04-19 Yao Qi <yao@codesourcery.com>
8855
8856 * remote-utils.c (prepare_resume_reply): Replace with macro
8857 target_core_of_thread.
8858 * server.c (handle_qxfer_threads_proper): Likewise.
8859 * target.h (traget_core_of_thread): New macro.
8860
71622373
PA
88612012-04-18 Pedro Alves <palves@redhat.com>
8862
8863 * aclocal.m4: Regenerate.
8864 * configure: Regenerate.
8865
80d26939
YQ
88662012-04-16 Yao Qi <yao@codesourcery.com>
8867
8868 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8869 duplicated on address.
8870
42476b70
YQ
88712012-04-16 Yao Qi <yao@codesourcery.com>
8872
8873 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8874 (struct tracepoint_action_ops) <send>: New field.
8875 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8876 (agent_expr_send, x_tracepoint_action_send): New.
8877 (l_tracepoint_action_send): New.
8878 (cmd_qtdp): Download and install tracepoint
8879 according to `use_agent'.
8880 (run_inferior_command): Add one more parameter `len'.
8881 Update callers.
8882 (tracepoint_send_agent): New.
8883 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8884
7bc83639
YQ
88852012-04-16 Yao Qi <yao@codesourcery.com>
8886
8887 * tracepoint.c (download_tracepoints): Moved to ...
8888 (cmd_qtstart): ... here.
8889
5f18041e
YQ
88902012-04-14 Yao Qi <yao@codesourcery.com>
8891
8892 * tracepoint.c: Include inttypes.h.
8893 (struct collect_memory_action): Use sized types.
8894 (struct tracepoint): Likewise.
8895 (cmd_qtdp, stop_tracing): Update print specifiers.
8896 (cmd_qtp, response_tracepoint): Likewise.
8897 (collect_data_at_tracepoint): Likewise.
8898 (collect_data_at_step): Likewise.
8899
55a8c076
YQ
89002012-04-14 Yao Qi <yao@codesourcery.com>
8901
8902 Import gnulib module inttypes.
8903 * aclocal.m4, config.in, configure: Regenerated.
8904
dc750257
YQ
89052012-04-14 Yao Qi <yao@codesourcery.com>
8906
8907 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8908 Makefile and config.status at last.
8909
0ab5faf9
YQ
89102012-04-13 Yao Qi <yao@codesourcery.com>
8911
8912 * tracepoint.c: Include stdint.h unconditionally.
8913
18f5fd81
TJB
89142012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8915
8916 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8917 on BFD_HAVE_SYS_PROCFS_TYPE.
8918 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8919 * configure: Regenerate.
8920 * config.in: Likewise.
8921
4d47af5c
L
89222012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8923
8924 * Makefile.in (clean): Also remove x32.c x32-linux.c
8925 x32-avx.c x32-avx-linux.c.
8926 (x32.o): New target.
8927 (x32.c): Likewise.
8928 (x32-linux.o): Likewise.
8929 (x32-linux.c): Likewise.
8930 (x32-avx.o): Likewise.
8931 (x32-avx.c): Likewise.
8932 (x32-avx-linux.o): Likewise.
8933 (x32-avx-linux.c): Likewise.
8934
8935 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8936 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8937 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8938 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8939 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8940 i386/x32-avx-linux.xml.
8941
8942 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8943 (init_registers_x32_avx_linux): Likwise.
8944 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8945 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8946
ecedbe58
PA
89472012-04-13 Pedro Alves <palves@redhat.com>
8948
8949 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8950 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8951 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8952 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8953 the sub-make.
8954
c92b5177
L
89552012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8956
8957 * linux-x86-low.c (compat_x32_clock_t): New.
8958 (compat_x32_siginfo_t): Likewise.
8959 (compat_x32_siginfo_from_siginfo): Likewise.
8960 (siginfo_from_compat_x32_siginfo): Likewise.
8961 (linux_is_elf64): Likewise.
8962 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8963 and siginfo_from_compat_x32_siginfo for x32.
8964 (x86_arch_setup): Set linux_is_elf64.
8965
214d508e
L
89662012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8967
8968 PR gdb/13969
8969 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8970 e_machine field.
8971 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8972 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8973 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8974 compatible with process.
8975
c9a1864a
YQ
89762012-04-12 Yao Qi <yao@codesourcery.com>
8977
8978 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8979 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8980 (install-only, install-info, clean): Handle sub dir gnulib.
8981 (all-lib, am--refresh): New targets.
8982 (memmem.o): Remove target.
8983 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8984 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8985 (AC_REPLACE_FUNCS): Remove memmem.
8986 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8987 (AC_OUTPUT): Generate Makefile in gnulib/.
8988 * aclocal.m4, config.in, configure: Regenerated.
8989
367ba2c2
MR
89902012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8991
8992 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8993
9d236627
PA
89942012-04-05 Pedro Alves <palves@redhat.com>
8995
8996 -Werror=strict-aliasing
8997
8998 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8999 pointer.
9000
111217b3
PA
90012012-04-04 Pedro Alves <palves@redhat.com>
9002
9003 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9004 (sparc_store_gregset_from_stack, sparc_store_gregset)
9005 (sparc_breakpoint_at): Fix formatting.
9006
8365dcf5
TJB
90072012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9008
9009 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9010 are available.
9011 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9012 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9013 * config.in: Regenerate.
9014 * configure: Likewise.
9015
689cc2ae
PA
90162012-03-29 Pedro Alves <palves@redhat.com>
9017
9018 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9019 Correct ptrace arguments.
9020
c14dfd32
PA
90212012-03-28 Pedro Alves <palves@redhat.com>
9022
9023 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9024 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9025 (IA64_FR1_REGNUM): New defines.
9026 (ia64_fetch_register): New.
9027 (the_low_target): Install it.
9028 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9029 field.
9030 * linux-low.c (linux_fetch_registers): Try the
9031 the_low_target.fetch_register hook first.
9032
9033 * linux-arm-low.c (the_low_target): Adjust.
9034 * linux-bfin-low.c (the_low_target): Adjust.
9035 * linux-cris-low.c (the_low_target): Adjust.
9036 * linux-crisv32-low.c (the_low_target): Adjust.
9037 * linux-m32r-low.c (the_low_target): Adjust.
9038 * linux-m68k-low.c (the_low_target): Adjust.
9039 * linux-mips-low.c (the_low_target): Adjust.
9040 * linux-ppc-low.c (the_low_target): Adjust.
9041 * linux-s390-low.c (the_low_target): Adjust.
9042 * linux-sh-low.c (the_low_target): Adjust.
9043 * linux-sparc-low.c (the_low_target): Adjust.
9044 * linux-tic6x-low.c (the_low_target): Adjust.
9045 * linux-x86-low.c (the_low_target): Adjust.
9046 * linux-xtensa-low.c (the_low_target): Adjust.
9047
63c88e13
PA
90482012-03-26 Pedro Alves <palves@redhat.com>
9049
9050 * server.c (handle_qxfer_libraries): Don't bail early if
9051 the_target->qxfer_libraries_svr4 is not NULL.
9052
fb723180
PA
90532012-03-26 Pedro Alves <palves@redhat.com>
9054
9055 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9056
0afae3cf
PA
90572012-03-23 Pedro Alves <palves@redhat.com>
9058
9059 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9060 "library-list-svr4" element's start tag when the the DSO list is
9061 empty.
9062
485f1ee4
PA
90632012-03-23 Pedro Alves <palves@redhat.com>
9064
9065 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9066 a variable whose type size is the same as the inferior's pointer
9067 size.
9068
a5362b9a
TS
90692012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9070
9071 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9072 struct siginfo.
9073 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9074 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9075 * linux-low.h: Include <signal.h>.
9076 (struct siginfo): Remove forward declaration.
9077 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9078 struct siginfo.
9079
d226c142
MF
90802012-03-21 Mike Frysinger <vapier@gentoo.org>
9081
9082 * .gitignore: Ignore more files.
9083
122f36ef
PA
90842012-03-19 Pedro Alves <palves@redhat.com>
9085 Jan Kratochvil <jan.kratochvil@redhat.com>
9086
9087 * server.c (cont_thread, general_thread): Add describing comments.
9088 (start_inferior): Clear `cont_thread'.
9089 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9090 of a process.
9091
fc3e5175
YQ
90922012-03-15 Yao Qi <yao@codesourcery.com>
9093
9094 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9095 handling to ...
9096 (cmd_qtdp): ... here.
9097
8d0d92cd
YQ
90982012-03-15 Yao Qi <yao@codesourcery.com>
9099
9100 * tracepoint.c (struct tracepoint_action_ops): New.
9101 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9102 (m_tracepoint_action_download): New.
9103 (r_tracepoint_action_download): New.
9104 (x_tracepoint_action_download): New.
9105 (l_tracepoint_action_download): New.
9106 (add_tracepoint_action): Install `action->ops' according type.
9107 (download_tracepoint_1): Move code `download' function pointer
9108 of various tracepoint_action_ops.
9109
87b0bb13
JK
91102012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9111
9112 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9113 linux_ptrace_attach_warnings.
9114
5f572dec
JK
91152012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9116
9117 * Makefile.in (linux-ptrace.o): New.
9118 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9119 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9120 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9121 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9122 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9123 of these targets.
9124 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9125
f4647387
YQ
91262012-03-08 Yao Qi <yao@codesourcery.com>
9127 Pedro Alves <palves@redhat.com>
9128
9129 Fix PR server/13392.
9130 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9131 offset of JMP insn.
9132 * tracepoint.c (remove_tracepoint): New.
9133 (cmd_qtdp): Call remove_tracepoint when failed to install.
9134
9b224c5e
PA
91352012-03-07 Pedro Alves <palves@redhat.com>
9136
9137 * linux-low.c (get_detach_signal): New.
9138 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9139 Pass on pending signals to PTRACE_DETACH. Check the result of the
9140 ptrace call.
9141 * server.c (program_signals, program_signals_p): New.
9142 (handle_general_set): Handle QProgramSignals.
9143 * server.h (program_signals, program_signals_p): Declare.
9144
e237a7e2
JK
91452012-03-05 Pedro Alves <palves@redhat.com>
9146 Jan Kratochvil <jan.kratochvil@redhat.com>
9147
9148 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9149 New comment why.
9150
5808517f
YQ
91512012-03-03 Yao Qi <yao@codesourcery.com>
9152
9153 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9154 agent_look_up_symbols.
9155
58b4daa5
YQ
91562012-03-03 Yao Qi <yao@codesourcery.com>
9157
9158 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9159 (linux-x86-low.o): Likewise.
9160 * server.h: Remove in_process_agent_loaded.
9161 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9162 common/agent.c.
9163 Update callers.
9164
8ffcbaaf
YQ
91652012-03-03 Yao Qi <yao@codesourcery.com>
9166
9167 * tracepoint.c (gdb_agent_capability): New global.
9168 (in_process_agent_loaded_ust): Renamed to
9169 `in_process_agent_supports_ust'.
9170 Update callers.
9171 (in_process_agent_supports_ust): Call agent_capability_check.
9172 (clear_installed_tracepoints): Assert that agent supports
9173 agent.
9174
d1feda86
YQ
91752012-03-03 Yao Qi <yao@codesourcery.com>
9176
9177 * linux-low.c (linux_supports_agent): New.
9178 (linux_target_ops): Initialize field `supports_agent' with
9179 linux_supports_agent.
9180 * target.h (struct target_ops) <supports_agent>: New.
9181 (target_supports_agent): New macro.
9182 * server.c (handle_general_set): Handle packet 'QAgent'.
9183 (handle_query): Send `QAgent+'.
9184 * Makefile.in (server.o): Depends on agent.h.
9185
2fa291ac
YQ
91862012-03-03 Yao Qi <yao@codesourcery.com>
9187
9188 * Makefile.in (OBS): Add agent.o.
9189 Add new rule for agent.o.
9190 Track dependence of tracepoint.c on agent.h.
9191 * tracepoint.c (run_inferior_command_1):
9192 (run_inferior_command): Call agent_run_command.
9193 (gdb_ust_connect_sync_socket): Deleted. Move it to
9194 common/agent.c.
9195 (resume_thread, stop_thread): Likewise.
9196 (gdb_ust_socket_init): Renamed to ...
9197 (gdb_agent_socket_init): ... New.
9198 (gdb_ust_thread): Renamed to ...
9199 (gdb_agent_helper_thread): ... New.
9200 (gdb_ust_init): Move some code to ...
9201 (gdb_agent_init): ... here. New.
9202 [HAVE_UST]: Call gdb_ust_init.
9203 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9204 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9205 * config.in, configure: Regenerated.
9206
05044653
PA
92072012-03-02 Pedro Alves <palves@redhat.com>
9208
9209 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9210 * linux-low.c (struct simple_pid_list): New.
9211 (stopped_pids): New a struct simple_pid_list pointer.
9212 (add_to_pid_list, pull_pid_from_list): New.
9213 (handle_extended_wait): Don't assume the first signal new children
9214 report is SIGSTOP. Adjust call to pull_pid_from_list.
9215 (linux_wait_for_lwp): Adjust.
9216
8d00225b
YQ
92172012-03-02 Yao Qi <yao@codesourcery.com>
9218
9219 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9220 debug log.
9221
19560ba5
YQ
92222012-03-02 Yao Qi <yao@codesourcery.com>
9223
9224 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9225 `stop_pc' and `tpoint'. Update caller.
9226
1faeff08
MR
92272012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9228
9229 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9230 * linux-low.c (use_linux_regsets): New macro.
9231 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9232 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9233 (linux_register_in_regsets): New function.
9234 (usr_fetch_inferior_registers): Skip registers covered by
9235 regsets.
9236 (usr_store_inferior_registers): Likewise.
9237 (usr_fetch_inferior_registers): New macro.
9238 (usr_store_inferior_registers): Likewise.
9239 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9240 (linux_store_registers): Likewise.
9241 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9242 prototype.
9243 (init_registers_mips64_dsp_linux): Likewise.
9244 (init_registers_mips_linux): New macro.
9245 (init_registers_mips_dsp_linux): Likewise.
9246 (mips_dsp_num_regs): Likewise.
9247 (DSP_BASE, DSP_CONTROL): New fallback macros.
9248 (mips_base_regs): New macro.
9249 (mips_regmap): Use it. Fix the size.
9250 (mips_dsp_regmap): New variable.
9251 (mips_dsp_regset_bitmap): Likewise.
9252 (mips_arch_setup): New function.
9253 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9254 than mips_regmap.
9255 (mips_cannot_store_register): Likewise.
9256 (the_low_target): Update .arch_setup, .num_regs and .regmap
9257 initializers. Add .regset_bitmap initializer.
9258 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9259 initializer.
9260 * linux-bfin-low.c (the_low_target): Likewise.
9261 * linux-cris-low.c (the_low_target): Likewise.
9262 * linux-crisv32-low.c (the_low_target): Likewise.
9263 * linux-ia64-low.c (the_low_target): Likewise.
9264 * linux-m32r-low.c (the_low_target): Likewise.
9265 * linux-m68k-low.c (the_low_target): Likewise.
9266 * linux-ppc-low.c (the_low_target): Likewise.
9267 * linux-s390-low.c (the_low_target): Likewise.
9268 * linux-sh-low.c (the_low_target): Likewise.
9269 * linux-sparc-low.c (the_low_target): Likewise.
9270 * linux-tic6x-low.c (the_low_target): Likewise.
9271 * linux-x86-low.c (the_low_target): Likewise.
9272 * linux-xtensa-low.c (the_low_target): Likewise.
9273 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9274 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9275 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9276 srv_xmlfiles.
9277 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9278 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9279
c03e6ccc
YQ
92802012-02-29 Yao Qi <yao@codesourcery.com>
9281 Pedro Alves <palves@redhat.com>
9282
9283 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9284 `step_over_finished' is true.
9285
644cebc9
PA
92862012-02-27 Pedro Alves <palves@redhat.com>
9287
9288 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9289 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9290
c14d7ab2
PA
92912012-02-27 Pedro Alves <palves@redhat.com>
9292
9293 PR server/9684
9294 * linux-low.c (pid_is_stopped): New.
9295 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9296
412c89dd
LM
92972012-02-25 Luis Machado <lgustavo@codesourcery.com>
9298
9299 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9300 of conditions.
9301
b745defe
MR
93022012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9303
9304 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9305
9f3a5c85
LM
93062012-02-24 Luis Machado <lgustavo@codesourcery>
9307
9308 * server.c (handle_query): Advertise support for target-side
9309 breakpoint condition evaluation.
9310 (process_point_options): New function.
9311 (process_serial_event): When inserting a breakpoint, check for
9312 a target-side condition that should be evaluated.
9313
9314 * mem-break.c: Include regcache.h and ax.h.
9315 (point_cond_list_t): New data structure.
9316 (breakpoint) <cond_list>: New field.
9317 (find_gdb_breakpoint_at): Make non-static.
9318 (delete_gdb_breakpoint_at): Clear any target-side
9319 conditions.
9320 (clear_gdb_breakpoint_conditions): New function.
9321 (add_condition_to_breakpoint): Likewise.
9322 (add_breakpoint_condition): Likewise.
9323 (gdb_condition_true_at_breakpoint): Likewise.
9324 (gdb_breakpoint_here): Return result directly instead
9325 of going through a local variable.
9326
9327 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9328 (clear_gdb_breakpoint_conditions): Likewise.
9329 (add_breakpoint_condition): Likewise.
9330 (gdb_condition_true_at_breakpoint): Likewise.
9331
9332 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9333 (need_step_over_p): Take target-side breakpoint condition into
9334 consideration.
9335
5e1dc496
LM
93362012-02-24 Luis Machado <lgustavo@codesourcery>
9337
9338 * server.h: Include tracepoint.h.
9339 (agent_mem_read, agent_get_trace_state_variable_value,
9340 agent_set_trace_state_variable_value,
9341 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9342 get_set_tsv_func_addr): New prototypes.
9343
9344 * ax.h: New include file.
9345 * ax.c: New source file.
9346
9347 * tracepoint.c: Include ax.h.
9348 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9349 agent_expr, eval_result_type): Move to ax.h.
9350 (parse_agent_expr): Rename to ...
9351 (gdb_parse_agent_expr): ... this, make it non-static and move
9352 to ax.h.
9353 (unparse_agent_expr) Rename to ...
9354 (gdb_unparse_agent_expr): ... this, make it non-static and move
9355 to ax.h.
9356 (eval_agent_expr): Rename to ...
9357 (eval_tracepoint_agent_expr): ... this.
9358 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9359 forward declarations.
9360 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9361 (agent_get_trace_state_variable_value): New function.
9362 (agent_set_trace_state_variable_value): New function.
9363 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9364 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9365 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9366 (condition_true_at_tracepoint): Likewise.
9367 (parse_agent_expr): Rename to ...
9368 (gdb_parse_agent_expr): ... this and move to ax.c.
9369 (unparse_agent_expr): Rename to ...
9370 (gdb_unparse_agent_expr): ... this and move to ax.c.
9371 (gdb_agent_op_name): Move to ax.c.
9372 (eval_agent_expr): Rename to ...
9373 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9374 and move to ax.c.
9375 (eval_tracepoint_agent_expr): New function.
9376 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 9377 non-static.
5e1dc496
LM
9378 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9379 ax.c.
9380 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9381 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9382 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9383 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9384 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9385 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9386 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9387 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9388 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9389 (compile_bytecodes): Remove forward declaration.
9390 (is_goto_target): Move to ax.c.
9391 (compile_bytecodes): Move to ax.c and call
9392 agent_get_trace_state_variable_value (...) and
9393 agent_set_trace_state_variable_value (...).
9394
9395 * Makefile.in: Update ax.c and IPA dependencies.
9396
277e4e52
PA
93972012-02-24 Pedro Alves <palves@redhat.com>
9398
9399 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9400 (cmd_bigqtbuffer_circular): ... this. Only handle
9401 'QTBuffer:circular:'.
9402 (handle_tracepoint_general_set): Adjust.
9403
bf4c19f7
YQ
94042012-02-16 Yao Qi <yao@codesourcery.com>
9405
9406 * inferiors.c: Move code to ...
9407 * dll.c: .... here. New.
9408 * server.h: Declare clear_dlls.
9409 * Makefile.in (SFILES): Add dll.c.
9410 (OBS): Add dll.o
9411 (dll.o): New rule.
9412
d73f2619
YQ
94132012-02-11 Yao Qi <yao@codesourcery.com>
9414
9415 * server.c: (handle_monitor_command): Add a new parameter
9416 `own_buf'.
9417 (handle_query): Update caller.
9418
f8255c2a
JB
94192012-02-09 Joel Brobecker <brobecker@adacore.com>
9420
9421 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9422 * configure, config.in: Regenerate.
9423 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9424 is not defined.
9425
da84f473
PA
94262012-02-02 Pedro Alves <palves@redhat.com>
9427
9428 Try SIGKILL first, then PTRACE_KILL.
9429 * linux-low.c (linux_kill_one_lwp): New.
9430 (linux_kill_one_lwp): Rename to ...
9431 (kill_one_lwp_callback): ... this. Use the new
9432 linux_kill_one_lwp.
9433
e886a173
PA
94342012-02-02 Pedro Alves <palves@redhat.com>
9435
9436 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9437 inferior.
9438
be07f1a2
PA
94392012-01-27 Pedro Alves <palves@redhat.com>
9440
9441 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9442 (elf_64_file_p): Make static.
9443 (linux_pid_exe_is_elf_64_file): New.
9444 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9445 Delete declarations.
9446 (linux_pid_exe_is_elf_64_file): Declare.
9447 * linux-x86-low.c (x86_arch_setup): Use
9448 linux_pid_exe_is_elf_64_file.
9449
d8301ad1
JK
94502012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9451
9452 * linux-low.c (linux_wait_for_event_1): Rename to ...
9453 (linux_wait_for_event): ... here and merge it with former
9454 linux_wait_for_event - new variable wait_ptid, use it.
9455 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9456
01b17894
PA
94572012-01-23 Pedro Alves <palves@redhat.com>
9458
9459 * server.c (main): Avoid yet another case of infinite loop while
9460 detaching/killing after a longjmp.
9461
e825046f
JK
94622012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9463
9464 Code cleanup.
9465 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9466
b9e7b9c3
UW
94672012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9468
9469 * hostio.c (handle_readlink): New function.
9470 (handle_vFile): Call it to handle "vFile:readlink" packets.
9471
901f9912
UW
94722012-01-20 Pedro Alves <palves@redhat.com>
9473 Ulrich Weigand <ulrich.weigand@linaro.org>
9474
9475 * server.c (handle_v_requests): Only support vAttach and vRun to
9476 start multiple processes when in extended protocol mode.
9477
fc1ab1a0
PA
94782012-01-17 Pedro Alves <palves@redhat.com>
9479
9480 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9481 memalign plus mprotect to allocate the scratch buffer.
9482
7d5d4e98
PA
94832012-01-13 Pedro Alves <palves@redhat.com>
9484
9485 * server.c (attach_inferior): Clear `cont_thread'.
9486
f128d5e9
PA
94872012-01-13 Pedro Alves <palves@redhat.com>
9488
9489 * server.c (main): Avoid infinite loop while detaching/killing
9490 after a longjmp.
9491
06db92f0
DE
94922012-01-09 Doug Evans <dje@google.com>
9493
9494 * server.c (start_inferior): Set last_ptid in --wrapper case.
9495
32d92999
YQ
94962012-01-06 Yao Qi <yao@codesourcery.com>
9497
9498 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9499 defined.
9500 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9501
5e0a92a9
YQ
95022012-01-04 Yao Qi <yao@codesourcery.com>
9503
9504 * tracepoint.c (cmd_qtdp): Print debug message
9505 for static tracepoint.
9506
ae639e8c
YQ
95072012-01-04 Yao Qi <yao@codesourcery.com>
9508
9509 * tracepoint.c (trace_vdebug): Differentiate debug message
9510 between gdbserver and IPA.
9511
f72429c5
YQ
95122012-01-03 Yao Qi <yao@codesourcery.com>
9513
9514 * tracepoint.c (tracepoint_was_hit): Don't collect for
9515 static tracepoint.
9516
12c3e59c
JB
95172012-01-02 Joel Brobecker <brobecker@adacore.com>
9518
9519 * terminal.h: Reformat copyright header.
9520
67827812
JB
95212012-01-02 Joel Brobecker <brobecker@adacore.com>
9522
9523 * server.c (gdbserver_version): Update copyright year.
9524 * gdbreplay.c (gdbreplay_version): Likewise.
9525
3e52c33d
JK
95262011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9527
9528 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9529
9530 Revert:
9531 2011-12-18 Hui Zhu <teawater@gmail.com>
9532 * linux-low.c (linux_create_inferior): Save return value to ret.
9533
66f1260e
HZ
95342011-12-18 Hui Zhu <teawater@gmail.com>
9535
9536 * linux-low.c (linux_create_inferior): Save return value to ret.
9537
e77616d7
DE
95382011-12-16 Doug Evans <dje@google.com>
9539
e7b06c57
DE
9540 * linux-low.c (linux_create_inferior): If stdio connection,
9541 redirect stdin from /dev/null, stdout to stderr.
9542 * remote-utils.c (remote_is_stdio): New static global.
9543 (remote_connection_is_stdio): New function.
9544 (remote_prepare): Handle stdio connection.
9545 (remote_open): Ditto.
9546 (remote_close): Don't close stdin for stdio connections.
9547 (read_prim,write_prim): New functions. Replace all calls to
9548 read/write to these.
9549 * server.c (main): Watch for "-" argument. Move call to
9550 remote_prepare before start_inferior.
9551 * server.h (STDIO_CONNECTION_NAME): New macro.
9552 (remote_connection_is_stdio): Declare.
9553
e77616d7
DE
9554 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9555 in debugging output.
9556
82067193
YQ
95572011-12-15 Yao Qi <yao@codesourcery.com>
9558
9559 * tracepoint.c: Include sys/syscall.h.
9560 (gdb_ust_thread): Remove preprocessor conditional.
9561
82bfbe7e
PA
95622011-12-14 Pedro Alves <pedro@codesourcery.com>
9563
9564 * linux-low.c (linux_detach_one_lwp): Call
9565 the_low_target.prepare_to_resume before detaching.
9566
712c6575
YQ
95672011-12-14 Yao Qi <yao@codesourcery.com>
9568
9569 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9570 of write.
9571
d54d1edf
YQ
95722011-12-14 Yao Qi <yao@codesourcery.com>
9573
9574 * i386-low.c (i386_low_stopped_data_address): Initialize local
9575 variable `control'.
9576
6210a125
PA
95772011-12-13 Pedro Alves <pedro@codesourcery.com>
9578
9579 PR remote/13492
9580
9581 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9582 DR_CONTROL unless necessary. Extend comments.
9583 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9584 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9585
2ece8244
YQ
95862011-12-13 Yao Qi <yao@codesourcery.com>
9587
9588 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9589 macros.
9590 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9591
784867a5
JK
95922011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9593
9594 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9595 Print new debug message for such case.
9596
6bf36717
JK
95972011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9598
9599 Fix overlapping memcpy.
9600 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9601 the read_inferior_memory transfer.
9602 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9603 write_inferior_memory transfer.
9604 (set_fast_tracepoint_jump): New variable buf. Use it for the
9605 read_inferior_memory and write_inferior_memory transfers.
9606 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9607 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9608 Use it for the write_inferior_memory transfer.
9609 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9610 buffers.
9611
50275556
MR
96122011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9613
9614 * linux-low.c (fetch_register, store_register): Make code
9615 consistent, fix formatting.
9616
7325beb4
MR
96172011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9618
9619 * linux-low.c (usr_store_inferior_registers): Factor out code
9620 to handle individual registers into...
9621 (store_register): ... this new function.
9622
c642a434
UW
96232011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9624
9625 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9626 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9627 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9628 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9629 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9630 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9631 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9632 (srv_xmlfiles): Add new XML files.
9633
9634 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9635 and <sys/uio.h>.
9636 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9637 (init_registers_s390_linux32v1): Add prototype.
9638 (init_registers_s390_linux32v2): Likewise.
9639 (init_registers_s390_linux64v1): Likewise.
9640 (init_registers_s390_linux64v2): Likewise.
9641 (init_registers_s390x_linux64v1): Likewise.
9642 (init_registers_s390x_linux64v2): Likewise.
9643 (s390_num_regs): Increment to 52.
9644 (s390_regmap): Add orig_r2 register.
9645 (s390_num_regs_3264): Increment to 68.
9646 (s390_regmap_3264): Add orig_r2 register.
9647 (s390_collect_ptrace_register): Handle orig_r2 register.
9648 (s390_supply_ptrace_register): Likewise.
9649 (s390_fill_last_break): New function.
9650 (s390_store_last_break): Likewise.
9651 (s390_fill_system_call): New function.
9652 (s390_store_system_call): Likewise.
9653 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9654 register sets.
9655 (s390_check_regset): New function.
9656 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9657 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9658 Update target_regsets for available register sets.
9659
2268b414
JK
96602011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9661 Jan Kratochvil <jan.kratochvil@redhat.com>
9662
9663 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9664 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9665 New.
9666 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9667 * linux-low.h (struct process_info_private): New member r_debug.
9668 * server.c (handle_qxfer_libraries): Call
9669 the_target->qxfer_libraries_svr4.
9670 (handle_qxfer_libraries_svr4): New function.
9671 (qxfer_packets): New entry "libraries-svr4".
9672 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9673 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9674 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9675 PACKET_qXfer_libraries_svr4.
9676
d6db1fab
UW
96772011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9678
9679 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9680 PSW address/mask between 8-byte and 16-byte formats.
9681 (s390_supply_ptrace_register): Likewise.
9682 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9683 basic addressing mode bit.
9684
242f5f1c
SS
96852011-11-24 Stan Shebs <stan@codesourcery.com>
9686
9687 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9688
f196051f
SS
96892011-11-17 Stan Shebs <stan@codesourcery.com>
9690
9691 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9692 (tracing_start_time): New global.
9693 (tracing_stop_time): New global.
9694 (tracing_user_name): New global.
9695 (tracing_notes): New global.
9696 (tracing_stop_note): New global.
9697 (cmd_qtstart): Set traceframe_usage, start_time.
9698 (stop_tracing): Set stop_time.
9699 (cmd_qtstatus): Report additional status.
9700 (cmd_qtp): New function.
9701 (handle_tracepoint_query): Call it.
9702 (cmd_qtnotes): New function.
9703 (handle_tracepoint_general_set): Call it.
9704 (get_timestamp): Rename from tsv_get_timestamp.
9705
405f8e94
SS
97062011-11-14 Stan Shebs <stan@codesourcery.com>
9707 Kwok Cheung Yeung <kcy@codesourcery.com>
9708
9709 * linux-x86-low.c (small_jump_insn): New.
9710 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9711 trampoline and error message, build a trampoline and issue a small
9712 jump instruction to it.
9713 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9714 trampoline and error message.
9715 (x86_get_min_fast_tracepoint_insn_len): New.
9716 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9717 * linux-low.h (struct linux_target_ops): Add arguments to
9718 install_fast_tracepoint_jump_pad operation, add new operation.
9719 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9720 arguments.
9721 (linux_get_min_fast_tracepoint_insn_len): New function.
9722 (linux_target_op): Add new operation.
9723 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9724 (gdb_trampoline_buffer_end): Ditto.
9725 (gdb_trampoline_buffer_error): Ditto.
9726 (struct ipa_sym_addresses): Add fields for new IPA variables.
9727 (symbol_list): Add entries for new IPA variables.
9728 (struct tracepoint): Add fields to hold the address range of the
9729 trampoline used by the tracepoint.
9730 (trampoline_buffer_head): New static variable.
9731 (trampoline_buffer_tail): Ditto.
9732 (claim_trampoline_space): New function.
9733 (have_fast_tracepoint_trampoline_buffer): New function.
9734 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9735 structure.
9736 (install_fast_tracepoint): Ditto, also add error buffer argument.
9737 (cmd_qtminftpilen): New function.
9738 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9739 (fast_tracepoint_from_trampoline_address): New function.
9740 (fast_tracepoint_collecting): Handle trampoline as part of jump
9741 pad space.
9742 (set_trampoline_buffer_space): New function.
9743 (initialize_tracepoint): Initialize new IPA variables.
9744 * target.h (struct target_ops): Add arguments to
9745 install_fast_tracepoint_jump_pad operation, add new
9746 get_min_fast_tracepoint_insn_len operation.
9747 (target_get_min_fast_tracepoint_insn_len): New.
9748 (install_fast_tracepoint_jump_pad): Add arguments.
9749 * server.h (IPA_BUFSIZ): Define.
9750 * linux-i386-ipa.c: Include extra header files.
9751 (initialize_fast_tracepoint_trampoline_buffer): New function.
9752 (initialize_low_tracepoint): Call it.
9753 * server.h (set_trampoline_buffer_space): Declare.
9754 (claim_trampoline_space): Ditto.
9755 (have_fast_tracepoint_trampoline_buffer): Ditto.
9756
1e4d1764
YQ
97572011-11-14 Yao Qi <yao@codesourcery.com>
9758
9759 * server.c (handle_query): Handle InstallInTrace for qSupported.
9760 * tracepoint.c (add_tracepoint): Sort list.
9761 (install_tracepoint, download_tracepoint): New.
9762 (cmd_qtdp): Call them to install and download tracepoints.
9763 (sort_tracepoints): Removed.
9764 (cmd_qtstart): Update.
9765
5c73ff4e
YQ
97662011-11-14 Yao Qi <yao@codesourcery.com>
9767
9768 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9769 * mem-break.h: Declare.
9770 * tracepoint.c (cmd_qtstart): Move some code to ...
9771 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9772 New.
9773 (download_tracepoints): Move some code to ...
9774 (download_tracepoint_1): ... here. New.
9775
86a30030
YQ
97762011-11-08 Yao Qi <yao@codesourcery.com>
9777
9778 * remote-utils.c (relocate_instruction): A comment fix.
9779
8d26e50c
JB
97802011-11-07 Joel Brobecker <brobecker@adacore.com>
9781
9782 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9783 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9784 dr_status_mirror and dr_control_mirror from debug_reg_state.
9785 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9786 (i386_initial_stuff): Remove use of deleted globals.
9787 (i386_get_thread_context, i386_set_thread_context,
9788 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9789 from debug_reg_state.
9790
a59306a3
YQ
97912011-11-05 Yao Qi <yao@codesourcery.com>
9792
9793 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9794 address as TPOINT's.
9795
3065dfb6
SS
97962011-11-02 Stan Shebs <stan@codesourcery.com>
9797
9798 * tracepoint.c (agent_mem_read_string): New function.
9799 (eval_agent_expr): Call it for tracenz.
9800 * server.c (handle_query): Report support for tracenz.
9801
fd0d8c7c
YQ
98022011-11-02 Yao Qi <yao@codesourcery.com>
9803
9804 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9805
609086b1
YQ
98062011-11-02 Yao Qi <yao@codesourcery.com>
9807
9808 * target.h: Fix a typo in comment.
9809
b9fd1791
PA
98102011-10-31 Pedro Alves <pedro@codesourcery.com>
9811
9812 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9813 clobber the breakpoints' shadows with fast tracepoint jumps.
9814 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9815 * target.c (write_inferior_memory): Also pass MYADDR down to
9816 check_mem_write.
9817
03583c20
UW
98182011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9819
9820 * configure.ac: Check support for personality routine.
9821 * configure: Regenerate.
9822 * config.in: Likewise.
9823 * linux-low.c: Include <sys/personality.h>.
9824 Define ADDR_NO_RANDOMIZE if necessary.
9825 (linux_create_inferior): Disable address space randomization when
9826 forking inferior, if requested.
9827 (linux_supports_disable_randomization): New function.
9828 (linux_target_ops): Install it.
9829 * server.h (disable_randomization): Declare.
9830 * server.c (disable_randomization): New global variable.
9831 (handle_general_set): Handle QDisableRandomization.
9832 (handle_query): Likewise for qSupported.
9833 (main): Support --disable-randomization and --no-disable-randomization
9834 command line arguments.
9835 * target.h (struct target_ops): Add supports_disable_randomization.
9836 (target_supports_disable_randomization): New macro.
9837
723b724b
MF
98382011-09-29 Mike Frysinger <vapier@gentoo.org>
9839
9840 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9841 ifdef check.
9842 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9843 [!PT_GETDSBT] (target_loadmap): New definition.
9844 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9845 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9846 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9847 and PT_GETDSBT to LINUX_LOADMAP.
9848 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9849 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9850
55329a5c 98512011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
9852
9853 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9854 (arm_linux_hwbp_cap): New static variable.
9855 (arm_linux_get_hwbp_cap): Replace by ...
9856 (arm_linux_init_hwbp_cap): ... this new function.
9857 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9858 (arm_linux_get_hw_watchpoint_count): Likewise.
9859 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9860 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9861 (arm_prepare_to_resume): Use perror_with_name instead of error.
9862
55329a5c 98632011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
9864
9865 * linux-arm-low.c: Include <signal.h>.
9866 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9867 (struct arm_linux_hwbp_cap): New data type.
9868 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9869 (struct arm_linux_hw_breakpoint): New data type.
9870 (MAX_BPTS, MAX_WPTS): Define.
9871 (struct arch_process_info, struct arch_lwp_info): New data types.
9872 (arm_linux_get_hwbp_cap): New function.
9873 (arm_linux_get_hw_breakpoint_count): Likewise.
9874 (arm_linux_get_hw_watchpoint_count): Likewise.
9875 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9876 (arm_hwbp_control_initialize): Likewise.
9877 (arm_hwbp_control_is_enabled): Likewise.
9878 (arm_hwbp_control_is_initialized): Likewise.
9879 (arm_hwbp_control_disable): Likewise.
9880 (arm_linux_hw_breakpoint_equal): Likewise.
9881 (arm_linux_hw_point_initialize): Likewise.
9882 (struct update_registers_data): New data structure.
9883 (update_registers_callback: New function.
9884 (arm_insert_point): Likewise.
9885 (arm_remove_point): Likewise.
9886 (arm_stopped_by_watchpoint): Likewise.
9887 (arm_stopped_data_address): Likewise.
9888 (arm_new_process): Likewise.
9889 (arm_new_thread): Likewise.
9890 (arm_prepare_to_resume): Likewise.
9891 (the_low_target): Register arm_insert_point, arm_remove_point,
9892 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9893 arm_new_thread, and arm_prepare_to_resume.
9894
6b9801d4
SS
98952011-09-15 Stan Shebs <stan@codesourcery.com>
9896
9897 * server.h (struct emit_ops): Add compare-goto fields.
9898 * tracepoint.c (gdb_agent_op_sizes): New table.
9899 (emit_eq_goto): New function.
9900 (emit_ne_goto): New function.
9901 (emit_lt_goto): New function.
9902 (emit_le_goto): New function.
9903 (emit_gt_goto): New function.
9904 (emit_ge_goto): New function.
9905 (is_goto_target): New function.
9906 (compile_bytecodes): Recognize special cases of compare-goto
9907 combinations and call specialized emitters for them.
9908 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9909 (amd64_emit_ne_goto): New function.
9910 (amd64_emit_lt_goto): New function.
9911 (amd64_emit_le_goto): New function.
9912 (amd64_emit_gt_goto): New function.
9913 (amd64_emit_ge_goto): New function.
9914 (amd64_emit_ops): Add the new functions.
9915 (i386_emit_eq_goto): New function.
9916 (i386_emit_ne_goto): New function.
9917 (i386_emit_lt_goto): New function.
9918 (i386_emit_le_goto): New function.
9919 (i386_emit_gt_goto): New function.
9920 (i386_emit_ge_goto): New function.
9921 (i386_emit_ops): Add the new functions.
9922
bf15cbda
SS
99232011-09-08 Stan Shebs <stan@codesourcery.com>
9924
9925 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9926 (i386_emit_epilogue): Restore %ebx.
9927
943ca1dd
JZ
99282011-08-31 Jie Zhang <jzhang918@gmail.com>
9929
9930 * server.c (step_thread): Remove definition.
9931 (process_serial_event): Don't handle Hs.
9932 * server.h (step_thread): Remove declaration.
9933 * target.c (set_desired_inferior): Remove use of step_thread.
9934
e3deef73
LM
99352011-08-24 Luis Machado <lgustavo@codesourcery.com>
9936
9937 * linux-low.c: Include linux-procfs.h.
9938 (linux_attach_lwp_1): Update comments.
9939 (linux_attach): Scan for existing threads when attaching to a
9940 process that is the tgid.
9941 * Makefile.in: Update dependencies.
9942
13da1c97
LM
99432011-08-24 Luis Machado <lgustavo@codesourcery.com>
9944
9945 * configure.srv: Add linux-procfs.o dependencies.
9946
881127c9
YQ
99472011-08-14 Yao Qi <yao@codesourcery.com>
9948
9949 * target.h (struct target_ops): Fix indent.
9950 * win32-low.c (win32_target_ops): Fix comment.
9951
58dbd541
YQ
99522011-08-14 Andrew Jenner <andrew@codesourcery.com>
9953 Yao Qi <yao@codesourcery.com>
9954
9955 * Makefile.in (clean): Remove tic6x-*.c files.
9956 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9957 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9958 (tic6x-c64xp-linux.c): Likewise.
9959 * configure.srv: Add support for tic6x-*-uclinux.
9960 * linux-tic6x-low.c: New.
9961 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9962
78d85199
YQ
99632011-08-14 Andrew Stubbs <ams@codesourcery.com>
9964 Yao Qi <yao@codesourcery.com>
9965
9966 * target.h (struct target_ops): Add read_loadmap.
9967 * linux-low.c (struct target_loadseg): New type.
9968 (struct target_loadmap): New type.
9969 (linux_read_loadmap): New function.
9970 (linux_target_ops): Add linux_read_loadmap.
9971 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
9972 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9973 to NULL.
78d85199 9974
a959a88d
EZ
99752011-08-05 Eli Zaretskii <eliz@gnu.org>
9976
9977 * win32-low.c: Include <stdint.h>.
9978
1ced966e
PA
99792011-07-22 Pedro Alves <pedro@codesourcery.com>
9980
9981 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9982 to the inferior here.
9983 (i386_remove_aligned_watchpoint): Ditto.
9984 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9985 fit part of the watchpoint in the debug registers.
9986 (i386_update_inferior_debug_regs): New.
9987 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9988 registers, and only update the inferior on success.
9989 (i386_low_remove_watchpoint): Ditto.
9990
d26e3629
KY
99912011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9992
9993 * linux-low.c (compare_ints, unique, list_threads, show_process,
9994 linux_core_of_thread): Delete.
9995 (linux_target_ops): Change linux_core_of_thread to
9996 linux_common_core_of_thread.
9997 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9998 * utils.c (malloc_failure): Change type of argument.
9999 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10000 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10001 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10002 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10003 (IPA_OBJS): Add common-utils-ipa.o.
10004 (ptid_h, linux_osdata_h): New macros.
10005 (server_h): Add common/common-utils.h, common/xml-utils.h,
10006 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10007 common/ptid.h.
10008 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10009 ptid.o, buffer.o): New rules.
10010 (linux-low.o): Add common/linux-osdata.h as a dependency.
10011 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10012 * configure.ac: Add AC_HEADER_DIRENT check.
10013 * config.in: Regenerate.
10014 * configure: Regenerate.
10015 * remote-utils.c (xml_escape_text): Delete.
10016 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10017 buffer_xml_printf): Move to common/buffer.c.
10018 * server.c (main): Remove call to initialize_inferiors.
10019 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10020 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10021 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10022 internal_error, gdb_assert, gdb_assert_fail): Delete.
10023 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10024 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10025 common/buffer.h.
10026 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10027 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10028 initialize_inferiors): Delete.
10029
2275a1a7
PA
100302011-07-20 Pedro Alves <pedro@codesourcery.com>
10031
10032 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10033 symbol error.
10034
0a5b1e09
PA
100352011-05-31 Pedro Alves <pedro@codesourcery.com>
10036
10037 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10038 assertion.
10039 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10040
6938fd34
YQ
100412011-05-26 Yao Qi <yao@codesourcery.com>
10042
10043 * Makefile.in (thread-db.o): Track dependence to
10044 common/gdb_thread_db.h.
10045 * thread-db.c: include gdb_thread_db.h from right place.
10046
b481f9e0
TT
100472011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10048
10049 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10050 __FILE__ and __LINE__ to internal_error.
10051
98a5dd13
DE
100522011-05-13 Doug Evans <dje@google.com>
10053
10054 * thread-db.c (try_thread_db_load_from_sdir): New function.
10055 (try_thread_db_load_from_dir): New function.
10056 (thread_db_load_search): Handle $sdir, ignore $pdir.
10057 Remove trying of system directories if search of
10058 libthread-db-search-path fails, that is now done via $sdir.
10059
d248b706
KY
100602011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10061
10062 * server.c (handle_query): Add EnableDisableTracepoints to the list
10063 of supported features.
43aaf8b6 10064 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 10065 tracepoints.
43aaf8b6
PA
10066 (cmd_qtenable_disable): New.
10067 (cmd_qtstart): Install tracepoints even if disabled.
10068 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10069 receiving a QTEnable or QTDisable packet.
10070 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10071 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10072 tracepoints.
10073 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 10074
84e578fb
DE
100752011-05-10 Doug Evans <dje@google.com>
10076
10077 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10078
71f55dd8
DE
100792011-05-04 Doug Evans <dje@google.com>
10080
10081 * linux-low.c (linux_join): Skip process lookup.
10082 * spu-low.c (spu_join): Ditto.
10083 * server.c (join_inferiors_callback): Delete.
10084 (process_serial_event): For 'D' packet (detach) call join_inferior
10085 directly.
10086
4d393d60
JM
100872011-05-04 Joseph Myers <joseph@codesourcery.com>
10088
10089 * README: Don't mention xscale*-*-linux*.
10090 * configure.srv (xscale*-*-linux*): Don't handle target.
10091
b00ad6ff
NF
100922011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10093
10094 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10095 casting pointers.
10096 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10097 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10098 (i386_emit_void_call_2): Likewise.
10099
af96c192
YQ
101002011-04-26 Yao Qi <yao@codesourcery.com>
10101
43aaf8b6
PA
10102 * linux-low.c: Move common macros to linux-ptrace.h.
10103 Include linux-ptrace.h.
af96c192
YQ
10104 * Makefile.in (linux_ptrace_h): New.
10105 (linux-low.o): Depends on linux-ptrace.h.
10106
03f2bd59
JK
101072011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10108
10109 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10110 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10111 (remote_prepare): New function with most of the TCP code from ...
10112 (remote_open): ... here. Detect PORT here unconditionally. Move also
10113 setting transport_is_reliable.
10114 * server.c (run_once): New variable.
10115 (gdbserver_usage): Document it.
10116 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10117 the first run if RUN_ONCE.
10118 * server.h (run_once, remote_prepare): New declarations.
10119
7a9dd1b2
TT
101202011-04-19 Tom Tromey <tromey@redhat.com>
10121
10122 * win32-low.c (handle_load_dll): Remove duplicate "the".
10123
81239425
PM
101242011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10125
10126 Remove support for old Cygwin 1.5 versions.
10127 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10128 function to avoid warning.
10129 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10130 warning.
10131
9e0627f1
PM
101322011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10133
10134 * gdbserver/server.h (Macro _): Define it if not available.
10135
588eebee
MS
101362011-03-14 Michael Snyder <msnyder@vmware.com>
10137
348af9f7 10138 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 10139
43f70d4c
JB
101402011-03-10 Joel Brobecker <brobecker@adacore.com>
10141
10142 * Makefile.in (maintainer-clean realclean distclean): Remove
10143 "make ... subdir_do" command.
10144
348af9f7
MS
101452011-03-10 Michael Snyder <msnyder@vmware.com>
10146
10147 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10148
10149 * server.c (handle_v_run): Free alloced buffer on early return.
10150
e637a4f5
YQ
101512011-03-09 Yao Qi <yao@codesourcery.com>
10152
10153 Revert:
10154 2011-03-04 Yao Qi <yao@codesourcery.com>
10155
10156 * Makefile.in: Remove GNU make feature --directory.
10157
10158 2011-03-05 Yao Qi <yao@codesourcery.com>
10159
10160 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10161 (subdir_do): New make target. Copied from gdb/Makefile.
10162 (maintainer-clean, realclean, distclean, clean): Call corresponding
10163 make targets in common/Makefile.
10164
10165 2011-02-11 Yao Qi <yao@codesourcery.com>
10166
10167 * configure.ac: Call AC_PROG_RANLIB.
10168 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10169 * configure: Regenerate.
10170
e6edda56
JK
101712011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10172
10173 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10174
e5141119
JB
101752011-03-06 Yao Qi <yao@codesourcery.com>
10176
10177 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10178
64794aa4
JB
101792011-03-05 Yao Qi <yao@codesourcery.com>
10180
10181 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10182 (subdir_do): New make target. Copied from gdb/Makefile.
10183 (maintainer-clean, realclean, distclean, clean): Call corresponding
10184 make targets in common/Makefile.
10185
7a762829
YQ
101862011-03-04 Yao Qi <yao@codesourcery.com>
10187
10188 * Makefile.in: Remove GNU make feature --directory.
10189
348af9f7
MS
101902011-03-04 Michael Snyder <msnyder@vmware.com>
10191
10192 * server.c (queue_stop_reply): Call xmalloc not malloc.
10193
101942011-03-02 Michael Snyder <msnyder@vmware.com>
10195
10196 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10197
9f72fee2
MS
101982011-02-28 Michael Snyder <msnyder@vmware.com>
10199
588eebee
MS
10200 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10201 (cmd_qtframe): Ditto.
10202 (cmd_qtbuffer): Ditto.
10203 (cmd_bigqtbuffer): Ditto.
10204
9f72fee2
MS
10205 * utils.c (decimal2str): Initialize 'width' to nine, then
10206 don't mess with it.
10207
8040bd49
UW
102082011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10209
10210 * hostio.c (require_data): Free *data, not data.
10211
7e52cbd0
JK
102122011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10213
10214 * hostio.c (require_data): Use free, not xfree.
10215
9130f83e
MS
102162011-02-27 Michael Snyder <msnyder@vmware.com>
10217
4b812f4e
MS
10218 * server.c (handle_query): Discard unused value.
10219
9130f83e
MS
10220 * hostio.c (require_data): Free malloc memory before returning
10221 error.
10222
69d37113
MS
102232011-02-26 Michael Snyder <msnyder@vmware.com>
10224
10225 * linux-low.c (list_threads): Call closedir for dirent.
10226
35f5825a
MS
102272011-02-27 Michael Snyder <msnyder@vmware.com>
10228
2a589cef
MS
10229 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10230 a case statement falls through.
10231
0adea5f7
MS
10232 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10233
35f5825a
MS
10234 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10235 in comparison.
10236
238f1c74
MS
102372011-02-26 Michael Snyder <msnyder@vmware.com>
10238
10239 * utils.c (decimal2str): Eliminate dead code and dead param.
10240 (pulongest): Drop dead param from call to decimal2str.
10241 (plongest): Ditto.
10242
633ff500
JB
102432011-02-24 Joel Brobecker <brobecker@adacore.com>
10244
10245 Revert the following patch (not approved yet):
10246 2011-02-21 Hui Zhu <teawater@gmail.com>
10247 * tracepoint.c (tp_printf): New function.
10248 (eval_agent_expr): Handle gdb_agent_op_printf.
10249
f9c6ff72
HZ
102502011-02-21 Hui Zhu <teawater@gmail.com>
10251
10252 * tracepoint.c (tp_printf): New function.
10253 (eval_agent_expr): Handle gdb_agent_op_printf.
10254
94d5e490
TT
102552011-02-18 Tom Tromey <tromey@redhat.com>
10256
10257 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10258 (tracepoint.o): Likewise.
10259 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10260 (gdb_agent_op_names): Likewise.
10261
c7f96d2b
TT
102622011-02-18 Tom Tromey <tromey@redhat.com>
10263
10264 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10265 gdb_agent_op_rot>: New constants.
10266 (gdb_agent_op_names): Add pick and roll.
10267 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10268 cases.
10269
0feedb2c
JK
102702011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10271
10272 * aclocal.m4: Regenerated with aclocal-1.11.1.
10273
b3b9301e
PA
102742011-02-14 Pedro Alves <pedro@codesourcery.com>
10275
10276 * server.c (handle_qxfer_traceframe_info): New.
10277 (qxfer_packets): Register "traceframe-info".
10278 (handle_query): Report support for qXfer:traceframe-info:read+.
10279 * tracepoint.c (match_blocktype): New.
10280 (traceframe_find_block_type): Rename to ...
10281 (traceframe_walk_blocks): ... this. Add callback filter argument,
10282 and use it.
10283 (traceframe_find_block_type): New, reimplemented on top of
10284 traceframe_walk_blocks.
10285 (build_traceframe_info_xml): New.
10286 (traceframe_read_info): New.
10287 * server.h (traceframe_read_info): Declare.
10288
4f3e6fb7
YQ
102892011-02-11 Yao Qi <yao@codesourcery.com>
10290
10291 * configure.ac: Call AC_PROG_RANLIB.
10292 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10293 * configure: Regenerate.
10294
764880b7
PA
102952011-02-07 Pedro Alves <pedro@codesourcery.com>
10296
10297 * server.c (gdb_read_memory): Change return semantics to allow
10298 partial transfers.
10299 (handle_search_memory_1): Adjust.
10300 (process_serial_event) <'m' packet>: Handle partial transfers.
10301 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10302
1c79eb8a
PA
103032011-01-28 Pedro Alves <pedro@codesourcery.com>
10304
10305 * regcache.c (init_register_cache): Initialize
10306 regcache->register_status.
10307 (free_register_cache): Release regcache->register_status.
10308 (regcache_cpy): Copy register_status.
10309 (registers_to_string): Print 'x's for unavailable registers.
10310 (supply_register): Mark the register's status valid or
10311 unavailable, depending on whether a buffer was passed in or not.
10312 (supply_register_zeroed): New.
10313 (supply_regblock): Mark the registers' status valid or
10314 unavailable, depending on whether a buffer was passed in or not.
10315 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10316 (struct regcache): New `register_status' field.
10317 (supply_register_zeroed): Declare.
10318 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10319 supply_register_zeroed, rather than passing a NULL buffer to
10320 supply_register.
10321 * tracepoint.c (fetch_traceframe_registers): Update comment.
10322
85724a0e
PA
103232011-01-28 Pedro Alves <pedro@codesourcery.com>
10324
10325 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10326 buffer explicit.
10327
d08aafef
PA
103282011-01-25 Pedro Alves <pedro@codesourcery.com>
10329
10330 * server.h (decode_xfer_write): Change prototype.
10331 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10332 and don't extract the annex here.
10333 * server.c (decode_xfer_read): Remove `annex' parameter,
10334 and don't extract the annex here.
10335 (decode_xfer): New.
10336 (struct qxfer): New.
10337 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10338 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10339 (handle_qxfer_statictrace): New functions, abstracted out from
10340 handle_query, and made to use the struct qxfer interface.
10341 (handle_threads_qxfer_proper): Rename to ...
10342 (handle_qxfer_threads_proper): ... this.
10343 (handle_threads_qxfer): Rename to ...
10344 (handle_qxfer_threads): ... this. Adjust.
10345 (qxfer_packets): New array.
10346 (handle_qxfer): New function.
10347 (handle_query): Use handle_qxfer.
10348
493e2a69
MS
103492011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10350
10351 * gdbreplay.c: Shorten lines of >= 80 columns.
10352 * linux-low.c: Ditto.
10353 * linux-ppc-low.c: Ditto.
10354 * linux-s390-low.c: Ditto.
10355 * linux-sparc-low.c: Ditto.
10356 * linux-x86-low.c: Ditto.
10357 * linux-xtensa-low.c: Ditto.
10358 * mem-break.c: Ditto.
10359 * nto-low.c: Ditto.
10360 * regcache.h: Ditto.
10361 * remote-utils.c: Ditto.
10362 * server.c: Ditto.
10363 * server.h: Ditto.
10364 * thread-db.c: Ditto.
10365 * tracepoint.c: Ditto.
10366 * utils.c: Ditto.
10367 * win32-low.h: Ditto.
10368
44944448
JB
103692011-01-05 Joel Brobecker <brobecker@adacore.com>
10370
10371 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10372 update.
10373
71ce852c
JB
103742011-01-01 Joel Brobecker <brobecker@adacore.com>
10375
10376 * server.c (gdbserver_version): Update copyright year in version
10377 output.
10378 * gdbreplay.c (gdbreplay_version): Ditto.
10379
eb826dc6
MF
103802010-12-29 Jie Zhang <jie.zhang@analog.com>
10381
10382 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10383 * linux-bfin-low.c: New file.
10384 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10385 PT_DATA_ADDR for BFIN targets.
10386 * Makefile.in (SFILES): Add linux-bfin-low.c.
10387 (clean): Remove reg-bfin.c.
10388 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10389 * README: Mention supported Blackfin targets.
10390
39ab222a
MF
103912010-12-23 Mike Frysinger <vapier@gentoo.org>
10392
10393 * .gitignore: New file.
10394
a1f2ce7d
MF
103952010-11-16 Mike Frysinger <vapier@gentoo.org>
10396
10397 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10398
f474844c
JZ
103992010-10-22 Jie Zhang <jie@codesourcery.com>
10400
10401 * Makefile.in: Add FLAGS_TO_PASS variable.
10402 (install): Remove dependency of install-only and recursively
10403 invoke make for install-only.
10404
f1048712
DE
104052010-10-04 Doug Evans <dje@google.com>
10406
10407 * Makefile.in (uninstall): Use $(DESTDIR).
10408
b53a1623
PA
104092010-09-24 Pedro Alves <pedro@codesourcery.com>
10410
e6ee044d
PA
10411 PR gdb/11842
10412
b53a1623
PA
10413 * linux-x86-low.c (compat_siginfo_from_siginfo)
10414 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10415 si_code is < 0. Check for si_code == SI_TIMER before checking for
10416 si_code < 0.
10417
fa1bd1e4
JB
104182010-09-13 Joel Brobecker <brobecker@adacore.com>
10419
10420 * lynx-i386-low.c: New file.
10421 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10422
47fac8f8
JB
104232010-09-13 Joel Brobecker <brobecker@adacore.com>
10424
10425 * lynx-low.c (ptrace_request_to_str): Remove handling for
10426 request values that have been removed in LynxOS 5.x.
10427
1adfc54d
JB
104282010-09-13 Joel Brobecker <brobecker@adacore.com>
10429
10430 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10431 <ptrace.h>
10432
c2a66c29
NS
104332010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10434
10435 * configure.ac: Add --enable-inprocess-agent option.
10436 * configure: Rebuilt.
10437
32fcada3
YQ
104382010-09-06 Yao Qi <yao@codesourcery.com>
10439
10440 * linux-low.c (linux_kill): Remove unused variable.
10441 (linux_stabilize_threads): Likewise.
10442 * server.c (start_inferior): Likewise.
10443 (queue_stop_reply_callback): Likewise.
10444 * tracepoint.c (do_action_at_tracepoint): Likewise.
10445
0cccb683
YQ
104462010-09-06 Yao Qi <yao@codesourcery.com>
10447
10448 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10449 on return.
10450
423ec54c
JK
104512010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10452
10453 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10454
12ac6819
PA
104552010-09-06 Pedro Alves <pedro@codesourcery.com>
10456
10457 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10458 "$(IPA_DEPFILES)".
10459
8ed54b31
JB
104602010-09-01 Joel Brobecker <brobecker@adacore.com>
10461
10462 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10463 gdbserver/lynx-ppc-low.c: New files.
10464 * Makefile.in (lynx_low_h): New variable.
10465 (lynx-low.o, lynx-ppc-low.o): New rules.
10466 * configure.ac: On LynxOS, link with -lnetinet.
10467 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10468 * configure: regenerate.
10469
bb0116a4
JB
104702010-09-01 Joel Brobecker <brobecker@adacore.com>
10471
10472 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10473 * configure.ac: Add check for vasprintf and vsnprintf.
10474 * configure, config.in: Regenerate.
10475 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10476
a778ab81 104772010-09-01 Joel Brobecker <brobecker@adacore.com>
10478
10479 * gdbreplay.c: Move include of alloca.h up, next to include of
10480 malloc.h.
10481 * server.h: Add include of malloc.h.
10482 * mem-break.c: Remove include of malloc.h.
10483 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10484
8b034a19 104852010-09-01 Joel Brobecker <brobecker@adacore.com>
10486
10487 * Makefile.in (memmem.o): Build with -Wno-error.
10488
104892010-09-01 Joel Brobecker <brobecker@adacore.com>
10490
10491 * utils.c (xsnprintf): Make non-static.
10492 * server.h: Add xsnprintf declaration.
10493 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10494 replace calls to snprintf by calls to xsnprintf throughout.
10495
104962010-09-01 Joel Brobecker <brobecker@adacore.com>
10497
10498 * configure.ac: Add configure check for alloca.
10499 * configure, config.in: Regenerate.
10500 * server.h: Include alloca.h if it exists.
10501 * gdbreplay.c: Include alloca.h if it exists.
10502
1a981360
PA
105032010-08-28 Pedro Alves <pedro@codesourcery.com>
10504
10505 * linux-low.c (__SIGRTMIN): Define if not already defined.
10506 (linux_create_inferior): Check for __ANDROID__ rather than
10507 __SIGRTMIN.
10508 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10509 are already deferred.
10510 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10511 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10512 stopped and already has a pending signal to report.
10513 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10514 a pending signal to report or is moving out of a jump pad.
10515 (linux_init_signals): Check for __ANDROID__ rather than
10516 __SIGRTMIN.
10517
b4d51a55
PA
105182010-08-28 Pedro Alves <pedro@codesourcery.com>
10519
10520 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10521 debug_threads check. Avoid a linear search when not doing debug
10522 output.
10523
ec48365d
PA
105242010-08-27 Pedro Alves <pedro@codesourcery.com>
10525
10526 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10527 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10528 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10529 (process_event): Change local fd's type to gdb_fildes_t.
10530 (create_file_handler): Adjust prototype.
10531 (delete_file_handler): Adjust prototype.
10532 (handle_file_event): Adjust prototype. Use pfildes.
10533 (create_file_event): Adjsut prototype.
10534 * remote-utils.c (remote_desc, listen_desc): Change type to
10535 gdb_fildes_t.
10536 * server.h: New gdb_fildes_t typedef.
10537 [USE_WIN32API]: Include winsock2.h.
10538 (delete_file_handler, add_file_handler): Adjust prototypes.
10539 (pfildes): Declare.
10540 * utils.c (pfildes): New.
10541
854d88f0
PA
105422010-08-27 Pedro Alves <pedro@codesourcery.com>
10543
10544 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10545 * configure: Regenerate.
10546
0146f85b
PA
105472010-08-27 Pedro Alves <pedro@codesourcery.com>
10548
10549 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10550 (linux_done_accessing_memory): ... this.
10551 (linux_target_ops): Adjust.
10552 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10553 * nto-low.c (nto_target_ops): Adjust comment.
10554 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10555 * spu-low.c (spu_target_ops): Adjust comment.
10556 * target.h (target_ops): Rename unprepare_to_access_memory field
10557 to done_accessing_memory.
10558 (unprepare_to_access_memory): Rename to ...
10559 (done_accessing_memory): ... this.
10560
90d74c30
PA
105612010-08-26 Pedro Alves <pedro@codesourcery.com>
10562
10563 * linux-low.c (linux_prepare_to_access_memory): New.
10564 (linux_unprepare_to_access_memory): New.
10565 (linux_target_ops): Install them.
10566 * server.c (read_memory): Rename to ...
10567 (gdb_read_memory): ... this. Use
10568 prepare_to_access_memory/prepare_to_access_memory.
10569 (write_memory): Rename to ...
10570 (gdb_write_memory): ... this. Use
10571 prepare_to_access_memory/prepare_to_access_memory.
10572 (handle_search_memory_1): Adjust.
10573 (process_serial_event): Adjust.
10574 * target.h (struct target_ops): New fields
10575 prepare_to_access_memory and unprepare_to_access_memory.
10576 (prepare_to_access_memory, unprepare_to_access_memory): New.
10577 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10578 prepare_to_access_memory/prepare_to_access_memory.
10579 * nto-low.c (nto_target_ops): Adjust.
10580 * spu-low.c (spu_target_ops): Adjust.
10581 * win32-low.c (win32_target_ops): Adjust.
10582
fd467969
PA
105832010-08-26 Pedro Alves <pedro@codesourcery.com>
10584
10585 * Makefile.in (WARN_CFLAGS): Get it from configure.
10586 (WERROR_CFLAGS): New.
10587 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10588 * configure.ac: Introduce --enable-werror, which adds -Werror to
10589 the compiler command line. Enabled by default. Disable with
10590 --disable-werror. Add -Wdeclaration-after-statement
10591 Wpointer-arith and -Wformat-nonliteral to warning flags.
10592 * configure: Regenerate.
10593
331e2f5f
PA
105942010-08-26 Pedro Alves <pedro@codesourcery.com>
10595
10596 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10597
e581f2b4
PA
105982010-08-26 Pedro Alves <pedro@codesourcery.com>
10599
10600 * gdbreplay.c (remote_error): New.
10601 (gdbchar): New.
10602 (expect): Use gdbchar. Check for error reading from GDB.
10603 Clarify sync error output.
10604 (play): Check for errors writing to GDB.
10605 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10606 * remote-utils.c (getpkt): Check for errors writing to the remote
10607 descriptor.
10608
3c11dd79
PA
106092010-08-25 Pedro Alves <pedro@codesourcery.com>
10610
10611 * linux-low.c (linux_wait_1): Move non-debugging code out of
10612 `debug_threads' control.
10613
d20a8ad9
PA
106142010-08-25 Pedro Alves <pedro@codesourcery.com>
10615
10616 * linux-low.c (linux_wait_1): Don't set last_status here.
10617 * server.c (push_event, queue_stop_reply_callback): Assert we're
10618 not pushing a TARGET_WAITKIND_IGNORE event.
10619 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10620 (myresume, handle_target_event): Set the thread's last_resume_kind
10621 and last_status from the target returned status.
10622
964e4306
PA
106232010-08-25 Pedro Alves <pedro@codesourcery.com>
10624
10625 PR threads/10729
10626
10627 * linux-x86-low.c (update_debug_registers_callback): New.
10628 (i386_dr_low_set_addr): Use it.
10629 (i386_dr_low_get_addr): New.
10630 (i386_dr_low_set_control): Use update_debug_registers_callback.
10631 (i386_dr_low_get_control): New.
10632 (i386_dr_low_get_status): Adjust.
10633 * linux-low.c (linux_stop_lwp): New.
10634 * linux-low.h (linux_stop_lwp): Declare.
10635
10636 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10637 argument instead of a i386_debug_reg_state.
10638 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10639 a i386_debug_reg_state.
10640 (i386_insert_aligned_watchpoint): Adjust.
10641 (i386_remove_aligned_watchpoint): Adjust.
10642 (i386_low_stopped_data_address): Read the debug registers from the
10643 inferior instead of from the mirrors.
10644 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10645 (i386_dr_low_get_addr): Declare.
10646 (i386_dr_low_get_control): Declare.
10647 (i386_dr_low_get_status): Change prototype.
10648
10649 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10650 (i386_dr_low_get_addr): New.
10651 (i386_dr_low_get_control): New.
10652 (i386_dr_low_get_status): Adjust prototype. Return
10653 dr_status_mirror.
10654 (i386_initial_stuff): Clear dr_status_mirror and
10655 dr_control_mirror.
10656 (i386_get_thread_context): Adjust.
10657 (i386_set_thread_context): Adjust.
10658 (i386_thread_added): Adjust.
10659
5f21a75b
PA
106602010-08-24 Pedro Alves <pedro@codesourcery.com>
10661
10662 * linux-low.h (linux_thread_area): Delete declaration.
10663
3e4c1235
TS
106642010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10665
10666 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10667 after its termination.
10668
1971b033
PA
106692010-08-09 Pedro Alves <pedro@codesourcery.com>
10670
10671 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10672 (gdb_wants_all_stopped): Delete.
10673 (linux_wait_1): Don't call them.
10674 * server.c (handle_v_cont): Tag all threads as want-stopped.
10675 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10676 stopped as "client-wants-stopped".
10677
310444ac
PA
106782010-07-31 Pedro Alves <pedro@codesourcery.com>
10679
10680 * Makefile.in (signals_h): New.
10681 (server_h): Depend on it.
10682 (server.o): Don't depend on $(signals_def).
10683 (signals.o): Depend on $(signals_def).
10684
a19cae16
JK
106852010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10686
10687 * Makefile.in (signals_def): New.
10688 (server_h): Append include/gdb/signals.h and signals_def.
10689 (server.o): Append signals_def.
10690
30d50328
JK
106912010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10692
10693 * server.c (handle_target_event): Use target_signal_to_host for
10694 resume_info.sig initialization.
10695 * target.h (struct thread_resume) <sig>: New comment.
10696
5c3216e2
OS
106972010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10698
c6f46ca0
OS
10699 * server.c (handle_query): strcpy() the returned string from paddress()
10700 instead of sprintf().
5c3216e2
OS
10701 * utils.c (paddress): Return phex_nz().
10702
6bd31874
JB
107032010-07-07 Joel Brobecker <brobecker@adacore.com>
10704
10705 * server.c (handle_v_cont): Call mourn_inferior if process
10706 just exited.
10707 (myresume): Likewise.
10708
0fb4aa4b
PA
107092010-07-01 Pedro Alves <pedro@codesourcery.com>
10710
10711 Static tracepoints, and integration with UST.
10712
10713 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10714 * mem-break.c (uninsert_all_breakpoints)
10715 (reinsert_all_breakpoints): New.
10716 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10717 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10718 (gdb_agent_ust_loaded, helper_thread_id)
10719 (gdb_agent_helper_thread_id): New macros.
10720 (struct ipa_sym_addresses): Add addr_ust_loaded,
10721 addr_helper_thread_id, addr_cmd_buf.
10722 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10723 (in_process_agent_loaded_ust): New.
10724 (write_e_ust_not_loaded): New.
10725 (maybe_write_ipa_ust_not_loaded): New.
10726 (struct collect_static_trace_data_action): New.
10727 (enum tracepoint_type) <static_tracepoint>: New.
10728 (struct tracepoint) <handle>: Mention static tracepoints.
10729 (struct static_tracepoint_ctx): New.
10730 (CMD_BUF_SIZE): New.
10731 (add_tracepoint_action): Handle static tracepoint actions.
10732 (unprobe_marker_at): New.
10733 (clear_installed_tracepoints): Handle static tracepoints.
10734 (cmd_qtdp): Handle static tracepoints.
10735 (probe_marker_at): New.
10736 (cmd_qtstart): Handle static tracepoints.
10737 (response_tracepoint): Handle static tracepoints.
10738 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10739 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10740 (get_context_regcache): Handle static tracepoints.
10741 (do_action_at_tracepoint): Handle static tracepoint actions.
10742 (traceframe_find_block_type): Handle static trace data blocks.
10743 (traceframe_read_sdata): New.
10744 (download_tracepoints): Download static tracepoint actions.
10745 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10746 (GDB_PROBE_NAME): New.
10747 (ust_ops): New.
10748 (GET_UST_SYM): New.
10749 (USTF): New.
10750 (dlsym_ust): New.
10751 (ust_marker_to_static_tracepoint): New.
10752 (gdb_probe): New.
10753 (collect_ust_data_at_tracepoint): New.
10754 (gdb_ust_probe): New.
10755 (UNIX_PATH_MAX, SOCK_DIR): New.
10756 (gdb_ust_connect_sync_socket): New.
10757 (resume_thread, stop_thread): New.
10758 (run_inferior_command): New.
10759 (init_named_socket): New.
10760 (gdb_ust_socket_init): New.
10761 (cstr_to_hexstr): New.
10762 (next_st): New.
10763 (first_marker, next_marker): New.
10764 (response_ust_marker): New.
10765 (cmd_qtfstm, cmd_qtsstm): New.
10766 (unprobe_marker_at, probe_marker_at): New.
10767 (cmd_qtstmat, gdb_ust_thread): New.
10768 (gdb_ust_init): New.
10769 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10770 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10771 (ST_REGENTRY): New.
10772 (x86_64_st_collect_regmap): New.
10773 (X86_64_NUM_ST_COLLECT_GREGS): New.
10774 (AMD64_RIP_REGNUM): New.
10775 (supply_static_tracepoint_registers): New.
10776 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10777 (ST_REGENTRY): New.
10778 (i386_st_collect_regmap): New.
10779 (i386_NUM_ST_COLLECT_GREGS): New.
10780 (supply_static_tracepoint_registers): New.
10781 * server.c (handle_query): Handle qXfer:statictrace:read.
10782 <qSupported>: Report support for StaticTracepoints, and
10783 qXfer:statictrace:read features.
10784 * server.h (traceframe_read_sdata)
10785 (supply_static_tracepoint_registers): Declare.
10786 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10787 (unpack_varlen_hex): Include in IPA build.
10788 * Makefile.in (ustlibs, ustinc): New.
10789 (IPA_OBJS): Add remote-utils-ipa.o.
10790 ($(IPA_LIB)): Link -ldl and -lpthread.
10791 (UST_CFLAGS): New.
10792 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10793 * config.in, configure: Regenerate.
10794
9e4344e5
PA
107952010-06-20 Ian Lance Taylor <iant@google.com>
10796 Pedro Alves <pedro@codesourcery.com>
10797
10798 * linux-x86-low.c (always_true): Delete.
10799 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10800 trying to fool the compiler with always_true.
10801
c6beb2cb
PA
108022010-06-20 Pedro Alves <pedro@codesourcery.com>
10803
10804 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10805 conditions in gdbserver.
10806
d2ed6730
UW
108072010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10808
10809 * spu-low.c (spu_read_memory): Wrap around local store limit.
10810 (spu_write_memory): Likewise.
10811
4e29fb54
PA
108122010-06-15 Pedro Alves <pedro@codesourcery.com>
10813
10814 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10815 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10816 LONGEST uses.
10817 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10818 uses.
10819 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10820 uses with LONGEST uses.
10821
6a271cae
PA
108222010-06-14 Stan Shebs <stan@codesourcery.com>
10823 Pedro Alves <pedro@codesourcery.com>
10824
10825 Bytecode compiler.
10826
10827 * linux-x86-low.c: Include limits.h.
10828 (add_insns): New.
10829 (always_true): New.
10830 (EMIT_ASM): New.
10831 (EMIT_ASM32): New.
10832 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10833 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10834 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10835 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10836 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10837 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10838 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10839 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10840 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10841 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10842 (amd64_emit_void_call_2): New.
10843 (amd64_emit_ops): New.
10844 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10845 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10846 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10847 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10848 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10849 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10850 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10851 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10852 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10853 (i386_emit_stack_adjust, i386_emit_int_call_1)
10854 (i386_emit_void_call_2): New.
10855 (i386_emit_ops): New.
10856 (x86_emit_ops): New.
10857 (the_low_target): Install x86_emit_ops.
10858 * server.h (struct emit_ops): New.
10859 (get_raw_reg_func_addr): Declare.
10860 (current_insn_ptr, emit_error): Declare.
10861 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10862 (set_trace_state_variable_value): New defines.
10863 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10864 addr_get_trace_state_variable_value and
10865 addr_set_trace_state_variable_value.
10866 (symbol_list): New fields for get_raw_reg,
10867 get_trace_state_variable_value and set_trace_state_variable_value.
10868 (condfn): New typedef.
10869 (struct tracepoint): New field `compiled_cond'.
10870 (do_action_at_tracepoint): Clear compiled_cond.
10871 (get_trace_state_variable_value, set_trace_state_variable_value):
10872 Export in the IPA.
10873 (condition_true_at_tracepoint): If there's a compiled condition,
10874 run that.
10875 (current_insn_ptr, emit_error): New globals.
10876 (struct bytecode_address): New.
10877 (get_raw_reg_func_addr): New.
10878 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10879 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10880 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10881 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10882 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10883 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10884 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10885 (compile_tracepoint_condition, compile_bytecodes): New.
10886 * target.h (emit_ops): Forward declare.
10887 (struct target_ops): New field emit_ops.
10888 (target_emit_ops): New.
10889 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10890 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10891 * linux-low.c (linux_emit_ops): New.
10892 (linux_target_ops): Install it.
10893 * linux-low.h (struct linux_target_ops): New field emit_ops.
10894
92b72907
UW
108952010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10896
10897 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10898 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10899
fa593d66
PA
109002010-06-01 Pedro Alves <pedro@codesourcery.com>
10901 Stan Shebs <stan@codesourcery.com>
10902
10903 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10904 (all): Depend on $(extra_libraries).
10905 (install-only): Install the IPA.
10906 (IPA_OBJS, IPA_LIB): New.
10907 (clean): Remove the IPA lib.
10908 (IPAGENT_CFLAGS): New.
10909 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10910 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10911 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10912 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10913 * configure.ac: Check for atomic builtins support in the compiler.
10914 (IPA_DEPFILES, extra_libraries): Define.
10915 * configure.srv (ipa_obj): Add description.
10916 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10917 (i[34567]86-*-linux*): Set ipa_obj.
10918 (x86_64-*-linux*): Set ipa_obj.
10919 * linux-low.c (stabilizing_threads): New.
10920 (supports_fast_tracepoints): New.
10921 (linux_detach): Stabilize threads before detaching.
10922 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10923 the lwp is either not stabilizing, or is moving out of a jump pad.
10924 (linux_fast_tracepoint_collecting): New.
10925 (maybe_move_out_of_jump_pad): New.
10926 (enqueue_one_deferred_signal): New.
10927 (dequeue_one_deferred_signal): New.
10928 (linux_wait_for_event_1): If moving out of a jump pad, defer
10929 pending signals to later.
10930 (linux_stabilize_threads): New.
10931 (linux_wait_1): Check if threads need moving out of jump pads, and
10932 do it if so.
10933 (stuck_in_jump_pad_callback): New.
10934 (move_out_of_jump_pad_callback): New.
10935 (lwp_running): New.
10936 (linux_resume_one_lwp): Handle moving out of jump pads.
10937 (linux_set_resume_request): Dequeue deferred signals.
10938 (need_step_over_p): Also step over fast tracepoint jumps.
10939 (start_step_over): Also uninsert fast tracepoint jumps.
10940 (finish_step_over): Also reinsert fast tracepoint jumps.
10941 (linux_install_fast_tracepoint_jump): New.
10942 (linux_target_ops): Install linux_stabilize_threads and
10943 linux_install_fast_tracepoint_jump_pad.
10944 * linux-low.h (linux_target_ops) <get_thread_area,
10945 install_fast_tracepoint_jump_pad>: New fields.
10946 (struct lwp_info) <collecting_fast_tracepoint,
10947 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10948 (linux_get_thread_area): Declare.
10949 * linux-x86-low.c (jump_insn): New.
10950 (x86_get_thread_area): New.
10951 (append_insns): New.
10952 (push_opcode): New.
10953 (amd64_install_fast_tracepoint_jump_pad): New.
10954 (i386_install_fast_tracepoint_jump_pad): New.
10955 (x86_install_fast_tracepoint_jump_pad): New.
10956 (the_low_target): Install x86_get_thread_area and
10957 x86_install_fast_tracepoint_jump_pad.
10958 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10959 (struct fast_tracepoint_jump): New.
10960 (fast_tracepoint_jump_insn): New.
10961 (fast_tracepoint_jump_shadow): New.
10962 (find_fast_tracepoint_jump_at): New.
10963 (fast_tracepoint_jump_here): New.
10964 (delete_fast_tracepoint_jump): New.
10965 (set_fast_tracepoint_jump): New.
10966 (uninsert_fast_tracepoint_jumps_at): New.
10967 (reinsert_fast_tracepoint_jumps_at): New.
10968 (set_breakpoint_at): Use write_inferior_memory.
10969 (uninsert_raw_breakpoint): Use write_inferior_memory.
10970 (check_mem_read): Mask out fast tracepoint jumps.
10971 (check_mem_write): Mask out fast tracepoint jumps.
10972 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10973 (set_fast_tracepoint_jump): Declare.
10974 (delete_fast_tracepoint_jump)
10975 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10976 (reinsert_fast_tracepoint_jumps_at): Declare.
10977 * regcache.c: Don't compile many functions when building the
10978 in-process agent library.
10979 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10980 the register buffer in the heap.
10981 (free_register_cache): If the register buffer isn't owned by the
10982 regcache, don't free it.
10983 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10984 pre-existing register caches.
10985 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10986 type.
10987 (convert_ascii_to_int): : Constify `from' parameter type.
10988 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10989 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10990 the needed buffer in-place.
10991 (relocate_instruction): New.
10992 * server.c (handle_query) <qSymbols>: If the target supports
10993 tracepoints, give it a chance of looking up symbols. Report
10994 support for fast tracepoints.
10995 (handle_status): Stabilize threads.
10996 (process_serial_event): Adjust.
10997 * server.h (struct fast_tracepoint_jump): Forward declare.
10998 (struct process_info) <fast_tracepoint_jumps>: New field.
10999 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11000 (decode_X_packet, decode_M_packet): Adjust.
11001 (relocate_instruction): Declare.
11002 (in_process_agent_loaded): Declare.
11003 (tracepoint_look_up_symbols): Declare.
11004 (struct fast_tpoint_collect_status): Declare.
11005 (fast_tracepoint_collecting): Declare.
11006 (force_unlock_trace_buffer): Declare.
11007 (handle_tracepoint_bkpts): Declare.
11008 (initialize_low_tracepoint)
11009 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11010 * target.h (struct target_ops) <stabilize_threads,
11011 install_fast_tracepoint_jump_pad>: New fields.
11012 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11013 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11014 [HAVE_STDINT_H]: Include stdint.h.
11015 (trace_debug_1): Rename to ...
11016 (trace_vdebug): ... this.
11017 (trace_debug): Rename to ...
11018 (trace_debug_1): ... this. Add `level' parameter.
11019 (trace_debug): New.
11020 (ATTR_USED, ATTR_NOINLINE): New.
11021 (IP_AGENT_EXPORT): New.
11022 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11023 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11024 (about_to_request_buffer_space, trace_buffer_is_full)
11025 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11026 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11027 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11028 (traceframe_write_count, traceframes_created)
11029 (trace_state_variables)
11030 New renaming defines.
11031 (struct ipa_sym_addresses): New.
11032 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11033 (symbol_list): New.
11034 (ipa_sym_addrs): New.
11035 (all_tracepoint_symbols_looked_up): New.
11036 (in_process_agent_loaded): New.
11037 (write_e_ipa_not_loaded): New.
11038 (maybe_write_ipa_not_loaded): New.
11039 (tracepoint_look_up_symbols): New.
11040 (debug_threads) [IN_PROCESS_AGENT]: New.
11041 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11042 (UNKNOWN_SIDE_EFFECTS): New.
11043 (stop_tracing): New.
11044 (flush_trace_buffer): New.
11045 (stop_tracing_bkpt): New.
11046 (flush_trace_buffer_bkpt): New.
11047 (read_inferior_integer): New.
11048 (read_inferior_uinteger): New.
11049 (read_inferior_data_pointer): New.
11050 (write_inferior_data_pointer): New.
11051 (write_inferior_integer): New.
11052 (write_inferior_uinteger): New.
11053 (struct collect_static_trace_data_action): Delete.
11054 (enum tracepoint_type): New.
11055 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
11056 <actions_str, step_actions, step_actions_str>: Only include in
11057 GDBserver.
fa593d66
PA
11058 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11059 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11060 (tracepoints): Use IP_AGENT_EXPORT.
11061 (last_tracepoint): Don't include in the IPA.
11062 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11063 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11064 (alloced_trace_state_variables): New.
11065 (trace_state_variables): Use IP_AGENT_EXPORT.
11066 (traceframe_t): Delete unused variable.
11067 (circular_trace_buffer): Don't include in the IPA.
11068 (trace_buffer_start): Delete.
11069 (struct trace_buffer_control): New.
11070 (trace_buffer_free): Delete.
11071 (struct ipa_trace_buffer_control): New.
11072 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11073 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11074 New.
11075 (trace_buffer_ctrl): New.
11076 (TRACE_BUFFER_CTRL_CURR): New.
11077 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11078 Reimplement as macros.
11079 (trace_buffer_wrap): Delete.
11080 (traceframe_write_count, traceframe_read_count)
11081 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11082 (struct tracepoint_hit_ctx) <type>: New field.
11083 (struct fast_tracepoint_ctx): New.
11084 (memory_barrier): New.
11085 (cmpxchg): New.
11086 (record_tracepoint_error): Update atomically in the IPA.
11087 (clear_inferior_trace_buffer): New.
11088 (about_to_request_buffer_space): New.
11089 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11090 updating the same buffer.
11091 (add_tracepoint): Default the tracepoint's type to trap
11092 tracepoint, and orig_size to -1.
11093 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11094 internal variables.
11095 (create_trace_state_variable): New parameter `gdb'. Handle it.
11096 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11097 (cmd_qtdp): Handle fast tracepoints.
11098 (cmd_qtdv): Adjust.
11099 (max_jump_pad_size): New.
11100 (gdb_jump_pad_head): New.
11101 (get_jump_space_head): New.
11102 (claim_jump_space): New.
11103 (sort_tracepoints): New.
11104 (MAX_JUMP_SIZE): New.
11105 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11106 IPA.
11107 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11108 support. Upload fast traceframes, and delete internal IPA
11109 breakpoints.
11110 (stop_tracing_handler): New.
11111 (flush_trace_buffer_handler): New.
11112 (cmd_qtstop): Upload fast tracepoints.
11113 (response_tracepoint): Handle fast tracepoints.
11114 (tracepoint_finished_step): Upload fast traceframes. Set the
11115 tracepoint hit context's tracepoint type.
11116 (handle_tracepoint_bkpts): New.
11117 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11118 type. Add comment about fast tracepoints.
11119 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11120 non-existing action_str field.
11121 (get_context_regcache): Handle fast tracepoints.
11122 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11123 to the regcache.
11124 (fast_tracepoint_from_jump_pad_address): New.
11125 (fast_tracepoint_from_ipa_tpoint_address): New.
11126 (collecting_t): New.
11127 (force_unlock_trace_buffer): New.
11128 (fast_tracepoint_collecting): New.
11129 (collecting): New.
11130 (gdb_collect): New.
11131 (write_inferior_data_ptr): New.
11132 (target_tp_heap): New.
11133 (target_malloc): New.
11134 (download_agent_expr): New.
11135 (UALIGN): New.
11136 (download_tracepoints): New.
11137 (download_trace_state_variables): New.
11138 (upload_fast_traceframes): New.
11139 (IPA_FIRST_TRACEFRAME): New.
11140 (IPA_NEXT_TRACEFRAME_1): New.
11141 (IPA_NEXT_TRACEFRAME): New.
11142 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11143 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11144 (gdb_jump_pad_buffer_end): New.
11145 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11146 (initialize_tracepoint): Adjust.
11147 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11148 buffer. Initialize the low module.
11149 * utils.c (PREFIX, TOOLNAME): New.
11150 (malloc_failure): Use PREFIX.
11151 (error): In the IPA, an error causes an exit.
11152 (fatal, warning): Use PREFIX.
11153 (internal_error): Use TOOLNAME.
11154 (NUMCELLS): Increase to 10.
11155 * configure, config.in: Regenerate.
11156
d149dd1d
PA
111572010-06-01 Pedro Alves <pedro@codesourcery.com>
11158
11159 * server.c (handle_query) <qSupported>: Do two passes over the
11160 qSupported string to avoid nesting strtok.
11161
f6528abd
JK
111622010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11163
11164 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11165 (CDEPS): New.
11166 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11167 -Wl,--dynamic-list.
11168 * configure: Regenerate.
11169 * proc-service.list: New.
11170
ca2a87a0
JK
111712010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11172
11173 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11174 New comment.
11175
363a6e9f
OS
111762010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11177
11178 * gdbreplay.c (remote_open): Check error return from socket() call by
11179 its equality to -1 not by it being negative.
11180 * remote-utils.c (remote_open): Likewise.
11181
d23b6cb1
PA
111822010-05-23 Pedro Alves <pedro@codesourcery.com>
11183
11184 * config.h: Regenerate.
11185
28d3cf85
MK
111862010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11187
11188 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11189 doesn't provide PTRACE_GET_THREAD_AREA.
11190
fea36a59
MK
111912010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11192
11193 * linux-m68k-low.c: Include <asm/ptrace.h>
11194 (ps_get_thread_area): Implement.
11195
24b066ba
DE
111962010-05-03 Doug Evans <dje@google.com>
11197
11198 * event-loop.c (struct callback_event): New struct.
11199 (callback_list): New global.
11200 (append_callback_event, delete_callback_event): New functions.
11201 (process_callback): New function.
11202 (start_event_loop): Call it.
11203 * remote-utils.c (NOT_SCHEDULED): Define.
11204 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11205 moved out of readchar.
11206 (readchar): Rewrite. Call reschedule before returning.
11207 (reset_readchar): New function.
11208 (remote_close): Call it.
11209 (process_remaining, reschedule): New functions.
11210 * server.h (callback_handler_func): New typedef.
11211 (append_callback_event, delete_callback_event): Declare.
11212
9836d6ea
PA
112132010-05-03 Pedro Alves <pedro@codesourcery.com>
11214
11215 * proc-service.c (ps_pglobal_lookup): Use
11216 thread_db_look_up_one_symbol.
11217 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11218 parameter. Use it instead of all_symbols_looked_up.
11219 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11220 field.
11221 (all_symbols_looked_up): Don't declare.
11222 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11223 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11224 field.
11225 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11226 Set all_symbols_looked_up here.
11227 (thread_db_look_up_one_symbol): New.
11228 (thread_db_get_tls_address): Adjust.
11229 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11230 thread_db object on the heap, and tentatively set it in the
11231 process structure.
11232 (thread_db_init): Don't set all_symbols_looked_up here.
11233 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11234
7984d532
PA
112352010-05-03 Pedro Alves <pedro@codesourcery.com>
11236
11237 * linux-low.c (linux_kill, linux_detach): Adjust.
11238 (status_pending_p_callback): Remove redundant statement. Check
11239 for !TARGET_WAITIKIND_IGNORE, instead of
11240 TARGET_WAITKIND_STOPPED.
11241 (handle_tracepoints): Make sure LWP is locked. Adjust.
11242 (linux_wait_for_event_1): Adjust.
11243 (linux_cancel_breakpoints): New.
11244 (unsuspend_one_lwp): New.
11245 (unsuspend_all_lwps): New.
11246 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11247 (send_sigstop_callback): Change return type to int, add new
11248 `except' parameter and handle it.
11249 (suspend_and_send_sigstop_callback): New.
11250 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11251 pass them down. If SUSPEND, also increment the lwp's suspend
11252 count.
11253 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11254 (need_step_over_p): Don't consider suspended LWPs.
11255 (start_step_over): Adjust.
11256 (proceed_one_lwp): Change return type to int, add new `except'
11257 parameter and handle it.
11258 (unsuspend_and_proceed_one_lwp): New.
11259 (proceed_all_lwps): Use find_inferior instead of
11260 for_each_inferior.
11261 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11262 also decrement the suspend count of LWPs. Pass `except' down,
11263 instead of hacking its suspend count.
11264 (linux_pause_all): Add `freeze' parameter. Adjust.
11265 (linux_unpause_all): New.
11266 (linux_target_ops): Install linux_unpause_all.
11267 * server.c (handle_status): Adjust.
11268 * target.h (struct target_ops): New fields `unpause_all' and
11269 `cancel_breakpoints'. Add new parameter to `pause_all'.
11270 (pause_all): Add new `freeze' parameter.
11271 (unpause_all): New.
11272 (cancel_breakpoints): New.
11273 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11274 cancel breakpoints.
11275 (cmd_qtstart): Pause threads.
11276 (stop_tracing): Pause threads, and cancel breakpoints.
11277 * win32-low.c (win32_target_ops): Adjust.
11278
e471f25b
PA
112792010-05-03 Pedro Alves <pedro@codesourcery.com>
11280
11281 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11282 the inferior right away from here...
11283 (linux_wait_1): ... to here, and adjust to check the thread's
11284 last_resume_kind instead of the lwp's step or stop_expected flags.
11285
1915ef4f
PA
112862010-05-02 Pedro Alves <pedro@codesourcery.com>
11287
11288 * README: Use consistent `GDB' and `GDBserver' spellings.
11289
f9e39928
PA
112902010-05-02 Pedro Alves <pedro@codesourcery.com>
11291
11292 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11293 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11294 (linux_detach_one_lwp): Assume the lwp is stopped.
11295 (any_thread_of): Delete.
11296 (linux_detach): Stop all lwps here. Don't blindly delete all
11297 breakpoints.
11298 (delete_lwp_callback): New.
11299 (linux_mourn): Delete all lwps of the process that is gone.
11300 (linux_wait_1): Don't delete the last lwp of the process here.
11301 * mem-break.h (mark_breakpoints_out): Declare.
11302 * mem-break.c (mark_breakpoints_out): New.
11303 (free_all_breakpoints): Use it.
11304 * server.c (handle_target_event): If the process is gone, mark
11305 breakpoints out.
11306 * thread-db.c (struct thread_db) <create_bp>: New field.
11307 (thread_db_enable_reporting): Fix prototype. Store a thread event
11308 breakpoint reference in the thread_db struct.
11309 (thread_db_load_search): Clear the thread_db object.
11310 (try_thread_db_load_1): Ditto.
11311 (switch_to_process): New.
11312 (disable_thread_event_reporting): Use it.
11313 (remove_thread_event_breakpoints): New.
11314 (thread_db_detach, thread_db_mourn): Use it.
11315
1e7fc18c
PA
113162010-05-01 Pedro Alves <pedro@codesourcery.com>
11317
11318 * linux-low.c (linux_enable_event_reporting): New.
11319 (linux_wait_for_event_1, handle_extended_wait): Use it.
11320
02fc4de7
PA
113212010-04-30 Pedro Alves <pedro@codesourcery.com>
11322
11323 * linux-low.c (linux_kill_one_lwp, linux_kill)
11324 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11325 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11326 SIGSTOP even if the LWP is stopped.
11327 (send_sigstop_callback): New.
11328 (stop_all_lwps): Use send_sigstop_callback instead.
11329 (linux_resume_one_thread): Adjust.
11330 (proceed_one_lwp): Still proceed an LWP that the client has
11331 requested to stop, if we haven't reported it as stopped yet. Make
11332 sure that LWPs the client want stopped, have a pending SIGSTOP.
11333
bc3b5632
DE
113342010-04-26 Doug Evans <dje@google.com>
11335
ae1ada35
DE
11336 * server.c (handle_general_set): Make static.
11337
bc3b5632
DE
11338 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11339 Print received char after testing for error/eof instead of before.
11340 (input_interrupt): Tweak comment.
11341
65730243
DE
113422010-04-23 Doug Evans <dje@google.com>
11343
11344 * server.c (start_inferior): Print inferior argv if --debug.
11345
a8ae7dc0
AR
113462010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11347
11348 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11349 * nto-x86-low.c: Include server.h
11350
1c07cc19
PM
113512010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11352
11353 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11354 be consistent with other sources of this directory.
11355 (init_registers_amd64): Correct name of source file of this function
11356 in the comment.
11357
e0a61e09
PM
113582010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11359
11360 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11361 64-bit executables.
11362
54709339
PM
113632010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11364
11365 * win32-i386-low.c: Add 64-bit support.
11366 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11367 (init_registers_amd64): Declare.
11368 (mappings): Add 64-bit version of array.
11369 (init_windows_x86): New function.
11370 (the_low_target): Change init_arch field to init_windows_x86.
11371
e8f0053d
PM
113722010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11373
11374 * win32-low.c: Adapt to support also 64-bit architecture.
11375 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11376 (get_image_name): Use SIZE_T type for local variable `done'.
11377 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11378 (toolhelp_get_dll_name): Idem.
11379 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11380 Use uintptr_t typecast to avoid warning.
11381 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11382 (handle_exception): Use phex_nz to avoid warning.
11383 (win32_wait): Remove unused local variable `process'.
11384
c481e77e
PM
113852010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11386
11387 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11388 `amd64-avx.o'.
11389
12ea4b69
PM
113902010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11391
11392 * configure.ac: Use `ws2_32' library for srv_mingw.
11393 * configure: Regenerate.
11394 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11395 * remote-utils.c: Likewise.
11396
f6d1620c
L
113972010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11398
11399 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11400 if __x86_64__ is defined.
11401
8e642873
PM
114022010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11403
11404 * configure: Regenerate.
11405
711e434b
PM
114062010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11407
11408 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11409 * target.h (target_ops): New get_tib_address field.
11410 * win32-low.h (win32_thread_info): Add thread_local_base field.
11411 * win32-low.c (child_add_thread): Add tlb argument.
11412 Set thread_local_base field to TLB.
11413 (get_child_debug_event): Adapt to child_add_thread change.
11414 (win32_get_tib_address): New function.
11415 (win32_target_ops): Set get_tib_address field to
11416 win32_get_tib_address.
11417 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11418
505106cd
PA
114192010-04-12 Pedro Alves <pedro@codesourcery.com>
11420
505106cd
PA
11421 * linux-low.c (linux_mourn): Also remove the process.
11422 * server.c (handle_target_event): Don't remove the process here.
11423 * nto-low.c (nto_mourn): New.
11424 (nto_target_ops): Install it.
11425 * spu-low.c (spu_mourn): New.
11426 (spu_target_ops): Install it.
11427 * win32-low.c (win32_mourn): New.
11428 (win32_target_ops): Install it.
11429
e8470a06
PA
114302010-04-12 Pedro Alves <pedro@codesourcery.com>
11431
11432 * server.h (buffer_xml_printf): Remove redundant `;'.
11433
45ba0d02
PA
114342010-04-12 Pedro Alves <pedro@codesourcery.com>
11435
11436 * regcache.c (set_register_cache): Invalidate regcaches before
11437 changing the register cache layout.
11438 (regcache_invalidate_one): Allow a NULL regcache.
11439 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11440 regcaches before changing the register cache layout or the target
11441 regsets.
11442
59e04013
L
114432010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11444
11445 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11446 variable warning on Linux/x86-64.
11447
8336d594
PA
114482010-04-11 Pedro Alves <pedro@codesourcery.com>
11449
11450 GDBserver disconnected tracing support.
11451
11452 * linux-low.c (linux_remove_process): Delete.
11453 (add_lwp): Don't set last_resume_kind here.
11454 (linux_kill): Use `mourn'.
11455 (linux_detach): Use `thread_db_detach', and `mourn'.
11456 (linux_mourn): New.
11457 (linux_attach_lwp_1): Adjust comment.
11458 (linux_attach): last_resume_kind moved the thread_info; adjust.
11459 (status_pending_p_callback): Adjust.
11460 (linux_wait_for_event_1): Adjust.
11461 (count_events_callback, select_singlestep_lwp_callback)
11462 (select_event_lwp_callback, cancel_breakpoints_callback)
11463 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11464 (proceed_one_lwp): Adjust.
11465 (linux_async): Add debug output.
11466 (linux_thread_stopped): New.
11467 (linux_pause_all): New.
11468 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11469 linux_pause_all.
11470 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11471 (thread_db_free): Delete declaration.
11472 (thread_db_detach, thread_db_mourn): Declare.
11473 * thread-db.c (thread_db_init): Use thread_db_mourn.
11474 (thread_db_free): Delete, split in two.
11475 (disable_thread_event_reporting): New.
11476 (thread_db_detach): New.
11477 (thread_db_mourn): New.
11478
11479 * server.h (struct thread_info) <last_resume_kind>: New field.
11480 <attached>: Add comment.
11481 <gdb_detached>: New field.
11482 (handler_func): Change return type to int.
11483 (handle_serial_event, handle_target_event): Ditto.
11484 (gdb_connected): Declare.
11485 (tracing): Delete.
11486 (disconnected_tracing): Declare.
11487 (stop_tracing): Declare.
11488
11489 * server.c (handle_query) <qSupported>: Report support for
11490 disconnected tracing.
11491 (queue_stop_reply_callback): Account for running threads.
11492 (gdb_wants_thread_stopped): New.
11493 (gdb_wants_all_threads_stopped): New.
11494 (gdb_reattached_process): New.
11495 (handle_status): Clear the `gdb_detached' flag of all processes.
11496 In all-stop, stop all threads.
11497 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11498 (process_serial_event): If the remote connection breaks, or if an
11499 exit was forced with "monitor exit", force an event loop exit.
11500 Handle disconnected tracing on detach.
11501 (handle_serial_event): Adjust.
11502 (handle_target_event): If GDB isn't connected, forward events back
11503 to the inferior, unless the last process exited, in which case,
11504 exit gdbserver. Adjust interface.
11505
11506 * remote-utils.c (remote_open): Don't block in accept. Instead
11507 register an event loop source on the listen socket file
11508 descriptor. Refactor bits into ...
11509 (listen_desc): ... this new global.
11510 (gdb_connected): ... this new function.
11511 (enable_async_notification): ... this new function.
11512 (handle_accept_event): ... this new function.
11513 (remote_close): Clear remote_desc.
11514
11515 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11516
11517 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11518 New fields.
11519 (mourn_inferior): Define.
11520 (target_process_qsupported): Avoid the dangling else problem.
11521 (thread_stopped): Define.
11522 (pause_all): Define.
11523 (target_waitstatus_to_string): Declare.
11524 * target.c (target_waitstatus_to_string): New.
11525
11526 * tracepoint.c (tracing): Make extern.
11527 (disconnected_tracing): New.
11528 (stop_tracing): Make extern. Handle tracing stops due to GDB
11529 disconnecting.
11530 (cmd_qtdisconnected): New.
11531 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11532 (handle_tracepoint_general_set): Handle QTDisconnected.
11533
11534 * event-loop.c (event_handler_func): Change return type to int.
11535 (process_event): Bail out if the event handler wants the event
11536 loop to stop.
11537 (handle_file_event): Ditto.
11538 (start_event_loop): Bail out if the event handler wants the event
11539 loop to stop.
11540
11541 * nto-low.c (nto_target_ops): Adjust.
11542 * spu-low.c (spu_wait): Don't remove the process here.
11543 (spu_target_ops): Adjust.
11544 * win32-low.c (win32_wait): Don't remove the process here.
11545 (win32_target_ops): Adjust.
11546
5d267c4c
PA
115472010-04-11 Pedro Alves <pedro@codesourcery.com>
11548
11549 * regcache.c (realloc_register_cache): Invalidate inferior's
11550 regcache before recreating it.
11551
623ccd72
PA
115522010-04-09 Pedro Alves <pedro@codesourcery.com>
11553
11554 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11555
219f2f23
PA
115562010-04-09 Stan Shebs <stan@codesourcery.com>
11557 Pedro Alves <pedro@codesourcery.com>
11558
11559 * server.h (LONGEST): New.
11560 (struct thread_info) <while_stepping>: New field.
11561 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11562 Declare.
11563 (initialize_tracepoint, handle_tracepoint_general_set)
11564 (handle_tracepoint_query, tracepoint_finished_step)
11565 (tracepoint_was_hit, release_while_stepping_state_list):
11566 (current_traceframe): Declare.
11567 * server.c (handle_general_set): Handle tracepoint packets.
11568 (read_memory): New.
11569 (write_memory): New.
11570 (handle_search_memory_1): Use read_memory.
11571 (handle_query): Report support for conditional tracepoints, trace
11572 state variables, and tracepoint sources. Handle tracepoint
11573 queries.
11574 (main): Initialize the tracepoints module.
11575 (process_serial_event): Handle traceframe reads/writes.
11576
11577 * linux-low.c (handle_tracepoints): New.
11578 (linux_wait_1): Call it.
11579 (linux_resume_one_lwp): Handle while-stepping.
11580 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11581 (linux_target_ops): Install them.
11582 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11583 New field.
11584 * linux-x86-low.c (x86_supports_tracepoints): New.
11585 (the_low_target). Install it.
11586
11587 * mem-break.h (delete_breakpoint): Declare.
11588 * mem-break.c (delete_breakpoint): Make external.
11589
11590 * target.h (struct target_ops): Add `supports_tracepoints',
11591 `read_pc', and `write_pc' fields.
11592 (target_supports_tracepoints): Define.
11593 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11594 (phex_nz): New.
11595
11596 * regcache.h (struct regcache) <registers_owned>: New field.
11597 (init_register_cache, regcache_cpy): Declare.
11598 (regcache_read_pc, regcache_write_pc): Declare.
11599 (register_cache_size): Declare.
11600 (supply_regblock): Declare.
11601 * regcache.c (init_register_cache): New.
11602 (new_register_cache): Use it.
11603 (regcache_cpy): New.
11604 (register_cache_size): New.
11605 (supply_regblock): New.
11606 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 11607
219f2f23
PA
11608 * tracepoint.c: New.
11609
11610 * Makefile.in (OBS): Add tracepoint.o.
11611 (tracepoint.o): New rule.
11612
3a13a53b
L
116132010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11614
11615 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11616 (i386-mmx.o): New.
11617 (i386-mmx.c): Likewise.
11618 (i386-mmx-linux.o): Likewise.
11619 (i386-mmx-linux.c): Likewise.
11620
11621 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11622 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11623 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11624 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11625
11626 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11627 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11628 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11629
1570b33e
L
116302010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11631
11632 * Makefile.in (clean): Updated.
11633 (i386-avx.o): New.
11634 (i386-avx.c): Likewise.
11635 (i386-avx-linux.o): Likewise.
11636 (i386-avx-linux.c): Likewise.
11637 (amd64-avx.o): Likewise.
11638 (amd64-avx.c): Likewise.
11639 (amd64-avx-linux.o): Likewise.
11640 (amd64-avx-linux.c): Likewise.
11641
11642 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11643 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11644 (srv_amd64_regobj): Add amd64-avx.o.
11645 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11646 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11647 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11648 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11649 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11650 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11651 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11652
11653 * i387-fp.c: Include "i386-xstate.h".
11654 (i387_xsave): New.
11655 (i387_cache_to_xsave): Likewise.
11656 (i387_xsave_to_cache): Likewise.
11657 (x86_xcr0): Likewise.
11658
11659 * i387-fp.h (i387_cache_to_xsave): Likewise.
11660 (i387_xsave_to_cache): Likewise.
11661 (x86_xcr0): Likewise.
11662
11663 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11664 * linux-crisv32-low.c (target_regsets): Likewise.
11665 * linux-m68k-low.c (target_regsets): Likewise.
11666 * linux-mips-low.c (target_regsets): Likewise.
11667 * linux-ppc-low.c (target_regsets): Likewise.
11668 * linux-s390-low.c (target_regsets): Likewise.
11669 * linux-sh-low.c (target_regsets): Likewise.
11670 * linux-sparc-low.c (target_regsets): Likewise.
11671 * linux-xtensa-low.c (target_regsets): Likewise.
11672
11673 * linux-low.c: Include <sys/uio.h>.
11674 (regsets_fetch_inferior_registers): Support nt_type.
11675 (regsets_store_inferior_registers): Likewise.
11676 (linux_process_qsupported): New.
11677 (linux_target_ops): Add linux_process_qsupported.
11678
11679 * linux-low.h (regset_info): Add nt_type.
11680 (linux_target_ops): Add process_qsupported.
11681
11682 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11683 and <sys/uio.h>.
11684 (init_registers_i386_avx_linux): New.
11685 (init_registers_amd64_avx_linux): Likewise.
11686 (xmltarget_i386_linux_no_xml): Likewise.
11687 (xmltarget_amd64_linux_no_xml): Likewise.
11688 (PTRACE_GETREGSET): Likewise.
11689 (PTRACE_SETREGSET): Likewise.
11690 (x86_fill_xstateregset): Likewise.
11691 (x86_store_xstateregset): Likewise.
11692 (use_xml): Likewise.
11693 (x86_linux_update_xmltarget): Likewise.
11694 (x86_linux_process_qsupported): Likewise.
11695 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11696 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11697 init_registers_i386_linux here. Call
11698 x86_linux_update_xmltarget.
11699 (the_low_target): Add x86_linux_process_qsupported.
11700
11701 * server.c (handle_query): Call target_process_qsupported.
11702
11703 * target.h (target_ops): Add process_qsupported.
11704 (target_process_qsupported): New.
11705
fc7238bb
PA
117062010-04-03 Pedro Alves <pedro@codesourcery.com>
11707
11708 * inferiors.c (add_thread): Set last_status kind to
11709 TARGET_WAITKIND_IGNORE.
11710 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11711 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11712 (linux_wait_1): Move `thread' local definition to block that uses
11713 it. Don't NULL initialize `event_child'.
11714 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11715 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11716 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11717
bdabb078
PA
117182010-04-01 Pedro Alves <pedro@codesourcery.com>
11719
11720 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11721 an extended waitstatus, or by a watchpoint.
11722 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11723 thread was stepping or has been stopped by a watchpoint.
11724
d3bbe7a0
PA
117252010-04-01 Pedro Alves <pedro@codesourcery.com>
11726
11727 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11728 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11729 of another, then delete the previous, and validate all
11730 breakpoints.
11731 (validate_inserted_breakpoint): New.
11732 (delete_disabled_breakpoints): New.
11733 (validate_breakpoints): New.
11734 (check_mem_read): Validate breakpoints before trusting their
11735 shadow. Delete disabled breakpoints.
11736 (check_mem_write): Validate breakpoints before trusting they
11737 should be inserted. Delete disabled breakpoints.
11738 * mem-break.h (validate_breakpoints):
11739 * server.c (handle_query): Validate breakpoints when we see a
11740 qSymbol query.
11741
8b07ae33
PA
117422010-04-01 Pedro Alves <pedro@codesourcery.com>
11743
11744 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11745 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11746 if we could tell there's a GDB breakpoint at stop_pc.
11747 (need_step_over_p): Don't do a step over if we find a GDB
11748 breakpoint at the resume PC.
11749
11750 * mem-break.c (struct raw_breakpoint): New.
11751 (enum bkpt_type): New type `gdb_breakpoint'.
11752 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11753 fields. New field `raw'.
11754 (find_raw_breakpoint_at): New.
11755 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11756 breakpoint instead.
11757 (set_breakpoint_at): Adjust.
11758 (delete_raw_breakpoint): New.
11759 (release_breakpoint): New.
11760 (delete_breakpoint): Rename to...
11761 (delete_breakpoint_1): ... this. Add proc parameter. Use
11762 release_breakpoint. Return ENOENT.
11763 (delete_breakpoint): Reimplement.
11764 (find_breakpoint_at): Delete.
11765 (find_gdb_breakpoint_at): New.
11766 (delete_breakpoint_at): Delete.
11767 (set_gdb_breakpoint_at): New.
11768 (delete_gdb_breakpoint_at): New.
11769 (gdb_breakpoint_here): New.
11770 (set_reinsert_breakpoint): Use release_breakpoint.
11771 (uninsert_breakpoint): Rename to ...
11772 (uninsert_raw_breakpoint): ... this.
11773 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11774 (reinsert_raw_breakpoint): Change parameter type to
11775 raw_breakpoint.
11776 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11777 instead.
11778 (check_breakpoints): Adjust. Use release_breakpoint.
11779 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11780 (breakpoint_inserted_here): Ditto.
11781 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11782 Don't trust the breakpoint's shadow if it is not inserted.
11783 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11784 (delete_all_breakpoints): Adjust.
11785 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11786 use delete_breakpoint_1.
11787
11788 * mem-break.h (breakpoints_supported): Delete declaration.
11789 (set_gdb_breakpoint_at): Declare.
11790 (gdb_breakpoint_here): Declare.
11791 (delete_breakpoint_at): Delete.
11792 (delete_gdb_breakpoint_at): Declare.
11793
11794 * server.h (struct raw_breakpoint): Forward declare.
11795 (struct process_info): New field `raw_breakpoints'.
11796
11797 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11798 breakpoints.
11799
6bf5e0ba
PA
118002010-03-24 Pedro Alves <pedro@codesourcery.com>
11801
11802 * linux-low.c (status_pending_p_callback): Fix comment.
11803 (linux_wait_for_event_1): Move most of the internal breakpoint
11804 handling from here...
11805 (linux_wait_1): ... to here.
11806 (count_events_callback): New.
11807 (select_singlestep_lwp_callback): New.
11808 (select_event_lwp_callback): New.
11809 (cancel_breakpoints_callback): New.
11810 (select_event_lwp): New.
11811 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11812 priority to all LWPs that have had events that should be reported
11813 to the client. Cancel breakpoints when about to reporting the
11814 event to the client, not while stopping lwps. No longer cancel
11815 finished single-steps here.
11816 (cancel_finished_single_step): Delete.
11817 (cancel_finished_single_steps): Delete.
11818
414a389f
PA
118192010-03-24 Pedro Alves <pedro@codesourcery.com>
11820
11821 * mem-break.c (enum bkpt_type): New.
11822 (struct breakpoint): New field `type'.
11823 (set_breakpoint_at): Change return type to struct breakpoint
11824 pointer. Set type to `other_breakpoint' by default.
11825 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11826 in the breakpoint list.
11827 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11828 (reinsert_breakpoint): Rename to ...
11829 (reinsert_raw_breakpoint): ... this.
11830 (reinsert_breakpoints_at): Adjust.
11831 * mem-break.h (struct breakpoint): Declare.
11832 (set_breakpoint_at): Change return type to struct breakpoint
11833 pointer.
11834
2280c721
PA
118352010-03-24 Pedro Alves <pedro@codesourcery.com>
11836
11837 * server.c (handle_query): Assign, not compare.
11838
d50171e4
PA
118392010-03-24 Pedro Alves <pedro@codesourcery.com>
11840
11841 Teach linux gdbserver to step-over-breakpoints.
11842
11843 * linux-low.c (can_hardware_single_step): New.
11844 (supports_breakpoints): New.
11845 (handle_extended_wait): If stopping threads, read the stop pc of
11846 the new cloned LWP.
11847 (get_pc): New.
11848 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11849 low target doesn't support retrieving the PC.
11850 (add_lwp): Set last_resume_kind to resume_continue.
11851 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11852 (linux_attach): Don't clear stop_expected. Set the lwp's
11853 last_resume_kind to resume_stop.
11854 (linux_detach_one_lwp): Don't check for removed breakpoints.
11855 (check_removed_breakpoint): Delete.
11856 (status_pending_p): Rename to ...
11857 (status_pending_p_callback): ... this. Don't check for removed
11858 breakpoints. Don't consider threads that are stopped from GDB's
11859 perspective.
11860 (linux_wait_for_lwp): Always read the stop_pc here.
11861 (cancel_breakpoint): New.
11862 (step_over_bkpt): New global.
11863 (linux_wait_for_event_1): Implement stepping over breakpoints.
11864 (gdb_wants_lwp_stopped): New.
11865 (gdb_wants_all_stopped): New.
11866 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11867 single-step traps here. Store the thread's last reported target
11868 wait status.
11869 (send_sigstop): Don't clear stop_expected. Always set it,
11870 instead.
11871 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11872 (cancel_finished_single_step): New.
11873 (cancel_finished_single_steps): New.
11874 (wait_for_sigstop): Don't cancel finished single-step traps here.
11875 (linux_resume_one_lwp): Don't check for removed breakpoints.
11876 Don't set `step' on non-hardware step archs.
11877 (linux_set_resume_request): Ignore resume_stop requests if already
11878 stopping or stopped. Set the lwp's last_resume_kind.
11879 (resume_status_pending_p): Don't check for removed breakpoints.
11880 (need_step_over_p): New.
11881 (start_step_over): New.
11882 (finish_step_over): New.
11883 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11884 requests. Clear the thread's last reported target waitstatus.
11885 Don't use the `suspended' flag. Don't consider pending breakpoints.
11886 (linux_resume): Start a step-over if necessary.
11887 (proceed_one_lwp): New.
11888 (proceed_all_lwps): New.
11889 (unstop_all_lwps): New.
11890 * linux-low.h (struct lwp_info): Rewrite comment for the
11891 `suspended' flag. Add the `stop_pc' field. Delete the
11892 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11893 Add `'last_resume_kind' and `need_step_over' fields.
11894 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11895 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11896 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11897 (set_raw_breakpoint_at): New.
11898 (set_breakpoint_at): Rewrite to use it.
11899 (reinsert_breakpoint_handler): Delete.
11900 (set_reinsert_breakpoint): New.
11901 (reinsert_breakpoint_by_bp): Delete.
11902 (delete_reinsert_breakpoints): New.
11903 (uninsert_breakpoint): Rewrite.
11904 (uninsert_breakpoints_at): New.
11905 (reinsert_breakpoint): Rewrite.
11906 (reinsert_breakpoints_at): New.
11907 (check_breakpoints): Rewrite.
11908 (breakpoint_here): New.
11909 (breakpoint_inserted_here): New.
11910 (check_mem_read): Adjust.
11911 * mem-break.h (breakpoints_supported, breakpoint_here)
11912 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11913 (reinsert_breakpoint_by_bp): Delete declaration.
11914 (delete_reinsert_breakpoints): Declare.
11915 (reinsert_breakpoint): Delete declaration.
11916 (reinsert_breakpoints_at): Declare.
11917 (uninsert_breakpoint): Delete declaration.
11918 (uninsert_breakpoints_at): Declare.
11919 (check_breakpoints): Adjust prototype.
11920 * server.h: Adjust include order.
11921 (struct thread_info): Declare here. Add a `last_status' field.
11922
30ba68cb
MS
119232010-03-23 Michael Snyder <msnyder@vmware.com>
11924
11925 * server.c (crc32): New function.
11926 (handle_query): Add handling for 'qCRC:' request.
11927
b9a881c2
PA
119282010-03-23 Pedro Alves <pedro@codesourcery.com>
11929
11930 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11931 lwp had been stopped by a watchpoint.
11932
e92d13d5
PA
119332010-03-16 Pedro Alves <pedro@codesourcery.com>
11934
11935 * server.h (internal_error): Declare.
11936 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11937 * utils.c (internal_error): New function.
11938
64daa791
AS
119392010-03-15 Andreas Schwab <schwab@redhat.com>
11940
11941 * configure.srv: Fix typo setting srv_regobj.
11942
f52cd8cd
PA
119432010-03-15 Pedro Alves <pedro@codesourcery.com>
11944
11945 * linux-low.c (fetch_register): Avoid passing a non string literal
11946 format to `error'.
11947 (usr_store_inferior_registers): Ditto.
11948
93ae6fdc
PA
119492010-03-14 Pedro Alves <pedro@codesourcery.com>
11950
11951 * linux-low.c (linux_write_memory): Bail out early if peeking
11952 memory failed.
11953
c3adc08c
PA
119542010-03-14 Pedro Alves <pedro@codesourcery.com>
11955
11956 * linux-low.h (struct lwp_info): New fields
11957 `stopped_by_watchpoint' and `stopped_data_address'.
11958 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11959 here, and cache them in the lwp object.
11960 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11961 directly.
11962 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11963 field.
11964 (linux_stopped_by_watchpoint): Rewrite.
11965 (linux_stopped_data_address): Rewrite.
11966
bce522a2
PA
119672010-03-06 Simo Melenius <simo.melenius@iki.fi>
11968
11969 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11970 switching the current inferior, not before.
11971
90884b2b
L
119722010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11973
11974 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11975 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11976 i386-linux.c and amd64-linux.c.
11977 (reg-i386.o): Removed.
11978 (reg-i386.c): Likewise.
11979 (reg-i386-linux.o): Likewise.
11980 (reg-i386-linux.c): Likewise.
11981 (reg-x86-64.o): Likewise.
11982 (reg-x86-64.c): Likewise.
11983 (reg-x86-64-linux.o): Likewise.
11984 (reg-x86-64-linux.c): Likewise.
11985 (i386.o): New.
11986 (i386.c): Likewise.
11987 (i386-linux.o): Likewise.
11988 (i386-linux.c): Likewise.
11989 (amd64.o): Likewise.
11990 (amd64.c): Likewise.
11991 (amd64-linux.o): Likewise.
11992 (amd64-linux.c): Likewise.
11993
11994 * configure.srv (srv_i386_regobj): New.
11995 (srv_i386_linux_regobj): Likewise.
11996 (srv_amd64_regobj): Likewise.
11997 (srv_amd64_linux_regobj): Likewise.
11998 (srv_i386_32bit_xmlfiles): Likewise.
11999 (srv_i386_64bit_xmlfiles): Likewise.
12000 (srv_i386_xmlfiles): Likewise.
12001 (srv_amd64_xmlfiles): Likewise.
12002 (srv_i386_linux_xmlfiles): Likewise.
12003 (srv_amd64_linux_xmlfiles): Likewise.
12004 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12005 srv_xmlfiles to $srv_i386_xmlfiles.
12006 (i[34567]86-*-mingw32ce*): Likewise.
12007 (i[34567]86-*-mingw*): Likewise.
12008 (i[34567]86-*-nto*): Likewise.
12009 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12010 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12011 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12012 (x86_64-*-linux*): Likewise.
12013
12014 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12015 (init_registers_amd64_linux): New.
12016 (x86_arch_setup): Replace init_registers_x86_64_linux with
12017 init_registers_amd64_linux.
12018
193f13e6
MK
120192010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12020
12021 * configure.ac: Check for libdl. If it is not available link against
12022 static libthread_db.
12023 * configure: Regenerate.
12024
85d721b8
PA
120252010-02-22 Pedro Alves <pedro@codesourcery.com>
12026
12027 PR9605
12028
12029 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12030 handing a read watchpoint.
12031 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12032
6076632b
DE
120332010-02-12 Doug Evans <dje@google.com>
12034
12035 * linux-low.c (linux_supports_tracefork_flag): Document.
12036 (linux_look_up_symbols): Add comment.
12037
3327ccf7
L
120382010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12039
12040 * regcache.c (supply_register): Clear regcache if buf is NULL.
12041
0718675c 120422010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 12043 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
12044
12045 * inferiors.c (find_inferior): Add function documentation.
12046 (unloaded_dll): Handle the case where the unloaded dll has not
12047 been previously registered in the dll list.
12048
177321bd
DJ
120492010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12050
12051 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12052 (thumb2_breakpoint): New.
12053 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12054
2b009048
DJ
120552010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12056
12057 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12058 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12059 breakpoints.
12060
3be029c7
PA
120612010-01-21 Pedro Alves <pedro@codesourcery.com>
12062
12063 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12064
18f5de3b
JK
120652010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12066
12067 * linux-s390-low.c (s390_collect_ptrace_register)
12068 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12069
3743bb4f
DE
120702010-01-21 Doug Evans <dje@google.com>
12071
14ce3065
DE
12072 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12073 (PTRACE_ARG4_TYPE): New macro.
12074 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12075 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12076 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12077 (usr_store_inferior_registers): Ditto.
12078 (linux_read_memory, linux_write_memory): Ditto.
12079 (linux_test_for_tracefork): Ditto.
12080
3743bb4f
DE
12081 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12082 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12083
8b315be5
PA
120842010-01-21 Pedro Alves <pedro@codesourcery.com>
12085
12086 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12087 target.
12088
85492558
PA
120892010-01-21 Pedro Alves <pedro@codesourcery.com>
12090
12091 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12092 prototype to take a regcache. Adjust.
12093
442ea881
PA
120942010-01-20 Pedro Alves <pedro@codesourcery.com>
12095
12096 * regcache.h (struct thread_info): Forward declare.
12097 (struct regcache): New.
12098 (new_register_cache): Adjust prototype.
12099 (get_thread_regcache): Declare.
12100 (free_register_cache): Adjust prototype.
12101 (registers_to_string, registers_from_string): Ditto.
12102 (supply_register, supply_register_by_name, collect_register)
12103 (collect_register_as_string, collect_register_by_name): Ditto.
12104 * regcache.c (struct inferior_regcache_data): Delete.
12105 (get_regcache): Rename to ...
12106 (get_thread_regcache): ... this. Adjust. Switch inferior before
12107 fetching registers.
12108 (regcache_invalidate_one): Adjust.
12109 (regcache_invalidate): Fix prototype.
12110 (new_register_cache): Return the new register cache.
12111 (free_register_cache): Change prototype.
12112 (realloc_register_cache): Adjust.
12113 (registers_to_string): Change prototype to take a regcache. Adjust.
12114 (registers_from_string): Ditto.
12115 (register_data): Ditto.
12116 (supply_register): Ditto.
12117 (supply_register_by_name): Ditto.
12118 (collect_register): Ditto.
12119 (collect_register_as_string): Ditto.
12120 (collect_register_by_name): Ditto.
12121 * server.c (process_serial_event): Adjust.
12122 * linux-low.h (regset_fill_func, regset_store_func): Change
12123 prototype.
12124 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12125 Change prototype.
12126 * linux-low.c (get_stop_pc): Adjust.
12127 (check_removed_breakpoint): Adjust.
12128 (linux_wait_for_event): Adjust.
12129 (linux_resume_one_lwp): Adjust.
12130 (fetch_register): Add regcache parameter. Adjust.
12131 (usr_store_inferior_registers): Ditto.
12132 (regsets_fetch_inferior_registers): Ditto.
12133 (regsets_store_inferior_registers): Ditto.
12134 (linux_fetch_registers, linux_store_registers): Ditto.
12135 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12136 regcache. Adjust.
43aaf8b6
PA
12137 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12138 Ditto.
442ea881
PA
12139 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12140 prototype to take a regcache.
12141 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12142 * remote-utils.c (convert_ascii_to_int, outreg)
12143 (prepare_resume_reply): Change prototype to take a regcache.
12144 Adjust.
12145 * target.h (struct target_ops) <fetch_registers, store_registers>:
12146 Change prototype to take a regcache.
12147 (fetch_inferior_registers, store_inferior_registers): Change
12148 prototype to take a regcache. Adjust.
12149 * proc-service.c (ps_lgetregs): Adjust.
12150 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12151 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12152 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12153 take a regcache. Adjust.
12154 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12155 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12156 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12157 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12158 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12159 (cris_cannot_fetch_register):
12160 (cris_breakpoint_at): Change prototype to take a regcache.
12161 Adjust.
12162 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12163 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12164 to take a regcache. Adjust.
12165 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12166 Adjust.
12167 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12168 take a regcache. Adjust.
12169 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12170 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12171 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12172 * linux-mips-low.c (mips_get_pc):
12173 (mips_set_pc): Change prototype to take a regcache. Adjust.
12174 (mips_reinsert_addr): Adjust.
12175 (mips_collect_register): Change prototype to take a regcache.
12176 Adjust.
12177 (mips_supply_register):
12178 (mips_collect_register_32bit, mips_supply_register_32bit)
12179 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12180 (mips_store_fpregset): Ditto.
43aaf8b6
PA
12181 * linux-ppc-low.c (ppc_supply_ptrace_register)
12182 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
12183 (parse_spufs_run): Adjust.
12184 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12185 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12186 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12187 take a regcache. Adjust.
12188 * linux-s390-low.c (s390_collect_ptrace_register)
12189 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12190 (s390_set_pc): Change prototype to take a regcache. Adjust.
12191 (s390_arch_setup): Adjust.
12192 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12193 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12194 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12195 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12196 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12197 regcache. Adjust.
12198 (sparc_breakpoint_at): Adjust.
12199 * linux-xtensa-low.c (xtensa_fill_gregset):
12200 (xtensa_store_gregset):
12201 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12202 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12203 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12204 prototype to take a regcache. Adjust.
12205 * win32-arm-low.c (arm_fetch_inferior_register)
12206 (arm_store_inferior_register): Change prototype to take a
12207 regcache. Adjust.
12208 * win32-i386-low.c (i386_fetch_inferior_register)
12209 (i386_store_inferior_register): Change prototype to take a
12210 regcache. Adjust.
12211 * win32-low.c (child_fetch_inferior_registers)
12212 (child_store_inferior_registers): Change prototype to take a
12213 regcache. Adjust.
12214 (win32_wait): Adjust.
12215 (win32_fetch_inferior_registers): Change prototype to take a
12216 regcache. Adjust.
12217 (win32_store_inferior_registers): Adjust.
12218 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12219 store_inferior_register>: Change prototype to take a regcache.
12220
60c3d7b0
DE
122212010-01-20 Doug Evans <dje@google.com>
12222
12223 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12224 #ifdef.
12225 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 12226 (W_STOPCODE): Provide definition if missing.
60c3d7b0 12227
dc146f7c
VP
122282010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12229
12230 * linux-low.c (linux_core_of_thread): New.
12231 (compare_ints, show_process, list_threads): New.
12232 (linux_qxfer_osdata): Report threads and cores.
12233 (linux_target_op): Register linux_core_of_thread.
12234 * remote-utils.c (prepare_resume_reply): Report the core.
12235 (buffer_xml_printf): Support %d specifier.
12236 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12237 New.
12238 (handle_query): Handle qXfer:threads. Announce availability
12239 thereof.
12240 * target.h (struct target_ops): New field core_of_thread.
12241
7803799a
UW
122422010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12243
12244 * Makefile.in (clean): Remove new generated files.
12245 (reg-s390.o, reg-s390.c): Remove rules.
12246 (reg-s390x.o, reg-s390x.c): Likewise.
12247 (s390-linux32.o, s390-linux32.c): Add rules.
12248 (s390-linux64.o, s390-linux64.c): Likewise.
12249 (s390x-linux64.o, s390x-linux64.c): Likewise.
12250 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12251 * linux-s390-low.c: Include <elf.h>.
12252 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12253 (init_registers_s390): Remove prototype.
12254 (init_registers_s390x): Likewise.
12255 (init_registers_s390_linux32): Add prototype.
12256 (init_registers_s390_linux64): Likewise.
12257 (init_registers_s390x_linux64): Likewise.
12258 (s390_num_regs_3264): New define.
12259 (s390_regmap_3264): New global variable.
12260 (s390_cannot_fetch_register): Remove obsolete check.
12261 (s390_cannot_store_register): Likewise.
12262 (s390_collect_ptrace_register): Handle upper/lower register halves.
12263 (s390_supply_ptrace_register): Likewise.
12264 (s390_fill_gregset): Update to register number changes.
12265 (s390_get_hwcap): New routine.
12266 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12267 Install appropriate regmap and register set.
12268
6e7ffa39
JB
122692010-01-01 Joel Brobecker <brobecker@adacore.com>
12270
12271 * server.c (gdbserver_version): Update copyright year to 2010.
12272 * gdbreplay.c (gdbreplay_version): Likewise.
12273
957f3f49
DE
122742009-12-28 Doug Evans <dje@google.com>
12275
12276 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12277 elf/external.h. Include <elf.h> instead but only if necessary.
12278
ca5c370d
PA
122792009-12-28 Pedro Alves <pedro@codesourcery.com>
12280
12281 * linux-low.c (linux_remove_process): Remove `detaching'
12282 parameter. Don't release/detach from thread_db here.
12283 (linux_kill): Release/detach from thread_db here, ...
12284 (linux_detach): ... and here, before actually detaching.
12285 (linux_wait_1): ... and here, when a process exits.
12286 * thread-db.c (any_thread_of): New.
12287 (thread_db_free): Switch the current inferior to a thread of the
12288 passed in process.
12289
4ee62156
DE
122902009-12-21 Doug Evans <dje@google.com>
12291
d90e6a88
DE
12292 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12293
c5f62d5f
DE
12294 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12295 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12296 warning ifndef __NR_tkill. Move setting of errno there too.
12297 Delete unnecessary resetting of errno after syscall.
12298 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12299
10e86dd7
DE
12300 * configure.ac: Check for dladdr.
12301 * config.in: Regenerate.
12302 * configure: Regenerate.
12303 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12304 (try_thread_db_load): Update.
12305
4ee62156
DE
12306 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12307
00f515da
DE
123082009-12-18 Doug Evans <dje@google.com>
12309
e9464885
DE
12310 * event-loop.c: Include unistd.h if it exists.
12311
07d4f67e
DE
12312 * linux-low.c (my_waitpid): Move definition away from being in
12313 between linux_tracefork_child/linux_test_for_tracefork.
12314
00f515da
DE
12315 * gdb_proc_service.h (psaddr_t): Fix type.
12316 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12317 signature to match glibc.
12318
1de1badb
DE
123192009-12-16 Doug Evans <dje@google.com>
12320
12321 * linux-low.c (linux_read_memory): Fix argument to read.
12322
aeeb81d1
PA
123232009-11-26 Pedro Alves <pedro@codesourcery.com>
12324
12325 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12326 events, don't leave current_inferior pointing at null.
12327
10357975
PA
123282009-11-26 Pedro Alves <pedro@codesourcery.com>
12329
12330 * win32-low.c (LOG): Delete.
12331 (OUTMSG): Output to stderr.
12332 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12333 on compile time LOG macro.
12334 (win32_wait): Fix debug output.
12335
cf6e3471
PA
123362009-11-26 Pedro Alves <pedro@codesourcery.com>
12337
12338 * win32-low.c (win32_add_one_solib): If the dll name is
12339 "ntdll.dll", prepend the system directory to the dll path.
12340
0c85e18e
MK
123412009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12342
12343 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12344
9ac544ce 123452009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 12346 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
12347
12348 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12349 * configure.ac: Check for __mcoldfire__ and set
12350 gdb_cv_m68k_is_coldfire.
12351 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12352 reg-cf.o and reg-m68k.o.
12353 * configure: Regenerated.
12354
fd7dd3e6
PA
123552009-11-16 Pedro Alves <pedro@codesourcery.com>
12356
12357 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12358 Pass it to thread_db_free.
12359 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12360 proper `detaching' argument to linux_remove_process.
12361 * linux-low.h (thread_db_free): Add `detaching' parameter.
12362 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12363 to thread_db_free.
12364 (thread_db_free): Add `detaching' parameter. Only
12365 call td_ta_clear_event if detaching from process.
12366
75aa492e
MK
123672009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12368
12369 * thread-db.c (thread_db_free): Fix typo.
12370
21e1bee4
PP
123712009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12372
12373 PR gdb/10838
12374 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12375
8838b45e
NS
123762009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12377
12378 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12379 with an i686 compiler.
12380 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12381 needed.
12382 * configure: Rebuilt.
12383
8a35fb51
SL
123842009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12385
12386 PR gdb/10783
12387
12388 * server.c (handle_search_memory_1): Correct read_addr initialization
12389 in loop for searching subsequent chunks.
12390
96f15937
PP
123912009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12392
12393 * configure.ac: New --with-libthread-db option.
12394 * thread-db.c: Allow direct dependence on libthread_db.
12395 (thread_db_free): Adjust.
12396 * config.in: Regenerate.
12397 * configure: Likewise.
889bf7c5 12398
5f7d1694
PP
123992009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12400
12401 PR gdb/10757
12402 * thread-db.c (attach_thread): New function.
12403 (maybe_attach_thread): Return success/failure.
12404 (find_new_threads_callback): Adjust.
889bf7c5
PA
12405 (thread_db_find_new_threads): Loop until no new threads.
12406
88e3b899
PA
124072009-10-13 Pedro Alves <pedro@codesourcery.com>
12408
12409 * proc-service.c (ps_lgetregs): Formatting.
12410
cdbfd419
PP
124112009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12412
12413 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12414 * configure.ac: Adjust.
12415 * linux-low.h (struct process_info_private): Move members to struct
12416 thread_db.
12417 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12418 * linux-low.c (linux_remove_process): Adjust.
12419 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12420 * server.c (handle_query): Move code ...
12421 (handle_monitor_command): ... here. New function.
12422 * target.h (struct target_ops): New member.
12423 * thread-db.c (struct thread_db): New.
12424 (libthread_db_search_path): New variable.
12425 (thread_db_create_event, thread_db_enable_reporting)
12426 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12427 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12428 (try_thread_db_load_1, dladdr_to_soname): New functions.
12429 (try_thread_db_load, thread_db_load_search): New functions.
12430 (thread_db_init): Search for libthread_db.
12431 (thread_db_free): New function.
12432 (thread_db_handle_monitor_command): Likewise.
12433 * config.in: Regenerate.
12434 * configure: Regenerate.
889bf7c5 12435
4168d2d6
UW
124362009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12437
12438 * spu-low.c (spu_kill): Wait for inferior to terminate.
12439 Call clear_inferiors.
12440 (spu_detach): Call clear_inferiors.
12441
81ecdfbb
RW
124422009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12443
12444 * aclocal.m4: Regenerate.
12445 * config.in: Likewise.
12446 * configure: Likewise.
12447
0b9ff2c0
UW
124482009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12449
12450 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12451 (parse_spufs_run): New function.
12452 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12453 (ppc_breakpoint_at): Handle SPU breakpoints.
12454
efcbbd14
UW
124552009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12456
12457 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12458 (SPUFS_MAGIC): Define.
12459 (spu_enumerate_spu_ids): New function.
12460 (linux_qxfer_spu): New function.
12461 (linux_target_ops): Install linux_qxfer_spu.
12462
f4d9bade
UW
124632009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12464
12465 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12466 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12467 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12468 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12469 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12470 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12471 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12472 (init_registers_powerpc_cell32l): Add prototype.
12473 (init_registers_powerpc_cell64l): Likewise.
12474 (ppc_arch_setup): Detect Cell/B.E. architecture.
12475
96e946ca
RW
124762009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12477
12478 * Makefile.in (datarootdir): New variable.
12479
58d6951d
DJ
124802009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12481
12482 * linux-low.c (linux_write_memory): Update debugging output.
12483 * Makefile.in (clean): Add new descriptions.
12484 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12485 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12486 * configure.srv: Add new files for arm*-*-linux*.
12487 * linux-arm-low.c: Add new declarations.
12488 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12489 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12490 (HWCAP_VFPv3D16): New.
12491 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12492 instead of __IWMMXT__.
12493 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12494 (arm_arch_setup): New.
12495 (target_regsets): Remove #ifdef. Add VFP regset.
12496 (the_low_target): Use arm_arch_setup.
12497
12b42a12
DJ
124982009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12499
12500 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12501 the main thread again.
12502
ac8c974e
AR
125032009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12504
12505 Adding Neutrino gdbserver.
12506 * configure: Regenerated.
12507 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12508 * configure.srv (i[34567]86-*-nto*): New target.
12509 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12510 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12511 (nto_comctrl) [__QNX__]: New function.
12512 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12513
4424e0c3 125142009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
12515
12516 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12517 srv_tgtobj.
12518
912cf4ba
PA
125192009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12520 Pedro Alves <pedro@codesourcery.com>
12521
12522 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12523 don't support CONTEXT_EXTENDED_REGISTERS.
12524 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12525 (the_low_target): Install them.
12526 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12527 failing with ERROR_PIPE_NOT_CONNECTED.
12528
aa5ca48f
DE
125292009-06-30 Doug Evans <dje@google.com>
12530 Pierre Muller <muller@ics.u-strasbg.fr>
12531
12532 Add h/w watchpoint support to x86-linux, win32-i386.
12533 * Makefile.in (SFILES): Add i386-low.c
12534 (i386_low_h): Define.
12535 (i386-low.o): Add dependencies.
12536 (linux-x86-low.o): Add i386-low.h dependency.
12537 (win32-i386-low.o): Ditto.
12538 * i386-low.c: New file.
12539 * i386-low.h: New file.
12540 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12541 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12542 * linux-low.c (linux_add_process): Initialize arch_private.
12543 (linux_remove_process): Free arch_private.
12544 (add_lwp): Initialize arch_private.
12545 (delete_lwp): Free arch_private.
12546 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12547 provided.
12548 * linux-low.h (process_info_private): New member arch_private.
12549 (lwp_info): New member arch_private.
12550 (linux_target_ops): New members new_process, new_thread,
12551 prepare_to_resume.
12552 (ptid_of): New macro.
12553 * linux-x86-low.c: Include stddef.h, i386-low.h.
12554 (arch_process_info): New struct.
12555 (arch_lwp_info): New struct.
12556 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12557 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12558 (i386_dr_low_get_status): New function.
12559 (x86_insert_point, x86_remove_point): New functions.
12560 (x86_stopped_by_watchpoint): New function.
12561 (x86_stopped_data_address): New function.
12562 (x86_linux_new_process, x86_linux_new_thread): New functions.
12563 (x86_linux_prepare_to_resume): New function.
12564 (the_low_target): Add entries for insert_point, remove_point,
12565 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12566 prepare_to_resume.
12567 * server.c (debug_hw_points): New global.
12568 (monitor_show_help): Document set debug-hw-points.
12569 (handle_query): Process "set debug-hw-points".
12570 * server.h (debug_hw_points): Declare.
12571 (paddress): Declare.
12572 * utils.c (NUMCELLS, CELLSIZE): New macros.
12573 (get_sell, xsnprintf, paddress): New functions.
12574 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12575 remove_point, stopped_by_watchpoint, stopped_data_address.
12576 * win32-i386-low.c: Include i386-low.h.
12577 (debug_reg_state): Replaces dr.
12578 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12579 (i386_dr_low_get_status): New function.
12580 (i386_insert_point, i386_remove_point): New functions.
12581 (i386_stopped_by_watchpoint): New function.
12582 (i386_stopped_data_address): New function.
12583 (i386_initial_stuff): Update.
12584 (get_thread_context,set_thread_context,i386_thread_added): Update.
12585 (the_low_target): Add entries for insert_point,
12586 remove_point, stopped_by_watchpoint, stopped_data_address.
12587 * win32-low.c (win32_insert_watchpoint): New function.
12588 (win32_remove_watchpoint): New function.
12589 (win32_stopped_by_watchpoint): New function.
12590 (win32_stopped_data_address): New function.
12591 (win32_target_ops): Add entries for insert_watchpoint,
12592 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12593 * win32-low.h (win32_target_ops): New members insert_point,
12594 remove_point, stopped_by_watchpoint, stopped_data_address.
12595
d993e290
PA
125962009-06-25 Pedro Alves <pedro@codesourcery.com>
12597
12598 * server.c (process_serial_event): Re-return unsupported, not
12599 error, if the type isn't recognized. Re-allow supporting only
12600 insert or remove packets. Also call require_running for
12601 breakpoints. Add missing break statement to default case. Tidy.
12602 * target.h (struct target_ops): Rename insert_watchpoint to
12603 insert_point, and remove_watchpoint to remove_point.
12604
12605 * linux-low.h (struct linux_target_ops): Likewise.
12606 * linux-low.c (linux_insert_watchpoint): Rename to ...
12607 (linux_insert_point): ... this. Adjust.
12608 (linux_remove_watchpoint): Rename to ...
12609 (linux_remove_point): ... this. Adjust.
12610 (linux_target_ops): Adjust.
12611 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12612 (cris_insert_point): ... this.
12613 (cris_remove_watchpoint): Rename to ...
12614 (cris_remove_point): ... this.
12615 (the_low_target): Adjust.
12616
0f54c268
PM
126172009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12618
12619 * server.c (handle_v_kill): Pass signal_pid to
12620 kill_inferior if multi_process is zero.
12621
c6314022
AR
126222009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12623
12624 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12625 * target.h (target_ops): Comment for *_watchpoint to make it clear
12626 the functions can get types '0' and '1'.
12627
4463ce24
AR
126282009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12629
12630 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12631 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12632 * regcache.c (get_regcache): Likewise.
12633 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12634 * win32-low.c (child_fetch_inferior_registers): Remove check for
12635 regno 0.
12636
cf8fd78b
PA
126372009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12638 Pedro Alves <pedro@codesourcery.com>
12639
12640 * target.h (struct target_ops) <supports_multi_process>: New
12641 callback.
12642 (target_supports_multi_process): New.
12643 * server.c (handle_query): Even if GDB reports support, only
12644 enable multi-process if the target also supports it. Report
12645 multi-process support only if the target backend supports it.
12646 * linux-low.c (linux_supports_multi_process): New function.
12647 (linux_target_ops): Install it as target_supports_multi_process
12648 callback.
12649
47c0c975
DE
126502009-05-24 Doug Evans <dje@google.com>
12651
e09875d4
DE
12652 Global renaming of find_thread_pid to find_thread_ptid.
12653 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12654 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12655 All callers updated.
12656
e27d73f6
DE
12657 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12658 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12659 directly.
12660
47c0c975
DE
12661 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12662 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12663 (linux_resume_one_lwp): Ditto.
12664
2acc282a
DE
126652009-05-23 Doug Evans <dje@google.com>
12666
12667 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12668 from struct inferior_list_entry * to struct lwp_info *.
12669 All callers updated.
12670
9f1036c1
DE
126712009-05-13 Doug Evans <dje@google.com>
12672
12673 * linux-x86-low.c: Don't include assert.h.
12674 (x86_siginfo_fixup): Use fatal, not assert.
12675 (x86_arch_setup): Fix comment.
12676
d0722149
DE
126772009-05-12 Doug Evans <dje@google.com>
12678
12679 Biarch support for i386/amd64 gdbserver.
12680 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12681 Add linux-x86-low.c.
12682 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12683 (linux-x86-low.o): Add.
12684 * linux-x86-64-low.c: Delete.
12685 * linux-i386-low.c: Delete.
12686 * linux-x86-low.c: New file.
12687 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12688 linux-x86-low.o.
12689 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12690 linux-x86-low.o.
12691 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12692 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12693 (linux_child_pid_to_exec_file): New function.
12694 (elf_64_header_p, elf_64_file_p): New functions.
12695 (siginfo_fixup): New function.
12696 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12697 give target a chance to convert layout.
12698 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12699 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12700
fdeb2a12
DE
127012009-05-07 Doug Evans <dje@google.com>
12702
12703 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12704 (regsets_store_inferior_registers): Ditto.
12705
a6dbe5df
PA
127062009-05-06 Pedro Alves <pedro@codesourcery.com>
12707
12708 PR server/10048
12709
12710 * linux-low.c (must_set_ptrace_flags): Delete.
12711 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12712 of the global.
12713 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12714 `lwp->must_set_ptrace_flags' instead.
ba42693b 12715 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
12716 (linux_wait_1): ... not here.
12717
5091eb23
DE
127182009-04-30 Doug Evans <dje@google.com>
12719
9f767825
DE
12720 * inferiors.c (started_inferior_callback): New function.
12721 (attached_inferior_callback): New function.
12722 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12723 * server.c (print_started_pid, print_attached_pid): New functions.
12724 (detach_or_kill_for_exit): New function.
12725 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12726 * server.h (have_started_inferiors_p): Declare.
12727 (have_attached_inferiors_p): Declare.
12728
5091eb23
DE
12729 * inferiors.c (remove_process): Fix memory leak, free process.
12730 * linux-low.c (linux_remove_process): New function.
12731 (linux_kill): Call it instead of remove_process.
12732 (linux_detach, linux_wait_1): Ditto.
12733
155c8968
PA
127342009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12735
12736 * configure.srv: Add x86 Windows CE target.
12737
7fe519cb
UW
127382009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12739
12740 * inferiors.c (get_thread_process): Make global.
12741 * server.h (get_thread_process): Add prototype.
12742 * thread-db.c (find_one_thread): Use get_thread_process
12743 instead of current_process.
12744 (thread_db_get_tls_address): Do not crash if called when
12745 thread layer is not yet initialized.
12746
5472f405
UW
127472009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12748
12749 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12750 * spu-low.c (current_tid): Rename to ...
12751 (current_ptid): ... this.
12752 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12753 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12754 ptid_get_lwp (current_ptid) instead of current_tid.
12755 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12756 instead of current_tid. Use find_process_pid to verify pid
12757 argument is valid. Pass proper argument to remove_process.
12758 (spu_thread_alive): Compare current_ptid instead of current_tid.
12759 (spu_resume): Likewise.
12760
55ac2b99
PA
127612009-04-02 Pedro Alves <pedro@codesourcery.com>
12762
12763 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12764 variable.
12765
95954743
PA
127662009-04-01 Pedro Alves <pedro@codesourcery.com>
12767
12768 Implement the multiprocess extensions, and add linux multiprocess
12769 support.
12770
12771 * server.h (ULONGEST): Declare.
12772 (struct ptid, ptid_t): New.
12773 (minus_one_ptid, null_ptid): Declare.
12774 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12775 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12776 (struct inferior_list_entry): Change `id' type from unsigned from
12777 to ptid_t.
12778 (struct sym_cache, struct breakpoint, struct
12779 process_info_private): Forward declare.
12780 (struct process_info): Declare.
12781 (current_process): Declare.
12782 (all_processes): Declare.
12783 (initialize_inferiors): Declare.
12784 (add_thread): Adjust to use ptid_t.
12785 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12786 (add_process, remove_process, find_thread_pid): Declare.
12787 (find_inferior_id): Adjust to use ptid_t.
12788 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12789 (multi_process): Declare.
12790 (push_event): Adjust to use ptid_t.
12791 (read_ptid, write_ptid): Declare.
12792 (prepare_resume_reply): Adjust to use ptid_t.
12793 (clear_symbol_cache): Declare.
12794 * inferiors.c (all_processes): New.
12795 (null_ptid, minus_one_ptid): New.
12796 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12797 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12798 (add_thread): Change unsigned long to ptid. Remove gdb_id
12799 parameter. Adjust.
12800 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12801 (gdb_id_to_thread): Rename to ...
12802 (find_thread_pid): ... this. Change unsigned long to ptid.
12803 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12804 (loaded_dll, pull_pid_from_list): Adjust.
12805 (add_process, remove_process, find_process_pid)
12806 (get_thread_process, current_process, initialize_inferiors): New.
12807 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12808 (struct target_waitstatus) <related_pid>: Ditto.
12809 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12810 return type to int.
12811 (struct target_ops) <join>: Add `pid' argument.
12812 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12813 (struct target_ops) <wait>: Add `ptid' field. Change return type
12814 to ptid.
12815 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12816 (mywait): Add `ptid' argument. Change return type to ptid_t.
12817 (target_pid_to_str): Declare.
12818 * target.c (set_desired_inferior): Adjust to use ptids.
12819 (mywait): Add new `ptid' argument. Adjust.
12820 (target_pid_to_str): New.
12821 * mem-break.h (free_all_breakpoints): Declare.
12822 * mem-break.c (breakpoints): Delelete.
12823 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12824 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12825 to use per-process breakpoint list.
12826 (free_all_breakpoints): New.
12827 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12828 (symbol_cache, all_symbols_looked_up): Delete.
12829 (hexchars): New.
12830 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12831 read_ptid): New.
12832 (prepare_resume_reply): Change ptid argument's type from unsigned
12833 long to ptid_t. Adjust. Implement W;process and X;process.
12834 (free_sym_cache, clear_symbol_cache): New.
12835 (look_up_one_symbol): Adjust to per-process symbol cache. *
12836 * server.c (cont_thread, general_thread, step_thread): Change type
12837 to ptid_t.
12838 (attached): Delete.
12839 (multi_process): New.
12840 (last_ptid): Change type to ptid_t.
12841 (struct vstop_notif) <ptid>: Change type to ptid_t.
12842 (queue_stop_reply, push_event): Change `ptid' argument's type to
12843 ptid_t.
12844 (discard_queued_stop_replies): Add `pid' argument.
12845 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12846 changes. Don't reference the `attached' global.
12847 (attach_inferior): Adjust to mywait interface changes.
12848 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12849 features. Handle and report "multiprocess+". Handle
12850 "qAttached:PID".
12851 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12852 changes.
12853 (handle_v_kill): New.
12854 (handle_v_stopped): Adjust to use target_pid_to_str.
12855 (handle_v_requests): Allow multiple attaches and runs when
12856 multiprocess extensions are in effect. Handle "vKill".
12857 (myresume): Adjust to use ptids.
12858 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12859 (handle_status): Adjust to discard_queued_stop_replies interface
12860 change.
12861 (first_thread_of, kill_inferior_callback)
12862 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12863 (main): Call initialize_inferiors. Adjust to use ptids, killing
12864 and detaching from all inferiors. Handle multiprocess packet
12865 variants.
12866 * linux-low.h: Include gdb_proc_service.h.
12867 (struct process_info_private): New.
12868 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12869 <lwpid_of>: Use ptid_get_lwp.
12870 (get_lwp_thread): Adjust.
12871 (struct lwp_info): Add `dead' member.
12872 (find_lwp_pid): Declare.
12873 * linux-low.c (thread_db_active): Delete.
12874 (new_inferior): Adjust comment.
12875 (inferior_pid): Delete.
12876 (linux_add_process): New.
12877 (handle_extended_wait): Adjust.
12878 (add_lwp): Change unsigned long to ptid.
12879 (linux_create_inferior): Add process to processes table. Adjust
12880 to use ptids. Don't set new_inferior here.
12881 (linux_attach_lwp): Rename to ...
12882 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12883 it. Adjust to use ptids.
12884 (linux_attach_lwp): New.
12885 (linux_attach): Add process to processes table. Don't set
12886 new_inferior here.
12887 (struct counter): New.
12888 (second_thread_of_pid_p, last_thread_of_process_p): New.
12889 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12890 multiple processes.
12891 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12892 processes. Remove process from process table.
12893 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12894 to multiple processes.
12895 (any_thread_of): New.
12896 (linux_detach): Add `pid' argument, and handle it. Remove process
12897 from processes table.
12898 (linux_join): Add `pid' argument. Handle it.
12899 (linux_thread_alive): Change unsighed long argument to ptid_t.
12900 Consider dead lwps as not being alive.
12901 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12902 threads we're not interested in.
12903 (same_lwp, find_lwp_pid): New.
12904 (linux_wait_for_lwp): Change `pid' argument's type from int to
12905 ptid_t. Adjust.
12906 (linux_wait_for_event): Rename to ...
12907 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12908 from int to ptid_t. Adjust.
12909 (linux_wait_for_event): New.
12910 (linux_wait_1): Add `ptid' argument. Change return type to
12911 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12912 that exit from the process table.
12913 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12914 Adjust.
12915 (mark_lwp_dead): New.
12916 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12917 stopping all threads, mark its main lwp as dead.
12918 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12919 ptids.
12920 (fetch_register, usr_store_inferior_registers)
12921 (regsets_fetch_inferior_registers)
12922 (regsets_store_inferior_registers, linux_read_memory)
12923 (linux_write_memory): Inline `inferior_pid'.
12924 (linux_look_up_symbols): Adjust to use per-process
12925 `thread_db_active'.
12926 (linux_request_interrupt): Adjust to use ptids.
12927 (linux_read_auxv): Inline `inferior_pid'.
12928 (initialize_low): Don't reference thread_db_active.
12929 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12930 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12931 (ps_getpid): Return the pid of the current inferior.
12932 * thread-db.c (proc_handle, thread_agent): Delete.
12933 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12934 per-process data.
12935 (find_one_thread): Change argument type to ptid_t. Adjust to
12936 per-process data.
12937 (maybe_attach_thread): Adjust to per-process data and ptids.
12938 (thread_db_find_new_threads): Ditto.
12939 (thread_db_init): Ditto.
12940 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12941 processes table. Adjust to use ptids.
12942 (spu_kill, spu_detach): Adjust interface. Remove process from
12943 processes table.
12944 (spu_join, spu_thread_alive): Adjust interface.
12945 (spu_wait): Adjust interface. Remove process from processes
12946 table. Adjust to use ptids.
12947 * win32-low.c (current_inferior_tid): Delete.
12948 (current_inferior_ptid): New.
12949 (debug_event_ptid): New.
12950 (thread_rec): Take a ptid. Adjust.
12951 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12952 (child_delete_thread): Ditto.
12953 (do_initial_child_stuff): Add `attached' argument. Add process to
12954 processes table.
12955 (child_fetch_inferior_registers, child_store_inferior_registers):
12956 Adjust.
12957 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12958 (win32_attach): Pass 1 to do_initial_child_stuff.
12959 (win32_kill): Adjust interface. Remove process from processes
12960 table.
12961 (win32_detach): Ditto.
12962 (win32_join): Adjust interface.
12963 (win32_thread_alive): Take a ptid.
12964 (win32_resume): Adjust to use ptids.
12965 (get_child_debug_event): Ditto.
12966 (win32_wait): Adjust interface. Remove exiting process from
12967 processes table.
12968
bd99dc85
PA
129692009-04-01 Pedro Alves <pedro@codesourcery.com>
12970
12971 Non-stop mode support.
12972
12973 * server.h (non_stop): Declare.
12974 (gdb_client_data, handler_func): Declare.
12975 (delete_file_handler, add_file_handler, start_event_loop):
12976 Declare.
12977 (handle_serial_event, handle_target_event, push_event)
12978 (putpkt_notif): Declare.
12979 * target.h (enum resume_kind): New.
12980 (struct thread_resume): Replace `step' field by `kind' field.
12981 (TARGET_WNOHANG): Define.
12982 (struct target_ops) <wait>: Add `options' argument.
12983 <supports_non_stop, async, start_non_stop>: New fields.
12984 (target_supports_non_stop, target_async): New.
12985 (start_non_stop): Declare.
12986 (mywait): Add `options' argument.
12987 * target.c (mywait): Add `options' argument. Print child exit
12988 notifications here.
12989 (start_non_stop): New.
12990 * server.c (non_stop, own_buf, mem_buf): New globals.
12991 (struct vstop_notif): New.
12992 (notif_queue): New global.
12993 (queue_stop_reply, push_event, discard_queued_stop_replies)
12994 (send_next_stop_reply): New.
12995 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12996 interface changes.
12997 (attach_inferior): In non-stop mode, don't wait for the target
12998 here.
12999 (handle_general_set): Handle QNonStop.
13000 (handle_query): When handling qC, return the current general
13001 thread, instead of the first thread of the list.
13002 (handle_query): If the backend supports non-stop mode, include
13003 QNonStop+ in the qSupported query response.
13004 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13005 and non-stop mode.
13006 (handle_v_attach, handle_v_run): Handle non-stop mode.
13007 (handle_v_stopped): New.
13008 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13009 (myresume): Adjust to use resume_kind. Handle non-stop.
13010 (queue_stop_reply_callback): New.
13011 (handle_status): Handle non-stop mode.
13012 (main): Clear non_stop flag on reconnection. Use the event-loop.
13013 Refactor serial protocol handling from here ...
13014 (process_serial_event): ... to this new function. When GDB
13015 selects any thread, select one here. In non-stop mode, wait until
13016 GDB acks all pending events before exiting.
13017 (handle_serial_event, handle_target_event): New.
13018 * remote-utils.c (remote_open): Install remote_desc in the event
13019 loop.
13020 (remote_close): Remove remote_desc from the event loop.
13021 (putpkt_binary): Rename to...
13022 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13023 (putpkt_binary): New as wrapper around putpkt_binary_1.
13024 (putpkt_notif): New.
13025 (prepare_resume_reply): In non-stop mode, don't change the
13026 general_thread.
13027 * event-loop.c: New.
13028 * Makefile.in (OBJ): Add event-loop.o.
13029 (event-loop.o): New rule.
13030
13031 * linux-low.h (pid_of): Moved here.
13032 (lwpid_of): New.
13033 (get_lwp_thread): Use lwpid_of.
13034 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13035 * linux-low.c (pid_of): Delete.
13036 (inferior_pid): Use lwpid_of.
13037 (linux_event_pipe): New.
13038 (target_is_async_p): New.
13039 (delete_lwp): New.
13040 (handle_extended_wait): Use lwpid_of.
13041 (add_lwp): Don't set lwpid field.
13042 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13043 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13044 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13045 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13046 first. Adjust to linux_wait_for_event interface changes. Use
13047 lwpid_of.
13048 (linux_detach): Don't delete the main lwp here.
13049 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13050 (status_pending_p): Don't consider explicitly suspended lwps.
13051 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13052 pointer. Add OPTIONS argument. Change return type to int. Use
13053 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13054 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13055 pointer. Add status pointer argument. Return a pid instead of a
13056 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13057 changes. In non-stop mode, don't switch to a random thread.
13058 (linux_wait): Rename to...
13059 (linux_wait_1): ... this. Add target_options argument, and handle
13060 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13061 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13062 clean exit and signal exit code. Don't stop all threads in
13063 non-stop mode. In all-stop mode, only stop all threads when
13064 reporting a stop to GDB. Handle explicit thread stop requests.
13065 (async_file_flush, async_file_mark): New.
13066 (linux_wait): New.
13067 (send_sigstop): Use lwpid_of.
13068 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13069 interface changes. In non-stop mode, don't switch to a random
13070 thread.
13071 (linux_resume_one_lwp): Use lwpid_of.
13072 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13073 (linux_resume_one_thread): ... this. Handle resume_stop. In
13074 non-stop mode, don't look for pending flag in all threads.
13075 (resume_status_pending_p): Don't consider explicitly suspended
13076 threads.
13077 (my_waitpid): Reimplement. Emulate __WALL.
13078 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13079 Use lwpid_of.
13080 (sigchld_handler, linux_supports_non_stop, linux_async)
13081 (linux_start_non_stop): New.
13082 (linux_target_ops): Register linux_supports_non_stop, linux_async
13083 and linux_start_non_stop.
13084 (initialize_low): Install SIGCHLD handler.
13085 * thread-db.c (thread_db_create_event, find_one_thread)
13086 (thread_db_get_tls_address): Use lwpid_of.
13087 * win32-low.c (win32_detach): Adjust to use resume_kind.
13088 (win32_wait): Add `options' argument.
13089 * spu-low.c (spu_resume): Adjust to use resume_kind.
13090 (spu_wait): Add `options' argument.
13091
5b1c542e
PA
130922009-04-01 Pedro Alves <pedro@codesourcery.com>
13093
13094 Decouple target code from remote protocol.
13095
13096 * target.h (enum target_waitkind): New.
13097 (struct target_waitstatus): New.
13098 (struct target_ops) <wait>: Return an unsigned long. Take a
13099 target_waitstatus pointer instead of a char pointer.
13100 (mywait): Likewise.
13101 * target.c (mywait): Change prototype to return an unsigned long.
13102 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13103 * server.h (thread_from_wait, old_thread_from_wait): Delete
13104 declarations.
13105 (prepare_resume_reply): Change prototype to take a
13106 target_waitstatus.
13107 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13108 (last_status, last_ptid): New.
13109 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13110 pid instead of a signal.
13111 (attach_inferior): Remove "status" and "signal" parameters.
13112 Adjust.
13113 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13114 not as an address.
13115 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13116 (handle_v_requests, myresume): Remove "status" and "signal"
13117 parameters. Adjust.
13118 (handle_status): New.
13119 (main): Delete local `status'. Adjust.
13120 * remote-utils.c: Include target.h.
13121 (prepare_resume_reply): Change prototype to take a
13122 target_waitstatus. Adjust.
13123
13124 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13125 interface.
13126 * spu-low.c (spu_wait): Adjust.
13127 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13128 Delete.
13129 (win32_wait): Adjust.
13130
2bd7c093
PA
131312009-04-01 Pedro Alves <pedro@codesourcery.com>
13132
13133 * target.h (struct thread_resume): Delete leave_stopped member.
13134 (struct target_ops): Add a `n' argument to the `resume' callback.
13135 * server.c (start_inferior): Adjust.
13136 (handle_v_cont, myresume): Adjust.
13137 * linux-low.c (check_removed_breakpoint): Adjust to resume
13138 interface change, and to removed leave_stopped field.
13139 (resume_ptr): Delete.
13140 (struct thread_resume_array): New.
13141 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13142 resume interface change.
13143 (linux_continue_one_thread, linux_queue_one_thread)
13144 (resume_status_pending_p): Check if the resume field is NULL
13145 instead of checking the leave_stopped member.
13146 (linux_resume): Adjust to the target resume interface change.
13147 * spu-low.c (spu_resume): Adjust to the target resume interface
13148 change.
13149 * win32-low.c (win32_detach, win32_resume): Ditto.
13150
c35fafde
PA
131512009-04-01 Pedro Alves <pedro@codesourcery.com>
13152
13153 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13154 flag.
13155 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13156 pending.
13157 (linux_continue_one_thread): Only preserve the stepping flag if
13158 there's a pending breakpoint.
13159
0a59d50b
PA
131602009-03-31 Pedro Alves <pedro@codesourcery.com>
13161
13162 * server.c (main): After the inferior having exited, call
13163 remote_close before exiting gdbserver.
13164
f04c6d38
TJB
131652009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13166
13167 Fix size of FPSCR in Power 7 processors.
13168 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13169 (PPC_FEATURE_HAS_DFP): New #define.
13170 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13171 size of the FPSCR.
13172
78e5cee6
PA
131732009-03-23 Pedro Alves <pedro@codesourcery.com>
13174
13175 * server.c (handle_query) Whitespace and formatting.
13176
1b3f6016
PA
131772009-03-22 Pedro Alves <pedro@codesourcery.com>
13178
13179 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13180 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13181 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13182 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13183 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13184 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13185 Makefile.in, configure.ac: Fix whitespace throughout.
13186 * configure: Regenerate.
13187
a07b2135
PA
131882009-03-22 Pedro Alves <pedro@codesourcery.com>
13189
13190 * inferiors.c (find_inferior): Make it safe for the callback
13191 function to delete the currently iterated inferior.
13192
67cc2626
PA
131932009-03-22 Pedro Alves <pedro@codesourcery.com>
13194
13195 * Makefile.in (linuw_low_h): Move higher.
13196 (thread-db.o): Depend on $(linux_low_h).
13197
54a0b537
PA
131982009-03-17 Pedro Alves <pedro@codesourcery.com>
13199
13200 Rename "process" to "lwp" throughout.
13201
13202 * linux-low.c (all_processes): Rename to...
13203 (all_lwps): ... this.
13204 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13205 (add_process): Rename to ...
13206 (add_lwp): ... this. Adjust.
13207 (linux_create_inferior): Adjust.
13208 (linux_attach_lwp): Adjust.
13209 (linux_attach): Adjust.
13210 (linux_kill_one_process): Rename to ...
13211 (linux_kill_one_lwp): ... this. Adjust.
13212 (linux_kill): Adjust.
13213 (linux_detach_one_process): Rename to ...
13214 (linux_detach_one_lwp): ... this. Adjust.
13215 (linux_detach): Adjust.
13216 (check_removed_breakpoint): Adjust.
13217 (status_pending_p): Adjust.
13218 (linux_wait_for_process): Rename to ...
13219 (linux_wait_for_lwp): ... this. Adjust.
13220 (linux_wait_for_event): Adjust.
13221 (send_sigstop): Adjust.
13222 (wait_for_sigstop): Adjust.
13223 (stop_all_processes): Rename to ...
13224 (stop_all_lwps): ... this.
13225 (linux_resume_one_process): Rename to ...
13226 (linux_resume_one_lwp): ... this. Adjust.
13227 (linux_set_resume_request, linux_continue_one_thread)
13228 (linux_queue_one_thread, resume_status_pending_p)
13229 (usr_store_inferior_registers, regsets_store_inferior_registers)
13230 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13231 Adjust.
13232 * linux-low.h (get_process): Rename to ...
13233 (get_lwp): ... this. Adjust.
13234 (get_thread_process): Rename to ...
13235 (get_thread_lwp): ... this. Adjust.
13236 (get_process_thread): Rename to ...
13237 (get_lwp_thread): ... this. Adjust.
13238 (struct process_info): Rename to ...
13239 (struct lwp_info): ... this.
13240 (all_processes): Rename to ...
13241 (all_lwps): ... this.
13242 * proc-service.c (ps_lgetregs): Adjust.
13243 * thread-db.c (thread_db_create_event, find_one_thread)
13244 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13245
0b16c5cf
PA
132462009-03-14 Pedro Alves <pedro@codesourcery.com>
13247
13248 * server.c (handle_query): Handle "qAttached".
13249
32de4b9d
NS
132502009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13251
13252 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13253 GPLv3, update license URL.
13254
2aecd87f
DE
132552009-03-01 Doug Evans <dje@google.com>
13256
93efd302 13257 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
13258 (server_h): Add gdb_signals.h.
13259 (signals.o): Update.
13260 * server.h (target_signal_from_host,target_signal_to_host_p)
13261 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13262
86b1f9c5
PM
132632009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13264
13265 * remote-utils.c (getpkt): Also generate remote-debug
13266 information if noack_mode is set.
13267
4aa995e1
PA
132682009-02-06 Pedro Alves <pedro@codesourcery.com>
13269
13270 * server.c (handle_query): Report qXfer:siginfo:read and
13271 qXfer:siginfo:write as supported and handle them.
13272 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13273 * linux-low.c (linux_xfer_siginfo): New.
13274 (linux_target_ops): Set it.
13275
62709adf
PA
132762009-01-26 Pedro Alves <pedro@codesourcery.com>
13277
13278 * server.c (gdbserver_usage): Mention --remote-debug.
13279 (main): Accept '--remote-debug' switch.
13280
aef93bd7
DE
132812009-01-18 Doug Evans <dje@google.com>
13282
13283 * regcache.c (new_register_cache): No need to check result of xcalloc.
13284 * server.c (handle_search_memory): Back out calls to xmalloc,
13285 result is checked and error is returned to user upon failure.
13286 (handle_query): Ditto. Add more checks for result of malloc.
13287 (handle_v_cont): Check result of malloc, report error back to
13288 user upon failure.
13289 (handle_v_run): Ditto. Call freeargv.
13290 * server.h (freeargv): Declare.
13291 * utils.c (freeargv): New fn.
13292
54363045
DE
132932009-01-15 Doug Evans <dje@google.com>
13294
f626972c
DE
13295 * gdbreplay.c (perror_with_name): Make arg const char *.
13296 * server.h (target_signal_to_name): Make return type const char *.
0842e787 13297 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 13298 * utils.c (perror_with_name): Make arg const char *.
54363045 13299
18aae699
PA
133002009-01-14 Pedro Alves <pedro@codesourcery.com>
13301
13302 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13303 when handling a EXIT_PROCESS_DEBUG_EVENT.
13304
ff703abe
JB
133052009-01-06 Joel Brobecker <brobecker@adacore.com>
13306
13307 * gdbreplay.c (gdbreplay_version): Update copyright year.
13308 * server.c (gdbserver_version): Likewise.
13309
f21cc1a2 133102009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
13311
13312 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 13313 (handle_extended_wait): Improve comment.
0e21c1ec 13314
bca929d3
DE
133152008-12-13 Doug Evans <dje@google.com>
13316
13317 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13318 * server.h (ATTR_MALLOC): New macro.
13319 (xmalloc,xcalloc,xstrdup): Declare.
13320 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13321 * inferiors.c: Ditto.
13322 * linux-low.c: Ditto.
13323 * mem-break.c: Ditto.
13324 * regcache.c: Ditto.
13325 * remote-utils.c: Ditto.
13326 * server.c: Ditto.
13327 * target.c: Ditto.
13328 * win32-low.c: Ditto.
13329
97438e3f
DE
133302008-12-12 Doug Evans <dje@google.com>
13331
896c7fbb
DE
13332 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13333 in debugging printf.
13334
97438e3f
DE
13335 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13336
e3b886f8
DE
133372008-12-09 Doug Evans <dje@google.com>
13338
13339 * linux-low.h (struct process_info): Delete member tid, unused.
13340 * thread-db.c (find_one_thread): Update.
13341 (maybe_attach_thread): Update.
13342
07e059b5
VP
133432008-12-02 Pedro Alves <pedro@codesourcery.com>
13344
889bf7c5
PA
13345 * target.h (struct target_ops): Add qxfer_osdata member.
13346 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13347 and dirent.h.
13348 (linux_qxfer_osdata): New functions.
13349 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13350 callback.
13351 * server.c (handle_query): Handle "qXfer:osdata:read:".
13352 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13353 (buffer_xml_printf): New functions.
13354 * server.h (struct buffer): New.
13355 (buffer_grow_str, buffer_grow_str0): New macros.
13356 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13357 (buffer_xml_printf): Declare.
07e059b5 13358
4cab47ab
DE
133592008-11-24 Doug Evans <dje@google.com>
13360
13361 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13362
f142445f
DJ
133632008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13364
13365 * server.c (handle_v_run): Always use the supplied argument list.
13366
d0107bb6 133672008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 13368
d0107bb6
BW
13369 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13370 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 13371
2c4ad781
TJB
133722008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13373
13374 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13375 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13376 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13377 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13378 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13379 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13380 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13381 XML target descriptions.
13382 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13383 when inferior is running on an ISA 2.05 or later processor. Add
13384 special case to return offset for full 64-bit slot of FPSCR when
13385 in 32-bits.
13386
dfb64f85
DJ
133872008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13388
13389 * Makefile.in (SFILES, clean): Added sparc64 files.
13390 (reg-sparc64.o, reg-sparc64.c): New.
13391 * configure.srv (sparc*-*-linux*): New configuration.
13392 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13393 syscall arguments for SPARC.
13394 (regsets_store_inferior_registers): Likewise.
13395 * linux-sparc-low.c: New file.
13396
66b6e1dd
DE
133972008-10-21 Doug Evans <dje@google.com>
13398
13399 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13400 (READLINE_DIR,READLINE_DEP): Delete.
13401 (INTERNAL_CFLAGS): Update.
13402 (LINTFLAGS): Update.
13403
9b710a42
PA
134042008-10-10 Pedro Alves <pedro@codesourcery.com>
13405
13406 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13407 whole argv from the last run, not just argv[0].
13408
5822d809
PA
134092008-09-08 Pedro Alves <pedro@codesourcery.com>
13410
13411 * regcache.c (new_register_cache): Return NULL if the register
13412 cache size isn't known yet.
13413 (free_register_cache): Avoid dereferencing a NULL regcache.
13414
74aac56f
DJ
134152008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13416
13417 * configure.srv: Merge MIPS and MIPS64.
13418
400b20f5
MR
134192008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13420
13421 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13422
677c5bb1
LM
134232008-08-18 Luis Machado <luisgpm@br.ibm.com>
13424
13425 * Makefile.in: Add required vsx dependencies.
13426
13427 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13428 Declare init_registers_powerpc_vsx32l.
13429 Declare init_registers_powerpc_vsx64l.
13430 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13431 (ppc_arch_setup): Check for VSX in hwcap.
13432 (ppc_fill_vsxregset): New function.
13433 (ppc_store_vsxregset): New function.
13434 Add new VSX entry in regset_info target_regsets.
13435
13436 * configure.srv: Add new VSX dependencies.
13437
a6f3e723
SL
134382008-08-12 Pedro Alves <pedro@codesourcery.com>
13439
13440 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13441 (remote_open): Set or clear transport_is_reliable.
13442 (putpkt_binary): Don't expect acks in noack mode.
13443 (getpkt): Don't send ack/nac in noack mode.
13444 * server.c (handle_general_set): Handle QStartNoAckMode.
13445 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13446 qSupported.
13447 (main): Reset noack_mode on every connection.
13448 * server.h (noack_mode): Declare.
13449
a417dc56
RW
134502008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13451
13452 * Makefile.in (GDBREPLAY_OBS): New variable.
13453 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13454
3221518c
UW
134552008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13456 Daniel Jacobowitz <dan@codesourcery.com>
13457
13458 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13459 (usr_store_inferior_registers): Likewise.
13460 (regsets_store_inferior_registers): Likewise.
13461
ec56be1b
PA
134622008-07-31 Rolf Jansen <rj@surtec.com>
13463 Pedro Alves <pedro@codesourcery.com>
13464
13465 * configure.ac: Check for memmem declaration.
13466 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13467 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13468 (disable_packet_qfThreadInfo): Unconditionally compile.
13469 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13470 * configure, config.in: Regenerate.
13471
2fe5e3ff
DE
134722008-07-28 Doug Kwan <dougkwan@google.com>
13473
13474 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13475 (linux_write_memory): Remove declaration of errno.
13476
836acd6d
UW
134772008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13478
13479 * linux-low.c (handle_extended_wait): Do not use "status"
13480 variable uninitialized.
13481
aeba519e
PA
134822008-07-07 Pedro Alves <pedro@codesourcery.com>
13483
13484 * server.c (handle_v_attach): Inhibit reporting dll changes.
13485
db42f210
PA
134862008-06-27 Pedro Alves <pedro@codesourcery.com>
13487
13488 * remote-utils.c (prepare_resume_reply): If requested, don't
13489 output "thread:TID" in the T stop reply.
13490
13491 * server.c (disable_packet_vCont, disable_packet_Tthread)
13492 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13493 (handle_query): If requested, disable support for qC, qfThreadInfo
13494 and qsThreadInfo.
13495 (handle_v_requests): If requested, disable support for vCont.
13496 (gdbserver_show_disableable): New.
13497 (main): Handle --disable-packet and --disable-packet=LIST.
13498
13499 * server.h (disable_packet_vCont, disable_packet_Tthread)
13500 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13501
8e4c5421
CD
135022008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13503
13504 * server.c (gdbserver_usage): Mention --version.
13505
6e23a804
DJ
135062008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13507
13508 * Makefile.in (gdbreplay.o): New rule.
13509
90aa6a40
JM
135102008-06-06 Joseph Myers <joseph@codesourcery.com>
13511
13512 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13513 message, not gdbserver.
13514
c16158bc 135152008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
13516 Nathan Sidwell <nathan@codesourcery.com>
13517 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
13518
13519 * acinclude.m4: Include ../../config/acx.m4.
13520 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13521 * configure, config.in: Regenerate.
13522 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13523 * server.c (gdbserver_version): Print PKGVERSION.
13524 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13525 (main): Adjust gdbserver_usage calls.
13526 * gdbreplay.c (version, host_name): Add declarations.
13527 (gdbreplay_version, gdbreplay_usage): New.
13528 (main): Accept --version and --help options.
13529
aeb75bf5
DJ
135302008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13531
13532 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13533 (arm_breakpoint_at): Handle Thumb.
13534 (the_low_target): Add comment.
13535
76b233dd
UW
135362008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13537
13538 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13539
08388c79
DE
135402008-05-09 Doug Evans <dje@google.com>
13541
a3c83fae
DE
13542 * server.h (decode_search_memory_packet): Declare.
13543 * remote-utils.c (decode_search_memory_packet): New fn.
13544 * server.c (handle_search_memory_1): New fn.
08388c79
DE
13545 (handle_search_memory): New fn.
13546 (handle_query): Process qSearch:memory packets.
13547
bb9c3d36
UW
135482008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13549
13550 * regcache.c (registers_length): Remove.
13551 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13552 full register packet.
13553 * regcache.h (registers_length): Remove prototype.
13554 * server.h (PBUFSIZ): Define to 16384.
13555
7284e1be
UW
135562008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13557
13558 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13559 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13560 powerpc-64l.o, and powerpc-altivec64l.o.
13561 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13562 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13563 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13564 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13565 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13566 to srv_xmlfiles.
13567
13568 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13569 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13570 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13571 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13572 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13573 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13574 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13575 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13576 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13577 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13578 (clean): Update.
13579
13580 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13581 (init_registers_powerpc_32l): ... this new prototype.
13582 (init_registers_powerpc_32): Remove, replace by ...
13583 (init_registers_powerpc_altivec32l): ... this new prototype.
13584 (init_registers_powerpc_e500): Remove, replace by ...
13585 (init_registers_powerpc_e500l): ... this new prototype.
13586 (init_registers_ppc64): Remove, replace by ...
13587 (init_registers_powerpc_64l): ... this new prototype.
13588 (init_registers_powerpc_64): Remove, replace by ...
13589 (init_registers_powerpc_altivec64l): ... this new prototype.
13590 (ppc_num_regs): Set to 73.
13591 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13592 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13593 (ppc_cannot_store_register): Handle orig_r3 and trap.
13594 (ppc_arch_setup): Update init_registers_... calls.
13595 (ppc_fill_gregset): Handle orig_r3 and trap.
13596
13597 * inferiors.c (clear_inferiors): Reset current_inferior.
13598
fdc59709
PB
135992008-04-23 Paolo Bonzini <bonzini@gnu.org>
13600
889bf7c5
PA
13601 * acinclude.m4: Add override.m4.
13602 * configure: Regenerate.
fdc59709 13603
c9b2f845
UW
136042008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13605
13606 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13607 initial call to init_register_ppc64.
13608
550512b8
UW
136092008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13610
43aaf8b6
PA
13611 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13612 single powerpc*-*-linux* case.
550512b8
UW
13613 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13614
b6430ec3
UW
136152008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13616
13617 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 13618 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
13619 from reg_xmlfiles.
13620 * linux-ppc-low.c: Include <elf.h>.
13621 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13622 (ppc_hwcap): New global variable.
13623 (ppc_regmap): Remove __SPE__ #ifdef sections.
13624 (ppc_regmap_e500): New global variable.
13625 (ppc_cannot_store_register): Update __SPE__ special case.
13626 (ppc_get_hwcap): New function.
13627 (ppc_arch_setup): Use it to determine whether inferior supports
13628 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13629 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13630 Do not access registers if target does not support AltiVec.
13631 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13632 Do not access registers if target does not support SPE.
13633 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13634
52fa2412
UW
136352008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13636
13637 * linux-low.c (disabled_regsets, num_regsets): New.
13638 (use_regsets_p): Delete.
13639 (linux_wait_for_process): Clear disabled_regsets.
13640 (regsets_fetch_inferior_registers): Check and set it.
13641 (regsets_store_inferior_registers): Likewise.
13642 (linux_fetch_registers, linux_store_registers): Do not use
13643 use_regsets_p.
13644 (initialize_low): Allocate disabled_regsets.
13645
e28b3332
DJ
136462008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13647
13648 * Makefile.in (LIBOBJS): New.
13649 (OBS): Use LIBOBJS.
13650 (memmem.o): New rule.
13651 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13652 * configure: Regenerated.
13653
4536995d
UW
136542008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13655
13656 * server.c (handle_query): Never return "unsupported" for
13657 qXfer:features:read queries.
13658
221c031f
UW
136592008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13660
13661 * server.c (get_features_xml): Fix inverted condition.
13662 (handle_query): Always support qXfer:feature:read.
13663
ccd213ac
DJ
136642008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13665
13666 * server.c (wrapper_argv): New.
13667 (start_inferior): Handle wrapper_argv. If set, expect an extra
13668 trap.
13669 (gdbserver_usage): Document --wrapper.
13670 (main): Parse --wrapper.
13671
6fe305f7
UW
136722008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13673
13674 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13675 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13676 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13677 (ppc_set_pc): Likewise.
13678 (ppc_arch_setup): New function.
13679 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13680 of collect_register.
889bf7c5 13681 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 13682
5b0a002e
UW
136832008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13684
13685 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13686 instead of linux-ppc64-low.o.
13687 * linux-ppc64-low.c: Remove file.
13688 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13689 (linux-ppc64-low.o): Remove rule.
13690
13691 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13692 (init_registers_powerpc_64): Likewise.
13693 (ppc_regmap): Conditionally define depending on __powerpc64__.
13694 (ppc_cannot_store_register): Do not special-case "fpscr" when
13695 compiled on __powerpc64__.
13696 (ppc_collect_ptrace_register): New function.
13697 (ppc_supply_ptrace_register): New function.
13698 (ppc_breakpoint): Change type to "unsigned int".
13699 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13700 (the_low_target): Conditionally provide initializers for the
889bf7c5 13701 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
13702 collect_ptrace_register and supply_ptrace_register members.
13703
9b4b61c8
UW
137042008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13705
13706 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13707 * server.c (gdbserver_xmltarget): Define.
13708 (get_features_xml): Use it to replace "target.xml" and arch_string.
13709
13710 * configure.srv: Remove srv_xmltarget. Add XML files that were
13711 mentioned there to srv_xmlfiles instead. Remove conditional tests
13712 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13713 srv_xmlfiles and srv_regobj to include all possible choices.
13714 * configure.ac (srv_xmltarget): Remove.
13715 (srv_xmlfiles): Do not add "target.xml".
13716 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13717 checks for supplementary target information.
13718 * configure: Regenerate.
13719 * Makefile.in (XML_TARGET): Remove.
13720 (target.xml): Remove rule.
13721 (clean): Do not clean up target.xml.
13722 (.PRECIOUS): Do not mention target.xml.
13723
13724 * target.h (struct target_ops): Remove arch_string member.
13725 * linux-low.c (linux_arch_string): Remove.
13726 (linux_target_ops): Remove arch_string initializer.
13727 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13728 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13729 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13730 * spu-low.c (spu_arch_string): Remove.
13731 (spu_target_ops): Remove arch_string initializer.
13732 * win32-low.c (win32_arch_string): Remove.
13733 (win32_target_ops): Remove arch_string initializer.
13734 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13735 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13736 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13737
ee1a7ae4
UW
137382008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13739
13740 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13741 by collect_ptrace_register and supply_ptrace_register hooks.
13742 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13743 instead of checking for the_low_target.left_pad_xfer.
13744 (usr_store_inferior_registers): Use collect_ptrace_register callback
13745 instead of checking for the_low_target.left_pad_xfer.
13746
13747 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13748 (s390_supply_ptrace_register): Likewise.
13749 (s390_fill_gregset): Call s390_collect_ptrace_register.
13750 (the_low_target): Update.
13751
13752 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13753 (ppc_supply_ptrace_register): Likewise.
13754 (the_low_target): Update.
13755
13756 * linux-i386-low.c (the_low_target): Update.
13757 * linux-x86-64-low.c (the_low_target): Update.
13758
d61ddec4
UW
137592008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13760
13761 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13762 reg-s390.o and reg-s390x.o.
13763
13764 * linux-low.c (new_inferior): New global variable.
13765 (linux_create_inferior, linux_attach): Set it.
13766 (linux_wait_for_process): Call the_low_target.arch_setup after the
13767 target has stopped for the first time.
13768 (initialize_low): Do not call the_low_target.arch_setup.
13769
13770 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13771 (s390_set_pc): Likewise.
13772 (s390_arch_setup): New function.
13773 (the_low_target): Use s390_arch_setup as arch_setup routine.
13774
13775 * regcache.c (realloc_register_cache): New function.
13776 (set_register_cache): Call it for each existing regcache.
13777
d05b4ac3
UW
137782008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13779
13780 * server.h (init_registers): Remove prototype.
13781
13782 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13783 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13784 instead of init_registers ().
13785 * linux-arm-low.c (init_registers_arm): Add prototype.
13786 (init_registers_arm_with_iwmmxt): Likewise.
13787 (the_low_target): Add initializer for arch_setup field.
13788 * linux-cris-low.c (init_registers_cris): Add prototype.
13789 (the_low_target): Add initializer for arch_setup field.
13790 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13791 (the_low_target): Add initializer for arch_setup field.
13792 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13793 (the_low_target): Add initializer for arch_setup field.
13794 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13795 (the_low_target): Add initializer for arch_setup field.
13796 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13797 (the_low_target): Add initializer for arch_setup field.
13798 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13799 (the_low_target): Add initializer for arch_setup field.
13800 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13801 (init_registers_mips64_linux): Likewise.
13802 (the_low_target): Add initializer for arch_setup field.
13803 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13804 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13805 (the_low_target): Add initializer for arch_setup field.
13806 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13807 (init_registers_powerpc_64): Likewise.
13808 (the_low_target): Add initializer for arch_setup field.
13809 * linux-s390-low.c (init_registers_s390): Add prototype.
13810 (init_registers_s390x): Likewise.
13811 (the_low_target): Add initializer for arch_setup field.
13812 * linux-sh-low.c (init_registers_sh): Add prototype.
13813 (the_low_target): Add initializer for arch_setup field.
13814 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13815 (the_low_target): Add initializer for arch_setup field.
13816 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13817 (the_low_target): Add initializer for arch_setup field.
13818
13819 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13820 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13821 instead of init_registers ().
13822 * win32-arm-low.c (init_registers_arm): Add prototype.
13823 (the_low_target): Add initializer for arch_setup field.
13824 * win32-i386-low.c (init_registers_i386): Add prototype.
13825 (the_low_target): Add initializer for arch_setup field.
13826
13827 * spu-low.c (init_registers_spu): Add prototype.
13828 (initialize_low): Call initialie_registers_spu () instead of
13829 initialize_registers ().
13830
fd96d250
PA
138312008-02-19 Pedro Alves <pedro@codesourcery.com>
13832
13833 * server.c (handle_v_requests): When handling the vRun and vAttach
13834 packets, if already debugging a process, don't kill it. Return an
13835 error instead.
13836
d41b6bb4
DJ
138372008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13838
13839 * server.c (handle_query): Correct length check.
13840
5ac588cf
PA
138412008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13842
13843 * win32-low.c (do_initial_child_stuff): Add process handle
13844 parameter. Set current_process_handle and current_process_id from the
13845 parameters. Clear globals.
13846 (win32_create_inferior): Don't set current_process_handle and
13847 current_process_id here. Instead pass them on the call to
13848 do_initial_child_stuff.
13849 (win32_attach): Likewise.
13850 (win32_clear_inferiors): New.
13851 (win32_kill): Don't close the current process handle or the
13852 current thread handle here. Instead call win32_clear_inferiors.
13853 (win32_detach): Don't open a new handle to the process. Call
13854 win32_clear_inferiors.
13855 (win32_join): Don't rely on current_process_handle; open a new
13856 handle using the process id.
13857 (win32_wait): Call win32_clear_inferiors when the inferior process
13858 has exited.
13859
ecd7ecbc
DJ
138602008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13861
13862 * server.c (monitor_show_help): Add "exit".
13863
1525d545
MG
138642008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13865
ecd7ecbc 13866 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
13867 (clean): Add reg-xtensa.c.
13868 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
13869 * configure.srv (xtensa*-*-linux*) New target.
13870 * linux-xtensa-low.c: New.
13871 * xtensa-xtregs.c: New.
1525d545 13872
59a016f0
PA
138732008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13874
13875 * hostio.c: Don't include errno.h.
13876 (errno_to_fileio_errno): Move to hostio-errno.
13877 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13878 error number outputting to the target->hostio_last_error callback.
13879 (hostio_packet_error): Use FILEIO_EINVAL directly.
13880 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13881 calls to hostio_error.
13882 * hostio-errno.c: New.
13883 * server.h (hostio_last_error_from_errno): Declare.
13884 * target.h (target_ops): Add hostio_last_error member.
13885 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13886 as hostio_last_error handler.
889bf7c5 13887 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
13888 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13889 (wince_hostio_last_error): New functions.
13890 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13891 as hostio_last_error handler.
13892 (win32_target_ops) [!_WIN32_WCE]: Register
13893 hostio_last_error_from_errno as hostio_last_error handler.
13894 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13895 (hostio-errno.o): New rule.
13896 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13897 * configure.srv (srv_hostio_err_objs): New variable. Default to
13898 hostio-errno.o.
13899 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13900 * configure: Regenerate.
13901
2d717e4f
DJ
139022008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13903
13904 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13905 (linux_kill, linux_detach): Clean up the process list.
13906 * remote-utils.c (remote_open): Improve port number parsing.
13907 (putpkt_binary, input_interrupt): Only send interrupts if the target
13908 is running.
13909 * server.c (extended_protocol): Make static.
13910 (attached): Define earlier.
13911 (exit_requested, response_needed, program_argv): New variables.
13912 (target_running): New.
13913 (start_inferior): Clear attached here.
13914 (attach_inferior): Set attached here.
13915 (require_running): Define.
13916 (handle_query): Use require_running and target_running. Implement
13917 "monitor exit".
13918 (handle_v_attach, handle_v_run): New.
13919 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13920 (gdbserver_usage): Update.
13921 (main): Redo argument parsing. Handle --debug and --multi. Handle
13922 --attach along with other options or after the port. Save
13923 program_argv. Support no initial program. Resynchronize
13924 communication with GDB after an error. Handle "monitor exit".
13925 Use require_running and target_running. Always allow the extended
13926 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13927 restart in extended mode.
13928 * README: Refer to the GDB manual. Update --attach usage.
13929
7407e2de
AS
139302007-12-20 Andreas Schwab <schwab@suse.de>
13931
13932 * linux-low.c (STACK_SIZE): Define.
13933 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13934 (linux_test_for_tracefork): Likewise.
13935
b65d95c5
DJ
139362007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13937
13938 * linux-low.c (linux_wait_for_event): Update messages. Do not
13939 reinsert auto-delete breakpoints.
13940 * mem-break.c (struct breakpoint): Change return type of handler to
13941 int.
13942 (set_breakpoint_at): Update handler type.
13943 (reinsert_breakpoint_handler): Return 1 instead of calling
13944 delete_breakpoint.
13945 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13946 setting a new one.
13947 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13948 * mem-break.h (set_breakpoint_at): Update handler type.
13949 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13950 * win32-low.c (auto_delete_breakpoint): New.
13951 (get_child_debug_event): Use it.
13952
4e799345
DJ
139532007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13954
13955 * configure.ac: Check for pread and pwrite.
13956 * hostio.c (handle_pread): Fall back to lseek and read.
13957 (handle_pwrite): Fall back to lseek and write.
13958 * config.in, configure: Regenerated.
13959
27524b67
DJ
139602007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13961
13962 * server.c (myresume): Add own_buf argument.
13963 (main): Update calls.
13964
a20d5e98
DJ
139652007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13966
13967 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13968 * remote-utils.c (remote_open): Do not call disable_async_io.
13969 (block_async_io): Delete.
13970 (unblock_async_io): Make static.
13971 (initialize_async_io): New.
13972 * server.c (handle_v_cont): Handle async I/O here.
13973 (myresume): Likewise. Move other common resume tasks here...
13974 (main): ... from here. Call initialize_async_io. Disable async
13975 I/O before the main loop.
13976 * server.h (initialize_async_io): Declare.
13977 (block_async_io, unblock_async_io): Delete prototypes.
13978 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13979
b79d787e
DJ
139802007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13981
13982 * remote-utils.c (readchar): Allow binary data in received messages.
13983
d97903b2
PA
139842007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13985
13986 * win32-low.c (attaching): New global.
13987 (win32_create_inferior): Clear the `attaching' global.
13988 (win32_attach): Set the `attaching' global.
13989 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13990 attaching. Only set a breakpoint at the entry point if not
13991 attaching.
13992
311de423
PA
139932007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13994
13995 * server.c (main): Don't report dll events on the initial
13996 connection on attaches.
13997
6c2d16d2
PA
139982007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13999
14000 * server.c (main): Relax numerical bases supported for the pid of
14001 the --attach command line argument.
14002
5ca906e6
PA
140032007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14004
14005 * win32-low.c (win32_attach): Call OpenProcess before
14006 DebugActiveProcess, not after. Add last error output to error
14007 call.
14008
9c6c8194
PA
140092007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14010
14011 * win32-low.c (win32_get_thread_context)
14012 (win32_set_thread_context): New functions.
14013 (thread_rec): Use win32_get_thread_context.
14014 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14015 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14016 field.
14017
4d5d1aaa
PA
140182007-12-03 Leo Zayas
14019 Pedro Alves <pedro_alves@portugalmail.pt>
14020
14021 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14022 global variables.
14023 (child_add_thread): Minor cleanup.
14024 (child_continue): Resume artificially suspended threads before
14025 calling ContinueDebugEvent.
14026 (suspend_one_thread): New.
14027 (fake_breakpoint_event): New.
14028 (get_child_debug_event): Change return type to int. Check here if
14029 gdb sent an interrupt request. If a soft interrupt was requested,
14030 fake a breakpoint event. Return 0 if there is no event to handle,
14031 and 1 otherwise.
14032 (win32_wait): Don't check here if gdb sent an interrupt request.
14033 Ensure there is a valid event to handle.
14034 (win32_request_interrupt): Add soft interruption method as last
14035 resort.
14036
c436e841
PA
140372007-12-03 Leo Zayas
14038 Pedro Alves <pedro_alves@portugalmail.pt>
14039
14040 * win32-low.h (win32_thread_info): Add descriptions to the
14041 structure members. Replace `suspend_count' counter by a
14042 `suspended' flag.
14043 * win32-low.c (thread_rec): Update condition of when to get the
14044 context from the inferior. Rely on ContextFlags being set if it
14045 has already been retrieved. Only suspend the inferior thread if
14046 we haven't already. Warn if that fails.
14047 (continue_one_thread): s/suspend_count/suspended/. Only call
14048 ResumeThread once. Warn if that fails.
14049
e7b5fa67
PA
140502007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14051
14052 * win32-low.c (win32_wait): Don't read from the inferior when it
14053 has already exited.
14054
a385171d
PA
140552007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14056
14057 * Makefile.in (win32_low_h): New variable.
14058 (win32-low.o): Add dependency on $(win32_low_h).
14059 (win32-arm-low.o, win32-i386-low.o): New rules.
14060
f80c84b3
DJ
140612007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14062
14063 * hostio.c: Correct copyright year.
14064
a6b151f1
DJ
140652007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14066
14067 * Makefile.in (OBS): Add hostio.o.
14068 (hostio.o): New rule.
14069 * server.h (handle_vFile): Declare.
14070 * hostio.c: New file.
14071 * server.c (handle_v_requests): Take packet_len and new_packet_len
14072 for binary packets. Call handle_vFile.
14073 (main): Update call to handle_v_requests.
14074
f9387fc3
DJ
140752007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14076
14077 * linux-low.c: Include <sched.h>.
14078
51c2684e
DJ
140792007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14080
14081 * linux-low.c (linux_tracefork_grandchild): New.
14082 (linux_tracefork_child): Use clone.
14083 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14084
75f83163
JB
140852007-10-31 Joel Brobecker <brobecker@adacore.com>
14086
14087 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14088
da5898ce
DJ
140892007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14090
14091 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14092
24a09b5f
DJ
140932007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14094
14095 * inferiors.c (change_inferior_id): Delete.
14096 (add_pid_to_list, pull_pid_from_list): New.
14097 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14098 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14099 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14100 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14101 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14102 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14103 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14104 (using_threads): Always set to 1.
14105 (handle_extended_wait): New.
14106 (add_process): Do not set TID.
14107 (linux_create_inferior): Set must_set_ptrace_flags.
14108 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14109 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14110 (linux_thread_alive): Rename TID argument to LWPID.
14111 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14112 (linux_wait_for_event): Do not use TID or check using_threads. Update
14113 call to dead_thread_notify. Call handle_extended_wait.
14114 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14115 (send_sigstop): Delete sigstop_sent.
14116 (wait_for_sigstop): Avoid TID.
14117 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14118 (linux_test_for_tracefork): New.
14119 (linux_lookup_signals): Use thread_db_active and
14120 linux_supports_tracefork_flag.
14121 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14122 * linux-low.h (get_process_thread): Avoid TID.
14123 (struct process_ifo): Move thread_known and tid to the end. Remove
14124 sigstop_sent.
14125 (linux_attach_lwp, thread_db_init): Update prototypes.
14126 * server.h (change_inferior_id): Delete prototype.
14127 (add_pid_to_list, pull_pid_from_list): New prototypes.
14128 * thread-db.c (thread_db_use_events): New.
14129 (find_first_thread): Rename to...
14130 (find_one_thread): ...this. Update callers and messages. Do not
14131 call fatal. Check thread_db_use_events. Do not call
14132 change_inferior_id or new_thread_notify.
14133 (maybe_attach_thread): Update. Do not call new_thread_notify.
14134 (thread_db_init): Set thread_db_use_events. Check use_events.
14135 * utils.c (fatal, warning): Correct message prefix.
14136
30ed0a8f
DJ
141372007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14138
14139 * Makefile.in (clean): Remove new files.
14140 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14141 (powerpc-64.o, powerpc-64.c): New rules.
14142 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14143 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14144 with SPE.
14145 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14146 SPE targets.
14147 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14148 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14149 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14150 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14151 (target_regsets): Add AltiVec and SPE register sets.
14152 * configure.ac: Check for AltiVec and SPE.
14153 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14154 (ppc_fill_vrregset, ppc_store_vrregset): New.
14155 (target_regsets): Add AltiVec register set.
14156 * configure: Regenerated.
14157
fd462a61
DJ
141582007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14159
14160 * linux-low.c (O_LARGEFILE): Define.
14161 (linux_read_memory): Use /proc/PID/mem.
14162 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14163 * configure, config.in: Regenerated.
14164
69f223ed
DJ
141652007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14166
14167 * linux-low.c (linux_wait_for_event): Do not pass signals while
14168 single-stepping.
14169
aec18585
PA
141702007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14171
14172 * win32-low.c (create_process): New.
14173 (win32_create_inferior): Use create_process instead of
14174 CreateProcess. If create_process failed retry appending an ".exe"
14175 suffix. Store the GetLastError result immediatelly after
14176 create_process calls and use it on the call to error.
14177
34d86ddd
PA
141782007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14179
14180 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14181
5a0e3bd0
JB
141822007-08-23 Joel Brobecker <brobecker@adacore.com>
14183
14184 * configure.ac: Switch license to GPLv3.
14185
f88c79e6
MS
141862007-08-01 Michael Snyder <msnyder@access-company.com>
14187
14188 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14189
6b3d9b83
PA
141902007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14191
14192 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14193 typedef.
14194 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14195 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14196 CloseToolhelp32Snapshot.
14197 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14198 CloseToolhelp32Snapshot.
14199
c588c53c
MS
142002007-07-27 Michael Snyder <michael.snyder@access-company.com>
14201
14202 * server.c (main): Check for inferior exit before main loop.
14203
aa0403d9
PA
142042007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14205
14206 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14207 instead of on tmp_desc.
14208
255e7678
DJ
142092007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14210 Daniel Jacobowitz <dan@codesourcery.com>
14211
14212 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14213 (add_thread): Minor cleanups.
14214 (clear_inferiors): Move lower in the file. Clear the DLL
14215 list.
14216 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14217 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14218 (xml_escape_text): New.
14219 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14220 for qSupported.
14221 (handle_v_cont): Report errors.
14222 (gdbserver_version): Update.
14223 (main): Correct size of own_buf. Do not report initial DLL events.
14224 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14225 (unloaded_dll, xml_escape_text): New.
14226 * win32-low.c (enum target_waitkind): Update comments.
14227 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14228 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14229 (win32_EnumProcessModules, win32_GetModuleInformation)
14230 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14231 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14232 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14233 (win32_Module32First, win32_Module32Next, load_toolhelp)
14234 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14235 (get_child_debug_event): Handle DLL events.
14236 (win32_wait): Likewise.
14237
0d37add9
DJ
142382007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14239
14240 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14241 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14242
45e2715e
PA
142432007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14244
14245 * win32-low.c (handle_output_debug_string): Ignore event if not
14246 waiting.
14247
c5674cf1
PA
142482007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14249
14250 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14251
2bbe3cc1
DJ
142522007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14253
14254 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14255
ae13219e
DJ
142562007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14257
14258 * inferiors.c (change_inferior_id): Add comment.
14259 * linux-low.c (check_removed_breakpoint): Add an early
14260 prototype. Improve debug output.
14261 (linux_attach): Doc update.
14262 (linux_detach_one_process, linux_detach): Clean up before releasing
14263 each process.
14264 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14265 * linux-low.h (struct process_info): Doc improvement.
14266 * mem-break.c (delete_all_breakpoints): New.
14267 * mem-break.h (delete_all_breakpoints): New prototype.
14268 * thread-db.c (find_first_thread): New.
14269 (thread_db_create_event): Call it instead of
14270 thread_db_find_new_threads. Clean up unused variables.
14271 (maybe_attach_thread): Remove first thread handling.
14272 (thread_db_find_new_threads): Use find_first_thread.
14273 (thread_db_get_tls_address): Likewise.
14274
4105de34
DJ
142752007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14276
14277 * thread-db.c (thread_db_find_new_threads): Add prototype.
14278 (thread_db_create_event): Check for the main thread before adding
14279 a new thread.
14280 (maybe_attach_thread): Only enable event reporting if TID == 0.
14281 (thread_db_get_tls_address): Check for new threads.
14282
2b876972
DJ
142832007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14284
14285 * linux-low.c (linux_create_inferior): Try execv before execvp.
14286 * spu-low.c (spu_create_inferior): Likewise.
14287
7a245884
DJ
142882007-06-13 Mike Frysinger <vapier@gentoo.org>
14289
14290 * linux-low.c (linux_create_inferior): Change execv to execvp.
14291 * spu-low.c (spu_create_inferior): Likewies.
14292
117ce543
DJ
142932007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14294
14295 * Makefile.in (clean): Clean new files instead of deleted ones.
14296 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14297 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14298 rules.
14299 * configure.srv: Specify XML files and new regformats for MIPS and
14300 MIPS64 GNU/Linux.
14301 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14302 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14303 an entry for the restart register.
14304 (mips_cannot_fetch_register, mips_cannot_store_register)
14305 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14306 register names to match the XML descriptions.
14307 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14308 restart register instead of $0.
14309
0e7f50da
UW
143102007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14311 Markus Deuling <deuling@de.ibm.com>
14312
14313 * remote-utils.c (decode_xfer_write): New function.
14314 * server.h (decode_xfer_write): Add prototype.
14315 * server.c (handle_query): Add PACKET_LEN argument. Support
14316 qXfer:spu:read and qXfer:spu:write packets.
14317 (main): Pass packet_len to handle_query.
14318 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14319 * target.h (target_ops): Add qxfer_spu.
14320
374c1d38
UW
143212007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14322
14323 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14324 accessing non-seekable spufs files.
14325
bb63802a
UW
143262007-05-16 Markus Deuling <deuling@de.ibm.com>
14327
889bf7c5 14328 * server.c (handle_query): Add reply for qC packet.
bb63802a 14329
7390519e
PA
143302007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14331 Leo Zayas <lerele@champenstudios@com>
14332
14333 * server.h (check_remote_input_interrupt_request): New function.
14334 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14335 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14336 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14337 (check_remote_input_interrupt_request): New function.
14338 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 14339 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
14340 winapi_GenerateConsoleCtrlEvent): New typedefs.
14341 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14342 to 250 ms.
14343 (win32_wait): Check for remote interrupt request
14344 with check_remote_input_interrupt_request.
14345 (win32_request_interrupt): New function.
14346 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14347
34b34921
PA
143482007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14349
14350 * win32-low.c (debug_registers_changed,
14351 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14352 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14353 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14354 (thread_rec): Get context using the low target.
14355 (child_add_thread): Call thread_added on the low target,
14356 which does the same thing.
14357 (regptr): Delete.
14358 (do_initial_child_stuff): Remove debug registers references.
14359 Set context using the low target. Resume threads after
14360 setting the contexts.
14361 (child_continue): Remove dead variable. Remove debug
14362 registers references.
14363 (child_fetch_inferior_registers): Go through the low target.
14364 (do_child_store_inferior_registers): Remove.
14365 (child_store_inferior_registers): Go through the low target.
14366 (win32_resume): Remove debug registers references.
14367 Set context using the low target.
14368 (handle_exception): Change return type to void. Don't record
14369 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14370 first chance exception.
889bf7c5 14371 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
14372 goto loop. Always return after waiting for debug event.
14373 (win32_wait): Convert to switch statement. Handle spurious
14374 events.
14375
14376 * win32-i386-low.c (debug_registers_changed,
14377 debug_registers_used): New.
14378 (initial_stuff): Rename to ...
14379 (i386_initial_stuff): ... this. Clear debug registers
14380 state variables.
14381 (store_debug_registers): Delete.
14382 (i386_get_thread_context): New.
14383 (load_debug_registers): Delete.
14384 (i386_set_thread_context): New.
14385 (i386_thread_added): New.
14386 (single_step): Rename to ...
14387 (i386_single_step): ... this.
14388 (do_fetch_inferior_registers): Rename to ...
14389 (i386_fetch_inferior_register): ... this.
14390 (i386_store_inferior_register): New.
14391 (the_low_target): Adapt to new interface.
14392
14393 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14394 (arm_get_thread_context): New.
14395 (arm_set_thread_context): New.
14396 (regptr): New.
14397 (do_fetch_inferior_registers): Rename to ...
14398 (arm_fetch_inferior_register): ... this.
14399 (arm_store_inferior_register): New.
14400 (arm_wince_breakpoint): Reimplement as unsigned long.
14401 (arm_wince_breakpoint_len): Define.
14402 (the_low_target): Adapt to new interface.
14403
14404 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14405 load_debug_registers. Add get_thread_context, set_thread_context,
14406 thread_added and store_inferior_register. Rename
14407 fetch_inferior_registers to fetch_inferior_register.
14408 (regptr): Remove declaration.
14409
dd6953e1
PA
144102007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14411
14412 * linux-low.c (linux_detach): Change return type to int. Return 0.
14413 * spu-low.c (spu_detach): Likewise.
14414
444d6139
PA
144152007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14416
14417 * target.h (target_ops): Change return type of detach to int.
14418 Add join.
14419 (join_inferior): New.
14420 * server.c (main): Don't skip detach support on mingw32.
14421 If the inferior doesn't support detaching return error.
14422 Call join_inferior instead of using waitpid.
14423 * linux-low.c (linux_join): New.
14424 (linux_target_op): Add linux_join.
14425 * spu-low.c (spu_join): New.
14426 (spu_target_ops): Add spu_join.
14427 * win32-low.c (win32_detach): Adapt to new interface.
14428 Reopen current_process_handle before detaching. Issue a child
14429 resume before detaching.
14430 (win32_join): New.
14431 (win32_target_op): Add win32_join.
14432
1d5315fe
PA
144332007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14434
14435 * win32-low.c (win32-attach): Fix return value.
14436 * target.h (target_ops): Describe ATTACH return values.
14437
bf914831
PA
144382007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14439
14440 * win32-low.c (GETPROCADDRESS): Define.
14441 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14442 (winapi_DebugSetProcessKillOnExit): Likewise.
14443 (win32_create_inferior): Force usage of ansi CreateProcessA.
14444 (win32_attach): Use GETPROCADDRESS.
14445 (win32_detach): Likewise.
14446
f72f3e60
PA
144472007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14448
14449 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14450
ed50f18f
PA
144512007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14452
14453 * win32-low.c: Commit leftover changes from 2007-03-29.
14454
0c2ead7e
DJ
144552007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14456
14457 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14458 fields short instead of int. Add explicit padding.
14459 (i387_cache_to_fsave): Remove unnecessary casts.
14460 (i387_fsave_to_cache): Doc fix.
14461 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14462
73725ff3
DJ
144632007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14464
14465 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14466 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14467
d99f33d8
PA
144682007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14469
14470 * configure.srv (arm*-*-mingw32ce*): Move near the other
14471 arm targets.
14472
68070c10
PA
144732007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14474
2482afc6 14475 * configure.ac: Add errno checking.
68070c10
PA
14476 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14477 sys/file.h and malloc.h.
14478 (AC_CHECK_DECLS): Add perror.
14479 (srv_mingwce): Handle.
2482afc6 14480 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
14481 win32-i386-low.o to srv_tgtobj.
14482 (i[34567]86-*-mingw*): Likewise.
14483 (arm*-*-mingw32ce*): Add case.
14484 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14485 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14486 [__MINGW32CE__] (strerror): New function.
14487 [__MINGW32CE__] (errno): Define to GetLastError.
14488 [__MINGW32CE__] (COUNTOF): New macro.
14489 (remote_open): Remove extra close call.
14490 * mem-break.c (delete_breakpoint_at): New function.
14491 * mem-break.h (delete_breakpoint_at): Declare.
14492 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14493 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14494 [USE_WIN32API] (read, write): Add char* casts.
14495 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14496 * server.h: Include wincecompat.h on Windows CE.
14497 [HAVE_ERRNO_H]: Check.
14498 (perror): Declare if not declared.
14499 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14500 (perror_with_name): Remove errno declaration.
14501 * wincecompat.h: New.
14502 * wincecompat.c: New.
14503 * win32-low.h: New.
14504 * win32-arm-low.c: New.
14505 * win32-i386-low.c: New.
14506 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14507 (OUTMSG2): Make it safe.
14508 (_T): New macro.
14509 (COUNTOF): New macro.
14510 (NUM_REGS): Get it from the low target.
14511 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14512 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14513 (thread_rec): Let low target handle debug registers.
14514 (child_add_thread): Likewise.
14515 (child_init_thread_list): Likewise.
14516 (continue_one_thread): Likewise.
14517 (regptr): New.
14518 (do_child_fetch_inferior_registers): Move to ...
14519 * win32-i386-low.c: ... here, and rename to ...
14520 (do_fetch_inferior_registers): ... this.
889bf7c5 14521 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
14522 Go through the low target.
14523 (do_child_store_inferior_registers): Use regptr.
14524 (strwinerror): New function.
14525 (win32_create_inferior): Handle Windows CE.
14526 Use strwinerror instead of strerror on Windows error
14527 codes. Add program to the error output.
14528 Don't close the main thread handle on Windows CE.
14529 (win32_attach): Use coredll.dll on Windows CE.
14530 (win32_kill): Close current process and current
14531 thread handles.
14532 (win32_detach): Use coredll.dll on Windows CE.
14533 (win32_resume): Let low target handle debug registers, and
14534 step request.
14535 (handle_exception): Add/Remove initial breakpoint. Avoid
14536 non-existant WSTOPSIG on Windows CE.
14537 (win32_read_inferior_memory): Cast to remove warning.
14538 (win32_arch_string): Go through the low target.
14539 (initialize_low): Call set_breakpoint_data with the low
14540 target's breakpoint.
14541 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14542 FOP_REGNUM, mappings): Move to ...
14543 * win32-i386-low.c: ... here.
14544 * win32-low.c (win32_thread_info): Move to ...
14545 * win32-low.h: ... here.
14546 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14547 win32-arm-low.c and wincecompat.c.
14548 (all:): Add $EXEEXT.
14549 (install-only:): Likewise.
14550 (gdbserver:): Likewise.
14551 (gdbreplay:): Likewise.
14552 * config.in: Regenerate.
14553 * configure: Regenerate.
14554
41093d81
PA
145552007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14556
14557 * win32-low.c: Rename typedef thread_info to
14558 win32_thread_info throughout.
14559
544afa54
PA
145602007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14561
14562 * win32-i386-low.c: Rename to ...
14563 * win32-low.c: ... this.
14564 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14565 * Makefile.in: Likewise.
14566
bce7165d
PA
145672007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14568
14569 * remote-utils.c (monitor_output): Constify msg parameter.
14570 * server.h (monitor_output): Likewise.
14571 * win32-i386-low.c (handle_output_debug_string): New.
14572 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14573 handle_output_debug_string.
14574 (get_child_debug_event): Likewise.
14575
506c7aa0
DJ
145762007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14577
14578 * server.c (main): Correct strtoul check.
14579
42c81e2a
DJ
145802007-03-27 Jon Ringle <jon@ringle.org>
14581
14582 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14583
9453113a
DJ
145842007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14585
14586 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14587
64a69107
DJ
145882007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14589
14590 * terminal.h: Check HAVE_SGTTY_H.
14591
145922007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
14593
14594 * remote-utils.c (remote_open): Print out the assigned port number.
14595
c74d0ad8
DJ
145962007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14597
14598 * remote-utils.c (monitor_output): New function.
14599 * server.c (debug_threads): Define here.
14600 (monitor_show_help): New function.
14601 (handle_query): Handle qRcmd.
14602 (main): Do not handle 'd' packet.
14603 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14604 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14605 of debug_threads.
14606
de7c3b4a
PA
146072007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14608
14609 * Makefile.in (EXEEXT): New.
14610 (clean): Use $(EXEEXT).
14611
ef57601b
PA
146122007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14613
14614 * target.h (target_ops): Rename send_signal to request_interrupt,
14615 and remove enum target_signal parameter.
14616 * linux-low.c (linux_request_interrupt): Rename from
14617 linux_send_signal, and always send SIGINT.
14618 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14619 and always send SIGINT.
14620 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14621 of send_signal.
14622 (input_interrupt): Likewise.
14623
820f2bda
PA
146242007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14625
14626 * server.c (get_features_xml): Check if target implemented
14627 arch_string.
14628 * win32-i386-low.c (win32_arch_string): New.
14629 (win32_target_ops): Add win32_arch_string as arch_string member.
14630
ab39bf24
UW
146312007-02-22 Markus Deuling <deuling@de.ibm.com>
14632
14633 * spu-low.c (spu_arch_string): New.
14634 (spu_target_ops): Add spu_arch_string.
14635
61ff6e04
DJ
146362007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14637
14638 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14639 * configure.ac: Do not check for terminal.h.
14640 * configure, config.in: Regenerated.
14641
fb1e4ffc
DJ
146422007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14643
14644 * Makefile.in (OBS): Add $(XML_BUILTIN).
14645 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14646 (clean): Update.
14647 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14648 (arm-with-iwmmxt.c): New.
14649 * config.in, configure: Regenerate.
14650 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14651 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14652 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14653 (arm*-*-linux*): Add iWMMXt and regset support.
14654 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14655 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14656 (arm_store_wmmxregset, target_regsets): New.
14657 * server.c (get_features_xml): Take annex argument. Check builtin
14658 XML documents.
14659 (handle_query): Handle multiple annexes.
14660
0f48aa01
DJ
146612007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14662
14663 * remote-utils.c [USE_WIN32API] (read, write): Define.
14664 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14665 write.
14666
23181151
DJ
146672007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14668
14669 * linux-i386-low.c (the_low_target): Set arch_string.
14670 * linux-x86-64-low.c (the_low_target): Likewise.
14671 * linux-low.c (linux_arch_string): New.
14672 (linux_target_ops): Add it.
14673 * linux-low.h (struct linux_target_ops): Add arch_string.
14674 * server.c (write_qxfer_response): Use const void * for DATA.
14675 (get_features_xml): New.
14676 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14677 * target.h (struct target_ops): Add arch_string method.
14678
9d606399
DJ
146792007-01-03 Denis Pilat <denis.pilat@st.com>
14680 Daniel Jacobowitz <dan@codesourcery.com>
14681
14682 * linux-low.c (linux_kill): Handle being called with no threads.
14683 * win32-i386-low.c (win32_kill): Likewise.
14684 (get_child_debug_event): Clear current_process_handle.
14685
146862006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
14687 Daniel Jacobowitz <dan@codesourcery.com>
14688
14689 * remote-utils.c (remote_open): Check the type of specified
14690 serial port devices before opening them.
14691 * server.c (main): Kill the inferior if an error occurs during
14692 the first remote_open.
14693
a5e13d24
DJ
146942006-12-05 Markus Deuling <deuling@de.ibm.com>
14695
14696 * README: Update supported targets.
14697
186947f7
DJ
146982006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14699
14700 * Makefile.in (clean): Remove reg-mips64.c.
14701 (reg-mips64.c, reg-mips64.o): New rules.
14702 * configure.srv: Handle mips64. Include regset support for mips.
14703 * linux-mips-low.c (union mips_register): New.
14704 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14705 (mips_breakpoint, mips_breakpoint_at): Use int.
14706 (mips_collect_register, mips_supply_register)
14707 (mips_collect_register_32bit, mips_supply_register_32bit)
14708 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14709 (mips_store_fpregset, target_regsets): New.
14710 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14711
a13e2c95
UW
147122006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14713
14714 * configure.srv: Add target "spu*-*-*".
14715 * Makefile.in (clean): Remove reg-spu.c.
14716 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14717 * spu-low.c: New file.
14718
cb7283db
DJ
147192006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14720
14721 * configure.ac: Correct td_thr_tls_get_addr test.
14722 * configure: Regenerated.
14723
89be2091
DJ
147242006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14725
14726 * linux-low.c (linux_wait_for_event): Reformat. Use the
14727 pass_signals array.
14728 * remote-utils.c (decode_address_to_semicolon): New.
14729 * server.c (pass_signals, handle_general_set): New.
14730 (handle_query): Mention QPassSignals for qSupported.
14731 (main): Call handle_general_set.
14732 * server.h (pass_signals, decode_address_to_semicolon): New.
14733
000ef4f0
DJ
147342006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14735
14736 * server.c (handle_query): Correct error handling for read_auxv.
14737
b7149293
UW
147382005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14739
14740 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14741 and srv_linux_thread_db to yes.
14742 * linux-s390-low.c (s390_fill_gregset): New function.
14743 (target_regsets): Define data structure.
14744
dae5f5cf
DJ
147452006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14746
14747 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14748 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14749 * config.in, configure: Regenerated.
14750 * inferiors.c (gdb_id_to_thread): New function.
14751 (gdb_id_to_thread_id): Use it.
14752 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14753 * linux-low.h (struct process_info): Add th member.
14754 (thread_db_get_tls_address): New prototype.
14755 * remote-utils.c (decode_address): Make non-static.
14756 * server.c (handle_query): Handle qGetTLSAddr.
14757 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14758 * target.h (struct target_ops): Add get_tls_address.
14759 * thread-db.c (maybe_attach_thread): Save the thread handle.
14760 (thread_db_get_tls_address): New.
14761
32ca6d61
DJ
147622006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14763
14764 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14765 (linux_resume_one_process): Take a siginfo_t *. Update all
14766 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14767 (struct pending_signals): Add a siginfo_t.
14768 (linux_wait_for_process): Always set last_status.
14769 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14770 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14771 * linux-low.h (struct process_info): Add last_status.
14772
5ffff7c1
DJ
147732006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14774
14775 * remote-utils.c (try_rle): New function.
14776 (putpkt_binary): Use it.
14777
8695c747
DJ
147782006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14779
14780 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14781 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14782 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14783 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14784 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14785 point registers.
14786
290fadea
RS
147872006-08-08 Richard Sandiford <richard@codesourcery.com>
14788
14789 * server.c (terminal_fd): New variable.
14790 (old_foreground_pgrp): Likewise.
14791 (restore_old_foreground_pgrp): New function.
14792 (start_inferior): Record the terminal file descriptor in terminal_fd
14793 and its original foreground group in old_foreground_pgrp. Register
14794 restore_old_foreground_pgrp with atexit().
14795
9f2e1e63
DJ
147962006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14797
14798 * server.c (handle_query): Correct qPart to qXfer.
14799
b80864fb
DJ
148002006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14801
14802 * configure.ac: Check for more headers which are missing on
14803 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14804 * configure.srv: Add Cygwin and mingw32.
14805 * remote-utils.c: Don't include headers unconditionally which
14806 are missing on mingw32. Include <winsock.h> for mingw32.
14807 (remote_open): Adjust for mingw32 support. Flush
14808 standard error after writing to it.
14809 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14810 (unblock_async_io, enable_async_io, disable_async_io)
14811 (readchar, getpkt): Update for Winsock support.
14812 (prepare_resume_reply): Expect a protocol signal number.
14813 * server.c: Disable <sys/wait.h> on mingw32.
14814 (start_inferior): Adjust for mingw32 support. Flush
14815 standard error after writing to it.
14816 (attach_inferior): Likewise. Use protocol signal
14817 numbers.
14818 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14819 and names.
14820 * win32-i386-low.c: New file.
14821 * Makefile.in (XM_CLIBS): Set.
14822 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14823 (win32-i386-low.o): New dependency rule.
14824 * linux-low.c (linux_wait): Use target signal numbers.
14825 * target.h (struct target_ops): Doc fix.
14826 * server.h (target_signal_to_name): New prototype.
14827 * gdbreplay.c: Don't include headers unconditionally which
14828 are missing on mingw32. Include <winsock.h> for mingw32.
14829 (remote_close, remote_open): Adjust for Winsock support.
14830 * configure, config.in: Regenerated.
14831
0876f84a
DJ
148322006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14833
14834 * server.c (decode_xfer_read, write_qxfer_response): New.
14835 (handle_query): Take a packet length argument. Handle
14836 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14837 the qSupported response.
14838 (main): Update call to handle_query.
14839
01f9e8fa
DJ
148402006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14841
14842 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14843 (putpkt_binary): Renamed from putpkt and adjusted for binary
14844 data.
14845 (putpkt): New wrapper for putpkt_binary.
14846 (readchar): Don't mask off the high bit.
14847 (decode_X_packet): New function.
14848 * server.c (main): Call putpkt_binary if a handler sets the packet
14849 length. Save the length of the incoming packet. Handle 'X'.
14850 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14851
be2a5f71
DJ
148522006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14853
14854 * server.c (handle_query): Handle qSupported.
14855
ea025f5f
DJ
148562006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14857
14858 * remote-utils.c (all_symbols_looked_up): New variable.
14859 (look_up_one_symbol): Check it.
14860 * server.h (look_up_one_symbol): New declaration.
14861 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14862
9308fc88
DJ
148632006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14864
14865 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 14866 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
14867 (PTRACE_GET_THREAD_AREA): Define.
14868 (ps_get_thread_area): New function.
14869
52fb6437
NS
148702006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14871
14872 * configure.srv (m68k*-*-uclinux*): New target.
14873 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14874 (linux_resume_one_process): Remove extraneous cast.
14875 (linux_read_offsets): New.
14876 (linux_target_op): Add linux_read_offsets on mmuless systems.
14877 * server.c (handle_query): Add qOffsets logic.
14878 * target.h (struct target_ops): Add read_offsets.
14879
21b0f40c
DJ
148802006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14881
14882 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14883 (PTRACE_GET_THREAD_AREA): Define.
14884 (ps_get_thread_area): New function.
14885 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14886 (linux-x86-64-low.o): Update.
14887
0050a760
DJ
148882006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14889
14890 * configure.ac: Remove checks for prfpregset_t.
14891 * gdb_proc_service.h: New file.
14892 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14893 new "gdb_proc_service.h".
14894 * proc-service.c: Likewise.
14895 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14896 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14897 * Makefile.in (gdb_proc_service_h): Updated.
14898 * configure, config.in: Regenerated.
14899
b92a518e
DJ
149002006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14901
14902 * remote-utils.c (prepare_resume_reply): Move declaration
14903 of gdb_id_from_wait to the top of the block.
14904
545587ee
DJ
149052006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14906
14907 * linux-low.c (regsets_store_inferior_registers): Read the regset
14908 from the target before filling it.
14909
9db87ebd
DJ
149102006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14911
14912 * server.c (attach_inferior): Return SIGTRAP for a successful
14913 attach.
14914
dd24457d
DJ
149152006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14916
14917 * Makefile.in (OBS): Add version.o.
14918 (STAGESTUFF): Delete.
14919 (version.o): Add dependencies.
14920 (version.c): Replace rule.
14921 (clean): Remove version.c.
14922 * server.c (gdbserver_version): New.
14923 (gdbserver_usage): Use printf.
14924 (main): Handle --version and --help.
14925 * server.h (version, host_name): Add declarations.
14926
6f0f660e
EZ
149272005-12-23 Eli Zaretskii <eliz@gnu.org>
14928
889bf7c5
PA
14929 * linux-arm-low.c:
14930 * linux-arm-low.c:
14931 * inferiors.c:
14932 * i387-fp.h:
14933 * i387-fp.c:
14934 * gdbreplay.c:
14935 * regcache.c:
14936 * proc-service.c:
14937 * mem-break.h:
14938 * mem-break.c:
14939 * linux-x86-64-low.c:
14940 * linux-sh-low.c:
14941 * linux-s390-low.c:
14942 * linux-ppc64-low.c:
14943 * linux-ppc-low.c:
14944 * linux-mips-low.c:
14945 * linux-m68k-low.c:
14946 * linux-m32r-low.c:
14947 * linux-low.h:
14948 * linux-low.c:
14949 * linux-ia64-low.c:
14950 * linux-i386-low.c:
14951 * linux-crisv32-low.c:
14952 * thread-db.c:
14953 * terminal.h:
14954 * target.h:
14955 * target.c:
14956 * server.h:
14957 * server.c:
14958 * remote-utils.c:
14959 * regcache.h:
14960 * utils.c:
14961 * Makefile.in:
14962 * configure.ac:
6f0f660e
EZ
14963 * gdbserver.1: Add (C) after Copyright. Update the FSF
14964 address.
14965
9d1fb177
DJ
149662005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14967
14968 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14969 (arm_breakpoint_at): Recognize both breakpoints.
14970 (the_low_target): Use the correct breakpoint instruction.
14971
011a70c2
DJ
149722005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14973
14974 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14975 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14976 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14977 (the_low_target): Update.
14978
7fb85e41
AS
149792005-10-25 Andreas Schwab <schwab@suse.de>
14980
14981 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14982
14983 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14984 (ia64_num_regs): Reduce to 462.
14985
3db0444b
DJ
149862005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14987
14988 * acinclude.m4: Correct quoting.
14989 * aclocal.m4: Regenerated.
14990
14991 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14992 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14993 (thread_db_init): Call thread_db_err_str.
14994 * configure.ac: Check for TD_VERSION.
14995 * config.in, configure: Regenerated.
14996
bee0189a
DJ
149972005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14998
14999 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15000
e9d25b98
DJ
150012005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15002
15003 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15004 is not available. Define HAVE_PTRACE_GETREGS if it is.
15005 * config.in, configure: Regenerated.
15006 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15007 * linux-i386-low.c, linux-m68k-low.c: Update to use
15008 HAVE_PTRACE_GETREGS.
15009 * linux-low.c (regsets_fetch_inferior_registers)
15010 (regsets_store_inferior_registers): Only return 0 if we processed
15011 GENERAL_REGS.
15012 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15013 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15014
a06660f7
DJ
150152005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15016
15017 * inferiors.c (struct thread_info): Add gdb_id.
15018 (add_thread): Add gdb_id argument.
15019 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15020 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15021 calls to add_thread.
15022 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15023 * server.c (handle_query): Use thread_to_gdb_id.
15024 (handle_v_cont, main): Use gdb_id_to_thread_id.
15025 * server.h (add_thread): Update prototype.
15026 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15027 prototypes.
15028
5a1f5858
DJ
150292005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15030
15031 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15032 left-padded registers.
15033 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15034 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15035
e122f1f5
SE
150362005-07-01 Steve Ellcey <sje@cup.hp.com>
15037
15038 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15039 * configure: Regenerate.
15040 * config.in: Regenerate.
15041 * server.h (NEED_DECLARATION_STRERROR):
15042 Replace with !HAVE_DECL_STRERROR.
15043
d592fa2f
DJ
150442005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15045
15046 * linux-low.c (linux_wait, linux_send_signal): Don't test
15047 an unsigned long variable for > 0 if it could be MAX_ULONG.
15048 * server.c (myresume): Likewise.
15049 * target.c (set_desired_inferior): Likewise.
15050
ccbd4912
MK
150512005-06-13 Mark Kettenis <kettenis@gnu.org>
15052
15053 * configure.ac: Simplify and improve check for socklen_t.
15054 * configure, config.in: Regenerate.
15055
f450004a
DJ
150562005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15057
15058 * acconfig.h: Remove.
15059 * configure.ac: Add a test for socklen_t. Use three-argument
15060 AC_DEFINE throughout.
15061 * config.in: Regenerated using autoheader 2.59.
15062 * configure: Regenerated.
15063
15064 * gdbreplay.c (socklen_t): Provide a default.
15065 (remote_open): Use socklen_t.
15066 * remote-utils.c (socklen_t): Provide a default.
15067 (remote_open): Use socklen_t.
15068 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15069 unsigned char.
15070
15071 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15072 char for buffers.
15073 * linux-low.c (linux_read_memory, linux_write_memory)
15074 (linux_read_auxv): Likewise.
15075 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15076 (check_mem_write): Likewise.
15077 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15078 Likewise.
15079 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15080 (registers_from_string, register_data): Likewise.
15081 * server.c (handle_query, main): Likewise.
15082 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15083 (decode_M_packet): Likewise.
15084 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15085 * target.h (struct target_ops): Update read_memory, write_memory,
15086 and read_auxv.
15087 (read_inferior_memory, write_inferior_memory): Update.
15088 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15089 to unsigned char *.
15090 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15091 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15092 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15093 linux-s390-low.c, linux-sh-low.c: Update for changes in
15094 read_inferior_memory and the_low_target->breakpoint.
15095
eee84df1
DJ
150962005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15097
15098 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15099 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15100 * configure.srv: Add powerpc64-*-linux*.
15101 * linux-ppc64-low.c: New file.
15102
45b134e5
OF
151032005-05-23 Orjan Friberg <orjanf@axis.com>
15104
15105 * linux-cris-low.c: New file with support for CRIS.
15106 * linux-crisv32-low.c: Ditto for CRISv32.
15107 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15108 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 15109 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
15110 reg-crisv32.o, and reg-crisv32.c to make rules.
15111 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15112 recognized targets.
15113
48d93c75
UW
151142005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15115
15116 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15117 of sizeof (PTRACE_XFER_TYPE).
15118 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15119
e013ee27
OF
151202005-05-12 Orjan Friberg <orjanf@axis.com>
15121
889bf7c5 15122 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
15123 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15124 pointers for hardware watchpoint support.
15125 * linux-low.h (struct linux_target_ops): Ditto.
15126 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15127 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15128 to linux_target_ops.
15129 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15130 reply packet.
15131 * server.c (main): Recognize 'Z' and 'z' packets.
15132
b0ded00b
UW
151332005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15134
15135 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15136 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15137 (the_low_target): Add new members.
15138
8643e2ad
DJ
151392005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15140
15141 * proc-service.c (ps_lgetregs): Search all_processes instead of
15142 all_threads.
15143
fc620387
DJ
151442005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15145
15146 * server.c (start_inferior): Change return type to int.
15147 (attach_inferior): Change sigptr to int *.
15148 (handle_v_cont, handle_v_requests): Change signal to int *.
15149 (main): Change signal to int.
15150
151512005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
15152
15153 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15154 * configure.srv: Add m32r*-*-linux*.
15155 * linux-m32r-low.c: New file.
15156
e0e76420
DJ
151572005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15158
15159 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15160
a1928bad
DJ
151612005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15162
15163 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15164 Take unsigned long arguments for PIDs.
15165 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15166 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15167 (wait_for_sigstop, linux_resume_one_process)
15168 (regsets_fetch_inferior_registers, linux_send_signal)
15169 (linux_read_auxv): Likewise. Update the types of variables holding
15170 PIDs. Update format string specifiers.
15171 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15172 * remote-utils.c (prepare_resume_reply): Likewise.
15173 * server.c (cont_thread, general_thread, step_thread)
15174 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15175 unsigned long.
15176 (handle_query): Update format specifiers.
15177 (handle_v_cont, main): Use strtoul for thread IDs.
15178 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15179 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15180 (general_thread, step_thread, thread_from_wait)
15181 (old_thread_from_wait): Update.
15182 * target.h (struct thread_resume): Use unsigned long for THREAD.
15183 (struct target_ops): Use unsigned long for arguments to attach and
15184 thread_alive.
15185
dcdb98d2
DJ
151862005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15187
15188 * acinclude.m4: Include bfd/bfd.m4 directly.
15189 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15190 <agriffis@toolchain.org>.
15191 * aclocal.m4, configure: Regenerated.
15192
bec39cab
AC
151932005-01-07 Andrew Cagney <cagney@gnu.org>
15194
15195 * configure.ac: Rename configure.in, require autoconf 2.59.
15196 * configure: Re-generate.
15197
434c4c77
DJ
151982004-12-08 Daniel Jacobowitz <dan@debian.org>
15199
15200 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15201 LIBS when finished.
15202 * aclocal.m4: Regenerated.
15203 * configure: Regenerated.
15204
db1d3e1b
AS
152052004-11-21 Andreas Schwab <schwab@suse.de>
15206
15207 * linux-m68k-low.c (m68k_num_gregs): Define.
15208 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15209 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15210 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15211 (m68k_breakpoint_at): New. Add to the_low_target.
15212
15213 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15214 srv_linux_thread_db to yes.
15215
43360365
JB
152162004-10-20 Joel Brobecker <brobecker@gnat.com>
15217
15218 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15219 (ARCH_SET_FS): Likewise.
15220 (ARCH_GET_FS): Likewise.
15221 (ARCH_GET_GS): Likewise.
15222
fd500816
DJ
152232004-10-16 Daniel Jacobowitz <dan@debian.org>
15224
15225 * linux-i386-low.c (ps_get_thread_area): New.
15226 * linux-x86-64-low.c (ps_get_thread_area): New.
15227 * linux-low.c: Include <sys/syscall.h>.
15228 (linux_kill_one_process): Don't kill the first thread here.
15229 (linux_kill): Kill the first thread here.
15230 (kill_lwp): New function.
15231 (send_sigstop, linux_send_signal): Use it.
15232 * proc-service.c: Clean up #ifdefs.
15233 (fpregset_info): Delete.
15234 (ps_lgetregs): Update and enable implementation.
15235 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15236 implementations.
15237 * remote-utils.c (struct sym_cache, symbol_cache): New.
15238 (input_interrupt): Print a clearer message.
15239 (async_io_enabled): New variable.
15240 (enable_async_io, disable_async_io): Use it. Update comments.
15241 (look_up_one_symbol): Use the symbol cache.
15242 * thread-db.c (thread_db_look_up_symbols): New function.
15243 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15244
f6de3c42
DJ
152452004-10-16 Daniel Jacobowitz <dan@debian.org>
15246
15247 * configure.in: Test for -rdynamic.
15248 * configure: Regenerated.
15249 * Makefile (INTERNAL_LDFLAGS): New.
15250 (gdbserver, gdbreplay): Use it.
15251
2c0fc042
AC
152522004-09-02 Andrew Cagney <cagney@gnu.org>
15253
15254 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15255
075b3282
DJ
152562004-03-23 Daniel Jacobowitz <drow@mvista.com>
15257
15258 * linux-low.c (linux_wait): Clear all_processes list also.
15259
fa6a77dc
DJ
152602004-03-12 Daniel Jacobowitz <drow@mvista.com>
15261
15262 * linux-low.c: Include <errno.h>. Remove extern declaration of
15263 errno.
15264
6d782a97
DJ
152652004-03-12 Daniel Jacobowitz <drow@mvista.com>
15266
15267 * gdbreplay.c, server.h, utils.c: Update copyright years.
15268
3a7fb99b
DJ
152692004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15270
15271 * server.c (main): Print child status or termination signal from
15272 variable 'signal', not 'sig'.
15273
c3e735a6
DJ
152742004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15275
15276 * linux-low.c (linux_read_memory): Change return type to
15277 int. Check for and return error from ptrace().
15278 * target.c (read_inferior_memory): Change return type to int. Pass
15279 back return status from the_target->read_memory().
15280 * target.h (struct target_ops): Adapt *read_memory() prototype.
15281 Update comment.
15282 (read_inferior_memory): Adapt prototype.
15283 * server.c (main): Return an error packet if
15284 read_inferior_memory() returns an error.
15285
a59d1c82
DJ
152862004-03-04 Daniel Jacobowitz <drow@mvista.com>
15287
15288 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15289 Unify with other clean targets.
15290
dc3f8883
DJ
152912004-02-29 Daniel Jacobowitz <drow@mvista.com>
15292
15293 * server.c (handle_v_cont): Call set_desired_inferior.
15294
89a208da
DJ
152952004-02-29 Daniel Jacobowitz <drow@mvista.com>
15296
15297 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15298
62ea82f5
DJ
152992004-02-29 Daniel Jacobowitz <drow@mvista.com>
15300
15301 * linux-low.c (linux_wait): Unblock async I/O.
15302 (linux_resume): Block and enable async I/O.
15303 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15304 * server.h (block_async_io, unblock_async_io): Add prototypes.
15305
6910d122
DJ
153062004-02-29 Daniel Jacobowitz <drow@mvista.com>
15307
15308 * remote-utils.c (remote_open): Print a status notice after
15309 opening a TCP port.
15310 * server.c (attach_inferior): Print a status notice after
15311 attaching.
15312
153132004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
15314
15315 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15316
c89dc5d4
DJ
153172004-02-26 Daniel Jacobowitz <drow@mvista.com>
15318
15319 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15320 error packet.
15321 * server.c, target.h: Update copyright years.
15322
4b8dad4a
RM
153232004-02-25 Roland McGrath <roland@redhat.com>
15324
15325 * target.h (struct target_ops): New member `read_auxv'.
15326 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15327 * linux-low.c (linux_read_auxv): New function.
15328 (linux_target_ops): Initialize `read_auxv' member to that.
15329
d7446758
JB
153302004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15331
15332 Committed by Jim Blandy <jimb@redhat.com>.
15333
15334 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 15335 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
15336 instead of GPR_SIZE to distiguish s390 and s390x targets.
15337
5544ad89
DJ
153382004-01-31 Daniel Jacobowitz <drow@mvista.com>
15339
15340 * linux-low.c: Update copyright year.
15341 (check_removed_breakpoint): Clear pending_is_breakpoint.
15342 (linux_set_resume_request, linux_queue_one_thread)
15343 (resume_status_pending_p): New functions.
15344 (linux_continue_one_thread): Use process->resume.
15345 (linux_resume): Only resume threads if there are no pending events.
15346 * linux-low.h (struct process_info): Add resume request
15347 pointer.
15348
2a68b70e
DJ
153492004-01-30 Daniel Jacobowitz <drow@mvista.com>
15350
15351 * regcache.c (new_register_cache): Clear the allocated register
15352 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15353
64386c31
DJ
153542003-10-13 Daniel Jacobowitz <drow@mvista.com>
15355
15356 * linux-low.c (linux_resume): Take a struct thread_resume *
15357 argument.
15358 (linux_wait): Update call.
15359 (resume_ptr): New static variable.
15360 (linux_continue_one_thread): Renamed from
15361 linux_continue_one_process. Use resume_ptr.
15362 (linux_resume): Use linux_continue_one_thread.
15363 * server.c (handle_v_cont, handle_v_requests): New functions.
15364 (myresume): New function.
15365 (main): Handle 'v' case.
15366 * target.h (struct thread_resume): New type.
15367 (struct target_ops): Change argument of "resume" to struct
15368 thread_resume *.
15369 (myresume): Delete macro.
15370
c938e9b0
L
153712003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15372
15373 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15374 (uninstall): Support DESTDIR.
15375
7f313d07
BC
15376Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15377
15378 * configure.srv: Add xscale*linux copy of arm*linux entry.
15379
3b2fc2ea
DJ
153802003-07-24 Daniel Jacobowitz <drow@mvista.com>
15381
15382 * linux-arm-low.c (arm_reinsert_addr): New function.
15383 (the_low_target): Add arm_reinsert_addr.
15384
1c0a559e
MK
153852003-07-08 Mark Kettenis <kettenis@gnu.org>
15386
15387 * mem-break.c: Remove whitespace at end of file.
15388
43d5792c
DJ
153892003-06-28 Daniel Jacobowitz <drow@mvista.com>
15390
15391 * configure.in: Check whether we need to prototype strerror.
15392 * server.h: Optionally prototype strerror.
15393 * gdbreplay.c (perror_with_name): Use strerror.
15394 * linux-low.c (linux_attach_lwp): Use strerror.
15395 * utils.c (perror_with_name): Use strerror.
15396 * config.in, configure: Regenerated.
15397
c8a86edf
DJ
153982003-06-28 Daniel Jacobowitz <drow@mvista.com>
15399
15400 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15401 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15402
73d37363
DJ
154032003-06-20 Daniel Jacobowitz <drow@mvista.com>
15404
15405 * Makefile.in (SFILES): Update.
15406 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15407 low-sun3.c: Remove files.
15408
6ad8ae5c
DJ
154092003-06-17 Daniel Jacobowitz <drow@mvista.com>
15410
15411 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15412 (linux_detach_one_process, linux_detach): New functions.
15413 (linux_target_ops): Add linux_detach.
15414 * server.c (main): Handle 'D' packet.
15415 * target.h (struct target_ops): Add "detach" member.
15416 (detach_inferior): Define.
15417
1581182a
MK
154182003-06-13 Mark Kettenis <kettenis@gnu.org>
15419
15420 From Kelley Cook <kelleycook@wideopenwest.com>:
15421 * configure.srv: Accept i[34567]86 variants.
15422
e5379b03
DJ
154232003-06-05 Daniel Jacobowitz <drow@mvista.com>
15424
15425 * linux-low.c (linux_wait_for_event): Correct comment typos.
15426 (linux_resume_one_process): Call check_removed_breakpoint.
15427 (linux_send_signal): New function.
15428 (linux_target_ops): Add linux_send_signal.
15429 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15430 of kill.
15431 * target.h (struct target_ops): Add send_signal.
15432
2ff29de4
JB
154332003-05-29 Jim Blandy <jimb@redhat.com>
15434
15435 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15436 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15437 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15438 away part of the register's value.
15439
254787d4
DJ
154402003-03-26 Daniel Jacobowitz <drow@mvista.com>
15441
15442 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15443 (linux_wait_for_event, linux_init_signals): Likewise.
15444
94e10508
DJ
154452003-03-17 Daniel Jacobowitz <drow@mvista.com>
15446
15447 * configure.in: Check for stdlib.h.
15448 * configure: Regenerated.
15449 * config.in: Regenerated.
15450
4c0711e0
DJ
154512003-01-04 Andreas Schwab <schwab@suse.de>
15452
15453 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15454
ef66e766
AC
154552003-01-02 Andrew Cagney <ac131313@redhat.com>
15456
15457 * Makefile.in: Remove obsolete code.
15458
a1358604
DJ
154592002-11-20 Daniel Jacobowitz <drow@mvista.com>
15460
15461 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15462 defined(PT_FPR0_HI).
15463
23ce3b1c
DJ
154642002-11-17 Stuart Hughes <seh@zee2.com>
15465
15466 * linux-arm-low.c (arm_num_regs): Increase.
15467 (arm_regmap): Include status register.
15468
154692002-11-17 Daniel Jacobowitz <drow@mvista.com>
15470
15471 * linux-low.c (register_addr): Remove incorrect -1 check.
15472
a9fa9f7d
DJ
154732002-08-29 Daniel Jacobowitz <drow@mvista.com>
15474
15475 * linux-low.c (linux_create_inferior): Call setpgid. Return
15476 the new PID.
15477 (unstopped_p, linux_signal_pid): Remove.
15478 (linux_target_ops): Remove linux_signal_pid.
15479 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15480 global instead of target method.
15481 * target.h (struct target_ops): Remove signal_pid. Update comment
15482 for create_inferior.
15483 * server.c (signal_pid): New variable.
15484 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 15485 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
15486 (attach_inferior): Set signal_pid.
15487
17574093
DJ
154882002-08-23 Daniel Jacobowitz <drow@mvista.com>
15489
15490 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15491
154922002-08-20 Jim Blandy <jimb@redhat.com>
15493
15494 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15495 default for this.
15496
154972002-08-01 Andrew Cagney <cagney@redhat.com>
15498
15499 * Makefile.in: Make chill references obsolete.
15500
155012002-07-24 Kevin Buettner <kevinb@redhat.com>
15502
15503 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15504 * configure: Regenerate.
15505 * config.in: Regenerate.
15506
155072002-07-09 David O'Brien <obrien@FreeBSD.org>
15508
15509 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15510 (perror_with_name, remote_close, remote_open, expect, play): Static.
15511
155122002-07-04 Michal Ludvig <mludvig@suse.cz>
15513
4b8dad4a 15514 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
15515 byte offsets instead of an array of indexes.
15516 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15517
155182002-06-13 Daniel Jacobowitz <drow@mvista.com>
15519
15520 * regcache.c: Add comment.
15521
155222002-06-11 Daniel Jacobowitz <drow@mvista.com>
15523
15524 * thread-db.c: New file.
15525 * proc-service.c: New file.
15526 * acinclude.m4: New file.
15527 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15528 proc-service.o, and thread-db.o.
15529 (linux-low.o): Add USE_THREAD_DB.
15530 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15531 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15532 * aclocal.m4: Regenerated.
15533 * config.in: Regenerated.
15534 * configure: Regenerated.
15535 * configure.in: Check for proc_service.h, sys/procfs.h,
15536 thread_db.h, and linux/elf.h headrs.
15537 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15538 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15539 Check for -lthread_db and thread support.
15540 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15541 PowerPC, and SuperH.
15542 * i387-fp.c: Constify arguments.
15543 * i387-fp.h: Likewise.
15544 * inferiors.c: (struct thread_info): Renamed from
15545 `struct inferior_info'. Remove PID member. Use generic inferior
15546 list header. All uses updated.
15547 (inferiors, signal_pid): Removed.
15548 (all_threads): New variable.
15549 (get_thread): Define.
15550 (add_inferior_to_list): New function.
15551 (for_each_inferior): New function.
15552 (change_inferior_id): New function.
15553 (add_inferior): Removed.
15554 (remove_inferior): New function.
15555 (add_thread): New function.
15556 (free_one_thread): New function.
15557 (remove_thread): New function.
15558 (clear_inferiors): Use for_each_inferior and free_one_thread.
15559 (find_inferior): New function.
15560 (find_inferior_id): New function.
15561 (inferior_target_data): Update argument type.
15562 (set_inferior_target_data): Likewise.
15563 (inferior_regcache_data): Likewise.
15564 (set_inferior_regcache_data): Likewise.
15565 * linux-low.c (linux_bp_reinsert): Remove.
15566 (all_processes, stopping_threads, using_thrads)
15567 (struct pending_signals, debug_threads, pid_of): New.
15568 (inferior_pid): Replace with macro.
15569 (struct inferior_linux_data): Remove.
15570 (get_stop_pc, add_process): New functions.
15571 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15572 Use add_process and add_thread.
15573 (linux_attach_lwp): New function, based on old linux_attach. Use
15574 add_process and add_thread. Set stop_expected for new threads.
15575 (linux_attach): New function.
15576 (linux_kill_one_process): New function.
15577 (linux_kill): Kill all LWPs.
15578 (linux_thread_alive): Use find_inferior_id.
15579 (check_removed_breakpoints, status_pending_p): New functions.
15580 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15581 Update. Use WNOHANG. Wait for cloned processes also. Update process
15582 struct for the found process.
15583 (linux_wait_for_event): New function.
15584 (linux_wait): Use it. Support LWPs.
15585 (send_sigstop, wait_for_sigstop, stop_all_processes)
15586 (linux_resume_one_process, linux_continue_one_process): New functions.
15587 (linux_resume): Support LWPs.
15588 (REGISTER_RAW_SIZE): Remove.
15589 (fetch_register): Use register_size instead. Call supply_register.
15590 (usr_store_inferior_registers): Likewise. Call collect_register.
15591 Fix recursive case.
15592 (regsets_fetch_inferior_registers): Improve error message.
15593 (regsets_store_inferior_registers): Add debugging.
15594 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15595 (unstopped_p, linux_signal_pid): New functions.
15596 (linux_target_ops): Add linux_signal_pid.
15597 (linux_init_signals): New function.
15598 (initialize_low): Call it. Initialize using_threads.
15599 * regcache.c (inferior_regcache_data): Add valid
15600 flag.
15601 (get_regcache): Fetch registers lazily. Add fetch argument
15602 and update all callers.
15603 (regcache_invalidate_one, regcache_invalidate): New
15604 functions.
15605 (new_register_cache): Renamed from create_register_cache.
15606 Return the new regcache.
15607 (free_register_cache): Change argument to a void *.
15608 (registers_to_string, registers_from_string): Call get_regcache
15609 with fetch flag set.
15610 (register_data): Make static. Pass fetch flag to get_regcache.
15611 (supply_register): Call get_regcache with fetch flag clear.
15612 (collect_register): Call get_regcache with fetch flag set.
15613 (collect_register_as_string): New function.
15614 * regcache.h: Update.
15615 * remote-utils.c (putpkt): Flush after debug output and use
15616 stderr.
15617 Handle input interrupts while waiting for an ACK.
15618 (input_interrupt): Use signal_pid method.
15619 (getpkt): Flush after debug output and use stderr.
15620 (outreg): Use collect_register_as_string.
15621 (new_thread_notify, dead_thread_notify): New functions.
15622 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15623 and general_thread.
15624 (look_up_one_symbol): Flush after debug output.
15625 * server.c (step_thread, server_waiting): New variables.
15626 (start_inferior): Don't use signal_pid. Update call to mywait.
15627 (attach_inferior): Update call to mywait.
15628 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15629 (main): Don't fetch/store registers explicitly. Use
15630 set_desired_inferior. Support proposed ``Hs'' packet. Update
15631 calls to mywait.
15632 * server.h: Update.
15633 (struct inferior_list, struct_inferior_list_entry): New.
15634 * target.c (set_desired_inferior): New.
15635 (write_inferior_memory): Constify.
15636 (mywait): New function.
15637 * target.h: Update.
15638 (struct target_ops): New signal_pid method.
15639 (mywait): Removed macro, added prototype.
15640
15641 * linux-low.h (regset_func): Removed.
15642 (regset_fill_func, regset_store_func): New.
15643 (enum regset_type): New.
15644 (struct regset_info): Add type field. Use new operation types.
15645 (struct linux_target_ops): stop_pc renamed to get_pc.
15646 Add decr_pc_after_break and breakpoint_at.
15647 (get_process, get_thread_proess, get_process_thread)
15648 (strut process_info, all_processes, linux_attach_lwp)
15649 (thread_db_init): New.
15650
15651 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15652 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15653 (the_low_target): Add new members.
15654 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15655 (i386_store_fpxregset): Constify.
15656 (target_regsets): Add new kind identifier.
15657 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15658 (i386_set_pc): Add debugging.
15659 (i386_breakpoint_at): New function.
15660 (the_low_target): Add new members.
15661 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15662 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15663 (mips_breakpoint_at): New.
15664 (the_low_target): Add new members.
15665 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15666 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15667 (the_low_target): Add new members.
15668 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15669 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15670 (the_low_target): Add new members.
15671 * linux-x86-64-low.c (target_regsets): Add new kind
15672 identifier.
15673
156742002-05-15 Daniel Jacobowitz <drow@mvista.com>
15675
15676 From Martin Pool <mbp@samba.org>:
15677 * server.c (gdbserver_usage): New function.
15678 (main): Call it.
15679
156802002-05-14 Daniel Jacobowitz <drow@mvista.com>
15681
15682 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15683 stop_at -> stop_pc.
15684
156852002-05-04 Andrew Cagney <ac131313@redhat.com>
15686
15687 * Makefile.in: Remove obsolete code.
15688
156892002-04-24 Michal Ludvig <mludvig@suse.cz>
15690
15691 * linux-low.c (regsets_fetch_inferior_registers),
15692 (regsets_store_inferior_registers): Removed cast to int from
15693 ptrace() calls.
15694 * regcache.h: Added declaration of struct inferior_info.
15695
156962002-04-20 Daniel Jacobowitz <drow@mvista.com>
15697
15698 * inferiors.c (struct inferior_info): Add regcache_data.
15699 (add_inferior): Call create_register_cache.
15700 (clear_inferiors): Call free_register_cache.
15701 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15702 * regcache.c (struct inferior_regcache_data): New.
15703 (registers): Remove.
15704 (get_regcache): New function.
15705 (create_register_cache, free_register_cache): New functions.
15706 (set_register_cache): Don't initialize the register cache here.
15707 (registers_to_string, registers_from_string, register_data): Call
15708 get_regcache.
15709 * regcache.h: Add prototypes.
15710 * server.h: Likewise.
15711
157122002-04-20 Daniel Jacobowitz <drow@mvista.com>
15713
15714 * mem-break.c: New file.
15715 * mem-break.h: New file.
15716 * Makefile.in: Add mem-break.o rule; update server.h
15717 dependencies.
15718 * inferiors.c (struct inferior_info): Add target_data
15719 member.
15720 (clear_inferiors): Free target_data member if set.
15721 (inferior_target_data, set_inferior_target_data): New functions.
15722 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15723 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15724 * linux-low.c (linux_bp_reinsert): New variable.
15725 (struct inferior_linux_data): New.
15726 (linux_create_inferior): Use set_inferior_target_data.
15727 (linux_attach): Likewise. Call add_inferior.
15728 (linux_wait_for_one_inferior): New function.
15729 (linux_wait): Call it.
15730 (linux_write_memory): Add const.
15731 (initialize_low): Call set_breakpoint_data.
15732 * linux-low.h (struct linux_target_ops): Add breakpoint
15733 handling members.
15734 * server.c (attach_inferior): Remove extra add_inferior
15735 call.
15736 * server.h: Include mem-break.h. Update inferior.c
15737 prototypes.
15738 * target.c (read_inferior_memory)
15739 (write_inferior_memory): New functions.
15740 * target.h (read_inferior_memory)
15741 (write_inferior_memory): Change macros to prototypes.
15742 (struct target_ops): Update comments. Add const to write_memory
15743 definition.
15744
157452002-04-11 Daniel Jacobowitz <drow@mvista.com>
15746
15747 * linux-low.c (usr_store_inferior_registers): Support
15748 registers which are allowed to fail to store.
15749 * linux-low.h (linux_target_ops): Likewise.
15750 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15751 (ppc_cannot_store_register): FPSCR may not be storable.
15752
157532002-04-09 Daniel Jacobowitz <drow@mvista.com>
15754
15755 * server.h: Include <string.h> if HAVE_STRING_H.
15756 * ChangeLog: Correct paths in last ChangeLog entry.
15757
157582002-04-09 Daniel Jacobowitz <drow@mvista.com>
15759
15760 * linux-low.h: Remove obsolete prototypes.
15761 (struct linux_target_ops): New.
15762 (extern the_low_target): New.
15763 * linux-low.c (num_regs, regmap): Remove declarations.
15764 (register_addr): Use the_low_target explicitly.
15765 (fetch_register): Likewise.
15766 (usr_fetch_inferior_registers): Likewise.
15767 (usr_store_inferior_registers): Likewise.
15768 * linux-arm-low.c (num_regs): Remove.
15769 (arm_num_regs): Define.
15770 (arm_regmap): Renamed from regmap, made static.
15771 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15772 made static.
15773 (arm_cannot_store_register): Renamed from cannot_store_register,
15774 made static.
15775 (the_low_target): New.
15776 * linux-i386-low.c (num_regs): Remove.
15777 (i386_num_regs): Define.
15778 (i386_regmap): Renamed from regmap, made static.
15779 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15780 made static.
15781 (i386_cannot_store_register): Renamed from cannot_store_register,
15782 made static.
15783 (the_low_target): New.
15784 * linux-ia64-low.c (num_regs): Remove.
15785 (ia64_num_regs): Define.
15786 (ia64_regmap): Renamed from regmap, made static.
15787 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15788 made static.
15789 (ia64_cannot_store_register): Renamed from cannot_store_register,
15790 made static.
15791 (the_low_target): New.
15792 * linux-m68k-low.c (num_regs): Remove.
15793 (m68k_num_regs): Define.
15794 (m68k_regmap): Renamed from regmap, made static.
15795 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15796 made static.
15797 (m68k_cannot_store_register): Renamed from cannot_store_register,
15798 made static.
15799 (the_low_target): New.
15800 * linux-mips-low.c (num_regs): Remove.
15801 (mips_num_regs): Define.
15802 (mips_regmap): Renamed from regmap, made static.
15803 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15804 made static.
15805 (mips_cannot_store_register): Renamed from cannot_store_register,
15806 made static.
15807 (the_low_target): New.
15808 * linux-ppc-low.c (num_regs): Remove.
15809 (ppc_num_regs): Define.
15810 (ppc_regmap): Renamed from regmap, made static.
15811 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15812 made static.
15813 (ppc_cannot_store_register): Renamed from cannot_store_register,
15814 made static.
15815 (the_low_target): New.
15816 * linux-s390-low.c (num_regs): Remove.
15817 (s390_num_regs): Define.
15818 (s390_regmap): Renamed from regmap, made static.
15819 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15820 made static.
15821 (s390_cannot_store_register): Renamed from cannot_store_register,
15822 made static.
15823 (the_low_target): New.
15824 * linux-sh-low.c (num_regs): Remove.
15825 (sh_num_regs): Define.
15826 (sh_regmap): Renamed from regmap, made static.
15827 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15828 made static.
15829 (sh_cannot_store_register): Renamed from cannot_store_register,
15830 made static.
15831 (the_low_target): New.
15832 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15833 (the_low_target): New.
15834
158352002-04-09 Daniel Jacobowitz <drow@mvista.com>
15836
15837 * Makefile.in: Add stamp-h target.
15838 * configure.in: Create stamp-h.
15839 * configure: Regenerated.
15840
158412002-04-09 Daniel Jacobowitz <drow@mvista.com>
15842
15843 * inferiors.c: New file.
15844 * target.c: New file.
15845 * target.h: New file.
15846 * Makefile.in: Add target.o and inferiors.o. Update
15847 dependencies.
15848 * linux-low.c (inferior_pid): New static variable,
15849 moved from server.c.
15850 (linux_create_inferior): Renamed from create_inferior.
15851 Call add_inferior. Return 0 on success instead of a PID.
15852 (linux_attach): Renamed from myattach.
15853 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15854 (linux_thread_alive): Renamed from mythread_alive.
15855 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15856 child dies.
15857 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15858 (regsets_store_inferior_registers): Correct error message.
15859 Add missing ``return 0''.
15860 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15861 (linux_store_registers): Renamed from store_inferior_registers.
15862 (linux_read_memory): Renamed from read_inferior_memory.
15863 (linux_write_memory): Renamed from write_inferior_memory.
15864 (linux_target_ops): New structure.
15865 (initialize_low): Call set_target_ops ().
15866 * remote-utils.c (unhexify): New function.
15867 (hexify): New function.
15868 (input_interrupt): Send signals to ``signal_pid''.
15869 * server.c (inferior_pid): Remove.
15870 (start_inferior): Update create_inferior call.
15871 (attach_inferior): Call add_inferior.
15872 (handle_query): New function.
15873 (main): Call handle_query for `q' packets.
15874 * server.h: Include "target.h". Remove obsolete prototypes.
15875 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15876
158772002-04-09 Daniel Jacobowitz <drow@mvista.com>
15878
15879 * Makefile.in: Add WARN_CFLAGS. Update configury
15880 dependencies.
15881 * configure.in: Check for <string.h>
15882 * configure: Regenerate.
15883 * config.in: Regenerate.
15884 * gdbreplay.c: Include needed system headers.
15885 (remote_open): Remove strchr prototype.
15886 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15887 * regcache.c (supply_register): Change buf argument to const void *.
15888 (supply_register_by_name): Likewise.
15889 (collect_register): Change buf argument to void *.
15890 (collect_register_by_name): Likewise.
15891 * regcache.h: Add missing prototypes.
15892 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15893 * server.c (handle_query): New function.
15894 (attached): New static variable, moved out of main.
15895 (main): Quiet longjmp clobber warnings.
15896 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15897 * utils.c (error): Remove NORETURN.
15898 (fatal): Likewise.