Remove usage of find_inferior in unsuspend_all_lwps
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
139720c5
SM
12017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2
3 * linux-low.c (unsuspend_one_lwp): Remove.
4 (unsuspend_all_lwps): Use for_each_thread, inline code from
5 unsuspend_one_lwp.
6
6d1e5673
SM
72017-11-19 Simon Marchi <simon.marchi@ericsson.com>
8
9 * gdbthread.h (find_thread): Add overload with ptid_t filter.
10 * linux-low.c (struct iterate_over_lwps_args): Remove.
11 (iterate_over_lwps_filter): Remove.
12 (iterate_over_lwps): Use find_thread.
13
bbf550d5
SM
142017-11-19 Simon Marchi <simon.marchi@ericsson.com>
15
16 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
17 (linux_handle_new_gdb_connection): Use for_each_thread, inline
18 code from reset_lwp_ptrace_options_callback.
19
00192f77
SM
202017-11-19 Simon Marchi <simon.marchi@ericsson.com>
21
22 * linux-arm-low.c (struct update_registers_data): Remove.
23 (update_registers_callback): Return void, take arguments
24 directly, don't check thread's pid.
25 (arm_insert_point, arm_remove_point): Use for_each_thread.
26
2bee2b6c
SM
272017-11-19 Simon Marchi <simon.marchi@ericsson.com>
28
29 * win32-low.c (continue_one_thread): Return void, take argument
30 directly.
31 (child_continue): Use for_each_thread.
32
0b360f19
SM
332017-11-19 Simon Marchi <simon.marchi@ericsson.com>
34
35 * win32-i386-low.c (update_debug_registers_callback): Rename
36 to ...
37 (update_debug_registers): ... this, return void, remove pid_p arg.
38 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
39
f27866ba
SM
402017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
41
42 * inferiors.h (struct process_info): Add constructor, initialize
43 fields..
44 <syscalls_to_catch>: Change type to std::vector<int>.
45 * inferiors.c (add_process): Allocate process_info with new.
46 (remove_process): Free process_info with delete.
47 * linux-low.c (handle_extended_wait): Adjust.
48 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
49 * server.c (handle_general_set): Adjust.
50
e849ea89
PA
512017-11-16 Pedro Alves <palves@redhat.com>
52
53 * remote-utils.c (remote_close): Block SIGIO signals instead of
54 uninstalling the SIGIO handler.
55
1d0aa65c
AH
562017-11-16 Alan Hayward <alan.hayward@arm.com>
57
58 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
59
3491a34c
YQ
602017-11-16 Yao Qi <yao.qi@linaro.org>
61
62 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
63 (tic6x_store_gregset): Likewise.
64 (tic6x_usrregs_info): Move it up.
65
a602f924
AH
662017-11-15 Alan Hayward <alan.hayward@arm.com>
67
68 * Makefile.in: Update arch rules.
69 * configure.srv: Explicitly mark arch/ files.
70
5616b6c3
AS
712017-11-13 Andreas Schwab <schwab@suse.de>
72
73 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
74 function.
75 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
76
d1928160
PA
772017-11-06 Pedro Alves <palves@redhat.com>
78
79 * config.in, configure: Regenerate.
80
bac608e7
SM
812017-10-27 Simon Marchi <simon.marchi@ericsson.com>
82
83 * target.c (struct thread_search): Remove.
84 (thread_search_callback): Remove.
85 (prepare_to_access_memory): Use for_each_thread instead of
86 find_inferior. Inline code from thread_search_callback.
87
eaddb425
SM
882017-10-27 Simon Marchi <simon.marchi@ericsson.com>
89
90 * server.c (struct visit_actioned_threads_data): Remove.
91 (visit_actioned_threads): Change prototype to take arguments
92 directly.
93 (resume): Use find_thread instead of find_inferior.
94
99078d34
SM
952017-10-27 Simon Marchi <simon.marchi@ericsson.com>
96
97 * server.c (queue_stop_reply_callback): Change prototype, return
98 void.
99 (find_status_pending_thread_callback): Remove.
100 (handle_status): Replace find_inferior with find_thread and
101 for_each_thread.
102
cc628f3d
AH
1032017-10-25 Alan Hayward <alan.hayward@arm.com>
104
105 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
106 with REGNO.
107 (aarch64_store_gregset): Likewise.
108 (aarch64_fill_fpregset): Likewise.
109 (aarch64_store_fpregset): Likewise.
110
4d3bb80e
SM
1112017-10-21 Simon Marchi <simon.marchi@ericsson.com>
112
113 * gdbthread.h (find_thread, for_each_thread): New functions.
114 * inferiors.c (thread_of_pid): Remove.
115 (find_any_thread_of_pid): Use find_thread.
116 * linux-low.c (num_lwps): Use for_each_thread.
117
7a7cdfa0
YQ
1182017-10-17 Yao Qi <yao.qi@linaro.org>
119
120 * Makefile.in: Remove one rule.
121 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
122
e675d170
YQ
1232017-10-17 Yao Qi <yao.qi@linaro.org>
124
125 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
126 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
127
7eb4e0f9
YQ
1282017-10-17 Yao Qi <yao.qi@linaro.org>
129
130 * configure.srv: Rename arm.o with arch/arm.o.
131
60d6cfc9
YQ
1322017-10-17 Yao Qi <yao.qi@linaro.org>
133
134 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
135 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
136 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
137 (arch-i386.o, arch-amd64.o): Remove rules.
138 (arch/%.o): New rule.
139 Update POSTCOMPILE and COMPILE.pre.
140 * configure.ac: Invoke AC_CONFIG_COMMANDS.
141 * configure: Re-generated.
142 * configure.srv: Replace arch-i386.o with arch/i386.o.
143 Replace arch-amd64.o with arch/amd64.o.
144
5bfda255
YQ
1452017-10-16 Yao Qi <yao.qi@linaro.org>
146
147 * configure: Regenerated.
148
9c80ecd6
SM
1492017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
150
151 * inferiors.h: (struct inferior_list): Remove.
152 (struct inferior_list_entry); Remove.
153 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
154 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
155 get_first_inferior): Remove.
156 (for_each_inferior, for_each_inferior_with_data, find_inferior,
157 find_inferior_id, find_inferior_in_random): Change signature.
158 * inferiors.c (all_threads): Change type to
159 std::list<thread_info *>.
160 (get_thread): Remove macro.
161 (find_inferior, find_inferior_id): Change signature, implement
162 using find_thread.
163 (find_inferior_in_random): Change signature, implement using
164 find_thread_in_random.
165 (for_each_inferior, for_each_inferior_with_data): Change
166 signature, implement using for_each_thread.
167 (add_inferior_to_list, remove_inferior): Remove.
168 (add_thread, get_first_thread, thread_of_pid,
169 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
170 (get_first_inferior, one_inferior_p, clear_inferior_list):
171 Remove.
172 (clear_inferiors, get_thread_process): Update.
173 * gdbthread.h: Include <list>.
174 (struct thread_info) <entry>: Remove field.
175 <id>: New field.
176 (all_threads): Change type to std::list<thread_info *>.
177 (get_first_inferior): Add doc.
178 (find_thread, for_each_thread, find_thread_in_random): New
179 functions.
180 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
181 * linux-arm-low.c (update_registers_callback): Update.
182 * linux-low.c (second_thread_of_pid_p): Update.
183 (kill_one_lwp_callback, linux_detach_lwp_callback,
184 delete_lwp_callback, status_pending_p_callback, same_lwp,
185 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
186 iterate_over_lwps, not_stopped_callback,
187 resume_stopped_resumed_lwps, count_events_callback,
188 select_singlestep_lwp_callback, select_event_lwp_callback,
189 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
190 suspend_and_send_sigstop_callback, wait_for_sigstop,
191 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
192 lwp_running, linux_set_resume_request, resume_status_pending_p,
193 need_step_over_p, start_step_over, linux_resume_one_thread,
194 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
195 reset_lwp_ptrace_options_callback): Update.
196 * linux-mips-low.c (update_watch_registers_callback): Update.
197 * regcache.c (regcache_invalidate_one, regcache_invalidate):
198 Update.
199 (free_register_cache_thread_one): Remove.
200 (regcache_release): Update.
201 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
202 handle_qxfer_threads_worker): Update.
203 (handle_query): Update, use list iterator.
204 (visit_actioned_threads, handle_pending_status,
205 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
206 clear_pending_status_callback, set_pending_status_callback,
207 find_status_pending_thread_callback, handle_status,
208 process_serial_event): Update.
209 * target.c (thread_search_callback): Update.
210 * thread-db.c (thread_db_get_tls_address): Update.
211 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
212 Update.
213 * win32-i386-low.c (update_debug_registers_callback): Update.
214 * win32-low.c (delete_thread_info, child_delete_thread,
215 continue_one_thread, suspend_one_thread,
216 get_child_debug_event): Adjust.
217
9179355e
SM
2182017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
219
220 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
221 * inferiors.h: Include <list>.
222 (struct process_info) <entry>: Remove field.
223 <pid>: New field.
224 (pid_of): Change macro to function.
225 (ptid_of, lwpid_of): Remove macro.
226 (all_processes): Change type to std::list<process_info *>.
227 (ALL_PROCESSES): Remove macro.
228 (for_each_process, find_process): New function.
229 * inferiors.c (all_processes): Change type to
230 std::list<process_info *>.
231 (find_thread_process): Adjust.
232 (add_process): Likewise.
233 (remove_process): Likewise.
234 (find_process_pid): Likewise.
235 (get_first_process): Likewise.
236 (started_inferior_callback): Remove.
237 (have_started_inferiors_p): Adjust.
238 (attached_inferior_callback): Remove.
239 (have_attached_inferiors_p): Adjust.
240 * linux-low.c (check_zombie_leaders): Likewise.
241 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
242 (x86_linux_update_xmltarget): Adjust.
243 * server.c (handle_query): Likewise.
244 (gdb_reattached_process): Remove.
245 (handle_status): Adjust.
246 (kill_inferior_callback): Likewise.
247 (detach_or_kill_inferior): Remove.
248 (print_started_pid): Likewise.
249 (print_attached_pid): Likewise.
250 (detach_or_kill_for_exit): Update.
251 (process_serial_event): Likewise.
252 * linux-arm-low.c (arm_new_fork): Likewise.
253
c9cb8905
SM
2542017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
255
256 * dll.h: Include <list>.
257 (struct dll_info): Add constructor.
258 <entry>: Remove field.
259 (all_dlls): Change type to std::list<dll_info>.
260 * dll.c: Include <algorithm>.
261 (get_dll): Remove macro.
262 (all_dlls): Change type to std::list<dll_info *>.
263 (free_one_dll): Remove.
264 (match_dll): Likewise.
265 (loaded_dll): Adjust.
266 (unloaded_dll): Adjust to all_dlls type change, use
267 std::find_if. Inline code from match_dll.
268 (clear_dlls): Adjust to all_dlls type change.
269 * server.c (emit_dll_description): Remove.
270 (handle_qxfer_libraries): Adjust to all_dlls type change,
271 integrate emit_dll_description's functionality.
272
04ec7890
SM
2732017-10-12 Simon Marchi <simon.marchi@ericsson.com>
274
275 * linux-low.h (struct linux_target_ops) <delete_process>: New
276 field.
277 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
278 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
279 (struct linux_target_ops): Add delete_process callback.
280 * linux-arm-low.c (arm_delete_process): New.
281 (struct linux_target_ops): Add delete_process callback.
282 * linux-bfin-low.c (struct linux_target_ops): Likewise.
283 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
284 * linux-m32r-low.c (struct linux_target_ops): Likewise.
285 * linux-mips-low.c (mips_linux_delete_process): New.
286 (struct linux_target_ops): Add delete_process callback.
287 * linux-ppc-low.c (struct linux_target_ops): Likewise.
288 * linux-s390-low.c (struct linux_target_ops): Likewise.
289 * linux-sh-low.c (struct linux_target_ops): Likewise.
290 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
291 * linux-tile-low.c (struct linux_target_ops): Likewise.
292 * linux-x86-low.c (x86_linux_delete_process): New.
293 (struct linux_target_ops): Add delete_process callback.
294 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
295
466eecee
SM
2962017-10-12 Simon Marchi <simon.marchi@ericsson.com>
297
298 * linux-aarch64-low.c (the_low_target): Add thread delete
299 callback.
300 * linux-arm-low.c (arm_delete_thread): New function.
301 (the_low_target): Add thread delete callback.
302 * linux-bfin-low.c (the_low_target): Likewise.
303 * linux-crisv32-low.c (the_low_target): Likewise.
304 * linux-low.c (delete_lwp): Invoke delete_thread callback if
305 set.
306 * linux-low.h (struct linux_target_ops) <delete_thread>: New
307 field.
308 * linux-m32r-low.c (the_low_target): Add thread delete callback.
309 * linux-mips-low.c (mips_linux_delete_thread): New function.
310 (the_low_target): Add thread delete callback.
311 * linux-ppc-low.c (the_low_target): Likewise.
312 * linux-s390-low.c (the_low_target): Likewise.
313 * linux-sh-low.c (the_low_target): Likewise.
314 * linux-tic6x-low.c (the_low_target): Likewise.
315 * linux-tile-low.c (the_low_target): Likewise.
316 * linux-x86-low.c (the_low_target): Likewise.
317 * linux-xtensa-low.c (the_low_target): Likewise.
318
b79f7801
YZ
3192017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
320
321 * win32-low.c: Include "common-inferior.h".
322
bc3b087d
SDJ
3232017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
324
325 * inferiors.c (set_inferior_cwd): New function.
326 * server.c (handle_general_set): Handle QSetWorkingDir packet.
327 (handle_query): Inform that QSetWorkingDir is supported.
328 * win32-low.c (create_process): Pass the inferior's cwd to
329 CreateProcess.
330
d092c5a2
SDJ
3312017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
332
333 * inferiors.c (current_inferior_cwd): New global variable.
334 (get_inferior_cwd): New function.
335 * inferiors.h (struct process_info) <cwd>: New field.
336
7da0a886
SDJ
3372017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
338
339 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
340 (OBS): Add gdb_tilde_expand.o.
341
289a6840
SM
3422017-10-02 Simon Marchi <simon.marchi@ericsson.com>
343
344 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
345 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
346
256642e8
PA
3472017-09-29 Pedro Alves <palves@redhat.com>
348
349 * ax.c (gdb_parse_agent_expr): Constify.
350 * ax.h (gdb_parse_agent_expr): Constify.
351 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
352 Constify.
353 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
354 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
355 * remote-utils.h (read_ptid): Constify.
356 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
357 (process_point_options, process_serial_event): Constify.
358 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
359 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
360 (cmd_qtbuffer): Constify.
361
5b9ca4d4
PA
3622017-09-29 Pedro Alves <palves@redhat.com>
363
364 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
365 fails.
366
94c207e0
PA
3672017-09-29 Pedro Alves <palves@redhat.com>
368
369 * linux-low.c (handle_extended_wait): Pass parent thread instead
370 of process to thread_db_notice_clone.
371 * linux-low.h (thread_db_notice_clone): Replace parent process
372 parameter with parent thread parameter.
373 * thread-db.c (find_one_thread): Add comment.
374 (thread_db_notice_clone): Replace parent process parameter with
375 parent thread parameter. Temporarily switch to the parent thread.
376
75352e28
SDJ
3772017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
378
379 * gdbthread.h: Include "common-gdbthread.h".
380 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
381 "if" when validating the ptid.
382 * remote-utils.c: Include "gdbthread.h".
383 (prepare_resume_reply): Use "switch_to_thread".
384 * target.c (done_accessing_memory): Likewise.
385
ad339634
AA
3862017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
387
388 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
389 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
390 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
391 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
392 s390x-gs-linux64-ipa.o to ipa_obj.
393 * linux-s390-low.c (HWCAP_S390_GS): New define.
394 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
395 New functions.
396 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
397 (s390_arch_setup): Check for guarded-storage support and choose
398 appropriate tdesc.
399 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
400 init_registers_s390x_gs_linux64.
401 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
402 enum value.
403 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
404 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
405
cc4d742f
SM
4062017-09-22 Simon Marchi <simon.marchi@ericsson.com>
407
408 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
409
f6327dcb
KB
4102017-09-21 Kevin Buettner <kevinb@redhat.com>
411
412 * linux-low.h (struct lwp_info): Add new field, thread_handle.
413 (thread_db_thread_handle): Declare.
414 * linux-low.c (linux_target_ops): Initialize thread_handle.
415 * server.c (handle_qxfer_threads_worker): Add support for
416 "handle" attribute.
417 * target.h (struct target_ops): Add new function pointer,
418 thread_handle.
419 (target_thread_handle): Define.
420 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
421 field in lwp.
422 (thread_db_thread_handle): New function.
423
86299109
KB
4242017-09-21 Kevin Buettner <kevinb@redhat.com>
425
426 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
427 * linux-low.h (thread_db_notice_clone): Declare.
428 * thread-db.c (thread_db_notice_clone): New function.
429
f557a88a
PA
4302017-09-21 Pedro Alves <palves@redhat.com>
431
432 * server.c (gdb_read_memory, handle_status, process_serial_event)
433 (handle_serial_event, handle_target_event): Adjust to
434 set_desired_thread prototype change.
435 * target.c (set_desired_thread): Remove 'use_general' parameter
436 and adjust.
437 * target.h (set_desired_thread): Remove 'use_general' parameter.
438
223ffa71
TT
4392017-09-20 Tom Tromey <tom@tromey.com>
440
441 * target.c (target_terminal::terminal_state): Define.
442 (target_terminal::init): Rename from target_terminal_init.
443 (target_terminal::inferior): Rename from
444 target_terminal_inferior.
445 (target_terminal::ours): Rename from target_terminal_ours.
446 (target_terminal::ours_for_output, target_terminal::info): New.
447
04fd3ba9
SM
4482017-09-16 Simon Marchi <simon.marchi@ericsson.com>
449
450 * server.c (accumulate_file_name_length): Remove.
451 (emit_dll_description): Adjust to std::string change.
452 (handle_qxfer_libraries): Use std::string to hold document.
453
5e187554
SM
4542017-09-16 Simon Marchi <simon.marchi@ericsson.com>
455
456 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
457 return type of xml_escape_text.
458 * server.c (emit_dll_description): Likewise.
459
1526853e
SM
4602017-09-16 Simon Marchi <simon.marchi@ericsson.com>
461
462 * server.c (captured_main): Accept argument for --selftest.
463 Update run_tests call.
464 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
465 when registering selftests.
466
c4dfafab
SDJ
4672017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
468
469 * regcache.c (get_thread_regcache): Update code to use "std::vector"
470 instead of "VEC" for "target_desc.reg_defs".
471 (regcache_cpy): Likewise.
472 (registers_to_string): Likewise.
473 (registers_from_string): Likewise.
474 (find_regno): Likewise.
475 (supply_regblock): Likewise.
476 (regcache_raw_read_unsigned): Likewise.
477 * tdesc.c (init_target_desc): Likewise.
478 (tdesc_create_reg): Likewise.
479 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
480 (struct target_desc) <reg_defs>: Convert to "std::vector".
481 (target_desc): Do not initialize "reg_defs".
482 (~target_desc): Update code to use "std::vector" instead of "VEC"
483 for "target_desc.reg_defs".
484 (operator==): Likewise.
485
124aceb4
SM
4862017-09-15 Simon Marchi <simon.marchi@ericsson.com>
487
488 * inferiors.h (thread_to_gdb_id): Remove.
489 * inferiors.c (thread_to_gdb_id): Remove.
490 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
491 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
492 lynx_store_registers, lynx_read_memory, lynx_write_memory):
493 Likewise.
494 * nto-low.c (nto_fetch_registers, nto_store_registers,
495 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
496
96cde54f
SM
4972017-09-15 Simon Marchi <simon.marchi@ericsson.com>
498
499 * inferiors.h (gdb_id_to_thread_id): Remove.
500 * inferiors.c (gdb_id_to_thread_id): Remove.
501 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
502 removal. Move pid declaration closer to where it's used.
503
e8ca139e
SM
5042017-09-15 Simon Marchi <simon.marchi@ericsson.com>
505
506 * server.c (handle_detach): New function.
507 (process_serial_event): Move code out, call handle_detach.
508
f8a4e119
SM
5092017-09-15 Simon Marchi <simon.marchi@ericsson.com>
510
511 * server.c (require_running): Rename to ...
512 (require_running_or_return): ... this ...
513 (require_running_or_break): ... and this.
514 (handle_query, process_serial_event): Adjust.
515
0eb0a407
SM
5162017-09-15 Simon Marchi <simon.marchi@ericsson.com>
517
518 * linux-low.c (linux_set_resume_request): Remove unused
519 variables.
520
785922a5
SM
5212017-09-15 Simon Marchi <simon.marchi@ericsson.com>
522
523 * server.c (first_thread_of): Remove.
524 (process_serial_event): Replace usage of first_thread_of with
525 find_any_thread_of_pid.
526 * tracepoint.c (same_process_p): Remove.
527 (gdb_agent_about_to_close): Replace usage of same_process_p with
528 find_any_thread_of_pid.
529 * linux-x86-low.c (same_process_callback): Remove.
530 (x86_arch_setup_process_callback): Replace usage of
531 same_process_callback with find_any_thread_of_pid.
532 * thread-db.c (any_thread_of): Remove.
533 (switch_to_process): Replace usage of any_thread_of with
534 find_any_thread_of_pid.
535 * inferiors.c (thread_pid_matches_callback): Remove.
536 (find_thread_process): Adjust to use find_any_thread_of_pid.
537
a059f00c
SDJ
5382017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
539
540 * regcache.c (get_thread_regcache): Guard calls to "memset"
541 with "!VEC_empty".
542
cc397f3a
SDJ
5432017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
544
545 * linux-low.c (handle_extended_wait): Use
546 "allocate_target_description" instead of "XNEW".
547 * linux-x86-low.c (initialize_low_arch): Likewise.
548
22916b07
YQ
5492017-09-05 Yao Qi <yao.qi@linaro.org>
550
551 * configure.srv (srv_i386_regobj): Remove.
552 (srv_amd64_regobj): Remove.
553 (srv_regobj): Set it to "" for x86 non-linux targets.
554 * linux-x86-tdesc.c (i386_linux_read_description):
555 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
556 (init_registers_i386): Remove the declaration.
557 (tdesc_i386): Remove the declaration.
558 (lynx_i386_arch_setup): Call i386_create_target_description.
559 * nto-x86-low.c: Likewise.
560 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
561 [!__x86_64__]: include arch/i386.h.
562 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
563
38602d55
YQ
5642017-09-05 Yao Qi <yao.qi@linaro.org>
565
566 * configure.srv (srv_amd64_linux_xmlfiles): Remove
567 i386/amd64-XXX-linux from it.
568
44b886ff
YQ
5692017-09-05 Yao Qi <yao.qi@linaro.org>
570
571 * configure.srv: Empty srv_amd64_linux_regobj if $development is
572 false.
573 (ipa_amd64_linux_regobj): Remove.
574 (ipa_x32_linux_regobj): Remove.
575
b4570e4b
YQ
5762017-09-05 Yao Qi <yao.qi@linaro.org>
577
578 * Makefile.in (arch-amd64.o): New rule.
579 * configure.srv: Append arch-amd64.o.
580 * linux-amd64-ipa.c: Include common/x86-xstate.h.
581 (get_ipa_tdesc): Call amd64_linux_read_description.
582 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
583 and init_registers_amd64_XXX.
584 * linux-x86-low.c (x86_linux_read_description): Call
585 amd64_linux_read_description.
586 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
587 (initialize_low_arch): Don't call init_registers_x32_XXX and
588 init_registers_amd64_XXX.
589 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
590 and tdesc_amd64_XXX.
591 [__x86_64__] (amd64_tdesc_test): New function.
592 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
593 and init_registers_amd64_XXX.
594 * linux-x86-tdesc.c: Include arch/amd64.h.
595 (xcr0_to_tdesc_idx): New function.
596 (i386_linux_read_description): New function.
597 (amd64_get_ipa_tdesc_idx): New function.
598 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
599 (amd64_get_ipa_tdesc): Declare.
600
d1f28ea2
YQ
6012017-09-05 Yao Qi <yao.qi@linaro.org>
602
603 * configure.srv (srv_i386_linux_xmlfiles): Remove
604 i386/i386-XXX-linux.xml from it.
605
25a93583
YQ
6062017-09-05 Yao Qi <yao.qi@linaro.org>
607
608 * configure.srv: Set srv_i386_linux_regobj empty if $development
609 is false.
610 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
611 initialize_low_tdesc.
612 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
613 with #if initialize_low_tdesc.
614 * linux-x86-tdesc-selftest.c: New file.
615 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
616
5f035c07
YQ
6172017-09-05 Yao Qi <yao.qi@linaro.org>
618
619 * Makefile.in (arch-i386.o): New rule.
620 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
621 (x86_64-*-linux*): Likewise.
622 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
623 include arch/i386.h.
624 (i386_linux_read_description): Remove code and call
625 i386_create_target_description.
626 * tdesc.c (allocate_target_description): New function.
627 * tdesc.h (set_tdesc_architecture): Remove declaration.
628 (set_tdesc_osabi): Likewise.
629
0abe8a89
YQ
6302017-09-05 Yao Qi <yao.qi@linaro.org>
631
632 * linux-x86-tdesc.c: Don't include <inttypes.h>.
633 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
634 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
635 .xmltarget.
636 * server.c (get_features_xml): Call tdesc_get_features_xml.
637 * tdesc.c (set_tdesc_architecture): New function.
638 (set_tdesc_osabi): New function.
639 (tdesc_get_features_xml): New function.
640 (tdesc_create_feature): Add an argument.
641 * tdesc.h (struct target_desc) <features>: New field.
642 <arch, osabi>: New field.
643 (~target_desc): xfree features, arch, and osabi.
644 (target_desc::oerator==): Don't compare .xmltarget.
645 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
646 (set_tdesc_osabi): Likewise.
647 (tdesc_get_features_xml): Likewise.
648
0a188386
YQ
6492017-09-05 Yao Qi <yao.qi@linaro.org>
650
651 * linux-x86-tdesc.c: Include selftest.h.
652 (i386_tdesc_test): New function.
653 (initialize_low_tdesc): Call selftests::register_test.
654 * tdesc.h: Include regdef.h.
655 (target_desc): Override operator == and !=.
656
f49ff000
YQ
6572017-09-05 Yao Qi <yao.qi@linaro.org>
658
659 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
660 (ipa_obj): Likewise.
661 * linux-i386-ipa.c: Include common/x86-xstate.h
662 (get_ipa_tdesc): Call i386_linux_read_description.
663 (initialize_low_tracepoint): Don't call init_registers_XXX
664 functions, call initialize_low_tdesc instead.
665 * linux-x86-low.c (x86_linux_read_description): Call
666 i386_linux_read_description.
667 (initialize_low_arch): Don't call init_registers_i386_XXX
668 functions, call initialize_low_tdesc.
669 * linux-x86-tdesc.c: New file.
670 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
671 (i386_get_ipa_tdesc_idx): Declare.
672 (i386_get_ipa_tdesc): Declare.
673 (initialize_low_tdesc): Declare.
674
2b68ef2f
YQ
6752017-09-05 Yao Qi <yao.qi@linaro.org>
676
677 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
678 instead of 0.
679
f7000548
YQ
6802017-09-05 Yao Qi <yao.qi@linaro.org>
681
682 * Makefile.in (IPA_OBJS): Add vec-ipa.o
683 * regcache.c (get_thread_regcache): Use VEC_length.
684 (init_register_cache): Likewise.
685 (regcache_cpy): Likewise.
686 (registers_to_string): Iterate reg_defs via VEC_iterate.
687 (find_regno): Likewise.
688 (find_register_by_number): Use VEC_index.
689 (register_size): Call find_register_by_number.
690 (register_data): Call find_register_by_number.
691 (supply_regblock): Use VEC_length.
692 (regcache_raw_read_unsigned): Likewise.
693 * tdesc.c (init_target_desc): Iterate reg_defs via
694 VEC_iterate.
695 (default_description): Update initializer.
696 (copy_target_description): Don't update field num_registers.
697 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
698 <num_registers>: Remove.
699
50a421ac
SM
7002017-09-04 Simon Marchi <simon.marchi@ericsson.com>
701
702 * Makefile.in (.SECONDARY): Define target.
703
23fdd69e
SM
7042017-09-03 Simon Marchi <simon.marchi@ericsson.com>
705
706 * linux-low.c (linux_wait_1): Adjust.
707 * server.c (queue_stop_reply_callback): Adjust.
708
0a2dde4a
SDJ
7092017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
710
711 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
712 QEnvironmentUnset and QEnvironmentReset packets.
713 (handle_query): Inform remote that QEnvironmentHexEncoded,
714 QEnvironmentUnset and QEnvironmentReset are supported.
715
6afd337d
SM
7162017-08-25 Simon Marchi <simon.marchi@ericsson.com>
717
718 * inferiors.h (inferior_target_data): Rename to ...
719 (thread_target_data): ... this.
720 (inferior_regcache_data): Rename to ...
721 (thread_regcache_data): ... this.
722 (set_inferior_regcache_data): Rename to ...
723 (set_thread_regcache_data): ... this.
724 * inferiors.c (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 (free_one_thread): Update.
731 * linux-low.h (get_thread_lwp): Update.
732 * regcache.c (get_thread_regcache): Update.
733 (regcache_invalidate_thread): Update.
734 (free_register_cache_thread): Update.
735 * win32-i386-low.c (update_debug_registers_callback): Update.
736 (win32_get_current_dr): Update.
737 * win32-low.c (thread_rec): Update.
738 (delete_thread_info): Update.
739 (continue_one_thread): Update.
740 (suspend_one_thread): Update.
741
a160cc46
SM
7422017-08-24 Simon Marchi <simon.marchi@ericsson.com>
743
744 * inferiors.c (set_inferior_target_data): Remove.
745 * inferiors.h (set_inferior_target_data): Remove.
746
6d580b63
YQ
7472017-08-18 Yao Qi <yao.qi@linaro.org>
748
749 * Makefile.in (OBS): Add selftest.o.
750 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
751 * configure, config.in: Re-generated.
752 * server.c: Include common/sefltest.h.
753 (captured_main): Handle option --selftest.
754
f5a29eb0
YQ
7552017-08-09 Yao Qi <yao.qi@linaro.org>
756
757 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
758 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
759 i386-avx-mpx.o and i386-mmx.o.
760 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
761 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
762 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
763 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
764 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
765 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
766 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
767 i386/amd64-avx-mpx.xml.
768
57757c2f
YQ
7692017-08-09 Yao Qi <yao.qi@linaro.org>
770
771 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
772 and x32-avx-avx512.o.
773 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
774 i386/x32-avx-avx512.xml.
775
229d26fc
SM
7762017-07-26 Simon Marchi <simon.marchi@ericsson.com>
777
778 * tracepoint.h (enum class fast_tpoint_collect_result): New
779 enumeration.
780 (fast_tracepoint_collecting): Change return type to
781 fast_tpoint_collect_result.
782 * tracepoint.c (fast_tracepoint_collecting): Likewise.
783 * linux-low.h: Include tracepoint.h.
784 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
785 fast_tpoint_collect_result.
786 * linux-low.c (handle_tracepoints): Adjust.
787 (linux_fast_tracepoint_collecting): Change return type to
788 fast_tpoint_collect_result.
789 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
790 linux_wait_1, stuck_in_jump_pad_callback,
791 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
792 proceed_one_lwp): Adjust to type change.
793
2e1e43e1
YQ
7942017-07-10 Yao Qi <yao.qi@linaro.org>
795
796 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
797
adc764e7
YQ
7982017-06-29 Yao Qi <yao.qi@linaro.org>
799
800 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
801 Remove.
802 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
803
a206891a
SM
8042017-06-20 Simon Marchi <simon.marchi@ericsson.com>
805
806 * Makefile.in (IPA_OBJS): Sort and format one item per line.
807
9a6c7d9c
SDJ
8082017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
809
810 * linux-low.c (linux_create_inferior): Adjust code to access the
811 environment information via 'gdb_environ' class.
812 * lynx-low.c (lynx_create_inferior): Likewise.
813 * server.c (our_environ): Make it an instance of 'gdb_environ'.
814 (get_environ): Return a pointer to 'our_environ'.
815 (captured_main): Initialize 'our_environ'.
816 * server.h (get_environ): Adjust prototype.
817 * spu-low.c (spu_create_inferior): Adjust code to access the
818 environment information via 'gdb_environ' class.
819
ae3e2ccf
SM
8202017-06-17 Simon Marchi <simon.marchi@ericsson.com>
821
822 * linux-low.c (linux_read_memory, linux_write_memory): Remove
823 usage of "register" keyword.
824
3e019bdc
SM
8252017-06-17 Simon Marchi <simon.marchi@ericsson.com>
826
827 * configure: Re-generate.
828
8465943a
SM
8292017-06-17 Simon Marchi <simon.marchi@ericsson.com>
830
831 * configure: Re-generate.
832
cf0dd6f0
SM
8332017-06-17 Simon Marchi <simon.marchi@ericsson.com>
834
835 * Makefile.in (COMPILE.pre): Add "-x c++".
836
9845682b
SDJ
8372017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
838
839 * fork-child.c: Conditionally include <signal.h>.
840
aefd8b33
SDJ
8412017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
842
843 * server.c (handle_general_set): Handle new packet
844 "QStartupWithShell".
845 (handle_query): Add "QStartupWithShell" to the list of supported
846 packets.
847 (gdbserver_usage): Add help text explaining the
848 new "--startup-with-shell" and "--no-startup-with-shell" CLI
849 options.
850 (captured_main): Recognize and act upon the presence of the new
851 CLI options.
852
2090129c
SDJ
8532017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
854 Pedro Alves <palves@redhat.com>
855
856 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
857 * configure: Regenerate.
858 * configure.srv (srv_linux_obj): Add "fork-child.o" and
859 "fork-inferior.o".
860 (i[34567]86-*-lynxos*): Likewise.
861 (spu*-*-*): Likewise.
862 * fork-child.c: New file.
863 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
864 and "environ.h".
865 (linux_ptrace_fun): New function.
866 (linux_create_inferior): Adjust function prototype to reflect
867 change on "target.h". Adjust function code to use
868 "fork_inferior".
869 (linux_request_interrupt): Delete "signal_pid".
870 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
871 (lynx_ptrace_fun): New function.
872 (lynx_create_inferior): Adjust function prototype to reflect
873 change on "target.h". Adjust function code to use
874 "fork_inferior".
875 * nto-low.c (nto_create_inferior): Adjust function prototype and
876 code to reflect change on "target.h". Update comments.
877 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
878 "common-terminal.h" and "environ.h".
879 (terminal_fd): Moved to fork-child.c.
880 (old_foreground_pgrp): Likewise.
881 (restore_old_foreground_pgrp): Likewise.
882 (last_status): Make it global.
883 (last_ptid): Likewise.
884 (our_environ): New variable.
885 (startup_with_shell): Likewise.
886 (program_name): Likewise.
887 (program_argv): Rename to...
888 (program_args): ...this.
889 (wrapper_argv): New variable.
890 (start_inferior): Delete function.
891 (get_exec_wrapper): New function.
892 (get_exec_file): Likewise.
893 (get_environ): Likewise.
894 (prefork_hook): Likewise.
895 (post_fork_inferior): Likewise.
896 (postfork_hook): Likewise.
897 (postfork_child_hook): Likewise.
898 (handle_v_run): Update code to deal with arguments coming from the
899 remote host. Update calls from "start_inferior" to
900 "create_inferior".
901 (captured_main): Likewise. Initialize environment variable. Call
902 "have_job_control".
903 * server.h (post_fork_inferior): New prototype.
904 (get_environ): Likewise.
905 (last_status): Declare.
906 (last_ptid): Likewise.
907 (signal_pid): Likewise.
908 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
909 (spu_ptrace_fun): New function.
910 (spu_create_inferior): Adjust function prototype to reflect change
911 on "target.h". Adjust function code to use "fork_inferior".
912 * target.c (target_terminal_init): New function.
913 (target_terminal_inferior): Likewise.
914 (target_terminal_ours): Likewise.
915 * target.h: Include <vector>.
916 (struct target_ops) <create_inferior>: Update prototype.
917 (create_inferior): Update macro.
918 * utils.c (gdb_flush_out_err): New function.
919 * win32-low.c (win32_create_inferior): Adjust function prototype
920 and code to reflect change on "target.h".
921
043a4934
SDJ
9222017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
923
924 * inferiors.c (switch_to_thread): New function.
925
15652511
SDJ
9262017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
927
928 * Makefile.in (SFILE): Add "common/job-control.c".
929 (OBS): Add "job-control.o".
930
21ea5acd
SDJ
9312017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
932
933 * Makefile: Remove "@host_makefile_frag@".
934
e13cb306
PA
9352017-05-05 Pedro Alves <palves@redhat.com>
936
937 * configure: Regenerate.
938
c94fee56
SDJ
9392017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
940
941 * configure: Regenerate.
942
a0ff9e1a
SM
9432017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
944
945 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
946 software_single_step change of return type to
947 std::vector<CORE_ADDR>.
948 * linux-low.c (install_software_single_step_breakpoints):
949 Likewise.
950 * linux-low.h (install_software_single_step_breakpoints):
951 Likewise.
952
be628ab8
SDJ
9532017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
954
955 * remote-utils.c: Include "gdb_termios.h" instead of
956 "terminal.h".
957 * terminal.h: Delete file.
958
7c5ded6a
SDJ
9592017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
960
961 * server.c: Include <vector>.
962 <program_argv, wrapper_argv>: Convert to std::vector.
963 (start_inferior): Rewrite function to use C++.
964 (handle_v_run): Likewise. Update code that calculates the argv
965 based on the vRun packet; use C++.
966 (captured_main): Likewise.
967
436252de
SM
9682017-04-06 Simon Marchi <simon.marchi@ericsson.com>
969
970 * server.c (handle_v_cont): Initialize thread_resume::thread
971 with null_ptid.
972
9bf2a700
PA
9732017-04-05 Pedro Alves <palves@redhat.com>
974
975 * configure: Regenerate.
976
a121b7c1
PA
9772017-04-05 Pedro Alves <palves@redhat.com>
978
979 * gdbreplay.c (sync_error): Constify.
980 * linux-x86-low.c (push_opcode): Constify.
981
21c8a587
PA
9822017-04-05 Pedro Alves <palves@redhat.com>
983
984 * win32-low.c (get_child_debug_event)
985 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
986 Report TARGET_WAITKIND_SPURIOUS instead.
987
fb32b4f7
PA
9882017-04-05 Pedro Alves <palves@redhat.com>
989
990 * remote-utils.c (remote_prepare, remote_open): Constify.
991 * remote-utils.h (remote_prepare, remote_open): Constify.
992 * server.c (captured_main): Constify 'port' handling.
993
65dd1e59
SM
9942017-04-04 Simon Marchi <simon.marchi@ericsson.com>
995
996 * Makefile.in (clean): Clear .deps.
997
8fa5b777
SM
9982017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
999
1000 * .gitignore: Remove generated files, replace with wildcard.
1001 * (clean): Replace removal of generated files with wildcard.
1002 (version.c): Replace with...
1003 (version-generated.c): ...this.
1004 (xml-builtin.c): Replace with...
1005 (xml-builtin-generated.c): ...this.
1006 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1007 (%.c: *regformats*): Replace with...
1008 (%-generated.c: *regformats*): ...this.
1009
a12e714b
MF
10102017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1011
1012 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1013 (xtensa_fill_gregset): Call collect_register_by_name for
1014 threadptr register.
1015 (xtensa_store_gregset): Call supply_register_by_name for
1016 threadptr register.
1017
1a09b50a
MF
10182017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1019
1020 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1021 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1022 (xtensa_store_gregset): Call supply_register for all registers in
1023 a0_regnum..a0_regnum + C0_NREGS range.
1024
1a01e7c6
SM
10252017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1026
1027 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1028 (ax-ipa.o: ax.c): Remove.
1029 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1030 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1031 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1032 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1033 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1034
36bc18a8
SM
10352017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1036
1037 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1038 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1039 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1040 (errors-ipa.o: ../common/errors.c): Remove.
1041 (format-ipa.o: ../common/format.c): Remove.
1042 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1043
a8ebe3d5
SM
10442017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1045
1046 * Makefile.in (%-ipa.o: %.c): New rule.
1047 (tracepoint-ipa.o: tracepoint.c): Remove.
1048 (utils-ipa.o: utils.c): Remove.
1049 (remote-utils-ipa.o: remote-utils.c): Remove.
1050 (regcache-ipa.o: regcache.c): Remove.
1051 (i386-linux-ipa.o: i386-linux.c): Remove.
1052 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1053 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1054 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1055 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1056 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1057 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1058 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1059 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1060 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1061 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1062 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1063 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1064 (aarch64-ipa.o: aarch64.c): Remove.
1065 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1066 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1067 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1068 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1069 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1070 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1071 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1072 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1073 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1074 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1075 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1076 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1077 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1078 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1079 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1080 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1081 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1082 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1083 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1084 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1085 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1086 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1087 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1088 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1089 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1090 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1091 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1092 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1093 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1094 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1095 (tdesc-ipa.o: tdesc.c): Remove.
1096 (x32-linux-ipa.o: x32-linux.c): Remove.
1097 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1098 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1099
50cfacb7
SM
11002017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1101
1102 * Makefile.in (%.o: ../arch/%.c): New rule.
1103 (arm.o: ../arch/arm.c): Remove.
1104 (arm-linux.o: ../arch/arm-linux.c): Remove.
1105 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1106 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1107
c5a22423
SM
11082017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1109
1110 * Makefile.in (%.o: ../nat/%.c): New rule.
1111 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1112 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1113 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1114 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1115 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1116 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1117 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1118 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1119 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1120 (linux-personality.o: ../nat/linux-personality.c): Remove.
1121 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1122 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1123 (x86-linux.o: ../nat/x86-linux.c): Remove.
1124 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1125 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1126
6bda016b
SM
11272017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1128
1129 * Makefile.in (%.o: ../common/%.c): New rule.
1130 (signals.o: ../common/signals.c): Remove.
1131 (print-utils.o: ../common/print-utils.c): Remove.
1132 (rsp-low.o: ../common/rsp-low.c): Remove.
1133 (common-utils.o: ../common/common-utils.c): Remove.
1134 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1135 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1136 (vec.o: ../common/vec.c): Remove.
1137 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1138 (xml-utils.o: ../common/xml-utils.c): Remove.
1139 (ptid.o: ../common/ptid.c): Remove.
1140 (buffer.o: ../common/buffer.c): Remove.
1141 (format.o: ../common/format.c): Remove.
1142 (filestuff.o: ../common/filestuff.c): Remove.
1143 (agent.o: ../common/agent.c): Remove.
1144 (errors.o: ../common/errors.c): Remove.
1145 (environ.o: ../common/environ.c): Remove.
1146 (common-debug.o: ../common/common-debug.c): Remove.
1147 (cleanups.o: ../common/cleanups.c): Remove.
1148 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1149 (fileio.o: ../common/fileio.c): Remove.
1150 (common-regcache.o: ../common/common-regcache.c): Remove.
1151 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1152 (new-op.o: ../common/new-op.c): Remove.
1153 (btrace-common.o: ../common/btrace-common.c): Remove.
1154
21122961
SM
11552017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1156
1157 * Makefile.in (%.o: ../target/%.c): New rule.
1158 (waitstatus.o: ../target/waitstatus.c): Remove.
1159
c362e621
SM
11602017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1161
1162 * Makefile.in
1163 (%.c: ../regformats/%.dat,
1164 (%.c: ../regformats/arm/%.dat,
1165 (%.c: ../regformats/i386/%.dat,
1166 (%.c: ../regformats/rs6000/%.dat): New rules.
1167 (aarch64.c): Remove.
1168 (reg-arm.c): Remove.
1169 (arm-with-iwmmxt.c): Remove.
1170 (arm-with-vfpv2.c): Remove.
1171 (arm-with-vfpv3.c): Remove.
1172 (arm-with-neon.c): Remove.
1173 (reg-bfin.c): Remove.
1174 (reg-cris.c): Remove.
1175 (reg-crisv32.c): Remove.
1176 (i386.c): Remove.
1177 (i386-linux.c): Remove.
1178 (i386-avx.c): Remove.
1179 (i386-avx-linux.c): Remove.
1180 (i386-avx-avx512.c): Remove.
1181 (i386-avx-avx512-linux.c): Remove.
1182 (i386-mpx.c): Remove.
1183 (i386-mpx-linux.c): Remove.
1184 (i386-avx-mpx-avx512-pku.c): Remove.
1185 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1186 (i386-avx-mpx.c): Remove.
1187 (i386-avx-mpx-linux.c): Remove.
1188 (i386-mmx.c): Remove.
1189 (i386-mmx-linux.c): Remove.
1190 (reg-ia64.c): Remove.
1191 (reg-m32r.c): Remove.
1192 (reg-m68k.c): Remove.
1193 (reg-cf.c): Remove.
1194 (mips-linux.c): Remove.
1195 (mips-dsp-linux.c): Remove.
1196 (mips64-linux.c): Remove.
1197 (mips64-dsp-linux.c): Remove.
1198 (nios2-linux.c): Remove.
1199 (powerpc-32.c): Remove.
1200 (powerpc-32l.c): Remove.
1201 (powerpc-altivec32l.c): Remove.
1202 (powerpc-cell32l.c): Remove.
1203 (powerpc-vsx32l.c): Remove.
1204 (powerpc-isa205-32l.c): Remove.
1205 (powerpc-isa205-altivec32l.c): Remove.
1206 (powerpc-isa205-vsx32l.c): Remove.
1207 (powerpc-e500l.c): Remove.
1208 (powerpc-64l.c): Remove.
1209 (powerpc-altivec64l.c): Remove.
1210 (powerpc-cell64l.c): Remove.
1211 (powerpc-vsx64l.c): Remove.
1212 (powerpc-isa205-64l.c): Remove.
1213 (powerpc-isa205-altivec64l.c): Remove.
1214 (powerpc-isa205-vsx64l.c): Remove.
1215 (s390-linux32.c): Remove.
1216 (s390-linux32v1.c): Remove.
1217 (s390-linux32v2.c): Remove.
1218 (s390-linux64.c): Remove.
1219 (s390-linux64v1.c): Remove.
1220 (s390-linux64v2.c): Remove.
1221 (s390-te-linux64.c): Remove.
1222 (s390-vx-linux64.c): Remove.
1223 (s390-tevx-linux64.c): Remove.
1224 (s390x-linux64.c): Remove.
1225 (s390x-linux64v1.c): Remove.
1226 (s390x-linux64v2.c): Remove.
1227 (s390x-te-linux64.c): Remove.
1228 (s390x-vx-linux64.c): Remove.
1229 (s390x-tevx-linux64.c): Remove.
1230 (tic6x-c64xp-linux.c): Remove.
1231 (tic6x-c64x-linux.c): Remove.
1232 (tic6x-c62x-linux.c): Remove.
1233 (reg-sh.c): Remove.
1234 (reg-sparc64.c): Remove.
1235 (reg-spu.c): Remove.
1236 (amd64.c): Remove.
1237 (amd64-linux.c): Remove.
1238 (amd64-avx.c): Remove.
1239 (amd64-avx-linux.c): Remove.
1240 (amd64-avx-avx512.c): Remove.
1241 (amd64-avx-avx512-linux.c): Remove.
1242 (amd64-mpx.c): Remove.
1243 (amd64-mpx-linux.c): Remove.
1244 (amd64-avx-mpx-avx512-pku.c): Remove.
1245 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1246 (amd64-avx-mpx.c): Remove.
1247 (amd64-avx-mpx-linux.c): Remove.
1248 (x32.c): Remove.
1249 (x32-linux.c): Remove.
1250 (x32-avx.c): Remove.
1251 (x32-avx-linux.c): Remove.
1252 (x32-avx-avx512.c): Remove.
1253 (x32-avx-avx512-linux.c): Remove.
1254 (reg-xtensa.c): Remove.
1255 (reg-tilegx.c): Remove.
1256 (reg-tilegx32.c): Remove.
1257
1672e0d9
SDJ
12582017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1259
1260 * Makefile.in (SFILES): Add "common/environ.c".
1261 (OBJS): Add "common/environ.h".
1262
239b6d10
WT
12632017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1264
1265 * configure.ac: Check if the fs_base and gs_base members of
1266 `struct user_regs_struct' exist.
1267 * config.in: Regenerated.
1268 * configure: Likewise.
1269
694b382c
AT
12702017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1271
1272 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1273 target_read_memory.
1274 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1275 (get_next_pcs_syscall_next_pc): Likewise.
1276
7dc53023
LM
12772016-12-23 Luis Machado <lgustavo@codesourcery.com>
1278
1279 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1280 * nto-x86-low.c: Likewise.
1281
ad02e4fe
SM
12822016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1283
1284 * Makefile.in: Include disable-implicit-rules.mk.
1285
dcb07cfa
PA
12862016-11-23 Pedro Alves <palves@redhat.com>
1287
1288 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1289 (debug_vprintf): Use std::chrono::steady_clock instead of
1290 gettimeofday. Use '.' instead of ':'.
1291 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1292 (get_timestamp): Use std::chrono::steady_clock instead of
1293 gettimeofday.
1294
8629c02c
SM
12952016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1296
1297 * Makefile.in: Fix whitespace formatting.
1298
b593ecca
SM
12992016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1300
1301 * Makefile.in (SFILES, OBS): Flatten list and order
1302 alphabetically.
1303
9986ba08
PA
13042016-11-23 Pedro Alves <palves@redhat.com>
1305
1306 * event-loop.c (handle_file_event): Use warning.
1307 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1308 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1309 Use warning.
1310
4eefa7bc
PA
13112016-11-23 Pedro Alves <palves@redhat.com>
1312
1313 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1314 output.
1315 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1316 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1317 debug_printf and debug_flush for debug output.
1318 * server.c (handle_general_set): Likewise.
1319 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1320 output.
1321
5443506e
SM
13222016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1323
1324 * Makefile.in (.c.o): Replace rule with ...
1325 (%.o: %.c): ... this one.
1326
3b165252
SM
13272016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1328
1329 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1330 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1331 make.
1332 * configure.ac: Remove checks for the make program.
1333 * configure: Re-generate.
1334
0bcda685
PA
13352016-10-28 Pedro Alves <palves@redhat.com>
1336
1337 * Makefile.in (CXX_DIALECT): Get from configure.
1338 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1339 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1340 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1341 * config.in: Regenerate.
1342 * configure: Regenerate.
1343
c3805894
YQ
13442016-10-27 Yao Qi <yao.qi@linaro.org>
1345
1346 * linux-low.c (linux_supports_range_stepping): Return true if
1347 can_software_single_step return true.
1348
89342618
YQ
13492016-10-27 Yao Qi <yao.qi@linaro.org>
1350
1351 * inferiors.c (find_inferior_in_random): New function.
1352 * inferiors.h (find_inferior_in_random): Declare.
1353 * linux-low.c (linux_wait_for_event_filtered): Call
1354 find_inferior_in_random instead of find_inferior.
1355
e3652c84
YQ
13562016-10-27 Yao Qi <yao.qi@linaro.org>
1357
1358 * linux-low.c (linux_wait_1): If single-step breakpoints are
1359 inserted, remove them.
1360
5a04c4cf
PA
13612016-10-26 Pedro Alves <palves@redhat.com>
1362
1363 * linux-low.c (handle_extended_wait): Link parent/child fork
1364 threads.
1365 (linux_wait_1): Unlink them.
1366 (linux_set_resume_request): Ignore resume requests for
1367 already-resumed and unhandled fork child threads.
1368 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1369 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1370 New functions.
1371 (handle_v_requests) <vCont>: Don't call require_running.
1372 * server.h (in_queued_stop_replies): New declaration.
1373
cb93dc7f
YQ
13742016-10-24 Yao Qi <yao.qi@linaro.org>
1375
1376 PR server/20733
1377 * linux-aarch64-low.c (append_insns): Cast the return value to
1378 'uint32_t *'.
1379
a1078bea
YQ
13802016-10-10 Yao Qi <yao.qi@linaro.org>
1381
1382 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1383
1fb77080
SDJ
13842016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1385
1386 * target.c (target_supports_multi_process): New function, moved
1387 from...
1388 * target.h (target_supports_multi_process): ... here. Remove
1389 macro.
1390
39b5a3b9
TT
13912016-10-05 Tom Tromey <tom@tromey.com>
1392
1393 PR remote/20655:
1394 * tracepoint.c (handle_tracepoint_bkpts): Check
1395 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1396
c1d0b70a
YQ
13972016-10-05 Yao Qi <yao.qi@linaro.org>
1398
1399 * configure.srv: Update the path of arm-*.xml files.
1400
0a69eedb
YQ
14012016-10-05 Terry Guo <terry.guo@arm.com>
1402 Yao Qi <yao.qi@linaro.org>
1403
1404 * Makefile.in: Adjust the path of rules.
1405 * configure.srv: Update the path of xml files.
1406 * regformats/arm-with-iwmmxt.dat: Regenerated.
1407 * regformats/arm-with-neon.dat: Likewise.
1408 * regformats/arm-with-vfpv2.dat: Likewise.
1409 * regformats/arm-with-vfpv3.dat Likewise.
1410
17e16485
YQ
14112016-09-30 Yao Qi <yao.qi@linaro.org>
1412
1413 PR gdbserver/20627
1414 * target.c (target_stop_and_wait): Don't call
1415 target_continue_no_signal, use resume_stop instead.
1416
edeeb602
YQ
14172016-09-26 Yao Qi <yao.qi@linaro.org>
1418
1419 * linux-low.c (linux_wait_1): Call debug_exit.
1420
503b1c39
PA
14212016-09-23 Pedro Alves <palves@redhat.com>
1422
1423 * Makefile.in (SFILES): Add common/new-op.c.
1424 (OBS): Add common/new-op.o.
1425 (new-op.o): New rule.
1426
74172ecf
SM
14272016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1428
1429 * .gitinore: Ignore more files.
1430
fc6cda2e
YQ
14312016-09-21 Yao Qi <yao.qi@linaro.org>
1432
1433 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1434 23.
1435
bc1e6c81
SDJ
14362016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1437
1438 * server.c (start_inferior): Call target_mourn_inferior instead of
1439 mourn_inferior; pass ptid_t argument to it.
1440 (resume): Likewise.
1441 (handle_target_event): Likewise.
1442 * target.c (target_mourn_inferior): New function.
1443 * target.h (mourn_inferior): Delete macro.
1444
0e00e962
AA
14452016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1446
1447 * linux-low.c (lwp_is_stepping): New function.
1448
1d8cb77d
CL
14492016-09-06 Carl Love <cel@us.ibm.com>
1450
1451 * server.c (start_inferior): Fixed comment, requested comment change
1452 didn't get updated correctly. Removed reference to ptrace () call as
1453 it is only true on Linux systems.
1454
7313bced
CL
14552016-09-06 Carl Love <cel@us.ibm.com>
1456
1457 * server.c (start_inferior): Do not call
1458 function target_post_create_inferior () if the
1459 inferior process has already exited.
1460
cf6de44d
PA
14612016-09-05 Pedro Alves <palves@redhat.com>
1462
1463 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1464 (COMPILE.pre, CC_LD): Use CXX directly.
1465 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1466 * acinclude.m4: Don't include build-with-cxx.m4.
1467 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1468 * configure: Regenerate.
1469
c1da6748
AT
14702016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1471
1472 PR gdb/19495
1473 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1474 call writing data to own_buf.
1475
f2b9e3df
SDJ
14762016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1477
1478 * target.c (mywait): Call target_wait instead of
1479 the_target->wait.
1480 (target_wait): New function.
1481
049a8570
SDJ
14822016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1483
1484 * server.c (start_inferior): New variable 'ptid'. Replace calls
1485 to the_target->resume by target_continue{,_no_signal}, depending
1486 on the case.
1487 * target.c (target_stop_and_wait): Call target_continue_no_signal
1488 instead of the_target->resume.
1489 (target_continue): New function.
1490
3aa5cfa0
AT
14912016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1492
1493 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1494
754653a7
AZ
14952016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1496
1497 PR server/20491
1498 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1499 ps_prochandle.
1500 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1501 * linux-arm-low.c (ps_get_thread_area): Likewise.
1502 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1503 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1504 * linux-mips-low.c (ps_get_thread_area): Likewise.
1505 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1506 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1507 * linux-x86-low.c (ps_get_thread_area): Likewise.
1508 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1509
ed036b40
PA
15102016-08-19 Pedro Alves <palves@redhat.com>
1511
1512 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1513
c8ef42ee
PA
15142016-08-19 Pedro Alves <palves@redhat.com>
1515
1516 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1517 comment. Use memcpy instead of casting through unsigned long.
1518
9c235a72
PA
15192016-08-19 Pedro Alves <palves@redhat.com>
1520
1521 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1522 allocating around 0x80000000.
1523
201506da
PA
15242016-08-19 Pedro Alves <palves@redhat.com>
1525
1526 PR gdb/20415
1527 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1528 (x32-avx512-linux-ipa.o): New rules.
1529 * configure.ac (x86_64-*-linux*): New x32 check.
1530 * configure.srv (ipa_x32_linux_regobj): New.
1531 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1532 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1533 descriptions.
1534 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1535 descriptions.
1536 * configure: Regenerate.
1537
f348d89a
PA
15382016-08-09 Pedro Alves <palves@redhat.com>
1539
1540 PR gdb/18653
1541 * Makefile.in (OBS): Add signals-state-save-restore.o.
1542 (signals-state-save-restore.o): New rule.
1543 * config.in: Regenerate.
1544 * configure: Regenerate.
1545 * linux-low.c: Include "signals-state-save-restore.h".
1546 (linux_create_inferior): Call
1547 restore_original_signals_state.
1548 * server.c: Include "dispositions-save-restore.h".
1549 (captured_main): Call save_original_signals_state.
1550
1baf5149
PA
15512016-08-05 Pedro Alves <palves@redhat.com>
1552
1553 * configure: Regenerate.
1554
fcd4a73d
YQ
15552016-08-04 Yao Qi <yao.qi@linaro.org>
1556
1557 * linux-low.c (regsets_fetch_inferior_registers): Check
1558 errno is ESRCH or not.
1559
979659d0
YQ
15602016-08-02 Yao Qi <yao.qi@linaro.org>
1561
1562 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1563 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1564 (thread_db_load_search): Update.
1565 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1566 td_ta_set_event and td_ta_event_getmsg.
1567
6598661d
PA
15682016-07-26 Pedro Alves <palves@redhat.com>
1569
1570 PR server/20414
1571 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1572 of unsigned long for 64-bit registers and use uint32_t instead of
1573 unsigned int for 32-bit registers.
1574
9cf12d57
PA
15752016-07-26 Pedro Alves <palves@redhat.com>
1576
1577 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1578 to 'ptrace'.
1579
305450ed
TT
15802016-07-21 Tom Tromey <tom@tromey.com>
1581
1582 * configure: Rebuild.
1583
2583da7c
YQ
15842016-07-21 Yao Qi <yao.qi@linaro.org>
1585
1586 * mem-break.c (find_gdb_breakpoint): Cast bp to
1587 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1588
21536b36
YQ
15892016-07-21 Yao Qi <yao.qi@linaro.org>
1590
1591 * server.c (handle_v_requests): Support s and S actions
1592 if target_supports_software_single_step return true.
1593
8901d193
YQ
15942016-07-21 Yao Qi <yao.qi@linaro.org>
1595
1596 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1597 is resume_step, call maybe_hw_step.
1598 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1599 and unstop them.
1600 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1601 breakpoints or not.
1602 (proceed_one_lwp): If resume request is resume_step, install
1603 reinsert breakpoints and call maybe_hw_step.
1604
0e9a339e
YQ
16052016-07-21 Yao Qi <yao.qi@linaro.org>
1606
1607 * linux-low.c (proceed_one_lwp): Declare.
1608 (linux_resume_one_thread): Remove local variable 'step'.
1609 Lift code enqueue signal. Call proceed_one_lwp instead of
1610 linux_resume_one_lwp.
1611
4281b351
YQ
16122016-07-21 Yao Qi <yao.qi@linaro.org>
1613
1614 * linux-low.c (linux_resume_one_thread): Call
1615 enqueue_pending_signal.
1616
984a2c04
YQ
16172016-07-21 Yao Qi <yao.qi@linaro.org>
1618
1619 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1620 * inferiors.c (do_restore_current_thread_cleanup): New function.
1621 (make_cleanup_restore_current_thread): Likewise.
1622 * linux-low.c (install_software_single_step_breakpoints): Call
1623 make_cleanup_restore_current_thread. Switch current_thread to
1624 thread.
1625
bec903c9
YQ
16262016-07-21 Yao Qi <yao.qi@linaro.org>
1627
1628 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1629 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1630 (clone_one_breakpoint): Likewise.
1631 (delete_reinsert_breakpoints): Change parameter to thread.
1632 Callers updated.
1633 (has_reinsert_breakpoints): Likewise.
1634 (uninsert_reinsert_breakpoints): Likewise.
1635 (reinsert_reinsert_breakpoints): Likewise.
1636 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1637 (delete_reinsert_breakpoints): Likewise.
1638 (reinsert_reinsert_breakpoints): Likewise.
1639 (uninsert_reinsert_breakpoints): Likewise.
1640 (has_reinsert_breakpoints): Likewise.
1641
63c40ec7
YQ
16422016-07-21 Yao Qi <yao.qi@linaro.org>
1643
1644 * inferiors.c (get_thread_process): Make parameter const.
1645 * inferiors.h (get_thread_process): Update declaration.
1646 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1647 Add new parameters child_thread and parent_thread. Callers
1648 updated.
1649 * mem-break.h (clone_all_breakpoints): Update declaration.
1650
9aa76cd0
YQ
16512016-07-21 Yao Qi <yao.qi@linaro.org>
1652
1653 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1654 <command_list, handler>: Remove.
1655 (struct gdb_breakpoint): New.
1656 (struct other_breakpoint): New.
1657 (struct reinsert_breakpoint): New.
1658 (is_gdb_breakpoint): New function.
1659 (any_persistent_commands): Update command_list if
1660 is_gdb_breakpoint returns true.
1661 (set_breakpoint): Create breakpoints according to their types.
1662 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1663 (set_gdb_breakpoint_1): Likewise.
1664 (set_gdb_breakpoint): Likewise.
1665 (clear_breakpoint_conditions): Change parameter type to
1666 'struct gdb_breakpoint *'.
1667 (clear_breakpoint_commands): Likewise.
1668 (clear_breakpoint_conditions_and_commands): Likewise.
1669 (add_condition_to_breakpoint): Likewise.
1670 (add_breakpoint_condition): Likewise.
1671 (add_commands_to_breakpoint): Likewise.
1672 (check_breakpoints): Check other_breakpoint.
1673 (clone_one_breakpoint): Clone breakpopint according to its type.
1674 * mem-break.h (struct gdb_breakpoint): Declare.
1675 (set_gdb_breakpoint): Update declaration.
1676 (clear_breakpoint_conditions_and_commands): Likewise.
1677 (add_breakpoint_condition): Likewise.
1678 (add_breakpoint_commands): Likewise.
1679 * server.c (process_point_options): Change parameter type to
1680 'struct gdb_breakpoint *'.
1681
811f8301
YQ
16822016-07-21 Yao Qi <yao.qi@linaro.org>
1683
1684 * mem-break.c (set_breakpoint_at): Rename it to ...
1685 (set_breakpoint_type_at): ... it.
1686 (set_breakpoint_at): Call set_breakpoint_type_at.
1687 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1688 * mem-break.h (set_breakpoint_at): Update comments.
1689
b1c51e36
CLT
16902016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1691
1692 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1693 to buf parameter.
1694 (nios2_store_gregset): Likewise.
1695
ced2dffb
PA
16962016-07-01 Pedro Alves <palves@redhat.com>
1697 Antoine Tremblay <antoine.tremblay@ericsson.com>
1698
1699 * linux-low.c: Change interface to take the target lwp_info
1700 pointer directly and return void. Handle detaching from a zombie
1701 thread.
1702 (linux_detach_lwp_callback): New function.
1703 (linux_detach): Detach from the leader thread after detaching from
1704 the clone threads.
1705
2ac09a5b
YQ
17062016-06-28 Yao Qi <yao.qi@linaro.org>
1707
1708 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1709 for variable new_offset.
1710 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1711 (aarch64_ftrace_insn_reloc_cb): Likewise.
1712 (aarch64_ftrace_insn_reloc_tb): Likewise.
1713 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1714 PRIx64 instead of PRIx32.
1715
79e7fd4f
YQ
17162016-06-28 Yao Qi <yao.qi@linaro.org>
1717
1718 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1719 (the_low_target): Install arm_get_syscall_trapinfo.
1720
061fc021
YQ
17212016-06-28 Yao Qi <yao.qi@linaro.org>
1722
1723 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1724 function.
1725 (the_low_target): Install aarch64_get_syscall_trapinfo.
1726
4cc32bec
YQ
17272016-06-28 Yao Qi <yao.qi@linaro.org>
1728
1729 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1730 Callers updated.
1731 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1732 Remove parameter sysno.
1733 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1734 sysret.
1735
782c1122
AA
17362016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1737
1738 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1739 (s390_emit_ne_goto): Likewise.
1740 (s390_emit_lt_goto): Likewise.
1741 (s390_emit_le_goto): Likewise.
1742 (s390_emit_gt_goto): Likewise.
1743 (s390_emit_ge_goto): Likewise.
1744 (s390x_emit_eq_goto): Likewise.
1745 (s390x_emit_ne_goto): Likewise.
1746 (s390x_emit_lt_goto): Likewise.
1747 (s390x_emit_le_goto): Likewise.
1748 (s390x_emit_gt_goto): Likewise.
1749 (s390x_emit_ge_goto): Likewise.
1750 (s390_emit_ops_impl): Mark variable static.
1751 (s390x_emit_ops): Likewise.
1752
2e7b624b
YQ
17532016-06-17 Yao Qi <yao.qi@linaro.org>
1754
1755 * linux-low.c (handle_extended_wait): Call
1756 uninsert_reinsert_breakpoints for the parent process. Remove
1757 reinsert breakpoints from the child process. Reinsert them to
1758 the parent process when vfork is done.
1759 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1760 (reinsert_reinsert_breakpoints): New function.
1761 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1762 (reinsert_reinsert_breakpoints): Declare.
1763
8a81c5d7
YQ
17642016-06-17 Yao Qi <yao.qi@linaro.org>
1765
1766 * linux-low.c (handle_extended_wait): If the parent is doing
1767 step-over, remove the reinsert breakpoints from the forked child.
1768
f50bf8e5
YQ
17692016-06-17 Yao Qi <yao.qi@linaro.org>
1770
1771 * linux-low.c (unsuspend_all_lwps): Declare.
1772 (linux_low_filter_event): If thread exited, call finish_step_over.
1773 If step-over is finished, unsuspend other threads.
1774
8376a3cb
YQ
17752016-06-17 Yao Qi <yao.qi@linaro.org>
1776
1777 * linux-low.c (linux_resume_one_lwp_throw): Assert
1778 has_reinsert_breakpoints returns false.
1779 * mem-break.c (delete_disabled_breakpoints): Assert
1780 bp type isn't reinsert_breakpoint.
1781
f79b145d
YQ
17822016-06-17 Yao Qi <yao.qi@linaro.org>
1783
1784 * linux-low.c (maybe_hw_step): New function.
1785 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1786 (finish_step_over): Switch current_thread to lwp temporarily,
1787 and assert has_reinsert_breakpoints returns true.
1788 (proceed_one_lwp): Call maybe_hw_step.
1789 * mem-break.c (has_reinsert_breakpoints): New function.
1790 * mem-break.h (has_reinsert_breakpoints): Declare.
1791
0ae534d2
JT
17922016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1793
1794 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1795
fcdad592
YQ
17962016-05-17 Yao Qi <yao.qi@linaro.org>
1797
1798 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1799 instead of find_inferior.
1800
9e784964
YQ
18012016-05-05 Yao Qi <yao.qi@linaro.org>
1802
1803 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1804 Initialize res to zero.
1805
cf2ebb6e
YQ
18062016-05-05 Yao Qi <yao.qi@linaro.org>
1807
1808 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1809 to uint32_t.
1810
c1aebf87
UW
18112016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1812
1813 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1814 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1815 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1816
35fd2deb 18172016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 1818 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
1819
1820 * tracepoint.c (write_inferior_int8): New function.
1821 (cmd_qtenable_disable): Write enable flag using
1822 write_inferior_int8.
1823
484b3c32
YQ
18242016-04-25 Yao Qi <yao.qi@linaro.org>
1825
1826 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1827 (need_step_over_p): Return zero if the LWP has pending signals
1828 can be delivered on software single step target.
1829
85ba7d86
YQ
18302016-04-25 Yao Qi <yao.qi@linaro.org>
1831
1832 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1833 return instead of error.
1834
3539aa13
YQ
18352016-04-22 Yao Qi <yao.qi@linaro.org>
1836
1837 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1838 to 23.
1839
5b061e98
YQ
18402016-04-22 Yao Qi <yao.qi@linaro.org>
1841
1842 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1843 signal when stepping over breakpoint with software single
1844 step.
1845
3451269c
PA
18462016-04-21 Pedro Alves <palves@redhat.com>
1847
1848 * linux-s390-low.c (s390_collect_ptrace_register)
1849 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1850 add casts.
1851 (s390_check_regset): Use void * instead of gdb_byte *.
1852
a2358508
PA
18532016-04-20 Pedro Alves <palves@redhat.com>
1854
1855 * configure: Renegerate.
1856
6885166d
YQ
18572016-04-20 Yao Qi <yao.qi@linaro.org>
1858
1859 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1860 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1861 number 16.
1862 (arm_store_gregset): Likewise.
1863
2b863f51
WT
18642016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1865
1866 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1867 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1868 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1869 (amd64-avx-mpx-linux.c): New rules.
1870 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1871 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1872 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1873 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1874 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1875 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1876 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1877 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1878 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1879 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1880 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1881 * linux-x86-low.c (x86_linux_read_description): Add case for
1882 X86_XSTATE_AVX_MPX_MASK.
1883 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1884 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1885 init_registers_i386_avx_mpx_linux.
1886 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1887 (initialize_low_tracepoint): Call
1888 init_registers_i386_avx_mpx_linux.
1889 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1890 (initialize_low_tracepoint): Call
1891 init_registers_amd64_avx_mpx_linux.
1892 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1893 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1894 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1895 declarations.
1896
9b30624b
PA
18972016-04-18 Pedro Alves <palves@redhat.com>
1898
1899 * configure: Regenerate.
1900
45e3745e
AT
19012016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1902
1903 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1904 (aarch64_emit_sub): Likewise.
1905
2afc13ff
PA
19062016-04-12 Pedro Alves <palves@redhat.com>
1907
1908 * utils.c (prepare_to_throw_exception): Delete.
1909
6e774b13
SM
19102016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1911
1912 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1913
4dca19f8
MK
19142016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1915
1916 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1917
d0a9981f
MK
19182016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1919
1920 * linux-aarch64-ipa.c: Add <elf.h> include.
1921 * linux-ppc-ipa.c: Add <elf.h> include.
1922 * linux-s390-ipa.c: Add <elf.h> include.
1923
252db07e
MK
19242016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1925
1926 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1927 (get_raw_reg_ptr): Likewise.
1928 (get_trace_state_variable_value_ptr): Likewise.
1929 (set_trace_state_variable_value_ptr): Likewise.
1930 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1931 char *.
1932
14e2b6d9
MK
19332016-03-31 Wei-cheng Wang <cole945@gmail.com>
1934 Marcin Kościelnicki <koriakin@0x04.net>
1935
1936 PR/17221
1937 * linux-ppc-low.c (emit_insns): New function.
1938 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1939 (ppc_emit_prologue): New function.
1940 (ppc_emit_epilogue): New function.
1941 (ppc_emit_add): New function.
1942 (ppc_emit_sub): New function.
1943 (ppc_emit_mul): New function.
1944 (ppc_emit_lsh): New function.
1945 (ppc_emit_rsh_signed): New function.
1946 (ppc_emit_rsh_unsigned): New function.
1947 (ppc_emit_ext): New function.
1948 (ppc_emit_zero_ext): New function.
1949 (ppc_emit_log_not): New function.
1950 (ppc_emit_bit_and): New function.
1951 (ppc_emit_bit_or): New function.
1952 (ppc_emit_bit_xor): New function.
1953 (ppc_emit_bit_not): New function.
1954 (ppc_emit_equal): New function.
1955 (ppc_emit_less_signed): New function.
1956 (ppc_emit_less_unsigned): New function.
1957 (ppc_emit_ref): New function.
1958 (ppc_emit_const): New function.
1959 (ppc_emit_reg): New function.
1960 (ppc_emit_pop): New function.
1961 (ppc_emit_stack_flush): New function.
1962 (ppc_emit_swap): New function.
1963 (ppc_emit_stack_adjust): New function.
1964 (ppc_emit_call): New function.
1965 (ppc_emit_int_call_1): New function.
1966 (ppc_emit_void_call_2): New function.
1967 (ppc_emit_if_goto): New function.
1968 (ppc_emit_goto): New function.
1969 (ppc_emit_eq_goto): New function.
1970 (ppc_emit_ne_goto): New function.
1971 (ppc_emit_lt_goto): New function.
1972 (ppc_emit_le_goto): New function.
1973 (ppc_emit_gt_goto): New function.
1974 (ppc_emit_ge_goto): New function.
1975 (ppc_write_goto_address): New function.
1976 (ppc_emit_ops_impl): New static variable.
1977 (ppc64v1_emit_prologue): New function.
1978 (ppc64v2_emit_prologue): New function.
1979 (ppc64_emit_epilogue): New function.
1980 (ppc64_emit_add): New function.
1981 (ppc64_emit_sub): New function.
1982 (ppc64_emit_mul): New function.
1983 (ppc64_emit_lsh): New function.
1984 (ppc64_emit_rsh_signed): New function.
1985 (ppc64_emit_rsh_unsigned): New function.
1986 (ppc64_emit_ext): New function.
1987 (ppc64_emit_zero_ext): New function.
1988 (ppc64_emit_log_not): New function.
1989 (ppc64_emit_bit_and): New function.
1990 (ppc64_emit_bit_or): New function.
1991 (ppc64_emit_bit_xor): New function.
1992 (ppc64_emit_bit_not): New function.
1993 (ppc64_emit_equal): New function.
1994 (ppc64_emit_less_signed): New function.
1995 (ppc64_emit_less_unsigned): New function.
1996 (ppc64_emit_ref): New function.
1997 (ppc64_emit_const): New function.
1998 (ppc64v1_emit_reg): New function.
1999 (ppc64v2_emit_reg): New function.
2000 (ppc64_emit_pop): New function.
2001 (ppc64_emit_stack_flush): New function.
2002 (ppc64_emit_swap): New function.
2003 (ppc64v1_emit_call): New function.
2004 (ppc64v2_emit_call): New function.
2005 (ppc64v1_emit_int_call_1): New function.
2006 (ppc64v2_emit_int_call_1): New function.
2007 (ppc64v1_emit_void_call_2): New function.
2008 (ppc64v2_emit_void_call_2): New function.
2009 (ppc64_emit_if_goto): New function.
2010 (ppc64_emit_eq_goto): New function.
2011 (ppc64_emit_ne_goto): New function.
2012 (ppc64_emit_lt_goto): New function.
2013 (ppc64_emit_le_goto): New function.
2014 (ppc64_emit_gt_goto): New function.
2015 (ppc64_emit_ge_goto): New function.
2016 (ppc64v1_emit_ops_impl): New static variable.
2017 (ppc64v2_emit_ops_impl): New static variable.
2018 (ppc_emit_ops): New function.
2019 (linux_low_target): Wire in ppc_emit_ops.
2020
a2174ba4
MK
20212016-03-31 Wei-cheng Wang <cole945@gmail.com>
2022 Marcin Kościelnicki <koriakin@0x04.net>
2023
2024 PR/17221
2025 * Makefile.in: Add powerpc-*-ipa.o
2026 * configure.srv: Add ipa_obj for powerpc*-linux.
2027 * linux-ppc-ipa.c: New file.
2028 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2029 includes.
2030 (PPC_FIELD): New macro.
2031 (PPC_SEXT): New macro.
2032 (PPC_OP6): New macro.
2033 (PPC_BO): New macro.
2034 (PPC_LI): New macro.
2035 (PPC_BD): New macro.
2036 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2037 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2038 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2039 (ppc_get_thread_area): New function.
2040 (is_elfv2_inferior): New function.
2041 (gen_ds_form): New function.
2042 (GEN_STD): New macro.
2043 (GEN_STDU): New macro.
2044 (GEN_LD): New macro.
2045 (GEN_LDU): New macro.
2046 (gen_d_form): New function.
2047 (GEN_ADDI): New macro.
2048 (GEN_ADDIS): New macro.
2049 (GEN_LI): New macro.
2050 (GEN_LIS): New macro.
2051 (GEN_ORI): New macro.
2052 (GEN_ORIS): New macro.
2053 (GEN_LWZ): New macro.
2054 (GEN_STW): New macro.
2055 (GEN_STWU): New macro.
2056 (gen_xfx_form): New function.
2057 (GEN_MFSPR): New macro.
2058 (GEN_MTSPR): New macro.
2059 (GEN_MFCR): New macro.
2060 (GEN_MTCR): New macro.
2061 (GEN_SYNC): New macro.
2062 (GEN_LWSYNC): New macro.
2063 (gen_x_form): New function.
2064 (GEN_OR): New macro.
2065 (GEN_MR): New macro.
2066 (GEN_LWARX): New macro.
2067 (GEN_STWCX): New macro.
2068 (GEN_CMPW): New macro.
2069 (gen_md_form): New function.
2070 (GEN_RLDICL): New macro.
2071 (GEN_RLDICR): New macro.
2072 (gen_i_form): New function.
2073 (GEN_B): New macro.
2074 (GEN_BL): New macro.
2075 (gen_b_form): New function.
2076 (GEN_BNE): New macro.
2077 (GEN_LOAD): New macro.
2078 (GEN_STORE): New macro.
2079 (gen_limm): New function.
2080 (gen_atomic_xchg): New function.
2081 (gen_call): New function.
2082 (ppc_relocate_instruction): New function.
2083 (ppc_install_fast_tracepoint_jump_pad): New function.
2084 (ppc_get_min_fast_tracepoint_insn_len): New function.
2085 (ppc_get_ipa_tdesc_idx): New function.
2086 (the_low_target): Wire in the new functions.
2087 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2088 tdescs.
2089 * linux-ppc-tdesc.h: New file.
2090
a13c4696
MK
20912016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2092
2093 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2094 (alloc_jump_pad_buffer): New function.
2095 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2096 (alloc_jump_pad_buffer): New function.
2097 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2098 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2099 (alloc_jump_pad_buffer): New function.
2100 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2101 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2102 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2103 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2104
1cda1512
MK
21052016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2106
2107 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2108 * linux-amd64-ipa.c: Likewise.
2109 * linux-i386-ipa.c: Likewise.
2110 * linux-s390-ipa.c: Likewise.
2111 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2112 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2113 set_trace_state_variable_value_ptr.
2114 (struct ipa_sym_addresses): Likewise.
2115 (symbol_list): Likewise.
2116 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2117 accessing gdb_collect directly.
2118 (gdb_collect_ptr_type): New typedef.
2119 (get_raw_reg_ptr_type): New typedef.
2120 (get_trace_state_variable_value_ptr_type): New typedef.
2121 (set_trace_state_variable_value_ptr_type): New typedef.
2122 (gdb_collect_ptr): New global.
2123 (get_raw_reg_ptr): New global.
2124 (get_trace_state_variable_value_ptr): New global.
2125 (set_trace_state_variable_value_ptr): New global.
2126 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2127 accessing get_raw_reg directly.
2128 (get_get_tsv_func_addr): Likewise for
2129 get_trace_state_variable_value_ptr.
2130 (get_set_tsv_func_addr): Likewise for
2131 set_trace_state_variable_value_ptr.
2132 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2133
72fb5488
SM
21342016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2135
2136 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2137
28170b88
MK
21382016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2139
2140 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2141 packets.
2142 (relocate_instruction): Remove own_buf.
2143 * server.c (own_buf): Make global.
2144 (handle_v_requests): Make global.
2145 * server.h (own_buf): New declaration.
2146 (handle_v_requests): New prototype.
2147
f39e8743
MK
21482016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2149
2150 PR 18377
2151 * linux-s390-low.c (add_insns): New function.
2152 (s390_emit_prologue): New function.
2153 (s390_emit_epilogue): New function.
2154 (s390_emit_add): New function.
2155 (s390_emit_sub): New function.
2156 (s390_emit_mul): New function.
2157 (s390_emit_lsh): New function.
2158 (s390_emit_rsh_signed): New function.
2159 (s390_emit_rsh_unsigned): New function.
2160 (s390_emit_ext): New function.
2161 (s390_emit_log_not): New function.
2162 (s390_emit_bit_and): New function.
2163 (s390_emit_bit_or): New function.
2164 (s390_emit_bit_xor): New function.
2165 (s390_emit_bit_not): New function.
2166 (s390_emit_equal): New function.
2167 (s390_emit_less_signed): New function.
2168 (s390_emit_less_unsigned): New function.
2169 (s390_emit_ref): New function.
2170 (s390_emit_if_goto): New function.
2171 (s390_emit_goto): New function.
2172 (s390_write_goto_address): New function.
2173 (s390_emit_litpool): New function.
2174 (s390_emit_const): New function.
2175 (s390_emit_call): New function.
2176 (s390_emit_reg): New function.
2177 (s390_emit_pop): New function.
2178 (s390_emit_stack_flush): New function.
2179 (s390_emit_zero_ext): New function.
2180 (s390_emit_swap): New function.
2181 (s390_emit_stack_adjust): New function.
2182 (s390_emit_set_r2): New function.
2183 (s390_emit_int_call_1): New function.
2184 (s390_emit_void_call_2): New function.
2185 (s390_emit_eq_goto): New function.
2186 (s390_emit_ne_goto): New function.
2187 (s390_emit_lt_goto): New function.
2188 (s390_emit_le_goto): New function.
2189 (s390_emit_gt_goto): New function.
2190 (s390_emit_ge_goto): New function.
2191 (s390x_emit_prologue): New function.
2192 (s390x_emit_epilogue): New function.
2193 (s390x_emit_add): New function.
2194 (s390x_emit_sub): New function.
2195 (s390x_emit_mul): New function.
2196 (s390x_emit_lsh): New function.
2197 (s390x_emit_rsh_signed): New function.
2198 (s390x_emit_rsh_unsigned): New function.
2199 (s390x_emit_ext): New function.
2200 (s390x_emit_log_not): New function.
2201 (s390x_emit_bit_and): New function.
2202 (s390x_emit_bit_or): New function.
2203 (s390x_emit_bit_xor): New function.
2204 (s390x_emit_bit_not): New function.
2205 (s390x_emit_equal): New function.
2206 (s390x_emit_less_signed): New function.
2207 (s390x_emit_less_unsigned): New function.
2208 (s390x_emit_ref): New function.
2209 (s390x_emit_if_goto): New function.
2210 (s390x_emit_const): New function.
2211 (s390x_emit_call): New function.
2212 (s390x_emit_reg): New function.
2213 (s390x_emit_pop): New function.
2214 (s390x_emit_stack_flush): New function.
2215 (s390x_emit_zero_ext): New function.
2216 (s390x_emit_swap): New function.
2217 (s390x_emit_stack_adjust): New function.
2218 (s390x_emit_int_call_1): New function.
2219 (s390x_emit_void_call_2): New function.
2220 (s390x_emit_eq_goto): New function.
2221 (s390x_emit_ne_goto): New function.
2222 (s390x_emit_lt_goto): New function.
2223 (s390x_emit_le_goto): New function.
2224 (s390x_emit_gt_goto): New function.
2225 (s390x_emit_ge_goto): New function.
2226 (s390_emit_ops): New function.
2227 (struct linux_target_ops): Fill in emit_ops hook.
2228
abd9baf9
MK
22292016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2230
2231 PR 18377
2232 * Makefile.in: Add s390 IPA files.
2233 * configure.srv: Build IPA for s390.
2234 * linux-s390-ipa.c: New file.
2235 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2236 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2237 (tdesc_s390_linux32): Likewise.
2238 (init_registers_s390_linux32v1): Likewise.
2239 (tdesc_s390_linux32v1): Likewise.
2240 (init_registers_s390_linux32v2): Likewise.
2241 (tdesc_s390_linux32v2): Likewise.
2242 (init_registers_s390_linux64): Likewise.
2243 (tdesc_s390_linux64): Likewise.
2244 (init_registers_s390_linux64v1): Likewise.
2245 (tdesc_s390_linux64v1): Likewise.
2246 (init_registers_s390_linux64v2): Likewise.
2247 (tdesc_s390_linux64v2): Likewise.
2248 (init_registers_s390_te_linux64): Likewise.
2249 (tdesc_s390_te_linux64): Likewise.
2250 (init_registers_s390_vx_linux64): Likewise.
2251 (tdesc_s390_vx_linux64): Likewise.
2252 (init_registers_s390_tevx_linux64): Likewise.
2253 (tdesc_s390_tevx_linux64): Likewise.
2254 (init_registers_s390x_linux64): Likewise.
2255 (tdesc_s390x_linux64): Likewise.
2256 (init_registers_s390x_linux64v1): Likewise.
2257 (tdesc_s390x_linux64v1): Likewise.
2258 (init_registers_s390x_linux64v2): Likewise.
2259 (tdesc_s390x_linux64v2): Likewise.
2260 (init_registers_s390x_te_linux64): Likewise.
2261 (tdesc_s390x_te_linux64): Likewise.
2262 (init_registers_s390x_vx_linux64): Likewise.
2263 (tdesc_s390x_vx_linux64): Likewise.
2264 (init_registers_s390x_tevx_linux64): Likewise.
2265 (tdesc_s390x_tevx_linux64): Likewise.
2266 (have_hwcap_s390_vx): New static variable.
2267 (s390_arch_setup): Fill have_hwcap_s390_vx.
2268 (s390_get_thread_area): New function.
2269 (s390_ft_entry_gpr_esa): New const.
2270 (s390_ft_entry_gpr_zarch): New const.
2271 (s390_ft_entry_misc): New const.
2272 (s390_ft_entry_fr): New const.
2273 (s390_ft_entry_vr): New const.
2274 (s390_ft_main_31): New const.
2275 (s390_ft_main_64): New const.
2276 (s390_ft_exit_fr): New const.
2277 (s390_ft_exit_vr): New const.
2278 (s390_ft_exit_misc): New const.
2279 (s390_ft_exit_gpr_esa): New const.
2280 (s390_ft_exit_gpr_zarch): New const.
2281 (append_insns): New function.
2282 (s390_relocate_instruction): New function.
2283 (s390_install_fast_tracepoint_jump_pad): New function.
2284 (s390_get_min_fast_tracepoint_insn_len): New function.
2285 (s390_get_ipa_tdesc_idx): New function.
2286 (struct linux_target_ops): Wire in the above functions.
2287 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2288 * linux-s390-tdesc.h: New file.
2289
a4105d04
MK
22902016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2291
2292 * linux-s390-low.c (s390_supports_tracepoints): New function.
2293 (struct linux_target_ops): Fill supports_tracepoints hook.
2294
35ac8b3e
YQ
22952016-03-18 Yao Qi <yao.qi@linaro.org>
2296
2297 * linux-low.c (lwp_signal_can_be_delivered): New function.
2298 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2299
94610ec4
YQ
23002016-03-18 Yao Qi <yao.qi@linaro.org>
2301
2302 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2303 0 if signal is enqueued. Remove 'signal' from one debugging
2304 message. Move one debugging message to some lines below.
2305 Remove code setting 'signal' to 0.
2306
80aea927
YQ
23072016-03-18 Yao Qi <yao.qi@linaro.org>
2308
2309 * linux-low.c (linux_low_filter_event): Remove redundant
2310 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2311
b04fd3be
MK
23122016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2313
2314 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2315 (struct linux_target_ops): Wire in the above.
2316
c40c8d4b
YQ
23172016-03-03 Yao Qi <yao.qi@linaro.org>
2318
2319 * linux-low.c: Update comments to start_step_over.
2320
0f8288ae
YQ
23212016-03-03 Yao Qi <yao.qi@linaro.org>
2322
2323 PR server/19736
2324 * linux-low.c (handle_extended_wait): Set child suspended
2325 if event_lwp->bp_reinsert isn't zero.
2326
fdbd04a8
YQ
23272016-03-02 Yao Qi <yao.qi@linaro.org>
2328
2329 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2330 enqueue_pending_signal.
2331
6896a8fa
MK
23322016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2333
2334 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2335 is actually loaded.
2336
ab503087
MK
23372016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2338
2339 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2340 (s390_regmap_3264) [!__s390x__]: New global.
2341 (s390_collect_ptrace_register): Skip map entries containing -1.
2342 (s390_supply_ptrace_register): Ditto.
2343 (s390_fill_gprs_high): New function.
2344 (s390_store_gprs_high): New function.
2345 (s390_regsets): Add NT_S390_HIGH_GPRS.
2346 (s390_get_hwcap): Enable on 31-bit.
2347 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2348 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2349 Detect NT_S390_HIGH_GPRS.
2350 (s390_usrregs_info_3264): Enable on 31-bit.
2351 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2352 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2353
ae91f625
MK
23542016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2355
2356 PR gdb/13808
2357 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2358 * configure.srv: Ditto.
2359 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2360 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2361 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2362 (init_registers_amd64_linux): Remove prototype.
2363 (tdesc_amd64_linux): Remove declaration.
2364 (get_ipa_tdesc): New function.
2365 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2366 initialize remaining tdescs.
2367 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2368 (init_registers_i386_linux): Remove prototype.
2369 (tdesc_i386_linux): Remove declaration.
2370 (get_ipa_tdesc): New function.
2371 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2372 initialize remaining tdescs.
2373 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2374 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2375 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2376 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2377 (x86_get_ipa_tdesc_idx): New function.
2378 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2379 * linux-x86-tdesc.h: New file.
2380 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2381 (target_get_ipa_tdesc_idx): New macro.
2382 * tracepoint.c (ipa_tdesc_idx): New macro.
2383 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2384 (symbol_list): Add ipa_tdesc_idx.
2385 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2386 (ipa_tdesc): Remove.
2387 (ipa_tdesc_idx): New variable.
2388 (get_context_regcache): Use get_ipa_tdesc.
2389 (gdb_collect): Ditto.
2390 (gdb_probe): Ditto.
2391 * tracepoint.h (get_ipa_tdesc): New prototype.
2392 (ipa_tdesc): Remove.
2393
e7ad2f14
PA
23942016-02-24 Pedro Alves <palves@redhat.com>
2395
2396 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2397 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2398 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2399 Factor out common code between the USE_SIGTRAP_SIGINFO and
2400 !USE_SIGTRAP_SIGINFO blocks.
2401 (linux_low_filter_event): Call save_stop_reason instead of
2402 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2403 Update comments.
2404 (linux_wait_1): Update comments.
2405
657f9cde
WW
24062016-02-24 Wei-cheng Wang <cole945@gmail.com>
2407
2408 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2409 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2410 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2411 ppc_insert_point, ppc_remove_point.
2412
b00b61e1
MK
24132016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2414
2415 * linux-s390-low.c (s390_supports_z_point_type): New function.
2416 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2417
553cb527
YQ
24182016-02-16 Yao Qi <yao.qi@linaro.org>
2419
2420 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2421 PC. Get pc from regcache_read_pc.
2422
a5652c21
YQ
24232016-02-12 Yao Qi <yao.qi@linaro.org>
2424
2425 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2426 or linux_get_pc_32bit.
2427 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2428
ed443b61
YQ
24292016-02-12 Yao Qi <yao.qi@linaro.org>
2430
2431 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2432 arm_linux_get_next_pcs_fixup.
2433
020ecd38
MK
24342016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2435
2436 * tracepoint.c (x_tracepoint_action_download): Change
2437 write_inferior_data_ptr to write_inferior_data_pointer.
2438 (cmd_qtstart): Likewise.
2439 (write_inferior_data_ptr): Remove.
2440 (download_agent_expr): Change write_inferior_data_ptr to
2441 write_inferior_data_pointer.
2442 (download_tracepoint_1): Likewise.
2443 (download_tracepoint): Likewise.
2444 (download_trace_state_variables): Likewise.
2445
7cae9051
WW
24462016-02-11 Wei-cheng Wang <cole945@gmail.com>
2447 Marcin Kościelnicki <koriakin@0x04.net>
2448
2449 * tracepoint.c (struct tracepoint_action_ops): Remove.
2450 (struct tracepoint_action): Remove ops.
2451 (m_tracepoint_action_download, r_tracepoint_action_download)
2452 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2453 size and offset accordingly.
2454 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2455 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2456 (tracepoint_action_send, tracepoint_action_download): New functions.
2457 Helpers for trace action handlers.
2458 (add_tracepoint_action): Remove setup actions ops.
2459 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2460
9f6a71b4
YQ
24612016-02-10 Yao Qi <yao.qi@linaro.org>
2462
2463 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2464
1e94266c
SM
24652016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2466
2467 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2468 to AC_OUTPUT.
2469 * configure: Regenerate.
2470
8adce034
SM
24712016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2472
2473 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2474 void * to gdb_byte *.
2475 * linux-low.c (siginfo_fixup): Likewise.
2476 (linux_xfer_siginfo): Likewise.
2477 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2478 Likewise.
2479 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2480
93813b37
WT
24812016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2482
2483 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2484 to srv_tgtobj.
2485 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2486 to srv_tgtobj.
2487 * linux-x86-low.c [__x86_64__]: Include
2488 "nat/amd64-linux-siginfo.h".
2489 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2490 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2491 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2492 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2493 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2494 (cpt_si_fd, si_timerid, si_overrun): Move from
2495 nat/amd64-linux-siginfo.c.
2496 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2497
8424cc97
SM
24982016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2499
2500 * server.c (skip_to_semicolon): Remove.
2501 (process_point_options): Use strchrnul instead of
2502 skip_to_semicolon.
2503
4d18591b
YQ
25042016-01-26 Yao Qi <yao.qi@linaro.org>
2505
2506 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2507 * linux-low.c (install_software_single_step_breakpoints): Don't
2508 call regcache_read_pc.
2509 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2510 argument pc.
2511
d8020970
YQ
25122016-01-26 Yao Qi <yao.qi@linaro.org>
2513
2514 * linux-low.c (install_software_single_step_breakpoints): Call
2515 regcache_read_pc instead of get_pc.
2516
8b207339
YQ
25172016-01-26 Yao Qi <yao.qi@linaro.org>
2518
2519 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2520 (unblock_async_io): Rename to ...
2521 (block_unblock_async_io): ... it. New function.
2522 (enable_async_io): Don't install SIGIO handler. Unblock it
2523 instead.
2524 (disable_async_io): Don't ignore SIGIO. Block it instead.
2525 (initialize_async_io): Install SIGIO handler. Don't call
2526 unblock_async_io.
2527
18879fef
YQ
25282016-01-26 Yao Qi <yao.qi@linaro.org>
2529
2530 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2531 first character is '\003', call *the_target->request_interrupt.
2532
a0f8e08a
YQ
25332016-01-25 Yao Qi <yao.qi@linaro.org>
2534
2535 * remote-utils.c (new_thread_notify): Remove.
2536 (dead_thread_notify): Likewise.
2537 * remote-utils.h (new_thread_notify): Remove declaration.
2538 (dead_thread_notify): Likewise.
2539
cc5fd9ab
MK
25402016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2541
2542 * gdb.trace/pending.exp: Fix expected message on continue.
2543
99e8eb11
MK
25442016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2545
2546 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2547 it works properly on big-endian machines where sizeof (CORE_ADDR)
2548 != sizeof (void *).
2549
a994041d
PA
25502016-01-21 Pedro Alves <palves@redhat.com>
2551
2552 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2553 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2554 * configure: Regenerate.
2555
f7a6a40d
YQ
25562016-01-21 Yao Qi <yao.qi@linaro.org>
2557
2558 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2559 is_thumb and set it according to CPSR saved on the stack.
2560 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2561 arm_sigreturn_next_pc.
2562
6f69e520
YQ
25632016-01-18 Yao Qi <yao.qi@linaro.org>
2564
2565 * linux-low.c (linux_set_pc_64bit): New function.
2566 (linux_get_pc_64bit): New function.
2567 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2568 Declare.
2569 * linux-sparc-low.c (debug_threads): Remove declaration.
2570 (sparc_get_pc): Remove.
2571 (the_low_target): Use linux_get_pc_64bit instead of
2572 sparc_get_pc.
2573 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2574 (the_low_target): Use linux_get_pc_64bit and
2575 linux_set_pc_64bit.
2576
276d4552
YQ
25772016-01-18 Yao Qi <yao.qi@linaro.org>
2578
2579 * linux-arm-low.c (debug_threads): Remove declaration.
2580 (arm_get_pc, arm_set_pc): Remove.
2581 (the_low_target): Use linux_get_pc_32bit and
2582 linux_set_pc_32bit.
2583 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2584 (the_low_target): Use linux_get_pc_32bit and
2585 linux_set_pc_32bit.
2586 * linux-cris-low.c (debug_threads): Remove declaration.
2587 (cris_get_pc, cris_set_pc,): Remove.
2588 (the_low_target): Use linux_get_pc_32bit and
2589 linux_set_pc_32bit.
2590 * linux-crisv32-low.c (debug_threads): Remove declaration.
2591 (cris_get_pc, cris_set_pc): Remove.
2592 (the_low_target): Use linux_get_pc_32bit and
2593 linux_set_pc_32bit.
2594 * linux-low.c: Include inttypes.h.
2595 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2596 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2597 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2598 (the_low_target): Use linux_get_pc_32bit and
2599 linux_set_pc_32bit.
2600 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2601 (the_low_target): Use linux_get_pc_32bit and
2602 linux_set_pc_32bit.
2603 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2604 (the_low_target): Use linux_get_pc_32bit and
2605 linux_set_pc_32bit.
2606 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2607 (the_low_target): Use linux_get_pc_32bit and
2608 linux_set_pc_32bit.
2609 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2610 (the_low_target): Use linux_get_pc_32bit and
2611 linux_set_pc_32bit.
2612
eb0edac8
GB
26132016-01-18 Gary Benson <gbenson@redhat.com>
2614
2615 * configure.ac (AC_FUNC_FORK): New check.
2616 * config.in: Regenerate.
2617 * configure: Likewise.
2618
1b451dda
YQ
26192016-01-14 Yao Qi <yao.qi@linaro.org>
2620
2621 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2622 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2623 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2624 arm_get_next_pcs_ctor.
2625
82075af2
JS
26262016-01-12 Josh Stone <jistone@redhat.com>
2627 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2628
2629 * inferiors.h: Include "gdb_vecs.h".
2630 (struct process_info): Add syscalls_to_catch.
2631 * inferiors.c (remove_process): Free syscalls_to_catch.
2632 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2633 syscall_return stops.
2634 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2635 * server.c (handle_general_set): Handle QCatchSyscalls.
2636 (handle_query): Report support for QCatchSyscalls.
2637 * target.h (struct target_ops): Add supports_catch_syscall.
2638 (target_supports_catch_syscall): New macro.
2639 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2640 (struct lwp_info): Add syscall_state.
2641 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2642 Maintain syscall_state and syscalls_to_catch across exec.
2643 (get_syscall_trapinfo): New function, proxy to the_low_target.
2644 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2645 (linux_low_filter_event): Toggle syscall_state entry/return for
2646 syscall traps, and set it ignored for all others.
2647 (gdb_catching_syscalls_p): New function.
2648 (gdb_catch_this_syscall_p): New function.
2649 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2650 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2651 (linux_supports_catch_syscall): New function.
2652 (linux_target_ops): Install it.
2653 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2654 (the_low_target): Install it.
2655
8f13a3ce
MF
26562016-01-12 Mike Frysinger <vapier@gentoo.org>
2657
2658 * acinclude.m4: Include new ../warning.m4 file.
2659 * configure: Regenerated.
2660 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2661
5b3da067
MF
26622016-01-12 Mike Frysinger <vapier@gentoo.org>
2663
2664 * ax.c (is_goto_target): Mark static.
2665 * linux-low.c (register_addr): Likewise.
2666 (linux_fetch_registers, linux_store_registers): Likewise.
2667 * mem-break.c (any_persistent_commands): Fix old prototype.
2668 (add_commands_to_breakpoint): Mark static.
2669 * regcache.c (find_register_by_name): Delete unused func.
2670 * remote-utils.c (hex_or_minus_one): Mark static.
2671 * server.c (monitor_show_help): Mark static.
2672 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2673 handle_v_requests): Likewise.
2674
bc504a31
PA
26752016-01-12 Pedro Alves <palves@redhat.com>
2676
2677 Remove use of the registered trademark symbol throughout.
2678
5a0dd67a
YQ
26792016-01-08 Yao Qi <yao.qi@linaro.org>
2680
2681 * remote-utils.c (getpkt): If c is '\003', call target hook
2682 request_interrupt.
2683
b2ca446f
YQ
26842016-01-06 Yao Qi <yao.qi@linaro.org>
2685
2686 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2687 linux-aarch32-low.c.
2688 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2689 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2690 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2691 (thumb2_breakpoint): Declare.
2692 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2693 linux-aarch32-low.h.
2694 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2695 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2696 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2697
edd88788
JB
26982016-01-01 Joel Brobecker <brobecker@adacore.com>
2699
2700 * gdbreplay.c (gdbreplay_version): Change copyright year in
2701 version message.
2702 * server.c (gdbserver_version): Likewise.
2703
65da7f14
PP
27042015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2705
2706 * server.c (crc32_table): Delete.
2707 (crc32): Use libiberty's xcrc32 function.
2708
4abd5ed2
JB
27092015-12-22 Joel Brobecker <brobecker@adacore.com>
2710
2711 * lynx-low.c (lynx_delete_thread_callback): New function.
2712 (lynx_mourn): Properly delete our process and all of its
2713 threads. Remove call to clear_inferiors.
2714
0e50fe5c
JB
27152015-12-22 Joel Brobecker <brobecker@adacore.com>
2716
2717 * target.c (thread_search_callback): Add check that
2718 the thread_stopped target callback is not NULL before
2719 calling it.
2720
35adc03f
YQ
27212015-12-21 Yao Qi <yao.qi@linaro.org>
2722
2723 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2724 arm breakpoint.
2725
bd2b2909
AT
27262015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2727
2728 * server.c (handle_query): Call target_supports_software_single_step.
2729
7fe5e27e
AT
27302015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2731
2732 * linux-low.c (single_step): New function.
2733 (linux_resume_one_lwp_throw): Call single_step.
2734 (start_step_over): Likewise.
2735
d9311bfa
AT
27362015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2737
2738 * Makefile.in (SFILES): Append arch/arm-linux.c,
2739 arch/arm-get-next-pcs.c.
2740 (arm-linux.o): New rule.
2741 (arm-get-next-pcs.o): New rule.
2742 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2743 arm-linux.o.
2744 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2745 to linux-aarch32-low.c.
2746 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2747 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2748 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2749 (thumb2_breakpoint_len): Likewise.
2750 (arm_is_thumb_mode): Make non-static.
2751 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2752 from linux-aarch32-low.c.
2753 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2754 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2755 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2756 (thumb2_breakpoint_len): Likewise.
2757 (arm_is_thumb_mode): New declaration.
2758 * linux-arm-low.c: Include arch/arm-linux.h
2759 aarch/arm-get-next-pcs.h, sys/syscall.h.
2760 (get_next_pcs_ops): New struct.
2761 (get_next_pcs_addr_bits_remove): New function.
2762 (get_next_pcs_is_thumb): New function.
2763 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2764 (arm_sigreturn_next_pc): Likewise.
2765 (get_next_pcs_syscall_next_pc): Likewise.
2766 (arm_gdbserver_get_next_pcs): Likewise.
2767 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2768 Initialize.
2769 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2770 * server.h: Include gdb_vecs.h.
2771
68ce2059
AT
27722015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2773
2774 * Makefile.in (SFILES): Append common/common-regcache.c.
2775 (OBS): Append common-regcache.o.
2776 (common-regcache.o): New rule.
2777 * regcache.c (init_register_cache): Initialize cache to
2778 REG_UNAVAILABLE.
2779 (regcache_raw_read_unsigned): New function.
2780 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2781 register_status enum.
2782
fa5308bd
AT
27832015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2784
2785 * linux-aarch64-low.c (the_low_targets): Rename
2786 breakpoint_reinsert_addr to get_next_pcs.
2787 * linux-arm-low.c (the_low_targets): Likewise.
2788 * linux-bfin-low.c (the_low_targets): Likewise.
2789 * linux-cris-low.c (the_low_targets): Likewise.
2790 * linux-crisv32-low.c (the_low_targets): Likewise.
2791 * linux-low.c (can_software_single_step): Likewise.
2792 (install_software_single_step_breakpoints): New function.
2793 (start_step_over): Use install_software_single_step_breakpoints.
2794 * linux-low.h: New CORE_ADDR vector.
2795 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2796 get_next_pcs.
2797 * linux-mips-low.c (the_low_targets): Likewise.
2798 * linux-nios2-low.c (the_low_targets): Likewise.
2799 * linux-sparc-low.c (the_low_targets): Likewise.
2800
4a6ed09b
PA
28012015-12-17 Pedro Alves <palves@redhat.com>
2802
2803 * linux-low.c (linux_kill_one_lwp): Remove references to
2804 LinuxThreads.
2805 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2806 to 'kill'.
2807 (linux_init_signals): Delete.
2808 (initialize_low): Adjust.
2809 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2810
7544db95
PA
28112015-12-16 Pedro Alves <palves@redhat.com>
2812
2813 * configure.ac (compiler warning flags): When testing a
2814 -Wno-foo option, check whether -Wfoo works instead.
2815 * configure: Regenerate.
2816
8020350c
DB
28172015-12-11 Don Breazeal <donb@codesourcery.com>
2818
2819 * server.c (process_serial_event): Don't exit from gdbserver
2820 in remote mode if there are still active inferiors.
2821
db91f502
YQ
28222015-12-11 Yao Qi <yao.qi@linaro.org>
2823
2824 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2825 arm_breakpoint_at if the process is 32-bit.
2826
b37a6290
YQ
28272015-12-11 Yao Qi <yao.qi@linaro.org>
2828
2829 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2830 arm breakpoint.
2831
17b1509a
YQ
28322015-12-07 Yao Qi <yao.qi@linaro.org>
2833
2834 * configure.srv: Append arm.o to srv_tgtobj for
2835 aarch64*-*-linux* target.
2836 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2837 from linux-arm-low.c.
2838 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2839 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2840 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2841 (thumb2_breakpoint_len): Likewise.
2842 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2843 (arm_breakpoint_kinds): Likewise.
2844 (arm_breakpoint_kind_from_pc): Likewise.
2845 (arm_sw_breakpoint_from_kind): Likewise.
2846 (arm_breakpoint_kind_from_current_state): Likewise.
2847 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2848 (arm_sw_breakpoint_from_kind): Declare.
2849 (arm_breakpoint_kind_from_current_state): Declare.
2850 (arm_breakpoint_at): Declare.
2851 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2852 arm_sw_breakpoint_from_kind if process is 32-bit.
2853 (aarch64_breakpoint_kind_from_pc): New function.
2854 (aarch64_breakpoint_kind_from_current_state): New function.
2855 (the_low_target): Initialize fields breakpoint_kind_from_pc
2856 and breakpoint_kind_from_current_state.
2857 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2858 linux-aarch32-low.c.
2859 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2860 (arm_breakpoint, arm_breakpoint_len): Likewise.
2861 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2862 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2863 (arm_is_thumb_mode): Likewise.
2864 (arm_breakpoint_at): Likewise.
2865 (arm_breakpoint_kind_from_pc): Likewise.
2866 (arm_sw_breakpoint_from_kind): Likewise.
2867 (arm_breakpoint_kind_from_current_state): Likewise.
2868
2869 Revert:
2870 2015-08-04 Yao Qi <yao.qi@linaro.org>
2871
2872 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2873 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2874 * server.c (extended_protocol): Remove "static".
2875 * server.h (extended_protocol): Declare it.
2876
ece66d65
JS
28772015-12-04 Josh Stone <jistone@redhat.com>
2878
2879 * target.h (struct target_ops) <arch_setup>: Rename to ...
2880 (struct target_ops) <post_create_inferior>: ... this.
2881 (target_arch_setup): Rename to ...
2882 (target_post_create_inferior): ... this, calling post_create_inferior.
2883 * server.c (start_inferior): Update target_arch_setup calls to
2884 target_post_create_inferior.
2885 * linux-low.c (linux_low_ptrace_options): Forward declare.
2886 (linux_arch_setup): Update its comment for general use.
2887 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2888 (struct linux_target_ops): Use linux_post_create_inferior.
2889 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2890 to post_create_inferior.
2891 * nto-low.c (struct nto_target_ops): Likewise.
2892 * spu-low.c (struct spu_target_ops): Likewise.
2893 * win32-low.c (struct win32_target_ops): Likewise.
2894
e58c48b4
AT
28952015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2896
2897 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2898
fbec8956
AT
28992015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2900
2901 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2902 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2903 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2904 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2905 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2906 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2907 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2908 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2909 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2910 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2911 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2912 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2913
9b4c5f87
AT
29142015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2915
2916 * linux-low.c (linux_look_up_symbols): Don't call
2917 linux_supports_traceclone.
2918 * linux-low.h (thread_db_init): Remove use_events argument.
2919 * thread-db.c (thread_db_use_event): Remove global variable.
2920 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2921 (struct thread_db) <td_create_bp>: Remove field.
2922 (thread_db_create_event): Remove function.
2923 (thread_db_enable_reporting): Likewise.
2924 (find_one_thread): Don't check for thread_db_use_events.
2925 (attach_thread): Likewise.
2926 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2927 (try_thread_db_load_1): Don't check for thread_db_use_events.
2928 (thread_db_init): Remove use_events argument and thread events
2929 handling.
2930 (remove_thread_event_breakpoints): Remove function.
2931 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2932
7d00775e
AT
29332015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2934
2935 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2936 New function.
2937 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2938 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2939 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2940 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2941 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2942 Initialize.
2943 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2944 New function.
2945 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2946 * linux-low.c (can_hardware_single_step): Use
2947 supports_hardware_single_step.
2948 (can_software_single_step): New function.
2949 (start_step_over): Call can_software_single_step.
2950 (linux_supports_hardware_single_step): New function.
2951 (struct target_ops) <supports_software_single_step>: Initialize.
2952 * linux-low.h (struct linux_target_ops)
2953 <supports_hardware_single_step>: Initialize.
2954 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2955 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2956 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2957 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2958 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2959 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2960 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2961 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2962 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2963 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2964 Initialize.
2965 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2966 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2967 Initialize.
2968 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2969 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2970 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2971 New function.
2972 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2973 * target.h (struct target_ops): <supports_software_single_step>:
2974 New field.
2975 (target_supports_software_single_step): New macro.
2976
2d97cd35
AT
29772015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2978
2979 * linux-low.c (linux_wait_1): Fix pc advance condition.
2980 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2981 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2982
769ef81f
AT
29832015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2984
2985 * linux-arm-low.c (arm_is_thumb_mode): New function.
2986 (arm_breakpoint_at): Use arm_is_thumb_mode.
2987 (arm_breakpoint_kind_from_current_state): New function.
2988 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2989 Initialize.
2990 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2991 (linux_breakpoint_kind_from_current_state): New function.
2992 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2993 * linux-low.h (struct linux_target_ops)
2994 <breakpoint_kind_from_current_state>: New field.
2995 * target.h (struct target_ops): Likewise.
2996 (target_breakpoint_kind_from_current_state): New macro.
2997
1bebeeca
PA
29982015-11-30 Pedro Alves <palves@redhat.com>
2999
3000 * linux-low.c (linux_resume): Wake up the event loop before
3001 returning.
3002
a67a9fae
PA
30032015-11-30 Pedro Alves <palves@redhat.com>
3004
3005 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3006 check.
3007 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3008 to -1.
3009 * target.c (struct thread_search): New structure.
3010 (thread_search_callback): New function.
3011 (prev_general_thread): New global.
3012 (prepare_to_access_memory, done_accessing_memory): New functions.
3013 * target.h (prepare_to_access_memory, done_accessing_memory):
3014 Replace macros with function declarations.
3015
f2faf941
PA
30162015-11-30 Pedro Alves <palves@redhat.com>
3017
3018 PR 14618
3019 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3020 report TARGET_WAITKIND_NO_RESUMED.
3021 * remote-utils.c (prepare_resume_reply): Handle
3022 TARGET_WAITKIND_NO_RESUMED.
3023 * server.c (report_no_resumed): New global.
3024 (handle_query) <qSupported>: Handle "no-resumed+". Report
3025 "no-resumed+" support.
3026 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3027 return error if the client doesn't support no-resumed events.
3028 (push_stop_notification): New function.
3029 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3030 events if the client supports them.
3031
a681f9c9
PA
30322015-11-30 Pedro Alves <palves@redhat.com>
3033
3034 * linux-low.c (thread_still_has_status_pending_p): Don't check
3035 vCont;t here.
3036 (lwp_resumed): New function.
3037 (status_pending_p_callback): Return early if the LWP is not
3038 supposed to be resumed.
3039
65706a29
PA
30402015-11-30 Pedro Alves <palves@redhat.com>
3041
3042 * linux-low.c (handle_extended_wait): Assert that the LWP's
3043 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3044 thread create events, leave the new child's status pending.
3045 (linux_low_filter_event): If GDB wants to hear about thread exit
3046 events, leave the LWP marked dead and don't delete it.
3047 (linux_wait_for_event_filtered): Don't check for thread exit.
3048 (filter_exit_event): New function.
3049 (linux_wait_1): Use it, when returning an exit event.
3050 (linux_resume_one_lwp_throw): Assert that the LWP's
3051 waitstatus is TARGET_WAITKIND_IGNORE.
3052 * remote-utils.c (prepare_resume_reply): Handle
3053 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3054 * server.c (report_thread_events): New global.
3055 (handle_general_set): Handle QThreadEvents.
3056 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3057 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3058 TARGET_WAITKIND_THREAD_EXITED.
3059 * server.h (report_thread_events): Declare.
3060
56cf4bed
PA
30612015-11-30 Pedro Alves <palves@redhat.com>
3062
3063 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3064 the thread's last_resume_kind was resume_stop.
3065
500c1d85
PA
30662015-11-30 Pedro Alves <palves@redhat.com>
3067
3068 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3069 before returning.
3070
de979965
PA
30712015-11-30 Pedro Alves <palves@redhat.com>
3072
3073 * server.c (handle_v_requests): Handle vCtrlC.
3074
34c65914
PA
30752015-11-30 Pedro Alves <palves@redhat.com>
3076
3077 * gdbthread.h (find_any_thread_of_pid): Declare.
3078 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3079 functions.
3080 * server.c (handle_query): If current_thread is NULL, look for
3081 another thread of the selected process.
3082
79efa585 30832015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 3084 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
3085
3086 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3087 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3088 name in reply.
3089 * target.h (struct target_ops) <thread_name>: New field.
3090 (target_thread_name): New macro.
3091
80d82c19
JB
30922015-11-23 Joel Brobecker <brobecker@adacore.com>
3093
3094 * regcache.h (regcache_invalidate_pid): Add declaration.
3095 * regcache.c (regcache_invalidate_pid): New function, extracted
3096 from regcache_invalidate.
3097 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3098 Add trivial documentation comment.
3099 * lynx-low.c: Use regcache_invalidate_pid instead of
3100 regcache_invalidate.
3101
64da5dd5
JB
31022015-11-23 Joel Brobecker <brobecker@adacore.com>
3103
3104 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3105 and Elf64_auxv_t if the target is Android.
3106
37ce4055
DE
31072015-11-22 Doug Evans <xdje42@gmail.com>
3108
3109 * target.h: #include <sys/types.h>.
3110
06e03fff
PA
31112015-11-19 Pedro Alves <palves@redhat.com>
3112
3113 * linux-low.c (linux_process_qsupported): Change prototype.
3114 Adjust.
3115 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3116 Change prototype.
3117 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3118 and adjust to loop over all features.
3119 * server.c (handle_query) <qSupported>: Adjust to call
3120 target_process_qsupported once, passing it a vector of unprocessed
3121 features.
3122 * target.h (struct target_ops) <process_qsupported>: Change
3123 prototype.
3124 (target_process_qsupported): Adjust.
3125
9a084706
PA
31262015-11-19 Pedro Alves <palves@redhat.com>
3127
3128 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3129 mode.
3130 * configure: Regenerate.
3131
dad44a1f
PA
31322015-11-19 Pedro Alves <palves@redhat.com>
3133
3134 * configure: Regenerate.
3135
231c0592
YQ
31362015-11-19 Yao Qi <yao.qi@linaro.org>
3137
3138 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3139 type to uint32_t.
3140
6c1c9a8b
YQ
31412015-11-19 Yao Qi <yao.qi@linaro.org>
3142
3143 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3144 (struct aarch64_operand): Move enum out.
3145
9caa3311
YQ
31462015-11-19 Yao Qi <yao.qi@linaro.org>
3147
3148 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3149 struct user_fpsimd_state *.
3150 (aarch64_store_fpregset): Likewise.
3151
6a69a054
YQ
31522015-11-19 Yao Qi <yao.qi@linaro.org>
3153
3154 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3155 struct user_pt_regs *.
3156 (aarch64_store_gregset): Likewise.
3157
1798301e
PA
31582015-11-18 Pedro Alves <palves@redhat.com>
3159
3160 * Makefile.in (all_object_files): Add $IPA_OBJS.
3161
ce7715e2
PA
31622015-11-17 Pedro Alves <palves@redhat.com>
3163
3164 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3165 GDB_SIGNAL_0 and gdb_signal_to_string.
3166
c0879059
PA
31672015-11-17 Pedro Alves <palves@redhat.com>
3168
3169 * win32-low.c (handle_output_debug_string): Remove parameter.
3170 (win32_kill): Remove our_status local and adjust call to
3171 handle_output_debug_string.
3172 (get_child_debug_event): Adjust call to
3173 handle_output_debug_string.
3174
1996e237
SM
31752015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3176
3177 * linux-mips-low.c (mips_fill_gregset): Add cast.
3178 (mips_store_gregset): Likewise.
3179 (mips_fill_fpregset): Likewise.
3180 (mips_store_fpregset): Likewise.
3181
cbec665b
SM
31822015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3183
3184 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3185 priv.
3186
eb3e3c67
SM
31872015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3188
3189 * linux-mips-low.c (mips_linux_new_thread): Change type of
3190 watch_type to enum target_hw_bp_type.
3191
171de4b8
SM
31922015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3193
3194 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3195 Change return type to arm_hwbp_type.
3196
04248ead
SM
31972015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3198
3199 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3200 (arm_store_gregset): Likewise.
3201 * linux-arm-low.c (arm_get_hwcap): Likewise.
3202 (arm_read_description): Likewise.
3203
04b3479c
SM
32042015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3205
3206 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3207
2bc84e8a
SM
32082015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3209
3210 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3211 (ppc_fill_vsxregset): Likewise.
3212 (ppc_store_vsxregset): Likewise.
3213 (ppc_fill_vrregset): Likewise.
3214 (ppc_store_vrregset): Likewise.
3215 (ppc_fill_evrregset): Likewise.
3216 (ppc_store_evrregset): Likewise.
3217
e6c5bb05
SM
32182015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3219
3220 * linux-ppc-low.c (ppc_usrregs_info): Remove
3221 forward-declaration.
3222 (ppc_arch_setup): Move lower in file.
3223
7ea45d72
SM
32242015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3225
3226 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3227 (ps_pdwrite): Likewise.
3228
69291610
HW
32292015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3230
3231 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3232 to after assert checks.
3233
b42945fd
SM
32342015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3235
3236 * proc-service.c (ps_pdread): Add/adjust casts.
3237 (ps_pdwrite): Add/adjust casts.
3238
d6f85c84
SM
32392015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3240
3241 * server.c (handle_search_memory_1): Cast return value of
3242 memmem.
3243
f98cd059
SM
32442015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3245
3246 * server.c (write_qxfer_response): Change type of data to
3247 gdb_byte *.
3248
d2412fa5
PA
32492015-10-29 Pedro Alves <palves@redhat.com>
3250
3251 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3252
c17414a2
PA
32532015-10-29 Pedro Alves <palves@redhat.com>
3254
3255 * tracepoint.c (clear_installed_tracepoints): Add casts.
3256
e053fbc4
PA
32572015-10-29 Pedro Alves <palves@redhat.com>
3258
3259 * server.c (handle_v_cont, process_serial_event): Add enum
3260 gdb_signal casts to signal parsing code.
3261
add67df8
PA
32622015-10-29 Pedro Alves <palves@redhat.com>
3263
3264 * linux-low.h (NULL_REGSET): Define.
3265 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3266 * linux-arm-low.c (arm_regsets): Likewise.
3267 * linux-crisv32-low.c (cris_regsets): Likewise.
3268 * linux-m68k-low.c (m68k_regsets): Likewise.
3269 * linux-mips-low.c (mips_regsets): Likewise.
3270 * linux-nios2-low.c (nios2_regsets): Likewise.
3271 * linux-ppc-low.c (ppc_regsets): Likewise.
3272 * linux-s390-low.c (s390_regsets): Likewise.
3273 * linux-sh-low.c (sh_regsets): Likewise.
3274 * linux-sparc-low.c (sparc_regsets): Likewise.
3275 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3276 * linux-tile-low.c (tile_regsets): Likewise.
3277 * linux-x86-low.c (x86_regsets): Likewise.
3278 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3279
50bc912a
PA
32802015-10-29 Pedro Alves <palves@redhat.com>
3281
3282 * linux-low.h (NULL_REGSET): Define.
3283 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3284 * linux-arm-low.c (arm_regsets): Likewise.
3285 * linux-crisv32-low.c (cris_regsets): Likewise.
3286 * linux-m68k-low.c (m68k_regsets): Likewise.
3287 * linux-mips-low.c (mips_regsets): Likewise.
3288 * linux-nios2-low.c (nios2_regsets): Likewise.
3289 * linux-ppc-low.c (ppc_regsets): Likewise.
3290 * linux-s390-low.c (s390_regsets): Likewise.
3291 * linux-sh-low.c (sh_regsets): Likewise.
3292 * linux-sparc-low.c (sparc_regsets): Likewise.
3293 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3294 * linux-tile-low.c (tile_regsets): Likewise.
3295 * linux-x86-low.c (x86_regsets): Likewise.
3296 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3297
682b2546
DE
32982015-10-26 Doug Evans <dje@google.com>
3299
3300 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3301
963843d4
DE
33022015-10-26 Doug Evans <dje@google.com>
3303
3304 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3305
d41401ac
DE
33062015-10-26 Doug Evans <dje@google.com>
3307
3308 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3309 for debug_printf.
3310 (attach_thread, find_new_threads_callback): Ditto.
3311
3db28855
AT
33122015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3313
3314 * mem-break.h (set_breakpoint_data): Remove.
3315
fb78e89c
AT
33162015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3317
3318 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3319 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3320 (initialize_low): Remove set_breakpoint_data call.
3321 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3322 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3323 (initialize_low): Remove set_breakpoint_data call.
3324 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3325 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3326 (initialize_low): Remove set_breakpoint_data call.
3327
2e6ee069
AT
33282015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3329
3330 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3331 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3332 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3333 * target.h (target_breakpoint_kind_from_pc): New macro.
3334
1652a986
AT
33352015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3336
3337 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3338 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3339 the default breakpoint kind.
3340
abeead09
AT
33412015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3342
3343 * linux-arm-low.c (arm_supports_z_point_type): Add software
3344 breakpoint support.
3345
b0b4b501
AT
33462015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3347
3348 * linux-arm-low.c: Refactor breakpoint definitions.
3349 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3350 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3351
8689682c
AT
33522015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3353
3354 * Makefile.in: Add arm.c/o.
3355 * configure.srv: Likewise.
3356 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3357 (arm_breakpoint_kind_from_pc): New function.
3358 (arm_sw_breakpoint_from_kind): Return proper kind.
3359 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3360
27165294
AT
33612015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3362
3363 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3364 removal.
3365 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3366 (struct raw_breakpoint) <size>: Remove.
3367 (struct raw_breakpoint) <kind>: Add.
3368 (bp_size): New function.
3369 (bp_opcode): Likewise.
3370 (find_raw_breakpoint_at): Adjust for kind.
3371 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3372 (remove_memory_breakpoint): Adjust for kind call bp_size.
3373 (set_raw_breakpoint_at): Adjust for kind.
3374 (set_breakpoint): Likewise.
3375 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3376 (delete_raw_breakpoint): Adjust for kind.
3377 (delete_breakpoint): Likewise.
3378 (find_gdb_breakpoint): Likewise.
3379 (set_gdb_breakpoint_1): Likewise.
3380 (set_gdb_breakpoint): Likewise.
3381 (delete_gdb_breakpoint_1): Likewise.
3382 (delete_gdb_breakpoint): Likewise.
3383 (uninsert_raw_breakpoint): Likewise.
3384 (reinsert_raw_breakpoint): Likewise.
3385 (set_breakpoint_data): Remove.
3386 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3387 (check_mem_read): Adjust for kind call bp_size.
3388 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3389 (clone_one_breakpoint): Adjust for kind.
3390 * mem-break.h (set_gdb_breakpoint): Likewise.
3391 (delete_gdb_breakpoint): Likewise.
3392 * server.c (process_serial_event): Likewise.
3393
dd373349
AT
33942015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3395
3396 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3397 (struct linux_target_ops) <breakpoint>: Remove.
3398 (struct linux_target_ops) <breakpoint_len>: Remove.
3399 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3400 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3401 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3402 (arm_sw_breakpoint_from_kind): New function.
3403 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3404 (struct linux_target_ops) <breakpoint>: Remove.
3405 (struct linux_target_ops) <breakpoint_len>: Remove.
3406 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3407 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3408 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3409 (struct linux_target_ops) <breakpoint>: Remove.
3410 (struct linux_target_ops) <breakpoint_len>: Remove.
3411 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3412 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3413 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3414 (struct linux_target_ops) <breakpoint>: Remove.
3415 (struct linux_target_ops) <breakpoint_len>: Remove.
3416 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3417 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3418 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3419 and sw_breakpoint_from_kind to increment the pc.
3420 (linux_breakpoint_kind_from_pc): New function.
3421 (linux_sw_breakpoint_from_kind): New function.
3422 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3423 (initialize_low): Call breakpoint_kind_from_pc and
3424 sw_breakpoint_from_kind to replace breakpoint_data/len.
3425 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3426 New field.
3427 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3428 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3429 (struct linux_target_ops) <breakpoint>: Remove.
3430 (struct linux_target_ops) <breakpoint_len>: Remove.
3431 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3432 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3433 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3434 (struct linux_target_ops) <breakpoint>: Remove.
3435 (struct linux_target_ops) <breakpoint_len>: Remove.
3436 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3437 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3438 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3439 (struct linux_target_ops) <breakpoint>: Remove.
3440 (struct linux_target_ops) <breakpoint_len>: Remove.
3441 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3442 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3443 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3444 (struct linux_target_ops) <breakpoint>: Remove.
3445 (struct linux_target_ops) <breakpoint_len>: Remove.
3446 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3447 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3448 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3449 (struct linux_target_ops) <breakpoint>: Remove.
3450 (struct linux_target_ops) <breakpoint_len>: Remove.
3451 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3452 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3453 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3454 (struct linux_target_ops) <breakpoint>: Remove.
3455 (struct linux_target_ops) <breakpoint_len>: Remove.
3456 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3457 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3458 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3459 (struct linux_target_ops) <breakpoint>: Remove.
3460 (struct linux_target_ops) <breakpoint_len>: Remove.
3461 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3462 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3463 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3464 (struct linux_target_ops) <breakpoint>: Remove.
3465 (struct linux_target_ops) <breakpoint_len>: Remove.
3466 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3467 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3468 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3469 (struct linux_target_ops) <breakpoint>: Remove.
3470 (struct linux_target_ops) <breakpoint_len>: Remove.
3471 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3472 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3473 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3474 * linux-x86-low.c (x86_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-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3480 (struct linux_target_ops) <breakpoint>: Remove.
3481 (struct linux_target_ops) <breakpoint_len>: Remove.
3482 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3483 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3484
4cd98a19
AT
34852015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3486
3487 * linux-cris-low.c (cris_get_pc): Remove void arg.
3488
774ee6d2
AR
34892015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3490
3491 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3492 variable name.
3493
833dcd29
AR
34942015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3495
3496 * inferiors.c (thread_pid_matches_callback): New function.
3497 (find_thread_process): New function.
3498 (remove_thread): Reset current_thread.
3499 (remove_process): Assert threads have been removed first.
3500
8d689ee5
YQ
35012015-10-15 Yao Qi <yao.qi@linaro.org>
3502
3503 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3504 if it is 3.
3505 (aarch64_remove_point): Likewise.
3506 * regcache.c (regcache_register_size): New function.
3507
1c2e1515
YQ
35082015-10-12 Yao Qi <yao.qi@linaro.org>
3509
3510 * linux-aarch64-low.c: Update all callers as emit_load_store
3511 is renamed to aarch64_emit_load_store.
3512
e1c587c3
YQ
35132015-10-12 Yao Qi <yao.qi@linaro.org>
3514
3515 * linux-aarch64-low.c: Update all callers of function renaming
3516 from emit_insn to aarch64_emit_insn.
3517
b6542f81
YQ
35182015-10-12 Yao Qi <yao.qi@linaro.org>
3519
3520 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3521 arch/aarch64-insn.h.
3522 (struct aarch64_memory_operand): Likewise.
3523 (ENCODE): Likewise.
3524 (emit_insn): Move to arch/aarch64-insn.c.
3525 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3526 (emit_load_store): Move to arch/aarch64-insn.c.
3527 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3528 (can_encode_int32): Remove.
3529
246994ce
YQ
35302015-10-12 Yao Qi <yao.qi@linaro.org>
3531
3532 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3533 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3534 (aarch64_relocate_instruction): Likewise.
3535 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3536 (struct aarch64_insn_visitor): Likewise.
3537
0badd99f
YQ
35382015-10-12 Yao Qi <yao.qi@linaro.org>
3539
3540 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3541 (struct aarch64_insn_visitor): New.
3542 (struct aarch64_insn_relocation_data): New.
3543 (aarch64_ftrace_insn_reloc_b): New function.
3544 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3545 (aarch64_ftrace_insn_reloc_cb): Likewise.
3546 (aarch64_ftrace_insn_reloc_tb): Likewise.
3547 (aarch64_ftrace_insn_reloc_adr): Likewise.
3548 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3549 (aarch64_ftrace_insn_reloc_others): Likewise.
3550 (visitor): New.
3551 (aarch64_relocate_instruction): Use visitor.
3552
dfaffe9d
YQ
35532015-10-12 Yao Qi <yao.qi@linaro.org>
3554
3555 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3556 int. Add argument buf.
3557 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3558 aarch64_relocate_instruction.
3559
70b439f0
YQ
35602015-10-12 Yao Qi <yao.qi@linaro.org>
3561
3562 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3563 argument insn. Remove local variable insn. Don't call
3564 target_read_uint32.
3565 (aarch64_install_fast_tracepoint_jump_pad): Call
3566 target_read_uint32.
3567
7781c06f
YQ
35682015-09-30 Yao Qi <yao.qi@linaro.org>
3569
3570 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3571 (emit_load_store_pair): Likewise.
3572
9a3c8263
SM
35732015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3574
3575 * dll.c (match_dll): Add cast(s).
3576 (unloaded_dll): Likewise.
3577 * linux-low.c (second_thread_of_pid_p): Likewise.
3578 (delete_lwp_callback): Likewise.
3579 (count_events_callback): Likewise.
3580 (select_event_lwp_callback): Likewise.
3581 (linux_set_resume_request): Likewise.
3582 * server.c (accumulate_file_name_length): Likewise.
3583 (emit_dll_description): Likewise.
3584 (handle_qxfer_threads_worker): Likewise.
3585 (visit_actioned_threads): Likewise.
3586 * thread-db.c (any_thread_of): Likewise.
3587 * tracepoint.c (same_process_p): Likewise.
3588 (match_blocktype): Likewise.
3589 (build_traceframe_info_xml): Likewise.
3590
224c3ddb
SM
35912015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3592
3593 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3594 assignment.
3595 (gdb_unparse_agent_expr): Likewise.
3596 * hostio.c (require_data): Likewise.
3597 (handle_pread): Likewise.
3598 * linux-low.c (disable_regset): Likewise.
3599 (fetch_register): Likewise.
3600 (store_register): Likewise.
3601 (get_dynamic): Likewise.
3602 (linux_qxfer_libraries_svr4): Likewise.
3603 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3604 (set_fast_tracepoint_jump): Likewise.
3605 (uninsert_fast_tracepoint_jumps_at): Likewise.
3606 (reinsert_fast_tracepoint_jumps_at): Likewise.
3607 (validate_inserted_breakpoint): Likewise.
3608 (clone_agent_expr): Likewise.
3609 * regcache.c (init_register_cache): Likewise.
3610 * remote-utils.c (putpkt_binary_1): Likewise.
3611 (decode_M_packet): Likewise.
3612 (decode_X_packet): Likewise.
3613 (look_up_one_symbol): Likewise.
3614 (relocate_instruction): Likewise.
3615 (monitor_output): Likewise.
3616 * server.c (handle_search_memory): Likewise.
3617 (handle_qxfer_exec_file): Likewise.
3618 (handle_qxfer_libraries): Likewise.
3619 (handle_qxfer): Likewise.
3620 (handle_query): Likewise.
3621 (handle_v_cont): Likewise.
3622 (handle_v_run): Likewise.
3623 (captured_main): Likewise.
3624 * target.c (write_inferior_memory): Likewise.
3625 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3626 * tracepoint.c (init_trace_buffer): Likewise.
3627 (add_tracepoint_action): Likewise.
3628 (add_traceframe): Likewise.
3629 (add_traceframe_block): Likewise.
3630 (cmd_qtdpsrc): Likewise.
3631 (cmd_qtdv): Likewise.
3632 (cmd_qtstatus): Likewise.
3633 (response_source): Likewise.
3634 (response_tsv): Likewise.
3635 (cmd_qtnotes): Likewise.
3636 (gdb_collect): Likewise.
3637 (initialize_tracepoint): Likewise.
3638
afbe19f8
PL
36392015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3640
3641 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3642 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3643 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3644 <NOP>: New.
3645 (enum aarch64_condition_codes): New enum.
3646 (w0): New static global.
3647 (fp): Likewise.
3648 (lr): Likewise.
3649 (struct aarch64_memory_operand) <type>: New
3650 MEMORY_OPERAND_POSTINDEX type.
3651 (postindex_memory_operand): New helper function.
3652 (emit_ret): New function.
3653 (emit_load_store_pair): New function, factored out of emit_stp
3654 with support for MEMORY_OPERAND_POSTINDEX.
3655 (emit_stp): Rewrite using emit_load_store_pair.
3656 (emit_ldp): New function.
3657 (emit_load_store): Likewise.
3658 (emit_ldr): Mention post-index instruction in comment.
3659 (emit_ldrh): New function.
3660 (emit_ldrb): New function.
3661 (emit_ldrsw): Mention post-index instruction in comment.
3662 (emit_str): Likewise.
3663 (emit_subs): New function.
3664 (emit_cmp): Likewise.
3665 (emit_and): Likewise.
3666 (emit_orr): Likewise.
3667 (emit_orn): Likewise.
3668 (emit_eor): Likewise.
3669 (emit_mvn): Likewise.
3670 (emit_lslv): Likewise.
3671 (emit_lsrv): Likewise.
3672 (emit_asrv): Likewise.
3673 (emit_mul): Likewise.
3674 (emit_sbfm): Likewise.
3675 (emit_sbfx): Likewise.
3676 (emit_ubfm): Likewise.
3677 (emit_ubfx): Likewise.
3678 (emit_csinc): Likewise.
3679 (emit_cset): Likewise.
3680 (emit_nop): Likewise.
3681 (emit_ops_insns): New helper function.
3682 (emit_pop): Likewise.
3683 (emit_push): Likewise.
3684 (aarch64_emit_prologue): New function.
3685 (aarch64_emit_epilogue): Likewise.
3686 (aarch64_emit_add): Likewise.
3687 (aarch64_emit_sub): Likewise.
3688 (aarch64_emit_mul): Likewise.
3689 (aarch64_emit_lsh): Likewise.
3690 (aarch64_emit_rsh_signed): Likewise.
3691 (aarch64_emit_rsh_unsigned): Likewise.
3692 (aarch64_emit_ext): Likewise.
3693 (aarch64_emit_log_not): Likewise.
3694 (aarch64_emit_bit_and): Likewise.
3695 (aarch64_emit_bit_or): Likewise.
3696 (aarch64_emit_bit_xor): Likewise.
3697 (aarch64_emit_bit_not): Likewise.
3698 (aarch64_emit_equal): Likewise.
3699 (aarch64_emit_less_signed): Likewise.
3700 (aarch64_emit_less_unsigned): Likewise.
3701 (aarch64_emit_ref): Likewise.
3702 (aarch64_emit_if_goto): Likewise.
3703 (aarch64_emit_goto): Likewise.
3704 (aarch64_write_goto_address): Likewise.
3705 (aarch64_emit_const): Likewise.
3706 (aarch64_emit_call): Likewise.
3707 (aarch64_emit_reg): Likewise.
3708 (aarch64_emit_pop): Likewise.
3709 (aarch64_emit_stack_flush): Likewise.
3710 (aarch64_emit_zero_ext): Likewise.
3711 (aarch64_emit_swap): Likewise.
3712 (aarch64_emit_stack_adjust): Likewise.
3713 (aarch64_emit_int_call_1): Likewise.
3714 (aarch64_emit_void_call_2): Likewise.
3715 (aarch64_emit_eq_goto): Likewise.
3716 (aarch64_emit_ne_goto): Likewise.
3717 (aarch64_emit_lt_goto): Likewise.
3718 (aarch64_emit_le_goto): Likewise.
3719 (aarch64_emit_gt_goto): Likewise.
3720 (aarch64_emit_ge_got): Likewise.
3721 (aarch64_emit_ops_impl): New static global variable.
3722 (aarch64_emit_ops): New target function, return
3723 &aarch64_emit_ops_impl.
3724 (struct linux_target_ops): Install it.
3725
bb903df0
PL
37262015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3727
3728 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3729 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3730 aarch64-ipa.o.
3731 * linux-aarch64-ipa.c: New file.
3732 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3733 and endian.h.
3734 (aarch64_get_thread_area): New target method.
3735 (extract_signed_bitfield): New helper function.
3736 (aarch64_decode_ldr_literal): New function.
3737 (enum aarch64_opcodes): New enum.
3738 (struct aarch64_register): New struct.
3739 (struct aarch64_operand): New struct.
3740 (x0): New static global.
3741 (x1): Likewise.
3742 (x2): Likewise.
3743 (x3): Likewise.
3744 (x4): Likewise.
3745 (w2): Likewise.
3746 (ip0): Likewise.
3747 (sp): Likewise.
3748 (xzr): Likewise.
3749 (aarch64_register): New helper function.
3750 (register_operand): Likewise.
3751 (immediate_operand): Likewise.
3752 (struct aarch64_memory_operand): New struct.
3753 (offset_memory_operand): New helper function.
3754 (preindex_memory_operand): Likewise.
3755 (enum aarch64_system_control_registers): New enum.
3756 (ENCODE): New macro.
3757 (emit_insn): New helper function.
3758 (emit_b): New function.
3759 (emit_bcond): Likewise.
3760 (emit_cb): Likewise.
3761 (emit_tb): Likewise.
3762 (emit_blr): Likewise.
3763 (emit_stp): Likewise.
3764 (emit_ldp_q_offset): Likewise.
3765 (emit_stp_q_offset): Likewise.
3766 (emit_load_store): Likewise.
3767 (emit_ldr): Likewise.
3768 (emit_ldrsw): Likewise.
3769 (emit_str): Likewise.
3770 (emit_ldaxr): Likewise.
3771 (emit_stxr): Likewise.
3772 (emit_stlr): Likewise.
3773 (emit_data_processing_reg): Likewise.
3774 (emit_data_processing): Likewise.
3775 (emit_add): Likewise.
3776 (emit_sub): Likewise.
3777 (emit_mov): Likewise.
3778 (emit_movk): Likewise.
3779 (emit_mov_addr): Likewise.
3780 (emit_mrs): Likewise.
3781 (emit_msr): Likewise.
3782 (emit_sevl): Likewise.
3783 (emit_wfe): Likewise.
3784 (append_insns): Likewise.
3785 (can_encode_int32_in): New helper function.
3786 (aarch64_relocate_instruction): New function.
3787 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3788 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3789 (struct linux_target_ops): Install aarch64_get_thread_area,
3790 aarch64_install_fast_tracepoint_jump_pad and
3791 aarch64_get_min_fast_tracepoint_insn_len.
3792
787749ea
PL
37932015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3794
3795 * Makefile.in (aarch64-insn.o): New rule.
3796 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3797
9812b2e6
YQ
37982015-09-21 Yao Qi <yao.qi@linaro.org>
3799
3800 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3801
18fe412b
YQ
38022015-09-21 Yao Qi <yao.qi@linaro.org>
3803
3804 * tracepoint.c (max_jump_pad_size): Remove.
3805
a0cc84cd
YQ
38062015-09-18 Yao Qi <yao.qi@linaro.org>
3807
3808 * linux-aarch64-low.c: Don't include sys/uio.h.
3809 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3810
d78908cf
WW
38112015-09-16 Wei-cheng Wang <cole945@gmail.com>
3812
3813 * tracepoint.c (eval_result_type): Change prototype.
3814 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3815
d57e0d50
PA
38162015-09-15 Pedro Alves <palves@redhat.com>
3817
3818 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3819 Check whether to report exec events instead of checking whether
3820 multiprocess is enabled.
3821
5a676acc
PA
38222015-09-15 Pedro Alves <palves@redhat.com>
3823
3824 PR remote/18965
3825 * remote-utils.c (prepare_resume_reply): Merge
3826 TARGET_WAITKIND_VFORK_DONE switch case with the
3827 TARGET_WAITKIND_FORKED case.
3828
7c5d0fad
YQ
38292015-09-15 Yao Qi <yao.qi@linaro.org>
3830
3831 * server.c (handle_query): Check string comparison using
3832 "else if" instead of "if".
3833
750ce8d1
YQ
38342015-09-15 Yao Qi <yao.qi@linaro.org>
3835
3836 * server.c (vCont_supported): New global variable.
3837 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3838 matches. Append ";vContSupported+" to own_buf.
3839 (handle_v_requests): Append ";s;S" to own_buf if target supports
3840 hardware single step or vCont_supported is false.
3841 (capture_main): Set vCont_supported to zero.
3842
70b90b91
YQ
38432015-09-15 Yao Qi <yao.qi@linaro.org>
3844
3845 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3846 it to ...
3847 (linux_supports_hardware_single_step): ... New function.
3848 (linux_target_ops): Update.
3849 * lynx-low.c (lynx_target_ops): Set field
3850 supports_hardware_single_step to target_can_do_hardware_single_step.
3851 * nto-low.c (nto_target_ops): Likewise.
3852 * spu-low.c (spu_target_ops): Likewise.
3853 * win32-low.c (win32_target_ops): Likewise.
3854 * target.c (target_can_do_hardware_single_step): New function.
3855 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3856 Remove. <supports_hardware_single_step>: New field.
3857 (target_supports_conditional_breakpoints): Remove.
3858 (target_supports_hardware_single_step): New macro.
3859 (target_can_do_hardware_single_step): Declare.
3860 * server.c (handle_query): Use target_supports_hardware_single_step
3861 instead of target_supports_conditional_breakpoints.
3862
ade90bde
YQ
38632015-09-15 Yao Qi <yao.qi@linaro.org>
3864
3865 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3866 function.
3867 (struct linux_target_ops the_low_target): Install
3868 aarch64_linux_siginfo_fixup.
3869
94585166
DB
38702015-09-11 Don Breazeal <donb@codesourcery.com>
3871 Luis Machado <lgustavo@codesourcery.com>
3872
3873 * linux-low.c (linux_mourn): Static declaration.
3874 (linux_arch_setup): Move in front of
3875 handle_extended_wait.
3876 (linux_arch_setup_thread): New function.
3877 (handle_extended_wait): Handle exec events. Call
3878 linux_arch_setup_thread. Make event_lwp argument a
3879 pointer-to-a-pointer.
3880 (check_zombie_leaders): Do not check stopped threads.
3881 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3882 (linux_low_filter_event): Add lwp and thread for exec'ing
3883 non-leader thread if leader thread has been deleted.
3884 Refactor code into linux_arch_setup_thread and call it.
3885 Pass child lwp pointer by reference to handle_extended_wait.
3886 (linux_wait_for_event_filtered): Update comment.
3887 (linux_wait_1): Prevent clobbering exec event status.
3888 (linux_supports_exec_events): New function.
3889 (linux_target_ops) <supports_exec_events>: Initialize new member.
3890 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3891 new member.
3892 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3893 * server.c (report_exec_events): New global variable.
3894 (handle_query): Handle qSupported query for exec-events feature.
3895 (captured_main): Initialize report_exec_events.
3896 * server.h (report_exec_events): Declare new global variable.
3897 * target.h (struct target_ops) <supports_exec_events>: New
3898 member.
3899 (target_supports_exec_events): New macro.
3900 * win32-low.c (win32_target_ops) <supports_exec_events>:
3901 Initialize new member.
3902
0568462b
MM
39032015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3904
3905 * linux-low.c (linux_low_enable_btrace): Remove.
3906 (linux_target_ops): Replace linux_low_enable_btrace with
3907 linux_enable_btrace.
3908
39edd165
YQ
39092015-09-03 Yao Qi <yao.qi@linaro.org>
3910
3911 * linux-aarch64-low.c (aarch64_insert_point): Call
3912 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3913 returns true.
3914
1db33b5a
UW
39152015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3916
3917 * linux-low.c (check_stopped_by_breakpoint): Use
3918 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3919
ab290430
PA
39202015-08-27 Pedro Alves <palves@redhat.com>
3921
3922 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3923
8d749320
SM
39242015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3925
6711b7f8
SM
3926 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3927 the XNEW-family equivalent.
8d749320
SM
3928 (compile_bytecodes): Likewise.
3929 * dll.c (loaded_dll): Likewise.
3930 * event-loop.c (append_callback_event): Likewise.
3931 (create_file_handler): Likewise.
3932 (create_file_event): Likewise.
3933 * hostio.c (handle_open): Likewise.
3934 * inferiors.c (add_thread): Likewise.
3935 (add_process): Likewise.
3936 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3937 * linux-arm-low.c (arm_new_process): Likewise.
3938 (arm_new_thread): Likewise.
3939 * linux-low.c (add_to_pid_list): Likewise.
3940 (linux_add_process): Likewise.
3941 (handle_extended_wait): Likewise.
3942 (add_lwp): Likewise.
3943 (enqueue_one_deferred_signal): Likewise.
3944 (enqueue_pending_signal): Likewise.
3945 (linux_resume_one_lwp_throw): Likewise.
3946 (linux_resume_one_thread): Likewise.
3947 (linux_read_memory): Likewise.
3948 (linux_write_memory): Likewise.
3949 * linux-mips-low.c (mips_linux_new_process): Likewise.
3950 (mips_linux_new_thread): Likewise.
3951 (mips_add_watchpoint): Likewise.
3952 * linux-x86-low.c (initialize_low_arch): Likewise.
3953 * lynx-low.c (lynx_add_process): Likewise.
3954 * mem-break.c (set_raw_breakpoint_at): Likewise.
3955 (set_breakpoint): Likewise.
3956 (add_condition_to_breakpoint): Likewise.
3957 (add_commands_to_breakpoint): Likewise.
3958 (clone_agent_expr): Likewise.
3959 (clone_one_breakpoint): Likewise.
3960 * regcache.c (new_register_cache): Likewise.
3961 * remote-utils.c (look_up_one_symbol): Likewise.
3962 * server.c (queue_stop_reply): Likewise.
3963 (start_inferior): Likewise.
3964 (queue_stop_reply_callback): Likewise.
3965 (handle_target_event): Likewise.
3966 * spu-low.c (fetch_ppc_memory): Likewise.
3967 (store_ppc_memory): Likewise.
3968 * target.c (set_target_ops): Likewise.
3969 * thread-db.c (thread_db_load_search): Likewise.
3970 (try_thread_db_load_1): Likewise.
3971 * tracepoint.c (add_tracepoint): Likewise.
3972 (add_tracepoint_action): Likewise.
3973 (create_trace_state_variable): Likewise.
3974 (cmd_qtdpsrc): Likewise.
3975 (cmd_qtro): Likewise.
3976 (add_while_stepping_state): Likewise.
3977 * win32-low.c (child_add_thread): Likewise.
3978 (get_image_name): Likewise.
3979
ed8b7b42
YQ
39802015-08-25 Yao Qi <yao.qi@linaro.org>
3981
3982 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3983
db3cb7cb
YQ
39842015-08-25 Yao Qi <yao.qi@linaro.org>
3985
3986 * Makefile.in (aarch64-linux.o): New rule.
3987 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3988 srv_tgtobj.
3989 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3990 (aarch64_init_debug_reg_state): Make it extern.
3991 (aarch64_linux_prepare_to_resume): Remove.
3992
f6011a1c
YQ
39932015-08-25 Yao Qi <yao.qi@linaro.org>
3994
3995 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3996 lwp_arch_private_info and ptid_of_lwp.
3997
88e2cf7e
YQ
39982015-08-25 Yao Qi <yao.qi@linaro.org>
3999
4000 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4001 Find proc_info by find_process_pid. All callers updated.
4002
5e35436e
YQ
40032015-08-25 Yao Qi <yao.qi@linaro.org>
4004
4005 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4006 Remove.
4007 (debug_reg_change_callback): Remove.
4008 (aarch64_notify_debug_reg_change): Remove.
4009
4a8a7965
YQ
40102015-08-25 Yao Qi <yao.qi@linaro.org>
4011
4012 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4013 Call current_lwp_ptid.
4014
32a271ee
YQ
40152015-08-25 Yao Qi <yao.qi@linaro.org>
4016
4017 * linux-aarch64-low.c (debug_reg_change_callback): Use
4018 debug_printf.
4019
0d51c8d7
YQ
40202015-08-25 Yao Qi <yao.qi@linaro.org>
4021
4022 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4023
31a43dd5
YQ
40242015-08-25 Yao Qi <yao.qi@linaro.org>
4025
4026 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4027
8ee52567
YQ
40282015-08-25 Yao Qi <yao.qi@linaro.org>
4029
4030 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4031 the code.
4032
ff3f0f45
YQ
40332015-08-25 Yao Qi <yao.qi@linaro.org>
4034
4035 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4036 Remove.
4037 (debug_reg_change_callback): Remove argument entry and add argument
4038 lwp. Remove local variable thread. Don't print thread id in the
4039 debugging output. Don't check whether pid of thread equals to pid.
4040 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4041 iterate_over_lwps instead find_inferior.
4042
3d40fbb5
PA
40432015-08-24 Pedro Alves <palves@redhat.com>
4044
4045 * inferiors.c (get_first_process): New function.
4046 * inferiors.h (get_first_process): New declaration.
4047 * remote-utils.c (read_ptid): Default to the first process in the
4048 list, instead of to the current thread's process.
4049
438e1e42
PA
40502015-08-24 Pedro Alves <palves@redhat.com>
4051
4052 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4053 * event-loop.c: Likewise.
4054 * remote-utils.c: Likewise.
4055 * tracepoint.c: Likewise.
4056
a8c6d4fc
PA
40572015-08-24 Pedro Alves <palves@redhat.com>
4058
4059 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4060 ptid_get_lwp.
4061
99b0bb12
PA
40622015-08-21 Pedro Alves <palves@redhat.com>
4063
4064 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4065 instead of literal 1.
4066
f8904751
PA
40672015-08-21 Pedro Alves <palves@redhat.com>
4068
4069 * tdesc.c (default_description): Explicitly zero-initialize.
4070
465a859e
PA
40712015-08-21 Pedro Alves <palves@redhat.com>
4072
4073 PR gdb/18749
4074 * inferiors.c (remove_thread): Discard any pending stop reply for
4075 this thread.
4076 * server.c (remove_all_on_match_pid): Rename to ...
4077 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4078 instead of a pid.
4079 (discard_queued_stop_replies): Change parameter to a ptid. Now
4080 extern.
4081 (handle_v_kill, kill_inferior_callback, captured_main)
4082 (process_serial_event): Adjust.
4083 * server.h (discard_queued_stop_replies): Declare.
4084
f0db101d
PA
40852015-08-21 Pedro Alves <palves@redhat.com>
4086
4087 * linux-low.c (wait_for_sigstop): Always switch to no thread
4088 selected if the previously current thread dies.
4089 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4090 process instead of the current thread's.
4091 * remote-utils.c (input_interrupt): Don't check if there's no
4092 current thread.
4093 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4094 current thread to the general thread fails, error out.
4095 (handle_qxfer_auxv, handle_qxfer_libraries)
4096 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4097 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4098 (handle_query): Check if there's a thread selected instead of
4099 checking whether there's any thread in the thread list.
4100 (handle_qxfer_threads, handle_qxfer_btrace)
4101 (handle_qxfer_btrace_conf): Don't error out early if there's no
4102 thread in the thread list.
4103 (handle_v_cont, myresume): Don't set the current thread to the
4104 continue thread.
4105 (process_serial_event) <Hg handling>: Also set thread_id if the
4106 previous general thread is still alive.
4107 (process_serial_event) <g/G handling>: If setting the current
4108 thread to the general thread fails, error out.
4109 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4110 thread's lwp instead of the current thread's.
4111 * target.c (set_desired_thread): If the desired thread was not
4112 found, leave the current thread pointing to NULL. Return an int
4113 (boolean) indicating success.
4114 * target.h (set_desired_thread): Change return type to int.
4115
40045d91
MF
41162015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4117
4118 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4119 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4120 #includes.
4121 (ps_get_thread_area): New function.
4122
45face3b
GB
41232015-08-19 Gary Benson <gbenson@redhat.com>
4124
4125 * hostio.c (handle_pread): Do not attempt to read more data
4126 than hostio_reply_with_data can fit in a packet.
4127
16d5f642
JB
41282015-08-18 Joel Brobecker <brobecker@adacore.com>
4129
4130 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4131
a738da3a
MF
41322015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4133
4134 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4135
33ebda9d
PA
41362015-08-06 Pedro Alves <palves@redhat.com>
4137
4138 * tracepoint.c (expr_eval_result): Now an int.
4139
a44892be
PA
41402015-08-06 Pedro Alves <palves@redhat.com>
4141
4142 * gdbthread.h (struct regcache): Forward declare.
4143 (struct thread_info) <regcache_data>: Now a struct regcache
4144 pointer.
4145 * inferiors.c (inferior_regcache_data)
4146 (set_inferior_regcache_data): Now work with struct regcache
4147 pointers.
4148 * inferiors.h (struct regcache): Forward declare.
4149 (inferior_regcache_data, set_inferior_regcache_data): Now work
4150 with struct regcache pointers.
4151 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4152 (free_register_cache_thread): Remove struct regcache pointer
4153 casts.
4154
608a1e46
PA
41552015-08-06 Pedro Alves <palves@redhat.com>
4156
4157 * server.c (captured_main): On error, print the exception message
4158 to stderr, and if run_once is set, throw a quit.
4159
f0ce0d3a
PA
41602015-08-06 Pedro Alves <palves@redhat.com>
4161
4162 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4163 the current thread.
4164
bf47e248
PA
41652015-08-06 Pedro Alves <palves@redhat.com>
4166
4167 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4168 reading beyond the passed in buffer length.
4169
b6b9ffcc
PL
41702015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4171
4172 * tracepoint.c (symbol_list) <required>: Remove.
4173
863d01bd
PA
41742015-08-06 Pedro Alves <palves@redhat.com>
4175
4176 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4177 count if stopping and suspending threads.
4178 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4179 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4180 (linux_detach): Complete an ongoing step-over.
4181 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4182 throughout.
4183 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4184 (linux_wait_1): If passing a signal to the inferior after
4185 finishing a step-over, unsuspend and re-resume all lwps. If we
4186 see a single-step event but the thread should be continuing, don't
4187 pass the trap to gdb.
4188 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4189 internal_error instead of gdb_assert.
4190 (enqueue_pending_signal): New function.
4191 (check_ptrace_stopped_lwp_gone): Add debug output.
4192 (start_step_over): Use internal_error instead of gdb_assert.
4193 (complete_ongoing_step_over): New function.
4194 (linux_resume_one_thread): Don't resume a suspended thread.
4195 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4196 it stepping.
4197
00db26fa
PA
41982015-08-06 Pedro Alves <palves@redhat.com>
4199
4200 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4201 (linux_thread_alive): Use lwp_is_marked_dead.
4202 (extended_event_reported): Delete.
4203 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4204 instead of extended_event_reported.
4205 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4206 as well.
4207 (lwp_is_marked_dead): New function.
4208 (lwp_running): Use lwp_is_marked_dead.
4209 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4210 comment.
4211
ad071a30
PA
42122015-08-06 Pedro Alves <palves@redhat.com>
4213
4214 * linux-low.c (linux_wait_1): Move fork event output out of the
4215 !report_to_gdb check. Pass event_child->waitstatus to
4216 target_waitstatus_to_string instead of ourstatus.
4217
524b57e6
YQ
42182015-08-04 Yao Qi <yao.qi@linaro.org>
4219
4220 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4221 if current_thread is 32 bit.
4222
6085d6f6
YQ
42232015-08-04 Yao Qi <yao.qi@linaro.org>
4224
4225 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4226 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4227 * server.c (extended_protocol): Remove "static".
4228 * server.h (extended_protocol): Declare it.
4229
8a7e4587
YQ
42302015-08-04 Yao Qi <yao.qi@linaro.org>
4231
4232 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4233 both aarch64 and aarch32.
4234 (aarch64_set_pc): Likewise.
4235
3b53ae99
YQ
42362015-08-04 Yao Qi <yao.qi@linaro.org>
4237
4238 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4239 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4240 arm-with-neon.xml to srv_xmlfiles.
4241 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4242 (is_64bit_tdesc): New function.
4243 (aarch64_linux_read_description): New function.
4244 (aarch64_arch_setup): Call aarch64_linux_read_description.
4245 (regs_info): Rename to regs_info_aarch64.
4246 (aarch64_regs_info): Return right regs_info.
4247 (initialize_low_arch): Call initialize_low_arch_aarch32.
4248
bd9e6534
YQ
42492015-08-04 Yao Qi <yao.qi@linaro.org>
4250
4251 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4252 * linux-aarch32-low.c: New file.
4253 * linux-aarch32-low.h: New file.
4254 * linux-arm-low.c (arm_fill_gregset): Move it to
4255 linux-aarch32-low.c.
4256 (arm_store_gregset): Likewise.
4257 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4258 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4259 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4260 (regs_info): Rename to regs_info_arm.
4261 (arm_regs_info): Return regs_info_aarch32 if
4262 have_ptrace_getregset is 1 and target description is
4263 arm_with_neon or arm_with_vfpv3.
4264 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4265 Call initialize_low_arch_aarch32 instead.
4266
ded48a5e
YQ
42672015-08-04 Yao Qi <yao.qi@linaro.org>
4268
4269 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4270 * linux-low.c: ... here.
4271 * linux-low.h (have_ptrace_getregset): Declare it.
4272
96e9210f
PA
42732015-08-04 Pedro Alves <palves@redhat.com>
4274
4275 * thread-db.c (struct thread_db): Use new typedefs.
4276 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4277 CHK calls.
4278 (disable_thread_event_reporting): Cast result of dlsym to
4279 destination function pointer type.
4280 (thread_db_mourn): Use td_ta_delete_ftype.
4281
af60a1ef
SL
42822015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4283
4284 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4285 arch variant.
4286 (CDX_BREAKPOINT): Define for R2.
4287 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4288 (the_low_target): Add comments.
4289
e8b41681
YQ
42902015-07-30 Yao Qi <yao.qi@linaro.org>
4291
4292 * linux-arm-low.c (arm_hwcap): Remove it.
4293 (arm_read_description): New local variable arm_hwcap. Don't
4294 set arm_hwcap to zero.
4295
89abb039
YQ
42962015-07-30 Yao Qi <yao.qi@linaro.org>
4297
4298 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4299 Use regcache->tdesc instead.
4300 (arm_store_wmmxregset): Likewise.
4301 (arm_fill_vfpregset): Likewise.
4302 (arm_store_vfpregset): Likewise.
4303
deca266c
YQ
43042015-07-30 Yao Qi <yao.qi@linaro.org>
4305
4306 * linux-arm-low.c: Include arch/arm.h.
4307 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4308 (arm_store_gregset): Likewise.
4309
aa58a496
SM
43102015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4311
4312 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4313 ptrace's 4th parameter.
4314
50904b25
YQ
43152015-07-27 Yao Qi <yao.qi@linaro.org>
4316
4317 * configure.srv (case aarch64*-*-linux*): Don't set
4318 srv_linux_usrregs.
4319
5826e159
PA
43202015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4321
4322 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4323 sys/ptrace.h.
4324 * linux-arm-low.c: Likewise.
4325 * linux-cris-low.c: Likewise.
4326 * linux-crisv32-low.c: Likewise.
4327 * linux-low.c: Likewise.
4328 * linux-m68k-low.c: Likewise.
4329 * linux-mips-low.c: Likewise.
4330 * linux-nios2-low.c: Likewise.
4331 * linux-s390-low.c: Likewise.
4332 * linux-sparc-low.c: Likewise.
4333 * linux-tic6x-low.c: Likewise.
4334 * linux-tile-low.c: Likewise.
4335 * linux-x86-low.c: Likewise.
4336
54019719
PA
43372015-07-24 Pedro Alves <palves@redhat.com>
4338
4339 * config.in: Regenerate.
4340 * configure: Regenerate.
4341
eb7aa561
PA
43422015-07-24 Pedro Alves <palves@redhat.com>
4343
4344 * acinclude.m4: Include ../ptrace.m4.
4345 * configure.ac: Call GDB_AC_PTRACE.
4346 * config.in, configure: Regenerate.
4347
55d7b841
YQ
43482015-07-24 Yao Qi <yao.qi@linaro.org>
4349
4350 * linux-low.c (linux_create_inferior): Remove setting to
4351 proc->priv->new_inferior.
4352 (linux_attach): Likewise.
4353 (linux_low_filter_event): Likewise.
4354 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4355
c06cbd92
YQ
43562015-07-24 Yao Qi <yao.qi@linaro.org>
4357
4358 * linux-low.c (linux_arch_setup): New function.
4359 (linux_low_filter_event): If proc->tdesc is NULL and
4360 proc->attached is true, call the_low_target.arch_setup.
4361 Otherwise, keep status pending, and return.
4362 (linux_resume_one_lwp_throw): Don't call get_pc if
4363 thread->while_stepping isn't NULL. Don't call
4364 get_thread_regcache if proc->tdesc is NULL.
4365 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4366 (linux_target_ops): Install arch_setup.
4367 * server.c (start_inferior): Call the_target->arch_setup.
4368 * target.h (struct target_ops) <arch_setup>: New field.
4369 (target_arch_setup): New marco.
4370 * lynx-low.c (lynx_target_ops): Update.
4371 * nto-low.c (nto_target_ops): Update.
4372 * spu-low.c (spu_target_ops): Update.
4373 * win32-low.c (win32_target_ops): Update.
4374
5ae3ebba
YQ
43752015-07-24 Yao Qi <yao.qi@linaro.org>
4376
4377 * linux-low.c (linux_add_process): Don't set
4378 proc->priv->new_inferior.
4379 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4380 (linux_attach): Likewise.
4381
eb97750b
YQ
43822015-07-24 Yao Qi <yao.qi@linaro.org>
4383
4384 * server.c (start_inferior): Code refactor.
4385
51aee833
YQ
43862015-07-24 Yao Qi <yao.qi@linaro.org>
4387
4388 * server.c (process_serial_event): Set general_thread.
4389
af1b22f3
YQ
43902015-07-21 Yao Qi <yao.qi@linaro.org>
4391
4392 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4393 aarch64_linux_get_debug_reg_capacity.
4394
554717a3
YQ
43952015-07-17 Yao Qi <yao.qi@linaro.org>
4396
4397 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4398 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4399 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4400 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4401 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4402 (AARCH64_HWP_ALIGNMENT): Likewise.
4403 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4404 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4405 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4406 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4407 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4408 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4409 (struct aarch64_debug_reg_state): Likewise.
4410 (struct arch_lwp_info): Likewise.
4411 (aarch64_align_watchpoint): Likewise.
4412 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4413 (aarch64_watchpoint_length): Likewise.
4414 (aarch64_point_encode_ctrl_reg): Likewise
4415 (aarch64_point_is_aligned): Likewise.
4416 (aarch64_align_watchpoint): Likewise.
4417 (aarch64_linux_set_debug_regs):
4418 (aarch64_dr_state_insert_one_point): Likewise.
4419 (aarch64_dr_state_remove_one_point): Likewise.
4420 (aarch64_handle_breakpoint): Likewise.
4421 (aarch64_handle_aligned_watchpoint): Likewise.
4422 (aarch64_handle_unaligned_watchpoint): Likewise.
4423 (aarch64_handle_watchpoint): Likewise.
4424
c67ca4de
YQ
44252015-07-17 Yao Qi <yao.qi@linaro.org>
4426
4427 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4428 and don't aarch64_get_debug_reg_state. All callers update.
4429 (aarch64_handle_aligned_watchpoint): Likewise.
4430 (aarch64_handle_unaligned_watchpoint): Likewise.
4431 (aarch64_handle_watchpoint): Likewise.
4432 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4433 (aarch64_remove_point): Likewise.
4434
25abf979
YQ
44352015-07-17 Yao Qi <yao.qi@linaro.org>
4436
4437 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4438 debug_printf.
4439 (aarch64_handle_unaligned_watchpoint): Likewise.
4440
db1ff28b
JK
44412015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4442
4443 Revert the previous 3 commits:
4444 Move gdb_regex* to common/
4445 Move linux_find_memory_regions_full & co.
4446 gdbserver build-id attribute generator
4447
700ca40f
JK
44482015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4449 Jan Kratochvil <jan.kratochvil@redhat.com>
4450
4451 gdbserver build-id attribute generator.
4452 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4453 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4454 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4455 (find_phdr): New.
4456 (get_dynamic): Use find_pdhr to traverse program headers.
4457 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4458 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4459 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4460 (get_hex_build_id): New.
4461 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4462 to reply XML document.
4463
9904185c
JK
44642015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4465 Jan Kratochvil <jan.kratochvil@redhat.com>
4466
4467 * target.c: Include target/target-utils.h and fcntl.h.
4468 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4469 (target_fileio_read_stralloc): New functions.
4470
6e5b4429
JK
44712015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4472
4473 * Makefile.in (OBS): Add gdb_regex.o.
4474 (gdb_regex.o): New.
4475 * config.in: Rebuilt.
4476 * configure: Rebuilt.
4477
ddc98fbf
JK
44782015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4479 Jan Kratochvil <jan.kratochvil@redhat.com>
4480
4481 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4482 * Makefile.in (OBS): Add target-utils.o.
4483 (linux-maps.o, target-utils.o): New.
4484 * configure.srv (srv_linux_obj): Add linux-maps.o.
4485
e57bb7a0
PL
44862015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4487
4488 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4489 function, return 1.
4490 (the_low_target): Install it.
4491
586b02a9
PA
44922015-07-14 Pedro Alves <palves@redhat.com>
4493
4494 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4495 Instead, ignore ECHILD, and throw an error for other errnos.
4496
58c1b36c
PA
44972015-07-10 Pedro Alves <palves@redhat.com>
4498
4499 * event-loop.c (struct callback_event) <data>: Change type to
4500 gdb_client_data instance instead of gdb_client_data pointer.
4501 (append_callback_event): Adjust.
4502
421530db
PL
45032015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4504
4505 * linux-aarch64-low.c: Add comments for each linux_target_ops
4506 method. Remove comments already covered in target_ops and
4507 linux_target_ops definitions.
4508 (the_low_target): Add comments for each unimplemented method.
4509
c2d65f38
YQ
45102015-07-09 Yao Qi <yao.qi@linaro.org>
4511
4512 * linux-aarch64-low.c (aarch64_regmap): Remove.
4513 (aarch64_usrregs_info): Remove.
4514 (regs_info): Set field usrregs to NULL.
4515
b20a6524
MM
45162015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4517
4518 * linux-low.c: Include "rsp-low.h"
4519 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4520 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4521 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4522 (handle_btrace_enable_pt): New.
4523 (handle_btrace_general_set): Support "pt".
4524 (handle_btrace_conf_general_set): Support "pt:size".
4525
96c97461
PL
45262015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4527
4528 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4529 Z_PACKET_SW_BP.
4530
37d66942
PL
45312015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4532
4533 * linux-aarch64-low.c: Remove comment about endianness.
4534 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4535 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4536 memcmp.
4537
dc06243f
GB
45382015-06-24 Gary Benson <gbenson@redhat.com>
4539
4540 * linux-i386-ipa.c (stdint.h): Do not include.
4541 * lynx-i386-low.c (stdint.h): Likewise.
4542 * lynx-ppc-low.c (stdint.h): Likewise.
4543 * mem-break.c (stdint.h): Likewise.
4544 * thread-db.c (stdint.h): Likewise.
4545 * tracepoint.c (stdint.h): Likewise.
4546 * win32-low.c (stdint.h): Likewise.
4547
124e13d9
SM
45482015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4549
4550 * server.c (write_qxfer_response): Update call to
4551 remote_escape_output.
4552
909c2cda
JK
45532015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4554 Jan Kratochvil <jan.kratochvil@redhat.com>
4555
4556 Merge multiple hex conversions.
4557 * gdbreplay.c (tohex): Rename to 'fromhex'.
4558 (logchar): Use fromhex.
4559
24c05f46
JK
45602015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4561
4562 * server.c (handle_qxfer_libraries): Set `version' attribute for
4563 <library-list>.
4564
14d2069a
GB
45652015-06-10 Gary Benson <gbenson@redhat.com>
4566
4567 * target.h (struct target_ops) <multifs_open>: New field.
4568 <multifs_unlink>: Likewise.
4569 <multifs_readlink>: Likewise.
4570 * linux-low.c (nat/linux-namespaces.h): New include.
4571 (linux_target_ops): Initialize the_target->multifs_open,
4572 the_target->multifs_unlink and the_target->multifs_readlink.
4573 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4574 * hostio.c (hostio_fs_pid): New static variable.
4575 (hostio_handle_new_gdb_connection): New function.
4576 (handle_setfs): Likewise.
4577 (handle_open): Use the_target->multifs_open as appropriate.
4578 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4579 (handle_readlink): Use the_target->multifs_readlink as
4580 appropriate.
4581 (handle_vFile): Handle vFile:setfs packets.
4582 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4583 after target_handle_new_gdb_connection.
4584
4b8b5e72
GB
45852015-06-10 Gary Benson <gbenson@redhat.com>
4586
4587 * configure.ac (AC_CHECK_FUNCS): Add setns.
4588 * config.in: Regenerate.
4589 * configure: Likewise.
4590 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4591 (linux-namespaces.o): New rule.
4592 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4593
3ac2e371
GB
45942015-06-09 Gary Benson <gbenson@redhat.com>
4595
4596 * hostio.c (handle_open): Process mode argument with
4597 fileio_to_host_mode.
4598
ca9b78ce
YQ
45992015-06-01 Yao Qi <yao.qi@linaro.org>
4600
4601 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4602 * linux-x86-low.c: Likewise.
4603
bfacd19d
DB
46042015-05-28 Don Breazeal <donb@codesourcery.com>
4605
4606 * linux-low.c (handle_extended_wait): Initialize
4607 thread_info.last_resume_kind for new fork children.
4608
452003ef
PA
46092015-05-15 Pedro Alves <palves@redhat.com>
4610
4611 * target.h (target_handle_new_gdb_connection): Rewrite using if
4612 wrapped in do/while.
4613
1041a03c
JB
46142015-05-14 Joel Brobecker <brobecker@adacore.com>
4615
4616 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4617 * configure, config.in: Regenerate.
4618 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4619 Declare typedef.
4620
c269dbdb
DB
46212015-05-12 Don Breazeal <donb@codesourcery.com>
4622
4623 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4624 PTRACE_EVENT_VFORK_DONE.
4625 (linux_low_ptrace_options, extended_event_reported): Add vfork
4626 events.
4627 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4628 and "vforkdone" for RSP 'T' Stop Reply Packet.
4629 * server.h (report_vfork_events): Declare
4630 global variable.
4631
3a8a0396
DB
46322015-05-12 Don Breazeal <donb@codesourcery.com>
4633
4634 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4635 (the_low_target) <new_fork>: Initialize new member.
4636 * linux-arm-low.c (arm_new_fork): New function.
4637 (the_low_target) <new_fork>: Initialize new member.
4638 * linux-low.c (handle_extended_wait): Call new target function
4639 new_fork.
4640 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4641 * linux-mips-low.c (mips_add_watchpoint): New function
4642 extracted from mips_insert_point.
4643 (the_low_target) <new_fork>: Initialize new member.
4644 (mips_linux_new_fork): New function.
4645 (mips_insert_point): Call mips_add_watchpoint.
4646 * linux-x86-low.c (x86_linux_new_fork): New function.
4647 (the_low_target) <new_fork>: Initialize new member.
4648
de0d863e
DB
46492015-05-12 Don Breazeal <donb@codesourcery.com>
4650
4651 * linux-low.c (handle_extended_wait): Implement return value,
4652 rename argument 'event_child' to 'event_lwp', handle
4653 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4654 (linux_low_ptrace_options): New function.
4655 (linux_low_filter_event): Call linux_low_ptrace_options,
4656 use different argument fo linux_enable_event_reporting,
4657 use return value from handle_extended_wait.
4658 (extended_event_reported): New function.
4659 (linux_wait_1): Call extended_event_reported and set
4660 status to report fork events.
4661 (linux_write_memory): Add pid to debug message.
4662 (reset_lwp_ptrace_options_callback): New function.
4663 (linux_handle_new_gdb_connection): New function.
4664 (linux_target_ops): Initialize new structure member.
4665 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4666 * lynx-low.c: Initialize new structure member.
4667 * remote-utils.c (prepare_resume_reply): Implement stop reason
4668 "fork" for "T" stop message.
4669 * server.c (handle_query): Call handle_new_gdb_connection.
4670 * server.h (report_fork_events): Declare global flag.
4671 * target.h (struct target_ops) <handle_new_gdb_connection>:
4672 New member.
4673 (target_handle_new_gdb_connection): New macro.
4674 * win32-low.c: Initialize new structure member.
4675
ddcbc397
DB
46762015-05-12 Don Breazeal <donb@codesourcery.com>
4677
4678 * mem-break.c (APPEND_TO_LIST): Define macro.
4679 (clone_agent_expr): New function.
4680 (clone_one_breakpoint): New function.
4681 (clone_all_breakpoints): New function.
4682 * mem-break.h: Declare new functions.
4683
89245bc0
DB
46842015-05-12 Don Breazeal <donb@codesourcery.com>
4685
4686 * linux-low.c (linux_supports_fork_events): New function.
4687 (linux_supports_vfork_events): New function.
4688 (linux_target_ops): Initialize new structure members.
4689 (initialize_low): Call linux_check_ptrace_features.
4690 * lynx-low.c (lynx_target_ops): Initialize new structure
4691 members.
4692 * server.c (report_fork_events, report_vfork_events):
4693 New global flags.
4694 (handle_query): Add new features to qSupported packet and
4695 response.
4696 (captured_main): Initialize new global variables.
4697 * target.h (struct target_ops) <supports_fork_events>:
4698 New member.
4699 <supports_vfork_events>: New member.
4700 (target_supports_fork_events): New macro.
4701 (target_supports_vfork_events): New macro.
4702 * win32-low.c (win32_target_ops): Initialize new structure
4703 members.
4704
835205d0
GB
47052015-05-12 Gary Benson <gbenson@redhat.com>
4706
4707 * server.c (handle_qxfer_exec_file): Use current process
4708 if annex is empty.
4709
21e94bd9
SL
47102015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4711
4712 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4713 Remove HAVE_PTRACE_GETREGS conditionals.
4714 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4715 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4716
45614f15
YQ
47172015-05-08 Yao Qi <yao.qi@linaro.org>
4718
4719 * linux-low.c (linux_supports_conditional_breakpoints): New
4720 function.
4721 (linux_target_ops): Install new target method.
4722 * lynx-low.c (lynx_target_ops): Install NULL hook for
4723 supports_conditional_breakpoints.
4724 * nto-low.c (nto_target_ops): Likewise.
4725 * spu-low.c (spu_target_ops): Likewise.
4726 * win32-low.c (win32_target_ops): Likewise.
4727 * server.c (handle_query): Check
4728 target_supports_conditional_breakpoints.
4729 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4730 New field.
4731 (target_supports_conditional_breakpoints): New macro.
4732
80ad801e
PA
47332015-05-06 Pedro Alves <palves@redhat.com>
4734
4735 PR server/18081
4736 * server.c (start_inferior): If the process exits, mourn it.
4737
819843c7
GB
47382015-04-21 Gary Benson <gbenson@redhat.com>
4739
4740 * hostio.c (fileio_open_flags_to_host): Factored out to
4741 fileio_to_host_openflags in common/fileio.c. Single use
4742 updated.
4743
a2d5a9d7
MF
47442015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4745
4746 * linux-xtensa-low.c (xtensa_fill_gregset)
4747 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4748 XCHAL_HAVE_LOOP.
4749
deb44829
MF
47502015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4751
4752 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4753 (regs_info): Replace usrregs pointer with NULL.
4754
e57f1de3
GB
47552015-04-17 Gary Benson <gbenson@redhat.com>
4756
4757 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4758 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4759 * server.c (handle_qxfer_exec_file): New function.
4760 (qxfer_packets): Add exec-file entry.
4761 (handle_query): Report qXfer:exec-file:read as supported packet.
4762
62828379
RN
47632015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4764
4765 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4766
b88bb450
GB
47672015-04-09 Gary Benson <gbenson@redhat.com>
4768
4769 * hostio-errno.c (errno_to_fileio_error): Remove function.
4770 Update caller to use remote_fileio_to_fio_error.
4771
c8f4bfdd
YQ
47722015-04-09 Yao Qi <yao.qi@linaro.org>
4773
4774 * linux-low.c (linux_insert_point): Call
4775 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4776 (linux_remove_point): Call remove_memory_breakpoint if type is
4777 raw_bkpt_type_sw.
4778 * linux-x86-low.c (x86_insert_point): Don't call
4779 insert_memory_breakpoint.
4780 (x86_remove_point): Don't call remove_memory_breakpoint.
4781
41f98f02
PA
47822015-04-01 Pedro Alves <palves@redhat.com>
4783 Cleber Rosa <crosa@redhat.com>
4784
4785 * server.c (gdbserver_usage): Reorganize and extend the usage
4786 message.
4787
2bf6fb9d
PA
47882015-03-24 Pedro Alves <palves@redhat.com>
4789
4790 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4791 output. Also dump TRAP_TRACE.
4792 (linux_low_filter_event): In debug output, distinguish a
4793 resume_stop SIGSTOP from a delayed SIGSTOP.
4794
369f6daa
GB
47952015-03-24 Gary Benson <gbenson@redhat.com>
4796
4797 * linux-x86-low.c (x86_linux_new_thread): Moved to
4798 nat/x86-linux.c.
4799 (x86_linux_prepare_to_resume): Likewise.
4800
8e5d4070
GB
48012015-03-24 Gary Benson <gbenson@redhat.com>
4802
4803 * Makefile.in (x86-linux-dregs.o): New rule.
4804 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4805 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4806 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4807 (x86_linux_dr_get): Likewise.
4808 (x86_linux_dr_set): Likewise.
4809 (update_debug_registers_callback): Likewise.
4810 (x86_linux_dr_set_addr): Likewise.
4811 (x86_linux_dr_get_addr): Likewise.
4812 (x86_linux_dr_set_control): Likewise.
4813 (x86_linux_dr_get_control): Likewise.
4814 (x86_linux_dr_get_status): Likewise.
4815 (x86_linux_update_debug_registers): Likewise.
4816
2b95d440
GB
48172015-03-24 Gary Benson <gbenson@redhat.com>
4818
4819 * linux-x86-low.c (x86_linux_update_debug_registers):
4820 New function, factored out from...
4821 (x86_linux_prepare_to_resume): ...this.
4822
14b0bc68
GB
48232015-03-24 Gary Benson <gbenson@redhat.com>
4824
4825 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4826 (x86_linux_dr_set): Likewise.
4827 (update_debug_registers_callback): Likewise.
4828 (x86_linux_dr_set_addr): Likewise.
4829 (x86_linux_dr_get_addr): Likewise.
4830 (x86_linux_dr_set_control): Likewise.
4831 (x86_linux_dr_get_control): Likewise.
4832 (x86_linux_dr_get_status): Likewise.
4833 (x86_linux_prepare_to_resume): Likewise.
4834
5dfe6ca8
GB
48352015-03-24 Gary Benson <gbenson@redhat.com>
4836
4837 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4838 Use perror_with_name. Pass string through gettext.
4839 (x86_linux_dr_set): Likewise.
4840
d33472ad
GB
48412015-03-24 Gary Benson <gbenson@redhat.com>
4842
4843 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4844 (x86_linux_dr_set_addr): ...this.
4845 (x86_dr_low_get_addr): Rename to...
4846 (x86_linux_dr_get_addr): ...this.
4847 (x86_dr_low_set_control): Rename to...
4848 (x86_linux_dr_set_control): ...this.
4849 (x86_dr_low_get_control): Rename to...
4850 (x86_linux_dr_get_control): ...this.
4851 (x86_dr_low_get_status): Rename to...
4852 (x86_linux_dr_get_status): ...this.
4853 (x86_dr_low): Update with new function names.
4854
4b134ca1
GB
48552015-03-24 Gary Benson <gbenson@redhat.com>
4856
4857 * Makefile.in (x86-linux.o): New rule.
4858 * configure.srv: Add x86-linux.o to relevant targets.
4859 * linux-low.c (lwp_set_arch_private_info): New function.
4860 (lwp_arch_private_info): Likewise.
4861 * linux-x86-low.c: Include nat/x86-linux.h.
4862 (arch_lwp_info): Removed structure.
4863 (update_debug_registers_callback):
4864 Use lwp_set_debug_registers_changed.
4865 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4866 and lwp_set_debug_registers_changed.
4867 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4868
34c703da
GB
48692015-03-24 Gary Benson <gbenson@redhat.com>
4870
4871 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4872 * linux-arm-low.c (arm_new_thread): Likewise.
4873 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4874 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4875 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4876 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4877
cff068da
GB
48782015-03-24 Gary Benson <gbenson@redhat.com>
4879
4880 * linux-low.c (ptid_of_lwp): New function.
4881 (lwp_is_stopped): Likewise.
4882 (lwp_stop_reason): Likewise.
4883 * linux-x86-low.c (update_debug_registers_callback):
4884 Use lwp_is_stopped.
4885 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4886 lwp_stop_reason.
4887
b2f7c7e8
GB
48882015-03-24 Gary Benson <gbenson@redhat.com>
4889
4890 * linux-low.h (linux_stop_lwp): Remove declaration.
4891
6d4ee8c6
GB
48922015-03-24 Gary Benson <gbenson@redhat.com>
4893
4894 * linux-low.h: Include nat/linux-nat.h.
4895 * linux-low.c (iterate_over_lwps_args): New structure.
4896 (iterate_over_lwps_filter): New function.
4897 (iterate_over_lwps): Likewise.
4898 * linux-x86-low.c (update_debug_registers_callback):
4899 Update signature to what iterate_over_lwps expects.
4900 Remove PID check that iterate_over_lwps now performs.
4901 (x86_dr_low_set_addr): Use iterate_over_lwps.
4902 (x86_dr_low_set_control): Likewise.
4903
70a0bb6b
GB
49042015-03-24 Gary Benson <gbenson@redhat.com>
4905
4906 * linux-x86-low.c (x86_debug_reg_state): New function.
4907 (x86_linux_prepare_to_resume): Use the above.
4908
7b669087
GB
49092015-03-24 Gary Benson <gbenson@redhat.com>
4910
4911 * linux-low.c (current_lwp_ptid): New function.
4912 * linux-x86-low.c: Include nat/linux-nat.h.
4913 (x86_dr_low_get_addr): Use current_lwp_ptid.
4914 (x86_dr_low_get_control): Likewise.
4915 (x86_dr_low_get_status): Likewise.
4916
eef49a3d
PA
49172015-03-20 Pedro Alves <palves@redhat.com>
4918
4919 * tracepoint.c (cmd_qtstatus): Make "str" const.
4920
b2333d22
PA
49212015-03-20 Pedro Alves <palves@redhat.com>
4922
4923 * server.c (handle_general_set): Make "req_str" const.
4924
23f238d3
PA
49252015-03-19 Pedro Alves <palves@redhat.com>
4926
4927 * linux-low.c (linux_resume_one_lwp): Rename to ...
4928 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4929 instead call perror_with_name.
4930 (check_ptrace_stopped_lwp_gone): New function.
4931 (linux_resume_one_lwp): Reimplement as wrapper around
4932 linux_resume_one_lwp_throw that swallows errors if the LWP is
4933 gone.
4934
91baf43f
PA
49352015-03-19 Pedro Alves <palves@redhat.com>
4936
4937 * linux-low.c (count_events_callback, select_event_lwp_callback):
4938 No longer check whether the thread has resume_stop as last resume
4939 kind.
4940
8bf3b159
PA
49412015-03-19 Pedro Alves <palves@redhat.com>
4942
4943 * linux-low.c (count_events_callback, select_event_lwp_callback):
4944 Use the lwp's status_pending_p field, not the thread's.
4945
b90fc188
PA
49462015-03-19 Pedro Alves <palves@redhat.com>
4947
4948 * linux-low.c (select_event_lwp_callback): Update comments to
4949 no longer mention SIGTRAP.
4950
464b0089
GB
49512015-03-18 Gary Benson <gbenson@redhat.com>
4952
4953 * server.c (handle_query): Do not report vFile:fstat as supported.
4954
aa9e327f
GB
49552015-03-11 Gary Benson <gbenson@redhat.com>
4956
4957 * hostio.c (sys/types.h): New include.
4958 (sys/stat.h): Likewise.
4959 (common-remote-fileio.h): Likewise.
4960 (handle_fstat): New function.
4961 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 4962
791c0056
GB
49632015-03-11 Gary Benson <gbenson@redhat.com>
4964
4965 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4966 struct stat.st_blocks and struct stat.st_blksize.
4967 * configure: Regenerate.
4968 * config.in: Likewise.
4969 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4970 (OBS): Add common-remote-fileio.o.
4971 (common-remote-fileio.o): New rule.
4972
9a9df970
PA
49732015-03-09 Pedro Alves <palves@redhat.com>
4974
4975 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4976 'struct sockaddr' pointer in 'accept' call.
4977
9eb1356e
PA
49782015-03-09 Pedro Alves <palves@redhat.com>
4979
4980 Revert:
4981 2015-03-07 Pedro Alves <palves@redhat.com>
4982 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4983 or <winsock2.h> here. Instead include "gdb_socket.h".
4984 (remote_open): Use union gdb_sockaddr_u.
4985 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4986 or <winsock2.h> here. Instead include "gdb_socket.h".
4987 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4988 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4989 or <sys/un.h>.
4990 (init_named_socket, gdb_agent_helper_thread): Use union
4991 gdb_sockaddr_u.
4992
aac331e4
PA
49932015-03-07 Pedro Alves <palves@redhat.com>
4994
4995 * configure.ac (build_warnings): Move
4996 -Wdeclaration-after-statement to the C-specific set.
4997 * configure: Regenerate.
4998
366c75fc
PA
49992015-03-07 Pedro Alves <palves@redhat.com>
5000
5001 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5002 or <winsock2.h> here. Instead include "gdb_socket.h".
5003 (remote_open): Use union gdb_sockaddr_u.
5004 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5005 or <winsock2.h> here. Instead include "gdb_socket.h".
5006 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5007 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5008 or <sys/un.h>.
5009 (init_named_socket, gdb_agent_helper_thread): Use union
5010 gdb_sockaddr_u.
5011
492d29ea
PA
50122015-03-07 Pedro Alves <palves@redhat.com>
5013
5014 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5015 instead.
5016
60a191ed
YQ
50172015-03-06 Yao Qi <yao.qi@linaro.org>
5018
5019 * linux-aarch64-low.c (aarch64_insert_point): Use
5020 show_debug_regs as a boolean.
5021 (aarch64_remove_point): Likewise.
5022
f5771b1d
PA
50232015-03-05 Pedro Alves <palves@redhat.com>
5024
5025 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5026 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5027 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5028 * nto-low.c (nto_target_ops): Likewise.
5029 * spu-low.c (spu_target_ops): Likewise.
5030 * win32-low.c (win32_target_ops): Likewise.
5031
3e572f71
PA
50322015-03-04 Pedro Alves <palves@redhat.com>
5033
72f4393d 5034 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
5035 Decide whether a breakpoint triggered based on the SIGTRAP's
5036 siginfo.si_code.
72f4393d
L
5037 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5038 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
5039 (linux_low_filter_event): Check for breakpoints before checking
5040 watchpoints.
5041 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5042 siginfo.si_code.
72f4393d
L
5043 (linux_stopped_by_sw_breakpoint)
5044 (linux_supports_stopped_by_sw_breakpoint)
5045 (linux_stopped_by_hw_breakpoint)
5046 (linux_supports_stopped_by_hw_breakpoint): New functions.
5047 (linux_target_ops): Install new target methods.
3e572f71 5048
1ec68e26
PA
50492015-03-04 Pedro Alves <palves@redhat.com>
5050
5051 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5052 * server.c (swbreak_feature, hwbreak_feature): New globals.
5053 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5054 (captured_main): Clear swbreak_feature and hwbreak_feature.
5055 * server.h (swbreak_feature, hwbreak_feature): Declare.
5056 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5057 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5058 supports_stopped_by_hw_breakpoint>: New fields.
5059 (target_supports_stopped_by_sw_breakpoint)
5060 (target_stopped_by_sw_breakpoint)
5061 (target_supports_stopped_by_hw_breakpoint)
5062 (target_stopped_by_hw_breakpoint): Declare.
5063
15c66dd6
PA
50642015-03-04 Pedro Alves <palves@redhat.com>
5065
5066 enum lwp_stop_reason -> enum target_stop_reason
5067 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5068 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5069 (linux_wait_1, stuck_in_jump_pad_callback)
5070 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5071 (linux_stopped_by_watchpoint):
5072 * linux-low.h (enum lwp_stop_reason): Delete.
5073 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5074 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5075
98fc70d6
YQ
50762015-03-04 Yao Qi <yao.qi@linaro.org>
5077
5078 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5079
dd2ac174
GB
50802015-03-03 Gary Benson <gbenson@redhat.com>
5081
5082 * hostio.c (handle_vFile): Fix prefix lengths.
5083
d68e53f4
MM
50842015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5085
5086 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5087 ptr_bits.
5088
bf2d68ab
AA
50892015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5090
5091 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5092 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5093 (clean): Add "rm -f" for above C files.
5094 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5095 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5096 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5097 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5098 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5099 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5100 (init_registers_s390x_vx_linux64)
5101 (init_registers_s390x_tevx_linux64)
5102 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5103 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5104 declarations.
5105 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5106 (s390_store_vxrs_high): New functions.
5107 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5108 NT_S390_VXRS_HIGH.
5109 (s390_arch_setup): Add logic for selecting one of the new target
5110 descriptions. Activate the new vector regsets if applicable.
5111 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5112 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5113 and init_registers_s390x_tevx_linux64.
5114
c966a859
PA
51152015-03-01 Pedro Alves <palves@redhat.com>
5116
5117 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5118 parameter.
5119
4180215b
PA
51202015-02-27 Pedro Alves <palves@redhat.com>
5121
5122 * linux-x86-low.c (u_debugreg_offset): New function.
5123 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5124
749bab01
PA
51252015-02-27 Pedro Alves <palves@redhat.com>
5126
5127 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5128 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5129 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5130 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5131 (ps_lsetfpregs, ps_getpid)
5132 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5133 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5134 (ps_lsetxregs, ps_plog): Declare.
5135
3c14e5a3
PA
51362015-02-27 Pedro Alves <palves@redhat.com>
5137
5138 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5139 IP_AGENT_EXPORT_FUNC.
5140 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5141 IP_AGENT_EXPORT_FUNC.
5142 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5143 (IP_AGENT_EXPORT): Delete.
5144 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5145 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5146 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5147 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5148 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5149 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5150 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5151 (traceframe_read_count, traceframe_write_count)
5152 (traceframes_created, trace_state_variables, get_raw_reg)
5153 (get_trace_state_variable_value, set_trace_state_variable_value)
5154 (ust_loaded, helper_thread_id, cmd_buf): Use
5155 IPA_SYM_EXPORTED_NAME.
5156 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5157 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5158 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5159 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5160 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5161 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5162 EXTERN_C_PUSH/EXTERN_C_POP.
5163 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5164 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5165 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5166 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5167 (traceframe_write_count, traceframe_read_count)
5168 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5169 (about_to_request_buffer_space, get_trace_state_variable_value)
5170 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5171 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5172 EXTERN_C_PUSH/EXTERN_C_POP.
5173 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5174 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5175 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5176 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5177 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5178 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5179 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5180 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5181 Define.
5182 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5183 (IP_AGENT_EXPORT_VAR_DECL): Define.
5184 (tracing): Declare.
5185 (gdb_agent_get_raw_reg): Declare.
5186
fe978cb0
PA
51872015-02-27 Tom Tromey <tromey@redhat.com>
5188 Pedro Alves <palves@redhat.com>
5189
5190 Rename symbols whose names are reserved C++ keywords throughout.
5191
3bc3d82a
PA
51922015-02-27 Pedro Alves <palves@redhat.com>
5193
5194 * Makefile.in (COMPILER): New, get it from autoconf.
5195 (CXX): Get from autoconf instead.
5196 (COMPILE.pre): Use COMPILER.
5197 (CC-LD): Rename to ...
5198 (CC_LD): ... this. Use COMPILER.
5199 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5200 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5201 * acinclude.m4: Include build-with-cxx.m4.
5202 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5203 Disable -Werror by default if building in C++ mode.
5204 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5205 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5206 the C++ compiler. Save/restore CXXFLAGS too.
5207 * configure: Regenerate.
5208
07697489
PA
52092015-02-27 Pedro Alves <palves@redhat.com>
5210
5211 * acinclude.m4: Include libiberty.m4.
5212 * configure.ac: Call libiberty_INIT.
5213 * config.in, configure: Regenerate.
5214
9beb7c4e
PA
52152015-02-26 Pedro Alves <palves@redhat.com>
5216
5217 * linux-low.c (linux_wait_1): When incrementing the PC past a
5218 program breakpoint always use the_low_target.breakpoint_len as
5219 increment, rather than the maximum between that and
5220 the_low_target.decr_pc_after_break.
5221
8090aef2
PA
52222015-02-23 Pedro Alves <palves@redhat.com>
5223
5224 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5225 thread was doing a step-over; always adjust the PC if
5226 we stepped over a permanent breakpoint.
5227 (linux_wait_1): If we stepped over breakpoint that was on top of a
5228 permanent breakpoint, manually advance the PC past it.
5229
bc9540e8
PA
52302015-02-23 Pedro Alves <palves@redhat.com>
5231
5232 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5233 modes.
5234 (x86_fill_gregset, x86_store_gregset): Use it when handling
5235 $orig_eax.
5236
2db9a427
PA
52372015-02-20 Pedro Alves <palves@redhat.com>
5238
5239 * thread-db.c: Include "nat/linux-procfs.h".
5240 (thread_db_init): Skip listing new threads if the kernel supports
5241 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5242
afa8d396
PA
52432015-02-20 Pedro Alves <palves@redhat.com>
5244
5245 * linux-low.c (status_pending_p_callback): Use ptid_match.
5246
c9587f88
AT
52472015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5248
5249 PR breakpoints/16812
5250 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5251 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5252 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5253
b05ec7a5
AT
52542015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5255
5256 PR breakpoints/15956
5257 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5258
d33501a5
MM
52592015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5260
5261 * linux-low.c (linux_low_btrace_conf): Print size.
5262 * server.c (handle_btrace_conf_general_set): New.
5263 (hanle_general_set): Call handle_btrace_conf_general_set.
5264 (handle_query): Report Qbtrace-conf:bts:size as supported.
5265
f4abbc16
MM
52662015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5267
5268 * linux-low.c (linux_low_enable_btrace): Update parameters.
5269 (linux_low_btrace_conf): New.
5270 (linux_target_ops)<to_btrace_conf>: Initialize.
5271 * server.c (current_btrace_conf): New.
5272 (handle_btrace_enable): Rename to ...
5273 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5274 to target_enable_btrace. Update comment. Update users.
5275 (handle_qxfer_btrace_conf): New.
5276 (qxfer_packets): Add btrace-conf entry.
5277 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5278 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5279 (target_ops)<read_btrace_conf>: New.
5280 (target_enable_btrace): Update parameters.
5281 (target_read_btrace_conf): New.
5282
043c3577
MM
52832015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5284
5285 * server.c (handle_btrace_general_set): Remove call to
5286 target_supports_btrace.
5287 (supported_btrace_packets): New.
5288 (handle_query): Call supported_btrace_packets.
5289 * target.h: include btrace-common.h.
5290 (btrace_target_info): Removed.
5291 (supports_btrace, target_supports_btrace): Update parameters.
5292
734b0e4b
MM
52932015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5294
5295 * Makefile.in (SFILES): Add common/btrace-common.c.
5296 (OBS): Add common/btrace-common.o.
5297 (btrace-common.o): Add build rules.
5298 * linux-low: Include btrace-common.h.
5299 (linux_low_read_btrace): Use struct btrace_data. Call
5300 btrace_data_init and btrace_data_fini.
5301
d6c146e9
PA
53022015-02-06 Pedro Alves <palves@redhat.com>
5303
5304 * thread-db.c (find_new_threads_callback): Add debug output.
5305
20ba1ce6
PA
53062015-02-04 Pedro Alves <palves@redhat.com>
5307
5308 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5309 (resume_stopped_resumed_lwps): New function.
5310 (linux_wait_for_event_filtered): Use it.
5311
8cc73a39
SDJ
53122015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5313
5314 * Makefile.in (SFILES): Add linux-personality.c.
5315 (linux-personality.o): New rule.
5316 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5317 list of objects to be built.
5318 * linux-low.c: Include nat/linux-personality.h.
5319 (linux_create_inferior): Remove code to disable address space
5320 randomization (moved to ../nat/linux-personality.c). Create
5321 cleanup to disable address space randomization.
5322
fb23d554
SDJ
53232015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5324
5325 * Makefile.in (posix-strerror.o): New rule.
5326 (mingw-strerror.o): Likewise.
5327 * configure: Regenerated.
5328 * configure.ac: Source file ../common/common.host. Initialize new
5329 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5330
cdf43629
YQ
53312015-01-14 Yao Qi <yao@codesourcery.com>
5332
5333 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5334 (ppc-linux.o): New rule.
5335 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5336 * configure.ac: AC_CHECK_FUNCS(getauxval).
5337 * config.in: Re-generated.
5338 * configure: Re-generated.
5339 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5340 ppc64_64bit_inferior_p
5341
514c5338
YQ
53422015-01-14 Yao Qi <yao@codesourcery.com>
5343
5344 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5345 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5346 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5347 (PT_ORIG_R3, PT_TRAP): Likewise.
5348 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5349 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5350 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5351
3368c1e5
JB
53522015-01-10 Joel Brobecker <brobecker@adacore.com>
5353
5354 * i387-fp.c (i387_cache_to_xsave): In look over
5355 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5356 zmmh_low_space field by use of zmmh_high_space.
5357
582511be
PA
53582015-01-09 Pedro Alves <palves@redhat.com>
5359
5360 * linux-low.c (step_over_bkpt): Move higher up in the file.
5361 (handle_extended_wait): Don't store the stop_pc here.
5362 (get_stop_pc): Adjust comments and rename to ...
5363 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5364 stopped for a software breakpoint or hardware breakpoint.
5365 (thread_still_has_status_pending_p): New function.
5366 (status_pending_p_callback): Use
5367 thread_still_has_status_pending_p. If the event is no longer
5368 interesting, resume the LWP.
5369 (handle_tracepoints): Add assert.
5370 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5371 (wstatus_maybe_breakpoint): New function.
5372 (cancel_breakpoint): Delete function.
5373 (check_stopped_by_watchpoint): New function, factored out from
5374 linux_low_filter_event.
5375 (lp_status_maybe_breakpoint): Delete function.
5376 (linux_low_filter_event): Remove filter_ptid argument.
5377 Leave thread group exits pending here. Store the LWP's stop PC.
5378 Always leave events pending.
5379 (linux_wait_for_event_filtered): Pull all events out of the
5380 kernel, and leave them all pending.
5381 (count_events_callback, select_event_lwp_callback): Consider all
5382 events.
5383 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5384 (select_event_lwp): Only give preference to the stepping LWP in
5385 all-stop mode. Adjust comments.
5386 (ignore_event): New function.
5387 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5388 references to cancel_breakpoints. Adjust to renames. Also give
5389 equal priority to all LWPs that have had events in non-stop mode.
5390 If reporting a software breakpoint event, unadjust the LWP's PC.
5391 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5392 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5393 Adjust.
5394 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5395 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5396 (linux_stopped_by_watchpoint): Adjust.
5397 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5398 * linux-low.h (enum lwp_stop_reason): New.
5399 (struct lwp_info) <stop_pc>: Adjust comment.
5400 <stopped_by_watchpoint>: Delete field.
5401 <stop_reason>: New field.
5402 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5403 * mem-break.c (software_breakpoint_inserted_here)
5404 (hardware_breakpoint_inserted_here): New function.
5405 * mem-break.h (software_breakpoint_inserted_here)
5406 (hardware_breakpoint_inserted_here): Declare.
5407 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5408 (cancel_breakpoints): Delete.
5409 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5410 (upload_fast_traceframes): Remove references to
5411 cancel_breakpoints.
5412
a33e3959
PA
54132015-01-09 Pedro Alves <palves@redhat.com>
5414
5415 * thread-db.c (find_new_threads_callback): Ignore thread if the
5416 kernel thread ID is -1.
5417
8784d563
PA
54182015-01-09 Pedro Alves <palves@redhat.com>
5419
5420 * linux-low.c (linux_attach_fail_reason_string): Move to
5421 nat/linux-ptrace.c, and rename.
5422 (linux_attach_lwp): Update comment.
5423 (attach_proc_task_lwp_callback): New function.
5424 (linux_attach): Adjust to rename and use
5425 linux_proc_attach_tgid_threads.
5426 (linux_attach_fail_reason_string): Delete declaration.
5427
76f2b779
JB
54282015-01-01 Joel Brobecker <brobecker@adacore.com>
5429
5430 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5431 * server.c (gdbserver_version): Likewise.
5432
fafcc06a
SDJ
54332014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5434
5435 * remote-utils.c: Include ctype.h.
5436 (input_interrupt): Explicitly handle the case when the char
5437 received is the NUL byte. Improve the printing of non-ASCII
5438 characters.
5439
beed38b8
JB
54402014-12-16 Joel Brobecker <brobecker@adacore.com>
5441
5442 * linux-low.c (linux_low_filter_event): Update call to
5443 linux_enable_event_reporting following the addition of
5444 a new parameter to that function.
5445
bf330350
CU
54462014-12-16 Catalin Udma <catalin.udma@freescale.com>
5447
5448 PR server/17457
5449 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5450 (AARCH64_FPCR_REGNO): Likewise.
5451 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5452 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5453 (aarch64_store_fpregset): Likewise.
5454
5227d625
JB
54552014-12-15 Joel Brobecker <brobecker@adacore.com>
5456
5457 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5458 Remove FIXME comment about assumption about N.
5459
f93b65a0
JB
54602014-12-13 Joel Brobecker <brobecker@adacore.com>
5461
5462 * configure.ac: If large-file support is disabled in GDBserver,
5463 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5464 * configure: Regenerate.
5465
e5a9158d
AA
54662014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5467
5468 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5469 warning upon ENODATA from ptrace.
5470 * linux-s390-low.c (s390_store_tdb): New.
5471 (s390_regsets): Add regset for NT_S390_TDB.
5472
feea5f36
AA
54732014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5474
5475 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5476 without a fill_function.
5477 * linux-s390-low.c (s390_fill_last_break): Remove.
5478 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5479 (s390_arch_setup): Use regset's size instead of fill_function for
5480 loop end condition.
5481
098dbe61
AA
54822014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5483
5484 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5485 the regset's store function when ptrace returned an error.
5486 * regcache.c (get_thread_regcache): Invalidate register cache
5487 before fetching inferior's registers.
5488
28eef672
AA
54892014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5490
5491 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5492 while-loop as for-loop.
5493 (regsets_store_inferior_registers): Likewise.
5494
bdca27a2
YQ
54952014-11-28 Yao Qi <yao@codesourcery.com>
5496
5497 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5498 * config.in, configure: Re-generate.
5499 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5500 is defined.
5501
9c232dda
YQ
55022014-11-21 Yao Qi <yao@codesourcery.com>
5503
5504 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5505 (AC_CHECK_HEADERS): Remove malloc.h.
5506 * configure: Re-generated.
5507 * config.in: Re-generated.
5508 * server.h: Don't include alloca.h and malloc.h.
5509 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5510 Don't include malloc.h.
5511
43968415
JB
55122014-11-17 Joel Brobecker <brobecker@adacore.com>
5513
5514 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5515 corresponding ERRNO check in same block.
5516
40e91bc7
PA
55172014-11-12 Pedro Alves <palves@redhat.com>
5518
5519 * server.c (cont_thread): Update comment.
5520 (start_inferior, attach_inferior): No longer clear cont_thread.
5521 (handle_v_cont): No longer set cont_thread.
5522 (captured_main): Clear cont_thread each time a GDB connects.
5523
c2c118cf
PA
55242014-11-12 Pedro Alves <palves@redhat.com>
5525
5526 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5527 thread, and don't resume all threads if the Hc thread has exited.
5528
78708b7c
PA
55292014-11-12 Pedro Alves <palves@redhat.com>
5530
5531 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5532 the process group instead of to a specific LWP.
5533
a2abc7de
PA
55342014-10-15 Pedro Alves <palves@redhat.com>
5535
5536 PR server/17487
5537 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5538 parameter.
5539 (arm_set_thread_context): Delete.
5540 (the_low_target): Adjust.
5541 * win32-i386-low.c (debug_registers_changed)
5542 (debug_registers_used): Delete.
5543 (update_debug_registers_callback): New function.
5544 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5545 needing to update their debug registers.
5546 (win32_get_current_dr): New function.
5547 (x86_dr_low_get_addr, x86_dr_low_get_control)
5548 (x86_dr_low_get_status): Fetch the debug register from the thread
5549 record's context.
5550 (i386_initial_stuff): Adjust.
5551 (i386_get_thread_context): Remove current_event parameter. Don't
5552 clear debug_registers_changed nor copy DR values to
5553 debug_reg_state.
5554 (i386_set_thread_context): Delete.
5555 (i386_prepare_to_resume): New function.
5556 (i386_thread_added): Mark the thread as needing to update irs
5557 debug registers.
5558 (the_low_target): Remove i386_set_thread_context and install
5559 i386_prepare_to_resume.
5560 * win32-low.c (win32_get_thread_context): Adjust.
5561 (win32_set_thread_context): Use SetThreadContext
5562 directly.
5563 (win32_prepare_to_resume): New function.
5564 (win32_require_context): New function, factored out from ...
5565 (thread_rec): ... this.
5566 (continue_one_thread): Call win32_prepare_to_resume on each thread
5567 we're about to continue.
5568 (win32_resume): Call win32_prepare_to_resume on the event thread.
5569 * win32-low.h (struct win32_thread_info)
5570 <debug_registers_changed>: New field.
5571 (struct win32_target_ops): Change prototype of set_thread_context,
5572 delete set_thread_context and add prepare_to_resume.
5573 (win32_require_context): New declaration.
5574
a442d071
GB
55752014-10-08 Gary Benson <gbenson@redhat.com>
5576
5577 * server.h: Do not include common-exceptions.h.
5578
6f1947e8
GB
55792014-10-08 Gary Benson <gbenson@redhat.com>
5580
5581 * server.h: Do not include cleanups.h.
5582
63b434a4
JH
55832014-09-30 James Hogan <james.hogan@imgtec.com>
5584
5585 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5586 mips64-dsp-linux.c.
5587
c4d9ceb6
YQ
55882014-09-23 Yao Qi <yao@codesourcery.com>
5589
5590 * linux-low.c (lp_status_maybe_breakpoint): New function.
5591 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5592 (count_events_callback): Likewise.
5593 (select_event_lwp_callback): Likewise.
5594 (cancel_breakpoints_callback): Likewise.
5595
89a5711c
DB
55962014-09-19 Don Breazeal <donb@codesourcery.com>
5597
5598 * linux-low.c (handle_extended_wait): Call
5599 linux_ptrace_get_extended_event.
5600 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5601 linux_is_extended_waitstatus.
5602
bffc0964
JB
56032014-09-16 Joel Brobecker <brobecker@adacore.com>
5604
5605 * Makefile.in (CPPFLAGS): Define.
5606 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5607 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5608
0bfdf32f
GB
56092014-09-16 Gary Benson <gbenson@redhat.com>
5610
5611 * inferiors.h (current_inferior): Renamed as...
5612 (current_thread): New variable. All uses updated.
5613 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5614 (maybe_move_out_of_jump_pad): Likewise.
5615 (cancel_breakpoint): Likewise.
5616 (linux_low_filter_event): Likewise.
5617 (wait_for_sigstop): Likewise.
5618 (linux_resume_one_lwp): Likewise.
5619 (need_step_over_p): Likewise.
5620 (start_step_over): Likewise.
5621 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5622 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5623 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5624 and save_inferior as saved_thread.
5625 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5626 saved_thread.
5627 (regcache_invalidate_thread): Likewise.
5628 * remote-utils.c (prepare_resume_reply): Likewise.
5629 * thread-db.c (thread_db_get_tls_address): Likewise.
5630 (disable_thread_event_reporting): Likewise.
5631 (remove_thread_event_breakpoints): Likewise.
5632 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5633 as saved_thread.
5634 * target.h (set_desired_inferior): Renamed as...
5635 (set_desired_thread): New declaration. All uses updated.
5636 * server.c (myresume): Updated comment to reference thread instead
5637 of inferior.
5638 (handle_serial_event): Likewise.
5639 (handle_target_event): Likewise.
5640
361c8ade
GB
56412014-09-12 Tom Tromey <tromey@redhat.com>
5642 Gary Benson <gbenson@redhat.com>
5643
5644 * regcache.h: Include common-regcache.h.
5645 (regcache_read_pc): Don't declare.
5646 * regcache.c (get_thread_regcache_for_ptid): New function.
5647
bd9269f7
GB
56482014-09-11 Tom Tromey <tromey@redhat.com>
5649 Gary Benson <gbenson@redhat.com>
5650
5651 * symbol.c: New file.
5652 * Makefile.in (SFILES): Add symbol.c.
5653 (OBS): Add symbol.o.
5654
f8c1d06b
GB
56552014-09-11 Gary Benson <gbenson@redhat.com>
5656
5657 * target.c (target_stop_ptid, target_continue_ptid): New
5658 functions.
5659
721ec300
GB
56602014-09-11 Tom Tromey <tromey@redhat.com>
5661 Gary Benson <gbenson@redhat.com>
5662
5663 * target.h: Include target/target.h.
5664 * target.c (target_read_memory, target_read_uint32)
5665 (target_write_memory): New functions.
5666
c5e92cca
GB
56672014-09-11 Gary Benson <gbenson@redhat.com>
5668
5669 * server.h (debug_hw_points): Don't declare.
5670 * server.c (debug_hw_points): Don't define. Replace all uses
5671 with show_debug_regs.
5672 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5673 all uses with show_debug_regs.
5674
2e4bb98a
EBM
56752014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5676
5677 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5678 endianness into account.
5679 (ppc_supply_ptrace_register): Likewise.
5680
ac740bc7
JH
56812014-09-03 James Hogan <james.hogan@imgtec.com>
5682
5683 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5684 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5685
97ea6506
GB
56862014-09-03 Gary Benson <gbenson@redhat.com>
5687
5688 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5689 ALL_DEBUG_ADDRESS_REGISTERS.
5690
df7e5265
GB
56912014-09-02 Gary Benson <gbenson@redhat.com>
5692
5693 * i386-low.h: Renamed as...
5694 * x86-low.h: New file. All type, function and variable name
5695 prefixes changed from "i386_" to "x86_". All references updated.
5696 * i386-low.c: Renamed as...
5697 * x86-low.c: New file. All type, function and variable name
5698 prefixes changed from "i386_" to "x86_". All references updated.
5699
ed859da7
GB
57002014-09-02 Gary Benson <gbenson@redhat.com>
5701
5702 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5703 (x86_linux_new_thread): Likewise.
5704
860789c7
GB
57052014-08-29 Gary Benson <gbenson@redhat.com>
5706
5707 * server.h (setjmp.h): Do not include.
5708 (toplevel): Do not declare.
5709 (common-exceptions.h): Include.
5710 (cleanups.h): Likewise.
5711 * server.c (toplevel): Do not define.
5712 (exit_code): New static global.
5713 (detach_or_kill_for_exit_cleanup): New function.
5714 (main): New function. Original main renamed to...
5715 (captured_main): New function.
5716 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5717
ff55e1b5
GB
57182014-08-29 Gary Benson <gbenson@redhat.com>
5719
5720 * Makefile.in (SFILES): Add common/common-exceptions.c.
5721 (OBS): Add common-exceptions.o.
5722 (common-exceptions.o): New rule.
5723 * utils.c (prepare_to_throw_exception): New function.
5724
e9bcb658
GB
57252014-08-29 Gary Benson <gbenson@redhat.com>
5726
5727 * config.in: Regenerate.
5728 * configure: Likewise.
5729
e3180625
GB
57302014-08-29 Gary Benson <gbenson@redhat.com>
5731
5732 * Makefile.in (SFILES): Add common/cleanups.c.
5733 (OBS): cleanups.o.
5734 (cleanups.o): New rule.
5735
e3d6ba5d
GB
57362014-08-29 Gary Benson <gbenson@redhat.com>
5737
5738 * utils.c (internal_vwarning): New function.
5739
7096e886
GB
57402014-08-28 Gary Benson <gbenson@redhat.com>
5741
5742 * utils.h (fatal): Remove declaration.
5743 * utils.c (fatal): Remove function.
5744
14ce3192
GB
57452014-08-28 Gary Benson <gbenson@redhat.com>
5746
5747 * tracepoint.c (gdb_agent_init): Replace fatal with
5748 perror_with_name.
5749 (initialize_tracepoint): Likewise.
5750
50278d59
GB
57512014-08-28 Gary Benson <gbenson@redhat.com>
5752
5753 * remote-utils.c (remote_prepare): Replace fatal with error.
5754
aa96c426
GB
57552014-08-28 Gary Benson <gbenson@redhat.com>
5756
5757 * linux-low.c (linux_async): Replace fatal with warning.
5758 Tidy up and return.
5759 (linux_start_non_stop): Return -1 if linux_async failed.
5760
f7160e97
GB
57612014-08-28 Gary Benson <gbenson@redhat.com>
5762
5763 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5764 gdb_assert.
5765 (i386_dr_low_get_addr): Remove vague comment.
5766 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5767 gdb_assert.
5768
38e08fca
GB
57692014-08-28 Gary Benson <gbenson@redhat.com>
5770
5771 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5772 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5773 internal_error.
5774 (linux_resume_one_lwp): Likewise.
5775 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5776 gdb_assert.
5777 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5778 with internal_error.
5779 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5780 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5781 (find_register_by_name): Replace fatal with internal_error.
5782 (find_regno): Likewise.
5783 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5784 * thread-db.c (thread_db_create_event): Likewise.
5785 (thread_db_load_search): Likewise.
5786 (try_thread_db_load_1): Likewise.
5787 * tracepoint.c (get_jump_space_head): Replace fatal with
5788 internal_error.
5789 (claim_trampoline_space): Likewise.
5790 (have_fast_tracepoint_trampoline_buffer): Likewise.
5791 (cmd_qtstart): Likewise.
5792 (stop_tracing): Likewise.
5793 (fast_tracepoint_collecting): Likewise.
5794 (target_malloc): Likewise.
5795 (download_tracepoint): Likewise.
5796 (download_trace_state_variables): Replace check with gdb_assert.
5797 (upload_fast_traceframes): Replace fatal with internal_error.
5798
34abf635
GB
57992014-08-19 Tom Tromey <tromey@redhat.com>
5800 Gary Benson <gbenson@redhat.com>
5801
5802 * Makefile.in (SFILES): Add common/common-debug.c.
5803 (OBS): Add common-debug.o.
5804 (common-debug.o): New rule.
5805 * debug.h (debug_printf): Don't declare.
5806 * debug.c (debug_printf): Renamed and rewritten as...
5807 (debug_vprintf): New function.
5808
f6e94d78
GB
58092014-08-19 Gary Benson <gbenson@redhat.com>
5810
5811 * utils.h: Do not include print-utils.h.
5812
9239eeab
GB
58132014-08-19 Tom Tromey <tromey@redhat.com>
5814 Gary Benson <gbenson@redhat.com>
5815
5816 * server.h: Add static assertion.
5817 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5818
ef87c8bb
GB
58192014-08-19 Tom Tromey <tromey@redhat.com>
5820 Gary Benson <gbenson@redhat.com>
5821
5822 * Makefile.in (SFILES): Add common/errors.c.
5823 (OBS): Add errors.o.
5824 (IPA_OBS): Add errors-ipa.o.
5825 (errors.o): New rule.
5826 (errors-ipa.o): Likewise.
5827 * utils.h (perror_with_name, error, warning): Don't declare.
5828 * utils.c (warning): Renamed and rewritten as...
5829 (vwarning): New function.
5830 (error): Renamed and rewritten as...
5831 (verror): New function.
5832 (internal_error): Renamed and rewritten as...
5833 (internal_verror): New function.
5834
bb974a24
GB
58352014-08-07 Gary Benson <gbenson@redhat.com>
5836
5837 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5838 * configure: Regenerate.
5839 * config.in: Likewise.
5840 * server.h: Do not include errno.h.
5841 * event-loop.c: Likewise.
5842 * hostio-errno.c: Likewise.
5843 * linux-low.c: Likewise.
5844 * remote-utils.c: Likewise.
5845 * spu-low.c: Likewise.
5846 * utils.c: Likewise.
5847 * gdbreplay.c: Unconditionally include errno.h.
5848
6d3d12eb
GB
58492014-08-07 Gary Benson <gbenson@redhat.com>
5850
5851 * server.h: Do not include string.h.
5852 * event-loop.c: Likewise.
5853 * linux-low.c: Likewise.
5854 * regcache.c: Likewise.
5855 * remote-utils.c: Likewise.
5856 * spu-low.c: Likewise.
5857 * utils.c: Likewise.
5858
dccbb609
GB
58592014-08-07 Gary Benson <gbenson@redhat.com>
5860
5861 * server.h: Do not include gdb_assert.h.
5862
e76df0d0
GB
58632014-08-07 Gary Benson <gbenson@redhat.com>
5864
5865 * server.h: Do not include common-utils.h.
5866
4cb9c816
GB
58672014-08-07 Gary Benson <gbenson@redhat.com>
5868
5869 * server.h: Do not include ptid.h.
5870 * notif.h: Likewise.
5871
3995eeee
GB
58722014-08-07 Gary Benson <gbenson@redhat.com>
5873
5874 * server.h: Do not include gdb_locale.h.
5875
cb9f1a9b
GB
58762014-08-07 Gary Benson <gbenson@redhat.com>
5877
5878 * server.h: Do not include gdb/signals.h.
5879 * win32-low.c: Likewise.
5880
a5fceff8
GB
58812014-08-07 Gary Benson <gbenson@redhat.com>
5882
5883 * server.h: Do not include pathmax.h.
5884
b9391142
GB
58852014-08-07 Gary Benson <gbenson@redhat.com>
5886
5887 * server.h: Do not include libiberty.h.
5888 * linux-bfin-low.c: Likewise.
5889
0e443c87
GB
58902014-08-07 Gary Benson <gbenson@redhat.com>
5891
5892 * server.h: Do not include ansidecl.h.
5893
8ebb3f56
GB
58942014-08-07 Gary Benson <gbenson@redhat.com>
5895
5896 * linux-x86-low.c: Do not include stddef.h.
5897 * lynx-ppc-low.c: Likewise.
5898 * tracepoint.c: Likewise.
5899
8980bdf6
GB
59002014-08-07 Gary Benson <gbenson@redhat.com>
5901
5902 * server.h: Do not include stdarg.h.
5903 * nto-low.c: Likewise.
5904
d7096f71
GB
59052014-08-07 Gary Benson <gbenson@redhat.com>
5906
5907 * server.h: Do not include stdlib.h.
5908 * inferiors.c: Likewise.
5909 * linux-low.c: Likewise.
5910 * regcache.c: Likewise.
5911 * spu-low.c: Likewise.
5912 * tracepoint.c: Likewise.
5913 * utils.c: Likewise.
5914
d02f550d
GB
59152014-08-07 Gary Benson <gbenson@redhat.com>
5916
5917 * server.h: Do not include stdio.h.
5918 * linux-low.c: Likewise.
5919 * remote-utils.c: Likewise.
5920 * spu-low.c: Likewise.
5921 * utils.c: Likewise.
5922 * wincecompat.c: Likewise.
5923
87f6c4e3
GB
59242014-08-06 Gary Benson <gbenson@redhat.com>
5925
5926 * regcache.c (init_register_cache): Move conditionals inside if.
5927
7089dca4
GB
59282014-08-06 Gary Benson <gbenson@redhat.com>
5929
5930 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5931
462f517e
GB
59322014-07-31 Gary Benson <gbenson@redhat.com>
5933
5934 * ax.h: Do not include server.h.
5935 * gdbthread.h: Likewise.
5936 * lynx-low.h: Likewise.
5937 * notif.h: Likewise.
5938
976411d6
GB
59392014-07-30 Gary Benson <gbenson@redhat.com>
5940
5941 * server.h: Include common-defs.h.
5942 Do not include config.h or build-gnulib-gdbserver/config.h.
5943
d41f6d8e
GB
59442014-07-30 Gary Benson <gbenson@redhat.com>
5945
5946 * hostio-errno.c: Move server.h to top of includes list.
5947 * inferiors.c: Likewise.
5948 * linux-x86-low.c: Likewise.
5949 * notif.c: Include server.h.
5950
314c6a35
TT
59512014-07-24 Tom Tromey <tromey@redhat.com>
5952 Gary Benson <gbenson@redhat.com>
5953
5954 * server.h (CORE_ADDR): Now unsigned.
5955
69ff6be5
PA
59562014-07-16 Pedro Alves <palves@redhat.com>
5957
5958 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5959
ce9e3fe7
PA
59602014-07-15 Pedro Alves <palves@redhat.com>
5961
5962 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5963 copy.
5964
e76126e8
PA
59652014-07-11 Pedro Alves <palves@redhat.com>
5966
5967 * linux-low.c (kill_wait_lwp): New function, based on
5968 kill_one_lwp_callback, but use my_waitpid directly.
5969 (kill_one_lwp_callback, linux_kill): Use it.
5970
8e9db26e
PA
59712014-06-23 Pedro Alves <palves@redhat.com>
5972
5973 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5974 before setting DR0..DR3.
5975
698b3e08
GB
59762014-06-20 Gary Benson <gbenson@redhat.com>
5977
5978 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5979 * configure: Regenerated.
5980 * config.in: Likewise.
5981
125f8a3d
GB
59822014-06-20 Gary Benson <gbenson@redhat.com>
5983
5984 * Makefile.in (SFILES): Update locations for files moved
5985 from common to nat.
5986 (object file files): Reordered.
5987
42995dbd
GB
59882014-06-20 Gary Benson <gbenson@redhat.com>
5989
5990 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5991 (i386_dr_low_set_addr): Likewise.
5992 (i386_dr_low_get_addr): Likewise.
5993 (i386_dr_low_can_set_control): Likewise.
5994 (i386_dr_low_set_control): Likewise.
5995 (i386_dr_low_get_control): Likewise.
5996 (i386_dr_low_get_status): Likewise.
5997 (i386_get_debug_register_length): Likewise.
5998 * linux-x86-low.c (i386_dr_low_set_addr):
5999 Changed signature. Made static.
6000 (i386_dr_low_get_addr): Likewise.
6001 (i386_dr_low_set_control): Likewise.
6002 (i386_dr_low_get_control): Likewise.
6003 (i386_dr_low_get_status): Likewise.
6004 (i386_dr_low): New global variable.
6005 * win32-i386-low.c (i386_dr_low_set_addr):
6006 Changed signature. Made static.
6007 (i386_dr_low_get_addr): Likewise.
6008 (i386_dr_low_set_control): Likewise.
6009 (i386_dr_low_get_control): Likewise.
6010 (i386_dr_low_get_status): Likewise.
6011 (i386_dr_low): New global variable.
6012
e1d2394b
MS
60132014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6014
6015 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6016 * Makefile.in (AR, AR_FLAGS): Define.
6017 * configure: Regenerate.
6018
3a8ee006
GB
60192014-06-19 Gary Benson <gbenson@redhat.com>
6020
6021 * Makefile.in (i386-dregs.o): New rule.
6022 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6023 * i386-low.c (target.h): Remove include.
6024 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6025 (DR_CONTROL_SHIFT): Likewise.
6026 (DR_CONTROL_SIZE): Likewise.
6027 (DR_RW_EXECUTE): Likewise.
6028 (DR_RW_WRITE): Likewise.
6029 (DR_RW_READ): Likewise.
6030 (DR_RW_IORW): Likewise.
6031 (DR_LEN_1): Likewise.
6032 (DR_LEN_2): Likewise.
6033 (DR_LEN_4): Likewise.
6034 (DR_LEN_8): Likewise.
6035 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6036 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6037 (DR_ENABLE_SIZE): Likewise.
6038 (DR_LOCAL_SLOWDOWN): Likewise.
6039 (DR_GLOBAL_SLOWDOWN): Likewise.
6040 (DR_CONTROL_RESERVED): Likewise.
6041 (I386_DR_CONTROL_MASK): Likewise.
6042 (I386_DR_VACANT): Likewise.
6043 (I386_DR_LOCAL_ENABLE): Likewise.
6044 (I386_DR_GLOBAL_ENABLE): Likewise.
6045 (I386_DR_DISABLE): Likewise.
6046 (I386_DR_SET_RW_LEN): Likewise.
6047 (I386_DR_GET_RW_LEN): Likewise.
6048 (I386_DR_WATCH_HIT): Likewise.
6049 (i386_wp_op_t): Likewise.
6050 (i386_show_dr): Likewise.
6051 (i386_length_and_rw_bits): Likewise.
6052 (i386_insert_aligned_watchpoint): Likewise.
6053 (i386_remove_aligned_watchpoint): Likewise.
6054 (i386_handle_nonaligned_watchpoint): Likewise.
6055 i386_update_inferior_debug_regs(): Likewise.
6056 (i386_dr_insert_watchpoint): Likewise.
6057 (i386_dr_remove_watchpoint): Likewise.
6058 (i386_dr_region_ok_for_watchpoint): Likewise.
6059 (i386_dr_stopped_data_address): Likewise.
6060 (i386_dr_stopped_by_watchpoint): Likewise.
6061
8f26655c
GB
60622014-06-19 Gary Benson <gbenson@redhat.com>
6063
6064 * i386-low.c (i386_dr_show): Renamed to
6065 i386_show_dr and made static. All uses updated.
6066 (i386_dr_length_and_rw_bits): Renamed to
6067 i386_length_and_rw_bits and made static.
6068 All uses updated.
6069 (i386_dr_insert_aligned_watchpoint): Renamed to
6070 i386_insert_aligned_watchpoint and made static.
6071 All uses updated.
6072 (i386_dr_remove_aligned_watchpoint): Renamed to
6073 i386_remove_aligned_watchpoint and made static.
6074 All uses updated.
6075 (i386_dr_update_inferior_debug_regs): Renamed to
6076 i386_update_inferior_debug_regs and made static.
6077 All uses updated.
6078
b9228891
GB
60792014-06-18 Gary Benson <gbenson@redhat.com>
6080
5171def3
GB
6081 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6082 (i386_dr_low_can_set_control): Likewise.
6083 (i386_get_debug_register_length): Likewise.
6084 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6085 (i386_dr_low_can_set_control): Likewise.
6086 (i386_get_debug_register_length): Likewise.
6087
60882014-06-17 Gary Benson <gbenson@redhat.com>
6089
b9228891
GB
6090 * i386-low.h (i386-dregs.h): New include.
6091 (DR_FIRSTADDR): Now in i386-dregs.h.
6092 (DR_LASTADDR): Likewise.
6093 (DR_NADDR): Likewise.
6094 (DR_STATUS): Likewise.
6095 (DR_CONTROL): Likewise.
6096 (i386_debug_reg_state): Likewise.
6097 (i386_dr_insert_watchpoint): Likewise.
6098 (i386_dr_remove_watchpoint): Likewise.
6099 (i386_dr_region_ok_for_watchpoint): Likewise.
6100 (i386_dr_stopped_data_address): Likewise.
6101 (i386_dr_stopped_by_watchpoint): Likewise.
6102 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6103
4be83cc2
GB
61042014-06-18 Gary Benson <gbenson@redhat.com>
6105
6106 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6107 i386_dr_insert_watchpoint.
6108 (i386_low_remove_watchpoint): Renamed to
6109 i386_dr_remove_watchpoint.
6110 (i386_low_region_ok_for_watchpoint): Renamed to
6111 i386_dr_region_ok_for_watchpoint.
6112 (i386_low_stopped_data_address): Renamed to
6113 i386_dr_stopped_data_address.
6114 (i386_low_stopped_by_watchpoint): Renamed to
6115 i386_dr_stopped_by_watchpoint.
6116 * i386-low.c (i386_show_dr): Renamed to
6117 i386_dr_show and made nonstatic. All uses updated.
6118 (i386_length_and_rw_bits): Renamed to
6119 i386_dr_length_and_rw_bits and made nonstatic.
6120 All uses updated.
6121 (i386_insert_aligned_watchpoint): Renamed to
6122 i386_dr_insert_aligned_watchpoint and made nonstatic.
6123 All uses updated.
6124 (i386_remove_aligned_watchpoint): Renamed to
6125 i386_dr_remove_aligned_watchpoint and made nonstatic.
6126 All uses updated.
6127 (i386_update_inferior_debug_regs): Renamed to
6128 i386_dr_update_inferior_debug_regs and made nonstatic.
6129 All uses updated.
6130 (i386_low_insert_watchpoint): Renamed to
6131 i386_dr_insert_watchpoint. All uses updated.
6132 (i386_low_remove_watchpoint): Renamed to
6133 i386_dr_remove_watchpoint. All uses updated.
6134 (i386_low_region_ok_for_watchpoint): Renamed to
6135 i386_dr_region_ok_for_watchpoint. All uses updated.
6136 (i386_low_stopped_data_address): Renamed to
6137 i386_dr_stopped_data_address. All uses updated.
6138 (i386_low_stopped_by_watchpoint): Renamed to
6139 i386_dr_stopped_by_watchpoint. All uses updated.
6140
131aa0d4
GB
61412014-06-18 Gary Benson <gbenson@redhat.com>
6142
6143 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6144 (i386_dr_low_can_set_control): Likewise.
6145 (i386_insert_aligned_watchpoint): New check.
6146
d9305f7f
GB
61472014-06-18 Gary Benson <gbenson@redhat.com>
6148
6149 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6150 Renamed to state.
6151
e927c9fc
GB
61522014-06-18 Gary Benson <gbenson@redhat.com>
6153
6154 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6155 instead of fatal and error.
6156 (i386_handle_nonaligned_watchpoint): Likewise.
6157
1b6d4134
GB
61582014-06-18 Gary Benson <gbenson@redhat.com>
6159
6160 * i386-low.c (i386_get_debug_register_length): New macro.
6161 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6162 (i386_show_dr): Use debug_printf instead of fprintf. Use
6163 phex to format values.
6164
6e62758f
GB
61652014-06-18 Gary Benson <gbenson@redhat.com>
6166
6167 * i386-low.h: Comment changes.
6168 * i386-low.c: Likewise.
6169
fc6e2f03
GB
61702014-06-18 Gary Benson <gbenson@redhat.com>
6171
6172 * i386-low.c: Whitespace changes.
6173
f9d1eeed
TT
61742014-06-12 Tom Tromey <tromey@redhat.com>
6175
6176 * utils.c (freeargv): Remove.
6177
0b04e523
TT
61782014-06-12 Tom Tromey <tromey@redhat.com>
6179
6180 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6181 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6182 (parse_debug_format_options): Likewise.
6183 (gdbserver_usage): Likewise.
6184 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6185 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6186 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6187 against libiberty.
6188 ($(LIBGNU)): Depend on libiberty.
6189 (all-lib): Recurse into all subdirs.
6190 (install-only): Invoke "install" target in subdirs.
6191 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6192 targets.
6193 * configure: Rebuild.
6194 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6195 for vasprintf, vsnprintf, or gettimeofday.
6196 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6197 srv_tgtobj.
6198
270c9937
JB
61992014-06-05 Joel Brobecker <brobecker@adacore.com>
6200
6201 * development.sh: Delete.
6202 * Makefile.in (config.status): Adjust dependency on development.sh.
6203 * configure.ac: Adjust development.sh source call.
6204 * configure: Regenerate.
6205
0a261ed8
PA
62062014-06-02 Pedro Alves <palves@redhat.com>
6207
6208 * ax.c (gdb_free_agent_expr): New function.
6209 * ax.h (gdb_free_agent_expr): New declaration.
6210 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6211 list.
6212 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6213 static.
6214 (clear_breakpoint_conditions_and_commands): New function.
6215 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6216 (clear_breakpoint_conditions_and_commands): New declaration.
6217
e9dae05e
RR
62182014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6219
6220 * linux-aarch64-low.c (asm/ptrace.h): Include.
6221
5876f503
JK
62222014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6223
6224 Fix TLS access for -static -pthread.
6225 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6226 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6227 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6228
802e8e6d
PA
62292014-05-20 Pedro Alves <palves@redhat.com>
6230
6231 * linux-aarch64-low.c (aarch64_insert_point)
6232 (aarch64_remove_point): No longer check whether the type is
6233 supported here. Adjust to new interface.
6234 (the_low_target): Install aarch64_supports_z_point_type as
6235 supports_z_point_type method.
6236 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6237 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6238 instead of a Z packet char. Adjust.
6239 (arm_supports_z_point_type): New function.
6240 (arm_insert_point, arm_remove_point): Adjust to new interface.
6241 (the_low_target): Install arm_supports_z_point_type.
6242 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6243 (cris_insert_point, cris_remove_point): Adjust to new interface.
6244 Don't check whether the type is supported here.
6245 (the_low_target): Install cris_supports_z_point_type.
6246 * linux-low.c (linux_supports_z_point_type): New function.
6247 (linux_insert_point, linux_remove_point): Adjust to new interface.
6248 * linux-low.h (struct linux_target_ops) <insert_point,
6249 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6250 raw_breakpoint pointer parameter.
6251 <supports_z_point_type>: New method.
6252 * linux-mips-low.c (mips_supports_z_point_type): New function.
6253 (mips_insert_point, mips_remove_point): Adjust to new interface.
6254 Use mips_supports_z_point_type.
6255 (the_low_target): Install mips_supports_z_point_type.
6256 * linux-ppc-low.c (the_low_target): Install NULL as
6257 supports_z_point_type method.
6258 * linux-s390-low.c (the_low_target): Install NULL as
6259 supports_z_point_type method.
6260 * linux-sparc-low.c (the_low_target): Install NULL as
6261 supports_z_point_type method.
6262 * linux-x86-low.c (x86_supports_z_point_type): New function.
6263 (x86_insert_point): Adjust to new insert_point interface. Use
6264 insert_memory_breakpoint. Adjust to new
6265 i386_low_insert_watchpoint interface.
6266 (x86_remove_point): Adjust to remove_point interface. Use
6267 remove_memory_breakpoint. Adjust to new
6268 i386_low_remove_watchpoint interface.
6269 (the_low_target): Install x86_supports_z_point_type.
6270 * lynx-low.c (lynx_target_ops): Install NULL as
6271 supports_z_point_type callback.
6272 * nto-low.c (nto_supports_z_point_type): New.
6273 (nto_insert_point, nto_remove_point): Adjust to new interface.
6274 (nto_target_ops): Install nto_supports_z_point_type.
6275 * mem-break.c: Adjust intro comment.
6276 (struct raw_breakpoint) <raw_type, size>: New fields.
6277 <inserted>: Update comment.
6278 <shlib_disabled>: Delete field.
6279 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6280 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6281 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6282 (raw_bkpt_type_to_target_hw_bp_type): New function.
6283 (find_enabled_raw_code_breakpoint_at): New function.
6284 (find_raw_breakpoint_at): New type and size parameters. Use them.
6285 (insert_memory_breakpoint): New function, based off
6286 set_raw_breakpoint_at.
6287 (remove_memory_breakpoint): New function.
6288 (set_raw_breakpoint_at): Reimplement.
6289 (set_breakpoint): New, based on set_breakpoint_at.
6290 (set_breakpoint_at): Reimplement.
6291 (delete_raw_breakpoint): Go through the_target->remove_point
6292 instead of assuming memory breakpoints.
6293 (find_gdb_breakpoint_at): Delete.
6294 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6295 (find_gdb_breakpoint): New function.
6296 (set_gdb_breakpoint_at): Delete.
6297 (z_type_supported): New function.
6298 (set_gdb_breakpoint_1): New function, loosely based off
6299 set_gdb_breakpoint_at.
6300 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6301 (delete_gdb_breakpoint_at): Delete.
6302 (delete_gdb_breakpoint_1): New function, loosely based off
6303 delete_gdb_breakpoint_at.
6304 (delete_gdb_breakpoint): New function.
6305 (clear_gdb_breakpoint_conditions): Rename to ...
6306 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6307 breakpoint.
6308 (add_condition_to_breakpoint): Make static.
6309 (add_breakpoint_condition): Take a struct breakpoint pointer
6310 instead of an address. Adjust.
6311 (gdb_condition_true_at_breakpoint): Rename to ...
6312 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6313 z_type parameter.
6314 (gdb_condition_true_at_breakpoint): Reimplement.
6315 (add_breakpoint_commands): Take a struct breakpoint pointer
6316 instead of an address. Adjust.
6317 (gdb_no_commands_at_breakpoint): Rename to ...
6318 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6319 parameter. Return true if no breakpoint was found. Change debug
6320 output.
6321 (gdb_no_commands_at_breakpoint): Reimplement.
6322 (run_breakpoint_commands): Rename to ...
6323 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6324 and change return type to boolean.
6325 (run_breakpoint_commands): New function.
6326 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6327 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6328 breakpoint. Go through the_target->remove_point instead of
6329 assuming memory breakpoint.
6330 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6331 software and hardware breakpoints.
6332 (reinsert_raw_breakpoint): Go through the_target->insert_point
6333 instead of assuming memory breakpoint.
6334 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6335 software and hardware breakpoints.
6336 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6337 Check both software and hardware breakpoints.
6338 (validate_inserted_breakpoint): Assert the breakpoint is a
6339 software breakpoint. Set the inserted flag to -1 instead of
6340 setting shlib_disabled.
6341 (delete_disabled_breakpoints): Adjust.
6342 (validate_breakpoints): Only validate software breakpoints.
6343 Adjust to inserted flag change.
6344 (check_mem_read, check_mem_write): Skip breakpoint types other
6345 than software breakpoints. Adjust to inserted flag change.
6346 * mem-break.h (enum raw_bkpt_type): New enum.
6347 (raw_breakpoint, struct process_info): Forward declare.
6348 (Z_packet_to_target_hw_bp_type): Delete declaration.
6349 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6350 (set_gdb_breakpoint, delete_gdb_breakpoint)
6351 (clear_breakpoint_conditions): New declarations.
6352 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6353 (breakpoint_inserted_here): Update comment.
6354 (add_breakpoint_condition, add_breakpoint_commands): Replace
6355 address parameter with a breakpoint pointer parameter.
6356 (gdb_breakpoint_here): Update comment.
6357 (delete_gdb_breakpoint_at): Delete.
6358 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6359 * server.c (process_point_options): Take a struct breakpoint
6360 pointer instead of an address. Adjust.
6361 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6362 delete_gdb_breakpoint.
6363 * spu-low.c (spu_target_ops): Install NULL as
6364 supports_z_point_type method.
6365 * target.h: Include mem-break.h.
6366 (struct target_ops) <prepare_to_access_memory>: Update comment.
6367 <supports_z_point_type>: New field.
6368 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6369 instead of a char. Also take a raw breakpoint pointer.
6370 * win32-arm-low.c (the_low_target): Install NULL as
6371 supports_z_point_type.
6372 * win32-i386-low.c (i386_supports_z_point_type): New function.
6373 (i386_insert_point, i386_remove_point): Adjust to new interface.
6374 (the_low_target): Install i386_supports_z_point_type.
6375 * win32-low.c (win32_supports_z_point_type): New function.
6376 (win32_insert_point, win32_remove_point): Adjust to new interface.
6377 (win32_target_ops): Install win32_supports_z_point_type.
6378 * win32-low.h (struct win32_target_ops):
6379 <supports_z_point_type>: New method.
6380 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6381 instead of a char. Also take a raw breakpoint pointer.
6382
932539e3
PA
63832014-05-20 Pedro Alves <palves@redhat.com>
6384
6385 * mem-break.h: Include break-common.h.
6386 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6387 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6388 (Z_packet_to_target_hw_bp_type): New declaration.
6389 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6390 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6391 (Z_PACKET_ACCESS_WP): Delete macros.
6392 (Z_packet_to_hw_type): Delete function.
6393 * i386-low.h: Don't include break-common.h here.
6394 (Z_packet_to_hw_type): Delete declaration.
6395 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6396 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6397 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6398 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6399 * linux-aarch64-low.c: Don't include break-common.h here.
6400 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6401 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6402 (Z_packet_to_target_hw_bp_type): Delete function.
6403 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6404 function.
6405 (mips_insert_point, mips_remove_point): Use
6406 Z_packet_to_target_hw_bp_type.
6407
4ff0d3d8
PA
64082014-05-20 Pedro Alves <palves@redhat.com>
6409
6410 * linux-aarch64-low.c: Include break-common.h.
6411 (enum target_point_type): Delete.
6412 (Z_packet_to_point_type): Rename to ...
6413 (Z_packet_to_target_hw_bp_type): ... this, and return a
6414 target_hw_bp_type instead.
6415 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6416 instead of an enum target_point_type.
6417 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6418 breakpoint type.
6419 (aarch64_dr_state_insert_one_point)
6420 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6421 (aarch64_handle_aligned_watchpoint)
6422 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6423 Take an enum target_hw_bp_type instead of an enum
6424 target_point_type.
6425 (aarch64_supports_z_point_type): New function.
6426 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6427 use Z_packet_to_target_hw_bp_type.
6428
786dc519
JB
64292014-05-20 Joel Brobecker <brobecker@adacore.com>
6430
6431 * configure.ac: Only use -Werror by default when DEVELOPMENT
6432 is true.
6433 * configure: Regenerate.
6434
9e0aa64f
JK
64352014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6436
6437 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6438 * linux-x86-low.c (X86_64_USER_REGS): New.
6439 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6440
2b577b92
YQ
64412014-04-28 Yao Qi <yao@codesourcery.com>
6442
6443 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6444 name.
6445
94611da2
PA
64462014-04-25 Pedro Alves <palves@redhat.com>
6447
6448 PR server/16255
6449 * linux-low.c (linux_attach_fail_reason_string): New function.
6450 (linux_attach_lwp): Delete.
6451 (linux_attach_lwp_1): Rename to ...
6452 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6453 argument. Remove "initial" parameter. Return int instead of
6454 void. Don't error or warn here.
6455 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6456 failure to attach to the tgid. Call warning when failing to
6457 attach to an lwp.
6458 * linux-low.h (linux_attach_lwp): 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_fail_reason_string): New declaration.
6462 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6463 interface change. Use linux_attach_fail_reason_string.
6464
01f9f808
MS
64652014-04-24 Michael Sturm <michael.sturm@mintel.com>
6466 Walfred Tedeschi <walfred.tedeschi@intel.com>
6467
6468 * Makefile.in: Added rules to handle new files
6469 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6470 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6471 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6472 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6473 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6474 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6475 x32-avx512-linux.o.
6476 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6477 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6478 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6479 i386/x32-avx512.xml.
6480 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6481 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6482 i386/x32-avx512-linux.xml.
6483 * i387-fp.c (num_avx512_k_registers): New constant for number
6484 of K registers.
6485 (num_avx512_zmmh_low_registers): New constant for number of
6486 lower ZMM registers (0-15).
6487 (num_avx512_zmmh_high_registers): New constant for number of
6488 higher ZMM registers (16-31).
6489 (num_avx512_ymmh_registers): New contant for number of higher
6490 YMM registers (ymm16-31 added by avx521 on x86_64).
6491 (num_avx512_xmm_registers): New constant for number of higher
6492 XMM registers (xmm16-31 added by AVX512 on x86_64).
6493 (struct i387_xsave): Add space for AVX512 registers.
6494 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6495 Add code to handle AVX512 registers.
6496 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6497 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6498 prototypei from generated file.
6499 (tdesc_amd64_avx512_linux): Likewise.
6500 (init_registers_x32_avx512_linux): Likewise.
6501 (tdesc_x32_avx512_linux): Likewise.
6502 (init_registers_i386_avx512_linux): Likewise.
6503 (tdesc_i386_avx512_linux): Likewise.
6504 (x86_64_regmap): Add AVX512 registers.
6505 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6506 mask.
6507 (initialize_low_arch): Add code to initialize AVX512 registers.
6508
51aa91f9
PA
65092014-04-23 Pedro Alves <palves@redhat.com>
6510
6511 * mem-break.c (find_gdb_breakpoint_at): Make static.
6512 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6513
a4165e94
PA
65142014-04-23 Pedro Alves <palves@redhat.com>
6515
6516 * i386-low.c: Don't include break-common.h here.
6517 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6518 prototype to take target_hw_bp_type as argument instead of a Z
6519 packet char.
6520 * i386-low.h: Include break-common.h here.
6521 (Z_packet_to_hw_type): Declare.
6522 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6523 prototypes.
6524 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6525 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6526 (x86_remove_point): Convert the packet number to a
6527 target_hw_bp_type before calling i386_low_remove_watchpoint.
6528 * win32-i386-low.c (i386_insert_point): Convert the packet number
6529 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6530 (i386_remove_point): Convert the packet number to a
6531 target_hw_bp_type before calling i386_low_remove_watchpoint.
6532
b8acf843
PA
65332014-04-23 Pedro Alves <palves@redhat.com>
6534
6535 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6536
d708bcd1
PA
65372014-04-10 Pedro Alves <palves@redhat.com>
6538
6539 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6540 Check if the condition or command is NULL before checking if the
6541 breakpoint is known. On success, return true.
6542 * mem-break.h (add_breakpoint_condition): Document return.
6543 (add_breakpoint_commands): Add describing comment.
6544 * server.c (skip_to_semicolon): New function.
6545 (process_point_options): Use it.
6546
2eec7d5b
PA
65472014-04-09 Pedro Alves <palves@redhat.com>
6548
6549 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6550 to lwpid_of.
6551
fa96cb38
PA
65522014-02-27 Pedro Alves <palves@redhat.com>
6553
6554 PR 12702
6555 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6556 macros.
6557 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6558 output.
6559 (last_thread_of_process_p): Take a PID argument instead of a
6560 thread pointer.
6561 (linux_wait_for_lwp): Delete.
6562 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6563 functions.
6564 (linux_low_filter_event): New function, party factored out from
6565 linux_wait_for_event.
6566 (linux_wait_for_event): Rename to ...
6567 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6568 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6569 sigsuspend. Check for zombie leaders.
6570 (linux_wait_for_event): Reimplement as wrapper around
6571 linux_wait_for_event_filtered.
6572 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6573 a normal or signal exit is seen, it's the whole process exiting.
6574 (wait_for_sigstop): No longer a for_each_inferior callback.
6575 Rewrite on top of linux_wait_for_event_filtered.
6576 (stop_all_lwps): Call wait_for_sigstop directly.
6577 * server.c (resume, handle_target_event): Handle
6578 TARGET_WAITKIND_NO_RESUMED.
6579
d763de10
JB
65802014-02-26 Joel Brobecker <brobecker@adacore.com>
6581
6582 * win32-low.c (psapi_get_dll_name,
6583 * win32_CreateToolhelp32Snapshot): Delete.
6584 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6585 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6586 Delete.
6587 (handle_load_dll): Add function description.
6588 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6589
850a0f76
JB
65902014-02-26 Joel Brobecker <brobecker@adacore.com>
6591
6592 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6593 Add comment.
6594 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6595 base address when calling win32_add_one_solib.
6596 (handle_load_dll): Delete local variable load_addr.
6597 Remove 0x1000 offset applied to DLL base address when calling
6598 win32_add_one_solib.
6599 (handle_unload_dll): Add comment.
6600
f25b3fc3
JB
66012014-02-26 Joel Brobecker <brobecker@adacore.com>
6602
6603 * win32-low.c (win32_add_all_dlls): Renames
6604 win32_ensure_ntdll_loaded. Rewrite function documentation.
6605 Adjust implementation to always load all DLLs.
6606 Add 0x1000 offset to DLL base address when calling
6607 win32_add_one_solib.
6608 (child_initialization_done): New static global.
6609 (do_initial_child_stuff): Set child_initialization_done to
6610 zero during child initialization, and 1 after. Replace call
6611 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6612 Add comment.
6613 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6614 (handle_unload_dll): Add function documentation.
6615 (get_child_debug_event): Ignore load and unload DLL events
6616 during child initialization.
6617
d86d4aaf
DE
66182014-02-20 Doug Evans <dje@google.com>
6619
3bc32da3 6620 Remove global all_lwps.
d86d4aaf
DE
6621 * inferiors.h (ptid_of): Move here from linux-low.h.
6622 (pid_of, lwpid_of): Ditto.
6623 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6624 parameter is a struct thread_info * now.
6625 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6626 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6627 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6628 directly.
6629 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6630 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6631 * linux-arm-low.c (update_registers_callback): Update, "entry"
6632 parameter is a struct thread_info * now.
6633 Fetch lwpid from current_inferior directly.
6634 (arm_insert_point): Pass &all_threads to find_inferior instead of
6635 &all_lwps.
6636 (arm_remove_point): Ditto.
6637 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6638 (arm_prepare_to_resume): Fetch pid from thread.
6639 (arm_read_description): Fetch lwpid from current_inferior directly.
6640 * linux-low.c (all_lwps): Delete.
6641 (delete_lwp): Delete call to remove_inferior.
6642 (handle_extended_wait): Fetch lwpid from thread.
6643 (add_lwp): Don't set lwp->entry.id. Remove call to
6644 add_inferior_to_list.
6645 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6646 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6647 (kill_one_lwp_callback): Ditto.
6648 (linux_kill): Don't dereference NULL pointer.
6649 Fetch ptid,lwpid from thread.
6650 (get_detach_signal): Fetch ptid from thread.
6651 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6652 Simplify call to regcache_invalidate_thread.
6653 (delete_lwp_callback): Update, "entry" parameter is a
6654 struct thread_info * now. Fetch pid from thread.
6655 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6656 (status_pending_p_callback): Update, "entry" parameter is a
6657 struct thread_info * now. Fetch ptid from thread.
6658 (find_lwp_pid): Update, "entry" parameter is a
6659 struct thread_info * now.
6660 (linux_wait_for_lwp): Fetch pid from thread.
6661 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6662 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6663 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6664 (dequeue_one_deferred_signal): Ditto.
6665 (cancel_breakpoint): Fetch ptid from current_inferior.
6666 (linux_wait_for_event): Pass &all_threads to find_inferior,
6667 not &all_lwps. Fetch ptid, lwpid from thread.
6668 (count_events_callback): Update, "entry" parameter is a
6669 struct thread_info * now.
6670 (select_singlestep_lwp_callback): Ditto.
6671 (select_event_lwp_callback): Ditto.
6672 (cancel_breakpoints_callback): Ditto.
6673 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6674 not &all_lwps.
6675 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6676 (unsuspend_one_lwp): Update, "entry" parameter is a
6677 struct thread_info * now.
6678 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6679 not &all_lwps.
6680 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6681 Fetch lwpid from thread, not lwp.
6682 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6683 Pass &all_threads to find_inferior, not &all_lwps.
6684 (send_sigstop): Fetch lwpid from thread, not lwp.
6685 (send_sigstop_callback): Update, "entry" parameter is a
6686 struct thread_info * now.
6687 (suspend_and_send_sigstop_callback): Ditto.
6688 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6689 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6690 struct thread_info * now.
6691 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6692 from thread, lwp.
6693 (lwp_running): Update, "entry" parameter is a
6694 struct thread_info * now.
6695 (stop_all_lwps): Fetch ptid from thread.
6696 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6697 (linux_resume_one_lwp): Fetch lwpid from thread.
6698 (linux_set_resume_request): Update, "entry" parameter is a
6699 struct thread_info * now. Fetch pid, lwpid from thread.
6700 (resume_status_pending_p): Update, "entry" parameter is a
6701 struct thread_info * now.
6702 (need_step_over_p): Ditto. Fetch lwpid from thread.
6703 (start_step_over): Fetch lwpid from thread.
6704 (linux_resume_one_thread): Update, "entry" parameter is a
6705 struct thread_info * now. Fetch lwpid from thread.
6706 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6707 (proceed_one_lwp): Update, "entry" parameter is a
6708 struct thread_info * now. Fetch lwpid from thread.
6709 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6710 struct thread_info * now.
6711 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6712 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6713 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6714 directly.
6715 (regsets_store_inferior_registers): Ditto.
6716 (fetch_register, store_register): Ditto.
6717 (linux_read_memory, linux_write_memory): Ditto.
6718 (linux_request_interrupt): Ditto.
6719 (linux_read_auxv): Ditto.
6720 (linux_xfer_siginfo): Ditto.
6721 (linux_qxfer_spu): Ditto.
6722 (linux_qxfer_libraries_svr4): Ditto.
6723 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6724 moved to inferiors.h.
6725 (get_lwp): Delete.
6726 (get_thread_lwp): Update.
6727 (struct lwp_info): Delete member "entry". Simplify comment for
6728 member "thread".
6729 (all_lwps): Delete.
6730 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6731 current_inferior directly.
6732 (update_watch_registers_callback): Update, "entry" parameter is a
6733 struct thread_info * now. Fetch pid from thread.
6734 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6735 (mips_insert_point): Fetch lwpid from current_inferior.
6736 Pass &all_threads to find_inferior, not &all_lwps.
6737 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6738 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6739 directly.
6740 (mips_stopped_data_address): Ditto.
6741 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6742 directly.
6743 * linux-tile-low.c (tile_arch_setup): Ditto.
6744 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6745 (update_debug_registers_callback): Update, "entry" parameter is a
6746 struct thread_info * now. Fetch pid from thread.
6747 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6748 Pass &all_threads to find_inferior, not &all_lwps.
6749 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6750 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6751 Pass &all_threads to find_inferior, not &all_lwps.
6752 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6753 (i386_dr_low_get_status): Ditto.
6754 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6755 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6756 (x86_linux_read_description): Ditto.
6757 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6758
3b8361aa
DE
67592014-02-20 Doug Evans <dje@google.com>
6760
6761 * inferiors.c (get_first_inferior): Fix buglet.
6762
f7667f0d
DE
67632014-02-19 Doug Evans <dje@google.com>
6764
6765 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6766 * inferiors.c (add_thread): Change result type to struct thread_info *.
6767 All callers updated.
6768 (add_lwp): Call add_thread here instead of in callers.
6769 All callers updated.
6770 * linux-low.h (get_lwp_thread): Rewrite.
6771 (struct lwp_info): New member "thread".
6772
b3312d80
DE
67732014-02-19 Doug Evans <dje@google.com>
6774
6775 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6776 All callers updated.
6777
ecc6f45c
DE
67782014-02-19 Doug Evans <dje@google.com>
6779
6780 * inferiors.c (add_thread): Fix whitespace.
6781
649ebbca
DE
67822014-02-19 Doug Evans <dje@google.com>
6783
6784 * dll.c (clear_dlls): Replace accessing list implemention details
6785 with API function.
6786 * gdbthread.h (get_first_thread): Declare.
6787 * inferiors.c (for_each_inferior_with_data): New function.
6788 (get_first_thread): New function.
6789 (find_thread_ptid): Simplify.
6790 (get_first_inferior): New function.
6791 (clear_list): Delete.
6792 (one_inferior_p): New function.
6793 (clear_inferior_list): New function.
6794 (clear_inferiors): Update.
6795 * inferiors.h (for_each_inferior_with_data): Declare.
6796 (clear_inferior_list): Declare.
6797 (one_inferior_p): Declare.
6798 (get_first_inferior): Declare.
6799 * linux-low.c (linux_wait_for_event): Replace accessing list
6800 implemention details with API function.
6801 * server.c (target_running): Ditto.
6802 (accumulate_file_name_length): New function.
6803 (emit_dll_description): New function.
6804 (handle_qxfer_libraries): Replace accessing list implemention
6805 details with API function.
6806 (handle_qxfer_threads_worker): New function.
6807 (handle_qxfer_threads_proper): Replace accessing list implemention
6808 details with API function.
6809 (handle_query): Ditto.
6810 (visit_actioned_threads_callback_ftype): New typedef.
6811 (visit_actioned_threads_data): New struct.
6812 (visit_actioned_threads): Rewrite to be find_inferior callback.
6813 (resume): Call find_inferior.
6814 (handle_status): Replace accessing list implemention
6815 details with API function.
6816 (process_serial_event): Replace accessing list implemention details
6817 with API function.
6818 * target.c (set_desired_inferior): Replace accessing list implemention
6819 details with API function.
6820 * tracepoint.c (same_process_p): New function.
6821 (gdb_agent_about_to_close): Replace accessing list implemention
6822 details with API function.
6823 * win32-low.c (child_delete_thread): Replace accessing list
6824 implemention details with API function.
6825 (match_dll_by_basename): New function.
6826 (dll_is_loaded_by_basename): New function.
6827 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6828 details call to dll_is_loaded_by_basename.
6829
80894984
DE
68302014-02-19 Doug Evans <dje@google.com>
6831
6832 * dll.h (struct dll_info): Add comment.
6833 * gdbthread.h (struct thread_info): Add comment.
6834 (current_ptid): Simplify.
6835 * inferiors.c (add_process): Update.
6836 (remove_process): Update.
6837 * inferiors.h (struct process_info): Rename member "head" to "entry".
6838 * linux-low.c (delete_lwp): Update.
6839 (add_lwp): Update.
6840 (last_thread_of_process_p): Update.
6841 (kill_one_lwp_callback, linux_kill): Update.
6842 (status_pending_p_callback): Update.
6843 (wait_for_sigstop): Update. Simplify read of ptid.
6844 (start_step_over): Update.
6845 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6846 (get_lwp_thread): Update.
6847 (struct lwp_info): Rename member "head" to "entry".
6848 * regcache.h (inferior_list_entry): Delete.
6849 * server.c (kill_inferior_callback): Update.
6850 (detach_or_kill_inferior_callback): Update.
6851 (print_started_pid): Update.
6852 (print_attached_pid): Update.
6853 (process_serial_event): Simplify read of ptid.
6854 * thread-db.c (thread_db_create_event): Update.
6855 (thread_db_get_tls_address): Update.
6856 * win32-low.c (current_inferior_ptid): Simplify.
6857
46917d26
TT
68582014-02-19 Tom Tromey <tromey@redhat.com>
6859
6860 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6861 argument.
6862 (target_supports_btrace): Update.
6863
0759a81e
YQ
68642014-02-14 Yao Qi <yao@codesourcery.com>
6865
6866 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6867 (rsp-low-ipa.o): New target.
6868
a7191e8b
TT
68692014-02-12 Tom Tromey <tromey@redhat.com>
6870
6871 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6872 convert_ascii_to_int.
6873 * regcache.c (registers_to_string): Likewise.
6874 * remote-utils.c (decode_M_packet): Likewise.
6875 * server.c (process_serial_event): Likewise.
6876
ff0e980e
TT
68772014-02-12 Tom Tromey <tromey@redhat.com>
6878
6879 * server.c (handle_query, handle_v_run): Use hex2bin, not
6880 unhexify.
6881 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6882
e9371aff
TT
68832014-02-12 Tom Tromey <tromey@redhat.com>
6884
6885 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6886 convert_int_to_ascii.
6887 * regcache.c (registers_to_string, collect_register_as_string):
6888 Likewise.
6889 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6890 Likewise.
6891 * server.c (process_serial_event): Likewise.
6892 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6893 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6894
971dc0b8
TT
68952014-02-12 Tom Tromey <tromey@redhat.com>
6896
6897 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6898 bin2hex, not hexify.
6899 * tracepoint.c (cmd_qtstatus): Likewise.
6900
0a822afb
TT
69012014-02-12 Tom Tromey <tromey@redhat.com>
6902
6903 * remote-utils.c (monitor_output): Pass explicit length to
6904 hexify.
6905
9c3d6531
TT
69062014-02-12 Tom Tromey <tromey@redhat.com>
6907
6908 * tracepoint.c: Include rsp-low.h.
6909 * server.c: Include rsp-low.h.
6910 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6911 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6912 declare.
6913 * remote-utils.c: Include rsp-low.h.
6914 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6915 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6916 (convert_int_to_ascii, convert_ascii_to_int): Move to
6917 common/rsp-low.c.
6918 * regcache.c: Include rsp-low.h.
6919 * ax.c: Include rsp-low.h.
6920 * Makefile.in (SFILES): Add common/rsp-low.c.
6921 (OBS): Add rsp-low.o.
6922 (rsp-low.o): New target.
6923
01fd3ea5
TT
69242014-02-12 Tom Tromey <tromey@redhat.com>
6925
6926 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6927 Include print-utils.h.
6928 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6929 (plongest, thirty_two, phex_nz): Remove.
6930 * Makefile.in (SFILES): Add common/print-utils.c.
6931 (OBS): Add print-utils.o.
6932 (print-utils-ipa.o): New target.
6933 (print-utils.o): New target.
6934 (IPA_OBJS): Add print-utils-ipa.o.
6935
e99dc820
TT
69362014-02-06 Tom Tromey <tromey@redhat.com>
6937
6938 * Makefile.in (SFILES): Fix indentation.
6939
ee1e2d4f
DE
69402014-02-05 Doug Evans <dje@google.com>
6941
6942 * linux-low.c (linux_wait_for_event): Improve comment.
6943 (linux_wait_1): Keep current_inferior in sync with event_child.
6944
f5a02773
DE
69452014-01-22 Doug Evans <dje@google.com>
6946
6947 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6948
87ce2a04
DE
69492014-01-22 Doug Evans <dje@google.com>
6950
6951 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6952 * configure: Regenerate.
6953 * config.in: Regenerate.
6954 * Makefile.in (SFILES): Add debug.c.
6955 (OBS): Add debug.o.
6956 * debug.c: New file.
6957 * debug.h: New file.
6958 * linux-aarch64-low.c (*): Update all debugging printfs to use
6959 debug_printf instead of fprintf.
6960 * linux-arm-low.c (*): Ditto.
6961 * linux-cris-low.c (*): Ditto.
6962 * linux-crisv32-low.c (*): Ditto.
6963 * linux-m32r-low.c (*): Ditto.
6964 * linux-sparc-low.c (*): Ditto.
6965 * linux-x86.c (*): Ditto.
6966 * linux-low.c (*): Ditto.
6967 (linux_wait_1): Add calls to debug_enter, debug_exit.
6968 (linux_wait): Remove redundant debugging printf.
6969 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6970 (linux_resume, unstop_all_lwps): Ditto.
6971 * mem-break.c (*): Update all debugging printfs to use
6972 debug_printf instead of fprintf.
6973 * remote-utils.c (*): Ditto.
6974 * thread-db.c (*): Ditto.
6975 * server.c #include <ctype.h>, "gdb_vecs.h".
6976 (debug_threads): Moved to debug.c.
6977 (*): Update all debugging printfs to use debug_printf instead of
6978 fprintf.
6979 (start_inferior): Replace call to fflush with call to debug_flush.
6980 (monitor_show_help): Mention set debug-format.
6981 (parse_debug_format_options): New function.
6982 (handle_monitor_command): Handle "monitor set debug-format".
6983 (gdbserver_usage): Mention --debug-format.
6984 (main): Parse --debug-format.
6985 * server.h (debug_threads): Declaration moved to debug.h.
6986 #include "debug.h".
6987 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6988 trace_debug_1 that uses debug_printf.
6989 (tracepoint_look_up_symbols): Update all debugging printfs to use
6990 debug_printf instead of fprintf.
6991
e671835b
BS
69922014-01-20 Baruch Siach <baruch@tkos.co.il>
6993
6994 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6995 sys/ptrace.h.
6996
b5737fa9
PA
69972014-01-17 Pedro Alves <palves@redhat.com>
6998
ea38d2a9 6999 PR build/16445
c7faa97a
PA
7000 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7001 defined after including gdb_proc_service.h.
b5737fa9 7002
40ed484e
DE
70032014-01-16 Doug Evans <dje@google.com>
7004
7005 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7006 (match_dll): Use it.
7007
969c39fb
MM
70082014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7009
7010 * target.h (target_ops) <read_btrace>: Change parameters and
7011 return type to allow error reporting.
7012 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7013 trace reading errors on.
7014 * linux-low.c (linux_low_read_btrace): Pass trace reading
7015 errors on.
7016 (linux_low_disable_btrace): New.
7017
ab7f45ba
DE
70182014-01-15 Doug Evans <dje@google.com>
7019
7020 * inferiors.c (thread_id_to_gdb_id): Delete.
7021 * inferiors.h (thread_id_to_gdb_id): Delete.
7022
66af0f44
EZ
70232014-01-13 Eli Zaretskii <eliz@gnu.org>
7024
7025 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7026 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7027 versions.
7028
9939e131
PA
70292014-01-08 Pedro Alves <palves@redhat.com>
7030
7031 * server.c (handle_status): Don't discard previous queued stop
7032 replies or thread's pending status here.
7033 (main) <disconnection>: Do it here instead.
7034
b7ea362b
PA
70352014-01-08 Pedro Alves <palves@redhat.com>
7036
7037 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7038 * server.c (visit_actioned_threads, handle_pending_status): New
7039 function.
7040 (handle_v_cont): Factor out parts to ...
7041 (resume): ... this new function. If in all-stop, and a thread
7042 being resumed has a pending status, report it without actually
7043 resuming.
7044 (myresume): Adjust to use the new 'resume' function.
7045 (clear_pending_status_callback, set_pending_status_callback)
7046 (find_status_pending_thread_callback): New functions.
7047 (handle_status): Handle the case of multiple threads having
7048 interesting statuses to report. Report threads' real last signal
7049 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7050 with an interesting thread to report the status for, instead of
7051 always reporting the status of the first thread.
7052
28498c42
JB
70532014-01-01 Joel Brobecker <brobecker@adacore.com>
7054
7055 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7056 * gdbreplay.c (gdbreplay_version): Likewise.
7057
f45c82da
YZ
70582013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7059
7060 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7061 iov.iov_len with the real length in use.
7062
379a5e2d
JB
70632013-12-13 Joel Brobecker <brobecker@adacore.com>
7064
7065 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7066 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7067 for all targets that use win32-low.c.
7068 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7069 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7070
4210d83e
PA
70712013-12-13 Pedro Alves <palves@redhat.com>
7072
7073 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7074 if equal to TARGET_WAITKIND_LOADED.
7075 * win32-low.c (cached_status): New static global.
7076 (win32_wait): Add declaration.
7077 (do_initial_child_stuff): Flush all initial pending debug events
7078 up to the initial breakpoint.
7079 (win32_wait): If CACHED_STATUS was set, return that instead
7080 of doing a real wait. Remove the code resuming the execution
7081 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7082 during the initial phase. Also remove the code changing
7083 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7084 TARGET_WAITKIND_STOPPED.
7085
e7f0d979
YQ
70862013-12-11 Yao Qi <yao@codesourcery.com>
7087
7088 * notif.c (handle_notif_ack): Return 0 if no notification
7089 matches.
7090
ebcf782c
DE
70912013-11-20 Doug Evans <dje@google.com>
7092
7093 * linux-low.c (linux_set_resume_request): Fix comment.
7094
20ad9378
DE
70952013-11-20 Doug Evans <dje@google.com>
7096
7097 * linux-low.c (resume_status_pending_p): Tweak comment.
7098
a196ebeb
WT
70992013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7100
7101 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7102 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7103 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7104 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7105 (srv_amd64_regobj): Add amd64-mpx.o.
7106 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7107 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7108 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7109 * i387-fp.c (num_pl_bnd_register) Added constant.
7110 (num_pl_bnd_cfg_registers) Added constant.
7111 (struct i387_xsave) Added reserved area and MPX fields.
7112 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7113 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7114 function.
7115 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7116 (init_registers_amd64_mpx_linux): Declare new function.
7117 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7118 (x86_64_regmap): Add MPX registers.
7119 (x86_linux_read_description): Add MPX case.
7120 (initialize_low_arch): Initialize MPX targets.
7121
0080a2f6
TT
71222013-11-18 Tom Tromey <tromey@redhat.com>
7123
7124 * configure: Rebuild.
7125 * configure.ac: Don't check for stdlib.h.
7126 * gdbreplay.c: Unconditionally include stdlib.h.
7127
2978b111
TT
71282013-11-18 Tom Tromey <tromey@redhat.com>
7129
7130 * config.in: Rebuild.
7131 * configure: Rebuild.
7132 * configure.ac: Don't use AC_HEADER_DIRENT.
7133
a3d08894
TT
71342013-11-18 Tom Tromey <tromey@redhat.com>
7135
7136 * server.h: Don't check HAVE_STRING_H.
7137 * gdbreplay.c: Don't check HAVE_STRING_H.
7138 * configure: Rebuild.
7139
0a5dd17d
TT
71402013-11-18 Tom Tromey <tromey@redhat.com>
7141
7142 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7143 LIBGNU.
7144
1bd2f0ba
TT
71452013-11-08 Tom Tromey <tromey@redhat.com>
7146
7147 * configure, config.in: Rebuild.
7148 * configure.ac: Remove unused configury.
7149
3266f10b
TT
71502013-11-08 Tom Tromey <tromey@redhat.com>
7151
7152 * acinclude.m4: Include common.m4, codeset.m4.
7153 * configure, config.in: Rebuild.
7154 * configure.ac: Use GDB_AC_COMMON.
7155
6682d959
AA
71562013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7157
7158 * linux-s390-low.c (HWCAP_S390_TE): New define.
7159 (s390_arch_setup): Consider the TE field in the HWCAP for
7160 determining 'have_regset_tdb'.
7161
fd0a4d76
SDJ
71622013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7163
7164 PR gdb/16014
7165 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7166 call to sizeof.
7167
1a3d890b
PA
71682013-10-02 Pedro Alves <palves@redhat.com>
7169
7170 * server.c (process_serial_event): Don't output "GDBserver
7171 exiting" if GDB is connected through stdio.
7172 * target.c (mywait): Likewise, be silent if GDB is connected
7173 through stdio.
7174
97ad4581
JB
71752013-10-01 Joel Brobecker <brobecker@adacore.com>
7176
7177 * lynx-low.c (lynx_add_threads_after_attach): New function.
7178 (lynx_attach): Remove call to add_thread. Add call to
7179 lynx_add_threads_after_attach instead.
7180
5b4e221c
MF
71812013-09-28 Mike Frysinger <vapier@gentoo.org>
7182
7183 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7184 * config.in, configure: Regenerated.
7185
ee47b2f8
YQ
71862013-09-18 Yao Qi <yao@codesourcery.com>
7187
7188 PR server/15959
7189 * server.c (start_inferior): Clear 'resume_info'.
7190
d6707650 71912013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7192
d6707650
JW
7193 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7194 for each register.
7195
9243dd0e 71962013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7197
9243dd0e
JW
7198 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7199 linux-tile-low.o to srv_tgtobj.
7200
c623a6ef
WN
72012013-09-16 Will Newton <will.newton@linaro.org>
7202
7203 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7204 out regs.
7205
fb71d39e
PA
72062013-09-06 Pedro Alves <palves@redhat.com>
7207
7208 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7209 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7210 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7211 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7212 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7213 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7214
8e7e9910
PA
72152013-09-06 Pedro Alves <palves@redhat.com>
7216
7217 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7218 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7219
7c3a12ca
PA
72202013-09-06 Pedro Alves <palves@redhat.com>
7221
7222 * linux-amd64-ipa.c: Include tracepoint.h.
7223 * linux-i386-ipa.c: Include tracepoint.h.
7224
8eb3d7b6
RW
72252013-09-06 Ricard Wanderlof <ricardw@axis.com>
7226
7227 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7228 (ps_get_thread_area): New function.
7229
eddddb9d
RW
72302013-09-06 Ricard Wanderlof <ricardw@axis.com>
7231
7232 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7233 (initialize_low_arch): Call init_registers_crisv32 rather than
7234 init_register_crisv32.
7235
533b0600
PA
72362013-09-05 Pedro Alves <palves@redhat.com>
7237
7238 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7239 to ...
7240 * hostio.h: ... this new file.
7241 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7242 win32-low.c: Include hostio.h.
7243
0ce3d3b5
PA
72442013-09-05 Pedro Alves <palves@redhat.com>
7245
7246 * server.h (gdb_client_data, handler_func, callback_handler_func)
7247 (delete_file_handler, add_file_handler, append_callback_event)
7248 (delete_callback_event, start_event_loop, initialize_event_loop):
7249 Move to event-loop.h and include it.
7250 * event-loop.h: New file.
7251
799cdc37
PA
72522013-09-05 Pedro Alves <palves@redhat.com>
7253
7254 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7255 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7256 (loaded_dll, unloaded_dll): Move to ...
7257 * dll.h: ... this new file.
7258 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7259
6a6bbd9d
PA
72602013-09-05 Pedro Alves <palves@redhat.com>
7261
7262 * server.h (current_process, get_thread_process, all_processes)
7263 (add_inferior_to_list, for_each_inferior, current_inferior)
7264 (remove_inferior, add_process, remove_process, find_process_pid)
7265 (have_started_inferiors_p, have_attached_inferiors_p)
7266 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7267 (clear_inferiors, find_inferior, find_inferior_id)
7268 (inferior_target_data, set_inferior_target_data)
7269 (inferior_regcache_data, set_inferior_regcache_data): Move to
7270 inferiors.h, and include it.
7271 * inferiors.h: New file.
7272
f699aaba
PA
72732013-09-05 Pedro Alves <palves@redhat.com>
7274
7275 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7276 Move ...
72f4393d 7277 * ax.h: ... here.
f699aaba 7278
c144c7a0
PA
72792013-09-05 Pedro Alves <palves@redhat.com>
7280
7281 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7282 tracepoint.h.
7283 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7284 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7285 (handle_tracepoint_general_set, handle_tracepoint_query)
7286 (tracepoint_finished_step, tracepoint_was_hit)
7287 (release_while_stepping_state_list, current_traceframe)
7288 (in_readonly_region, traceframe_read_mem)
7289 (fetch_traceframe_registers, traceframe_read_sdata)
7290 (traceframe_read_info, struct fast_tpoint_collect_status)
7291 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7292 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7293 (supply_fast_tracepoint_registers)
7294 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7295 (ipa_tdesc, claim_trampoline_space)
7296 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7297 (agent_mem_read, agent_get_trace_state_variable_value)
7298 (agent_set_trace_state_variable_value, agent_tsv_read)
7299 (agent_mem_read_string, get_raw_reg_func_addr)
7300 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7301 * tracepoint.h: ... this new file.
7302
ff42e6ab
PA
73032013-09-05 Pedro Alves <palves@redhat.com>
7304
7305 * server.h (perror_with_name, error, fatal, warning, paddress)
7306 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7307 include it.
7308 * utils.h: New file.
7309
541af0f4
PA
73102013-09-05 Pedro Alves <palves@redhat.com>
7311
7312 * server.h (remote_debug, noack_mode, transport_is_reliable)
7313 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7314 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7315 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7316 (write_enn, initialize_async_io, enable_async_io)
7317 (disable_async_io, check_remote_input_interrupt_request)
7318 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7319 (dead_thread_notify, prepare_resume_reply)
7320 (decode_address_to_semicolon, decode_address, decode_m_packet)
7321 (decode_M_packet, decode_X_packet, decode_xfer_write)
7322 (decode_search_memory_packet, unhexify, hexify)
7323 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7324 (look_up_one_symbol, relocate_instruction)
7325 (monitor_output): Move to remote-utils.h, and include it.
7326 * remote-utils.h: New file.
7327
eebdf26b
PA
73282013-09-05 Pedro Alves <palves@redhat.com>
7329
7330 * server.h (_): Delete.
7331
3aafd2ff
PA
73322013-09-02 Pedro Alves <palves@redhat.com>
7333
7334 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7335 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7336 allocated.
7337 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7338
cee83bcb
PM
73392013-09-02 Pierre Muller <muller@sourceware.org>
7340
7341 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7342 or WriteProcessMemory complete successfully and handle
7343 ERROR_PARTIAL_COPY error.
7344
9a13b2fa
PA
73452013-09-02 Pedro Alves <palves@redhat.com>
7346
7347 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7348 error instead of EIO.
7349
602e3198
JK
73502013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7351
7352 PR server/15604
7353 * linux-low.c: Include filestuff.h.
7354 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7355 * lynx-low.c: Include filestuff.h.
7356 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7357 * server.c: Include filestuff.h.
7358 (main): Call notice_open_fds.
7359 * spu-low.c: Include filestuff.h.
7360 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7361
96d7229d
LM
73622013-08-22 Luis Machado <lgustavo@codesourcery.com>
7363
7364 * Makefile.in: Explain why ../target and ../nat are not
7365 listed as include file search paths.
7366 (linux-waitpid.o): New object file rule.
7367 * configure.srv (srv_native_linux_obj): New variable.
7368 Replace all occurrences of linux native object files with
7369 $srv_native_linux_obj.
7370 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7371 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7372 (linux_enable_event_reporting): Remove declaration.
7373 (my_waitpid): Moved to common/linux-waitpid.c.
7374 (linux_wait_for_event): Pass ptid when calling
7375 linux_enable_event_reporting.
7376 (linux_supports_tracefork_flag): Remove.
7377 (linux_enable_event_reporting): Likewise.
7378 (linux_tracefork_grandchild): Remove.
7379 (STACK_SIZE): Moved to common/linux-ptrace.c.
7380 (linux_tracefork_child): Remove.
7381 (linux_test_for_tracefork): Remove.
7382 (linux_look_up_symbols): Call linux_supports_traceclone.
7383 (initialize_low): Remove call to linux_test_for_tracefork.
7384 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7385 common/linux-ptrace.h.
7386 (PTRACE_TYPE_ARG4): Likewise.
7387 Include linux-ptrace.h.
7388
32940073
PA
73892013-08-21 Pedro Alves <palves@redhat.com>
7390
7391 * config.in: Renegerate.
7392
33b60d58 73932013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 7394
33b60d58
LM
7395 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7396 (SFILES): Remove $(srcdir)/common/target-common.c and
7397 add $(srcdir)/target/waitstatus.c.
7398 (OBS): Remove target-common.o and add waitstatus.o.
7399 (server_h): Remove $(srcdir)/../common/target-common.h and
7400 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7401 and $(srcdir)/../target/waitstatus.h.
7402 (target-common.o): Remove.
7403 (waitstatus.o): New target object file.
7404 * target.h: Do not include target-common.h and
7405 include target/resume.h, target/wait.h and
7406 target/waitstatus.h.
7407
b8e1b30e
LM
74082013-08-13 Luis Machado <lgustavo@codesourcery.com>
7409
7410 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7411 to PTRACE_TYPE_ARG3.
7412 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7413 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7414 PTRACE_TYPE_ARG4.
7415 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7416 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7417
7a60ad40
YQ
74182013-07-27 Jie Zhang <jie@codesourcery.com>
7419 Daniel Jacobowitz <dan@codesourcery.com>
7420 Yao Qi <yao@codesourcery.com>
7421
7422 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7423 (mips-linux-watch.o): New rule.
7424 (mips_linux_watch_h): New variable.
7425 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7426 srv_tgtobj.
7427 * linux-mips-low.c: Include mips-linux-watch.h.
7428 (struct arch_process_info, struct arch_lwp_info): New.
7429 (update_watch_registers_callback): New function.
7430 (mips_linux_new_process, mips_linux_new_thread) New functions.
7431 (mips_linux_prepare_to_resume, mips_insert_point): New
7432 functions.
7433 (mips_remove_point, mips_stopped_by_watchpoint): New
7434 functions.
7435 (rsp_bp_type_to_target_hw_bp_type): New function.
7436 (mips_stopped_data_address): New function.
7437 (the_low_target): Add watchpoint support functions.
7438
de6f69ad
YQ
74392013-07-27 Yao Qi <yao@codesourcery.com>
7440
7441 * i386-low.c: Include break-common.h.
7442 (enum target_hw_bp_type): Remove.
7443
3360c0bf
LM
74442013-07-24 Luis Machado <lgustavo@codesourcery.com>
7445
7446 * Makefile.in (SFILES): /common/target-common.c.
7447 (OBS): Add target-common.o.
7448 (server_h): Add $(srcdir)/../common/target-common.h.
7449 (target-common.o): New target.
7450 * server.c (queue_stop_reply_callback): Free
7451 status string after use.
7452 * target.c (target_waitstatus_to_string): Remove.
7453 * target.h: Include target-common.h.
7454 (resume_kind): Likewise.
7455 (target_waitkind): Likewise.
7456 (target_waitstatus): Likewise.
7457 (TARGET_WNOHANG): Likewise.
7458
bd885420
YQ
74592013-07-04 Yao Qi <yao@codesourcery.com>
7460
7461 * Makefile.in (host_alias): Use @host_noncanonical@.
7462 (target_alias): Use @target_noncanonical@.
7463 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7464 ACX_NONCANONICAL_HOST.
7465 * configure: Regenerated.
7466
7467 Revert:
7468 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7469
7470 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7471 * configure: Rebuild.
7472 * Makefile.in (version_host, version_target): Get from configure.
7473 (version.c): Use $(version_host) and $(version_target).
7474
17ef446e
PA
74752013-07-03 Pedro Alves <palves@redhat.com>
7476
7477 * Makefile.in (config.status): Depend on development.sh.
7478 * acinclude.m4: Include libmcheck.m4.
7479 * configure: Regenerate.
7480
7a9a7487
MG
74812013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7482
7483 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7484 attribute inside the parentheses.
7485 (winapi_DebugSetProcessKillOnExit): Ditto.
7486 (winapi_DebugBreakProcess): Ditto.
7487 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 7488
49b64de6
MG
74892013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7490
7491 * notif.h (notif_event): Add a dummy member to avoid compiler
7492 errors.
7493
d5749ee7
PA
74942013-07-01 Pedro Alves <palves@redhat.com>
7495
7496 * hostio.c (HOSTIO_PATH_MAX): Define.
7497 (require_filename, handle_open, handle_unlink, handle_readlink):
7498 Use it.
7499
d8d2a3ee
PA
75002013-07-01 Pedro Alves <palves@redhat.com>
7501
7502 * server.h: Include "pathmax.h".
7503 * linux-low.c: Don't include sys/param.h.
7504 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7505 MAXPATHLEN.
7506 * win32-low.c: Don't include sys/param.h.
7507 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7508
bc7dea8d
PA
75092013-07-01 Pedro Alves <palves@redhat.com>
7510
7511 * event-loop.c: Don't check HAVE_UNISTD_H before including
7512 <unistd.h>.
7513 * gdbreplay.c: Likewise.
7514 * remote-utils.c: Likewise.
7515 * server.c: Likewise.
7516 * configure.ac: Don't check for unistd.h.
7517 * configure: Regenerate.
7518
d6c2da54
TT
75192013-06-28 Tom Tromey <tromey@redhat.com>
7520
7521 * Makefile.in (version.c): Use version.in, not
7522 common/version.in.
7523
257b6bec
MG
75242013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7525
7526 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7527 * configure: Rebuild.
7528 * Makefile.in (version_host, version_target): Get from configure.
7529 (version.c): Use $(version_host) and $(version_target).
7530
86ebe149
DK
75312013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7532
7533 Fix trace-status to output user name without trailing colon.
7534 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7535
f30aa5af
DK
75362013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7537
7538 Fix trace-status to output proper start-time and stop-time.
7539 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7540 output start time and stop time in hex as gdb expects.
7541
28a93511
YQ
75422013-06-26 Pedro Alves <pedro@codesourcery.com>
7543
7544 * tracepoint.c (build_traceframe_info_xml): Output trace state
7545 variables present in the trace buffer.
7546
01208463
TT
75472013-06-24 Tom Tromey <tromey@redhat.com>
7548
7549 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7550 create-version.sh.
7551 (version.o): Remove.
7552 * gdbreplay.c: Include version.h.
7553 (version, host_name): Don't declare.
7554 * server.h: Include version.h.
7555 (version, host_name): Don't declare.
7556
760256f9
PA
75572013-06-12 Pedro Alves <palves@redhat.com>
7558
7559 * linux-x86-low.c (linux_is_elf64): Delete global.
7560 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7561 with local linux_pid_exe_is_elf_64_file use.
7562
030031ee
PA
75632013-06-11 Pedro Alves <palves@redhat.com>
7564
7565 * linux-low.c (regset_disabled, disable_regset): New functions.
7566 (regsets_fetch_inferior_registers)
7567 (regsets_store_inferior_registers): Use them.
7568 (initialize_regsets_info); Don't allocate the disabled_regsets
7569 array here.
7570 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7571 comment.
7572
5da6eb0a
PA
75732013-06-11 Pedro Alves <palves@redhat.com>
7574
7575 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7576 xmalloc.
7577
7e5aaa09
PA
75782013-06-11 Pedro Alves <palves@redhat.com>
7579
7580 * linux-x86-low.c (initialize_low_arch): Call
7581 init_registers_x32_avx_linux.
7582
d878444c
JK
75832013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7584
7585 Fix compatibility with Android Bionic.
7586 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7587 it is not empty.
7588
3aee8918
PA
75892013-06-07 Pedro Alves <palves@redhat.com>
7590
5f2b57b5 7591 PR server/14823
3aee8918
PA
7592 * Makefile.in (OBS): Add tdesc.o.
7593 (IPA_OBJS): Add tdesc-ipa.o.
7594 (tdesc-ipa.o): New rule.
7595 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7596 interface.
7597 * linux-low.c (new_inferior): Delete.
7598 (disabled_regsets, num_regsets): Delete.
7599 (linux_add_process): Adjust to set the new per-process
7600 new_inferior flag.
7601 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7602 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7603 was a stop. When calling arch_setup, switch the current inferior
7604 to the thread that got an event.
7605 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7606 (regsets_fetch_inferior_registers)
7607 (regsets_store_inferior_registers): New regsets_info parameter.
7608 Adjust to use it.
7609 (linux_register_in_regsets): New regs_info parameter. Adjust to
7610 use it.
7611 (register_addr, fetch_register, store_register): New usrregs_info
7612 parameter. Adjust to use it.
7613 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7614 parameter regs_info. Adjust to use it.
7615 (linux_fetch_registers): Get the current inferior's regs_info, and
7616 adjust to use it.
7617 (linux_store_registers): Ditto.
7618 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7619 (initialize_low): Don't initialize the target_regsets here. Call
7620 initialize_low_arch.
7621 * linux-low.h (target_regsets): Delete declaration.
7622 (struct regsets_info): New.
7623 (struct usrregs_info): New.
7624 (struct regs_info): New.
7625 (struct process_info_private) <new_inferior>: New field.
7626 (struct linux_target_ops): Delete the num_regs, regmap, and
7627 regset_bitmap fields. New field regs_info.
7628 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7629 * i387-fp.c (num_xmm_registers): Delete.
7630 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7631 calls to new interface.
7632 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7633 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7634 Infer the number of xmm registers from the regcache's target
7635 description.
7636 * i387-fp.h (num_xmm_registers): Delete.
7637 * inferiors.c (add_thread): Don't install the thread's regcache
7638 here.
7639 * proc-service.c (gregset_info): Fetch the current inferior's
7640 regs_info. Adjust to use it.
7641 * regcache.c: Include tdesc.h.
7642 (register_bytes, reg_defs, num_registers)
7643 (gdbserver_expedite_regs): Delete.
7644 (get_thread_regcache): If the thread doesn't have a regcache yet,
7645 create one, instead of aborting gdbserver.
7646 (regcache_invalidate_one): Rename to ...
7647 (regcache_invalidate_thread): ... this.
7648 (regcache_invalidate_one): New.
7649 (regcache_invalidate): Only invalidate registers of the current
7650 process.
7651 (init_register_cache): Add target_desc parameter, and use it.
7652 (new_register_cache): Ditto. Assert the target description has a
7653 non zero registers_size.
7654 (regcache_cpy): Add assertions. Adjust.
7655 (realloc_register_cache, set_register_cache): Delete.
7656 (registers_to_string, registers_from_string): Adjust.
7657 (find_register_by_name, find_regno, find_register_by_number)
7658 (register_cache_size): Add target_desc parameter, and use it.
7659 (free_register_cache_thread, free_register_cache_thread_one)
7660 (regcache_release, register_cache_size): New.
7661 (register_size): Add target_desc parameter, and use it.
7662 (register_data, supply_register, supply_register_zeroed)
7663 (supply_regblock, supply_register_by_name, collect_register)
7664 (collect_register_as_string, collect_register_by_name): Adjust.
7665 * regcache.h (struct target_desc): Forward declare.
7666 (struct regcache) <tdesc>: New field.
7667 (init_register_cache, new_register_cache): Add target_desc
7668 parameter.
7669 (regcache_invalidate_thread): Declare.
7670 (regcache_invalidate_one): Delete declaration.
7671 (regcache_release): Declare.
7672 (find_register_by_number, register_cache_size, register_size)
7673 (find_regno): Add target_desc parameter.
7674 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7675 declarations.
7676 * remote-utils.c: Include tdesc.h.
7677 (outreg, prepare_resume_reply): Adjust.
7678 * server.c: Include tdesc.h.
7679 (gdbserver_xmltarget): Delete declaration.
7680 (get_features_xml, process_serial_event): Adjust.
7681 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7682 declare.
7683 (struct process_info) <tdesc>: New field.
7684 (ipa_tdesc): Declare.
7685 * tdesc.c: New file.
7686 * tdesc.h: New file.
7687 * tracepoint.c: Include tdesc.h.
7688 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7689 (get_context_regcache): Adjust to pass ipa_tdesc down.
7690 (do_action_at_tracepoint): Adjust to get the register cache size
7691 from the context regcache's description.
7692 (traceframe_walk_blocks): Adjust to get the register cache size
7693 from the current trace frame's description.
7694 (traceframe_get_pc): Adjust to get current trace frame's
7695 description and pass it down.
7696 (gdb_collect): Adjust to get the register cache size from the
7697 IPA's description.
7698 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7699 (gdbserver_xmltarget): Delete.
7700 (initialize_low_tracepoint): Set the ipa's target description.
7701 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7702 (initialize_low_tracepoint): Set the ipa's target description.
7703 * linux-x86-low.c: Include tdesc.h.
7704 [__x86_64__] (is_64bit_tdesc): New.
7705 (ps_get_thread_area, x86_get_thread_area): Use it.
7706 (i386_cannot_store_register): Rename to ...
7707 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7708 (i386_cannot_fetch_register): Rename to ...
7709 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7710 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7711 to new interface.
7712 (target_regsets): Rename to ...
7713 (x86_regsets): ... this.
7714 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7715 interface.
7716 (x86_siginfo_fixup): Use is_64bit_tdesc.
7717 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7718 (tdesc_x32_avx_linux, tdesc_x32_linux)
7719 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7720 Declare.
7721 (x86_linux_update_xmltarget): Delete.
7722 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7723 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7724 (AMD64_LINUX_USER64_CS): New.
7725 (x86_linux_read_description): New, based on
7726 x86_linux_update_xmltarget.
7727 (same_process_callback): New.
7728 (x86_arch_setup_process_callback): New.
7729 (x86_linux_update_xmltarget): New.
7730 (x86_regsets_info): New.
7731 (amd64_linux_regs_info): New.
7732 (i386_linux_usrregs_info): New.
7733 (i386_linux_regs_info): New.
7734 (x86_linux_regs_info): New.
7735 (x86_arch_setup): Reimplement.
7736 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7737 (x86_emit_ops): Ditto.
7738 (the_low_target): Adjust. Install x86_linux_regs_info,
7739 x86_cannot_fetch_register, and x86_cannot_store_register.
7740 (initialize_low_arch): New.
7741 * linux-ia64-low.c (tdesc_ia64): Declare.
7742 (ia64_fetch_register): Adjust.
7743 (ia64_usrregs_info, regs_info): New globals.
7744 (ia64_regs_info): New function.
7745 (the_low_target): Adjust.
7746 (initialize_low_arch): New function.
7747 * linux-sparc-low.c (tdesc_sparc64): Declare.
7748 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7749 Adjust.
7750 (sparc_arch_setup): New function.
7751 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7752 (the_low_target): Adjust.
7753 (initialize_low_arch): New function.
7754 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7755 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7756 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7757 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7758 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7759 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7760 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7761 (tdesc_powerpc_isa205_vsx64l): Declare.
7762 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7763 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7764 (ppc_set_pc, ppc_get_hwcap): Adjust.
7765 (ppc_usrregs_info): Forward declare.
7766 (!__powerpc64__) ppc_regmap_adjusted: New global.
7767 (ppc_arch_setup): Adjust to the current process'es target
7768 description.
7769 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7770 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7771 (ppc_store_evrregset): Adjust.
7772 (target_regsets): Rename to ...
7773 (ppc_regsets): ... this, and make static.
7774 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7775 (ppc_regs_info): New function.
7776 (the_low_target): Adjust.
7777 (initialize_low_arch): New function.
7778 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7779 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7780 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7781 (tdesc_s390x_linux64v2): Declare.
7782 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7783 (s390_fill_gregset, s390_store_last_break): Adjust.
7784 (target_regsets): Rename to ...
7785 (s390_regsets): ... this, and make static.
7786 (s390_get_pc, s390_set_pc): Adjust.
7787 (s390_get_hwcap): New target_desc parameter, and use it.
7788 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7789 (s390_arch_setup): Adjust to set the current process'es target
7790 description. Don't adjust the regmap.
7791 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7792 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7793 (regs_info_3264): New globals.
7794 (s390_regs_info): New function.
7795 (the_low_target): Adjust.
7796 (initialize_low_arch): New function.
7797 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7798 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7799 [__mips64] (init_registers_mips_linux)
7800 (init_registers_mips_dsp_linux): Delete defines.
7801 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7802 (have_dsp): New global.
7803 (mips_read_description): New, based on mips_arch_setup.
7804 (mips_arch_setup): Reimplement.
7805 (get_usrregs_info): New function.
7806 (mips_cannot_fetch_register, mips_cannot_store_register)
7807 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7808 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7809 (target_regsets): Rename to ...
7810 (mips_regsets): ... this, and make static.
7811 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7812 (dsp_regs_info, regs_info): New globals.
7813 (mips_regs_info): New function.
7814 (the_low_target): Adjust.
7815 (initialize_low_arch): New function.
7816 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7817 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7818 Declare.
7819 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7820 (arm_read_description): New, with bits factored from
7821 arm_arch_setup.
7822 (arm_arch_setup): Reimplement.
7823 (target_regsets): Rename to ...
7824 (arm_regsets): ... this, and make static.
7825 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7826 (arm_regs_info): New function.
7827 (the_low_target): Adjust.
7828 (initialize_low_arch): New function.
7829 * linux-m68k-low.c (tdesc_m68k): Declare.
7830 (target_regsets): Rename to ...
7831 (m68k_regsets): ... this, and make static.
7832 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7833 (m68k_regs_info): New function.
7834 (m68k_arch_setup): New function.
7835 (the_low_target): Adjust.
7836 (initialize_low_arch): New function.
7837 * linux-sh-low.c (tdesc_sharch): Declare.
7838 (target_regsets): Rename to ...
7839 (sh_regsets): ... this, and make static.
7840 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7841 (sh_regs_info, sh_arch_setup): New functions.
7842 (the_low_target): Adjust.
7843 (initialize_low_arch): New function.
7844 * linux-bfin-low.c (tdesc_bfin): Declare.
7845 (bfin_arch_setup): New function.
7846 (bfin_usrregs_info, regs_info): New globals.
7847 (bfin_regs_info): New function.
7848 (the_low_target): Adjust.
7849 (initialize_low_arch): New function.
7850 * linux-cris-low.c (tdesc_cris): Declare.
7851 (cris_arch_setup): New function.
7852 (cris_usrregs_info, regs_info): New globals.
7853 (cris_regs_info): New function.
7854 (the_low_target): Adjust.
7855 (initialize_low_arch): New function.
7856 * linux-cris-low.c (tdesc_crisv32): Declare.
7857 (cris_arch_setup): New function.
7858 (cris_regsets_info, 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-m32r-low.c (tdesc_m32r): Declare.
7863 (m32r_arch_setup): New function.
7864 (m32r_usrregs_info, regs_info): New globals.
7865 (m32r_regs_info): Adjust.
7866 (initialize_low_arch): New function.
7867 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7868 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7869 (tic6x_usrregs_info): Forward declare.
7870 (tic6x_read_description): New function, based on ...
7871 (tic6x_arch_setup): ... this. Reimplement.
7872 (target_regsets): Rename to ...
7873 (tic6x_regsets): ... this, and make static.
7874 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7875 (tic6x_regs_info): New function.
7876 (the_low_target): Adjust.
7877 (initialize_low_arch): New function.
7878 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7879 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7880 (target_regsets): Rename to ...
7881 (xtensa_regsets): ... this, and make static.
7882 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7883 globals.
7884 (xtensa_arch_setup, xtensa_regs_info): New functions.
7885 (the_low_target): Adjust.
7886 (initialize_low_arch): New function.
7887 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7888 (nios2_arch_setup): Set the current process'es tdesc.
7889 (target_regsets): Rename to ...
7890 (nios2_regsets): ... this.
7891 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7892 (nios2_regs_info): New function.
7893 (the_low_target): Adjust.
7894 (initialize_low_arch): New function.
a261b8f5
PA
7895 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7896 (aarch64_arch_setup): Set the current process'es tdesc.
7897 (target_regsets): Rename to ...
7898 (aarch64_regsets): ... this.
7899 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7900 (aarch64_regs_info): New function.
7901 (the_low_target): Adjust.
7902 (initialize_low_arch): New function.
3aee8918
PA
7903 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7904 globals.
7905 (target_regsets): Rename to ...
7906 (tile_regsets): ... this.
7907 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7908 (tile_regs_info): New function.
7909 (tile_arch_setup): Set the current process'es tdesc.
7910 (the_low_target): Adjust.
7911 (initialize_low_arch): New function.
7912 * spu-low.c (tdesc_spu): Declare.
7913 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7914 * win32-arm-low.c (tdesc_arm): Declare.
7915 (arm_arch_setup): New function.
7916 (the_low_target): Install arm_arch_setup instead of
7917 init_registers_arm.
7918 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7919 (init_windows_x86): Rename to ...
7920 (i386_arch_setup): ... this. Set `win32_tdesc'.
7921 (the_low_target): Adjust.
7922 * win32-low.c (win32_tdesc): New global.
7923 (child_add_thread): Don't create the thread cache here.
7924 (do_initial_child_stuff): Set the new process'es tdesc.
7925 * win32-low.h (struct target_desc): Forward declare.
7926 (win32_tdesc): Declare.
7927 * lynx-i386-low.c (tdesc_i386): Declare global.
7928 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7929 * lynx-low.c (lynx_tdesc): New global.
7930 (lynx_add_process): Set the new process'es tdesc.
7931 * lynx-low.h (struct target_desc): Forward declare.
7932 (lynx_tdesc): Declare global.
7933 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7934 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7935 * nto-low.c (nto_tdesc): New global.
7936 (do_attach): Set the new process'es tdesc.
7937 * nto-low.h (struct target_desc): Forward declare.
7938 (nto_tdesc): Declare.
7939 * nto-x86-low.c (tdesc_i386): Declare.
7940 (nto_x86_arch_setup): Set `nto_tdesc'.
7941
b1fbec62
GB
79422013-06-04 Gary Benson <gbenson@redhat.com>
7943
7944 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7945 to qSupported response when appropriate.
7946 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7947 with nonzero-length annex.
7948 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7949 arguments supplied in annex.
7950
d1ec4ce7
DE
79512013-05-31 Doug Evans <dje@google.com>
7952
ac44adcb 7953 PR server/15594
d1ec4ce7
DE
7954 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7955 64 bits in 64-cross-32 environment.
7956
9b25f2d3
PA
79572013-05-28 Pedro Alves <palves@redhat.com>
7958
7959 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7960 (aarch64-without-fpu.c): Delete rule.
7961 * configure.srv (aarch64*-*-linux*): Remove references to
7962 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7963 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7964 declaration.
7965
6740dc9c
PA
79662013-05-24 Pedro Alves <palves@redhat.com>
7967
7968 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7969 instead of strchr/decode_address. Error if the range isn't split
7970 with a ','. Don't assume there's be a ':' in the action.
7971
c2d6af84
PA
79722013-05-23 Yao Qi <yao@codesourcery.com>
7973 Pedro Alves <palves@redhat.com>
7974
7975 * linux-low.c (lwp_in_step_range): New function.
7976 (linux_wait_1): If the thread was range stepping and stopped
7977 outside the stepping range, report the stop to GDB. Otherwise,
7978 continue stepping. Add range stepping debug output.
7979 (linux_set_resume_request): Copy the step range from the resume
7980 request to the lwp.
7981 (linux_supports_range_stepping): New.
7982 (linux_target_ops) <supports_range_stepping>: Set to
7983 linux_supports_range_stepping.
7984 * linux-low.h (struct linux_target_ops)
7985 <supports_range_stepping>: New field.
7986 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7987 * linux-x86-low.c (x86_supports_range_stepping): New.
7988 (the_low_target) <supports_range_stepping>: Set to
7989 x86_supports_range_stepping.
7990 * server.c (handle_v_cont): Handle 'r' action.
7991 (handle_v_requests): Append ";r" if the target supports range
7992 stepping.
7993 * target.h (struct thread_resume) <step_range_start,
7994 step_range_end>: New fields.
7995 (struct target_ops) <supports_range_stepping>:
7996 New field.
7997 (target_supports_range_stepping): New macro.
7998
58794e1a
JB
79992013-05-17 Joel Brobecker <brobecker@adacore.com>
8000
8001 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8002 confusion in comment.
8003
d631c5a7
JB
80042013-05-17 Joel Brobecker <brobecker@adacore.com>
8005
8006 * lynx-low.c (struct process_info_private): New type.
8007 (lynx_add_process): New function.
8008 (lynx_create_inferior, lynx_attach): Replace calls to
8009 add_process by calls to lynx_add_process.
8010 (lynx_resume): If PTID is null, then try using
8011 current_process()->private->last_wait_event_ptid.
8012 Add comments.
8013 (lynx_clear_inferiors): Delete. The contents of that function
8014 has been inlined in lynx_mourn;
8015 (lynx_wait_1): Save the ptid in the process's private data.
8016 (lynx_mourn): Free the process' private data. Replace call
8017 to lynx_clear_inferiors by call to clear_inferiors.
8018
96f7a20f
YQ
80192013-05-17 Yao Qi <yao@codesourcery.com>
8020
8021 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8022 the right place.
8023
db0dfaa0
LM
80242013-05-16 Luis Machado <lgustavo@codesourcery.com>
8025
8026 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8027 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8028 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8029 PT_TEXT_END_ADDR guards. Update comments.
8030 (linux_target_op) <read_offsets>: Conditionally define to
8031 linux_read_offsets if the target is UCLIBC and if it defines
8032 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8033
68f5f838
SL
80342013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8035 Andrew Jenner <andrew@codesourcery.com>
8036
8037 * Makefile.in (SFILES): Add linux-nios2-low.c.
8038 (clean): Add action to delete nios2-linux.c.
8039 (nios2-linux.c): New rule.
8040 * configure.srv: Add nios2*-*-linux*.
8041 * linux-nios2-low.c: New.
8042
1ebff1fd
HAQ
80432013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8044
8045 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8046
f6150862
HZ
80472013-04-25 Hui Zhu <hui@codesourcery.com>
8048
8049 PR gdb/15186
f6150862
HZ
8050 * ax.c (ax_printf): Add fflush.
8051
614c279d
TT
80522013-04-22 Tom Tromey <tromey@redhat.com>
8053
8054 * Makefile.in (SFILES): Add filestuff.c.
8055 (OBS): Add filestuff.o.
8056 (filestuff.o): New target.
8057 * config.in, configure: Rebuild.
8058 * configure.ac: Check for fdwalk, pipe2.
8059
7d4e5717
PA
80602013-04-17 Pedro Alves <palves@redhat.com>
8061
8062 * configure.ac (USE_THREAD_DB): Delete variable.
8063 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8064 Don't AC_SUBST USE_THREAD_DB.
8065 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8066 * config.in, configure: Regenerate.
8067
d5c93e41
PA
80682013-04-16 Pedro Alves <palves@redhat.com>
8069
8070 * linux-low.h (struct lwp_info) <thread_known>: Move under
8071 the USE_THREAD_DB #ifdef.
8072
04f5fe89
PA
80732013-04-16 Pedro Alves <palves@redhat.com>
8074
8075 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8076 (linux-low.o): Delete rule.
8077 * linux-low.h: Always include "gdb_thread_db.h" instead of
8078 conditionally including thread_db.h.
8079 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8080 HAVE_THREAD_DB_H.
8081
480b27bf
JK
80822013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8083
8084 * Makefile.in (install-only): Fix make install regression.
8085
43662968
JK
80862013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8087
8088 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8089 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8090 installation.
8091 * gdbserver.1: Remove.
8092
3e74e146
PA
80932013-03-22 Pedro Alves <palves@redhat.com>
8094
8095 * linux-low.c (handle_extended_wait): Don't call
8096 linux_enable_event_reporting.
8097
a8347a2a
TT
80982013-03-15 Tony Theodore <tonyt@logyst.com>
8099
8100 PR build/9098:
8101 * Makefile.in (SHELL): Use @SHELL@.
8102
eeb56fa7
SDJ
81032013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8104
8105 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8106 compiler warning.
8107
4fa7e2ff
JB
81082013-03-13 Joel Brobecker <brobecker@adacore.com>
8109
8110 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8111 Remove extraneous NULL element.
8112
8ddb1965
YQ
81132013-03-13 Yao Qi <yao@codesourcery.com>
8114
8115 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8116 'V' block in trace frame.
8117
9accd112
MM
81182013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8119
8120 * target.h (struct target_ops): Add btrace ops.
8121 (target_supports_btrace): New macro.
8122 (target_enable_btrace): New macro.
8123 (target_disable_btrace): New macro.
8124 (target_read_btrace): New macro.
8125 * gdbthread.h (struct thread_info): Add btrace field.
8126 * server.c: Include btrace-common.h.
8127 (handle_btrace_general_set): New function.
8128 (handle_btrace_enable): New function.
8129 (handle_btrace_disable): New function.
8130 (handle_general_set): Call handle_btrace_general_set.
8131 (handle_qxfer_btrace): New function.
8132 (struct qxfer qxfer_packets[]): Add btrace entry.
8133 * inferiors.c (remove_thread): Disable btrace.
8134 * linux-low: Include linux-btrace.h.
8135 (linux_low_enable_btrace): New function.
8136 (linux_low_read_btrace): New function.
8137 (linux_target_ops): Add btrace ops.
8138 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8139 Add srv_linux_btrace=yes.
8140 (x86_64-*-linux*): Add linux-btrace.o.
8141 Add srv_linux_btrace=yes.
8142 * configure.ac: Define HAVE_LINUX_BTRACE.
8143 * config.in: Regenerated.
8144 * configure: Regenerated.
8145
5cc22e4c
MM
81462013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8147
8148 * server.c (handle_qxfer): Preserve error message if -3 is
8149 returned.
8150 (qxfer): Document the -3 return value.
8151
7c97f91e
MM
81522013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8153
8154 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8155 (linux_btrace_h): New variable.
8156 (linux-btrace.o): New rule.
8157
be9a119c 81582013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
8159 Hafiz Abid Qadeer <abidh@codesourcery.com>
8160
8161 * tracepoint.c (trace_buffer_size): New global.
8162 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8163 (init_trace_buffer): Change to one-argument function. Allocate
8164 trace buffer memory.
8165 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8166 handle QTBuffer:size packet.
8167 (cmd_bigqtbuffer_size): New function.
8168 (initialize_tracepoint): Call init_trace_buffer with
8169 DEFAULT_TRACE_BUFFER_SIZE.
8170 * server.c (handle_query): Add QTBuffer:size in the
8171 supported packets.
8172
e64f7499
YQ
81732013-03-07 Yao Qi <yao@codesourcery.com>
8174
8175 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8176 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8177 of -1.
8178 (cmd_qtsp): Adjust condition. Do post increment.
8179 Set cur_action and cur_step_action back to 0.
8180
f0ae6fc3
PA
81812013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8182
8183 PR server/15236
8184 * linux-low.c (linux_write_memory): Return early success if LEN is
8185 zero.
8186
b5b0b0af
CV
81872013-03-05 Corinna Vinschen <vinschen@redhat.de>
8188
334ad4a8 8189 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 8190
589bc927
TT
81912013-02-28 Tom Tromey <tromey@redhat.com>
8192
8193 * configure.ac: Invoke AC_SYS_LARGEFILE.
8194 * configure, config.in: Rebuild.
8195
dfe07582
CV
81962013-02-28 Corinna Vinschen <vinschen@redhat.com>
8197
8198 * win32-low.c: Throughout, fix format strings and casts of
8199 printf-like functions to avoid type related warnings on all
8200 platforms.
8201 (get_child_debug_event): Print dwDebugEventCode as hex since
8202 that's how it's usually documented.
8203
736cd585
YQ
82042013-02-28 Yao Qi <yao@codesourcery.com>
8205
8206 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8207 pulongest.
8208
e1f58301
JW
82092013-02-27 Jiong Wang <jiwang@tilera.com>
8210
8211 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8212 (reg-tilegx32.c): New rule.
8213 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8214 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8215 different register info initializer according to elf class.
8216 (init_registers_tilgx32): New function. The tilegx32 register info
8217 initializer.
8218 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8219 (tile_store_gregset): Likewise.
8220
d171ca78
YQ
82212013-02-27 Yao Qi <yao@codesourcery.com>
8222
8223 * server.c (process_point_options): Print debug message when
8224 debug_threads is true.
8225
282bbdf3
YQ
82262013-02-26 Yao Qi <yao@codesourcery.com>
8227
8228 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8229
aca22551
PA
82302013-02-19 Pedro Alves <palves@redhat.com>
8231 Kai Tietz <ktietz@redhat.com>
8232
8233 PR gdb/15161
8234
8235 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8236 instead of strtoul to extract address from packet.
8237 (process_serial_event) <'z'>: Likewise.
8238
4f3cee1c
YQ
82392013-02-18 Yao Qi <yao@codesourcery.com>
8240
8241 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8242
8e1d55a3
PA
82432013-02-14 Pedro Alves <palves@redhat.com>
8244
8245 Plug memory leak.
8246
8247 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8248 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8249
458820da
PA
82502013-02-14 Pedro Alves <palves@redhat.com>
8251
8252 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8253
baea0dae
PA
82542013-02-14 Pedro Alves <palves@redhat.com>
8255
8256 * tracepoint.c (save_string): Delete.
8257 (add_tracepoint_action): Use savestring instead of save_string.
8258
0b1afbb3
PA
82592013-02-12 Pedro Alves <palves@redhat.com>
8260
8261 * linux-xtensa-low.c: Ditto.
8262 * xtensa-xtregs.c: Ditto.
8263
8a4ac37e
PA
82642013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8265
8266 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8267 thread_db.
8268
148de6bb
MS
82692013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8270
8271 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8272 aarch64_num_wp_regs and aarch64_num_bp_regs to
8273 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8274
55fac6e0
MS
82752013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8276
8277 * linux-aarch64-low.c (ps_get_thread_area): Replace
8278 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8279
176eb98c
MS
82802013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8281 Marcus Shawcroft <marcus.shawcroft@arm.com>
8282 Nigel Stephens <nigel.stephens@arm.com>
8283 Yufeng Zhang <yufeng.zhang@arm.com>
8284
8285 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8286 (aarch64.c, aarch64-without-fpu.c): New targets.
8287 * configure.srv (aarch64*-*-linux*): New.
8288 * linux-aarch64-low.c: New file.
8289
56f7af9c
MS
82902013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8291
43aaf8b6 8292 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
8293 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8294 (dequeue_one_deferred_signal, linux_resume_one_thread)
8295 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8296 (linux_tracefork_grandchild, linux_test_for_tracefork)
8297 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8298 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8299 where the argument is 0.
8300
60f662b0
YQ
83012013-01-25 Yao Qi <yao@codesourcery.com>
8302
8303 * event-loop.c: Include "queue.h".
8304 (gdb_event_p): New typedef.
8305 (struct gdb_event) <next_event>: Remove.
8306 (event_queue): Change to QUEUE(gdb_event_p).
8307 (async_queue_event): Remove.
8308 (gdb_event_xfree): New.
8309 (initialize_event_loop): New.
8310 (process_event): Use API from QUEUE.
8311 (wait_for_event): Likewise.
8312 * server.c (main): Call initialize_event_loop.
8313 * server.h (initialize_event_loop): Declare.
8314
5ae4861a
YQ
83152013-01-18 Yao Qi <yao@codesourcery.com>
8316
8317 * ax.h (struct eval_agent_expr_context): New.
8318 (gdb_eval_agent_expr): Update declaration.
8319 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8320 TFRAME. Add new argument CTX.
8321 * server.h (struct eval_agent_expr_context): Declare.
8322 (agent_mem_read, agent_tsv_read): Update declaration.
8323 (agent_mem_read_string): Likewise.
8324 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8325 (add_traceframe_block): Add new argument TPOINT.
8326 Increase TPOINT->traceframe_usage.
8327 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8328 eval_tracepoint_agent_expr.
8329 (condition_true_at_tracepoint): Likewise.
8330 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8331 (agent_mem_read_string, agent_tsv_read): Likewise.
8332
85e00e85
YQ
83332013-01-16 Yao Qi <yao@codesourcery.com>
8334
8335 * linux-low.c (linux_resume_one_lwp): Don't check
8336 'lwp->bp_reinsert != 0'.
8337
4039cf45
JB
83382013-01-07 Joel Brobecker <brobecker@adacore.com>
8339 Pedro Alves <palves@redhat.com>
8340
8341 * lynx-low.c (ptrace_request_to_str): Define a temporary
8342 macro and use it to simplify this function's implementation.
8343
9044dee2
JB
83442013-01-07 Joel Brobecker <brobecker@adacore.com>
8345
8346 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8347 sets errno.
8348
e6352c8f
JB
83492013-01-07 Joel Brobecker <brobecker@adacore.com>
8350
8351 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8352
50681a27
JB
83532013-01-07 Joel Brobecker <brobecker@adacore.com>
8354
8355 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8356
3f6e77ef
JB
83572013-01-07 Joel Brobecker <brobecker@adacore.com>
8358
8359 * lynx-low.c (lynx_resume): Use the resume_info parameter
8360 to determine the ptid for the lynx_ptrace call, unless
8361 it is equal to minus_one_ptid, in which case we use the
8362 ptid of the current_inferior.
8363 (lynx_wait_1): After having received a thread create/exit
8364 event, resume the inferior's execution using the signaling
8365 thread's ptid, rather than the old ptid.
8366
7fda33ae
JB
83672013-01-07 Joel Brobecker <brobecker@adacore.com>
8368
8369 * lynx-low.c (lynx_resume): Delete variable ret.
8370
b9786c74
JB
83712013-01-01 Joel Brobecker <brobecker@adacore.com>
8372
8373 * gdbreplay.c (gdbreplay_version): Update copyright year.
8374 * server.c (gdbserver_version): Likewise.
8375
8b93d60f
JB
83762012-12-17 Joel Brobecker <brobecker@adacore.com>
8377
8378 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8379 new thread.
8380
037335a7
JB
83812012-12-17 Joel Brobecker <brobecker@adacore.com>
8382
8383 * lynx-low.c (ptrace_request_to_str): Add handling for
8384 PTRACE_GETTRACESIG.
8385
52d4cbd8
JB
83862012-12-17 Joel Brobecker <brobecker@adacore.com>
8387
8388 * lynx-low.c (lynx_attach): Delete variable new_process.
8389
ab8f6ca9
JB
83902012-12-17 Joel Brobecker <brobecker@adacore.com>
8391
8392 * lynx-low.c (lynx_create_inferior): Delete variable
8393 new_process.
8394
78cbc024
JB
83952012-12-17 Joel Brobecker <brobecker@adacore.com>
8396
8397 * lynx-low.c (ptrace_request_to_str): Do not handle
8398 PTRACE_GETTHREADLIST if this macro does not exist.
8399
14a00470
YQ
84002012-12-15 Yao Qi <yao@codesourcery.com>
8401
8402 * Makefile.in (OBS): Add notif.o.
8403 * notif.c, notif.h: New.
8404 * server.c: Include "notif.h".
8405 (struct vstop_notif) <next>: Remove.
8406 <base>: New field.
8407 (queue_stop_reply): Update.
8408 (push_event, send_next_stop_reply): Remove.
8409 (discard_queued_stop_replies): Update.
8410 (notif_stop): New variable.
8411 (handle_v_stopped): Remove.
8412 (handle_v_requests): Don't call handle_v_stopped. Call
8413 handle_ack_notif instead.
8414 (queue_stop_reply_callback): Call notif_event_enque instead
8415 of queue_stop_reply.
8416 (handle_status): Don't call send_next_stop_reply, call
8417 notif_write_event instead.
8418 (kill_inferior_callback): Likewise.
8419 (detach_or_kill_inferior_callback): Likewise.
8420 (main): Call initialize_notif.
8421 (process_serial_event): Call QUEUE_is_empty.
8422 (handle_target_event): Call notif_push instead of push event.
8423 * server.h (push_event): Remove declaration.
8424
61c125b9
TT
84252012-12-10 Tom Tromey <tromey@redhat.com>
8426
8427 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8428 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8429 macros.
8430 (.c.o): Rewrite.
8431 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8432 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8433 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8434 (amd64-linux-ipa.o, ax.o): Rewrite.
8435 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8436 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8437 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8438 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8439 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8440 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8441 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8442 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8443 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8444 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8445 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8446 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8447 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8448 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8449 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8450 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8451 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8452 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8453 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8454 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8455 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8456 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8457 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8458 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8459 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8460 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8461 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8462 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8463 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8464 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8465 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8466 (reg-tilegx.o): Remove.
8467 (all_object_files): New macro.
8468 Include .deps files.
8469 * aclocal.m4, configure: Rebuild.
8470 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8471 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8472 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8473
e90e9ad9
TT
84742012-12-05 Tom Tromey <tromey@redhat.com>
8475
8476 PR gdb/14917:
8477 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8478
02d403bf 84792012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
8480
8481 * configure.ac: Check for linux/perf_event.h.
8482 * config.in: Regenerated.
8483 * configure: Regenerated.
8484
0270a750
PA
84852012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8486
8487 * hostio.c (handle_readlink): Decrease buffer size
8488 parameter passed to readlink by one byte.
8489
8c29b58e
YQ
84902012-11-26 Yao Qi <yao@codesourcery.com>
8491
8492 * configure.ac (build_warnings): Append '-Wempty-body'.
8493 * configure: Regenerated.
8494 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8495 body.
8496
8bdce1ff
PM
84972012-11-15 Pierre Muller <muller@sourceware.org>
8498
8499 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8500 * config.in: Regenerate.
8501 * configure: Regenerate.
8502 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8503 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8504 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8505 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8506 header.
8507 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8508 instead of <sys/wait.h> header.
8509 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8510
02d403bf 85112012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
8512
8513 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8514 (various make rules): Remove -DGDBSERVER
8515
fbd5db48
YQ
85162012-11-09 Yao Qi <yao@codesourcery.com>
8517
8518 * spu-low.c (current_ptid): Move it to ..
8519 * gdbthread.h: ... here. New.
8520 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8521 * server.c (myresume, process_serial_event): Likewise.
8522 * thread-db.c (thread_db_find_new_threads): Likewise.
8523 * tracepoint.c (run_inferior_command): Likewise.
8524
b3dc46ff
AB
85252012-10-01 Andrew Burgess <aburgess@broadcom.com>
8526
8527 * server.c (handle_search_memory_1): Include access length in
8528 warning message.
8529
07c04788
HPN
85302012-09-05 Michael Brandt <michael.brandt@axis.com>
8531
8532 * linux-crisv32-low.c: Fix compile errors.
8533
918d227b
YQ
85342012-09-04 Yao Qi <yao@codesourcery.com>
8535
8536 * tracepoint.c (cmd_qtsv): Adjust debug message.
8537 Don't check CUR_TPOINT.
8538
18c1b81a
YQ
85392012-08-28 Yao Qi <yao@codesourcery.com>
8540
8541 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8542 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8543 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8544 Remove declarations of xmalloc, xreallloc, xstrdup and
8545 freeargv.
8546 * Makefile.in (libiberty_h): New.
8547 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8548 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8549
dc82f37b
YQ
85502012-08-23 Yao Qi <yao@codesourcery.com>
8551
8552 * server.h: Remove declaration of 'xsnprintf'.
8553
406b1477
KS
85542012-08-22 Keith Seitz <keiths@redhat.com>
8555
8556 * server.h: Include build-gnulib-gbserver/config.h.
8557 * gdbreplay.c: Likewise.
8558
e6712ff1
DE
85592012-08-08 Doug Evans <dje@google.com>
8560
8561 * Makefile.in (SFILES): Add gdb_vecs.c.
8562 (OBS): Add gdb_vecs.o.
8563 (gdb_vecs_h, host_defs_h): New variables.
8564 (thread-db.o): Add $(gdb_vecs_h) dependency.
8565 (gdb_vecs.o): New rule.
8566 * thread-db.c: #include "gdb_vecs.h".
8567 (thread_db_load_search): Use a vector to iterate over path elements.
8568 Handle text appearing after "$pdir".
8569
8570 * configure.ac: Add check for strstr.
8571 * config.in: Regenerate.
8572 * configure: Regenerate.
8573
7c3270ae
UW
85742012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8575
8576 * hostio.c (handle_pread): If pread fails, fall back to attempting
8577 lseek/read.
8578 (handle_pwrite): Likewise for pwrite.
8579
b62e2b27
UW
85802012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8581
8582 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8583 between unsupported TYPE and unimplementable ADDR/LEN combination.
8584 (arm_insert_point): Act on new return value.
8585
78a99e91
PA
85862012-07-31 Pedro Alves <palves@redhat.com>
8587
8588 * server.c (process_point_options): Only skip tokens if we find
8589 one that is unrecognized. Don't treat 'X' specially while
8590 skipping unrecognized tokens.
8591
fcf303ab
UW
85922012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8593
8594 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8595 to 4-byte-align HW breakpoint addresses for Thumb.
8596
7255706c
YQ
85972012-07-27 Yao Qi <yao@codesourcery.com>
8598
8599 PR remote/14161.
8600
8601 * server.h: Declare gdb_agent_about_to_close.
8602 * target.c (kill_inferior): Include "agent.h".
8603 New. Send command 'kill'.
8604 * target.h (kill_inferior): Removed macro.
8605 * tracepoint.c (gdb_agent_about_to_close): New.
8606 (gdb_agent_helper_thread): Handle command 'close'.
8607 Wait endlessly until the inferior stops.
8608 Install gdb_agent_remove_socket to atexit hook.
8609 (agent_socket_name): New static variable.
8610 (gdb_agent_socket_init): Replace local variable 'name' with
8611 'agent_socket_name'.
8612 (gdb_agent_remove_socket): New.
8613
5a3f286f
YQ
86142012-07-27 Yao Qi <yao@codesourcery.com>
8615
8616 * server.c (process_point_options): Stop at 'X' when parsing.
8617
961bd387
ME
86182012-07-19 Michael Eager <eager@eagercon.com>
8619
a261b8f5 8620 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
8621 to hw_execute.
8622 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8623 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8624 hardware breakpoint.
8625
aa7c7447
JK
86262012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8627
8628 * gdbserver/linux-low.c (initialize_low): Call
8629 linux_ptrace_init_warnings.
8630
7f216e7c
DE
86312012-07-02 Doug Evans <dje@google.com>
8632
8633 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8634 pointer to int.
8635
d3ce09f5
SS
86362012-07-02 Stan Shebs <stan@codesourcery.com>
8637
8638 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8639 (ax.o): Add it to build rule.
8640 (ax-ipa.o): Ditto.
8641 (OBS): Add format.o.
8642 (IPA_OBS): Add format.o.
8643 * server.c (handle_query): Claim support for breakpoint commands.
8644 (process_point_options): Add command case.
8645 (process_serial_event): Leave running if there are printfs in
8646 effect.
8647 * mem-break.h (any_persistent_commands): Declare.
8648 (add_breakpoint_commands): Declare.
8649 (gdb_no_commands_at_breakpoint): Declare.
8650 (run_breakpoint_commands): Declare.
8651 * mem-break.c (struct point_command_list): New struct.
8652 (struct breakpoint): New field command_list.
8653 (any_persistent_commands): New function.
8654 (add_commands_to_breakpoint): New function.
8655 (add_breakpoint_commands): New function.
8656 (gdb_no_commands_at_breakpoint): New function.
8657 (run_breakpoint_commands): New function.
8658 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8659 locally.
8660 * ax.c: Include format.h.
8661 (ax_printf): New function.
8662 (gdb_eval_agent_expr): Add printf opcode.
8663
2f8f6aed
YQ
86642012-06-13 Yao Qi <yao@codesourcery.com>
8665
8666 * server.c (start_inferior): Remove duplicated writes to fields
8667 'last_resume_kind' and 'last_status' of 'current_inferior'.
8668
0c9070b3
YQ
86692012-06-12 Yao Qi <yao@codesourcery.com>
8670 Pedro Alves <palves@redhat.com>
8671
8672 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8673 comment.
8674 * server.c (handle_v_cont): Extend comment.
8675
c52daf70
YQ
86762012-06-11 Yao Qi <yao@codesourcery.com>
8677
8678 * linux-low.c (linux_attach): Add 'static'.
8679
d38bbb0a
YQ
86802012-06-06 Yao Qi <yao@codesourcery.com>
8681
8682 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8683
89dc0afd
JK
86842012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8685
8686 Fix gcc -flto compilation warning.
8687 * server.c (main): Make variable multi_mode and attach volatile.
8688
75f62ce7
TJB
86892012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8690
8691 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8692 if the platform doesn't know about it.
8693
65f479b6
PA
86942012-05-30 Jeff Kenton <jkenton@tilera.com>
8695
8696 * Makefile.in (SFILES): Add linux-tile-low.c.
8697 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8698 * configure.srv: Handle tilegx-*-linux*.
8699 * linux-tile-low.c: New file.
8700
0c5bf5a9
JK
87012012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8702
8703 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8704
a493e3e2
PA
87052012-05-24 Pedro Alves <palves@redhat.com>
8706
8707 PR gdb/7205
8708
43aaf8b6 8709 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 8710
2ea28649
PA
87112012-05-24 Pedro Alves <palves@redhat.com>
8712
8713 PR gdb/7205
8714
8715 Replace target_signal with gdb_signal throughout.
8716
8d409d16
MR
87172012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8718
8719 * linux-low.c (linux_store_registers): Avoid the copying sequence
8720 when no data has been retrieved by ptrace.
8721
23512c01
MGD
87222012-05-22 Will Deacon <will.deacon@arm.com>
8723
8724 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8725 Include asm/ptrace.h.
8726 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8727 already defined.
8728
4934b29e
MR
87292012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8730
8731 * linux-low.c (linux_store_registers): Don't re-retrieve data
8732 with ptrace that has already been obtained from /proc. Always
8733 copy any data retrieved with ptrace to the buffer supplied.
8734
bde24c0a
PA
87352012-05-11 Yao Qi <yao@codesourcery.com>
8736 Pedro Alves <palves@redhat.com>
8737
8738 * linux-low.c (enum stopping_threads_kind): New.
8739 (stopping_threads): Change type to `enum stopping_threads_kind'.
8740 (handle_extended_wait): If stopping and suspending threads, leave
8741 the new_lwp suspended too.
8742 (linux_wait_for_event): Adjust.
8743 (stop_all_lwps): Set `stopping_threads' to
8744 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8745 whether we're suspending threads or just stopping them. Assert no
8746 recursion happens.
8747
623b6bdf
YQ
87482012-04-29 Yao Qi <yao@codesourcery.com>
8749
8750 * server.h: Move some code to ...
8751 * gdbthread.h: ... here. New.
8752 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8753 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8754 (nto-low.o, win32-low.o): Likewise.
8755 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8756 * regcache.c, remote-utils.c, server.c: Likewise.
8757 * target.c, tracepoint.c, win32-low.c: Likewise.
8758
f15f9948
TJB
87592012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8760
8761 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8762 (PTRACE_ARG4_TYPE): Likewise.
8763 (PTRACE_XFER_TYPE): Likewise.
8764 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8765 ptrace to PTRACE_ARG3_TYPE.
8766 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8767 (PTRACE_ARG4_TYPE): Likewise.
8768 (PTRACE_XFER_TYPE): Likewise.
8769 (linux_detach_one_lwp): Cast fourth argument of
8770 ptrace to long then PTRACE_ARG4_TYPE.
8771 (regsets_fetch_inferior_registers): Cast third argument of
8772 ptrace to long then PTRACE_ARG3_TYPE.
8773 (regsets_store_inferior_registers): Likewise.
8774
38ea300a
PA
87752012-04-20 Pedro Alves <palves@redhat.com>
8776
8777 * configure: Regenerate.
8778
c971b7fa
PA
87792012-04-19 Pedro Alves <palves@redhat.com>
8780
43aaf8b6 8781 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 8782 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
8783 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8784 (all, install-only, uninstall, clean-info, all-lib, clean): No
8785 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8786 (maintainer-clean realclean distclean): Use subdir_do.
8787 (subdir_do): New.
8788 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 8789 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
8790 * acinclude.m4: Include acx_configure_dir.m4.
8791 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8792 calls. Call AC_PROG_RANLIB. Configure gnulib using
8793 ACX_CONFIGURE_DIR.
8794 (GNULIB): New.
8795 (GNULIB_STDINT_H): Adjust.
8796 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8797 * gdbreplay.c: Include build-gnulib/config.h.
8798 * server.h: Likewise.
8799 * aclocal.m4: Regenerate.
8800 * config.in: Regenerate.
8801 * configure: Regenerate.
c971b7fa 8802
809277f8
PA
88032012-04-19 Pedro Alves <palves@redhat.com>
8804
8805 * Makefile.in (LIBGNU, INCGNU): Adjust.
8806 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8807 (all, install-only, uninstall, clean-info, all-lib, clean)
8808 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8809 * configure.ac: Adjust AC_OUTPUT output.
8810 * aclocal.m4: Regenerate.
8811 * configure: Regenerate.
8812
fd9bb8b8
PA
88132012-04-19 Pedro Alves <palves@redhat.com>
8814
8815 * Makefile.in (generated_files): New.
8816 (server_h): Remove the explicit dependency on config.h, and depend
8817 on $generated_files.
8818
1c298c66
PA
88192012-04-19 Pedro Alves <palves@redhat.com>
8820
8821 * Makefile.in (INCGNU): Add -Ignulib.
8822
57c4b50b
PA
88232012-04-19 Pedro Alves <palves@redhat.com>
8824
8825 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8826 (INCGNU): ... this, and spell out -I here.
8827 (GNULIB_LIB): Rename to ...
8828 (LIBGNU): ... this.
8829 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8830
1030e047
PA
88312012-04-19 Pedro Alves <palves@redhat.com>
8832
8833 * config.in: Regenerate.
8834
447d4319
PA
88352012-04-19 Pedro Alves <palves@redhat.com>
8836
8837 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8838 * server.h (memmem): Remove declaration.
8839 * config.in: Regenerate.
8840 * configure: Regenerate.
8841
aad9eab9
YQ
88422012-04-19 Yao Qi <yao@codesourcery.com>
8843
8844 * Makefile.in (SFILES): Add common/vec.c.
8845 (OBS): Add vec.o.
8846 (vec.o): New rule.
8847
3e10640f
YQ
88482012-04-19 Yao Qi <yao@codesourcery.com>
8849
8850 * remote-utils.c (prepare_resume_reply): Replace with macro
8851 target_core_of_thread.
8852 * server.c (handle_qxfer_threads_proper): Likewise.
8853 * target.h (traget_core_of_thread): New macro.
8854
71622373
PA
88552012-04-18 Pedro Alves <palves@redhat.com>
8856
8857 * aclocal.m4: Regenerate.
8858 * configure: Regenerate.
8859
80d26939
YQ
88602012-04-16 Yao Qi <yao@codesourcery.com>
8861
8862 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8863 duplicated on address.
8864
42476b70
YQ
88652012-04-16 Yao Qi <yao@codesourcery.com>
8866
8867 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8868 (struct tracepoint_action_ops) <send>: New field.
8869 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8870 (agent_expr_send, x_tracepoint_action_send): New.
8871 (l_tracepoint_action_send): New.
8872 (cmd_qtdp): Download and install tracepoint
8873 according to `use_agent'.
8874 (run_inferior_command): Add one more parameter `len'.
8875 Update callers.
8876 (tracepoint_send_agent): New.
8877 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8878
7bc83639
YQ
88792012-04-16 Yao Qi <yao@codesourcery.com>
8880
8881 * tracepoint.c (download_tracepoints): Moved to ...
8882 (cmd_qtstart): ... here.
8883
5f18041e
YQ
88842012-04-14 Yao Qi <yao@codesourcery.com>
8885
8886 * tracepoint.c: Include inttypes.h.
8887 (struct collect_memory_action): Use sized types.
8888 (struct tracepoint): Likewise.
8889 (cmd_qtdp, stop_tracing): Update print specifiers.
8890 (cmd_qtp, response_tracepoint): Likewise.
8891 (collect_data_at_tracepoint): Likewise.
8892 (collect_data_at_step): Likewise.
8893
55a8c076
YQ
88942012-04-14 Yao Qi <yao@codesourcery.com>
8895
8896 Import gnulib module inttypes.
8897 * aclocal.m4, config.in, configure: Regenerated.
8898
dc750257
YQ
88992012-04-14 Yao Qi <yao@codesourcery.com>
8900
8901 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8902 Makefile and config.status at last.
8903
0ab5faf9
YQ
89042012-04-13 Yao Qi <yao@codesourcery.com>
8905
8906 * tracepoint.c: Include stdint.h unconditionally.
8907
18f5fd81
TJB
89082012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8909
8910 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8911 on BFD_HAVE_SYS_PROCFS_TYPE.
8912 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8913 * configure: Regenerate.
8914 * config.in: Likewise.
8915
4d47af5c
L
89162012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8917
8918 * Makefile.in (clean): Also remove x32.c x32-linux.c
8919 x32-avx.c x32-avx-linux.c.
8920 (x32.o): New target.
8921 (x32.c): Likewise.
8922 (x32-linux.o): Likewise.
8923 (x32-linux.c): Likewise.
8924 (x32-avx.o): Likewise.
8925 (x32-avx.c): Likewise.
8926 (x32-avx-linux.o): Likewise.
8927 (x32-avx-linux.c): Likewise.
8928
8929 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8930 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8931 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8932 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8933 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8934 i386/x32-avx-linux.xml.
8935
8936 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8937 (init_registers_x32_avx_linux): Likwise.
8938 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8939 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8940
ecedbe58
PA
89412012-04-13 Pedro Alves <palves@redhat.com>
8942
8943 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8944 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8945 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8946 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8947 the sub-make.
8948
c92b5177
L
89492012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8950
8951 * linux-x86-low.c (compat_x32_clock_t): New.
8952 (compat_x32_siginfo_t): Likewise.
8953 (compat_x32_siginfo_from_siginfo): Likewise.
8954 (siginfo_from_compat_x32_siginfo): Likewise.
8955 (linux_is_elf64): Likewise.
8956 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8957 and siginfo_from_compat_x32_siginfo for x32.
8958 (x86_arch_setup): Set linux_is_elf64.
8959
214d508e
L
89602012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8961
8962 PR gdb/13969
8963 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8964 e_machine field.
8965 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8966 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8967 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8968 compatible with process.
8969
c9a1864a
YQ
89702012-04-12 Yao Qi <yao@codesourcery.com>
8971
8972 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8973 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8974 (install-only, install-info, clean): Handle sub dir gnulib.
8975 (all-lib, am--refresh): New targets.
8976 (memmem.o): Remove target.
8977 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8978 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8979 (AC_REPLACE_FUNCS): Remove memmem.
8980 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8981 (AC_OUTPUT): Generate Makefile in gnulib/.
8982 * aclocal.m4, config.in, configure: Regenerated.
8983
367ba2c2
MR
89842012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8985
8986 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8987
9d236627
PA
89882012-04-05 Pedro Alves <palves@redhat.com>
8989
8990 -Werror=strict-aliasing
8991
8992 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8993 pointer.
8994
111217b3
PA
89952012-04-04 Pedro Alves <palves@redhat.com>
8996
8997 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8998 (sparc_store_gregset_from_stack, sparc_store_gregset)
8999 (sparc_breakpoint_at): Fix formatting.
9000
8365dcf5
TJB
90012012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9002
9003 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9004 are available.
9005 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9006 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9007 * config.in: Regenerate.
9008 * configure: Likewise.
9009
689cc2ae
PA
90102012-03-29 Pedro Alves <palves@redhat.com>
9011
9012 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9013 Correct ptrace arguments.
9014
c14dfd32
PA
90152012-03-28 Pedro Alves <palves@redhat.com>
9016
9017 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9018 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9019 (IA64_FR1_REGNUM): New defines.
9020 (ia64_fetch_register): New.
9021 (the_low_target): Install it.
9022 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9023 field.
9024 * linux-low.c (linux_fetch_registers): Try the
9025 the_low_target.fetch_register hook first.
9026
9027 * linux-arm-low.c (the_low_target): Adjust.
9028 * linux-bfin-low.c (the_low_target): Adjust.
9029 * linux-cris-low.c (the_low_target): Adjust.
9030 * linux-crisv32-low.c (the_low_target): Adjust.
9031 * linux-m32r-low.c (the_low_target): Adjust.
9032 * linux-m68k-low.c (the_low_target): Adjust.
9033 * linux-mips-low.c (the_low_target): Adjust.
9034 * linux-ppc-low.c (the_low_target): Adjust.
9035 * linux-s390-low.c (the_low_target): Adjust.
9036 * linux-sh-low.c (the_low_target): Adjust.
9037 * linux-sparc-low.c (the_low_target): Adjust.
9038 * linux-tic6x-low.c (the_low_target): Adjust.
9039 * linux-x86-low.c (the_low_target): Adjust.
9040 * linux-xtensa-low.c (the_low_target): Adjust.
9041
63c88e13
PA
90422012-03-26 Pedro Alves <palves@redhat.com>
9043
9044 * server.c (handle_qxfer_libraries): Don't bail early if
9045 the_target->qxfer_libraries_svr4 is not NULL.
9046
fb723180
PA
90472012-03-26 Pedro Alves <palves@redhat.com>
9048
9049 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9050
0afae3cf
PA
90512012-03-23 Pedro Alves <palves@redhat.com>
9052
9053 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9054 "library-list-svr4" element's start tag when the the DSO list is
9055 empty.
9056
485f1ee4
PA
90572012-03-23 Pedro Alves <palves@redhat.com>
9058
9059 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9060 a variable whose type size is the same as the inferior's pointer
9061 size.
9062
a5362b9a
TS
90632012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9064
9065 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9066 struct siginfo.
9067 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9068 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9069 * linux-low.h: Include <signal.h>.
9070 (struct siginfo): Remove forward declaration.
9071 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9072 struct siginfo.
9073
d226c142
MF
90742012-03-21 Mike Frysinger <vapier@gentoo.org>
9075
9076 * .gitignore: Ignore more files.
9077
122f36ef
PA
90782012-03-19 Pedro Alves <palves@redhat.com>
9079 Jan Kratochvil <jan.kratochvil@redhat.com>
9080
9081 * server.c (cont_thread, general_thread): Add describing comments.
9082 (start_inferior): Clear `cont_thread'.
9083 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9084 of a process.
9085
fc3e5175
YQ
90862012-03-15 Yao Qi <yao@codesourcery.com>
9087
9088 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9089 handling to ...
9090 (cmd_qtdp): ... here.
9091
8d0d92cd
YQ
90922012-03-15 Yao Qi <yao@codesourcery.com>
9093
9094 * tracepoint.c (struct tracepoint_action_ops): New.
9095 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9096 (m_tracepoint_action_download): New.
9097 (r_tracepoint_action_download): New.
9098 (x_tracepoint_action_download): New.
9099 (l_tracepoint_action_download): New.
9100 (add_tracepoint_action): Install `action->ops' according type.
9101 (download_tracepoint_1): Move code `download' function pointer
9102 of various tracepoint_action_ops.
9103
87b0bb13
JK
91042012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9105
9106 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9107 linux_ptrace_attach_warnings.
9108
5f572dec
JK
91092012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9110
9111 * Makefile.in (linux-ptrace.o): New.
9112 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9113 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9114 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9115 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9116 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9117 of these targets.
9118 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9119
f4647387
YQ
91202012-03-08 Yao Qi <yao@codesourcery.com>
9121 Pedro Alves <palves@redhat.com>
9122
9123 Fix PR server/13392.
9124 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9125 offset of JMP insn.
9126 * tracepoint.c (remove_tracepoint): New.
9127 (cmd_qtdp): Call remove_tracepoint when failed to install.
9128
9b224c5e
PA
91292012-03-07 Pedro Alves <palves@redhat.com>
9130
9131 * linux-low.c (get_detach_signal): New.
9132 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9133 Pass on pending signals to PTRACE_DETACH. Check the result of the
9134 ptrace call.
9135 * server.c (program_signals, program_signals_p): New.
9136 (handle_general_set): Handle QProgramSignals.
9137 * server.h (program_signals, program_signals_p): Declare.
9138
e237a7e2
JK
91392012-03-05 Pedro Alves <palves@redhat.com>
9140 Jan Kratochvil <jan.kratochvil@redhat.com>
9141
9142 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9143 New comment why.
9144
5808517f
YQ
91452012-03-03 Yao Qi <yao@codesourcery.com>
9146
9147 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9148 agent_look_up_symbols.
9149
58b4daa5
YQ
91502012-03-03 Yao Qi <yao@codesourcery.com>
9151
9152 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9153 (linux-x86-low.o): Likewise.
9154 * server.h: Remove in_process_agent_loaded.
9155 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9156 common/agent.c.
9157 Update callers.
9158
8ffcbaaf
YQ
91592012-03-03 Yao Qi <yao@codesourcery.com>
9160
9161 * tracepoint.c (gdb_agent_capability): New global.
9162 (in_process_agent_loaded_ust): Renamed to
9163 `in_process_agent_supports_ust'.
9164 Update callers.
9165 (in_process_agent_supports_ust): Call agent_capability_check.
9166 (clear_installed_tracepoints): Assert that agent supports
9167 agent.
9168
d1feda86
YQ
91692012-03-03 Yao Qi <yao@codesourcery.com>
9170
9171 * linux-low.c (linux_supports_agent): New.
9172 (linux_target_ops): Initialize field `supports_agent' with
9173 linux_supports_agent.
9174 * target.h (struct target_ops) <supports_agent>: New.
9175 (target_supports_agent): New macro.
9176 * server.c (handle_general_set): Handle packet 'QAgent'.
9177 (handle_query): Send `QAgent+'.
9178 * Makefile.in (server.o): Depends on agent.h.
9179
2fa291ac
YQ
91802012-03-03 Yao Qi <yao@codesourcery.com>
9181
9182 * Makefile.in (OBS): Add agent.o.
9183 Add new rule for agent.o.
9184 Track dependence of tracepoint.c on agent.h.
9185 * tracepoint.c (run_inferior_command_1):
9186 (run_inferior_command): Call agent_run_command.
9187 (gdb_ust_connect_sync_socket): Deleted. Move it to
9188 common/agent.c.
9189 (resume_thread, stop_thread): Likewise.
9190 (gdb_ust_socket_init): Renamed to ...
9191 (gdb_agent_socket_init): ... New.
9192 (gdb_ust_thread): Renamed to ...
9193 (gdb_agent_helper_thread): ... New.
9194 (gdb_ust_init): Move some code to ...
9195 (gdb_agent_init): ... here. New.
9196 [HAVE_UST]: Call gdb_ust_init.
9197 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9198 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9199 * config.in, configure: Regenerated.
9200
05044653
PA
92012012-03-02 Pedro Alves <palves@redhat.com>
9202
9203 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9204 * linux-low.c (struct simple_pid_list): New.
9205 (stopped_pids): New a struct simple_pid_list pointer.
9206 (add_to_pid_list, pull_pid_from_list): New.
9207 (handle_extended_wait): Don't assume the first signal new children
9208 report is SIGSTOP. Adjust call to pull_pid_from_list.
9209 (linux_wait_for_lwp): Adjust.
9210
8d00225b
YQ
92112012-03-02 Yao Qi <yao@codesourcery.com>
9212
9213 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9214 debug log.
9215
19560ba5
YQ
92162012-03-02 Yao Qi <yao@codesourcery.com>
9217
9218 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9219 `stop_pc' and `tpoint'. Update caller.
9220
1faeff08
MR
92212012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9222
9223 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9224 * linux-low.c (use_linux_regsets): New macro.
9225 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9226 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9227 (linux_register_in_regsets): New function.
9228 (usr_fetch_inferior_registers): Skip registers covered by
9229 regsets.
9230 (usr_store_inferior_registers): Likewise.
9231 (usr_fetch_inferior_registers): New macro.
9232 (usr_store_inferior_registers): Likewise.
9233 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9234 (linux_store_registers): Likewise.
9235 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9236 prototype.
9237 (init_registers_mips64_dsp_linux): Likewise.
9238 (init_registers_mips_linux): New macro.
9239 (init_registers_mips_dsp_linux): Likewise.
9240 (mips_dsp_num_regs): Likewise.
9241 (DSP_BASE, DSP_CONTROL): New fallback macros.
9242 (mips_base_regs): New macro.
9243 (mips_regmap): Use it. Fix the size.
9244 (mips_dsp_regmap): New variable.
9245 (mips_dsp_regset_bitmap): Likewise.
9246 (mips_arch_setup): New function.
9247 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9248 than mips_regmap.
9249 (mips_cannot_store_register): Likewise.
9250 (the_low_target): Update .arch_setup, .num_regs and .regmap
9251 initializers. Add .regset_bitmap initializer.
9252 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9253 initializer.
9254 * linux-bfin-low.c (the_low_target): Likewise.
9255 * linux-cris-low.c (the_low_target): Likewise.
9256 * linux-crisv32-low.c (the_low_target): Likewise.
9257 * linux-ia64-low.c (the_low_target): Likewise.
9258 * linux-m32r-low.c (the_low_target): Likewise.
9259 * linux-m68k-low.c (the_low_target): Likewise.
9260 * linux-ppc-low.c (the_low_target): Likewise.
9261 * linux-s390-low.c (the_low_target): Likewise.
9262 * linux-sh-low.c (the_low_target): Likewise.
9263 * linux-sparc-low.c (the_low_target): Likewise.
9264 * linux-tic6x-low.c (the_low_target): Likewise.
9265 * linux-x86-low.c (the_low_target): Likewise.
9266 * linux-xtensa-low.c (the_low_target): Likewise.
9267 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9268 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9269 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9270 srv_xmlfiles.
9271 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9272 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9273
c03e6ccc
YQ
92742012-02-29 Yao Qi <yao@codesourcery.com>
9275 Pedro Alves <palves@redhat.com>
9276
9277 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9278 `step_over_finished' is true.
9279
644cebc9
PA
92802012-02-27 Pedro Alves <palves@redhat.com>
9281
9282 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9283 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9284
c14d7ab2
PA
92852012-02-27 Pedro Alves <palves@redhat.com>
9286
9287 PR server/9684
9288 * linux-low.c (pid_is_stopped): New.
9289 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9290
412c89dd
LM
92912012-02-25 Luis Machado <lgustavo@codesourcery.com>
9292
9293 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9294 of conditions.
9295
b745defe
MR
92962012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9297
9298 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9299
9f3a5c85
LM
93002012-02-24 Luis Machado <lgustavo@codesourcery>
9301
9302 * server.c (handle_query): Advertise support for target-side
9303 breakpoint condition evaluation.
9304 (process_point_options): New function.
9305 (process_serial_event): When inserting a breakpoint, check for
9306 a target-side condition that should be evaluated.
9307
9308 * mem-break.c: Include regcache.h and ax.h.
9309 (point_cond_list_t): New data structure.
9310 (breakpoint) <cond_list>: New field.
9311 (find_gdb_breakpoint_at): Make non-static.
9312 (delete_gdb_breakpoint_at): Clear any target-side
9313 conditions.
9314 (clear_gdb_breakpoint_conditions): New function.
9315 (add_condition_to_breakpoint): Likewise.
9316 (add_breakpoint_condition): Likewise.
9317 (gdb_condition_true_at_breakpoint): Likewise.
9318 (gdb_breakpoint_here): Return result directly instead
9319 of going through a local variable.
9320
9321 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9322 (clear_gdb_breakpoint_conditions): Likewise.
9323 (add_breakpoint_condition): Likewise.
9324 (gdb_condition_true_at_breakpoint): Likewise.
9325
9326 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9327 (need_step_over_p): Take target-side breakpoint condition into
9328 consideration.
9329
5e1dc496
LM
93302012-02-24 Luis Machado <lgustavo@codesourcery>
9331
9332 * server.h: Include tracepoint.h.
9333 (agent_mem_read, agent_get_trace_state_variable_value,
9334 agent_set_trace_state_variable_value,
9335 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9336 get_set_tsv_func_addr): New prototypes.
9337
9338 * ax.h: New include file.
9339 * ax.c: New source file.
9340
9341 * tracepoint.c: Include ax.h.
9342 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9343 agent_expr, eval_result_type): Move to ax.h.
9344 (parse_agent_expr): Rename to ...
9345 (gdb_parse_agent_expr): ... this, make it non-static and move
9346 to ax.h.
9347 (unparse_agent_expr) Rename to ...
9348 (gdb_unparse_agent_expr): ... this, make it non-static and move
9349 to ax.h.
9350 (eval_agent_expr): Rename to ...
9351 (eval_tracepoint_agent_expr): ... this.
9352 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9353 forward declarations.
9354 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9355 (agent_get_trace_state_variable_value): New function.
9356 (agent_set_trace_state_variable_value): New function.
9357 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9358 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9359 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9360 (condition_true_at_tracepoint): Likewise.
9361 (parse_agent_expr): Rename to ...
9362 (gdb_parse_agent_expr): ... this and move to ax.c.
9363 (unparse_agent_expr): Rename to ...
9364 (gdb_unparse_agent_expr): ... this and move to ax.c.
9365 (gdb_agent_op_name): Move to ax.c.
9366 (eval_agent_expr): Rename to ...
9367 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9368 and move to ax.c.
9369 (eval_tracepoint_agent_expr): New function.
9370 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 9371 non-static.
5e1dc496
LM
9372 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9373 ax.c.
9374 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9375 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9376 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9377 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9378 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9379 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9380 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9381 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9382 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9383 (compile_bytecodes): Remove forward declaration.
9384 (is_goto_target): Move to ax.c.
9385 (compile_bytecodes): Move to ax.c and call
9386 agent_get_trace_state_variable_value (...) and
9387 agent_set_trace_state_variable_value (...).
9388
9389 * Makefile.in: Update ax.c and IPA dependencies.
9390
277e4e52
PA
93912012-02-24 Pedro Alves <palves@redhat.com>
9392
9393 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9394 (cmd_bigqtbuffer_circular): ... this. Only handle
9395 'QTBuffer:circular:'.
9396 (handle_tracepoint_general_set): Adjust.
9397
bf4c19f7
YQ
93982012-02-16 Yao Qi <yao@codesourcery.com>
9399
9400 * inferiors.c: Move code to ...
9401 * dll.c: .... here. New.
9402 * server.h: Declare clear_dlls.
9403 * Makefile.in (SFILES): Add dll.c.
9404 (OBS): Add dll.o
9405 (dll.o): New rule.
9406
d73f2619
YQ
94072012-02-11 Yao Qi <yao@codesourcery.com>
9408
9409 * server.c: (handle_monitor_command): Add a new parameter
9410 `own_buf'.
9411 (handle_query): Update caller.
9412
f8255c2a
JB
94132012-02-09 Joel Brobecker <brobecker@adacore.com>
9414
9415 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9416 * configure, config.in: Regenerate.
9417 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9418 is not defined.
9419
da84f473
PA
94202012-02-02 Pedro Alves <palves@redhat.com>
9421
9422 Try SIGKILL first, then PTRACE_KILL.
9423 * linux-low.c (linux_kill_one_lwp): New.
9424 (linux_kill_one_lwp): Rename to ...
9425 (kill_one_lwp_callback): ... this. Use the new
9426 linux_kill_one_lwp.
9427
e886a173
PA
94282012-02-02 Pedro Alves <palves@redhat.com>
9429
9430 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9431 inferior.
9432
be07f1a2
PA
94332012-01-27 Pedro Alves <palves@redhat.com>
9434
9435 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9436 (elf_64_file_p): Make static.
9437 (linux_pid_exe_is_elf_64_file): New.
9438 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9439 Delete declarations.
9440 (linux_pid_exe_is_elf_64_file): Declare.
9441 * linux-x86-low.c (x86_arch_setup): Use
9442 linux_pid_exe_is_elf_64_file.
9443
d8301ad1
JK
94442012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9445
9446 * linux-low.c (linux_wait_for_event_1): Rename to ...
9447 (linux_wait_for_event): ... here and merge it with former
9448 linux_wait_for_event - new variable wait_ptid, use it.
9449 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9450
01b17894
PA
94512012-01-23 Pedro Alves <palves@redhat.com>
9452
9453 * server.c (main): Avoid yet another case of infinite loop while
9454 detaching/killing after a longjmp.
9455
e825046f
JK
94562012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9457
9458 Code cleanup.
9459 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9460
b9e7b9c3
UW
94612012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9462
9463 * hostio.c (handle_readlink): New function.
9464 (handle_vFile): Call it to handle "vFile:readlink" packets.
9465
901f9912
UW
94662012-01-20 Pedro Alves <palves@redhat.com>
9467 Ulrich Weigand <ulrich.weigand@linaro.org>
9468
9469 * server.c (handle_v_requests): Only support vAttach and vRun to
9470 start multiple processes when in extended protocol mode.
9471
fc1ab1a0
PA
94722012-01-17 Pedro Alves <palves@redhat.com>
9473
9474 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9475 memalign plus mprotect to allocate the scratch buffer.
9476
7d5d4e98
PA
94772012-01-13 Pedro Alves <palves@redhat.com>
9478
9479 * server.c (attach_inferior): Clear `cont_thread'.
9480
f128d5e9
PA
94812012-01-13 Pedro Alves <palves@redhat.com>
9482
9483 * server.c (main): Avoid infinite loop while detaching/killing
9484 after a longjmp.
9485
06db92f0
DE
94862012-01-09 Doug Evans <dje@google.com>
9487
9488 * server.c (start_inferior): Set last_ptid in --wrapper case.
9489
32d92999
YQ
94902012-01-06 Yao Qi <yao@codesourcery.com>
9491
9492 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9493 defined.
9494 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9495
5e0a92a9
YQ
94962012-01-04 Yao Qi <yao@codesourcery.com>
9497
9498 * tracepoint.c (cmd_qtdp): Print debug message
9499 for static tracepoint.
9500
ae639e8c
YQ
95012012-01-04 Yao Qi <yao@codesourcery.com>
9502
9503 * tracepoint.c (trace_vdebug): Differentiate debug message
9504 between gdbserver and IPA.
9505
f72429c5
YQ
95062012-01-03 Yao Qi <yao@codesourcery.com>
9507
9508 * tracepoint.c (tracepoint_was_hit): Don't collect for
9509 static tracepoint.
9510
12c3e59c
JB
95112012-01-02 Joel Brobecker <brobecker@adacore.com>
9512
9513 * terminal.h: Reformat copyright header.
9514
67827812
JB
95152012-01-02 Joel Brobecker <brobecker@adacore.com>
9516
9517 * server.c (gdbserver_version): Update copyright year.
9518 * gdbreplay.c (gdbreplay_version): Likewise.
9519
3e52c33d
JK
95202011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9521
9522 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9523
9524 Revert:
9525 2011-12-18 Hui Zhu <teawater@gmail.com>
9526 * linux-low.c (linux_create_inferior): Save return value to ret.
9527
66f1260e
HZ
95282011-12-18 Hui Zhu <teawater@gmail.com>
9529
9530 * linux-low.c (linux_create_inferior): Save return value to ret.
9531
e77616d7
DE
95322011-12-16 Doug Evans <dje@google.com>
9533
e7b06c57
DE
9534 * linux-low.c (linux_create_inferior): If stdio connection,
9535 redirect stdin from /dev/null, stdout to stderr.
9536 * remote-utils.c (remote_is_stdio): New static global.
9537 (remote_connection_is_stdio): New function.
9538 (remote_prepare): Handle stdio connection.
9539 (remote_open): Ditto.
9540 (remote_close): Don't close stdin for stdio connections.
9541 (read_prim,write_prim): New functions. Replace all calls to
9542 read/write to these.
9543 * server.c (main): Watch for "-" argument. Move call to
9544 remote_prepare before start_inferior.
9545 * server.h (STDIO_CONNECTION_NAME): New macro.
9546 (remote_connection_is_stdio): Declare.
9547
e77616d7
DE
9548 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9549 in debugging output.
9550
82067193
YQ
95512011-12-15 Yao Qi <yao@codesourcery.com>
9552
9553 * tracepoint.c: Include sys/syscall.h.
9554 (gdb_ust_thread): Remove preprocessor conditional.
9555
82bfbe7e
PA
95562011-12-14 Pedro Alves <pedro@codesourcery.com>
9557
9558 * linux-low.c (linux_detach_one_lwp): Call
9559 the_low_target.prepare_to_resume before detaching.
9560
712c6575
YQ
95612011-12-14 Yao Qi <yao@codesourcery.com>
9562
9563 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9564 of write.
9565
d54d1edf
YQ
95662011-12-14 Yao Qi <yao@codesourcery.com>
9567
9568 * i386-low.c (i386_low_stopped_data_address): Initialize local
9569 variable `control'.
9570
6210a125
PA
95712011-12-13 Pedro Alves <pedro@codesourcery.com>
9572
9573 PR remote/13492
9574
9575 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9576 DR_CONTROL unless necessary. Extend comments.
9577 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9578 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9579
2ece8244
YQ
95802011-12-13 Yao Qi <yao@codesourcery.com>
9581
9582 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9583 macros.
9584 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9585
784867a5
JK
95862011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9587
9588 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9589 Print new debug message for such case.
9590
6bf36717
JK
95912011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9592
9593 Fix overlapping memcpy.
9594 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9595 the read_inferior_memory transfer.
9596 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9597 write_inferior_memory transfer.
9598 (set_fast_tracepoint_jump): New variable buf. Use it for the
9599 read_inferior_memory and write_inferior_memory transfers.
9600 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9601 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9602 Use it for the write_inferior_memory transfer.
9603 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9604 buffers.
9605
50275556
MR
96062011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9607
9608 * linux-low.c (fetch_register, store_register): Make code
9609 consistent, fix formatting.
9610
7325beb4
MR
96112011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9612
9613 * linux-low.c (usr_store_inferior_registers): Factor out code
9614 to handle individual registers into...
9615 (store_register): ... this new function.
9616
c642a434
UW
96172011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9618
9619 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9620 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9621 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9622 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9623 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9624 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9625 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9626 (srv_xmlfiles): Add new XML files.
9627
9628 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9629 and <sys/uio.h>.
9630 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9631 (init_registers_s390_linux32v1): Add prototype.
9632 (init_registers_s390_linux32v2): Likewise.
9633 (init_registers_s390_linux64v1): Likewise.
9634 (init_registers_s390_linux64v2): Likewise.
9635 (init_registers_s390x_linux64v1): Likewise.
9636 (init_registers_s390x_linux64v2): Likewise.
9637 (s390_num_regs): Increment to 52.
9638 (s390_regmap): Add orig_r2 register.
9639 (s390_num_regs_3264): Increment to 68.
9640 (s390_regmap_3264): Add orig_r2 register.
9641 (s390_collect_ptrace_register): Handle orig_r2 register.
9642 (s390_supply_ptrace_register): Likewise.
9643 (s390_fill_last_break): New function.
9644 (s390_store_last_break): Likewise.
9645 (s390_fill_system_call): New function.
9646 (s390_store_system_call): Likewise.
9647 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9648 register sets.
9649 (s390_check_regset): New function.
9650 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9651 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9652 Update target_regsets for available register sets.
9653
2268b414
JK
96542011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9655 Jan Kratochvil <jan.kratochvil@redhat.com>
9656
9657 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9658 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9659 New.
9660 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9661 * linux-low.h (struct process_info_private): New member r_debug.
9662 * server.c (handle_qxfer_libraries): Call
9663 the_target->qxfer_libraries_svr4.
9664 (handle_qxfer_libraries_svr4): New function.
9665 (qxfer_packets): New entry "libraries-svr4".
9666 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9667 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9668 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9669 PACKET_qXfer_libraries_svr4.
9670
d6db1fab
UW
96712011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9672
9673 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9674 PSW address/mask between 8-byte and 16-byte formats.
9675 (s390_supply_ptrace_register): Likewise.
9676 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9677 basic addressing mode bit.
9678
242f5f1c
SS
96792011-11-24 Stan Shebs <stan@codesourcery.com>
9680
9681 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9682
f196051f
SS
96832011-11-17 Stan Shebs <stan@codesourcery.com>
9684
9685 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9686 (tracing_start_time): New global.
9687 (tracing_stop_time): New global.
9688 (tracing_user_name): New global.
9689 (tracing_notes): New global.
9690 (tracing_stop_note): New global.
9691 (cmd_qtstart): Set traceframe_usage, start_time.
9692 (stop_tracing): Set stop_time.
9693 (cmd_qtstatus): Report additional status.
9694 (cmd_qtp): New function.
9695 (handle_tracepoint_query): Call it.
9696 (cmd_qtnotes): New function.
9697 (handle_tracepoint_general_set): Call it.
9698 (get_timestamp): Rename from tsv_get_timestamp.
9699
405f8e94
SS
97002011-11-14 Stan Shebs <stan@codesourcery.com>
9701 Kwok Cheung Yeung <kcy@codesourcery.com>
9702
9703 * linux-x86-low.c (small_jump_insn): New.
9704 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9705 trampoline and error message, build a trampoline and issue a small
9706 jump instruction to it.
9707 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9708 trampoline and error message.
9709 (x86_get_min_fast_tracepoint_insn_len): New.
9710 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9711 * linux-low.h (struct linux_target_ops): Add arguments to
9712 install_fast_tracepoint_jump_pad operation, add new operation.
9713 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9714 arguments.
9715 (linux_get_min_fast_tracepoint_insn_len): New function.
9716 (linux_target_op): Add new operation.
9717 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9718 (gdb_trampoline_buffer_end): Ditto.
9719 (gdb_trampoline_buffer_error): Ditto.
9720 (struct ipa_sym_addresses): Add fields for new IPA variables.
9721 (symbol_list): Add entries for new IPA variables.
9722 (struct tracepoint): Add fields to hold the address range of the
9723 trampoline used by the tracepoint.
9724 (trampoline_buffer_head): New static variable.
9725 (trampoline_buffer_tail): Ditto.
9726 (claim_trampoline_space): New function.
9727 (have_fast_tracepoint_trampoline_buffer): New function.
9728 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9729 structure.
9730 (install_fast_tracepoint): Ditto, also add error buffer argument.
9731 (cmd_qtminftpilen): New function.
9732 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9733 (fast_tracepoint_from_trampoline_address): New function.
9734 (fast_tracepoint_collecting): Handle trampoline as part of jump
9735 pad space.
9736 (set_trampoline_buffer_space): New function.
9737 (initialize_tracepoint): Initialize new IPA variables.
9738 * target.h (struct target_ops): Add arguments to
9739 install_fast_tracepoint_jump_pad operation, add new
9740 get_min_fast_tracepoint_insn_len operation.
9741 (target_get_min_fast_tracepoint_insn_len): New.
9742 (install_fast_tracepoint_jump_pad): Add arguments.
9743 * server.h (IPA_BUFSIZ): Define.
9744 * linux-i386-ipa.c: Include extra header files.
9745 (initialize_fast_tracepoint_trampoline_buffer): New function.
9746 (initialize_low_tracepoint): Call it.
9747 * server.h (set_trampoline_buffer_space): Declare.
9748 (claim_trampoline_space): Ditto.
9749 (have_fast_tracepoint_trampoline_buffer): Ditto.
9750
1e4d1764
YQ
97512011-11-14 Yao Qi <yao@codesourcery.com>
9752
9753 * server.c (handle_query): Handle InstallInTrace for qSupported.
9754 * tracepoint.c (add_tracepoint): Sort list.
9755 (install_tracepoint, download_tracepoint): New.
9756 (cmd_qtdp): Call them to install and download tracepoints.
9757 (sort_tracepoints): Removed.
9758 (cmd_qtstart): Update.
9759
5c73ff4e
YQ
97602011-11-14 Yao Qi <yao@codesourcery.com>
9761
9762 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9763 * mem-break.h: Declare.
9764 * tracepoint.c (cmd_qtstart): Move some code to ...
9765 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9766 New.
9767 (download_tracepoints): Move some code to ...
9768 (download_tracepoint_1): ... here. New.
9769
86a30030
YQ
97702011-11-08 Yao Qi <yao@codesourcery.com>
9771
9772 * remote-utils.c (relocate_instruction): A comment fix.
9773
8d26e50c
JB
97742011-11-07 Joel Brobecker <brobecker@adacore.com>
9775
9776 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9777 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9778 dr_status_mirror and dr_control_mirror from debug_reg_state.
9779 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9780 (i386_initial_stuff): Remove use of deleted globals.
9781 (i386_get_thread_context, i386_set_thread_context,
9782 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9783 from debug_reg_state.
9784
a59306a3
YQ
97852011-11-05 Yao Qi <yao@codesourcery.com>
9786
9787 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9788 address as TPOINT's.
9789
3065dfb6
SS
97902011-11-02 Stan Shebs <stan@codesourcery.com>
9791
9792 * tracepoint.c (agent_mem_read_string): New function.
9793 (eval_agent_expr): Call it for tracenz.
9794 * server.c (handle_query): Report support for tracenz.
9795
fd0d8c7c
YQ
97962011-11-02 Yao Qi <yao@codesourcery.com>
9797
9798 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9799
609086b1
YQ
98002011-11-02 Yao Qi <yao@codesourcery.com>
9801
9802 * target.h: Fix a typo in comment.
9803
b9fd1791
PA
98042011-10-31 Pedro Alves <pedro@codesourcery.com>
9805
9806 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9807 clobber the breakpoints' shadows with fast tracepoint jumps.
9808 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9809 * target.c (write_inferior_memory): Also pass MYADDR down to
9810 check_mem_write.
9811
03583c20
UW
98122011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9813
9814 * configure.ac: Check support for personality routine.
9815 * configure: Regenerate.
9816 * config.in: Likewise.
9817 * linux-low.c: Include <sys/personality.h>.
9818 Define ADDR_NO_RANDOMIZE if necessary.
9819 (linux_create_inferior): Disable address space randomization when
9820 forking inferior, if requested.
9821 (linux_supports_disable_randomization): New function.
9822 (linux_target_ops): Install it.
9823 * server.h (disable_randomization): Declare.
9824 * server.c (disable_randomization): New global variable.
9825 (handle_general_set): Handle QDisableRandomization.
9826 (handle_query): Likewise for qSupported.
9827 (main): Support --disable-randomization and --no-disable-randomization
9828 command line arguments.
9829 * target.h (struct target_ops): Add supports_disable_randomization.
9830 (target_supports_disable_randomization): New macro.
9831
723b724b
MF
98322011-09-29 Mike Frysinger <vapier@gentoo.org>
9833
9834 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9835 ifdef check.
9836 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9837 [!PT_GETDSBT] (target_loadmap): New definition.
9838 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9839 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9840 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9841 and PT_GETDSBT to LINUX_LOADMAP.
9842 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9843 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9844
55329a5c 98452011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
9846
9847 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9848 (arm_linux_hwbp_cap): New static variable.
9849 (arm_linux_get_hwbp_cap): Replace by ...
9850 (arm_linux_init_hwbp_cap): ... this new function.
9851 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9852 (arm_linux_get_hw_watchpoint_count): Likewise.
9853 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9854 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9855 (arm_prepare_to_resume): Use perror_with_name instead of error.
9856
55329a5c 98572011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
9858
9859 * linux-arm-low.c: Include <signal.h>.
9860 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9861 (struct arm_linux_hwbp_cap): New data type.
9862 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9863 (struct arm_linux_hw_breakpoint): New data type.
9864 (MAX_BPTS, MAX_WPTS): Define.
9865 (struct arch_process_info, struct arch_lwp_info): New data types.
9866 (arm_linux_get_hwbp_cap): New function.
9867 (arm_linux_get_hw_breakpoint_count): Likewise.
9868 (arm_linux_get_hw_watchpoint_count): Likewise.
9869 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9870 (arm_hwbp_control_initialize): Likewise.
9871 (arm_hwbp_control_is_enabled): Likewise.
9872 (arm_hwbp_control_is_initialized): Likewise.
9873 (arm_hwbp_control_disable): Likewise.
9874 (arm_linux_hw_breakpoint_equal): Likewise.
9875 (arm_linux_hw_point_initialize): Likewise.
9876 (struct update_registers_data): New data structure.
9877 (update_registers_callback: New function.
9878 (arm_insert_point): Likewise.
9879 (arm_remove_point): Likewise.
9880 (arm_stopped_by_watchpoint): Likewise.
9881 (arm_stopped_data_address): Likewise.
9882 (arm_new_process): Likewise.
9883 (arm_new_thread): Likewise.
9884 (arm_prepare_to_resume): Likewise.
9885 (the_low_target): Register arm_insert_point, arm_remove_point,
9886 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9887 arm_new_thread, and arm_prepare_to_resume.
9888
6b9801d4
SS
98892011-09-15 Stan Shebs <stan@codesourcery.com>
9890
9891 * server.h (struct emit_ops): Add compare-goto fields.
9892 * tracepoint.c (gdb_agent_op_sizes): New table.
9893 (emit_eq_goto): New function.
9894 (emit_ne_goto): New function.
9895 (emit_lt_goto): New function.
9896 (emit_le_goto): New function.
9897 (emit_gt_goto): New function.
9898 (emit_ge_goto): New function.
9899 (is_goto_target): New function.
9900 (compile_bytecodes): Recognize special cases of compare-goto
9901 combinations and call specialized emitters for them.
9902 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9903 (amd64_emit_ne_goto): New function.
9904 (amd64_emit_lt_goto): New function.
9905 (amd64_emit_le_goto): New function.
9906 (amd64_emit_gt_goto): New function.
9907 (amd64_emit_ge_goto): New function.
9908 (amd64_emit_ops): Add the new functions.
9909 (i386_emit_eq_goto): New function.
9910 (i386_emit_ne_goto): New function.
9911 (i386_emit_lt_goto): New function.
9912 (i386_emit_le_goto): New function.
9913 (i386_emit_gt_goto): New function.
9914 (i386_emit_ge_goto): New function.
9915 (i386_emit_ops): Add the new functions.
9916
bf15cbda
SS
99172011-09-08 Stan Shebs <stan@codesourcery.com>
9918
9919 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9920 (i386_emit_epilogue): Restore %ebx.
9921
943ca1dd
JZ
99222011-08-31 Jie Zhang <jzhang918@gmail.com>
9923
9924 * server.c (step_thread): Remove definition.
9925 (process_serial_event): Don't handle Hs.
9926 * server.h (step_thread): Remove declaration.
9927 * target.c (set_desired_inferior): Remove use of step_thread.
9928
e3deef73
LM
99292011-08-24 Luis Machado <lgustavo@codesourcery.com>
9930
9931 * linux-low.c: Include linux-procfs.h.
9932 (linux_attach_lwp_1): Update comments.
9933 (linux_attach): Scan for existing threads when attaching to a
9934 process that is the tgid.
9935 * Makefile.in: Update dependencies.
9936
13da1c97
LM
99372011-08-24 Luis Machado <lgustavo@codesourcery.com>
9938
9939 * configure.srv: Add linux-procfs.o dependencies.
9940
881127c9
YQ
99412011-08-14 Yao Qi <yao@codesourcery.com>
9942
9943 * target.h (struct target_ops): Fix indent.
9944 * win32-low.c (win32_target_ops): Fix comment.
9945
58dbd541
YQ
99462011-08-14 Andrew Jenner <andrew@codesourcery.com>
9947 Yao Qi <yao@codesourcery.com>
9948
9949 * Makefile.in (clean): Remove tic6x-*.c files.
9950 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9951 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9952 (tic6x-c64xp-linux.c): Likewise.
9953 * configure.srv: Add support for tic6x-*-uclinux.
9954 * linux-tic6x-low.c: New.
9955 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9956
78d85199
YQ
99572011-08-14 Andrew Stubbs <ams@codesourcery.com>
9958 Yao Qi <yao@codesourcery.com>
9959
9960 * target.h (struct target_ops): Add read_loadmap.
9961 * linux-low.c (struct target_loadseg): New type.
9962 (struct target_loadmap): New type.
9963 (linux_read_loadmap): New function.
9964 (linux_target_ops): Add linux_read_loadmap.
9965 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
9966 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9967 to NULL.
78d85199 9968
a959a88d
EZ
99692011-08-05 Eli Zaretskii <eliz@gnu.org>
9970
9971 * win32-low.c: Include <stdint.h>.
9972
1ced966e
PA
99732011-07-22 Pedro Alves <pedro@codesourcery.com>
9974
9975 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9976 to the inferior here.
9977 (i386_remove_aligned_watchpoint): Ditto.
9978 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9979 fit part of the watchpoint in the debug registers.
9980 (i386_update_inferior_debug_regs): New.
9981 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9982 registers, and only update the inferior on success.
9983 (i386_low_remove_watchpoint): Ditto.
9984
d26e3629
KY
99852011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9986
9987 * linux-low.c (compare_ints, unique, list_threads, show_process,
9988 linux_core_of_thread): Delete.
9989 (linux_target_ops): Change linux_core_of_thread to
9990 linux_common_core_of_thread.
9991 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9992 * utils.c (malloc_failure): Change type of argument.
9993 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9994 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9995 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9996 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9997 (IPA_OBJS): Add common-utils-ipa.o.
9998 (ptid_h, linux_osdata_h): New macros.
9999 (server_h): Add common/common-utils.h, common/xml-utils.h,
10000 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10001 common/ptid.h.
10002 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10003 ptid.o, buffer.o): New rules.
10004 (linux-low.o): Add common/linux-osdata.h as a dependency.
10005 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10006 * configure.ac: Add AC_HEADER_DIRENT check.
10007 * config.in: Regenerate.
10008 * configure: Regenerate.
10009 * remote-utils.c (xml_escape_text): Delete.
10010 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10011 buffer_xml_printf): Move to common/buffer.c.
10012 * server.c (main): Remove call to initialize_inferiors.
10013 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10014 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10015 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10016 internal_error, gdb_assert, gdb_assert_fail): Delete.
10017 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10018 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10019 common/buffer.h.
10020 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10021 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10022 initialize_inferiors): Delete.
10023
2275a1a7
PA
100242011-07-20 Pedro Alves <pedro@codesourcery.com>
10025
10026 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10027 symbol error.
10028
0a5b1e09
PA
100292011-05-31 Pedro Alves <pedro@codesourcery.com>
10030
10031 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10032 assertion.
10033 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10034
6938fd34
YQ
100352011-05-26 Yao Qi <yao@codesourcery.com>
10036
10037 * Makefile.in (thread-db.o): Track dependence to
10038 common/gdb_thread_db.h.
10039 * thread-db.c: include gdb_thread_db.h from right place.
10040
b481f9e0
TT
100412011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10042
10043 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10044 __FILE__ and __LINE__ to internal_error.
10045
98a5dd13
DE
100462011-05-13 Doug Evans <dje@google.com>
10047
10048 * thread-db.c (try_thread_db_load_from_sdir): New function.
10049 (try_thread_db_load_from_dir): New function.
10050 (thread_db_load_search): Handle $sdir, ignore $pdir.
10051 Remove trying of system directories if search of
10052 libthread-db-search-path fails, that is now done via $sdir.
10053
d248b706
KY
100542011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10055
10056 * server.c (handle_query): Add EnableDisableTracepoints to the list
10057 of supported features.
43aaf8b6 10058 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 10059 tracepoints.
43aaf8b6
PA
10060 (cmd_qtenable_disable): New.
10061 (cmd_qtstart): Install tracepoints even if disabled.
10062 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10063 receiving a QTEnable or QTDisable packet.
10064 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10065 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10066 tracepoints.
10067 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 10068
84e578fb
DE
100692011-05-10 Doug Evans <dje@google.com>
10070
10071 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10072
71f55dd8
DE
100732011-05-04 Doug Evans <dje@google.com>
10074
10075 * linux-low.c (linux_join): Skip process lookup.
10076 * spu-low.c (spu_join): Ditto.
10077 * server.c (join_inferiors_callback): Delete.
10078 (process_serial_event): For 'D' packet (detach) call join_inferior
10079 directly.
10080
4d393d60
JM
100812011-05-04 Joseph Myers <joseph@codesourcery.com>
10082
10083 * README: Don't mention xscale*-*-linux*.
10084 * configure.srv (xscale*-*-linux*): Don't handle target.
10085
b00ad6ff
NF
100862011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10087
10088 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10089 casting pointers.
10090 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10091 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10092 (i386_emit_void_call_2): Likewise.
10093
af96c192
YQ
100942011-04-26 Yao Qi <yao@codesourcery.com>
10095
43aaf8b6
PA
10096 * linux-low.c: Move common macros to linux-ptrace.h.
10097 Include linux-ptrace.h.
af96c192
YQ
10098 * Makefile.in (linux_ptrace_h): New.
10099 (linux-low.o): Depends on linux-ptrace.h.
10100
03f2bd59
JK
101012011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10102
10103 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10104 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10105 (remote_prepare): New function with most of the TCP code from ...
10106 (remote_open): ... here. Detect PORT here unconditionally. Move also
10107 setting transport_is_reliable.
10108 * server.c (run_once): New variable.
10109 (gdbserver_usage): Document it.
10110 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10111 the first run if RUN_ONCE.
10112 * server.h (run_once, remote_prepare): New declarations.
10113
7a9dd1b2
TT
101142011-04-19 Tom Tromey <tromey@redhat.com>
10115
10116 * win32-low.c (handle_load_dll): Remove duplicate "the".
10117
81239425
PM
101182011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10119
10120 Remove support for old Cygwin 1.5 versions.
10121 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10122 function to avoid warning.
10123 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10124 warning.
10125
9e0627f1
PM
101262011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10127
10128 * gdbserver/server.h (Macro _): Define it if not available.
10129
588eebee
MS
101302011-03-14 Michael Snyder <msnyder@vmware.com>
10131
348af9f7 10132 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 10133
43f70d4c
JB
101342011-03-10 Joel Brobecker <brobecker@adacore.com>
10135
10136 * Makefile.in (maintainer-clean realclean distclean): Remove
10137 "make ... subdir_do" command.
10138
348af9f7
MS
101392011-03-10 Michael Snyder <msnyder@vmware.com>
10140
10141 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10142
10143 * server.c (handle_v_run): Free alloced buffer on early return.
10144
e637a4f5
YQ
101452011-03-09 Yao Qi <yao@codesourcery.com>
10146
10147 Revert:
10148 2011-03-04 Yao Qi <yao@codesourcery.com>
10149
10150 * Makefile.in: Remove GNU make feature --directory.
10151
10152 2011-03-05 Yao Qi <yao@codesourcery.com>
10153
10154 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10155 (subdir_do): New make target. Copied from gdb/Makefile.
10156 (maintainer-clean, realclean, distclean, clean): Call corresponding
10157 make targets in common/Makefile.
10158
10159 2011-02-11 Yao Qi <yao@codesourcery.com>
10160
10161 * configure.ac: Call AC_PROG_RANLIB.
10162 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10163 * configure: Regenerate.
10164
e6edda56
JK
101652011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10166
10167 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10168
e5141119
JB
101692011-03-06 Yao Qi <yao@codesourcery.com>
10170
10171 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10172
64794aa4
JB
101732011-03-05 Yao Qi <yao@codesourcery.com>
10174
10175 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10176 (subdir_do): New make target. Copied from gdb/Makefile.
10177 (maintainer-clean, realclean, distclean, clean): Call corresponding
10178 make targets in common/Makefile.
10179
7a762829
YQ
101802011-03-04 Yao Qi <yao@codesourcery.com>
10181
10182 * Makefile.in: Remove GNU make feature --directory.
10183
348af9f7
MS
101842011-03-04 Michael Snyder <msnyder@vmware.com>
10185
10186 * server.c (queue_stop_reply): Call xmalloc not malloc.
10187
101882011-03-02 Michael Snyder <msnyder@vmware.com>
10189
10190 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10191
9f72fee2
MS
101922011-02-28 Michael Snyder <msnyder@vmware.com>
10193
588eebee
MS
10194 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10195 (cmd_qtframe): Ditto.
10196 (cmd_qtbuffer): Ditto.
10197 (cmd_bigqtbuffer): Ditto.
10198
9f72fee2
MS
10199 * utils.c (decimal2str): Initialize 'width' to nine, then
10200 don't mess with it.
10201
8040bd49
UW
102022011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10203
10204 * hostio.c (require_data): Free *data, not data.
10205
7e52cbd0
JK
102062011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10207
10208 * hostio.c (require_data): Use free, not xfree.
10209
9130f83e
MS
102102011-02-27 Michael Snyder <msnyder@vmware.com>
10211
4b812f4e
MS
10212 * server.c (handle_query): Discard unused value.
10213
9130f83e
MS
10214 * hostio.c (require_data): Free malloc memory before returning
10215 error.
10216
69d37113
MS
102172011-02-26 Michael Snyder <msnyder@vmware.com>
10218
10219 * linux-low.c (list_threads): Call closedir for dirent.
10220
35f5825a
MS
102212011-02-27 Michael Snyder <msnyder@vmware.com>
10222
2a589cef
MS
10223 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10224 a case statement falls through.
10225
0adea5f7
MS
10226 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10227
35f5825a
MS
10228 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10229 in comparison.
10230
238f1c74
MS
102312011-02-26 Michael Snyder <msnyder@vmware.com>
10232
10233 * utils.c (decimal2str): Eliminate dead code and dead param.
10234 (pulongest): Drop dead param from call to decimal2str.
10235 (plongest): Ditto.
10236
633ff500
JB
102372011-02-24 Joel Brobecker <brobecker@adacore.com>
10238
10239 Revert the following patch (not approved yet):
10240 2011-02-21 Hui Zhu <teawater@gmail.com>
10241 * tracepoint.c (tp_printf): New function.
10242 (eval_agent_expr): Handle gdb_agent_op_printf.
10243
f9c6ff72
HZ
102442011-02-21 Hui Zhu <teawater@gmail.com>
10245
10246 * tracepoint.c (tp_printf): New function.
10247 (eval_agent_expr): Handle gdb_agent_op_printf.
10248
94d5e490
TT
102492011-02-18 Tom Tromey <tromey@redhat.com>
10250
10251 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10252 (tracepoint.o): Likewise.
10253 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10254 (gdb_agent_op_names): Likewise.
10255
c7f96d2b
TT
102562011-02-18 Tom Tromey <tromey@redhat.com>
10257
10258 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10259 gdb_agent_op_rot>: New constants.
10260 (gdb_agent_op_names): Add pick and roll.
10261 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10262 cases.
10263
0feedb2c
JK
102642011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10265
10266 * aclocal.m4: Regenerated with aclocal-1.11.1.
10267
b3b9301e
PA
102682011-02-14 Pedro Alves <pedro@codesourcery.com>
10269
10270 * server.c (handle_qxfer_traceframe_info): New.
10271 (qxfer_packets): Register "traceframe-info".
10272 (handle_query): Report support for qXfer:traceframe-info:read+.
10273 * tracepoint.c (match_blocktype): New.
10274 (traceframe_find_block_type): Rename to ...
10275 (traceframe_walk_blocks): ... this. Add callback filter argument,
10276 and use it.
10277 (traceframe_find_block_type): New, reimplemented on top of
10278 traceframe_walk_blocks.
10279 (build_traceframe_info_xml): New.
10280 (traceframe_read_info): New.
10281 * server.h (traceframe_read_info): Declare.
10282
4f3e6fb7
YQ
102832011-02-11 Yao Qi <yao@codesourcery.com>
10284
10285 * configure.ac: Call AC_PROG_RANLIB.
10286 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10287 * configure: Regenerate.
10288
764880b7
PA
102892011-02-07 Pedro Alves <pedro@codesourcery.com>
10290
10291 * server.c (gdb_read_memory): Change return semantics to allow
10292 partial transfers.
10293 (handle_search_memory_1): Adjust.
10294 (process_serial_event) <'m' packet>: Handle partial transfers.
10295 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10296
1c79eb8a
PA
102972011-01-28 Pedro Alves <pedro@codesourcery.com>
10298
10299 * regcache.c (init_register_cache): Initialize
10300 regcache->register_status.
10301 (free_register_cache): Release regcache->register_status.
10302 (regcache_cpy): Copy register_status.
10303 (registers_to_string): Print 'x's for unavailable registers.
10304 (supply_register): Mark the register's status valid or
10305 unavailable, depending on whether a buffer was passed in or not.
10306 (supply_register_zeroed): New.
10307 (supply_regblock): Mark the registers' status valid or
10308 unavailable, depending on whether a buffer was passed in or not.
10309 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10310 (struct regcache): New `register_status' field.
10311 (supply_register_zeroed): Declare.
10312 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10313 supply_register_zeroed, rather than passing a NULL buffer to
10314 supply_register.
10315 * tracepoint.c (fetch_traceframe_registers): Update comment.
10316
85724a0e
PA
103172011-01-28 Pedro Alves <pedro@codesourcery.com>
10318
10319 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10320 buffer explicit.
10321
d08aafef
PA
103222011-01-25 Pedro Alves <pedro@codesourcery.com>
10323
10324 * server.h (decode_xfer_write): Change prototype.
10325 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10326 and don't extract the annex here.
10327 * server.c (decode_xfer_read): Remove `annex' parameter,
10328 and don't extract the annex here.
10329 (decode_xfer): New.
10330 (struct qxfer): New.
10331 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10332 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10333 (handle_qxfer_statictrace): New functions, abstracted out from
10334 handle_query, and made to use the struct qxfer interface.
10335 (handle_threads_qxfer_proper): Rename to ...
10336 (handle_qxfer_threads_proper): ... this.
10337 (handle_threads_qxfer): Rename to ...
10338 (handle_qxfer_threads): ... this. Adjust.
10339 (qxfer_packets): New array.
10340 (handle_qxfer): New function.
10341 (handle_query): Use handle_qxfer.
10342
493e2a69
MS
103432011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10344
10345 * gdbreplay.c: Shorten lines of >= 80 columns.
10346 * linux-low.c: Ditto.
10347 * linux-ppc-low.c: Ditto.
10348 * linux-s390-low.c: Ditto.
10349 * linux-sparc-low.c: Ditto.
10350 * linux-x86-low.c: Ditto.
10351 * linux-xtensa-low.c: Ditto.
10352 * mem-break.c: Ditto.
10353 * nto-low.c: Ditto.
10354 * regcache.h: Ditto.
10355 * remote-utils.c: Ditto.
10356 * server.c: Ditto.
10357 * server.h: Ditto.
10358 * thread-db.c: Ditto.
10359 * tracepoint.c: Ditto.
10360 * utils.c: Ditto.
10361 * win32-low.h: Ditto.
10362
44944448
JB
103632011-01-05 Joel Brobecker <brobecker@adacore.com>
10364
10365 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10366 update.
10367
71ce852c
JB
103682011-01-01 Joel Brobecker <brobecker@adacore.com>
10369
10370 * server.c (gdbserver_version): Update copyright year in version
10371 output.
10372 * gdbreplay.c (gdbreplay_version): Ditto.
10373
eb826dc6
MF
103742010-12-29 Jie Zhang <jie.zhang@analog.com>
10375
10376 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10377 * linux-bfin-low.c: New file.
10378 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10379 PT_DATA_ADDR for BFIN targets.
10380 * Makefile.in (SFILES): Add linux-bfin-low.c.
10381 (clean): Remove reg-bfin.c.
10382 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10383 * README: Mention supported Blackfin targets.
10384
39ab222a
MF
103852010-12-23 Mike Frysinger <vapier@gentoo.org>
10386
10387 * .gitignore: New file.
10388
a1f2ce7d
MF
103892010-11-16 Mike Frysinger <vapier@gentoo.org>
10390
10391 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10392
f474844c
JZ
103932010-10-22 Jie Zhang <jie@codesourcery.com>
10394
10395 * Makefile.in: Add FLAGS_TO_PASS variable.
10396 (install): Remove dependency of install-only and recursively
10397 invoke make for install-only.
10398
f1048712
DE
103992010-10-04 Doug Evans <dje@google.com>
10400
10401 * Makefile.in (uninstall): Use $(DESTDIR).
10402
b53a1623
PA
104032010-09-24 Pedro Alves <pedro@codesourcery.com>
10404
e6ee044d
PA
10405 PR gdb/11842
10406
b53a1623
PA
10407 * linux-x86-low.c (compat_siginfo_from_siginfo)
10408 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10409 si_code is < 0. Check for si_code == SI_TIMER before checking for
10410 si_code < 0.
10411
fa1bd1e4
JB
104122010-09-13 Joel Brobecker <brobecker@adacore.com>
10413
10414 * lynx-i386-low.c: New file.
10415 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10416
47fac8f8
JB
104172010-09-13 Joel Brobecker <brobecker@adacore.com>
10418
10419 * lynx-low.c (ptrace_request_to_str): Remove handling for
10420 request values that have been removed in LynxOS 5.x.
10421
1adfc54d
JB
104222010-09-13 Joel Brobecker <brobecker@adacore.com>
10423
10424 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10425 <ptrace.h>
10426
c2a66c29
NS
104272010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10428
10429 * configure.ac: Add --enable-inprocess-agent option.
10430 * configure: Rebuilt.
10431
32fcada3
YQ
104322010-09-06 Yao Qi <yao@codesourcery.com>
10433
10434 * linux-low.c (linux_kill): Remove unused variable.
10435 (linux_stabilize_threads): Likewise.
10436 * server.c (start_inferior): Likewise.
10437 (queue_stop_reply_callback): Likewise.
10438 * tracepoint.c (do_action_at_tracepoint): Likewise.
10439
0cccb683
YQ
104402010-09-06 Yao Qi <yao@codesourcery.com>
10441
10442 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10443 on return.
10444
423ec54c
JK
104452010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10446
10447 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10448
12ac6819
PA
104492010-09-06 Pedro Alves <pedro@codesourcery.com>
10450
10451 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10452 "$(IPA_DEPFILES)".
10453
8ed54b31
JB
104542010-09-01 Joel Brobecker <brobecker@adacore.com>
10455
10456 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10457 gdbserver/lynx-ppc-low.c: New files.
10458 * Makefile.in (lynx_low_h): New variable.
10459 (lynx-low.o, lynx-ppc-low.o): New rules.
10460 * configure.ac: On LynxOS, link with -lnetinet.
10461 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10462 * configure: regenerate.
10463
bb0116a4
JB
104642010-09-01 Joel Brobecker <brobecker@adacore.com>
10465
10466 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10467 * configure.ac: Add check for vasprintf and vsnprintf.
10468 * configure, config.in: Regenerate.
10469 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10470
a778ab81 104712010-09-01 Joel Brobecker <brobecker@adacore.com>
10472
10473 * gdbreplay.c: Move include of alloca.h up, next to include of
10474 malloc.h.
10475 * server.h: Add include of malloc.h.
10476 * mem-break.c: Remove include of malloc.h.
10477 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10478
8b034a19 104792010-09-01 Joel Brobecker <brobecker@adacore.com>
10480
10481 * Makefile.in (memmem.o): Build with -Wno-error.
10482
104832010-09-01 Joel Brobecker <brobecker@adacore.com>
10484
10485 * utils.c (xsnprintf): Make non-static.
10486 * server.h: Add xsnprintf declaration.
10487 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10488 replace calls to snprintf by calls to xsnprintf throughout.
10489
104902010-09-01 Joel Brobecker <brobecker@adacore.com>
10491
10492 * configure.ac: Add configure check for alloca.
10493 * configure, config.in: Regenerate.
10494 * server.h: Include alloca.h if it exists.
10495 * gdbreplay.c: Include alloca.h if it exists.
10496
1a981360
PA
104972010-08-28 Pedro Alves <pedro@codesourcery.com>
10498
10499 * linux-low.c (__SIGRTMIN): Define if not already defined.
10500 (linux_create_inferior): Check for __ANDROID__ rather than
10501 __SIGRTMIN.
10502 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10503 are already deferred.
10504 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10505 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10506 stopped and already has a pending signal to report.
10507 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10508 a pending signal to report or is moving out of a jump pad.
10509 (linux_init_signals): Check for __ANDROID__ rather than
10510 __SIGRTMIN.
10511
b4d51a55
PA
105122010-08-28 Pedro Alves <pedro@codesourcery.com>
10513
10514 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10515 debug_threads check. Avoid a linear search when not doing debug
10516 output.
10517
ec48365d
PA
105182010-08-27 Pedro Alves <pedro@codesourcery.com>
10519
10520 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10521 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10522 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10523 (process_event): Change local fd's type to gdb_fildes_t.
10524 (create_file_handler): Adjust prototype.
10525 (delete_file_handler): Adjust prototype.
10526 (handle_file_event): Adjust prototype. Use pfildes.
10527 (create_file_event): Adjsut prototype.
10528 * remote-utils.c (remote_desc, listen_desc): Change type to
10529 gdb_fildes_t.
10530 * server.h: New gdb_fildes_t typedef.
10531 [USE_WIN32API]: Include winsock2.h.
10532 (delete_file_handler, add_file_handler): Adjust prototypes.
10533 (pfildes): Declare.
10534 * utils.c (pfildes): New.
10535
854d88f0
PA
105362010-08-27 Pedro Alves <pedro@codesourcery.com>
10537
10538 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10539 * configure: Regenerate.
10540
0146f85b
PA
105412010-08-27 Pedro Alves <pedro@codesourcery.com>
10542
10543 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10544 (linux_done_accessing_memory): ... this.
10545 (linux_target_ops): Adjust.
10546 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10547 * nto-low.c (nto_target_ops): Adjust comment.
10548 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10549 * spu-low.c (spu_target_ops): Adjust comment.
10550 * target.h (target_ops): Rename unprepare_to_access_memory field
10551 to done_accessing_memory.
10552 (unprepare_to_access_memory): Rename to ...
10553 (done_accessing_memory): ... this.
10554
90d74c30
PA
105552010-08-26 Pedro Alves <pedro@codesourcery.com>
10556
10557 * linux-low.c (linux_prepare_to_access_memory): New.
10558 (linux_unprepare_to_access_memory): New.
10559 (linux_target_ops): Install them.
10560 * server.c (read_memory): Rename to ...
10561 (gdb_read_memory): ... this. Use
10562 prepare_to_access_memory/prepare_to_access_memory.
10563 (write_memory): Rename to ...
10564 (gdb_write_memory): ... this. Use
10565 prepare_to_access_memory/prepare_to_access_memory.
10566 (handle_search_memory_1): Adjust.
10567 (process_serial_event): Adjust.
10568 * target.h (struct target_ops): New fields
10569 prepare_to_access_memory and unprepare_to_access_memory.
10570 (prepare_to_access_memory, unprepare_to_access_memory): New.
10571 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10572 prepare_to_access_memory/prepare_to_access_memory.
10573 * nto-low.c (nto_target_ops): Adjust.
10574 * spu-low.c (spu_target_ops): Adjust.
10575 * win32-low.c (win32_target_ops): Adjust.
10576
fd467969
PA
105772010-08-26 Pedro Alves <pedro@codesourcery.com>
10578
10579 * Makefile.in (WARN_CFLAGS): Get it from configure.
10580 (WERROR_CFLAGS): New.
10581 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10582 * configure.ac: Introduce --enable-werror, which adds -Werror to
10583 the compiler command line. Enabled by default. Disable with
10584 --disable-werror. Add -Wdeclaration-after-statement
10585 Wpointer-arith and -Wformat-nonliteral to warning flags.
10586 * configure: Regenerate.
10587
331e2f5f
PA
105882010-08-26 Pedro Alves <pedro@codesourcery.com>
10589
10590 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10591
e581f2b4
PA
105922010-08-26 Pedro Alves <pedro@codesourcery.com>
10593
10594 * gdbreplay.c (remote_error): New.
10595 (gdbchar): New.
10596 (expect): Use gdbchar. Check for error reading from GDB.
10597 Clarify sync error output.
10598 (play): Check for errors writing to GDB.
10599 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10600 * remote-utils.c (getpkt): Check for errors writing to the remote
10601 descriptor.
10602
3c11dd79
PA
106032010-08-25 Pedro Alves <pedro@codesourcery.com>
10604
10605 * linux-low.c (linux_wait_1): Move non-debugging code out of
10606 `debug_threads' control.
10607
d20a8ad9
PA
106082010-08-25 Pedro Alves <pedro@codesourcery.com>
10609
10610 * linux-low.c (linux_wait_1): Don't set last_status here.
10611 * server.c (push_event, queue_stop_reply_callback): Assert we're
10612 not pushing a TARGET_WAITKIND_IGNORE event.
10613 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10614 (myresume, handle_target_event): Set the thread's last_resume_kind
10615 and last_status from the target returned status.
10616
964e4306
PA
106172010-08-25 Pedro Alves <pedro@codesourcery.com>
10618
10619 PR threads/10729
10620
10621 * linux-x86-low.c (update_debug_registers_callback): New.
10622 (i386_dr_low_set_addr): Use it.
10623 (i386_dr_low_get_addr): New.
10624 (i386_dr_low_set_control): Use update_debug_registers_callback.
10625 (i386_dr_low_get_control): New.
10626 (i386_dr_low_get_status): Adjust.
10627 * linux-low.c (linux_stop_lwp): New.
10628 * linux-low.h (linux_stop_lwp): Declare.
10629
10630 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10631 argument instead of a i386_debug_reg_state.
10632 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10633 a i386_debug_reg_state.
10634 (i386_insert_aligned_watchpoint): Adjust.
10635 (i386_remove_aligned_watchpoint): Adjust.
10636 (i386_low_stopped_data_address): Read the debug registers from the
10637 inferior instead of from the mirrors.
10638 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10639 (i386_dr_low_get_addr): Declare.
10640 (i386_dr_low_get_control): Declare.
10641 (i386_dr_low_get_status): Change prototype.
10642
10643 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10644 (i386_dr_low_get_addr): New.
10645 (i386_dr_low_get_control): New.
10646 (i386_dr_low_get_status): Adjust prototype. Return
10647 dr_status_mirror.
10648 (i386_initial_stuff): Clear dr_status_mirror and
10649 dr_control_mirror.
10650 (i386_get_thread_context): Adjust.
10651 (i386_set_thread_context): Adjust.
10652 (i386_thread_added): Adjust.
10653
5f21a75b
PA
106542010-08-24 Pedro Alves <pedro@codesourcery.com>
10655
10656 * linux-low.h (linux_thread_area): Delete declaration.
10657
3e4c1235
TS
106582010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10659
10660 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10661 after its termination.
10662
1971b033
PA
106632010-08-09 Pedro Alves <pedro@codesourcery.com>
10664
10665 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10666 (gdb_wants_all_stopped): Delete.
10667 (linux_wait_1): Don't call them.
10668 * server.c (handle_v_cont): Tag all threads as want-stopped.
10669 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10670 stopped as "client-wants-stopped".
10671
310444ac
PA
106722010-07-31 Pedro Alves <pedro@codesourcery.com>
10673
10674 * Makefile.in (signals_h): New.
10675 (server_h): Depend on it.
10676 (server.o): Don't depend on $(signals_def).
10677 (signals.o): Depend on $(signals_def).
10678
a19cae16
JK
106792010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10680
10681 * Makefile.in (signals_def): New.
10682 (server_h): Append include/gdb/signals.h and signals_def.
10683 (server.o): Append signals_def.
10684
30d50328
JK
106852010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10686
10687 * server.c (handle_target_event): Use target_signal_to_host for
10688 resume_info.sig initialization.
10689 * target.h (struct thread_resume) <sig>: New comment.
10690
5c3216e2
OS
106912010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10692
c6f46ca0
OS
10693 * server.c (handle_query): strcpy() the returned string from paddress()
10694 instead of sprintf().
5c3216e2
OS
10695 * utils.c (paddress): Return phex_nz().
10696
6bd31874
JB
106972010-07-07 Joel Brobecker <brobecker@adacore.com>
10698
10699 * server.c (handle_v_cont): Call mourn_inferior if process
10700 just exited.
10701 (myresume): Likewise.
10702
0fb4aa4b
PA
107032010-07-01 Pedro Alves <pedro@codesourcery.com>
10704
10705 Static tracepoints, and integration with UST.
10706
10707 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10708 * mem-break.c (uninsert_all_breakpoints)
10709 (reinsert_all_breakpoints): New.
10710 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10711 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10712 (gdb_agent_ust_loaded, helper_thread_id)
10713 (gdb_agent_helper_thread_id): New macros.
10714 (struct ipa_sym_addresses): Add addr_ust_loaded,
10715 addr_helper_thread_id, addr_cmd_buf.
10716 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10717 (in_process_agent_loaded_ust): New.
10718 (write_e_ust_not_loaded): New.
10719 (maybe_write_ipa_ust_not_loaded): New.
10720 (struct collect_static_trace_data_action): New.
10721 (enum tracepoint_type) <static_tracepoint>: New.
10722 (struct tracepoint) <handle>: Mention static tracepoints.
10723 (struct static_tracepoint_ctx): New.
10724 (CMD_BUF_SIZE): New.
10725 (add_tracepoint_action): Handle static tracepoint actions.
10726 (unprobe_marker_at): New.
10727 (clear_installed_tracepoints): Handle static tracepoints.
10728 (cmd_qtdp): Handle static tracepoints.
10729 (probe_marker_at): New.
10730 (cmd_qtstart): Handle static tracepoints.
10731 (response_tracepoint): Handle static tracepoints.
10732 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10733 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10734 (get_context_regcache): Handle static tracepoints.
10735 (do_action_at_tracepoint): Handle static tracepoint actions.
10736 (traceframe_find_block_type): Handle static trace data blocks.
10737 (traceframe_read_sdata): New.
10738 (download_tracepoints): Download static tracepoint actions.
10739 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10740 (GDB_PROBE_NAME): New.
10741 (ust_ops): New.
10742 (GET_UST_SYM): New.
10743 (USTF): New.
10744 (dlsym_ust): New.
10745 (ust_marker_to_static_tracepoint): New.
10746 (gdb_probe): New.
10747 (collect_ust_data_at_tracepoint): New.
10748 (gdb_ust_probe): New.
10749 (UNIX_PATH_MAX, SOCK_DIR): New.
10750 (gdb_ust_connect_sync_socket): New.
10751 (resume_thread, stop_thread): New.
10752 (run_inferior_command): New.
10753 (init_named_socket): New.
10754 (gdb_ust_socket_init): New.
10755 (cstr_to_hexstr): New.
10756 (next_st): New.
10757 (first_marker, next_marker): New.
10758 (response_ust_marker): New.
10759 (cmd_qtfstm, cmd_qtsstm): New.
10760 (unprobe_marker_at, probe_marker_at): New.
10761 (cmd_qtstmat, gdb_ust_thread): New.
10762 (gdb_ust_init): New.
10763 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10764 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10765 (ST_REGENTRY): New.
10766 (x86_64_st_collect_regmap): New.
10767 (X86_64_NUM_ST_COLLECT_GREGS): New.
10768 (AMD64_RIP_REGNUM): New.
10769 (supply_static_tracepoint_registers): New.
10770 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10771 (ST_REGENTRY): New.
10772 (i386_st_collect_regmap): New.
10773 (i386_NUM_ST_COLLECT_GREGS): New.
10774 (supply_static_tracepoint_registers): New.
10775 * server.c (handle_query): Handle qXfer:statictrace:read.
10776 <qSupported>: Report support for StaticTracepoints, and
10777 qXfer:statictrace:read features.
10778 * server.h (traceframe_read_sdata)
10779 (supply_static_tracepoint_registers): Declare.
10780 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10781 (unpack_varlen_hex): Include in IPA build.
10782 * Makefile.in (ustlibs, ustinc): New.
10783 (IPA_OBJS): Add remote-utils-ipa.o.
10784 ($(IPA_LIB)): Link -ldl and -lpthread.
10785 (UST_CFLAGS): New.
10786 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10787 * config.in, configure: Regenerate.
10788
9e4344e5
PA
107892010-06-20 Ian Lance Taylor <iant@google.com>
10790 Pedro Alves <pedro@codesourcery.com>
10791
10792 * linux-x86-low.c (always_true): Delete.
10793 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10794 trying to fool the compiler with always_true.
10795
c6beb2cb
PA
107962010-06-20 Pedro Alves <pedro@codesourcery.com>
10797
10798 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10799 conditions in gdbserver.
10800
d2ed6730
UW
108012010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10802
10803 * spu-low.c (spu_read_memory): Wrap around local store limit.
10804 (spu_write_memory): Likewise.
10805
4e29fb54
PA
108062010-06-15 Pedro Alves <pedro@codesourcery.com>
10807
10808 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10809 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10810 LONGEST uses.
10811 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10812 uses.
10813 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10814 uses with LONGEST uses.
10815
6a271cae
PA
108162010-06-14 Stan Shebs <stan@codesourcery.com>
10817 Pedro Alves <pedro@codesourcery.com>
10818
10819 Bytecode compiler.
10820
10821 * linux-x86-low.c: Include limits.h.
10822 (add_insns): New.
10823 (always_true): New.
10824 (EMIT_ASM): New.
10825 (EMIT_ASM32): New.
10826 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10827 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10828 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10829 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10830 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10831 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10832 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10833 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10834 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10835 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10836 (amd64_emit_void_call_2): New.
10837 (amd64_emit_ops): New.
10838 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10839 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10840 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10841 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10842 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10843 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10844 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10845 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10846 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10847 (i386_emit_stack_adjust, i386_emit_int_call_1)
10848 (i386_emit_void_call_2): New.
10849 (i386_emit_ops): New.
10850 (x86_emit_ops): New.
10851 (the_low_target): Install x86_emit_ops.
10852 * server.h (struct emit_ops): New.
10853 (get_raw_reg_func_addr): Declare.
10854 (current_insn_ptr, emit_error): Declare.
10855 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10856 (set_trace_state_variable_value): New defines.
10857 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10858 addr_get_trace_state_variable_value and
10859 addr_set_trace_state_variable_value.
10860 (symbol_list): New fields for get_raw_reg,
10861 get_trace_state_variable_value and set_trace_state_variable_value.
10862 (condfn): New typedef.
10863 (struct tracepoint): New field `compiled_cond'.
10864 (do_action_at_tracepoint): Clear compiled_cond.
10865 (get_trace_state_variable_value, set_trace_state_variable_value):
10866 Export in the IPA.
10867 (condition_true_at_tracepoint): If there's a compiled condition,
10868 run that.
10869 (current_insn_ptr, emit_error): New globals.
10870 (struct bytecode_address): New.
10871 (get_raw_reg_func_addr): New.
10872 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10873 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10874 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10875 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10876 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10877 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10878 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10879 (compile_tracepoint_condition, compile_bytecodes): New.
10880 * target.h (emit_ops): Forward declare.
10881 (struct target_ops): New field emit_ops.
10882 (target_emit_ops): New.
10883 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10884 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10885 * linux-low.c (linux_emit_ops): New.
10886 (linux_target_ops): Install it.
10887 * linux-low.h (struct linux_target_ops): New field emit_ops.
10888
92b72907
UW
108892010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10890
10891 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10892 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10893
fa593d66
PA
108942010-06-01 Pedro Alves <pedro@codesourcery.com>
10895 Stan Shebs <stan@codesourcery.com>
10896
10897 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10898 (all): Depend on $(extra_libraries).
10899 (install-only): Install the IPA.
10900 (IPA_OBJS, IPA_LIB): New.
10901 (clean): Remove the IPA lib.
10902 (IPAGENT_CFLAGS): New.
10903 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10904 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10905 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10906 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10907 * configure.ac: Check for atomic builtins support in the compiler.
10908 (IPA_DEPFILES, extra_libraries): Define.
10909 * configure.srv (ipa_obj): Add description.
10910 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10911 (i[34567]86-*-linux*): Set ipa_obj.
10912 (x86_64-*-linux*): Set ipa_obj.
10913 * linux-low.c (stabilizing_threads): New.
10914 (supports_fast_tracepoints): New.
10915 (linux_detach): Stabilize threads before detaching.
10916 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10917 the lwp is either not stabilizing, or is moving out of a jump pad.
10918 (linux_fast_tracepoint_collecting): New.
10919 (maybe_move_out_of_jump_pad): New.
10920 (enqueue_one_deferred_signal): New.
10921 (dequeue_one_deferred_signal): New.
10922 (linux_wait_for_event_1): If moving out of a jump pad, defer
10923 pending signals to later.
10924 (linux_stabilize_threads): New.
10925 (linux_wait_1): Check if threads need moving out of jump pads, and
10926 do it if so.
10927 (stuck_in_jump_pad_callback): New.
10928 (move_out_of_jump_pad_callback): New.
10929 (lwp_running): New.
10930 (linux_resume_one_lwp): Handle moving out of jump pads.
10931 (linux_set_resume_request): Dequeue deferred signals.
10932 (need_step_over_p): Also step over fast tracepoint jumps.
10933 (start_step_over): Also uninsert fast tracepoint jumps.
10934 (finish_step_over): Also reinsert fast tracepoint jumps.
10935 (linux_install_fast_tracepoint_jump): New.
10936 (linux_target_ops): Install linux_stabilize_threads and
10937 linux_install_fast_tracepoint_jump_pad.
10938 * linux-low.h (linux_target_ops) <get_thread_area,
10939 install_fast_tracepoint_jump_pad>: New fields.
10940 (struct lwp_info) <collecting_fast_tracepoint,
10941 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10942 (linux_get_thread_area): Declare.
10943 * linux-x86-low.c (jump_insn): New.
10944 (x86_get_thread_area): New.
10945 (append_insns): New.
10946 (push_opcode): New.
10947 (amd64_install_fast_tracepoint_jump_pad): New.
10948 (i386_install_fast_tracepoint_jump_pad): New.
10949 (x86_install_fast_tracepoint_jump_pad): New.
10950 (the_low_target): Install x86_get_thread_area and
10951 x86_install_fast_tracepoint_jump_pad.
10952 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10953 (struct fast_tracepoint_jump): New.
10954 (fast_tracepoint_jump_insn): New.
10955 (fast_tracepoint_jump_shadow): New.
10956 (find_fast_tracepoint_jump_at): New.
10957 (fast_tracepoint_jump_here): New.
10958 (delete_fast_tracepoint_jump): New.
10959 (set_fast_tracepoint_jump): New.
10960 (uninsert_fast_tracepoint_jumps_at): New.
10961 (reinsert_fast_tracepoint_jumps_at): New.
10962 (set_breakpoint_at): Use write_inferior_memory.
10963 (uninsert_raw_breakpoint): Use write_inferior_memory.
10964 (check_mem_read): Mask out fast tracepoint jumps.
10965 (check_mem_write): Mask out fast tracepoint jumps.
10966 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10967 (set_fast_tracepoint_jump): Declare.
10968 (delete_fast_tracepoint_jump)
10969 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10970 (reinsert_fast_tracepoint_jumps_at): Declare.
10971 * regcache.c: Don't compile many functions when building the
10972 in-process agent library.
10973 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10974 the register buffer in the heap.
10975 (free_register_cache): If the register buffer isn't owned by the
10976 regcache, don't free it.
10977 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10978 pre-existing register caches.
10979 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10980 type.
10981 (convert_ascii_to_int): : Constify `from' parameter type.
10982 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10983 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10984 the needed buffer in-place.
10985 (relocate_instruction): New.
10986 * server.c (handle_query) <qSymbols>: If the target supports
10987 tracepoints, give it a chance of looking up symbols. Report
10988 support for fast tracepoints.
10989 (handle_status): Stabilize threads.
10990 (process_serial_event): Adjust.
10991 * server.h (struct fast_tracepoint_jump): Forward declare.
10992 (struct process_info) <fast_tracepoint_jumps>: New field.
10993 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10994 (decode_X_packet, decode_M_packet): Adjust.
10995 (relocate_instruction): Declare.
10996 (in_process_agent_loaded): Declare.
10997 (tracepoint_look_up_symbols): Declare.
10998 (struct fast_tpoint_collect_status): Declare.
10999 (fast_tracepoint_collecting): Declare.
11000 (force_unlock_trace_buffer): Declare.
11001 (handle_tracepoint_bkpts): Declare.
11002 (initialize_low_tracepoint)
11003 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11004 * target.h (struct target_ops) <stabilize_threads,
11005 install_fast_tracepoint_jump_pad>: New fields.
11006 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11007 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11008 [HAVE_STDINT_H]: Include stdint.h.
11009 (trace_debug_1): Rename to ...
11010 (trace_vdebug): ... this.
11011 (trace_debug): Rename to ...
11012 (trace_debug_1): ... this. Add `level' parameter.
11013 (trace_debug): New.
11014 (ATTR_USED, ATTR_NOINLINE): New.
11015 (IP_AGENT_EXPORT): New.
11016 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11017 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11018 (about_to_request_buffer_space, trace_buffer_is_full)
11019 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11020 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11021 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11022 (traceframe_write_count, traceframes_created)
11023 (trace_state_variables)
11024 New renaming defines.
11025 (struct ipa_sym_addresses): New.
11026 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11027 (symbol_list): New.
11028 (ipa_sym_addrs): New.
11029 (all_tracepoint_symbols_looked_up): New.
11030 (in_process_agent_loaded): New.
11031 (write_e_ipa_not_loaded): New.
11032 (maybe_write_ipa_not_loaded): New.
11033 (tracepoint_look_up_symbols): New.
11034 (debug_threads) [IN_PROCESS_AGENT]: New.
11035 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11036 (UNKNOWN_SIDE_EFFECTS): New.
11037 (stop_tracing): New.
11038 (flush_trace_buffer): New.
11039 (stop_tracing_bkpt): New.
11040 (flush_trace_buffer_bkpt): New.
11041 (read_inferior_integer): New.
11042 (read_inferior_uinteger): New.
11043 (read_inferior_data_pointer): New.
11044 (write_inferior_data_pointer): New.
11045 (write_inferior_integer): New.
11046 (write_inferior_uinteger): New.
11047 (struct collect_static_trace_data_action): Delete.
11048 (enum tracepoint_type): New.
11049 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
11050 <actions_str, step_actions, step_actions_str>: Only include in
11051 GDBserver.
fa593d66
PA
11052 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11053 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11054 (tracepoints): Use IP_AGENT_EXPORT.
11055 (last_tracepoint): Don't include in the IPA.
11056 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11057 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11058 (alloced_trace_state_variables): New.
11059 (trace_state_variables): Use IP_AGENT_EXPORT.
11060 (traceframe_t): Delete unused variable.
11061 (circular_trace_buffer): Don't include in the IPA.
11062 (trace_buffer_start): Delete.
11063 (struct trace_buffer_control): New.
11064 (trace_buffer_free): Delete.
11065 (struct ipa_trace_buffer_control): New.
11066 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11067 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11068 New.
11069 (trace_buffer_ctrl): New.
11070 (TRACE_BUFFER_CTRL_CURR): New.
11071 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11072 Reimplement as macros.
11073 (trace_buffer_wrap): Delete.
11074 (traceframe_write_count, traceframe_read_count)
11075 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11076 (struct tracepoint_hit_ctx) <type>: New field.
11077 (struct fast_tracepoint_ctx): New.
11078 (memory_barrier): New.
11079 (cmpxchg): New.
11080 (record_tracepoint_error): Update atomically in the IPA.
11081 (clear_inferior_trace_buffer): New.
11082 (about_to_request_buffer_space): New.
11083 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11084 updating the same buffer.
11085 (add_tracepoint): Default the tracepoint's type to trap
11086 tracepoint, and orig_size to -1.
11087 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11088 internal variables.
11089 (create_trace_state_variable): New parameter `gdb'. Handle it.
11090 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11091 (cmd_qtdp): Handle fast tracepoints.
11092 (cmd_qtdv): Adjust.
11093 (max_jump_pad_size): New.
11094 (gdb_jump_pad_head): New.
11095 (get_jump_space_head): New.
11096 (claim_jump_space): New.
11097 (sort_tracepoints): New.
11098 (MAX_JUMP_SIZE): New.
11099 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11100 IPA.
11101 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11102 support. Upload fast traceframes, and delete internal IPA
11103 breakpoints.
11104 (stop_tracing_handler): New.
11105 (flush_trace_buffer_handler): New.
11106 (cmd_qtstop): Upload fast tracepoints.
11107 (response_tracepoint): Handle fast tracepoints.
11108 (tracepoint_finished_step): Upload fast traceframes. Set the
11109 tracepoint hit context's tracepoint type.
11110 (handle_tracepoint_bkpts): New.
11111 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11112 type. Add comment about fast tracepoints.
11113 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11114 non-existing action_str field.
11115 (get_context_regcache): Handle fast tracepoints.
11116 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11117 to the regcache.
11118 (fast_tracepoint_from_jump_pad_address): New.
11119 (fast_tracepoint_from_ipa_tpoint_address): New.
11120 (collecting_t): New.
11121 (force_unlock_trace_buffer): New.
11122 (fast_tracepoint_collecting): New.
11123 (collecting): New.
11124 (gdb_collect): New.
11125 (write_inferior_data_ptr): New.
11126 (target_tp_heap): New.
11127 (target_malloc): New.
11128 (download_agent_expr): New.
11129 (UALIGN): New.
11130 (download_tracepoints): New.
11131 (download_trace_state_variables): New.
11132 (upload_fast_traceframes): New.
11133 (IPA_FIRST_TRACEFRAME): New.
11134 (IPA_NEXT_TRACEFRAME_1): New.
11135 (IPA_NEXT_TRACEFRAME): New.
11136 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11137 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11138 (gdb_jump_pad_buffer_end): New.
11139 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11140 (initialize_tracepoint): Adjust.
11141 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11142 buffer. Initialize the low module.
11143 * utils.c (PREFIX, TOOLNAME): New.
11144 (malloc_failure): Use PREFIX.
11145 (error): In the IPA, an error causes an exit.
11146 (fatal, warning): Use PREFIX.
11147 (internal_error): Use TOOLNAME.
11148 (NUMCELLS): Increase to 10.
11149 * configure, config.in: Regenerate.
11150
d149dd1d
PA
111512010-06-01 Pedro Alves <pedro@codesourcery.com>
11152
11153 * server.c (handle_query) <qSupported>: Do two passes over the
11154 qSupported string to avoid nesting strtok.
11155
f6528abd
JK
111562010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11157
11158 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11159 (CDEPS): New.
11160 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11161 -Wl,--dynamic-list.
11162 * configure: Regenerate.
11163 * proc-service.list: New.
11164
ca2a87a0
JK
111652010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11166
11167 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11168 New comment.
11169
363a6e9f
OS
111702010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11171
11172 * gdbreplay.c (remote_open): Check error return from socket() call by
11173 its equality to -1 not by it being negative.
11174 * remote-utils.c (remote_open): Likewise.
11175
d23b6cb1
PA
111762010-05-23 Pedro Alves <pedro@codesourcery.com>
11177
11178 * config.h: Regenerate.
11179
28d3cf85
MK
111802010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11181
11182 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11183 doesn't provide PTRACE_GET_THREAD_AREA.
11184
fea36a59
MK
111852010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11186
11187 * linux-m68k-low.c: Include <asm/ptrace.h>
11188 (ps_get_thread_area): Implement.
11189
24b066ba
DE
111902010-05-03 Doug Evans <dje@google.com>
11191
11192 * event-loop.c (struct callback_event): New struct.
11193 (callback_list): New global.
11194 (append_callback_event, delete_callback_event): New functions.
11195 (process_callback): New function.
11196 (start_event_loop): Call it.
11197 * remote-utils.c (NOT_SCHEDULED): Define.
11198 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11199 moved out of readchar.
11200 (readchar): Rewrite. Call reschedule before returning.
11201 (reset_readchar): New function.
11202 (remote_close): Call it.
11203 (process_remaining, reschedule): New functions.
11204 * server.h (callback_handler_func): New typedef.
11205 (append_callback_event, delete_callback_event): Declare.
11206
9836d6ea
PA
112072010-05-03 Pedro Alves <pedro@codesourcery.com>
11208
11209 * proc-service.c (ps_pglobal_lookup): Use
11210 thread_db_look_up_one_symbol.
11211 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11212 parameter. Use it instead of all_symbols_looked_up.
11213 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11214 field.
11215 (all_symbols_looked_up): Don't declare.
11216 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11217 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11218 field.
11219 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11220 Set all_symbols_looked_up here.
11221 (thread_db_look_up_one_symbol): New.
11222 (thread_db_get_tls_address): Adjust.
11223 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11224 thread_db object on the heap, and tentatively set it in the
11225 process structure.
11226 (thread_db_init): Don't set all_symbols_looked_up here.
11227 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11228
7984d532
PA
112292010-05-03 Pedro Alves <pedro@codesourcery.com>
11230
11231 * linux-low.c (linux_kill, linux_detach): Adjust.
11232 (status_pending_p_callback): Remove redundant statement. Check
11233 for !TARGET_WAITIKIND_IGNORE, instead of
11234 TARGET_WAITKIND_STOPPED.
11235 (handle_tracepoints): Make sure LWP is locked. Adjust.
11236 (linux_wait_for_event_1): Adjust.
11237 (linux_cancel_breakpoints): New.
11238 (unsuspend_one_lwp): New.
11239 (unsuspend_all_lwps): New.
11240 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11241 (send_sigstop_callback): Change return type to int, add new
11242 `except' parameter and handle it.
11243 (suspend_and_send_sigstop_callback): New.
11244 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11245 pass them down. If SUSPEND, also increment the lwp's suspend
11246 count.
11247 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11248 (need_step_over_p): Don't consider suspended LWPs.
11249 (start_step_over): Adjust.
11250 (proceed_one_lwp): Change return type to int, add new `except'
11251 parameter and handle it.
11252 (unsuspend_and_proceed_one_lwp): New.
11253 (proceed_all_lwps): Use find_inferior instead of
11254 for_each_inferior.
11255 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11256 also decrement the suspend count of LWPs. Pass `except' down,
11257 instead of hacking its suspend count.
11258 (linux_pause_all): Add `freeze' parameter. Adjust.
11259 (linux_unpause_all): New.
11260 (linux_target_ops): Install linux_unpause_all.
11261 * server.c (handle_status): Adjust.
11262 * target.h (struct target_ops): New fields `unpause_all' and
11263 `cancel_breakpoints'. Add new parameter to `pause_all'.
11264 (pause_all): Add new `freeze' parameter.
11265 (unpause_all): New.
11266 (cancel_breakpoints): New.
11267 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11268 cancel breakpoints.
11269 (cmd_qtstart): Pause threads.
11270 (stop_tracing): Pause threads, and cancel breakpoints.
11271 * win32-low.c (win32_target_ops): Adjust.
11272
e471f25b
PA
112732010-05-03 Pedro Alves <pedro@codesourcery.com>
11274
11275 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11276 the inferior right away from here...
11277 (linux_wait_1): ... to here, and adjust to check the thread's
11278 last_resume_kind instead of the lwp's step or stop_expected flags.
11279
1915ef4f
PA
112802010-05-02 Pedro Alves <pedro@codesourcery.com>
11281
11282 * README: Use consistent `GDB' and `GDBserver' spellings.
11283
f9e39928
PA
112842010-05-02 Pedro Alves <pedro@codesourcery.com>
11285
11286 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11287 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11288 (linux_detach_one_lwp): Assume the lwp is stopped.
11289 (any_thread_of): Delete.
11290 (linux_detach): Stop all lwps here. Don't blindly delete all
11291 breakpoints.
11292 (delete_lwp_callback): New.
11293 (linux_mourn): Delete all lwps of the process that is gone.
11294 (linux_wait_1): Don't delete the last lwp of the process here.
11295 * mem-break.h (mark_breakpoints_out): Declare.
11296 * mem-break.c (mark_breakpoints_out): New.
11297 (free_all_breakpoints): Use it.
11298 * server.c (handle_target_event): If the process is gone, mark
11299 breakpoints out.
11300 * thread-db.c (struct thread_db) <create_bp>: New field.
11301 (thread_db_enable_reporting): Fix prototype. Store a thread event
11302 breakpoint reference in the thread_db struct.
11303 (thread_db_load_search): Clear the thread_db object.
11304 (try_thread_db_load_1): Ditto.
11305 (switch_to_process): New.
11306 (disable_thread_event_reporting): Use it.
11307 (remove_thread_event_breakpoints): New.
11308 (thread_db_detach, thread_db_mourn): Use it.
11309
1e7fc18c
PA
113102010-05-01 Pedro Alves <pedro@codesourcery.com>
11311
11312 * linux-low.c (linux_enable_event_reporting): New.
11313 (linux_wait_for_event_1, handle_extended_wait): Use it.
11314
02fc4de7
PA
113152010-04-30 Pedro Alves <pedro@codesourcery.com>
11316
11317 * linux-low.c (linux_kill_one_lwp, linux_kill)
11318 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11319 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11320 SIGSTOP even if the LWP is stopped.
11321 (send_sigstop_callback): New.
11322 (stop_all_lwps): Use send_sigstop_callback instead.
11323 (linux_resume_one_thread): Adjust.
11324 (proceed_one_lwp): Still proceed an LWP that the client has
11325 requested to stop, if we haven't reported it as stopped yet. Make
11326 sure that LWPs the client want stopped, have a pending SIGSTOP.
11327
bc3b5632
DE
113282010-04-26 Doug Evans <dje@google.com>
11329
ae1ada35
DE
11330 * server.c (handle_general_set): Make static.
11331
bc3b5632
DE
11332 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11333 Print received char after testing for error/eof instead of before.
11334 (input_interrupt): Tweak comment.
11335
65730243
DE
113362010-04-23 Doug Evans <dje@google.com>
11337
11338 * server.c (start_inferior): Print inferior argv if --debug.
11339
a8ae7dc0
AR
113402010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11341
11342 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11343 * nto-x86-low.c: Include server.h
11344
1c07cc19
PM
113452010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11346
11347 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11348 be consistent with other sources of this directory.
11349 (init_registers_amd64): Correct name of source file of this function
11350 in the comment.
11351
e0a61e09
PM
113522010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11353
11354 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11355 64-bit executables.
11356
54709339
PM
113572010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11358
11359 * win32-i386-low.c: Add 64-bit support.
11360 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11361 (init_registers_amd64): Declare.
11362 (mappings): Add 64-bit version of array.
11363 (init_windows_x86): New function.
11364 (the_low_target): Change init_arch field to init_windows_x86.
11365
e8f0053d
PM
113662010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11367
11368 * win32-low.c: Adapt to support also 64-bit architecture.
11369 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11370 (get_image_name): Use SIZE_T type for local variable `done'.
11371 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11372 (toolhelp_get_dll_name): Idem.
11373 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11374 Use uintptr_t typecast to avoid warning.
11375 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11376 (handle_exception): Use phex_nz to avoid warning.
11377 (win32_wait): Remove unused local variable `process'.
11378
c481e77e
PM
113792010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11380
11381 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11382 `amd64-avx.o'.
11383
12ea4b69
PM
113842010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11385
11386 * configure.ac: Use `ws2_32' library for srv_mingw.
11387 * configure: Regenerate.
11388 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11389 * remote-utils.c: Likewise.
11390
f6d1620c
L
113912010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11392
11393 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11394 if __x86_64__ is defined.
11395
8e642873
PM
113962010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11397
11398 * configure: Regenerate.
11399
711e434b
PM
114002010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11401
11402 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11403 * target.h (target_ops): New get_tib_address field.
11404 * win32-low.h (win32_thread_info): Add thread_local_base field.
11405 * win32-low.c (child_add_thread): Add tlb argument.
11406 Set thread_local_base field to TLB.
11407 (get_child_debug_event): Adapt to child_add_thread change.
11408 (win32_get_tib_address): New function.
11409 (win32_target_ops): Set get_tib_address field to
11410 win32_get_tib_address.
11411 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11412
505106cd
PA
114132010-04-12 Pedro Alves <pedro@codesourcery.com>
11414
505106cd
PA
11415 * linux-low.c (linux_mourn): Also remove the process.
11416 * server.c (handle_target_event): Don't remove the process here.
11417 * nto-low.c (nto_mourn): New.
11418 (nto_target_ops): Install it.
11419 * spu-low.c (spu_mourn): New.
11420 (spu_target_ops): Install it.
11421 * win32-low.c (win32_mourn): New.
11422 (win32_target_ops): Install it.
11423
e8470a06
PA
114242010-04-12 Pedro Alves <pedro@codesourcery.com>
11425
11426 * server.h (buffer_xml_printf): Remove redundant `;'.
11427
45ba0d02
PA
114282010-04-12 Pedro Alves <pedro@codesourcery.com>
11429
11430 * regcache.c (set_register_cache): Invalidate regcaches before
11431 changing the register cache layout.
11432 (regcache_invalidate_one): Allow a NULL regcache.
11433 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11434 regcaches before changing the register cache layout or the target
11435 regsets.
11436
59e04013
L
114372010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11438
11439 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11440 variable warning on Linux/x86-64.
11441
8336d594
PA
114422010-04-11 Pedro Alves <pedro@codesourcery.com>
11443
11444 GDBserver disconnected tracing support.
11445
11446 * linux-low.c (linux_remove_process): Delete.
11447 (add_lwp): Don't set last_resume_kind here.
11448 (linux_kill): Use `mourn'.
11449 (linux_detach): Use `thread_db_detach', and `mourn'.
11450 (linux_mourn): New.
11451 (linux_attach_lwp_1): Adjust comment.
11452 (linux_attach): last_resume_kind moved the thread_info; adjust.
11453 (status_pending_p_callback): Adjust.
11454 (linux_wait_for_event_1): Adjust.
11455 (count_events_callback, select_singlestep_lwp_callback)
11456 (select_event_lwp_callback, cancel_breakpoints_callback)
11457 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11458 (proceed_one_lwp): Adjust.
11459 (linux_async): Add debug output.
11460 (linux_thread_stopped): New.
11461 (linux_pause_all): New.
11462 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11463 linux_pause_all.
11464 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11465 (thread_db_free): Delete declaration.
11466 (thread_db_detach, thread_db_mourn): Declare.
11467 * thread-db.c (thread_db_init): Use thread_db_mourn.
11468 (thread_db_free): Delete, split in two.
11469 (disable_thread_event_reporting): New.
11470 (thread_db_detach): New.
11471 (thread_db_mourn): New.
11472
11473 * server.h (struct thread_info) <last_resume_kind>: New field.
11474 <attached>: Add comment.
11475 <gdb_detached>: New field.
11476 (handler_func): Change return type to int.
11477 (handle_serial_event, handle_target_event): Ditto.
11478 (gdb_connected): Declare.
11479 (tracing): Delete.
11480 (disconnected_tracing): Declare.
11481 (stop_tracing): Declare.
11482
11483 * server.c (handle_query) <qSupported>: Report support for
11484 disconnected tracing.
11485 (queue_stop_reply_callback): Account for running threads.
11486 (gdb_wants_thread_stopped): New.
11487 (gdb_wants_all_threads_stopped): New.
11488 (gdb_reattached_process): New.
11489 (handle_status): Clear the `gdb_detached' flag of all processes.
11490 In all-stop, stop all threads.
11491 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11492 (process_serial_event): If the remote connection breaks, or if an
11493 exit was forced with "monitor exit", force an event loop exit.
11494 Handle disconnected tracing on detach.
11495 (handle_serial_event): Adjust.
11496 (handle_target_event): If GDB isn't connected, forward events back
11497 to the inferior, unless the last process exited, in which case,
11498 exit gdbserver. Adjust interface.
11499
11500 * remote-utils.c (remote_open): Don't block in accept. Instead
11501 register an event loop source on the listen socket file
11502 descriptor. Refactor bits into ...
11503 (listen_desc): ... this new global.
11504 (gdb_connected): ... this new function.
11505 (enable_async_notification): ... this new function.
11506 (handle_accept_event): ... this new function.
11507 (remote_close): Clear remote_desc.
11508
11509 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11510
11511 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11512 New fields.
11513 (mourn_inferior): Define.
11514 (target_process_qsupported): Avoid the dangling else problem.
11515 (thread_stopped): Define.
11516 (pause_all): Define.
11517 (target_waitstatus_to_string): Declare.
11518 * target.c (target_waitstatus_to_string): New.
11519
11520 * tracepoint.c (tracing): Make extern.
11521 (disconnected_tracing): New.
11522 (stop_tracing): Make extern. Handle tracing stops due to GDB
11523 disconnecting.
11524 (cmd_qtdisconnected): New.
11525 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11526 (handle_tracepoint_general_set): Handle QTDisconnected.
11527
11528 * event-loop.c (event_handler_func): Change return type to int.
11529 (process_event): Bail out if the event handler wants the event
11530 loop to stop.
11531 (handle_file_event): Ditto.
11532 (start_event_loop): Bail out if the event handler wants the event
11533 loop to stop.
11534
11535 * nto-low.c (nto_target_ops): Adjust.
11536 * spu-low.c (spu_wait): Don't remove the process here.
11537 (spu_target_ops): Adjust.
11538 * win32-low.c (win32_wait): Don't remove the process here.
11539 (win32_target_ops): Adjust.
11540
5d267c4c
PA
115412010-04-11 Pedro Alves <pedro@codesourcery.com>
11542
11543 * regcache.c (realloc_register_cache): Invalidate inferior's
11544 regcache before recreating it.
11545
623ccd72
PA
115462010-04-09 Pedro Alves <pedro@codesourcery.com>
11547
11548 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11549
219f2f23
PA
115502010-04-09 Stan Shebs <stan@codesourcery.com>
11551 Pedro Alves <pedro@codesourcery.com>
11552
11553 * server.h (LONGEST): New.
11554 (struct thread_info) <while_stepping>: New field.
11555 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11556 Declare.
11557 (initialize_tracepoint, handle_tracepoint_general_set)
11558 (handle_tracepoint_query, tracepoint_finished_step)
11559 (tracepoint_was_hit, release_while_stepping_state_list):
11560 (current_traceframe): Declare.
11561 * server.c (handle_general_set): Handle tracepoint packets.
11562 (read_memory): New.
11563 (write_memory): New.
11564 (handle_search_memory_1): Use read_memory.
11565 (handle_query): Report support for conditional tracepoints, trace
11566 state variables, and tracepoint sources. Handle tracepoint
11567 queries.
11568 (main): Initialize the tracepoints module.
11569 (process_serial_event): Handle traceframe reads/writes.
11570
11571 * linux-low.c (handle_tracepoints): New.
11572 (linux_wait_1): Call it.
11573 (linux_resume_one_lwp): Handle while-stepping.
11574 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11575 (linux_target_ops): Install them.
11576 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11577 New field.
11578 * linux-x86-low.c (x86_supports_tracepoints): New.
11579 (the_low_target). Install it.
11580
11581 * mem-break.h (delete_breakpoint): Declare.
11582 * mem-break.c (delete_breakpoint): Make external.
11583
11584 * target.h (struct target_ops): Add `supports_tracepoints',
11585 `read_pc', and `write_pc' fields.
11586 (target_supports_tracepoints): Define.
11587 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11588 (phex_nz): New.
11589
11590 * regcache.h (struct regcache) <registers_owned>: New field.
11591 (init_register_cache, regcache_cpy): Declare.
11592 (regcache_read_pc, regcache_write_pc): Declare.
11593 (register_cache_size): Declare.
11594 (supply_regblock): Declare.
11595 * regcache.c (init_register_cache): New.
11596 (new_register_cache): Use it.
11597 (regcache_cpy): New.
11598 (register_cache_size): New.
11599 (supply_regblock): New.
11600 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 11601
219f2f23
PA
11602 * tracepoint.c: New.
11603
11604 * Makefile.in (OBS): Add tracepoint.o.
11605 (tracepoint.o): New rule.
11606
3a13a53b
L
116072010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11608
11609 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11610 (i386-mmx.o): New.
11611 (i386-mmx.c): Likewise.
11612 (i386-mmx-linux.o): Likewise.
11613 (i386-mmx-linux.c): Likewise.
11614
11615 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11616 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11617 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11618 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11619
11620 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11621 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11622 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11623
1570b33e
L
116242010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11625
11626 * Makefile.in (clean): Updated.
11627 (i386-avx.o): New.
11628 (i386-avx.c): Likewise.
11629 (i386-avx-linux.o): Likewise.
11630 (i386-avx-linux.c): Likewise.
11631 (amd64-avx.o): Likewise.
11632 (amd64-avx.c): Likewise.
11633 (amd64-avx-linux.o): Likewise.
11634 (amd64-avx-linux.c): Likewise.
11635
11636 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11637 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11638 (srv_amd64_regobj): Add amd64-avx.o.
11639 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11640 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11641 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11642 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11643 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11644 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11645 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11646
11647 * i387-fp.c: Include "i386-xstate.h".
11648 (i387_xsave): New.
11649 (i387_cache_to_xsave): Likewise.
11650 (i387_xsave_to_cache): Likewise.
11651 (x86_xcr0): Likewise.
11652
11653 * i387-fp.h (i387_cache_to_xsave): Likewise.
11654 (i387_xsave_to_cache): Likewise.
11655 (x86_xcr0): Likewise.
11656
11657 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11658 * linux-crisv32-low.c (target_regsets): Likewise.
11659 * linux-m68k-low.c (target_regsets): Likewise.
11660 * linux-mips-low.c (target_regsets): Likewise.
11661 * linux-ppc-low.c (target_regsets): Likewise.
11662 * linux-s390-low.c (target_regsets): Likewise.
11663 * linux-sh-low.c (target_regsets): Likewise.
11664 * linux-sparc-low.c (target_regsets): Likewise.
11665 * linux-xtensa-low.c (target_regsets): Likewise.
11666
11667 * linux-low.c: Include <sys/uio.h>.
11668 (regsets_fetch_inferior_registers): Support nt_type.
11669 (regsets_store_inferior_registers): Likewise.
11670 (linux_process_qsupported): New.
11671 (linux_target_ops): Add linux_process_qsupported.
11672
11673 * linux-low.h (regset_info): Add nt_type.
11674 (linux_target_ops): Add process_qsupported.
11675
11676 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11677 and <sys/uio.h>.
11678 (init_registers_i386_avx_linux): New.
11679 (init_registers_amd64_avx_linux): Likewise.
11680 (xmltarget_i386_linux_no_xml): Likewise.
11681 (xmltarget_amd64_linux_no_xml): Likewise.
11682 (PTRACE_GETREGSET): Likewise.
11683 (PTRACE_SETREGSET): Likewise.
11684 (x86_fill_xstateregset): Likewise.
11685 (x86_store_xstateregset): Likewise.
11686 (use_xml): Likewise.
11687 (x86_linux_update_xmltarget): Likewise.
11688 (x86_linux_process_qsupported): Likewise.
11689 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11690 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11691 init_registers_i386_linux here. Call
11692 x86_linux_update_xmltarget.
11693 (the_low_target): Add x86_linux_process_qsupported.
11694
11695 * server.c (handle_query): Call target_process_qsupported.
11696
11697 * target.h (target_ops): Add process_qsupported.
11698 (target_process_qsupported): New.
11699
fc7238bb
PA
117002010-04-03 Pedro Alves <pedro@codesourcery.com>
11701
11702 * inferiors.c (add_thread): Set last_status kind to
11703 TARGET_WAITKIND_IGNORE.
11704 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11705 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11706 (linux_wait_1): Move `thread' local definition to block that uses
11707 it. Don't NULL initialize `event_child'.
11708 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11709 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11710 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11711
bdabb078
PA
117122010-04-01 Pedro Alves <pedro@codesourcery.com>
11713
11714 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11715 an extended waitstatus, or by a watchpoint.
11716 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11717 thread was stepping or has been stopped by a watchpoint.
11718
d3bbe7a0
PA
117192010-04-01 Pedro Alves <pedro@codesourcery.com>
11720
11721 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11722 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11723 of another, then delete the previous, and validate all
11724 breakpoints.
11725 (validate_inserted_breakpoint): New.
11726 (delete_disabled_breakpoints): New.
11727 (validate_breakpoints): New.
11728 (check_mem_read): Validate breakpoints before trusting their
11729 shadow. Delete disabled breakpoints.
11730 (check_mem_write): Validate breakpoints before trusting they
11731 should be inserted. Delete disabled breakpoints.
11732 * mem-break.h (validate_breakpoints):
11733 * server.c (handle_query): Validate breakpoints when we see a
11734 qSymbol query.
11735
8b07ae33
PA
117362010-04-01 Pedro Alves <pedro@codesourcery.com>
11737
11738 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11739 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11740 if we could tell there's a GDB breakpoint at stop_pc.
11741 (need_step_over_p): Don't do a step over if we find a GDB
11742 breakpoint at the resume PC.
11743
11744 * mem-break.c (struct raw_breakpoint): New.
11745 (enum bkpt_type): New type `gdb_breakpoint'.
11746 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11747 fields. New field `raw'.
11748 (find_raw_breakpoint_at): New.
11749 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11750 breakpoint instead.
11751 (set_breakpoint_at): Adjust.
11752 (delete_raw_breakpoint): New.
11753 (release_breakpoint): New.
11754 (delete_breakpoint): Rename to...
11755 (delete_breakpoint_1): ... this. Add proc parameter. Use
11756 release_breakpoint. Return ENOENT.
11757 (delete_breakpoint): Reimplement.
11758 (find_breakpoint_at): Delete.
11759 (find_gdb_breakpoint_at): New.
11760 (delete_breakpoint_at): Delete.
11761 (set_gdb_breakpoint_at): New.
11762 (delete_gdb_breakpoint_at): New.
11763 (gdb_breakpoint_here): New.
11764 (set_reinsert_breakpoint): Use release_breakpoint.
11765 (uninsert_breakpoint): Rename to ...
11766 (uninsert_raw_breakpoint): ... this.
11767 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11768 (reinsert_raw_breakpoint): Change parameter type to
11769 raw_breakpoint.
11770 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11771 instead.
11772 (check_breakpoints): Adjust. Use release_breakpoint.
11773 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11774 (breakpoint_inserted_here): Ditto.
11775 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11776 Don't trust the breakpoint's shadow if it is not inserted.
11777 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11778 (delete_all_breakpoints): Adjust.
11779 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11780 use delete_breakpoint_1.
11781
11782 * mem-break.h (breakpoints_supported): Delete declaration.
11783 (set_gdb_breakpoint_at): Declare.
11784 (gdb_breakpoint_here): Declare.
11785 (delete_breakpoint_at): Delete.
11786 (delete_gdb_breakpoint_at): Declare.
11787
11788 * server.h (struct raw_breakpoint): Forward declare.
11789 (struct process_info): New field `raw_breakpoints'.
11790
11791 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11792 breakpoints.
11793
6bf5e0ba
PA
117942010-03-24 Pedro Alves <pedro@codesourcery.com>
11795
11796 * linux-low.c (status_pending_p_callback): Fix comment.
11797 (linux_wait_for_event_1): Move most of the internal breakpoint
11798 handling from here...
11799 (linux_wait_1): ... to here.
11800 (count_events_callback): New.
11801 (select_singlestep_lwp_callback): New.
11802 (select_event_lwp_callback): New.
11803 (cancel_breakpoints_callback): New.
11804 (select_event_lwp): New.
11805 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11806 priority to all LWPs that have had events that should be reported
11807 to the client. Cancel breakpoints when about to reporting the
11808 event to the client, not while stopping lwps. No longer cancel
11809 finished single-steps here.
11810 (cancel_finished_single_step): Delete.
11811 (cancel_finished_single_steps): Delete.
11812
414a389f
PA
118132010-03-24 Pedro Alves <pedro@codesourcery.com>
11814
11815 * mem-break.c (enum bkpt_type): New.
11816 (struct breakpoint): New field `type'.
11817 (set_breakpoint_at): Change return type to struct breakpoint
11818 pointer. Set type to `other_breakpoint' by default.
11819 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11820 in the breakpoint list.
11821 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11822 (reinsert_breakpoint): Rename to ...
11823 (reinsert_raw_breakpoint): ... this.
11824 (reinsert_breakpoints_at): Adjust.
11825 * mem-break.h (struct breakpoint): Declare.
11826 (set_breakpoint_at): Change return type to struct breakpoint
11827 pointer.
11828
2280c721
PA
118292010-03-24 Pedro Alves <pedro@codesourcery.com>
11830
11831 * server.c (handle_query): Assign, not compare.
11832
d50171e4
PA
118332010-03-24 Pedro Alves <pedro@codesourcery.com>
11834
11835 Teach linux gdbserver to step-over-breakpoints.
11836
11837 * linux-low.c (can_hardware_single_step): New.
11838 (supports_breakpoints): New.
11839 (handle_extended_wait): If stopping threads, read the stop pc of
11840 the new cloned LWP.
11841 (get_pc): New.
11842 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11843 low target doesn't support retrieving the PC.
11844 (add_lwp): Set last_resume_kind to resume_continue.
11845 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11846 (linux_attach): Don't clear stop_expected. Set the lwp's
11847 last_resume_kind to resume_stop.
11848 (linux_detach_one_lwp): Don't check for removed breakpoints.
11849 (check_removed_breakpoint): Delete.
11850 (status_pending_p): Rename to ...
11851 (status_pending_p_callback): ... this. Don't check for removed
11852 breakpoints. Don't consider threads that are stopped from GDB's
11853 perspective.
11854 (linux_wait_for_lwp): Always read the stop_pc here.
11855 (cancel_breakpoint): New.
11856 (step_over_bkpt): New global.
11857 (linux_wait_for_event_1): Implement stepping over breakpoints.
11858 (gdb_wants_lwp_stopped): New.
11859 (gdb_wants_all_stopped): New.
11860 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11861 single-step traps here. Store the thread's last reported target
11862 wait status.
11863 (send_sigstop): Don't clear stop_expected. Always set it,
11864 instead.
11865 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11866 (cancel_finished_single_step): New.
11867 (cancel_finished_single_steps): New.
11868 (wait_for_sigstop): Don't cancel finished single-step traps here.
11869 (linux_resume_one_lwp): Don't check for removed breakpoints.
11870 Don't set `step' on non-hardware step archs.
11871 (linux_set_resume_request): Ignore resume_stop requests if already
11872 stopping or stopped. Set the lwp's last_resume_kind.
11873 (resume_status_pending_p): Don't check for removed breakpoints.
11874 (need_step_over_p): New.
11875 (start_step_over): New.
11876 (finish_step_over): New.
11877 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11878 requests. Clear the thread's last reported target waitstatus.
11879 Don't use the `suspended' flag. Don't consider pending breakpoints.
11880 (linux_resume): Start a step-over if necessary.
11881 (proceed_one_lwp): New.
11882 (proceed_all_lwps): New.
11883 (unstop_all_lwps): New.
11884 * linux-low.h (struct lwp_info): Rewrite comment for the
11885 `suspended' flag. Add the `stop_pc' field. Delete the
11886 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11887 Add `'last_resume_kind' and `need_step_over' fields.
11888 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11889 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11890 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11891 (set_raw_breakpoint_at): New.
11892 (set_breakpoint_at): Rewrite to use it.
11893 (reinsert_breakpoint_handler): Delete.
11894 (set_reinsert_breakpoint): New.
11895 (reinsert_breakpoint_by_bp): Delete.
11896 (delete_reinsert_breakpoints): New.
11897 (uninsert_breakpoint): Rewrite.
11898 (uninsert_breakpoints_at): New.
11899 (reinsert_breakpoint): Rewrite.
11900 (reinsert_breakpoints_at): New.
11901 (check_breakpoints): Rewrite.
11902 (breakpoint_here): New.
11903 (breakpoint_inserted_here): New.
11904 (check_mem_read): Adjust.
11905 * mem-break.h (breakpoints_supported, breakpoint_here)
11906 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11907 (reinsert_breakpoint_by_bp): Delete declaration.
11908 (delete_reinsert_breakpoints): Declare.
11909 (reinsert_breakpoint): Delete declaration.
11910 (reinsert_breakpoints_at): Declare.
11911 (uninsert_breakpoint): Delete declaration.
11912 (uninsert_breakpoints_at): Declare.
11913 (check_breakpoints): Adjust prototype.
11914 * server.h: Adjust include order.
11915 (struct thread_info): Declare here. Add a `last_status' field.
11916
30ba68cb
MS
119172010-03-23 Michael Snyder <msnyder@vmware.com>
11918
11919 * server.c (crc32): New function.
11920 (handle_query): Add handling for 'qCRC:' request.
11921
b9a881c2
PA
119222010-03-23 Pedro Alves <pedro@codesourcery.com>
11923
11924 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11925 lwp had been stopped by a watchpoint.
11926
e92d13d5
PA
119272010-03-16 Pedro Alves <pedro@codesourcery.com>
11928
11929 * server.h (internal_error): Declare.
11930 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11931 * utils.c (internal_error): New function.
11932
64daa791
AS
119332010-03-15 Andreas Schwab <schwab@redhat.com>
11934
11935 * configure.srv: Fix typo setting srv_regobj.
11936
f52cd8cd
PA
119372010-03-15 Pedro Alves <pedro@codesourcery.com>
11938
11939 * linux-low.c (fetch_register): Avoid passing a non string literal
11940 format to `error'.
11941 (usr_store_inferior_registers): Ditto.
11942
93ae6fdc
PA
119432010-03-14 Pedro Alves <pedro@codesourcery.com>
11944
11945 * linux-low.c (linux_write_memory): Bail out early if peeking
11946 memory failed.
11947
c3adc08c
PA
119482010-03-14 Pedro Alves <pedro@codesourcery.com>
11949
11950 * linux-low.h (struct lwp_info): New fields
11951 `stopped_by_watchpoint' and `stopped_data_address'.
11952 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11953 here, and cache them in the lwp object.
11954 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11955 directly.
11956 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11957 field.
11958 (linux_stopped_by_watchpoint): Rewrite.
11959 (linux_stopped_data_address): Rewrite.
11960
bce522a2
PA
119612010-03-06 Simo Melenius <simo.melenius@iki.fi>
11962
11963 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11964 switching the current inferior, not before.
11965
90884b2b
L
119662010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11967
11968 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11969 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11970 i386-linux.c and amd64-linux.c.
11971 (reg-i386.o): Removed.
11972 (reg-i386.c): Likewise.
11973 (reg-i386-linux.o): Likewise.
11974 (reg-i386-linux.c): Likewise.
11975 (reg-x86-64.o): Likewise.
11976 (reg-x86-64.c): Likewise.
11977 (reg-x86-64-linux.o): Likewise.
11978 (reg-x86-64-linux.c): Likewise.
11979 (i386.o): New.
11980 (i386.c): Likewise.
11981 (i386-linux.o): Likewise.
11982 (i386-linux.c): Likewise.
11983 (amd64.o): Likewise.
11984 (amd64.c): Likewise.
11985 (amd64-linux.o): Likewise.
11986 (amd64-linux.c): Likewise.
11987
11988 * configure.srv (srv_i386_regobj): New.
11989 (srv_i386_linux_regobj): Likewise.
11990 (srv_amd64_regobj): Likewise.
11991 (srv_amd64_linux_regobj): Likewise.
11992 (srv_i386_32bit_xmlfiles): Likewise.
11993 (srv_i386_64bit_xmlfiles): Likewise.
11994 (srv_i386_xmlfiles): Likewise.
11995 (srv_amd64_xmlfiles): Likewise.
11996 (srv_i386_linux_xmlfiles): Likewise.
11997 (srv_amd64_linux_xmlfiles): Likewise.
11998 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11999 srv_xmlfiles to $srv_i386_xmlfiles.
12000 (i[34567]86-*-mingw32ce*): Likewise.
12001 (i[34567]86-*-mingw*): Likewise.
12002 (i[34567]86-*-nto*): Likewise.
12003 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12004 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12005 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12006 (x86_64-*-linux*): Likewise.
12007
12008 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12009 (init_registers_amd64_linux): New.
12010 (x86_arch_setup): Replace init_registers_x86_64_linux with
12011 init_registers_amd64_linux.
12012
193f13e6
MK
120132010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12014
12015 * configure.ac: Check for libdl. If it is not available link against
12016 static libthread_db.
12017 * configure: Regenerate.
12018
85d721b8
PA
120192010-02-22 Pedro Alves <pedro@codesourcery.com>
12020
12021 PR9605
12022
12023 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12024 handing a read watchpoint.
12025 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12026
6076632b
DE
120272010-02-12 Doug Evans <dje@google.com>
12028
12029 * linux-low.c (linux_supports_tracefork_flag): Document.
12030 (linux_look_up_symbols): Add comment.
12031
3327ccf7
L
120322010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12033
12034 * regcache.c (supply_register): Clear regcache if buf is NULL.
12035
0718675c 120362010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 12037 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
12038
12039 * inferiors.c (find_inferior): Add function documentation.
12040 (unloaded_dll): Handle the case where the unloaded dll has not
12041 been previously registered in the dll list.
12042
177321bd
DJ
120432010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12044
12045 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12046 (thumb2_breakpoint): New.
12047 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12048
2b009048
DJ
120492010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12050
12051 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12052 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12053 breakpoints.
12054
3be029c7
PA
120552010-01-21 Pedro Alves <pedro@codesourcery.com>
12056
12057 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12058
18f5de3b
JK
120592010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12060
12061 * linux-s390-low.c (s390_collect_ptrace_register)
12062 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12063
3743bb4f
DE
120642010-01-21 Doug Evans <dje@google.com>
12065
14ce3065
DE
12066 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12067 (PTRACE_ARG4_TYPE): New macro.
12068 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12069 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12070 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12071 (usr_store_inferior_registers): Ditto.
12072 (linux_read_memory, linux_write_memory): Ditto.
12073 (linux_test_for_tracefork): Ditto.
12074
3743bb4f
DE
12075 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12076 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12077
8b315be5
PA
120782010-01-21 Pedro Alves <pedro@codesourcery.com>
12079
12080 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12081 target.
12082
85492558
PA
120832010-01-21 Pedro Alves <pedro@codesourcery.com>
12084
12085 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12086 prototype to take a regcache. Adjust.
12087
442ea881
PA
120882010-01-20 Pedro Alves <pedro@codesourcery.com>
12089
12090 * regcache.h (struct thread_info): Forward declare.
12091 (struct regcache): New.
12092 (new_register_cache): Adjust prototype.
12093 (get_thread_regcache): Declare.
12094 (free_register_cache): Adjust prototype.
12095 (registers_to_string, registers_from_string): Ditto.
12096 (supply_register, supply_register_by_name, collect_register)
12097 (collect_register_as_string, collect_register_by_name): Ditto.
12098 * regcache.c (struct inferior_regcache_data): Delete.
12099 (get_regcache): Rename to ...
12100 (get_thread_regcache): ... this. Adjust. Switch inferior before
12101 fetching registers.
12102 (regcache_invalidate_one): Adjust.
12103 (regcache_invalidate): Fix prototype.
12104 (new_register_cache): Return the new register cache.
12105 (free_register_cache): Change prototype.
12106 (realloc_register_cache): Adjust.
12107 (registers_to_string): Change prototype to take a regcache. Adjust.
12108 (registers_from_string): Ditto.
12109 (register_data): Ditto.
12110 (supply_register): Ditto.
12111 (supply_register_by_name): Ditto.
12112 (collect_register): Ditto.
12113 (collect_register_as_string): Ditto.
12114 (collect_register_by_name): Ditto.
12115 * server.c (process_serial_event): Adjust.
12116 * linux-low.h (regset_fill_func, regset_store_func): Change
12117 prototype.
12118 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12119 Change prototype.
12120 * linux-low.c (get_stop_pc): Adjust.
12121 (check_removed_breakpoint): Adjust.
12122 (linux_wait_for_event): Adjust.
12123 (linux_resume_one_lwp): Adjust.
12124 (fetch_register): Add regcache parameter. Adjust.
12125 (usr_store_inferior_registers): Ditto.
12126 (regsets_fetch_inferior_registers): Ditto.
12127 (regsets_store_inferior_registers): Ditto.
12128 (linux_fetch_registers, linux_store_registers): Ditto.
12129 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12130 regcache. Adjust.
43aaf8b6
PA
12131 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12132 Ditto.
442ea881
PA
12133 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12134 prototype to take a regcache.
12135 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12136 * remote-utils.c (convert_ascii_to_int, outreg)
12137 (prepare_resume_reply): Change prototype to take a regcache.
12138 Adjust.
12139 * target.h (struct target_ops) <fetch_registers, store_registers>:
12140 Change prototype to take a regcache.
12141 (fetch_inferior_registers, store_inferior_registers): Change
12142 prototype to take a regcache. Adjust.
12143 * proc-service.c (ps_lgetregs): Adjust.
12144 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12145 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12146 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12147 take a regcache. Adjust.
12148 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12149 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12150 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12151 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12152 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12153 (cris_cannot_fetch_register):
12154 (cris_breakpoint_at): Change prototype to take a regcache.
12155 Adjust.
12156 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12157 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12158 to take a regcache. Adjust.
12159 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12160 Adjust.
12161 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12162 take a regcache. Adjust.
12163 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12164 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12165 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12166 * linux-mips-low.c (mips_get_pc):
12167 (mips_set_pc): Change prototype to take a regcache. Adjust.
12168 (mips_reinsert_addr): Adjust.
12169 (mips_collect_register): Change prototype to take a regcache.
12170 Adjust.
12171 (mips_supply_register):
12172 (mips_collect_register_32bit, mips_supply_register_32bit)
12173 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12174 (mips_store_fpregset): Ditto.
43aaf8b6
PA
12175 * linux-ppc-low.c (ppc_supply_ptrace_register)
12176 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
12177 (parse_spufs_run): Adjust.
12178 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12179 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12180 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12181 take a regcache. Adjust.
12182 * linux-s390-low.c (s390_collect_ptrace_register)
12183 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12184 (s390_set_pc): Change prototype to take a regcache. Adjust.
12185 (s390_arch_setup): Adjust.
12186 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12187 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12188 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12189 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12190 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12191 regcache. Adjust.
12192 (sparc_breakpoint_at): Adjust.
12193 * linux-xtensa-low.c (xtensa_fill_gregset):
12194 (xtensa_store_gregset):
12195 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12196 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12197 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12198 prototype to take a regcache. Adjust.
12199 * win32-arm-low.c (arm_fetch_inferior_register)
12200 (arm_store_inferior_register): Change prototype to take a
12201 regcache. Adjust.
12202 * win32-i386-low.c (i386_fetch_inferior_register)
12203 (i386_store_inferior_register): Change prototype to take a
12204 regcache. Adjust.
12205 * win32-low.c (child_fetch_inferior_registers)
12206 (child_store_inferior_registers): Change prototype to take a
12207 regcache. Adjust.
12208 (win32_wait): Adjust.
12209 (win32_fetch_inferior_registers): Change prototype to take a
12210 regcache. Adjust.
12211 (win32_store_inferior_registers): Adjust.
12212 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12213 store_inferior_register>: Change prototype to take a regcache.
12214
60c3d7b0
DE
122152010-01-20 Doug Evans <dje@google.com>
12216
12217 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12218 #ifdef.
12219 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 12220 (W_STOPCODE): Provide definition if missing.
60c3d7b0 12221
dc146f7c
VP
122222010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12223
12224 * linux-low.c (linux_core_of_thread): New.
12225 (compare_ints, show_process, list_threads): New.
12226 (linux_qxfer_osdata): Report threads and cores.
12227 (linux_target_op): Register linux_core_of_thread.
12228 * remote-utils.c (prepare_resume_reply): Report the core.
12229 (buffer_xml_printf): Support %d specifier.
12230 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12231 New.
12232 (handle_query): Handle qXfer:threads. Announce availability
12233 thereof.
12234 * target.h (struct target_ops): New field core_of_thread.
12235
7803799a
UW
122362010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12237
12238 * Makefile.in (clean): Remove new generated files.
12239 (reg-s390.o, reg-s390.c): Remove rules.
12240 (reg-s390x.o, reg-s390x.c): Likewise.
12241 (s390-linux32.o, s390-linux32.c): Add rules.
12242 (s390-linux64.o, s390-linux64.c): Likewise.
12243 (s390x-linux64.o, s390x-linux64.c): Likewise.
12244 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12245 * linux-s390-low.c: Include <elf.h>.
12246 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12247 (init_registers_s390): Remove prototype.
12248 (init_registers_s390x): Likewise.
12249 (init_registers_s390_linux32): Add prototype.
12250 (init_registers_s390_linux64): Likewise.
12251 (init_registers_s390x_linux64): Likewise.
12252 (s390_num_regs_3264): New define.
12253 (s390_regmap_3264): New global variable.
12254 (s390_cannot_fetch_register): Remove obsolete check.
12255 (s390_cannot_store_register): Likewise.
12256 (s390_collect_ptrace_register): Handle upper/lower register halves.
12257 (s390_supply_ptrace_register): Likewise.
12258 (s390_fill_gregset): Update to register number changes.
12259 (s390_get_hwcap): New routine.
12260 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12261 Install appropriate regmap and register set.
12262
6e7ffa39
JB
122632010-01-01 Joel Brobecker <brobecker@adacore.com>
12264
12265 * server.c (gdbserver_version): Update copyright year to 2010.
12266 * gdbreplay.c (gdbreplay_version): Likewise.
12267
957f3f49
DE
122682009-12-28 Doug Evans <dje@google.com>
12269
12270 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12271 elf/external.h. Include <elf.h> instead but only if necessary.
12272
ca5c370d
PA
122732009-12-28 Pedro Alves <pedro@codesourcery.com>
12274
12275 * linux-low.c (linux_remove_process): Remove `detaching'
12276 parameter. Don't release/detach from thread_db here.
12277 (linux_kill): Release/detach from thread_db here, ...
12278 (linux_detach): ... and here, before actually detaching.
12279 (linux_wait_1): ... and here, when a process exits.
12280 * thread-db.c (any_thread_of): New.
12281 (thread_db_free): Switch the current inferior to a thread of the
12282 passed in process.
12283
4ee62156
DE
122842009-12-21 Doug Evans <dje@google.com>
12285
d90e6a88
DE
12286 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12287
c5f62d5f
DE
12288 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12289 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12290 warning ifndef __NR_tkill. Move setting of errno there too.
12291 Delete unnecessary resetting of errno after syscall.
12292 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12293
10e86dd7
DE
12294 * configure.ac: Check for dladdr.
12295 * config.in: Regenerate.
12296 * configure: Regenerate.
12297 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12298 (try_thread_db_load): Update.
12299
4ee62156
DE
12300 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12301
00f515da
DE
123022009-12-18 Doug Evans <dje@google.com>
12303
e9464885
DE
12304 * event-loop.c: Include unistd.h if it exists.
12305
07d4f67e
DE
12306 * linux-low.c (my_waitpid): Move definition away from being in
12307 between linux_tracefork_child/linux_test_for_tracefork.
12308
00f515da
DE
12309 * gdb_proc_service.h (psaddr_t): Fix type.
12310 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12311 signature to match glibc.
12312
1de1badb
DE
123132009-12-16 Doug Evans <dje@google.com>
12314
12315 * linux-low.c (linux_read_memory): Fix argument to read.
12316
aeeb81d1
PA
123172009-11-26 Pedro Alves <pedro@codesourcery.com>
12318
12319 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12320 events, don't leave current_inferior pointing at null.
12321
10357975
PA
123222009-11-26 Pedro Alves <pedro@codesourcery.com>
12323
12324 * win32-low.c (LOG): Delete.
12325 (OUTMSG): Output to stderr.
12326 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12327 on compile time LOG macro.
12328 (win32_wait): Fix debug output.
12329
cf6e3471
PA
123302009-11-26 Pedro Alves <pedro@codesourcery.com>
12331
12332 * win32-low.c (win32_add_one_solib): If the dll name is
12333 "ntdll.dll", prepend the system directory to the dll path.
12334
0c85e18e
MK
123352009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12336
12337 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12338
9ac544ce 123392009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 12340 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
12341
12342 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12343 * configure.ac: Check for __mcoldfire__ and set
12344 gdb_cv_m68k_is_coldfire.
12345 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12346 reg-cf.o and reg-m68k.o.
12347 * configure: Regenerated.
12348
fd7dd3e6
PA
123492009-11-16 Pedro Alves <pedro@codesourcery.com>
12350
12351 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12352 Pass it to thread_db_free.
12353 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12354 proper `detaching' argument to linux_remove_process.
12355 * linux-low.h (thread_db_free): Add `detaching' parameter.
12356 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12357 to thread_db_free.
12358 (thread_db_free): Add `detaching' parameter. Only
12359 call td_ta_clear_event if detaching from process.
12360
75aa492e
MK
123612009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12362
12363 * thread-db.c (thread_db_free): Fix typo.
12364
21e1bee4
PP
123652009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12366
12367 PR gdb/10838
12368 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12369
8838b45e
NS
123702009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12371
12372 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12373 with an i686 compiler.
12374 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12375 needed.
12376 * configure: Rebuilt.
12377
8a35fb51
SL
123782009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12379
12380 PR gdb/10783
12381
12382 * server.c (handle_search_memory_1): Correct read_addr initialization
12383 in loop for searching subsequent chunks.
12384
96f15937
PP
123852009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12386
12387 * configure.ac: New --with-libthread-db option.
12388 * thread-db.c: Allow direct dependence on libthread_db.
12389 (thread_db_free): Adjust.
12390 * config.in: Regenerate.
12391 * configure: Likewise.
889bf7c5 12392
5f7d1694
PP
123932009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12394
12395 PR gdb/10757
12396 * thread-db.c (attach_thread): New function.
12397 (maybe_attach_thread): Return success/failure.
12398 (find_new_threads_callback): Adjust.
889bf7c5
PA
12399 (thread_db_find_new_threads): Loop until no new threads.
12400
88e3b899
PA
124012009-10-13 Pedro Alves <pedro@codesourcery.com>
12402
12403 * proc-service.c (ps_lgetregs): Formatting.
12404
cdbfd419
PP
124052009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12406
12407 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12408 * configure.ac: Adjust.
12409 * linux-low.h (struct process_info_private): Move members to struct
12410 thread_db.
12411 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12412 * linux-low.c (linux_remove_process): Adjust.
12413 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12414 * server.c (handle_query): Move code ...
12415 (handle_monitor_command): ... here. New function.
12416 * target.h (struct target_ops): New member.
12417 * thread-db.c (struct thread_db): New.
12418 (libthread_db_search_path): New variable.
12419 (thread_db_create_event, thread_db_enable_reporting)
12420 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12421 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12422 (try_thread_db_load_1, dladdr_to_soname): New functions.
12423 (try_thread_db_load, thread_db_load_search): New functions.
12424 (thread_db_init): Search for libthread_db.
12425 (thread_db_free): New function.
12426 (thread_db_handle_monitor_command): Likewise.
12427 * config.in: Regenerate.
12428 * configure: Regenerate.
889bf7c5 12429
4168d2d6
UW
124302009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12431
12432 * spu-low.c (spu_kill): Wait for inferior to terminate.
12433 Call clear_inferiors.
12434 (spu_detach): Call clear_inferiors.
12435
81ecdfbb
RW
124362009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12437
12438 * aclocal.m4: Regenerate.
12439 * config.in: Likewise.
12440 * configure: Likewise.
12441
0b9ff2c0
UW
124422009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12443
12444 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12445 (parse_spufs_run): New function.
12446 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12447 (ppc_breakpoint_at): Handle SPU breakpoints.
12448
efcbbd14
UW
124492009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12450
12451 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12452 (SPUFS_MAGIC): Define.
12453 (spu_enumerate_spu_ids): New function.
12454 (linux_qxfer_spu): New function.
12455 (linux_target_ops): Install linux_qxfer_spu.
12456
f4d9bade
UW
124572009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12458
12459 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12460 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12461 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12462 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12463 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12464 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12465 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12466 (init_registers_powerpc_cell32l): Add prototype.
12467 (init_registers_powerpc_cell64l): Likewise.
12468 (ppc_arch_setup): Detect Cell/B.E. architecture.
12469
96e946ca
RW
124702009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12471
12472 * Makefile.in (datarootdir): New variable.
12473
58d6951d
DJ
124742009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12475
12476 * linux-low.c (linux_write_memory): Update debugging output.
12477 * Makefile.in (clean): Add new descriptions.
12478 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12479 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12480 * configure.srv: Add new files for arm*-*-linux*.
12481 * linux-arm-low.c: Add new declarations.
12482 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12483 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12484 (HWCAP_VFPv3D16): New.
12485 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12486 instead of __IWMMXT__.
12487 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12488 (arm_arch_setup): New.
12489 (target_regsets): Remove #ifdef. Add VFP regset.
12490 (the_low_target): Use arm_arch_setup.
12491
12b42a12
DJ
124922009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12493
12494 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12495 the main thread again.
12496
ac8c974e
AR
124972009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12498
12499 Adding Neutrino gdbserver.
12500 * configure: Regenerated.
12501 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12502 * configure.srv (i[34567]86-*-nto*): New target.
12503 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12504 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12505 (nto_comctrl) [__QNX__]: New function.
12506 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12507
4424e0c3 125082009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
12509
12510 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12511 srv_tgtobj.
12512
912cf4ba
PA
125132009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12514 Pedro Alves <pedro@codesourcery.com>
12515
12516 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12517 don't support CONTEXT_EXTENDED_REGISTERS.
12518 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12519 (the_low_target): Install them.
12520 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12521 failing with ERROR_PIPE_NOT_CONNECTED.
12522
aa5ca48f
DE
125232009-06-30 Doug Evans <dje@google.com>
12524 Pierre Muller <muller@ics.u-strasbg.fr>
12525
12526 Add h/w watchpoint support to x86-linux, win32-i386.
12527 * Makefile.in (SFILES): Add i386-low.c
12528 (i386_low_h): Define.
12529 (i386-low.o): Add dependencies.
12530 (linux-x86-low.o): Add i386-low.h dependency.
12531 (win32-i386-low.o): Ditto.
12532 * i386-low.c: New file.
12533 * i386-low.h: New file.
12534 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12535 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12536 * linux-low.c (linux_add_process): Initialize arch_private.
12537 (linux_remove_process): Free arch_private.
12538 (add_lwp): Initialize arch_private.
12539 (delete_lwp): Free arch_private.
12540 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12541 provided.
12542 * linux-low.h (process_info_private): New member arch_private.
12543 (lwp_info): New member arch_private.
12544 (linux_target_ops): New members new_process, new_thread,
12545 prepare_to_resume.
12546 (ptid_of): New macro.
12547 * linux-x86-low.c: Include stddef.h, i386-low.h.
12548 (arch_process_info): New struct.
12549 (arch_lwp_info): New struct.
12550 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12551 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12552 (i386_dr_low_get_status): New function.
12553 (x86_insert_point, x86_remove_point): New functions.
12554 (x86_stopped_by_watchpoint): New function.
12555 (x86_stopped_data_address): New function.
12556 (x86_linux_new_process, x86_linux_new_thread): New functions.
12557 (x86_linux_prepare_to_resume): New function.
12558 (the_low_target): Add entries for insert_point, remove_point,
12559 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12560 prepare_to_resume.
12561 * server.c (debug_hw_points): New global.
12562 (monitor_show_help): Document set debug-hw-points.
12563 (handle_query): Process "set debug-hw-points".
12564 * server.h (debug_hw_points): Declare.
12565 (paddress): Declare.
12566 * utils.c (NUMCELLS, CELLSIZE): New macros.
12567 (get_sell, xsnprintf, paddress): New functions.
12568 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12569 remove_point, stopped_by_watchpoint, stopped_data_address.
12570 * win32-i386-low.c: Include i386-low.h.
12571 (debug_reg_state): Replaces dr.
12572 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12573 (i386_dr_low_get_status): New function.
12574 (i386_insert_point, i386_remove_point): New functions.
12575 (i386_stopped_by_watchpoint): New function.
12576 (i386_stopped_data_address): New function.
12577 (i386_initial_stuff): Update.
12578 (get_thread_context,set_thread_context,i386_thread_added): Update.
12579 (the_low_target): Add entries for insert_point,
12580 remove_point, stopped_by_watchpoint, stopped_data_address.
12581 * win32-low.c (win32_insert_watchpoint): New function.
12582 (win32_remove_watchpoint): New function.
12583 (win32_stopped_by_watchpoint): New function.
12584 (win32_stopped_data_address): New function.
12585 (win32_target_ops): Add entries for insert_watchpoint,
12586 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12587 * win32-low.h (win32_target_ops): New members insert_point,
12588 remove_point, stopped_by_watchpoint, stopped_data_address.
12589
d993e290
PA
125902009-06-25 Pedro Alves <pedro@codesourcery.com>
12591
12592 * server.c (process_serial_event): Re-return unsupported, not
12593 error, if the type isn't recognized. Re-allow supporting only
12594 insert or remove packets. Also call require_running for
12595 breakpoints. Add missing break statement to default case. Tidy.
12596 * target.h (struct target_ops): Rename insert_watchpoint to
12597 insert_point, and remove_watchpoint to remove_point.
12598
12599 * linux-low.h (struct linux_target_ops): Likewise.
12600 * linux-low.c (linux_insert_watchpoint): Rename to ...
12601 (linux_insert_point): ... this. Adjust.
12602 (linux_remove_watchpoint): Rename to ...
12603 (linux_remove_point): ... this. Adjust.
12604 (linux_target_ops): Adjust.
12605 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12606 (cris_insert_point): ... this.
12607 (cris_remove_watchpoint): Rename to ...
12608 (cris_remove_point): ... this.
12609 (the_low_target): Adjust.
12610
0f54c268
PM
126112009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12612
12613 * server.c (handle_v_kill): Pass signal_pid to
12614 kill_inferior if multi_process is zero.
12615
c6314022
AR
126162009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12617
12618 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12619 * target.h (target_ops): Comment for *_watchpoint to make it clear
12620 the functions can get types '0' and '1'.
12621
4463ce24
AR
126222009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12623
12624 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12625 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12626 * regcache.c (get_regcache): Likewise.
12627 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12628 * win32-low.c (child_fetch_inferior_registers): Remove check for
12629 regno 0.
12630
cf8fd78b
PA
126312009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12632 Pedro Alves <pedro@codesourcery.com>
12633
12634 * target.h (struct target_ops) <supports_multi_process>: New
12635 callback.
12636 (target_supports_multi_process): New.
12637 * server.c (handle_query): Even if GDB reports support, only
12638 enable multi-process if the target also supports it. Report
12639 multi-process support only if the target backend supports it.
12640 * linux-low.c (linux_supports_multi_process): New function.
12641 (linux_target_ops): Install it as target_supports_multi_process
12642 callback.
12643
47c0c975
DE
126442009-05-24 Doug Evans <dje@google.com>
12645
e09875d4
DE
12646 Global renaming of find_thread_pid to find_thread_ptid.
12647 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12648 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12649 All callers updated.
12650
e27d73f6
DE
12651 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12652 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12653 directly.
12654
47c0c975
DE
12655 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12656 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12657 (linux_resume_one_lwp): Ditto.
12658
2acc282a
DE
126592009-05-23 Doug Evans <dje@google.com>
12660
12661 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12662 from struct inferior_list_entry * to struct lwp_info *.
12663 All callers updated.
12664
9f1036c1
DE
126652009-05-13 Doug Evans <dje@google.com>
12666
12667 * linux-x86-low.c: Don't include assert.h.
12668 (x86_siginfo_fixup): Use fatal, not assert.
12669 (x86_arch_setup): Fix comment.
12670
d0722149
DE
126712009-05-12 Doug Evans <dje@google.com>
12672
12673 Biarch support for i386/amd64 gdbserver.
12674 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12675 Add linux-x86-low.c.
12676 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12677 (linux-x86-low.o): Add.
12678 * linux-x86-64-low.c: Delete.
12679 * linux-i386-low.c: Delete.
12680 * linux-x86-low.c: New file.
12681 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12682 linux-x86-low.o.
12683 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12684 linux-x86-low.o.
12685 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12686 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12687 (linux_child_pid_to_exec_file): New function.
12688 (elf_64_header_p, elf_64_file_p): New functions.
12689 (siginfo_fixup): New function.
12690 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12691 give target a chance to convert layout.
12692 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12693 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12694
fdeb2a12
DE
126952009-05-07 Doug Evans <dje@google.com>
12696
12697 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12698 (regsets_store_inferior_registers): Ditto.
12699
a6dbe5df
PA
127002009-05-06 Pedro Alves <pedro@codesourcery.com>
12701
12702 PR server/10048
12703
12704 * linux-low.c (must_set_ptrace_flags): Delete.
12705 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12706 of the global.
12707 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12708 `lwp->must_set_ptrace_flags' instead.
ba42693b 12709 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
12710 (linux_wait_1): ... not here.
12711
5091eb23
DE
127122009-04-30 Doug Evans <dje@google.com>
12713
9f767825
DE
12714 * inferiors.c (started_inferior_callback): New function.
12715 (attached_inferior_callback): New function.
12716 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12717 * server.c (print_started_pid, print_attached_pid): New functions.
12718 (detach_or_kill_for_exit): New function.
12719 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12720 * server.h (have_started_inferiors_p): Declare.
12721 (have_attached_inferiors_p): Declare.
12722
5091eb23
DE
12723 * inferiors.c (remove_process): Fix memory leak, free process.
12724 * linux-low.c (linux_remove_process): New function.
12725 (linux_kill): Call it instead of remove_process.
12726 (linux_detach, linux_wait_1): Ditto.
12727
155c8968
PA
127282009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12729
12730 * configure.srv: Add x86 Windows CE target.
12731
7fe519cb
UW
127322009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12733
12734 * inferiors.c (get_thread_process): Make global.
12735 * server.h (get_thread_process): Add prototype.
12736 * thread-db.c (find_one_thread): Use get_thread_process
12737 instead of current_process.
12738 (thread_db_get_tls_address): Do not crash if called when
12739 thread layer is not yet initialized.
12740
5472f405
UW
127412009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12742
12743 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12744 * spu-low.c (current_tid): Rename to ...
12745 (current_ptid): ... this.
12746 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12747 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12748 ptid_get_lwp (current_ptid) instead of current_tid.
12749 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12750 instead of current_tid. Use find_process_pid to verify pid
12751 argument is valid. Pass proper argument to remove_process.
12752 (spu_thread_alive): Compare current_ptid instead of current_tid.
12753 (spu_resume): Likewise.
12754
55ac2b99
PA
127552009-04-02 Pedro Alves <pedro@codesourcery.com>
12756
12757 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12758 variable.
12759
95954743
PA
127602009-04-01 Pedro Alves <pedro@codesourcery.com>
12761
12762 Implement the multiprocess extensions, and add linux multiprocess
12763 support.
12764
12765 * server.h (ULONGEST): Declare.
12766 (struct ptid, ptid_t): New.
12767 (minus_one_ptid, null_ptid): Declare.
12768 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12769 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12770 (struct inferior_list_entry): Change `id' type from unsigned from
12771 to ptid_t.
12772 (struct sym_cache, struct breakpoint, struct
12773 process_info_private): Forward declare.
12774 (struct process_info): Declare.
12775 (current_process): Declare.
12776 (all_processes): Declare.
12777 (initialize_inferiors): Declare.
12778 (add_thread): Adjust to use ptid_t.
12779 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12780 (add_process, remove_process, find_thread_pid): Declare.
12781 (find_inferior_id): Adjust to use ptid_t.
12782 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12783 (multi_process): Declare.
12784 (push_event): Adjust to use ptid_t.
12785 (read_ptid, write_ptid): Declare.
12786 (prepare_resume_reply): Adjust to use ptid_t.
12787 (clear_symbol_cache): Declare.
12788 * inferiors.c (all_processes): New.
12789 (null_ptid, minus_one_ptid): New.
12790 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12791 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12792 (add_thread): Change unsigned long to ptid. Remove gdb_id
12793 parameter. Adjust.
12794 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12795 (gdb_id_to_thread): Rename to ...
12796 (find_thread_pid): ... this. Change unsigned long to ptid.
12797 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12798 (loaded_dll, pull_pid_from_list): Adjust.
12799 (add_process, remove_process, find_process_pid)
12800 (get_thread_process, current_process, initialize_inferiors): New.
12801 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12802 (struct target_waitstatus) <related_pid>: Ditto.
12803 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12804 return type to int.
12805 (struct target_ops) <join>: Add `pid' argument.
12806 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12807 (struct target_ops) <wait>: Add `ptid' field. Change return type
12808 to ptid.
12809 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12810 (mywait): Add `ptid' argument. Change return type to ptid_t.
12811 (target_pid_to_str): Declare.
12812 * target.c (set_desired_inferior): Adjust to use ptids.
12813 (mywait): Add new `ptid' argument. Adjust.
12814 (target_pid_to_str): New.
12815 * mem-break.h (free_all_breakpoints): Declare.
12816 * mem-break.c (breakpoints): Delelete.
12817 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12818 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12819 to use per-process breakpoint list.
12820 (free_all_breakpoints): New.
12821 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12822 (symbol_cache, all_symbols_looked_up): Delete.
12823 (hexchars): New.
12824 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12825 read_ptid): New.
12826 (prepare_resume_reply): Change ptid argument's type from unsigned
12827 long to ptid_t. Adjust. Implement W;process and X;process.
12828 (free_sym_cache, clear_symbol_cache): New.
12829 (look_up_one_symbol): Adjust to per-process symbol cache. *
12830 * server.c (cont_thread, general_thread, step_thread): Change type
12831 to ptid_t.
12832 (attached): Delete.
12833 (multi_process): New.
12834 (last_ptid): Change type to ptid_t.
12835 (struct vstop_notif) <ptid>: Change type to ptid_t.
12836 (queue_stop_reply, push_event): Change `ptid' argument's type to
12837 ptid_t.
12838 (discard_queued_stop_replies): Add `pid' argument.
12839 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12840 changes. Don't reference the `attached' global.
12841 (attach_inferior): Adjust to mywait interface changes.
12842 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12843 features. Handle and report "multiprocess+". Handle
12844 "qAttached:PID".
12845 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12846 changes.
12847 (handle_v_kill): New.
12848 (handle_v_stopped): Adjust to use target_pid_to_str.
12849 (handle_v_requests): Allow multiple attaches and runs when
12850 multiprocess extensions are in effect. Handle "vKill".
12851 (myresume): Adjust to use ptids.
12852 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12853 (handle_status): Adjust to discard_queued_stop_replies interface
12854 change.
12855 (first_thread_of, kill_inferior_callback)
12856 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12857 (main): Call initialize_inferiors. Adjust to use ptids, killing
12858 and detaching from all inferiors. Handle multiprocess packet
12859 variants.
12860 * linux-low.h: Include gdb_proc_service.h.
12861 (struct process_info_private): New.
12862 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12863 <lwpid_of>: Use ptid_get_lwp.
12864 (get_lwp_thread): Adjust.
12865 (struct lwp_info): Add `dead' member.
12866 (find_lwp_pid): Declare.
12867 * linux-low.c (thread_db_active): Delete.
12868 (new_inferior): Adjust comment.
12869 (inferior_pid): Delete.
12870 (linux_add_process): New.
12871 (handle_extended_wait): Adjust.
12872 (add_lwp): Change unsigned long to ptid.
12873 (linux_create_inferior): Add process to processes table. Adjust
12874 to use ptids. Don't set new_inferior here.
12875 (linux_attach_lwp): Rename to ...
12876 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12877 it. Adjust to use ptids.
12878 (linux_attach_lwp): New.
12879 (linux_attach): Add process to processes table. Don't set
12880 new_inferior here.
12881 (struct counter): New.
12882 (second_thread_of_pid_p, last_thread_of_process_p): New.
12883 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12884 multiple processes.
12885 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12886 processes. Remove process from process table.
12887 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12888 to multiple processes.
12889 (any_thread_of): New.
12890 (linux_detach): Add `pid' argument, and handle it. Remove process
12891 from processes table.
12892 (linux_join): Add `pid' argument. Handle it.
12893 (linux_thread_alive): Change unsighed long argument to ptid_t.
12894 Consider dead lwps as not being alive.
12895 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12896 threads we're not interested in.
12897 (same_lwp, find_lwp_pid): New.
12898 (linux_wait_for_lwp): Change `pid' argument's type from int to
12899 ptid_t. Adjust.
12900 (linux_wait_for_event): Rename to ...
12901 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12902 from int to ptid_t. Adjust.
12903 (linux_wait_for_event): New.
12904 (linux_wait_1): Add `ptid' argument. Change return type to
12905 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12906 that exit from the process table.
12907 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12908 Adjust.
12909 (mark_lwp_dead): New.
12910 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12911 stopping all threads, mark its main lwp as dead.
12912 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12913 ptids.
12914 (fetch_register, usr_store_inferior_registers)
12915 (regsets_fetch_inferior_registers)
12916 (regsets_store_inferior_registers, linux_read_memory)
12917 (linux_write_memory): Inline `inferior_pid'.
12918 (linux_look_up_symbols): Adjust to use per-process
12919 `thread_db_active'.
12920 (linux_request_interrupt): Adjust to use ptids.
12921 (linux_read_auxv): Inline `inferior_pid'.
12922 (initialize_low): Don't reference thread_db_active.
12923 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12924 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12925 (ps_getpid): Return the pid of the current inferior.
12926 * thread-db.c (proc_handle, thread_agent): Delete.
12927 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12928 per-process data.
12929 (find_one_thread): Change argument type to ptid_t. Adjust to
12930 per-process data.
12931 (maybe_attach_thread): Adjust to per-process data and ptids.
12932 (thread_db_find_new_threads): Ditto.
12933 (thread_db_init): Ditto.
12934 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12935 processes table. Adjust to use ptids.
12936 (spu_kill, spu_detach): Adjust interface. Remove process from
12937 processes table.
12938 (spu_join, spu_thread_alive): Adjust interface.
12939 (spu_wait): Adjust interface. Remove process from processes
12940 table. Adjust to use ptids.
12941 * win32-low.c (current_inferior_tid): Delete.
12942 (current_inferior_ptid): New.
12943 (debug_event_ptid): New.
12944 (thread_rec): Take a ptid. Adjust.
12945 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12946 (child_delete_thread): Ditto.
12947 (do_initial_child_stuff): Add `attached' argument. Add process to
12948 processes table.
12949 (child_fetch_inferior_registers, child_store_inferior_registers):
12950 Adjust.
12951 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12952 (win32_attach): Pass 1 to do_initial_child_stuff.
12953 (win32_kill): Adjust interface. Remove process from processes
12954 table.
12955 (win32_detach): Ditto.
12956 (win32_join): Adjust interface.
12957 (win32_thread_alive): Take a ptid.
12958 (win32_resume): Adjust to use ptids.
12959 (get_child_debug_event): Ditto.
12960 (win32_wait): Adjust interface. Remove exiting process from
12961 processes table.
12962
bd99dc85
PA
129632009-04-01 Pedro Alves <pedro@codesourcery.com>
12964
12965 Non-stop mode support.
12966
12967 * server.h (non_stop): Declare.
12968 (gdb_client_data, handler_func): Declare.
12969 (delete_file_handler, add_file_handler, start_event_loop):
12970 Declare.
12971 (handle_serial_event, handle_target_event, push_event)
12972 (putpkt_notif): Declare.
12973 * target.h (enum resume_kind): New.
12974 (struct thread_resume): Replace `step' field by `kind' field.
12975 (TARGET_WNOHANG): Define.
12976 (struct target_ops) <wait>: Add `options' argument.
12977 <supports_non_stop, async, start_non_stop>: New fields.
12978 (target_supports_non_stop, target_async): New.
12979 (start_non_stop): Declare.
12980 (mywait): Add `options' argument.
12981 * target.c (mywait): Add `options' argument. Print child exit
12982 notifications here.
12983 (start_non_stop): New.
12984 * server.c (non_stop, own_buf, mem_buf): New globals.
12985 (struct vstop_notif): New.
12986 (notif_queue): New global.
12987 (queue_stop_reply, push_event, discard_queued_stop_replies)
12988 (send_next_stop_reply): New.
12989 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12990 interface changes.
12991 (attach_inferior): In non-stop mode, don't wait for the target
12992 here.
12993 (handle_general_set): Handle QNonStop.
12994 (handle_query): When handling qC, return the current general
12995 thread, instead of the first thread of the list.
12996 (handle_query): If the backend supports non-stop mode, include
12997 QNonStop+ in the qSupported query response.
12998 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12999 and non-stop mode.
13000 (handle_v_attach, handle_v_run): Handle non-stop mode.
13001 (handle_v_stopped): New.
13002 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13003 (myresume): Adjust to use resume_kind. Handle non-stop.
13004 (queue_stop_reply_callback): New.
13005 (handle_status): Handle non-stop mode.
13006 (main): Clear non_stop flag on reconnection. Use the event-loop.
13007 Refactor serial protocol handling from here ...
13008 (process_serial_event): ... to this new function. When GDB
13009 selects any thread, select one here. In non-stop mode, wait until
13010 GDB acks all pending events before exiting.
13011 (handle_serial_event, handle_target_event): New.
13012 * remote-utils.c (remote_open): Install remote_desc in the event
13013 loop.
13014 (remote_close): Remove remote_desc from the event loop.
13015 (putpkt_binary): Rename to...
13016 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13017 (putpkt_binary): New as wrapper around putpkt_binary_1.
13018 (putpkt_notif): New.
13019 (prepare_resume_reply): In non-stop mode, don't change the
13020 general_thread.
13021 * event-loop.c: New.
13022 * Makefile.in (OBJ): Add event-loop.o.
13023 (event-loop.o): New rule.
13024
13025 * linux-low.h (pid_of): Moved here.
13026 (lwpid_of): New.
13027 (get_lwp_thread): Use lwpid_of.
13028 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13029 * linux-low.c (pid_of): Delete.
13030 (inferior_pid): Use lwpid_of.
13031 (linux_event_pipe): New.
13032 (target_is_async_p): New.
13033 (delete_lwp): New.
13034 (handle_extended_wait): Use lwpid_of.
13035 (add_lwp): Don't set lwpid field.
13036 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13037 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13038 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13039 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13040 first. Adjust to linux_wait_for_event interface changes. Use
13041 lwpid_of.
13042 (linux_detach): Don't delete the main lwp here.
13043 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13044 (status_pending_p): Don't consider explicitly suspended lwps.
13045 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13046 pointer. Add OPTIONS argument. Change return type to int. Use
13047 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13048 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13049 pointer. Add status pointer argument. Return a pid instead of a
13050 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13051 changes. In non-stop mode, don't switch to a random thread.
13052 (linux_wait): Rename to...
13053 (linux_wait_1): ... this. Add target_options argument, and handle
13054 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13055 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13056 clean exit and signal exit code. Don't stop all threads in
13057 non-stop mode. In all-stop mode, only stop all threads when
13058 reporting a stop to GDB. Handle explicit thread stop requests.
13059 (async_file_flush, async_file_mark): New.
13060 (linux_wait): New.
13061 (send_sigstop): Use lwpid_of.
13062 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13063 interface changes. In non-stop mode, don't switch to a random
13064 thread.
13065 (linux_resume_one_lwp): Use lwpid_of.
13066 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13067 (linux_resume_one_thread): ... this. Handle resume_stop. In
13068 non-stop mode, don't look for pending flag in all threads.
13069 (resume_status_pending_p): Don't consider explicitly suspended
13070 threads.
13071 (my_waitpid): Reimplement. Emulate __WALL.
13072 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13073 Use lwpid_of.
13074 (sigchld_handler, linux_supports_non_stop, linux_async)
13075 (linux_start_non_stop): New.
13076 (linux_target_ops): Register linux_supports_non_stop, linux_async
13077 and linux_start_non_stop.
13078 (initialize_low): Install SIGCHLD handler.
13079 * thread-db.c (thread_db_create_event, find_one_thread)
13080 (thread_db_get_tls_address): Use lwpid_of.
13081 * win32-low.c (win32_detach): Adjust to use resume_kind.
13082 (win32_wait): Add `options' argument.
13083 * spu-low.c (spu_resume): Adjust to use resume_kind.
13084 (spu_wait): Add `options' argument.
13085
5b1c542e
PA
130862009-04-01 Pedro Alves <pedro@codesourcery.com>
13087
13088 Decouple target code from remote protocol.
13089
13090 * target.h (enum target_waitkind): New.
13091 (struct target_waitstatus): New.
13092 (struct target_ops) <wait>: Return an unsigned long. Take a
13093 target_waitstatus pointer instead of a char pointer.
13094 (mywait): Likewise.
13095 * target.c (mywait): Change prototype to return an unsigned long.
13096 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13097 * server.h (thread_from_wait, old_thread_from_wait): Delete
13098 declarations.
13099 (prepare_resume_reply): Change prototype to take a
13100 target_waitstatus.
13101 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13102 (last_status, last_ptid): New.
13103 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13104 pid instead of a signal.
13105 (attach_inferior): Remove "status" and "signal" parameters.
13106 Adjust.
13107 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13108 not as an address.
13109 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13110 (handle_v_requests, myresume): Remove "status" and "signal"
13111 parameters. Adjust.
13112 (handle_status): New.
13113 (main): Delete local `status'. Adjust.
13114 * remote-utils.c: Include target.h.
13115 (prepare_resume_reply): Change prototype to take a
13116 target_waitstatus. Adjust.
13117
13118 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13119 interface.
13120 * spu-low.c (spu_wait): Adjust.
13121 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13122 Delete.
13123 (win32_wait): Adjust.
13124
2bd7c093
PA
131252009-04-01 Pedro Alves <pedro@codesourcery.com>
13126
13127 * target.h (struct thread_resume): Delete leave_stopped member.
13128 (struct target_ops): Add a `n' argument to the `resume' callback.
13129 * server.c (start_inferior): Adjust.
13130 (handle_v_cont, myresume): Adjust.
13131 * linux-low.c (check_removed_breakpoint): Adjust to resume
13132 interface change, and to removed leave_stopped field.
13133 (resume_ptr): Delete.
13134 (struct thread_resume_array): New.
13135 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13136 resume interface change.
13137 (linux_continue_one_thread, linux_queue_one_thread)
13138 (resume_status_pending_p): Check if the resume field is NULL
13139 instead of checking the leave_stopped member.
13140 (linux_resume): Adjust to the target resume interface change.
13141 * spu-low.c (spu_resume): Adjust to the target resume interface
13142 change.
13143 * win32-low.c (win32_detach, win32_resume): Ditto.
13144
c35fafde
PA
131452009-04-01 Pedro Alves <pedro@codesourcery.com>
13146
13147 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13148 flag.
13149 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13150 pending.
13151 (linux_continue_one_thread): Only preserve the stepping flag if
13152 there's a pending breakpoint.
13153
0a59d50b
PA
131542009-03-31 Pedro Alves <pedro@codesourcery.com>
13155
13156 * server.c (main): After the inferior having exited, call
13157 remote_close before exiting gdbserver.
13158
f04c6d38
TJB
131592009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13160
13161 Fix size of FPSCR in Power 7 processors.
13162 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13163 (PPC_FEATURE_HAS_DFP): New #define.
13164 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13165 size of the FPSCR.
13166
78e5cee6
PA
131672009-03-23 Pedro Alves <pedro@codesourcery.com>
13168
13169 * server.c (handle_query) Whitespace and formatting.
13170
1b3f6016
PA
131712009-03-22 Pedro Alves <pedro@codesourcery.com>
13172
13173 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13174 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13175 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13176 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13177 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13178 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13179 Makefile.in, configure.ac: Fix whitespace throughout.
13180 * configure: Regenerate.
13181
a07b2135
PA
131822009-03-22 Pedro Alves <pedro@codesourcery.com>
13183
13184 * inferiors.c (find_inferior): Make it safe for the callback
13185 function to delete the currently iterated inferior.
13186
67cc2626
PA
131872009-03-22 Pedro Alves <pedro@codesourcery.com>
13188
13189 * Makefile.in (linuw_low_h): Move higher.
13190 (thread-db.o): Depend on $(linux_low_h).
13191
54a0b537
PA
131922009-03-17 Pedro Alves <pedro@codesourcery.com>
13193
13194 Rename "process" to "lwp" throughout.
13195
13196 * linux-low.c (all_processes): Rename to...
13197 (all_lwps): ... this.
13198 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13199 (add_process): Rename to ...
13200 (add_lwp): ... this. Adjust.
13201 (linux_create_inferior): Adjust.
13202 (linux_attach_lwp): Adjust.
13203 (linux_attach): Adjust.
13204 (linux_kill_one_process): Rename to ...
13205 (linux_kill_one_lwp): ... this. Adjust.
13206 (linux_kill): Adjust.
13207 (linux_detach_one_process): Rename to ...
13208 (linux_detach_one_lwp): ... this. Adjust.
13209 (linux_detach): Adjust.
13210 (check_removed_breakpoint): Adjust.
13211 (status_pending_p): Adjust.
13212 (linux_wait_for_process): Rename to ...
13213 (linux_wait_for_lwp): ... this. Adjust.
13214 (linux_wait_for_event): Adjust.
13215 (send_sigstop): Adjust.
13216 (wait_for_sigstop): Adjust.
13217 (stop_all_processes): Rename to ...
13218 (stop_all_lwps): ... this.
13219 (linux_resume_one_process): Rename to ...
13220 (linux_resume_one_lwp): ... this. Adjust.
13221 (linux_set_resume_request, linux_continue_one_thread)
13222 (linux_queue_one_thread, resume_status_pending_p)
13223 (usr_store_inferior_registers, regsets_store_inferior_registers)
13224 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13225 Adjust.
13226 * linux-low.h (get_process): Rename to ...
13227 (get_lwp): ... this. Adjust.
13228 (get_thread_process): Rename to ...
13229 (get_thread_lwp): ... this. Adjust.
13230 (get_process_thread): Rename to ...
13231 (get_lwp_thread): ... this. Adjust.
13232 (struct process_info): Rename to ...
13233 (struct lwp_info): ... this.
13234 (all_processes): Rename to ...
13235 (all_lwps): ... this.
13236 * proc-service.c (ps_lgetregs): Adjust.
13237 * thread-db.c (thread_db_create_event, find_one_thread)
13238 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13239
0b16c5cf
PA
132402009-03-14 Pedro Alves <pedro@codesourcery.com>
13241
13242 * server.c (handle_query): Handle "qAttached".
13243
32de4b9d
NS
132442009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13245
13246 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13247 GPLv3, update license URL.
13248
2aecd87f
DE
132492009-03-01 Doug Evans <dje@google.com>
13250
93efd302 13251 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
13252 (server_h): Add gdb_signals.h.
13253 (signals.o): Update.
13254 * server.h (target_signal_from_host,target_signal_to_host_p)
13255 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13256
86b1f9c5
PM
132572009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13258
13259 * remote-utils.c (getpkt): Also generate remote-debug
13260 information if noack_mode is set.
13261
4aa995e1
PA
132622009-02-06 Pedro Alves <pedro@codesourcery.com>
13263
13264 * server.c (handle_query): Report qXfer:siginfo:read and
13265 qXfer:siginfo:write as supported and handle them.
13266 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13267 * linux-low.c (linux_xfer_siginfo): New.
13268 (linux_target_ops): Set it.
13269
62709adf
PA
132702009-01-26 Pedro Alves <pedro@codesourcery.com>
13271
13272 * server.c (gdbserver_usage): Mention --remote-debug.
13273 (main): Accept '--remote-debug' switch.
13274
aef93bd7
DE
132752009-01-18 Doug Evans <dje@google.com>
13276
13277 * regcache.c (new_register_cache): No need to check result of xcalloc.
13278 * server.c (handle_search_memory): Back out calls to xmalloc,
13279 result is checked and error is returned to user upon failure.
13280 (handle_query): Ditto. Add more checks for result of malloc.
13281 (handle_v_cont): Check result of malloc, report error back to
13282 user upon failure.
13283 (handle_v_run): Ditto. Call freeargv.
13284 * server.h (freeargv): Declare.
13285 * utils.c (freeargv): New fn.
13286
54363045
DE
132872009-01-15 Doug Evans <dje@google.com>
13288
f626972c
DE
13289 * gdbreplay.c (perror_with_name): Make arg const char *.
13290 * server.h (target_signal_to_name): Make return type const char *.
0842e787 13291 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 13292 * utils.c (perror_with_name): Make arg const char *.
54363045 13293
18aae699
PA
132942009-01-14 Pedro Alves <pedro@codesourcery.com>
13295
13296 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13297 when handling a EXIT_PROCESS_DEBUG_EVENT.
13298
ff703abe
JB
132992009-01-06 Joel Brobecker <brobecker@adacore.com>
13300
13301 * gdbreplay.c (gdbreplay_version): Update copyright year.
13302 * server.c (gdbserver_version): Likewise.
13303
f21cc1a2 133042009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
13305
13306 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 13307 (handle_extended_wait): Improve comment.
0e21c1ec 13308
bca929d3
DE
133092008-12-13 Doug Evans <dje@google.com>
13310
13311 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13312 * server.h (ATTR_MALLOC): New macro.
13313 (xmalloc,xcalloc,xstrdup): Declare.
13314 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13315 * inferiors.c: Ditto.
13316 * linux-low.c: Ditto.
13317 * mem-break.c: Ditto.
13318 * regcache.c: Ditto.
13319 * remote-utils.c: Ditto.
13320 * server.c: Ditto.
13321 * target.c: Ditto.
13322 * win32-low.c: Ditto.
13323
97438e3f
DE
133242008-12-12 Doug Evans <dje@google.com>
13325
896c7fbb
DE
13326 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13327 in debugging printf.
13328
97438e3f
DE
13329 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13330
e3b886f8
DE
133312008-12-09 Doug Evans <dje@google.com>
13332
13333 * linux-low.h (struct process_info): Delete member tid, unused.
13334 * thread-db.c (find_one_thread): Update.
13335 (maybe_attach_thread): Update.
13336
07e059b5
VP
133372008-12-02 Pedro Alves <pedro@codesourcery.com>
13338
889bf7c5
PA
13339 * target.h (struct target_ops): Add qxfer_osdata member.
13340 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13341 and dirent.h.
13342 (linux_qxfer_osdata): New functions.
13343 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13344 callback.
13345 * server.c (handle_query): Handle "qXfer:osdata:read:".
13346 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13347 (buffer_xml_printf): New functions.
13348 * server.h (struct buffer): New.
13349 (buffer_grow_str, buffer_grow_str0): New macros.
13350 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13351 (buffer_xml_printf): Declare.
07e059b5 13352
4cab47ab
DE
133532008-11-24 Doug Evans <dje@google.com>
13354
13355 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13356
f142445f
DJ
133572008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13358
13359 * server.c (handle_v_run): Always use the supplied argument list.
13360
d0107bb6 133612008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 13362
d0107bb6
BW
13363 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13364 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 13365
2c4ad781
TJB
133662008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13367
13368 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13369 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13370 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13371 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13372 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13373 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13374 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13375 XML target descriptions.
13376 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13377 when inferior is running on an ISA 2.05 or later processor. Add
13378 special case to return offset for full 64-bit slot of FPSCR when
13379 in 32-bits.
13380
dfb64f85
DJ
133812008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13382
13383 * Makefile.in (SFILES, clean): Added sparc64 files.
13384 (reg-sparc64.o, reg-sparc64.c): New.
13385 * configure.srv (sparc*-*-linux*): New configuration.
13386 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13387 syscall arguments for SPARC.
13388 (regsets_store_inferior_registers): Likewise.
13389 * linux-sparc-low.c: New file.
13390
66b6e1dd
DE
133912008-10-21 Doug Evans <dje@google.com>
13392
13393 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13394 (READLINE_DIR,READLINE_DEP): Delete.
13395 (INTERNAL_CFLAGS): Update.
13396 (LINTFLAGS): Update.
13397
9b710a42
PA
133982008-10-10 Pedro Alves <pedro@codesourcery.com>
13399
13400 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13401 whole argv from the last run, not just argv[0].
13402
5822d809
PA
134032008-09-08 Pedro Alves <pedro@codesourcery.com>
13404
13405 * regcache.c (new_register_cache): Return NULL if the register
13406 cache size isn't known yet.
13407 (free_register_cache): Avoid dereferencing a NULL regcache.
13408
74aac56f
DJ
134092008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13410
13411 * configure.srv: Merge MIPS and MIPS64.
13412
400b20f5
MR
134132008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13414
13415 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13416
677c5bb1
LM
134172008-08-18 Luis Machado <luisgpm@br.ibm.com>
13418
13419 * Makefile.in: Add required vsx dependencies.
13420
13421 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13422 Declare init_registers_powerpc_vsx32l.
13423 Declare init_registers_powerpc_vsx64l.
13424 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13425 (ppc_arch_setup): Check for VSX in hwcap.
13426 (ppc_fill_vsxregset): New function.
13427 (ppc_store_vsxregset): New function.
13428 Add new VSX entry in regset_info target_regsets.
13429
13430 * configure.srv: Add new VSX dependencies.
13431
a6f3e723
SL
134322008-08-12 Pedro Alves <pedro@codesourcery.com>
13433
13434 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13435 (remote_open): Set or clear transport_is_reliable.
13436 (putpkt_binary): Don't expect acks in noack mode.
13437 (getpkt): Don't send ack/nac in noack mode.
13438 * server.c (handle_general_set): Handle QStartNoAckMode.
13439 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13440 qSupported.
13441 (main): Reset noack_mode on every connection.
13442 * server.h (noack_mode): Declare.
13443
a417dc56
RW
134442008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13445
13446 * Makefile.in (GDBREPLAY_OBS): New variable.
13447 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13448
3221518c
UW
134492008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13450 Daniel Jacobowitz <dan@codesourcery.com>
13451
13452 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13453 (usr_store_inferior_registers): Likewise.
13454 (regsets_store_inferior_registers): Likewise.
13455
ec56be1b
PA
134562008-07-31 Rolf Jansen <rj@surtec.com>
13457 Pedro Alves <pedro@codesourcery.com>
13458
13459 * configure.ac: Check for memmem declaration.
13460 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13461 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13462 (disable_packet_qfThreadInfo): Unconditionally compile.
13463 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13464 * configure, config.in: Regenerate.
13465
2fe5e3ff
DE
134662008-07-28 Doug Kwan <dougkwan@google.com>
13467
13468 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13469 (linux_write_memory): Remove declaration of errno.
13470
836acd6d
UW
134712008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13472
13473 * linux-low.c (handle_extended_wait): Do not use "status"
13474 variable uninitialized.
13475
aeba519e
PA
134762008-07-07 Pedro Alves <pedro@codesourcery.com>
13477
13478 * server.c (handle_v_attach): Inhibit reporting dll changes.
13479
db42f210
PA
134802008-06-27 Pedro Alves <pedro@codesourcery.com>
13481
13482 * remote-utils.c (prepare_resume_reply): If requested, don't
13483 output "thread:TID" in the T stop reply.
13484
13485 * server.c (disable_packet_vCont, disable_packet_Tthread)
13486 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13487 (handle_query): If requested, disable support for qC, qfThreadInfo
13488 and qsThreadInfo.
13489 (handle_v_requests): If requested, disable support for vCont.
13490 (gdbserver_show_disableable): New.
13491 (main): Handle --disable-packet and --disable-packet=LIST.
13492
13493 * server.h (disable_packet_vCont, disable_packet_Tthread)
13494 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13495
8e4c5421
CD
134962008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13497
13498 * server.c (gdbserver_usage): Mention --version.
13499
6e23a804
DJ
135002008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13501
13502 * Makefile.in (gdbreplay.o): New rule.
13503
90aa6a40
JM
135042008-06-06 Joseph Myers <joseph@codesourcery.com>
13505
13506 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13507 message, not gdbserver.
13508
c16158bc 135092008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
13510 Nathan Sidwell <nathan@codesourcery.com>
13511 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
13512
13513 * acinclude.m4: Include ../../config/acx.m4.
13514 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13515 * configure, config.in: Regenerate.
13516 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13517 * server.c (gdbserver_version): Print PKGVERSION.
13518 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13519 (main): Adjust gdbserver_usage calls.
13520 * gdbreplay.c (version, host_name): Add declarations.
13521 (gdbreplay_version, gdbreplay_usage): New.
13522 (main): Accept --version and --help options.
13523
aeb75bf5
DJ
135242008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13525
13526 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13527 (arm_breakpoint_at): Handle Thumb.
13528 (the_low_target): Add comment.
13529
76b233dd
UW
135302008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13531
13532 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13533
08388c79
DE
135342008-05-09 Doug Evans <dje@google.com>
13535
a3c83fae
DE
13536 * server.h (decode_search_memory_packet): Declare.
13537 * remote-utils.c (decode_search_memory_packet): New fn.
13538 * server.c (handle_search_memory_1): New fn.
08388c79
DE
13539 (handle_search_memory): New fn.
13540 (handle_query): Process qSearch:memory packets.
13541
bb9c3d36
UW
135422008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13543
13544 * regcache.c (registers_length): Remove.
13545 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13546 full register packet.
13547 * regcache.h (registers_length): Remove prototype.
13548 * server.h (PBUFSIZ): Define to 16384.
13549
7284e1be
UW
135502008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13551
13552 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13553 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13554 powerpc-64l.o, and powerpc-altivec64l.o.
13555 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13556 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13557 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13558 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13559 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13560 to srv_xmlfiles.
13561
13562 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13563 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13564 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13565 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13566 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13567 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13568 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13569 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13570 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13571 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13572 (clean): Update.
13573
13574 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13575 (init_registers_powerpc_32l): ... this new prototype.
13576 (init_registers_powerpc_32): Remove, replace by ...
13577 (init_registers_powerpc_altivec32l): ... this new prototype.
13578 (init_registers_powerpc_e500): Remove, replace by ...
13579 (init_registers_powerpc_e500l): ... this new prototype.
13580 (init_registers_ppc64): Remove, replace by ...
13581 (init_registers_powerpc_64l): ... this new prototype.
13582 (init_registers_powerpc_64): Remove, replace by ...
13583 (init_registers_powerpc_altivec64l): ... this new prototype.
13584 (ppc_num_regs): Set to 73.
13585 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13586 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13587 (ppc_cannot_store_register): Handle orig_r3 and trap.
13588 (ppc_arch_setup): Update init_registers_... calls.
13589 (ppc_fill_gregset): Handle orig_r3 and trap.
13590
13591 * inferiors.c (clear_inferiors): Reset current_inferior.
13592
fdc59709
PB
135932008-04-23 Paolo Bonzini <bonzini@gnu.org>
13594
889bf7c5
PA
13595 * acinclude.m4: Add override.m4.
13596 * configure: Regenerate.
fdc59709 13597
c9b2f845
UW
135982008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13599
13600 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13601 initial call to init_register_ppc64.
13602
550512b8
UW
136032008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13604
43aaf8b6
PA
13605 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13606 single powerpc*-*-linux* case.
550512b8
UW
13607 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13608
b6430ec3
UW
136092008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13610
13611 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 13612 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
13613 from reg_xmlfiles.
13614 * linux-ppc-low.c: Include <elf.h>.
13615 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13616 (ppc_hwcap): New global variable.
13617 (ppc_regmap): Remove __SPE__ #ifdef sections.
13618 (ppc_regmap_e500): New global variable.
13619 (ppc_cannot_store_register): Update __SPE__ special case.
13620 (ppc_get_hwcap): New function.
13621 (ppc_arch_setup): Use it to determine whether inferior supports
13622 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13623 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13624 Do not access registers if target does not support AltiVec.
13625 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13626 Do not access registers if target does not support SPE.
13627 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13628
52fa2412
UW
136292008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13630
13631 * linux-low.c (disabled_regsets, num_regsets): New.
13632 (use_regsets_p): Delete.
13633 (linux_wait_for_process): Clear disabled_regsets.
13634 (regsets_fetch_inferior_registers): Check and set it.
13635 (regsets_store_inferior_registers): Likewise.
13636 (linux_fetch_registers, linux_store_registers): Do not use
13637 use_regsets_p.
13638 (initialize_low): Allocate disabled_regsets.
13639
e28b3332
DJ
136402008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13641
13642 * Makefile.in (LIBOBJS): New.
13643 (OBS): Use LIBOBJS.
13644 (memmem.o): New rule.
13645 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13646 * configure: Regenerated.
13647
4536995d
UW
136482008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13649
13650 * server.c (handle_query): Never return "unsupported" for
13651 qXfer:features:read queries.
13652
221c031f
UW
136532008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13654
13655 * server.c (get_features_xml): Fix inverted condition.
13656 (handle_query): Always support qXfer:feature:read.
13657
ccd213ac
DJ
136582008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13659
13660 * server.c (wrapper_argv): New.
13661 (start_inferior): Handle wrapper_argv. If set, expect an extra
13662 trap.
13663 (gdbserver_usage): Document --wrapper.
13664 (main): Parse --wrapper.
13665
6fe305f7
UW
136662008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13667
13668 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13669 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13670 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13671 (ppc_set_pc): Likewise.
13672 (ppc_arch_setup): New function.
13673 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13674 of collect_register.
889bf7c5 13675 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 13676
5b0a002e
UW
136772008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13678
13679 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13680 instead of linux-ppc64-low.o.
13681 * linux-ppc64-low.c: Remove file.
13682 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13683 (linux-ppc64-low.o): Remove rule.
13684
13685 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13686 (init_registers_powerpc_64): Likewise.
13687 (ppc_regmap): Conditionally define depending on __powerpc64__.
13688 (ppc_cannot_store_register): Do not special-case "fpscr" when
13689 compiled on __powerpc64__.
13690 (ppc_collect_ptrace_register): New function.
13691 (ppc_supply_ptrace_register): New function.
13692 (ppc_breakpoint): Change type to "unsigned int".
13693 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13694 (the_low_target): Conditionally provide initializers for the
889bf7c5 13695 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
13696 collect_ptrace_register and supply_ptrace_register members.
13697
9b4b61c8
UW
136982008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13699
13700 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13701 * server.c (gdbserver_xmltarget): Define.
13702 (get_features_xml): Use it to replace "target.xml" and arch_string.
13703
13704 * configure.srv: Remove srv_xmltarget. Add XML files that were
13705 mentioned there to srv_xmlfiles instead. Remove conditional tests
13706 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13707 srv_xmlfiles and srv_regobj to include all possible choices.
13708 * configure.ac (srv_xmltarget): Remove.
13709 (srv_xmlfiles): Do not add "target.xml".
13710 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13711 checks for supplementary target information.
13712 * configure: Regenerate.
13713 * Makefile.in (XML_TARGET): Remove.
13714 (target.xml): Remove rule.
13715 (clean): Do not clean up target.xml.
13716 (.PRECIOUS): Do not mention target.xml.
13717
13718 * target.h (struct target_ops): Remove arch_string member.
13719 * linux-low.c (linux_arch_string): Remove.
13720 (linux_target_ops): Remove arch_string initializer.
13721 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13722 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13723 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13724 * spu-low.c (spu_arch_string): Remove.
13725 (spu_target_ops): Remove arch_string initializer.
13726 * win32-low.c (win32_arch_string): Remove.
13727 (win32_target_ops): Remove arch_string initializer.
13728 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13729 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13730 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13731
ee1a7ae4
UW
137322008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13733
13734 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13735 by collect_ptrace_register and supply_ptrace_register hooks.
13736 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13737 instead of checking for the_low_target.left_pad_xfer.
13738 (usr_store_inferior_registers): Use collect_ptrace_register callback
13739 instead of checking for the_low_target.left_pad_xfer.
13740
13741 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13742 (s390_supply_ptrace_register): Likewise.
13743 (s390_fill_gregset): Call s390_collect_ptrace_register.
13744 (the_low_target): Update.
13745
13746 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13747 (ppc_supply_ptrace_register): Likewise.
13748 (the_low_target): Update.
13749
13750 * linux-i386-low.c (the_low_target): Update.
13751 * linux-x86-64-low.c (the_low_target): Update.
13752
d61ddec4
UW
137532008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13754
13755 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13756 reg-s390.o and reg-s390x.o.
13757
13758 * linux-low.c (new_inferior): New global variable.
13759 (linux_create_inferior, linux_attach): Set it.
13760 (linux_wait_for_process): Call the_low_target.arch_setup after the
13761 target has stopped for the first time.
13762 (initialize_low): Do not call the_low_target.arch_setup.
13763
13764 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13765 (s390_set_pc): Likewise.
13766 (s390_arch_setup): New function.
13767 (the_low_target): Use s390_arch_setup as arch_setup routine.
13768
13769 * regcache.c (realloc_register_cache): New function.
13770 (set_register_cache): Call it for each existing regcache.
13771
d05b4ac3
UW
137722008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13773
13774 * server.h (init_registers): Remove prototype.
13775
13776 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13777 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13778 instead of init_registers ().
13779 * linux-arm-low.c (init_registers_arm): Add prototype.
13780 (init_registers_arm_with_iwmmxt): Likewise.
13781 (the_low_target): Add initializer for arch_setup field.
13782 * linux-cris-low.c (init_registers_cris): Add prototype.
13783 (the_low_target): Add initializer for arch_setup field.
13784 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13785 (the_low_target): Add initializer for arch_setup field.
13786 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13787 (the_low_target): Add initializer for arch_setup field.
13788 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13789 (the_low_target): Add initializer for arch_setup field.
13790 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13791 (the_low_target): Add initializer for arch_setup field.
13792 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13793 (the_low_target): Add initializer for arch_setup field.
13794 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13795 (init_registers_mips64_linux): Likewise.
13796 (the_low_target): Add initializer for arch_setup field.
13797 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13798 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13799 (the_low_target): Add initializer for arch_setup field.
13800 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13801 (init_registers_powerpc_64): Likewise.
13802 (the_low_target): Add initializer for arch_setup field.
13803 * linux-s390-low.c (init_registers_s390): Add prototype.
13804 (init_registers_s390x): Likewise.
13805 (the_low_target): Add initializer for arch_setup field.
13806 * linux-sh-low.c (init_registers_sh): Add prototype.
13807 (the_low_target): Add initializer for arch_setup field.
13808 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13809 (the_low_target): Add initializer for arch_setup field.
13810 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13811 (the_low_target): Add initializer for arch_setup field.
13812
13813 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13814 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13815 instead of init_registers ().
13816 * win32-arm-low.c (init_registers_arm): Add prototype.
13817 (the_low_target): Add initializer for arch_setup field.
13818 * win32-i386-low.c (init_registers_i386): Add prototype.
13819 (the_low_target): Add initializer for arch_setup field.
13820
13821 * spu-low.c (init_registers_spu): Add prototype.
13822 (initialize_low): Call initialie_registers_spu () instead of
13823 initialize_registers ().
13824
fd96d250
PA
138252008-02-19 Pedro Alves <pedro@codesourcery.com>
13826
13827 * server.c (handle_v_requests): When handling the vRun and vAttach
13828 packets, if already debugging a process, don't kill it. Return an
13829 error instead.
13830
d41b6bb4
DJ
138312008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13832
13833 * server.c (handle_query): Correct length check.
13834
5ac588cf
PA
138352008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13836
13837 * win32-low.c (do_initial_child_stuff): Add process handle
13838 parameter. Set current_process_handle and current_process_id from the
13839 parameters. Clear globals.
13840 (win32_create_inferior): Don't set current_process_handle and
13841 current_process_id here. Instead pass them on the call to
13842 do_initial_child_stuff.
13843 (win32_attach): Likewise.
13844 (win32_clear_inferiors): New.
13845 (win32_kill): Don't close the current process handle or the
13846 current thread handle here. Instead call win32_clear_inferiors.
13847 (win32_detach): Don't open a new handle to the process. Call
13848 win32_clear_inferiors.
13849 (win32_join): Don't rely on current_process_handle; open a new
13850 handle using the process id.
13851 (win32_wait): Call win32_clear_inferiors when the inferior process
13852 has exited.
13853
ecd7ecbc
DJ
138542008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13855
13856 * server.c (monitor_show_help): Add "exit".
13857
1525d545
MG
138582008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13859
ecd7ecbc 13860 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
13861 (clean): Add reg-xtensa.c.
13862 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
13863 * configure.srv (xtensa*-*-linux*) New target.
13864 * linux-xtensa-low.c: New.
13865 * xtensa-xtregs.c: New.
1525d545 13866
59a016f0
PA
138672008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13868
13869 * hostio.c: Don't include errno.h.
13870 (errno_to_fileio_errno): Move to hostio-errno.
13871 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13872 error number outputting to the target->hostio_last_error callback.
13873 (hostio_packet_error): Use FILEIO_EINVAL directly.
13874 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13875 calls to hostio_error.
13876 * hostio-errno.c: New.
13877 * server.h (hostio_last_error_from_errno): Declare.
13878 * target.h (target_ops): Add hostio_last_error member.
13879 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13880 as hostio_last_error handler.
889bf7c5 13881 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
13882 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13883 (wince_hostio_last_error): New functions.
13884 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13885 as hostio_last_error handler.
13886 (win32_target_ops) [!_WIN32_WCE]: Register
13887 hostio_last_error_from_errno as hostio_last_error handler.
13888 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13889 (hostio-errno.o): New rule.
13890 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13891 * configure.srv (srv_hostio_err_objs): New variable. Default to
13892 hostio-errno.o.
13893 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13894 * configure: Regenerate.
13895
2d717e4f
DJ
138962008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13897
13898 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13899 (linux_kill, linux_detach): Clean up the process list.
13900 * remote-utils.c (remote_open): Improve port number parsing.
13901 (putpkt_binary, input_interrupt): Only send interrupts if the target
13902 is running.
13903 * server.c (extended_protocol): Make static.
13904 (attached): Define earlier.
13905 (exit_requested, response_needed, program_argv): New variables.
13906 (target_running): New.
13907 (start_inferior): Clear attached here.
13908 (attach_inferior): Set attached here.
13909 (require_running): Define.
13910 (handle_query): Use require_running and target_running. Implement
13911 "monitor exit".
13912 (handle_v_attach, handle_v_run): New.
13913 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13914 (gdbserver_usage): Update.
13915 (main): Redo argument parsing. Handle --debug and --multi. Handle
13916 --attach along with other options or after the port. Save
13917 program_argv. Support no initial program. Resynchronize
13918 communication with GDB after an error. Handle "monitor exit".
13919 Use require_running and target_running. Always allow the extended
13920 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13921 restart in extended mode.
13922 * README: Refer to the GDB manual. Update --attach usage.
13923
7407e2de
AS
139242007-12-20 Andreas Schwab <schwab@suse.de>
13925
13926 * linux-low.c (STACK_SIZE): Define.
13927 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13928 (linux_test_for_tracefork): Likewise.
13929
b65d95c5
DJ
139302007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13931
13932 * linux-low.c (linux_wait_for_event): Update messages. Do not
13933 reinsert auto-delete breakpoints.
13934 * mem-break.c (struct breakpoint): Change return type of handler to
13935 int.
13936 (set_breakpoint_at): Update handler type.
13937 (reinsert_breakpoint_handler): Return 1 instead of calling
13938 delete_breakpoint.
13939 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13940 setting a new one.
13941 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13942 * mem-break.h (set_breakpoint_at): Update handler type.
13943 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13944 * win32-low.c (auto_delete_breakpoint): New.
13945 (get_child_debug_event): Use it.
13946
4e799345
DJ
139472007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13948
13949 * configure.ac: Check for pread and pwrite.
13950 * hostio.c (handle_pread): Fall back to lseek and read.
13951 (handle_pwrite): Fall back to lseek and write.
13952 * config.in, configure: Regenerated.
13953
27524b67
DJ
139542007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13955
13956 * server.c (myresume): Add own_buf argument.
13957 (main): Update calls.
13958
a20d5e98
DJ
139592007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13960
13961 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13962 * remote-utils.c (remote_open): Do not call disable_async_io.
13963 (block_async_io): Delete.
13964 (unblock_async_io): Make static.
13965 (initialize_async_io): New.
13966 * server.c (handle_v_cont): Handle async I/O here.
13967 (myresume): Likewise. Move other common resume tasks here...
13968 (main): ... from here. Call initialize_async_io. Disable async
13969 I/O before the main loop.
13970 * server.h (initialize_async_io): Declare.
13971 (block_async_io, unblock_async_io): Delete prototypes.
13972 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13973
b79d787e
DJ
139742007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13975
13976 * remote-utils.c (readchar): Allow binary data in received messages.
13977
d97903b2
PA
139782007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13979
13980 * win32-low.c (attaching): New global.
13981 (win32_create_inferior): Clear the `attaching' global.
13982 (win32_attach): Set the `attaching' global.
13983 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13984 attaching. Only set a breakpoint at the entry point if not
13985 attaching.
13986
311de423
PA
139872007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13988
13989 * server.c (main): Don't report dll events on the initial
13990 connection on attaches.
13991
6c2d16d2
PA
139922007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13993
13994 * server.c (main): Relax numerical bases supported for the pid of
13995 the --attach command line argument.
13996
5ca906e6
PA
139972007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13998
13999 * win32-low.c (win32_attach): Call OpenProcess before
14000 DebugActiveProcess, not after. Add last error output to error
14001 call.
14002
9c6c8194
PA
140032007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14004
14005 * win32-low.c (win32_get_thread_context)
14006 (win32_set_thread_context): New functions.
14007 (thread_rec): Use win32_get_thread_context.
14008 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14009 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14010 field.
14011
4d5d1aaa
PA
140122007-12-03 Leo Zayas
14013 Pedro Alves <pedro_alves@portugalmail.pt>
14014
14015 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14016 global variables.
14017 (child_add_thread): Minor cleanup.
14018 (child_continue): Resume artificially suspended threads before
14019 calling ContinueDebugEvent.
14020 (suspend_one_thread): New.
14021 (fake_breakpoint_event): New.
14022 (get_child_debug_event): Change return type to int. Check here if
14023 gdb sent an interrupt request. If a soft interrupt was requested,
14024 fake a breakpoint event. Return 0 if there is no event to handle,
14025 and 1 otherwise.
14026 (win32_wait): Don't check here if gdb sent an interrupt request.
14027 Ensure there is a valid event to handle.
14028 (win32_request_interrupt): Add soft interruption method as last
14029 resort.
14030
c436e841
PA
140312007-12-03 Leo Zayas
14032 Pedro Alves <pedro_alves@portugalmail.pt>
14033
14034 * win32-low.h (win32_thread_info): Add descriptions to the
14035 structure members. Replace `suspend_count' counter by a
14036 `suspended' flag.
14037 * win32-low.c (thread_rec): Update condition of when to get the
14038 context from the inferior. Rely on ContextFlags being set if it
14039 has already been retrieved. Only suspend the inferior thread if
14040 we haven't already. Warn if that fails.
14041 (continue_one_thread): s/suspend_count/suspended/. Only call
14042 ResumeThread once. Warn if that fails.
14043
e7b5fa67
PA
140442007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14045
14046 * win32-low.c (win32_wait): Don't read from the inferior when it
14047 has already exited.
14048
a385171d
PA
140492007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14050
14051 * Makefile.in (win32_low_h): New variable.
14052 (win32-low.o): Add dependency on $(win32_low_h).
14053 (win32-arm-low.o, win32-i386-low.o): New rules.
14054
f80c84b3
DJ
140552007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14056
14057 * hostio.c: Correct copyright year.
14058
a6b151f1
DJ
140592007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14060
14061 * Makefile.in (OBS): Add hostio.o.
14062 (hostio.o): New rule.
14063 * server.h (handle_vFile): Declare.
14064 * hostio.c: New file.
14065 * server.c (handle_v_requests): Take packet_len and new_packet_len
14066 for binary packets. Call handle_vFile.
14067 (main): Update call to handle_v_requests.
14068
f9387fc3
DJ
140692007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14070
14071 * linux-low.c: Include <sched.h>.
14072
51c2684e
DJ
140732007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14074
14075 * linux-low.c (linux_tracefork_grandchild): New.
14076 (linux_tracefork_child): Use clone.
14077 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14078
75f83163
JB
140792007-10-31 Joel Brobecker <brobecker@adacore.com>
14080
14081 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14082
da5898ce
DJ
140832007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14084
14085 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14086
24a09b5f
DJ
140872007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14088
14089 * inferiors.c (change_inferior_id): Delete.
14090 (add_pid_to_list, pull_pid_from_list): New.
14091 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14092 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14093 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14094 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14095 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14096 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14097 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14098 (using_threads): Always set to 1.
14099 (handle_extended_wait): New.
14100 (add_process): Do not set TID.
14101 (linux_create_inferior): Set must_set_ptrace_flags.
14102 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14103 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14104 (linux_thread_alive): Rename TID argument to LWPID.
14105 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14106 (linux_wait_for_event): Do not use TID or check using_threads. Update
14107 call to dead_thread_notify. Call handle_extended_wait.
14108 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14109 (send_sigstop): Delete sigstop_sent.
14110 (wait_for_sigstop): Avoid TID.
14111 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14112 (linux_test_for_tracefork): New.
14113 (linux_lookup_signals): Use thread_db_active and
14114 linux_supports_tracefork_flag.
14115 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14116 * linux-low.h (get_process_thread): Avoid TID.
14117 (struct process_ifo): Move thread_known and tid to the end. Remove
14118 sigstop_sent.
14119 (linux_attach_lwp, thread_db_init): Update prototypes.
14120 * server.h (change_inferior_id): Delete prototype.
14121 (add_pid_to_list, pull_pid_from_list): New prototypes.
14122 * thread-db.c (thread_db_use_events): New.
14123 (find_first_thread): Rename to...
14124 (find_one_thread): ...this. Update callers and messages. Do not
14125 call fatal. Check thread_db_use_events. Do not call
14126 change_inferior_id or new_thread_notify.
14127 (maybe_attach_thread): Update. Do not call new_thread_notify.
14128 (thread_db_init): Set thread_db_use_events. Check use_events.
14129 * utils.c (fatal, warning): Correct message prefix.
14130
30ed0a8f
DJ
141312007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14132
14133 * Makefile.in (clean): Remove new files.
14134 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14135 (powerpc-64.o, powerpc-64.c): New rules.
14136 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14137 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14138 with SPE.
14139 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14140 SPE targets.
14141 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14142 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14143 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14144 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14145 (target_regsets): Add AltiVec and SPE register sets.
14146 * configure.ac: Check for AltiVec and SPE.
14147 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14148 (ppc_fill_vrregset, ppc_store_vrregset): New.
14149 (target_regsets): Add AltiVec register set.
14150 * configure: Regenerated.
14151
fd462a61
DJ
141522007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14153
14154 * linux-low.c (O_LARGEFILE): Define.
14155 (linux_read_memory): Use /proc/PID/mem.
14156 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14157 * configure, config.in: Regenerated.
14158
69f223ed
DJ
141592007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14160
14161 * linux-low.c (linux_wait_for_event): Do not pass signals while
14162 single-stepping.
14163
aec18585
PA
141642007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14165
14166 * win32-low.c (create_process): New.
14167 (win32_create_inferior): Use create_process instead of
14168 CreateProcess. If create_process failed retry appending an ".exe"
14169 suffix. Store the GetLastError result immediatelly after
14170 create_process calls and use it on the call to error.
14171
34d86ddd
PA
141722007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14173
14174 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14175
5a0e3bd0
JB
141762007-08-23 Joel Brobecker <brobecker@adacore.com>
14177
14178 * configure.ac: Switch license to GPLv3.
14179
f88c79e6
MS
141802007-08-01 Michael Snyder <msnyder@access-company.com>
14181
14182 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14183
6b3d9b83
PA
141842007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14185
14186 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14187 typedef.
14188 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14189 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14190 CloseToolhelp32Snapshot.
14191 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14192 CloseToolhelp32Snapshot.
14193
c588c53c
MS
141942007-07-27 Michael Snyder <michael.snyder@access-company.com>
14195
14196 * server.c (main): Check for inferior exit before main loop.
14197
aa0403d9
PA
141982007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14199
14200 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14201 instead of on tmp_desc.
14202
255e7678
DJ
142032007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14204 Daniel Jacobowitz <dan@codesourcery.com>
14205
14206 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14207 (add_thread): Minor cleanups.
14208 (clear_inferiors): Move lower in the file. Clear the DLL
14209 list.
14210 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14211 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14212 (xml_escape_text): New.
14213 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14214 for qSupported.
14215 (handle_v_cont): Report errors.
14216 (gdbserver_version): Update.
14217 (main): Correct size of own_buf. Do not report initial DLL events.
14218 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14219 (unloaded_dll, xml_escape_text): New.
14220 * win32-low.c (enum target_waitkind): Update comments.
14221 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14222 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14223 (win32_EnumProcessModules, win32_GetModuleInformation)
14224 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14225 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14226 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14227 (win32_Module32First, win32_Module32Next, load_toolhelp)
14228 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14229 (get_child_debug_event): Handle DLL events.
14230 (win32_wait): Likewise.
14231
0d37add9
DJ
142322007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14233
14234 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14235 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14236
45e2715e
PA
142372007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14238
14239 * win32-low.c (handle_output_debug_string): Ignore event if not
14240 waiting.
14241
c5674cf1
PA
142422007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14243
14244 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14245
2bbe3cc1
DJ
142462007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14247
14248 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14249
ae13219e
DJ
142502007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14251
14252 * inferiors.c (change_inferior_id): Add comment.
14253 * linux-low.c (check_removed_breakpoint): Add an early
14254 prototype. Improve debug output.
14255 (linux_attach): Doc update.
14256 (linux_detach_one_process, linux_detach): Clean up before releasing
14257 each process.
14258 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14259 * linux-low.h (struct process_info): Doc improvement.
14260 * mem-break.c (delete_all_breakpoints): New.
14261 * mem-break.h (delete_all_breakpoints): New prototype.
14262 * thread-db.c (find_first_thread): New.
14263 (thread_db_create_event): Call it instead of
14264 thread_db_find_new_threads. Clean up unused variables.
14265 (maybe_attach_thread): Remove first thread handling.
14266 (thread_db_find_new_threads): Use find_first_thread.
14267 (thread_db_get_tls_address): Likewise.
14268
4105de34
DJ
142692007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14270
14271 * thread-db.c (thread_db_find_new_threads): Add prototype.
14272 (thread_db_create_event): Check for the main thread before adding
14273 a new thread.
14274 (maybe_attach_thread): Only enable event reporting if TID == 0.
14275 (thread_db_get_tls_address): Check for new threads.
14276
2b876972
DJ
142772007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14278
14279 * linux-low.c (linux_create_inferior): Try execv before execvp.
14280 * spu-low.c (spu_create_inferior): Likewise.
14281
7a245884
DJ
142822007-06-13 Mike Frysinger <vapier@gentoo.org>
14283
14284 * linux-low.c (linux_create_inferior): Change execv to execvp.
14285 * spu-low.c (spu_create_inferior): Likewies.
14286
117ce543
DJ
142872007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14288
14289 * Makefile.in (clean): Clean new files instead of deleted ones.
14290 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14291 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14292 rules.
14293 * configure.srv: Specify XML files and new regformats for MIPS and
14294 MIPS64 GNU/Linux.
14295 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14296 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14297 an entry for the restart register.
14298 (mips_cannot_fetch_register, mips_cannot_store_register)
14299 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14300 register names to match the XML descriptions.
14301 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14302 restart register instead of $0.
14303
0e7f50da
UW
143042007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14305 Markus Deuling <deuling@de.ibm.com>
14306
14307 * remote-utils.c (decode_xfer_write): New function.
14308 * server.h (decode_xfer_write): Add prototype.
14309 * server.c (handle_query): Add PACKET_LEN argument. Support
14310 qXfer:spu:read and qXfer:spu:write packets.
14311 (main): Pass packet_len to handle_query.
14312 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14313 * target.h (target_ops): Add qxfer_spu.
14314
374c1d38
UW
143152007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14316
14317 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14318 accessing non-seekable spufs files.
14319
bb63802a
UW
143202007-05-16 Markus Deuling <deuling@de.ibm.com>
14321
889bf7c5 14322 * server.c (handle_query): Add reply for qC packet.
bb63802a 14323
7390519e
PA
143242007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14325 Leo Zayas <lerele@champenstudios@com>
14326
14327 * server.h (check_remote_input_interrupt_request): New function.
14328 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14329 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14330 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14331 (check_remote_input_interrupt_request): New function.
14332 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 14333 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
14334 winapi_GenerateConsoleCtrlEvent): New typedefs.
14335 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14336 to 250 ms.
14337 (win32_wait): Check for remote interrupt request
14338 with check_remote_input_interrupt_request.
14339 (win32_request_interrupt): New function.
14340 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14341
34b34921
PA
143422007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14343
14344 * win32-low.c (debug_registers_changed,
14345 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14346 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14347 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14348 (thread_rec): Get context using the low target.
14349 (child_add_thread): Call thread_added on the low target,
14350 which does the same thing.
14351 (regptr): Delete.
14352 (do_initial_child_stuff): Remove debug registers references.
14353 Set context using the low target. Resume threads after
14354 setting the contexts.
14355 (child_continue): Remove dead variable. Remove debug
14356 registers references.
14357 (child_fetch_inferior_registers): Go through the low target.
14358 (do_child_store_inferior_registers): Remove.
14359 (child_store_inferior_registers): Go through the low target.
14360 (win32_resume): Remove debug registers references.
14361 Set context using the low target.
14362 (handle_exception): Change return type to void. Don't record
14363 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14364 first chance exception.
889bf7c5 14365 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
14366 goto loop. Always return after waiting for debug event.
14367 (win32_wait): Convert to switch statement. Handle spurious
14368 events.
14369
14370 * win32-i386-low.c (debug_registers_changed,
14371 debug_registers_used): New.
14372 (initial_stuff): Rename to ...
14373 (i386_initial_stuff): ... this. Clear debug registers
14374 state variables.
14375 (store_debug_registers): Delete.
14376 (i386_get_thread_context): New.
14377 (load_debug_registers): Delete.
14378 (i386_set_thread_context): New.
14379 (i386_thread_added): New.
14380 (single_step): Rename to ...
14381 (i386_single_step): ... this.
14382 (do_fetch_inferior_registers): Rename to ...
14383 (i386_fetch_inferior_register): ... this.
14384 (i386_store_inferior_register): New.
14385 (the_low_target): Adapt to new interface.
14386
14387 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14388 (arm_get_thread_context): New.
14389 (arm_set_thread_context): New.
14390 (regptr): New.
14391 (do_fetch_inferior_registers): Rename to ...
14392 (arm_fetch_inferior_register): ... this.
14393 (arm_store_inferior_register): New.
14394 (arm_wince_breakpoint): Reimplement as unsigned long.
14395 (arm_wince_breakpoint_len): Define.
14396 (the_low_target): Adapt to new interface.
14397
14398 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14399 load_debug_registers. Add get_thread_context, set_thread_context,
14400 thread_added and store_inferior_register. Rename
14401 fetch_inferior_registers to fetch_inferior_register.
14402 (regptr): Remove declaration.
14403
dd6953e1
PA
144042007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14405
14406 * linux-low.c (linux_detach): Change return type to int. Return 0.
14407 * spu-low.c (spu_detach): Likewise.
14408
444d6139
PA
144092007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14410
14411 * target.h (target_ops): Change return type of detach to int.
14412 Add join.
14413 (join_inferior): New.
14414 * server.c (main): Don't skip detach support on mingw32.
14415 If the inferior doesn't support detaching return error.
14416 Call join_inferior instead of using waitpid.
14417 * linux-low.c (linux_join): New.
14418 (linux_target_op): Add linux_join.
14419 * spu-low.c (spu_join): New.
14420 (spu_target_ops): Add spu_join.
14421 * win32-low.c (win32_detach): Adapt to new interface.
14422 Reopen current_process_handle before detaching. Issue a child
14423 resume before detaching.
14424 (win32_join): New.
14425 (win32_target_op): Add win32_join.
14426
1d5315fe
PA
144272007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14428
14429 * win32-low.c (win32-attach): Fix return value.
14430 * target.h (target_ops): Describe ATTACH return values.
14431
bf914831
PA
144322007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14433
14434 * win32-low.c (GETPROCADDRESS): Define.
14435 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14436 (winapi_DebugSetProcessKillOnExit): Likewise.
14437 (win32_create_inferior): Force usage of ansi CreateProcessA.
14438 (win32_attach): Use GETPROCADDRESS.
14439 (win32_detach): Likewise.
14440
f72f3e60
PA
144412007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14442
14443 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14444
ed50f18f
PA
144452007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14446
14447 * win32-low.c: Commit leftover changes from 2007-03-29.
14448
0c2ead7e
DJ
144492007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14450
14451 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14452 fields short instead of int. Add explicit padding.
14453 (i387_cache_to_fsave): Remove unnecessary casts.
14454 (i387_fsave_to_cache): Doc fix.
14455 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14456
73725ff3
DJ
144572007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14458
14459 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14460 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14461
d99f33d8
PA
144622007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14463
14464 * configure.srv (arm*-*-mingw32ce*): Move near the other
14465 arm targets.
14466
68070c10
PA
144672007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14468
2482afc6 14469 * configure.ac: Add errno checking.
68070c10
PA
14470 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14471 sys/file.h and malloc.h.
14472 (AC_CHECK_DECLS): Add perror.
14473 (srv_mingwce): Handle.
2482afc6 14474 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
14475 win32-i386-low.o to srv_tgtobj.
14476 (i[34567]86-*-mingw*): Likewise.
14477 (arm*-*-mingw32ce*): Add case.
14478 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14479 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14480 [__MINGW32CE__] (strerror): New function.
14481 [__MINGW32CE__] (errno): Define to GetLastError.
14482 [__MINGW32CE__] (COUNTOF): New macro.
14483 (remote_open): Remove extra close call.
14484 * mem-break.c (delete_breakpoint_at): New function.
14485 * mem-break.h (delete_breakpoint_at): Declare.
14486 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14487 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14488 [USE_WIN32API] (read, write): Add char* casts.
14489 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14490 * server.h: Include wincecompat.h on Windows CE.
14491 [HAVE_ERRNO_H]: Check.
14492 (perror): Declare if not declared.
14493 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14494 (perror_with_name): Remove errno declaration.
14495 * wincecompat.h: New.
14496 * wincecompat.c: New.
14497 * win32-low.h: New.
14498 * win32-arm-low.c: New.
14499 * win32-i386-low.c: New.
14500 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14501 (OUTMSG2): Make it safe.
14502 (_T): New macro.
14503 (COUNTOF): New macro.
14504 (NUM_REGS): Get it from the low target.
14505 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14506 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14507 (thread_rec): Let low target handle debug registers.
14508 (child_add_thread): Likewise.
14509 (child_init_thread_list): Likewise.
14510 (continue_one_thread): Likewise.
14511 (regptr): New.
14512 (do_child_fetch_inferior_registers): Move to ...
14513 * win32-i386-low.c: ... here, and rename to ...
14514 (do_fetch_inferior_registers): ... this.
889bf7c5 14515 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
14516 Go through the low target.
14517 (do_child_store_inferior_registers): Use regptr.
14518 (strwinerror): New function.
14519 (win32_create_inferior): Handle Windows CE.
14520 Use strwinerror instead of strerror on Windows error
14521 codes. Add program to the error output.
14522 Don't close the main thread handle on Windows CE.
14523 (win32_attach): Use coredll.dll on Windows CE.
14524 (win32_kill): Close current process and current
14525 thread handles.
14526 (win32_detach): Use coredll.dll on Windows CE.
14527 (win32_resume): Let low target handle debug registers, and
14528 step request.
14529 (handle_exception): Add/Remove initial breakpoint. Avoid
14530 non-existant WSTOPSIG on Windows CE.
14531 (win32_read_inferior_memory): Cast to remove warning.
14532 (win32_arch_string): Go through the low target.
14533 (initialize_low): Call set_breakpoint_data with the low
14534 target's breakpoint.
14535 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14536 FOP_REGNUM, mappings): Move to ...
14537 * win32-i386-low.c: ... here.
14538 * win32-low.c (win32_thread_info): Move to ...
14539 * win32-low.h: ... here.
14540 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14541 win32-arm-low.c and wincecompat.c.
14542 (all:): Add $EXEEXT.
14543 (install-only:): Likewise.
14544 (gdbserver:): Likewise.
14545 (gdbreplay:): Likewise.
14546 * config.in: Regenerate.
14547 * configure: Regenerate.
14548
41093d81
PA
145492007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14550
14551 * win32-low.c: Rename typedef thread_info to
14552 win32_thread_info throughout.
14553
544afa54
PA
145542007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14555
14556 * win32-i386-low.c: Rename to ...
14557 * win32-low.c: ... this.
14558 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14559 * Makefile.in: Likewise.
14560
bce7165d
PA
145612007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14562
14563 * remote-utils.c (monitor_output): Constify msg parameter.
14564 * server.h (monitor_output): Likewise.
14565 * win32-i386-low.c (handle_output_debug_string): New.
14566 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14567 handle_output_debug_string.
14568 (get_child_debug_event): Likewise.
14569
506c7aa0
DJ
145702007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14571
14572 * server.c (main): Correct strtoul check.
14573
42c81e2a
DJ
145742007-03-27 Jon Ringle <jon@ringle.org>
14575
14576 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14577
9453113a
DJ
145782007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14579
14580 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14581
64a69107
DJ
145822007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14583
14584 * terminal.h: Check HAVE_SGTTY_H.
14585
145862007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
14587
14588 * remote-utils.c (remote_open): Print out the assigned port number.
14589
c74d0ad8
DJ
145902007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14591
14592 * remote-utils.c (monitor_output): New function.
14593 * server.c (debug_threads): Define here.
14594 (monitor_show_help): New function.
14595 (handle_query): Handle qRcmd.
14596 (main): Do not handle 'd' packet.
14597 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14598 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14599 of debug_threads.
14600
de7c3b4a
PA
146012007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14602
14603 * Makefile.in (EXEEXT): New.
14604 (clean): Use $(EXEEXT).
14605
ef57601b
PA
146062007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14607
14608 * target.h (target_ops): Rename send_signal to request_interrupt,
14609 and remove enum target_signal parameter.
14610 * linux-low.c (linux_request_interrupt): Rename from
14611 linux_send_signal, and always send SIGINT.
14612 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14613 and always send SIGINT.
14614 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14615 of send_signal.
14616 (input_interrupt): Likewise.
14617
820f2bda
PA
146182007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14619
14620 * server.c (get_features_xml): Check if target implemented
14621 arch_string.
14622 * win32-i386-low.c (win32_arch_string): New.
14623 (win32_target_ops): Add win32_arch_string as arch_string member.
14624
ab39bf24
UW
146252007-02-22 Markus Deuling <deuling@de.ibm.com>
14626
14627 * spu-low.c (spu_arch_string): New.
14628 (spu_target_ops): Add spu_arch_string.
14629
61ff6e04
DJ
146302007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14631
14632 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14633 * configure.ac: Do not check for terminal.h.
14634 * configure, config.in: Regenerated.
14635
fb1e4ffc
DJ
146362007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14637
14638 * Makefile.in (OBS): Add $(XML_BUILTIN).
14639 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14640 (clean): Update.
14641 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14642 (arm-with-iwmmxt.c): New.
14643 * config.in, configure: Regenerate.
14644 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14645 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14646 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14647 (arm*-*-linux*): Add iWMMXt and regset support.
14648 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14649 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14650 (arm_store_wmmxregset, target_regsets): New.
14651 * server.c (get_features_xml): Take annex argument. Check builtin
14652 XML documents.
14653 (handle_query): Handle multiple annexes.
14654
0f48aa01
DJ
146552007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14656
14657 * remote-utils.c [USE_WIN32API] (read, write): Define.
14658 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14659 write.
14660
23181151
DJ
146612007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14662
14663 * linux-i386-low.c (the_low_target): Set arch_string.
14664 * linux-x86-64-low.c (the_low_target): Likewise.
14665 * linux-low.c (linux_arch_string): New.
14666 (linux_target_ops): Add it.
14667 * linux-low.h (struct linux_target_ops): Add arch_string.
14668 * server.c (write_qxfer_response): Use const void * for DATA.
14669 (get_features_xml): New.
14670 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14671 * target.h (struct target_ops): Add arch_string method.
14672
9d606399
DJ
146732007-01-03 Denis Pilat <denis.pilat@st.com>
14674 Daniel Jacobowitz <dan@codesourcery.com>
14675
14676 * linux-low.c (linux_kill): Handle being called with no threads.
14677 * win32-i386-low.c (win32_kill): Likewise.
14678 (get_child_debug_event): Clear current_process_handle.
14679
146802006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
14681 Daniel Jacobowitz <dan@codesourcery.com>
14682
14683 * remote-utils.c (remote_open): Check the type of specified
14684 serial port devices before opening them.
14685 * server.c (main): Kill the inferior if an error occurs during
14686 the first remote_open.
14687
a5e13d24
DJ
146882006-12-05 Markus Deuling <deuling@de.ibm.com>
14689
14690 * README: Update supported targets.
14691
186947f7
DJ
146922006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14693
14694 * Makefile.in (clean): Remove reg-mips64.c.
14695 (reg-mips64.c, reg-mips64.o): New rules.
14696 * configure.srv: Handle mips64. Include regset support for mips.
14697 * linux-mips-low.c (union mips_register): New.
14698 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14699 (mips_breakpoint, mips_breakpoint_at): Use int.
14700 (mips_collect_register, mips_supply_register)
14701 (mips_collect_register_32bit, mips_supply_register_32bit)
14702 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14703 (mips_store_fpregset, target_regsets): New.
14704 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14705
a13e2c95
UW
147062006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14707
14708 * configure.srv: Add target "spu*-*-*".
14709 * Makefile.in (clean): Remove reg-spu.c.
14710 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14711 * spu-low.c: New file.
14712
cb7283db
DJ
147132006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14714
14715 * configure.ac: Correct td_thr_tls_get_addr test.
14716 * configure: Regenerated.
14717
89be2091
DJ
147182006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14719
14720 * linux-low.c (linux_wait_for_event): Reformat. Use the
14721 pass_signals array.
14722 * remote-utils.c (decode_address_to_semicolon): New.
14723 * server.c (pass_signals, handle_general_set): New.
14724 (handle_query): Mention QPassSignals for qSupported.
14725 (main): Call handle_general_set.
14726 * server.h (pass_signals, decode_address_to_semicolon): New.
14727
000ef4f0
DJ
147282006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14729
14730 * server.c (handle_query): Correct error handling for read_auxv.
14731
b7149293
UW
147322005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14733
14734 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14735 and srv_linux_thread_db to yes.
14736 * linux-s390-low.c (s390_fill_gregset): New function.
14737 (target_regsets): Define data structure.
14738
dae5f5cf
DJ
147392006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14740
14741 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14742 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14743 * config.in, configure: Regenerated.
14744 * inferiors.c (gdb_id_to_thread): New function.
14745 (gdb_id_to_thread_id): Use it.
14746 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14747 * linux-low.h (struct process_info): Add th member.
14748 (thread_db_get_tls_address): New prototype.
14749 * remote-utils.c (decode_address): Make non-static.
14750 * server.c (handle_query): Handle qGetTLSAddr.
14751 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14752 * target.h (struct target_ops): Add get_tls_address.
14753 * thread-db.c (maybe_attach_thread): Save the thread handle.
14754 (thread_db_get_tls_address): New.
14755
32ca6d61
DJ
147562006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14757
14758 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14759 (linux_resume_one_process): Take a siginfo_t *. Update all
14760 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14761 (struct pending_signals): Add a siginfo_t.
14762 (linux_wait_for_process): Always set last_status.
14763 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14764 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14765 * linux-low.h (struct process_info): Add last_status.
14766
5ffff7c1
DJ
147672006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14768
14769 * remote-utils.c (try_rle): New function.
14770 (putpkt_binary): Use it.
14771
8695c747
DJ
147722006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14773
14774 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14775 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14776 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14777 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14778 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14779 point registers.
14780
290fadea
RS
147812006-08-08 Richard Sandiford <richard@codesourcery.com>
14782
14783 * server.c (terminal_fd): New variable.
14784 (old_foreground_pgrp): Likewise.
14785 (restore_old_foreground_pgrp): New function.
14786 (start_inferior): Record the terminal file descriptor in terminal_fd
14787 and its original foreground group in old_foreground_pgrp. Register
14788 restore_old_foreground_pgrp with atexit().
14789
9f2e1e63
DJ
147902006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14791
14792 * server.c (handle_query): Correct qPart to qXfer.
14793
b80864fb
DJ
147942006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14795
14796 * configure.ac: Check for more headers which are missing on
14797 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14798 * configure.srv: Add Cygwin and mingw32.
14799 * remote-utils.c: Don't include headers unconditionally which
14800 are missing on mingw32. Include <winsock.h> for mingw32.
14801 (remote_open): Adjust for mingw32 support. Flush
14802 standard error after writing to it.
14803 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14804 (unblock_async_io, enable_async_io, disable_async_io)
14805 (readchar, getpkt): Update for Winsock support.
14806 (prepare_resume_reply): Expect a protocol signal number.
14807 * server.c: Disable <sys/wait.h> on mingw32.
14808 (start_inferior): Adjust for mingw32 support. Flush
14809 standard error after writing to it.
14810 (attach_inferior): Likewise. Use protocol signal
14811 numbers.
14812 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14813 and names.
14814 * win32-i386-low.c: New file.
14815 * Makefile.in (XM_CLIBS): Set.
14816 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14817 (win32-i386-low.o): New dependency rule.
14818 * linux-low.c (linux_wait): Use target signal numbers.
14819 * target.h (struct target_ops): Doc fix.
14820 * server.h (target_signal_to_name): New prototype.
14821 * gdbreplay.c: Don't include headers unconditionally which
14822 are missing on mingw32. Include <winsock.h> for mingw32.
14823 (remote_close, remote_open): Adjust for Winsock support.
14824 * configure, config.in: Regenerated.
14825
0876f84a
DJ
148262006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14827
14828 * server.c (decode_xfer_read, write_qxfer_response): New.
14829 (handle_query): Take a packet length argument. Handle
14830 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14831 the qSupported response.
14832 (main): Update call to handle_query.
14833
01f9e8fa
DJ
148342006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14835
14836 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14837 (putpkt_binary): Renamed from putpkt and adjusted for binary
14838 data.
14839 (putpkt): New wrapper for putpkt_binary.
14840 (readchar): Don't mask off the high bit.
14841 (decode_X_packet): New function.
14842 * server.c (main): Call putpkt_binary if a handler sets the packet
14843 length. Save the length of the incoming packet. Handle 'X'.
14844 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14845
be2a5f71
DJ
148462006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14847
14848 * server.c (handle_query): Handle qSupported.
14849
ea025f5f
DJ
148502006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14851
14852 * remote-utils.c (all_symbols_looked_up): New variable.
14853 (look_up_one_symbol): Check it.
14854 * server.h (look_up_one_symbol): New declaration.
14855 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14856
9308fc88
DJ
148572006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14858
14859 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 14860 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
14861 (PTRACE_GET_THREAD_AREA): Define.
14862 (ps_get_thread_area): New function.
14863
52fb6437
NS
148642006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14865
14866 * configure.srv (m68k*-*-uclinux*): New target.
14867 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14868 (linux_resume_one_process): Remove extraneous cast.
14869 (linux_read_offsets): New.
14870 (linux_target_op): Add linux_read_offsets on mmuless systems.
14871 * server.c (handle_query): Add qOffsets logic.
14872 * target.h (struct target_ops): Add read_offsets.
14873
21b0f40c
DJ
148742006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14875
14876 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14877 (PTRACE_GET_THREAD_AREA): Define.
14878 (ps_get_thread_area): New function.
14879 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14880 (linux-x86-64-low.o): Update.
14881
0050a760
DJ
148822006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14883
14884 * configure.ac: Remove checks for prfpregset_t.
14885 * gdb_proc_service.h: New file.
14886 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14887 new "gdb_proc_service.h".
14888 * proc-service.c: Likewise.
14889 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14890 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14891 * Makefile.in (gdb_proc_service_h): Updated.
14892 * configure, config.in: Regenerated.
14893
b92a518e
DJ
148942006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14895
14896 * remote-utils.c (prepare_resume_reply): Move declaration
14897 of gdb_id_from_wait to the top of the block.
14898
545587ee
DJ
148992006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14900
14901 * linux-low.c (regsets_store_inferior_registers): Read the regset
14902 from the target before filling it.
14903
9db87ebd
DJ
149042006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14905
14906 * server.c (attach_inferior): Return SIGTRAP for a successful
14907 attach.
14908
dd24457d
DJ
149092006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14910
14911 * Makefile.in (OBS): Add version.o.
14912 (STAGESTUFF): Delete.
14913 (version.o): Add dependencies.
14914 (version.c): Replace rule.
14915 (clean): Remove version.c.
14916 * server.c (gdbserver_version): New.
14917 (gdbserver_usage): Use printf.
14918 (main): Handle --version and --help.
14919 * server.h (version, host_name): Add declarations.
14920
6f0f660e
EZ
149212005-12-23 Eli Zaretskii <eliz@gnu.org>
14922
889bf7c5
PA
14923 * linux-arm-low.c:
14924 * linux-arm-low.c:
14925 * inferiors.c:
14926 * i387-fp.h:
14927 * i387-fp.c:
14928 * gdbreplay.c:
14929 * regcache.c:
14930 * proc-service.c:
14931 * mem-break.h:
14932 * mem-break.c:
14933 * linux-x86-64-low.c:
14934 * linux-sh-low.c:
14935 * linux-s390-low.c:
14936 * linux-ppc64-low.c:
14937 * linux-ppc-low.c:
14938 * linux-mips-low.c:
14939 * linux-m68k-low.c:
14940 * linux-m32r-low.c:
14941 * linux-low.h:
14942 * linux-low.c:
14943 * linux-ia64-low.c:
14944 * linux-i386-low.c:
14945 * linux-crisv32-low.c:
14946 * thread-db.c:
14947 * terminal.h:
14948 * target.h:
14949 * target.c:
14950 * server.h:
14951 * server.c:
14952 * remote-utils.c:
14953 * regcache.h:
14954 * utils.c:
14955 * Makefile.in:
14956 * configure.ac:
6f0f660e
EZ
14957 * gdbserver.1: Add (C) after Copyright. Update the FSF
14958 address.
14959
9d1fb177
DJ
149602005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14961
14962 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14963 (arm_breakpoint_at): Recognize both breakpoints.
14964 (the_low_target): Use the correct breakpoint instruction.
14965
011a70c2
DJ
149662005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14967
14968 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14969 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14970 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14971 (the_low_target): Update.
14972
7fb85e41
AS
149732005-10-25 Andreas Schwab <schwab@suse.de>
14974
14975 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14976
14977 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14978 (ia64_num_regs): Reduce to 462.
14979
3db0444b
DJ
149802005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14981
14982 * acinclude.m4: Correct quoting.
14983 * aclocal.m4: Regenerated.
14984
14985 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14986 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14987 (thread_db_init): Call thread_db_err_str.
14988 * configure.ac: Check for TD_VERSION.
14989 * config.in, configure: Regenerated.
14990
bee0189a
DJ
149912005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14992
14993 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14994
e9d25b98
DJ
149952005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14996
14997 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14998 is not available. Define HAVE_PTRACE_GETREGS if it is.
14999 * config.in, configure: Regenerated.
15000 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15001 * linux-i386-low.c, linux-m68k-low.c: Update to use
15002 HAVE_PTRACE_GETREGS.
15003 * linux-low.c (regsets_fetch_inferior_registers)
15004 (regsets_store_inferior_registers): Only return 0 if we processed
15005 GENERAL_REGS.
15006 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15007 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15008
a06660f7
DJ
150092005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15010
15011 * inferiors.c (struct thread_info): Add gdb_id.
15012 (add_thread): Add gdb_id argument.
15013 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15014 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15015 calls to add_thread.
15016 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15017 * server.c (handle_query): Use thread_to_gdb_id.
15018 (handle_v_cont, main): Use gdb_id_to_thread_id.
15019 * server.h (add_thread): Update prototype.
15020 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15021 prototypes.
15022
5a1f5858
DJ
150232005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15024
15025 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15026 left-padded registers.
15027 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15028 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15029
e122f1f5
SE
150302005-07-01 Steve Ellcey <sje@cup.hp.com>
15031
15032 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15033 * configure: Regenerate.
15034 * config.in: Regenerate.
15035 * server.h (NEED_DECLARATION_STRERROR):
15036 Replace with !HAVE_DECL_STRERROR.
15037
d592fa2f
DJ
150382005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15039
15040 * linux-low.c (linux_wait, linux_send_signal): Don't test
15041 an unsigned long variable for > 0 if it could be MAX_ULONG.
15042 * server.c (myresume): Likewise.
15043 * target.c (set_desired_inferior): Likewise.
15044
ccbd4912
MK
150452005-06-13 Mark Kettenis <kettenis@gnu.org>
15046
15047 * configure.ac: Simplify and improve check for socklen_t.
15048 * configure, config.in: Regenerate.
15049
f450004a
DJ
150502005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15051
15052 * acconfig.h: Remove.
15053 * configure.ac: Add a test for socklen_t. Use three-argument
15054 AC_DEFINE throughout.
15055 * config.in: Regenerated using autoheader 2.59.
15056 * configure: Regenerated.
15057
15058 * gdbreplay.c (socklen_t): Provide a default.
15059 (remote_open): Use socklen_t.
15060 * remote-utils.c (socklen_t): Provide a default.
15061 (remote_open): Use socklen_t.
15062 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15063 unsigned char.
15064
15065 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15066 char for buffers.
15067 * linux-low.c (linux_read_memory, linux_write_memory)
15068 (linux_read_auxv): Likewise.
15069 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15070 (check_mem_write): Likewise.
15071 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15072 Likewise.
15073 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15074 (registers_from_string, register_data): Likewise.
15075 * server.c (handle_query, main): Likewise.
15076 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15077 (decode_M_packet): Likewise.
15078 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15079 * target.h (struct target_ops): Update read_memory, write_memory,
15080 and read_auxv.
15081 (read_inferior_memory, write_inferior_memory): Update.
15082 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15083 to unsigned char *.
15084 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15085 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15086 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15087 linux-s390-low.c, linux-sh-low.c: Update for changes in
15088 read_inferior_memory and the_low_target->breakpoint.
15089
eee84df1
DJ
150902005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15091
15092 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15093 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15094 * configure.srv: Add powerpc64-*-linux*.
15095 * linux-ppc64-low.c: New file.
15096
45b134e5
OF
150972005-05-23 Orjan Friberg <orjanf@axis.com>
15098
15099 * linux-cris-low.c: New file with support for CRIS.
15100 * linux-crisv32-low.c: Ditto for CRISv32.
15101 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15102 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 15103 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
15104 reg-crisv32.o, and reg-crisv32.c to make rules.
15105 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15106 recognized targets.
15107
48d93c75
UW
151082005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15109
15110 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15111 of sizeof (PTRACE_XFER_TYPE).
15112 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15113
e013ee27
OF
151142005-05-12 Orjan Friberg <orjanf@axis.com>
15115
889bf7c5 15116 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
15117 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15118 pointers for hardware watchpoint support.
15119 * linux-low.h (struct linux_target_ops): Ditto.
15120 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15121 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15122 to linux_target_ops.
15123 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15124 reply packet.
15125 * server.c (main): Recognize 'Z' and 'z' packets.
15126
b0ded00b
UW
151272005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15128
15129 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15130 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15131 (the_low_target): Add new members.
15132
8643e2ad
DJ
151332005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15134
15135 * proc-service.c (ps_lgetregs): Search all_processes instead of
15136 all_threads.
15137
fc620387
DJ
151382005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15139
15140 * server.c (start_inferior): Change return type to int.
15141 (attach_inferior): Change sigptr to int *.
15142 (handle_v_cont, handle_v_requests): Change signal to int *.
15143 (main): Change signal to int.
15144
151452005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
15146
15147 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15148 * configure.srv: Add m32r*-*-linux*.
15149 * linux-m32r-low.c: New file.
15150
e0e76420
DJ
151512005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15152
15153 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15154
a1928bad
DJ
151552005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15156
15157 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15158 Take unsigned long arguments for PIDs.
15159 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15160 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15161 (wait_for_sigstop, linux_resume_one_process)
15162 (regsets_fetch_inferior_registers, linux_send_signal)
15163 (linux_read_auxv): Likewise. Update the types of variables holding
15164 PIDs. Update format string specifiers.
15165 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15166 * remote-utils.c (prepare_resume_reply): Likewise.
15167 * server.c (cont_thread, general_thread, step_thread)
15168 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15169 unsigned long.
15170 (handle_query): Update format specifiers.
15171 (handle_v_cont, main): Use strtoul for thread IDs.
15172 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15173 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15174 (general_thread, step_thread, thread_from_wait)
15175 (old_thread_from_wait): Update.
15176 * target.h (struct thread_resume): Use unsigned long for THREAD.
15177 (struct target_ops): Use unsigned long for arguments to attach and
15178 thread_alive.
15179
dcdb98d2
DJ
151802005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15181
15182 * acinclude.m4: Include bfd/bfd.m4 directly.
15183 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15184 <agriffis@toolchain.org>.
15185 * aclocal.m4, configure: Regenerated.
15186
bec39cab
AC
151872005-01-07 Andrew Cagney <cagney@gnu.org>
15188
15189 * configure.ac: Rename configure.in, require autoconf 2.59.
15190 * configure: Re-generate.
15191
434c4c77
DJ
151922004-12-08 Daniel Jacobowitz <dan@debian.org>
15193
15194 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15195 LIBS when finished.
15196 * aclocal.m4: Regenerated.
15197 * configure: Regenerated.
15198
db1d3e1b
AS
151992004-11-21 Andreas Schwab <schwab@suse.de>
15200
15201 * linux-m68k-low.c (m68k_num_gregs): Define.
15202 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15203 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15204 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15205 (m68k_breakpoint_at): New. Add to the_low_target.
15206
15207 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15208 srv_linux_thread_db to yes.
15209
43360365
JB
152102004-10-20 Joel Brobecker <brobecker@gnat.com>
15211
15212 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15213 (ARCH_SET_FS): Likewise.
15214 (ARCH_GET_FS): Likewise.
15215 (ARCH_GET_GS): Likewise.
15216
fd500816
DJ
152172004-10-16 Daniel Jacobowitz <dan@debian.org>
15218
15219 * linux-i386-low.c (ps_get_thread_area): New.
15220 * linux-x86-64-low.c (ps_get_thread_area): New.
15221 * linux-low.c: Include <sys/syscall.h>.
15222 (linux_kill_one_process): Don't kill the first thread here.
15223 (linux_kill): Kill the first thread here.
15224 (kill_lwp): New function.
15225 (send_sigstop, linux_send_signal): Use it.
15226 * proc-service.c: Clean up #ifdefs.
15227 (fpregset_info): Delete.
15228 (ps_lgetregs): Update and enable implementation.
15229 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15230 implementations.
15231 * remote-utils.c (struct sym_cache, symbol_cache): New.
15232 (input_interrupt): Print a clearer message.
15233 (async_io_enabled): New variable.
15234 (enable_async_io, disable_async_io): Use it. Update comments.
15235 (look_up_one_symbol): Use the symbol cache.
15236 * thread-db.c (thread_db_look_up_symbols): New function.
15237 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15238
f6de3c42
DJ
152392004-10-16 Daniel Jacobowitz <dan@debian.org>
15240
15241 * configure.in: Test for -rdynamic.
15242 * configure: Regenerated.
15243 * Makefile (INTERNAL_LDFLAGS): New.
15244 (gdbserver, gdbreplay): Use it.
15245
2c0fc042
AC
152462004-09-02 Andrew Cagney <cagney@gnu.org>
15247
15248 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15249
075b3282
DJ
152502004-03-23 Daniel Jacobowitz <drow@mvista.com>
15251
15252 * linux-low.c (linux_wait): Clear all_processes list also.
15253
fa6a77dc
DJ
152542004-03-12 Daniel Jacobowitz <drow@mvista.com>
15255
15256 * linux-low.c: Include <errno.h>. Remove extern declaration of
15257 errno.
15258
6d782a97
DJ
152592004-03-12 Daniel Jacobowitz <drow@mvista.com>
15260
15261 * gdbreplay.c, server.h, utils.c: Update copyright years.
15262
3a7fb99b
DJ
152632004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15264
15265 * server.c (main): Print child status or termination signal from
15266 variable 'signal', not 'sig'.
15267
c3e735a6
DJ
152682004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15269
15270 * linux-low.c (linux_read_memory): Change return type to
15271 int. Check for and return error from ptrace().
15272 * target.c (read_inferior_memory): Change return type to int. Pass
15273 back return status from the_target->read_memory().
15274 * target.h (struct target_ops): Adapt *read_memory() prototype.
15275 Update comment.
15276 (read_inferior_memory): Adapt prototype.
15277 * server.c (main): Return an error packet if
15278 read_inferior_memory() returns an error.
15279
a59d1c82
DJ
152802004-03-04 Daniel Jacobowitz <drow@mvista.com>
15281
15282 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15283 Unify with other clean targets.
15284
dc3f8883
DJ
152852004-02-29 Daniel Jacobowitz <drow@mvista.com>
15286
15287 * server.c (handle_v_cont): Call set_desired_inferior.
15288
89a208da
DJ
152892004-02-29 Daniel Jacobowitz <drow@mvista.com>
15290
15291 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15292
62ea82f5
DJ
152932004-02-29 Daniel Jacobowitz <drow@mvista.com>
15294
15295 * linux-low.c (linux_wait): Unblock async I/O.
15296 (linux_resume): Block and enable async I/O.
15297 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15298 * server.h (block_async_io, unblock_async_io): Add prototypes.
15299
6910d122
DJ
153002004-02-29 Daniel Jacobowitz <drow@mvista.com>
15301
15302 * remote-utils.c (remote_open): Print a status notice after
15303 opening a TCP port.
15304 * server.c (attach_inferior): Print a status notice after
15305 attaching.
15306
153072004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
15308
15309 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15310
c89dc5d4
DJ
153112004-02-26 Daniel Jacobowitz <drow@mvista.com>
15312
15313 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15314 error packet.
15315 * server.c, target.h: Update copyright years.
15316
4b8dad4a
RM
153172004-02-25 Roland McGrath <roland@redhat.com>
15318
15319 * target.h (struct target_ops): New member `read_auxv'.
15320 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15321 * linux-low.c (linux_read_auxv): New function.
15322 (linux_target_ops): Initialize `read_auxv' member to that.
15323
d7446758
JB
153242004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15325
15326 Committed by Jim Blandy <jimb@redhat.com>.
15327
15328 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 15329 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
15330 instead of GPR_SIZE to distiguish s390 and s390x targets.
15331
5544ad89
DJ
153322004-01-31 Daniel Jacobowitz <drow@mvista.com>
15333
15334 * linux-low.c: Update copyright year.
15335 (check_removed_breakpoint): Clear pending_is_breakpoint.
15336 (linux_set_resume_request, linux_queue_one_thread)
15337 (resume_status_pending_p): New functions.
15338 (linux_continue_one_thread): Use process->resume.
15339 (linux_resume): Only resume threads if there are no pending events.
15340 * linux-low.h (struct process_info): Add resume request
15341 pointer.
15342
2a68b70e
DJ
153432004-01-30 Daniel Jacobowitz <drow@mvista.com>
15344
15345 * regcache.c (new_register_cache): Clear the allocated register
15346 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15347
64386c31
DJ
153482003-10-13 Daniel Jacobowitz <drow@mvista.com>
15349
15350 * linux-low.c (linux_resume): Take a struct thread_resume *
15351 argument.
15352 (linux_wait): Update call.
15353 (resume_ptr): New static variable.
15354 (linux_continue_one_thread): Renamed from
15355 linux_continue_one_process. Use resume_ptr.
15356 (linux_resume): Use linux_continue_one_thread.
15357 * server.c (handle_v_cont, handle_v_requests): New functions.
15358 (myresume): New function.
15359 (main): Handle 'v' case.
15360 * target.h (struct thread_resume): New type.
15361 (struct target_ops): Change argument of "resume" to struct
15362 thread_resume *.
15363 (myresume): Delete macro.
15364
c938e9b0
L
153652003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15366
15367 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15368 (uninstall): Support DESTDIR.
15369
7f313d07
BC
15370Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15371
15372 * configure.srv: Add xscale*linux copy of arm*linux entry.
15373
3b2fc2ea
DJ
153742003-07-24 Daniel Jacobowitz <drow@mvista.com>
15375
15376 * linux-arm-low.c (arm_reinsert_addr): New function.
15377 (the_low_target): Add arm_reinsert_addr.
15378
1c0a559e
MK
153792003-07-08 Mark Kettenis <kettenis@gnu.org>
15380
15381 * mem-break.c: Remove whitespace at end of file.
15382
43d5792c
DJ
153832003-06-28 Daniel Jacobowitz <drow@mvista.com>
15384
15385 * configure.in: Check whether we need to prototype strerror.
15386 * server.h: Optionally prototype strerror.
15387 * gdbreplay.c (perror_with_name): Use strerror.
15388 * linux-low.c (linux_attach_lwp): Use strerror.
15389 * utils.c (perror_with_name): Use strerror.
15390 * config.in, configure: Regenerated.
15391
c8a86edf
DJ
153922003-06-28 Daniel Jacobowitz <drow@mvista.com>
15393
15394 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15395 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15396
73d37363
DJ
153972003-06-20 Daniel Jacobowitz <drow@mvista.com>
15398
15399 * Makefile.in (SFILES): Update.
15400 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15401 low-sun3.c: Remove files.
15402
6ad8ae5c
DJ
154032003-06-17 Daniel Jacobowitz <drow@mvista.com>
15404
15405 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15406 (linux_detach_one_process, linux_detach): New functions.
15407 (linux_target_ops): Add linux_detach.
15408 * server.c (main): Handle 'D' packet.
15409 * target.h (struct target_ops): Add "detach" member.
15410 (detach_inferior): Define.
15411
1581182a
MK
154122003-06-13 Mark Kettenis <kettenis@gnu.org>
15413
15414 From Kelley Cook <kelleycook@wideopenwest.com>:
15415 * configure.srv: Accept i[34567]86 variants.
15416
e5379b03
DJ
154172003-06-05 Daniel Jacobowitz <drow@mvista.com>
15418
15419 * linux-low.c (linux_wait_for_event): Correct comment typos.
15420 (linux_resume_one_process): Call check_removed_breakpoint.
15421 (linux_send_signal): New function.
15422 (linux_target_ops): Add linux_send_signal.
15423 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15424 of kill.
15425 * target.h (struct target_ops): Add send_signal.
15426
2ff29de4
JB
154272003-05-29 Jim Blandy <jimb@redhat.com>
15428
15429 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15430 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15431 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15432 away part of the register's value.
15433
254787d4
DJ
154342003-03-26 Daniel Jacobowitz <drow@mvista.com>
15435
15436 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15437 (linux_wait_for_event, linux_init_signals): Likewise.
15438
94e10508
DJ
154392003-03-17 Daniel Jacobowitz <drow@mvista.com>
15440
15441 * configure.in: Check for stdlib.h.
15442 * configure: Regenerated.
15443 * config.in: Regenerated.
15444
4c0711e0
DJ
154452003-01-04 Andreas Schwab <schwab@suse.de>
15446
15447 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15448
ef66e766
AC
154492003-01-02 Andrew Cagney <ac131313@redhat.com>
15450
15451 * Makefile.in: Remove obsolete code.
15452
a1358604
DJ
154532002-11-20 Daniel Jacobowitz <drow@mvista.com>
15454
15455 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15456 defined(PT_FPR0_HI).
15457
23ce3b1c
DJ
154582002-11-17 Stuart Hughes <seh@zee2.com>
15459
15460 * linux-arm-low.c (arm_num_regs): Increase.
15461 (arm_regmap): Include status register.
15462
154632002-11-17 Daniel Jacobowitz <drow@mvista.com>
15464
15465 * linux-low.c (register_addr): Remove incorrect -1 check.
15466
a9fa9f7d
DJ
154672002-08-29 Daniel Jacobowitz <drow@mvista.com>
15468
15469 * linux-low.c (linux_create_inferior): Call setpgid. Return
15470 the new PID.
15471 (unstopped_p, linux_signal_pid): Remove.
15472 (linux_target_ops): Remove linux_signal_pid.
15473 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15474 global instead of target method.
15475 * target.h (struct target_ops): Remove signal_pid. Update comment
15476 for create_inferior.
15477 * server.c (signal_pid): New variable.
15478 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 15479 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
15480 (attach_inferior): Set signal_pid.
15481
17574093
DJ
154822002-08-23 Daniel Jacobowitz <drow@mvista.com>
15483
15484 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15485
154862002-08-20 Jim Blandy <jimb@redhat.com>
15487
15488 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15489 default for this.
15490
154912002-08-01 Andrew Cagney <cagney@redhat.com>
15492
15493 * Makefile.in: Make chill references obsolete.
15494
154952002-07-24 Kevin Buettner <kevinb@redhat.com>
15496
15497 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15498 * configure: Regenerate.
15499 * config.in: Regenerate.
15500
155012002-07-09 David O'Brien <obrien@FreeBSD.org>
15502
15503 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15504 (perror_with_name, remote_close, remote_open, expect, play): Static.
15505
155062002-07-04 Michal Ludvig <mludvig@suse.cz>
15507
4b8dad4a 15508 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
15509 byte offsets instead of an array of indexes.
15510 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15511
155122002-06-13 Daniel Jacobowitz <drow@mvista.com>
15513
15514 * regcache.c: Add comment.
15515
155162002-06-11 Daniel Jacobowitz <drow@mvista.com>
15517
15518 * thread-db.c: New file.
15519 * proc-service.c: New file.
15520 * acinclude.m4: New file.
15521 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15522 proc-service.o, and thread-db.o.
15523 (linux-low.o): Add USE_THREAD_DB.
15524 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15525 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15526 * aclocal.m4: Regenerated.
15527 * config.in: Regenerated.
15528 * configure: Regenerated.
15529 * configure.in: Check for proc_service.h, sys/procfs.h,
15530 thread_db.h, and linux/elf.h headrs.
15531 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15532 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15533 Check for -lthread_db and thread support.
15534 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15535 PowerPC, and SuperH.
15536 * i387-fp.c: Constify arguments.
15537 * i387-fp.h: Likewise.
15538 * inferiors.c: (struct thread_info): Renamed from
15539 `struct inferior_info'. Remove PID member. Use generic inferior
15540 list header. All uses updated.
15541 (inferiors, signal_pid): Removed.
15542 (all_threads): New variable.
15543 (get_thread): Define.
15544 (add_inferior_to_list): New function.
15545 (for_each_inferior): New function.
15546 (change_inferior_id): New function.
15547 (add_inferior): Removed.
15548 (remove_inferior): New function.
15549 (add_thread): New function.
15550 (free_one_thread): New function.
15551 (remove_thread): New function.
15552 (clear_inferiors): Use for_each_inferior and free_one_thread.
15553 (find_inferior): New function.
15554 (find_inferior_id): New function.
15555 (inferior_target_data): Update argument type.
15556 (set_inferior_target_data): Likewise.
15557 (inferior_regcache_data): Likewise.
15558 (set_inferior_regcache_data): Likewise.
15559 * linux-low.c (linux_bp_reinsert): Remove.
15560 (all_processes, stopping_threads, using_thrads)
15561 (struct pending_signals, debug_threads, pid_of): New.
15562 (inferior_pid): Replace with macro.
15563 (struct inferior_linux_data): Remove.
15564 (get_stop_pc, add_process): New functions.
15565 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15566 Use add_process and add_thread.
15567 (linux_attach_lwp): New function, based on old linux_attach. Use
15568 add_process and add_thread. Set stop_expected for new threads.
15569 (linux_attach): New function.
15570 (linux_kill_one_process): New function.
15571 (linux_kill): Kill all LWPs.
15572 (linux_thread_alive): Use find_inferior_id.
15573 (check_removed_breakpoints, status_pending_p): New functions.
15574 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15575 Update. Use WNOHANG. Wait for cloned processes also. Update process
15576 struct for the found process.
15577 (linux_wait_for_event): New function.
15578 (linux_wait): Use it. Support LWPs.
15579 (send_sigstop, wait_for_sigstop, stop_all_processes)
15580 (linux_resume_one_process, linux_continue_one_process): New functions.
15581 (linux_resume): Support LWPs.
15582 (REGISTER_RAW_SIZE): Remove.
15583 (fetch_register): Use register_size instead. Call supply_register.
15584 (usr_store_inferior_registers): Likewise. Call collect_register.
15585 Fix recursive case.
15586 (regsets_fetch_inferior_registers): Improve error message.
15587 (regsets_store_inferior_registers): Add debugging.
15588 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15589 (unstopped_p, linux_signal_pid): New functions.
15590 (linux_target_ops): Add linux_signal_pid.
15591 (linux_init_signals): New function.
15592 (initialize_low): Call it. Initialize using_threads.
15593 * regcache.c (inferior_regcache_data): Add valid
15594 flag.
15595 (get_regcache): Fetch registers lazily. Add fetch argument
15596 and update all callers.
15597 (regcache_invalidate_one, regcache_invalidate): New
15598 functions.
15599 (new_register_cache): Renamed from create_register_cache.
15600 Return the new regcache.
15601 (free_register_cache): Change argument to a void *.
15602 (registers_to_string, registers_from_string): Call get_regcache
15603 with fetch flag set.
15604 (register_data): Make static. Pass fetch flag to get_regcache.
15605 (supply_register): Call get_regcache with fetch flag clear.
15606 (collect_register): Call get_regcache with fetch flag set.
15607 (collect_register_as_string): New function.
15608 * regcache.h: Update.
15609 * remote-utils.c (putpkt): Flush after debug output and use
15610 stderr.
15611 Handle input interrupts while waiting for an ACK.
15612 (input_interrupt): Use signal_pid method.
15613 (getpkt): Flush after debug output and use stderr.
15614 (outreg): Use collect_register_as_string.
15615 (new_thread_notify, dead_thread_notify): New functions.
15616 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15617 and general_thread.
15618 (look_up_one_symbol): Flush after debug output.
15619 * server.c (step_thread, server_waiting): New variables.
15620 (start_inferior): Don't use signal_pid. Update call to mywait.
15621 (attach_inferior): Update call to mywait.
15622 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15623 (main): Don't fetch/store registers explicitly. Use
15624 set_desired_inferior. Support proposed ``Hs'' packet. Update
15625 calls to mywait.
15626 * server.h: Update.
15627 (struct inferior_list, struct_inferior_list_entry): New.
15628 * target.c (set_desired_inferior): New.
15629 (write_inferior_memory): Constify.
15630 (mywait): New function.
15631 * target.h: Update.
15632 (struct target_ops): New signal_pid method.
15633 (mywait): Removed macro, added prototype.
15634
15635 * linux-low.h (regset_func): Removed.
15636 (regset_fill_func, regset_store_func): New.
15637 (enum regset_type): New.
15638 (struct regset_info): Add type field. Use new operation types.
15639 (struct linux_target_ops): stop_pc renamed to get_pc.
15640 Add decr_pc_after_break and breakpoint_at.
15641 (get_process, get_thread_proess, get_process_thread)
15642 (strut process_info, all_processes, linux_attach_lwp)
15643 (thread_db_init): New.
15644
15645 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15646 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15647 (the_low_target): Add new members.
15648 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15649 (i386_store_fpxregset): Constify.
15650 (target_regsets): Add new kind identifier.
15651 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15652 (i386_set_pc): Add debugging.
15653 (i386_breakpoint_at): New function.
15654 (the_low_target): Add new members.
15655 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15656 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15657 (mips_breakpoint_at): New.
15658 (the_low_target): Add new members.
15659 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15660 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15661 (the_low_target): Add new members.
15662 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15663 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15664 (the_low_target): Add new members.
15665 * linux-x86-64-low.c (target_regsets): Add new kind
15666 identifier.
15667
156682002-05-15 Daniel Jacobowitz <drow@mvista.com>
15669
15670 From Martin Pool <mbp@samba.org>:
15671 * server.c (gdbserver_usage): New function.
15672 (main): Call it.
15673
156742002-05-14 Daniel Jacobowitz <drow@mvista.com>
15675
15676 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15677 stop_at -> stop_pc.
15678
156792002-05-04 Andrew Cagney <ac131313@redhat.com>
15680
15681 * Makefile.in: Remove obsolete code.
15682
156832002-04-24 Michal Ludvig <mludvig@suse.cz>
15684
15685 * linux-low.c (regsets_fetch_inferior_registers),
15686 (regsets_store_inferior_registers): Removed cast to int from
15687 ptrace() calls.
15688 * regcache.h: Added declaration of struct inferior_info.
15689
156902002-04-20 Daniel Jacobowitz <drow@mvista.com>
15691
15692 * inferiors.c (struct inferior_info): Add regcache_data.
15693 (add_inferior): Call create_register_cache.
15694 (clear_inferiors): Call free_register_cache.
15695 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15696 * regcache.c (struct inferior_regcache_data): New.
15697 (registers): Remove.
15698 (get_regcache): New function.
15699 (create_register_cache, free_register_cache): New functions.
15700 (set_register_cache): Don't initialize the register cache here.
15701 (registers_to_string, registers_from_string, register_data): Call
15702 get_regcache.
15703 * regcache.h: Add prototypes.
15704 * server.h: Likewise.
15705
157062002-04-20 Daniel Jacobowitz <drow@mvista.com>
15707
15708 * mem-break.c: New file.
15709 * mem-break.h: New file.
15710 * Makefile.in: Add mem-break.o rule; update server.h
15711 dependencies.
15712 * inferiors.c (struct inferior_info): Add target_data
15713 member.
15714 (clear_inferiors): Free target_data member if set.
15715 (inferior_target_data, set_inferior_target_data): New functions.
15716 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15717 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15718 * linux-low.c (linux_bp_reinsert): New variable.
15719 (struct inferior_linux_data): New.
15720 (linux_create_inferior): Use set_inferior_target_data.
15721 (linux_attach): Likewise. Call add_inferior.
15722 (linux_wait_for_one_inferior): New function.
15723 (linux_wait): Call it.
15724 (linux_write_memory): Add const.
15725 (initialize_low): Call set_breakpoint_data.
15726 * linux-low.h (struct linux_target_ops): Add breakpoint
15727 handling members.
15728 * server.c (attach_inferior): Remove extra add_inferior
15729 call.
15730 * server.h: Include mem-break.h. Update inferior.c
15731 prototypes.
15732 * target.c (read_inferior_memory)
15733 (write_inferior_memory): New functions.
15734 * target.h (read_inferior_memory)
15735 (write_inferior_memory): Change macros to prototypes.
15736 (struct target_ops): Update comments. Add const to write_memory
15737 definition.
15738
157392002-04-11 Daniel Jacobowitz <drow@mvista.com>
15740
15741 * linux-low.c (usr_store_inferior_registers): Support
15742 registers which are allowed to fail to store.
15743 * linux-low.h (linux_target_ops): Likewise.
15744 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15745 (ppc_cannot_store_register): FPSCR may not be storable.
15746
157472002-04-09 Daniel Jacobowitz <drow@mvista.com>
15748
15749 * server.h: Include <string.h> if HAVE_STRING_H.
15750 * ChangeLog: Correct paths in last ChangeLog entry.
15751
157522002-04-09 Daniel Jacobowitz <drow@mvista.com>
15753
15754 * linux-low.h: Remove obsolete prototypes.
15755 (struct linux_target_ops): New.
15756 (extern the_low_target): New.
15757 * linux-low.c (num_regs, regmap): Remove declarations.
15758 (register_addr): Use the_low_target explicitly.
15759 (fetch_register): Likewise.
15760 (usr_fetch_inferior_registers): Likewise.
15761 (usr_store_inferior_registers): Likewise.
15762 * linux-arm-low.c (num_regs): Remove.
15763 (arm_num_regs): Define.
15764 (arm_regmap): Renamed from regmap, made static.
15765 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15766 made static.
15767 (arm_cannot_store_register): Renamed from cannot_store_register,
15768 made static.
15769 (the_low_target): New.
15770 * linux-i386-low.c (num_regs): Remove.
15771 (i386_num_regs): Define.
15772 (i386_regmap): Renamed from regmap, made static.
15773 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15774 made static.
15775 (i386_cannot_store_register): Renamed from cannot_store_register,
15776 made static.
15777 (the_low_target): New.
15778 * linux-ia64-low.c (num_regs): Remove.
15779 (ia64_num_regs): Define.
15780 (ia64_regmap): Renamed from regmap, made static.
15781 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15782 made static.
15783 (ia64_cannot_store_register): Renamed from cannot_store_register,
15784 made static.
15785 (the_low_target): New.
15786 * linux-m68k-low.c (num_regs): Remove.
15787 (m68k_num_regs): Define.
15788 (m68k_regmap): Renamed from regmap, made static.
15789 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15790 made static.
15791 (m68k_cannot_store_register): Renamed from cannot_store_register,
15792 made static.
15793 (the_low_target): New.
15794 * linux-mips-low.c (num_regs): Remove.
15795 (mips_num_regs): Define.
15796 (mips_regmap): Renamed from regmap, made static.
15797 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15798 made static.
15799 (mips_cannot_store_register): Renamed from cannot_store_register,
15800 made static.
15801 (the_low_target): New.
15802 * linux-ppc-low.c (num_regs): Remove.
15803 (ppc_num_regs): Define.
15804 (ppc_regmap): Renamed from regmap, made static.
15805 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15806 made static.
15807 (ppc_cannot_store_register): Renamed from cannot_store_register,
15808 made static.
15809 (the_low_target): New.
15810 * linux-s390-low.c (num_regs): Remove.
15811 (s390_num_regs): Define.
15812 (s390_regmap): Renamed from regmap, made static.
15813 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15814 made static.
15815 (s390_cannot_store_register): Renamed from cannot_store_register,
15816 made static.
15817 (the_low_target): New.
15818 * linux-sh-low.c (num_regs): Remove.
15819 (sh_num_regs): Define.
15820 (sh_regmap): Renamed from regmap, made static.
15821 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15822 made static.
15823 (sh_cannot_store_register): Renamed from cannot_store_register,
15824 made static.
15825 (the_low_target): New.
15826 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15827 (the_low_target): New.
15828
158292002-04-09 Daniel Jacobowitz <drow@mvista.com>
15830
15831 * Makefile.in: Add stamp-h target.
15832 * configure.in: Create stamp-h.
15833 * configure: Regenerated.
15834
158352002-04-09 Daniel Jacobowitz <drow@mvista.com>
15836
15837 * inferiors.c: New file.
15838 * target.c: New file.
15839 * target.h: New file.
15840 * Makefile.in: Add target.o and inferiors.o. Update
15841 dependencies.
15842 * linux-low.c (inferior_pid): New static variable,
15843 moved from server.c.
15844 (linux_create_inferior): Renamed from create_inferior.
15845 Call add_inferior. Return 0 on success instead of a PID.
15846 (linux_attach): Renamed from myattach.
15847 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15848 (linux_thread_alive): Renamed from mythread_alive.
15849 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15850 child dies.
15851 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15852 (regsets_store_inferior_registers): Correct error message.
15853 Add missing ``return 0''.
15854 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15855 (linux_store_registers): Renamed from store_inferior_registers.
15856 (linux_read_memory): Renamed from read_inferior_memory.
15857 (linux_write_memory): Renamed from write_inferior_memory.
15858 (linux_target_ops): New structure.
15859 (initialize_low): Call set_target_ops ().
15860 * remote-utils.c (unhexify): New function.
15861 (hexify): New function.
15862 (input_interrupt): Send signals to ``signal_pid''.
15863 * server.c (inferior_pid): Remove.
15864 (start_inferior): Update create_inferior call.
15865 (attach_inferior): Call add_inferior.
15866 (handle_query): New function.
15867 (main): Call handle_query for `q' packets.
15868 * server.h: Include "target.h". Remove obsolete prototypes.
15869 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15870
158712002-04-09 Daniel Jacobowitz <drow@mvista.com>
15872
15873 * Makefile.in: Add WARN_CFLAGS. Update configury
15874 dependencies.
15875 * configure.in: Check for <string.h>
15876 * configure: Regenerate.
15877 * config.in: Regenerate.
15878 * gdbreplay.c: Include needed system headers.
15879 (remote_open): Remove strchr prototype.
15880 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15881 * regcache.c (supply_register): Change buf argument to const void *.
15882 (supply_register_by_name): Likewise.
15883 (collect_register): Change buf argument to void *.
15884 (collect_register_by_name): Likewise.
15885 * regcache.h: Add missing prototypes.
15886 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15887 * server.c (handle_query): New function.
15888 (attached): New static variable, moved out of main.
15889 (main): Quiet longjmp clobber warnings.
15890 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15891 * utils.c (error): Remove NORETURN.
15892 (fatal): Likewise.
This page took 3.474835 seconds and 4 git commands to generate.