]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Remove usage of find_inferior in win32-i386-low.c
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
0b360f19
SM
12017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2
3 * win32-i386-low.c (update_debug_registers_callback): Rename
4 to ...
5 (update_debug_registers): ... this, return void, remove pid_p arg.
6 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
7
f27866ba
SM
82017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
9
10 * inferiors.h (struct process_info): Add constructor, initialize
11 fields..
12 <syscalls_to_catch>: Change type to std::vector<int>.
13 * inferiors.c (add_process): Allocate process_info with new.
14 (remove_process): Free process_info with delete.
15 * linux-low.c (handle_extended_wait): Adjust.
16 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
17 * server.c (handle_general_set): Adjust.
18
e849ea89
PA
192017-11-16 Pedro Alves <palves@redhat.com>
20
21 * remote-utils.c (remote_close): Block SIGIO signals instead of
22 uninstalling the SIGIO handler.
23
1d0aa65c
AH
242017-11-16 Alan Hayward <alan.hayward@arm.com>
25
26 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
27
3491a34c
YQ
282017-11-16 Yao Qi <yao.qi@linaro.org>
29
30 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
31 (tic6x_store_gregset): Likewise.
32 (tic6x_usrregs_info): Move it up.
33
a602f924
AH
342017-11-15 Alan Hayward <alan.hayward@arm.com>
35
36 * Makefile.in: Update arch rules.
37 * configure.srv: Explicitly mark arch/ files.
38
5616b6c3
AS
392017-11-13 Andreas Schwab <schwab@suse.de>
40
41 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
42 function.
43 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
44
d1928160
PA
452017-11-06 Pedro Alves <palves@redhat.com>
46
47 * config.in, configure: Regenerate.
48
bac608e7
SM
492017-10-27 Simon Marchi <simon.marchi@ericsson.com>
50
51 * target.c (struct thread_search): Remove.
52 (thread_search_callback): Remove.
53 (prepare_to_access_memory): Use for_each_thread instead of
54 find_inferior. Inline code from thread_search_callback.
55
eaddb425
SM
562017-10-27 Simon Marchi <simon.marchi@ericsson.com>
57
58 * server.c (struct visit_actioned_threads_data): Remove.
59 (visit_actioned_threads): Change prototype to take arguments
60 directly.
61 (resume): Use find_thread instead of find_inferior.
62
99078d34
SM
632017-10-27 Simon Marchi <simon.marchi@ericsson.com>
64
65 * server.c (queue_stop_reply_callback): Change prototype, return
66 void.
67 (find_status_pending_thread_callback): Remove.
68 (handle_status): Replace find_inferior with find_thread and
69 for_each_thread.
70
cc628f3d
AH
712017-10-25 Alan Hayward <alan.hayward@arm.com>
72
73 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
74 with REGNO.
75 (aarch64_store_gregset): Likewise.
76 (aarch64_fill_fpregset): Likewise.
77 (aarch64_store_fpregset): Likewise.
78
4d3bb80e
SM
792017-10-21 Simon Marchi <simon.marchi@ericsson.com>
80
81 * gdbthread.h (find_thread, for_each_thread): New functions.
82 * inferiors.c (thread_of_pid): Remove.
83 (find_any_thread_of_pid): Use find_thread.
84 * linux-low.c (num_lwps): Use for_each_thread.
85
7a7cdfa0
YQ
862017-10-17 Yao Qi <yao.qi@linaro.org>
87
88 * Makefile.in: Remove one rule.
89 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
90
e675d170
YQ
912017-10-17 Yao Qi <yao.qi@linaro.org>
92
93 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
94 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
95
7eb4e0f9
YQ
962017-10-17 Yao Qi <yao.qi@linaro.org>
97
98 * configure.srv: Rename arm.o with arch/arm.o.
99
60d6cfc9
YQ
1002017-10-17 Yao Qi <yao.qi@linaro.org>
101
102 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
103 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
104 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
105 (arch-i386.o, arch-amd64.o): Remove rules.
106 (arch/%.o): New rule.
107 Update POSTCOMPILE and COMPILE.pre.
108 * configure.ac: Invoke AC_CONFIG_COMMANDS.
109 * configure: Re-generated.
110 * configure.srv: Replace arch-i386.o with arch/i386.o.
111 Replace arch-amd64.o with arch/amd64.o.
112
5bfda255
YQ
1132017-10-16 Yao Qi <yao.qi@linaro.org>
114
115 * configure: Regenerated.
116
9c80ecd6
SM
1172017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
118
119 * inferiors.h: (struct inferior_list): Remove.
120 (struct inferior_list_entry); Remove.
121 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
122 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
123 get_first_inferior): Remove.
124 (for_each_inferior, for_each_inferior_with_data, find_inferior,
125 find_inferior_id, find_inferior_in_random): Change signature.
126 * inferiors.c (all_threads): Change type to
127 std::list<thread_info *>.
128 (get_thread): Remove macro.
129 (find_inferior, find_inferior_id): Change signature, implement
130 using find_thread.
131 (find_inferior_in_random): Change signature, implement using
132 find_thread_in_random.
133 (for_each_inferior, for_each_inferior_with_data): Change
134 signature, implement using for_each_thread.
135 (add_inferior_to_list, remove_inferior): Remove.
136 (add_thread, get_first_thread, thread_of_pid,
137 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
138 (get_first_inferior, one_inferior_p, clear_inferior_list):
139 Remove.
140 (clear_inferiors, get_thread_process): Update.
141 * gdbthread.h: Include <list>.
142 (struct thread_info) <entry>: Remove field.
143 <id>: New field.
144 (all_threads): Change type to std::list<thread_info *>.
145 (get_first_inferior): Add doc.
146 (find_thread, for_each_thread, find_thread_in_random): New
147 functions.
148 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
149 * linux-arm-low.c (update_registers_callback): Update.
150 * linux-low.c (second_thread_of_pid_p): Update.
151 (kill_one_lwp_callback, linux_detach_lwp_callback,
152 delete_lwp_callback, status_pending_p_callback, same_lwp,
153 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
154 iterate_over_lwps, not_stopped_callback,
155 resume_stopped_resumed_lwps, count_events_callback,
156 select_singlestep_lwp_callback, select_event_lwp_callback,
157 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
158 suspend_and_send_sigstop_callback, wait_for_sigstop,
159 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
160 lwp_running, linux_set_resume_request, resume_status_pending_p,
161 need_step_over_p, start_step_over, linux_resume_one_thread,
162 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
163 reset_lwp_ptrace_options_callback): Update.
164 * linux-mips-low.c (update_watch_registers_callback): Update.
165 * regcache.c (regcache_invalidate_one, regcache_invalidate):
166 Update.
167 (free_register_cache_thread_one): Remove.
168 (regcache_release): Update.
169 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
170 handle_qxfer_threads_worker): Update.
171 (handle_query): Update, use list iterator.
172 (visit_actioned_threads, handle_pending_status,
173 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
174 clear_pending_status_callback, set_pending_status_callback,
175 find_status_pending_thread_callback, handle_status,
176 process_serial_event): Update.
177 * target.c (thread_search_callback): Update.
178 * thread-db.c (thread_db_get_tls_address): Update.
179 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
180 Update.
181 * win32-i386-low.c (update_debug_registers_callback): Update.
182 * win32-low.c (delete_thread_info, child_delete_thread,
183 continue_one_thread, suspend_one_thread,
184 get_child_debug_event): Adjust.
185
9179355e
SM
1862017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
187
188 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
189 * inferiors.h: Include <list>.
190 (struct process_info) <entry>: Remove field.
191 <pid>: New field.
192 (pid_of): Change macro to function.
193 (ptid_of, lwpid_of): Remove macro.
194 (all_processes): Change type to std::list<process_info *>.
195 (ALL_PROCESSES): Remove macro.
196 (for_each_process, find_process): New function.
197 * inferiors.c (all_processes): Change type to
198 std::list<process_info *>.
199 (find_thread_process): Adjust.
200 (add_process): Likewise.
201 (remove_process): Likewise.
202 (find_process_pid): Likewise.
203 (get_first_process): Likewise.
204 (started_inferior_callback): Remove.
205 (have_started_inferiors_p): Adjust.
206 (attached_inferior_callback): Remove.
207 (have_attached_inferiors_p): Adjust.
208 * linux-low.c (check_zombie_leaders): Likewise.
209 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
210 (x86_linux_update_xmltarget): Adjust.
211 * server.c (handle_query): Likewise.
212 (gdb_reattached_process): Remove.
213 (handle_status): Adjust.
214 (kill_inferior_callback): Likewise.
215 (detach_or_kill_inferior): Remove.
216 (print_started_pid): Likewise.
217 (print_attached_pid): Likewise.
218 (detach_or_kill_for_exit): Update.
219 (process_serial_event): Likewise.
220 * linux-arm-low.c (arm_new_fork): Likewise.
221
c9cb8905
SM
2222017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
223
224 * dll.h: Include <list>.
225 (struct dll_info): Add constructor.
226 <entry>: Remove field.
227 (all_dlls): Change type to std::list<dll_info>.
228 * dll.c: Include <algorithm>.
229 (get_dll): Remove macro.
230 (all_dlls): Change type to std::list<dll_info *>.
231 (free_one_dll): Remove.
232 (match_dll): Likewise.
233 (loaded_dll): Adjust.
234 (unloaded_dll): Adjust to all_dlls type change, use
235 std::find_if. Inline code from match_dll.
236 (clear_dlls): Adjust to all_dlls type change.
237 * server.c (emit_dll_description): Remove.
238 (handle_qxfer_libraries): Adjust to all_dlls type change,
239 integrate emit_dll_description's functionality.
240
04ec7890
SM
2412017-10-12 Simon Marchi <simon.marchi@ericsson.com>
242
243 * linux-low.h (struct linux_target_ops) <delete_process>: New
244 field.
245 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
246 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
247 (struct linux_target_ops): Add delete_process callback.
248 * linux-arm-low.c (arm_delete_process): New.
249 (struct linux_target_ops): Add delete_process callback.
250 * linux-bfin-low.c (struct linux_target_ops): Likewise.
251 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
252 * linux-m32r-low.c (struct linux_target_ops): Likewise.
253 * linux-mips-low.c (mips_linux_delete_process): New.
254 (struct linux_target_ops): Add delete_process callback.
255 * linux-ppc-low.c (struct linux_target_ops): Likewise.
256 * linux-s390-low.c (struct linux_target_ops): Likewise.
257 * linux-sh-low.c (struct linux_target_ops): Likewise.
258 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
259 * linux-tile-low.c (struct linux_target_ops): Likewise.
260 * linux-x86-low.c (x86_linux_delete_process): New.
261 (struct linux_target_ops): Add delete_process callback.
262 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
263
466eecee
SM
2642017-10-12 Simon Marchi <simon.marchi@ericsson.com>
265
266 * linux-aarch64-low.c (the_low_target): Add thread delete
267 callback.
268 * linux-arm-low.c (arm_delete_thread): New function.
269 (the_low_target): Add thread delete callback.
270 * linux-bfin-low.c (the_low_target): Likewise.
271 * linux-crisv32-low.c (the_low_target): Likewise.
272 * linux-low.c (delete_lwp): Invoke delete_thread callback if
273 set.
274 * linux-low.h (struct linux_target_ops) <delete_thread>: New
275 field.
276 * linux-m32r-low.c (the_low_target): Add thread delete callback.
277 * linux-mips-low.c (mips_linux_delete_thread): New function.
278 (the_low_target): Add thread delete callback.
279 * linux-ppc-low.c (the_low_target): Likewise.
280 * linux-s390-low.c (the_low_target): Likewise.
281 * linux-sh-low.c (the_low_target): Likewise.
282 * linux-tic6x-low.c (the_low_target): Likewise.
283 * linux-tile-low.c (the_low_target): Likewise.
284 * linux-x86-low.c (the_low_target): Likewise.
285 * linux-xtensa-low.c (the_low_target): Likewise.
286
b79f7801
YZ
2872017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
288
289 * win32-low.c: Include "common-inferior.h".
290
bc3b087d
SDJ
2912017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
292
293 * inferiors.c (set_inferior_cwd): New function.
294 * server.c (handle_general_set): Handle QSetWorkingDir packet.
295 (handle_query): Inform that QSetWorkingDir is supported.
296 * win32-low.c (create_process): Pass the inferior's cwd to
297 CreateProcess.
298
d092c5a2
SDJ
2992017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
300
301 * inferiors.c (current_inferior_cwd): New global variable.
302 (get_inferior_cwd): New function.
303 * inferiors.h (struct process_info) <cwd>: New field.
304
7da0a886
SDJ
3052017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
306
307 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
308 (OBS): Add gdb_tilde_expand.o.
309
289a6840
SM
3102017-10-02 Simon Marchi <simon.marchi@ericsson.com>
311
312 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
313 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
314
256642e8
PA
3152017-09-29 Pedro Alves <palves@redhat.com>
316
317 * ax.c (gdb_parse_agent_expr): Constify.
318 * ax.h (gdb_parse_agent_expr): Constify.
319 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
320 Constify.
321 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
322 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
323 * remote-utils.h (read_ptid): Constify.
324 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
325 (process_point_options, process_serial_event): Constify.
326 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
327 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
328 (cmd_qtbuffer): Constify.
329
5b9ca4d4
PA
3302017-09-29 Pedro Alves <palves@redhat.com>
331
332 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
333 fails.
334
94c207e0
PA
3352017-09-29 Pedro Alves <palves@redhat.com>
336
337 * linux-low.c (handle_extended_wait): Pass parent thread instead
338 of process to thread_db_notice_clone.
339 * linux-low.h (thread_db_notice_clone): Replace parent process
340 parameter with parent thread parameter.
341 * thread-db.c (find_one_thread): Add comment.
342 (thread_db_notice_clone): Replace parent process parameter with
343 parent thread parameter. Temporarily switch to the parent thread.
344
75352e28
SDJ
3452017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
346
347 * gdbthread.h: Include "common-gdbthread.h".
348 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
349 "if" when validating the ptid.
350 * remote-utils.c: Include "gdbthread.h".
351 (prepare_resume_reply): Use "switch_to_thread".
352 * target.c (done_accessing_memory): Likewise.
353
ad339634
AA
3542017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
355
356 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
357 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
358 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
359 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
360 s390x-gs-linux64-ipa.o to ipa_obj.
361 * linux-s390-low.c (HWCAP_S390_GS): New define.
362 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
363 New functions.
364 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
365 (s390_arch_setup): Check for guarded-storage support and choose
366 appropriate tdesc.
367 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
368 init_registers_s390x_gs_linux64.
369 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
370 enum value.
371 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
372 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
373
cc4d742f
SM
3742017-09-22 Simon Marchi <simon.marchi@ericsson.com>
375
376 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
377
f6327dcb
KB
3782017-09-21 Kevin Buettner <kevinb@redhat.com>
379
380 * linux-low.h (struct lwp_info): Add new field, thread_handle.
381 (thread_db_thread_handle): Declare.
382 * linux-low.c (linux_target_ops): Initialize thread_handle.
383 * server.c (handle_qxfer_threads_worker): Add support for
384 "handle" attribute.
385 * target.h (struct target_ops): Add new function pointer,
386 thread_handle.
387 (target_thread_handle): Define.
388 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
389 field in lwp.
390 (thread_db_thread_handle): New function.
391
86299109
KB
3922017-09-21 Kevin Buettner <kevinb@redhat.com>
393
394 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
395 * linux-low.h (thread_db_notice_clone): Declare.
396 * thread-db.c (thread_db_notice_clone): New function.
397
f557a88a
PA
3982017-09-21 Pedro Alves <palves@redhat.com>
399
400 * server.c (gdb_read_memory, handle_status, process_serial_event)
401 (handle_serial_event, handle_target_event): Adjust to
402 set_desired_thread prototype change.
403 * target.c (set_desired_thread): Remove 'use_general' parameter
404 and adjust.
405 * target.h (set_desired_thread): Remove 'use_general' parameter.
406
223ffa71
TT
4072017-09-20 Tom Tromey <tom@tromey.com>
408
409 * target.c (target_terminal::terminal_state): Define.
410 (target_terminal::init): Rename from target_terminal_init.
411 (target_terminal::inferior): Rename from
412 target_terminal_inferior.
413 (target_terminal::ours): Rename from target_terminal_ours.
414 (target_terminal::ours_for_output, target_terminal::info): New.
415
04fd3ba9
SM
4162017-09-16 Simon Marchi <simon.marchi@ericsson.com>
417
418 * server.c (accumulate_file_name_length): Remove.
419 (emit_dll_description): Adjust to std::string change.
420 (handle_qxfer_libraries): Use std::string to hold document.
421
5e187554
SM
4222017-09-16 Simon Marchi <simon.marchi@ericsson.com>
423
424 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
425 return type of xml_escape_text.
426 * server.c (emit_dll_description): Likewise.
427
1526853e
SM
4282017-09-16 Simon Marchi <simon.marchi@ericsson.com>
429
430 * server.c (captured_main): Accept argument for --selftest.
431 Update run_tests call.
432 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
433 when registering selftests.
434
c4dfafab
SDJ
4352017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
436
437 * regcache.c (get_thread_regcache): Update code to use "std::vector"
438 instead of "VEC" for "target_desc.reg_defs".
439 (regcache_cpy): Likewise.
440 (registers_to_string): Likewise.
441 (registers_from_string): Likewise.
442 (find_regno): Likewise.
443 (supply_regblock): Likewise.
444 (regcache_raw_read_unsigned): Likewise.
445 * tdesc.c (init_target_desc): Likewise.
446 (tdesc_create_reg): Likewise.
447 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
448 (struct target_desc) <reg_defs>: Convert to "std::vector".
449 (target_desc): Do not initialize "reg_defs".
450 (~target_desc): Update code to use "std::vector" instead of "VEC"
451 for "target_desc.reg_defs".
452 (operator==): Likewise.
453
124aceb4
SM
4542017-09-15 Simon Marchi <simon.marchi@ericsson.com>
455
456 * inferiors.h (thread_to_gdb_id): Remove.
457 * inferiors.c (thread_to_gdb_id): Remove.
458 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
459 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
460 lynx_store_registers, lynx_read_memory, lynx_write_memory):
461 Likewise.
462 * nto-low.c (nto_fetch_registers, nto_store_registers,
463 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
464
96cde54f
SM
4652017-09-15 Simon Marchi <simon.marchi@ericsson.com>
466
467 * inferiors.h (gdb_id_to_thread_id): Remove.
468 * inferiors.c (gdb_id_to_thread_id): Remove.
469 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
470 removal. Move pid declaration closer to where it's used.
471
e8ca139e
SM
4722017-09-15 Simon Marchi <simon.marchi@ericsson.com>
473
474 * server.c (handle_detach): New function.
475 (process_serial_event): Move code out, call handle_detach.
476
f8a4e119
SM
4772017-09-15 Simon Marchi <simon.marchi@ericsson.com>
478
479 * server.c (require_running): Rename to ...
480 (require_running_or_return): ... this ...
481 (require_running_or_break): ... and this.
482 (handle_query, process_serial_event): Adjust.
483
0eb0a407
SM
4842017-09-15 Simon Marchi <simon.marchi@ericsson.com>
485
486 * linux-low.c (linux_set_resume_request): Remove unused
487 variables.
488
785922a5
SM
4892017-09-15 Simon Marchi <simon.marchi@ericsson.com>
490
491 * server.c (first_thread_of): Remove.
492 (process_serial_event): Replace usage of first_thread_of with
493 find_any_thread_of_pid.
494 * tracepoint.c (same_process_p): Remove.
495 (gdb_agent_about_to_close): Replace usage of same_process_p with
496 find_any_thread_of_pid.
497 * linux-x86-low.c (same_process_callback): Remove.
498 (x86_arch_setup_process_callback): Replace usage of
499 same_process_callback with find_any_thread_of_pid.
500 * thread-db.c (any_thread_of): Remove.
501 (switch_to_process): Replace usage of any_thread_of with
502 find_any_thread_of_pid.
503 * inferiors.c (thread_pid_matches_callback): Remove.
504 (find_thread_process): Adjust to use find_any_thread_of_pid.
505
a059f00c
SDJ
5062017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
507
508 * regcache.c (get_thread_regcache): Guard calls to "memset"
509 with "!VEC_empty".
510
cc397f3a
SDJ
5112017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
512
513 * linux-low.c (handle_extended_wait): Use
514 "allocate_target_description" instead of "XNEW".
515 * linux-x86-low.c (initialize_low_arch): Likewise.
516
22916b07
YQ
5172017-09-05 Yao Qi <yao.qi@linaro.org>
518
519 * configure.srv (srv_i386_regobj): Remove.
520 (srv_amd64_regobj): Remove.
521 (srv_regobj): Set it to "" for x86 non-linux targets.
522 * linux-x86-tdesc.c (i386_linux_read_description):
523 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
524 (init_registers_i386): Remove the declaration.
525 (tdesc_i386): Remove the declaration.
526 (lynx_i386_arch_setup): Call i386_create_target_description.
527 * nto-x86-low.c: Likewise.
528 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
529 [!__x86_64__]: include arch/i386.h.
530 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
531
38602d55
YQ
5322017-09-05 Yao Qi <yao.qi@linaro.org>
533
534 * configure.srv (srv_amd64_linux_xmlfiles): Remove
535 i386/amd64-XXX-linux from it.
536
44b886ff
YQ
5372017-09-05 Yao Qi <yao.qi@linaro.org>
538
539 * configure.srv: Empty srv_amd64_linux_regobj if $development is
540 false.
541 (ipa_amd64_linux_regobj): Remove.
542 (ipa_x32_linux_regobj): Remove.
543
b4570e4b
YQ
5442017-09-05 Yao Qi <yao.qi@linaro.org>
545
546 * Makefile.in (arch-amd64.o): New rule.
547 * configure.srv: Append arch-amd64.o.
548 * linux-amd64-ipa.c: Include common/x86-xstate.h.
549 (get_ipa_tdesc): Call amd64_linux_read_description.
550 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
551 and init_registers_amd64_XXX.
552 * linux-x86-low.c (x86_linux_read_description): Call
553 amd64_linux_read_description.
554 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
555 (initialize_low_arch): Don't call init_registers_x32_XXX and
556 init_registers_amd64_XXX.
557 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
558 and tdesc_amd64_XXX.
559 [__x86_64__] (amd64_tdesc_test): New function.
560 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
561 and init_registers_amd64_XXX.
562 * linux-x86-tdesc.c: Include arch/amd64.h.
563 (xcr0_to_tdesc_idx): New function.
564 (i386_linux_read_description): New function.
565 (amd64_get_ipa_tdesc_idx): New function.
566 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
567 (amd64_get_ipa_tdesc): Declare.
568
d1f28ea2
YQ
5692017-09-05 Yao Qi <yao.qi@linaro.org>
570
571 * configure.srv (srv_i386_linux_xmlfiles): Remove
572 i386/i386-XXX-linux.xml from it.
573
25a93583
YQ
5742017-09-05 Yao Qi <yao.qi@linaro.org>
575
576 * configure.srv: Set srv_i386_linux_regobj empty if $development
577 is false.
578 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
579 initialize_low_tdesc.
580 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
581 with #if initialize_low_tdesc.
582 * linux-x86-tdesc-selftest.c: New file.
583 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
584
5f035c07
YQ
5852017-09-05 Yao Qi <yao.qi@linaro.org>
586
587 * Makefile.in (arch-i386.o): New rule.
588 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
589 (x86_64-*-linux*): Likewise.
590 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
591 include arch/i386.h.
592 (i386_linux_read_description): Remove code and call
593 i386_create_target_description.
594 * tdesc.c (allocate_target_description): New function.
595 * tdesc.h (set_tdesc_architecture): Remove declaration.
596 (set_tdesc_osabi): Likewise.
597
0abe8a89
YQ
5982017-09-05 Yao Qi <yao.qi@linaro.org>
599
600 * linux-x86-tdesc.c: Don't include <inttypes.h>.
601 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
602 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
603 .xmltarget.
604 * server.c (get_features_xml): Call tdesc_get_features_xml.
605 * tdesc.c (set_tdesc_architecture): New function.
606 (set_tdesc_osabi): New function.
607 (tdesc_get_features_xml): New function.
608 (tdesc_create_feature): Add an argument.
609 * tdesc.h (struct target_desc) <features>: New field.
610 <arch, osabi>: New field.
611 (~target_desc): xfree features, arch, and osabi.
612 (target_desc::oerator==): Don't compare .xmltarget.
613 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
614 (set_tdesc_osabi): Likewise.
615 (tdesc_get_features_xml): Likewise.
616
0a188386
YQ
6172017-09-05 Yao Qi <yao.qi@linaro.org>
618
619 * linux-x86-tdesc.c: Include selftest.h.
620 (i386_tdesc_test): New function.
621 (initialize_low_tdesc): Call selftests::register_test.
622 * tdesc.h: Include regdef.h.
623 (target_desc): Override operator == and !=.
624
f49ff000
YQ
6252017-09-05 Yao Qi <yao.qi@linaro.org>
626
627 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
628 (ipa_obj): Likewise.
629 * linux-i386-ipa.c: Include common/x86-xstate.h
630 (get_ipa_tdesc): Call i386_linux_read_description.
631 (initialize_low_tracepoint): Don't call init_registers_XXX
632 functions, call initialize_low_tdesc instead.
633 * linux-x86-low.c (x86_linux_read_description): Call
634 i386_linux_read_description.
635 (initialize_low_arch): Don't call init_registers_i386_XXX
636 functions, call initialize_low_tdesc.
637 * linux-x86-tdesc.c: New file.
638 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
639 (i386_get_ipa_tdesc_idx): Declare.
640 (i386_get_ipa_tdesc): Declare.
641 (initialize_low_tdesc): Declare.
642
2b68ef2f
YQ
6432017-09-05 Yao Qi <yao.qi@linaro.org>
644
645 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
646 instead of 0.
647
f7000548
YQ
6482017-09-05 Yao Qi <yao.qi@linaro.org>
649
650 * Makefile.in (IPA_OBJS): Add vec-ipa.o
651 * regcache.c (get_thread_regcache): Use VEC_length.
652 (init_register_cache): Likewise.
653 (regcache_cpy): Likewise.
654 (registers_to_string): Iterate reg_defs via VEC_iterate.
655 (find_regno): Likewise.
656 (find_register_by_number): Use VEC_index.
657 (register_size): Call find_register_by_number.
658 (register_data): Call find_register_by_number.
659 (supply_regblock): Use VEC_length.
660 (regcache_raw_read_unsigned): Likewise.
661 * tdesc.c (init_target_desc): Iterate reg_defs via
662 VEC_iterate.
663 (default_description): Update initializer.
664 (copy_target_description): Don't update field num_registers.
665 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
666 <num_registers>: Remove.
667
50a421ac
SM
6682017-09-04 Simon Marchi <simon.marchi@ericsson.com>
669
670 * Makefile.in (.SECONDARY): Define target.
671
23fdd69e
SM
6722017-09-03 Simon Marchi <simon.marchi@ericsson.com>
673
674 * linux-low.c (linux_wait_1): Adjust.
675 * server.c (queue_stop_reply_callback): Adjust.
676
0a2dde4a
SDJ
6772017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
678
679 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
680 QEnvironmentUnset and QEnvironmentReset packets.
681 (handle_query): Inform remote that QEnvironmentHexEncoded,
682 QEnvironmentUnset and QEnvironmentReset are supported.
683
6afd337d
SM
6842017-08-25 Simon Marchi <simon.marchi@ericsson.com>
685
686 * inferiors.h (inferior_target_data): Rename to ...
687 (thread_target_data): ... this.
688 (inferior_regcache_data): Rename to ...
689 (thread_regcache_data): ... this.
690 (set_inferior_regcache_data): Rename to ...
691 (set_thread_regcache_data): ... this.
692 * inferiors.c (inferior_target_data): Rename to ...
693 (thread_target_data): ... this.
694 (inferior_regcache_data): Rename to ...
695 (thread_regcache_data): ... this.
696 (set_inferior_regcache_data): Rename to ...
697 (set_thread_regcache_data): ... this.
698 (free_one_thread): Update.
699 * linux-low.h (get_thread_lwp): Update.
700 * regcache.c (get_thread_regcache): Update.
701 (regcache_invalidate_thread): Update.
702 (free_register_cache_thread): Update.
703 * win32-i386-low.c (update_debug_registers_callback): Update.
704 (win32_get_current_dr): Update.
705 * win32-low.c (thread_rec): Update.
706 (delete_thread_info): Update.
707 (continue_one_thread): Update.
708 (suspend_one_thread): Update.
709
a160cc46
SM
7102017-08-24 Simon Marchi <simon.marchi@ericsson.com>
711
712 * inferiors.c (set_inferior_target_data): Remove.
713 * inferiors.h (set_inferior_target_data): Remove.
714
6d580b63
YQ
7152017-08-18 Yao Qi <yao.qi@linaro.org>
716
717 * Makefile.in (OBS): Add selftest.o.
718 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
719 * configure, config.in: Re-generated.
720 * server.c: Include common/sefltest.h.
721 (captured_main): Handle option --selftest.
722
f5a29eb0
YQ
7232017-08-09 Yao Qi <yao.qi@linaro.org>
724
725 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
726 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
727 i386-avx-mpx.o and i386-mmx.o.
728 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
729 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
730 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
731 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
732 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
733 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
734 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
735 i386/amd64-avx-mpx.xml.
736
57757c2f
YQ
7372017-08-09 Yao Qi <yao.qi@linaro.org>
738
739 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
740 and x32-avx-avx512.o.
741 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
742 i386/x32-avx-avx512.xml.
743
229d26fc
SM
7442017-07-26 Simon Marchi <simon.marchi@ericsson.com>
745
746 * tracepoint.h (enum class fast_tpoint_collect_result): New
747 enumeration.
748 (fast_tracepoint_collecting): Change return type to
749 fast_tpoint_collect_result.
750 * tracepoint.c (fast_tracepoint_collecting): Likewise.
751 * linux-low.h: Include tracepoint.h.
752 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
753 fast_tpoint_collect_result.
754 * linux-low.c (handle_tracepoints): Adjust.
755 (linux_fast_tracepoint_collecting): Change return type to
756 fast_tpoint_collect_result.
757 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
758 linux_wait_1, stuck_in_jump_pad_callback,
759 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
760 proceed_one_lwp): Adjust to type change.
761
2e1e43e1
YQ
7622017-07-10 Yao Qi <yao.qi@linaro.org>
763
764 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
765
adc764e7
YQ
7662017-06-29 Yao Qi <yao.qi@linaro.org>
767
768 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
769 Remove.
770 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
771
a206891a
SM
7722017-06-20 Simon Marchi <simon.marchi@ericsson.com>
773
774 * Makefile.in (IPA_OBJS): Sort and format one item per line.
775
9a6c7d9c
SDJ
7762017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
777
778 * linux-low.c (linux_create_inferior): Adjust code to access the
779 environment information via 'gdb_environ' class.
780 * lynx-low.c (lynx_create_inferior): Likewise.
781 * server.c (our_environ): Make it an instance of 'gdb_environ'.
782 (get_environ): Return a pointer to 'our_environ'.
783 (captured_main): Initialize 'our_environ'.
784 * server.h (get_environ): Adjust prototype.
785 * spu-low.c (spu_create_inferior): Adjust code to access the
786 environment information via 'gdb_environ' class.
787
ae3e2ccf
SM
7882017-06-17 Simon Marchi <simon.marchi@ericsson.com>
789
790 * linux-low.c (linux_read_memory, linux_write_memory): Remove
791 usage of "register" keyword.
792
3e019bdc
SM
7932017-06-17 Simon Marchi <simon.marchi@ericsson.com>
794
795 * configure: Re-generate.
796
8465943a
SM
7972017-06-17 Simon Marchi <simon.marchi@ericsson.com>
798
799 * configure: Re-generate.
800
cf0dd6f0
SM
8012017-06-17 Simon Marchi <simon.marchi@ericsson.com>
802
803 * Makefile.in (COMPILE.pre): Add "-x c++".
804
9845682b
SDJ
8052017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
806
807 * fork-child.c: Conditionally include <signal.h>.
808
aefd8b33
SDJ
8092017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
810
811 * server.c (handle_general_set): Handle new packet
812 "QStartupWithShell".
813 (handle_query): Add "QStartupWithShell" to the list of supported
814 packets.
815 (gdbserver_usage): Add help text explaining the
816 new "--startup-with-shell" and "--no-startup-with-shell" CLI
817 options.
818 (captured_main): Recognize and act upon the presence of the new
819 CLI options.
820
2090129c
SDJ
8212017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
822 Pedro Alves <palves@redhat.com>
823
824 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
825 * configure: Regenerate.
826 * configure.srv (srv_linux_obj): Add "fork-child.o" and
827 "fork-inferior.o".
828 (i[34567]86-*-lynxos*): Likewise.
829 (spu*-*-*): Likewise.
830 * fork-child.c: New file.
831 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
832 and "environ.h".
833 (linux_ptrace_fun): New function.
834 (linux_create_inferior): Adjust function prototype to reflect
835 change on "target.h". Adjust function code to use
836 "fork_inferior".
837 (linux_request_interrupt): Delete "signal_pid".
838 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
839 (lynx_ptrace_fun): New function.
840 (lynx_create_inferior): Adjust function prototype to reflect
841 change on "target.h". Adjust function code to use
842 "fork_inferior".
843 * nto-low.c (nto_create_inferior): Adjust function prototype and
844 code to reflect change on "target.h". Update comments.
845 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
846 "common-terminal.h" and "environ.h".
847 (terminal_fd): Moved to fork-child.c.
848 (old_foreground_pgrp): Likewise.
849 (restore_old_foreground_pgrp): Likewise.
850 (last_status): Make it global.
851 (last_ptid): Likewise.
852 (our_environ): New variable.
853 (startup_with_shell): Likewise.
854 (program_name): Likewise.
855 (program_argv): Rename to...
856 (program_args): ...this.
857 (wrapper_argv): New variable.
858 (start_inferior): Delete function.
859 (get_exec_wrapper): New function.
860 (get_exec_file): Likewise.
861 (get_environ): Likewise.
862 (prefork_hook): Likewise.
863 (post_fork_inferior): Likewise.
864 (postfork_hook): Likewise.
865 (postfork_child_hook): Likewise.
866 (handle_v_run): Update code to deal with arguments coming from the
867 remote host. Update calls from "start_inferior" to
868 "create_inferior".
869 (captured_main): Likewise. Initialize environment variable. Call
870 "have_job_control".
871 * server.h (post_fork_inferior): New prototype.
872 (get_environ): Likewise.
873 (last_status): Declare.
874 (last_ptid): Likewise.
875 (signal_pid): Likewise.
876 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
877 (spu_ptrace_fun): New function.
878 (spu_create_inferior): Adjust function prototype to reflect change
879 on "target.h". Adjust function code to use "fork_inferior".
880 * target.c (target_terminal_init): New function.
881 (target_terminal_inferior): Likewise.
882 (target_terminal_ours): Likewise.
883 * target.h: Include <vector>.
884 (struct target_ops) <create_inferior>: Update prototype.
885 (create_inferior): Update macro.
886 * utils.c (gdb_flush_out_err): New function.
887 * win32-low.c (win32_create_inferior): Adjust function prototype
888 and code to reflect change on "target.h".
889
043a4934
SDJ
8902017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
891
892 * inferiors.c (switch_to_thread): New function.
893
15652511
SDJ
8942017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
895
896 * Makefile.in (SFILE): Add "common/job-control.c".
897 (OBS): Add "job-control.o".
898
21ea5acd
SDJ
8992017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
900
901 * Makefile: Remove "@host_makefile_frag@".
902
e13cb306
PA
9032017-05-05 Pedro Alves <palves@redhat.com>
904
905 * configure: Regenerate.
906
c94fee56
SDJ
9072017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
908
909 * configure: Regenerate.
910
a0ff9e1a
SM
9112017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
912
913 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
914 software_single_step change of return type to
915 std::vector<CORE_ADDR>.
916 * linux-low.c (install_software_single_step_breakpoints):
917 Likewise.
918 * linux-low.h (install_software_single_step_breakpoints):
919 Likewise.
920
be628ab8
SDJ
9212017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
922
923 * remote-utils.c: Include "gdb_termios.h" instead of
924 "terminal.h".
925 * terminal.h: Delete file.
926
7c5ded6a
SDJ
9272017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
928
929 * server.c: Include <vector>.
930 <program_argv, wrapper_argv>: Convert to std::vector.
931 (start_inferior): Rewrite function to use C++.
932 (handle_v_run): Likewise. Update code that calculates the argv
933 based on the vRun packet; use C++.
934 (captured_main): Likewise.
935
436252de
SM
9362017-04-06 Simon Marchi <simon.marchi@ericsson.com>
937
938 * server.c (handle_v_cont): Initialize thread_resume::thread
939 with null_ptid.
940
9bf2a700
PA
9412017-04-05 Pedro Alves <palves@redhat.com>
942
943 * configure: Regenerate.
944
a121b7c1
PA
9452017-04-05 Pedro Alves <palves@redhat.com>
946
947 * gdbreplay.c (sync_error): Constify.
948 * linux-x86-low.c (push_opcode): Constify.
949
21c8a587
PA
9502017-04-05 Pedro Alves <palves@redhat.com>
951
952 * win32-low.c (get_child_debug_event)
953 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
954 Report TARGET_WAITKIND_SPURIOUS instead.
955
fb32b4f7
PA
9562017-04-05 Pedro Alves <palves@redhat.com>
957
958 * remote-utils.c (remote_prepare, remote_open): Constify.
959 * remote-utils.h (remote_prepare, remote_open): Constify.
960 * server.c (captured_main): Constify 'port' handling.
961
65dd1e59
SM
9622017-04-04 Simon Marchi <simon.marchi@ericsson.com>
963
964 * Makefile.in (clean): Clear .deps.
965
8fa5b777
SM
9662017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
967
968 * .gitignore: Remove generated files, replace with wildcard.
969 * (clean): Replace removal of generated files with wildcard.
970 (version.c): Replace with...
971 (version-generated.c): ...this.
972 (xml-builtin.c): Replace with...
973 (xml-builtin-generated.c): ...this.
974 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
975 (%.c: *regformats*): Replace with...
976 (%-generated.c: *regformats*): ...this.
977
a12e714b
MF
9782017-03-27 Max Filippov <jcmvbkbc@gmail.com>
979
980 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
981 (xtensa_fill_gregset): Call collect_register_by_name for
982 threadptr register.
983 (xtensa_store_gregset): Call supply_register_by_name for
984 threadptr register.
985
1a09b50a
MF
9862017-03-27 Max Filippov <jcmvbkbc@gmail.com>
987
988 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
989 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
990 (xtensa_store_gregset): Call supply_register for all registers in
991 a0_regnum..a0_regnum + C0_NREGS range.
992
1a01e7c6
SM
9932017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
994
995 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
996 (ax-ipa.o: ax.c): Remove.
997 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
998 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
999 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1000 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1001 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1002
36bc18a8
SM
10032017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1004
1005 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1006 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1007 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1008 (errors-ipa.o: ../common/errors.c): Remove.
1009 (format-ipa.o: ../common/format.c): Remove.
1010 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1011
a8ebe3d5
SM
10122017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1013
1014 * Makefile.in (%-ipa.o: %.c): New rule.
1015 (tracepoint-ipa.o: tracepoint.c): Remove.
1016 (utils-ipa.o: utils.c): Remove.
1017 (remote-utils-ipa.o: remote-utils.c): Remove.
1018 (regcache-ipa.o: regcache.c): Remove.
1019 (i386-linux-ipa.o: i386-linux.c): Remove.
1020 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1021 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1022 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1023 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1024 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1025 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1026 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1027 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1028 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1029 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1030 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1031 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1032 (aarch64-ipa.o: aarch64.c): Remove.
1033 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1034 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1035 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1036 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1037 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1038 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1039 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1040 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1041 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1042 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1043 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1044 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1045 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1046 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1047 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1048 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1049 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1050 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1051 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1052 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1053 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1054 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1055 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1056 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1057 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1058 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1059 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1060 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1061 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1062 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1063 (tdesc-ipa.o: tdesc.c): Remove.
1064 (x32-linux-ipa.o: x32-linux.c): Remove.
1065 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1066 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1067
50cfacb7
SM
10682017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1069
1070 * Makefile.in (%.o: ../arch/%.c): New rule.
1071 (arm.o: ../arch/arm.c): Remove.
1072 (arm-linux.o: ../arch/arm-linux.c): Remove.
1073 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1074 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1075
c5a22423
SM
10762017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1077
1078 * Makefile.in (%.o: ../nat/%.c): New rule.
1079 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1080 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1081 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1082 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1083 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1084 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1085 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1086 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1087 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1088 (linux-personality.o: ../nat/linux-personality.c): Remove.
1089 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1090 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1091 (x86-linux.o: ../nat/x86-linux.c): Remove.
1092 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1093 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1094
6bda016b
SM
10952017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1096
1097 * Makefile.in (%.o: ../common/%.c): New rule.
1098 (signals.o: ../common/signals.c): Remove.
1099 (print-utils.o: ../common/print-utils.c): Remove.
1100 (rsp-low.o: ../common/rsp-low.c): Remove.
1101 (common-utils.o: ../common/common-utils.c): Remove.
1102 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1103 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1104 (vec.o: ../common/vec.c): Remove.
1105 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1106 (xml-utils.o: ../common/xml-utils.c): Remove.
1107 (ptid.o: ../common/ptid.c): Remove.
1108 (buffer.o: ../common/buffer.c): Remove.
1109 (format.o: ../common/format.c): Remove.
1110 (filestuff.o: ../common/filestuff.c): Remove.
1111 (agent.o: ../common/agent.c): Remove.
1112 (errors.o: ../common/errors.c): Remove.
1113 (environ.o: ../common/environ.c): Remove.
1114 (common-debug.o: ../common/common-debug.c): Remove.
1115 (cleanups.o: ../common/cleanups.c): Remove.
1116 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1117 (fileio.o: ../common/fileio.c): Remove.
1118 (common-regcache.o: ../common/common-regcache.c): Remove.
1119 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1120 (new-op.o: ../common/new-op.c): Remove.
1121 (btrace-common.o: ../common/btrace-common.c): Remove.
1122
21122961
SM
11232017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1124
1125 * Makefile.in (%.o: ../target/%.c): New rule.
1126 (waitstatus.o: ../target/waitstatus.c): Remove.
1127
c362e621
SM
11282017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1129
1130 * Makefile.in
1131 (%.c: ../regformats/%.dat,
1132 (%.c: ../regformats/arm/%.dat,
1133 (%.c: ../regformats/i386/%.dat,
1134 (%.c: ../regformats/rs6000/%.dat): New rules.
1135 (aarch64.c): Remove.
1136 (reg-arm.c): Remove.
1137 (arm-with-iwmmxt.c): Remove.
1138 (arm-with-vfpv2.c): Remove.
1139 (arm-with-vfpv3.c): Remove.
1140 (arm-with-neon.c): Remove.
1141 (reg-bfin.c): Remove.
1142 (reg-cris.c): Remove.
1143 (reg-crisv32.c): Remove.
1144 (i386.c): Remove.
1145 (i386-linux.c): Remove.
1146 (i386-avx.c): Remove.
1147 (i386-avx-linux.c): Remove.
1148 (i386-avx-avx512.c): Remove.
1149 (i386-avx-avx512-linux.c): Remove.
1150 (i386-mpx.c): Remove.
1151 (i386-mpx-linux.c): Remove.
1152 (i386-avx-mpx-avx512-pku.c): Remove.
1153 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1154 (i386-avx-mpx.c): Remove.
1155 (i386-avx-mpx-linux.c): Remove.
1156 (i386-mmx.c): Remove.
1157 (i386-mmx-linux.c): Remove.
1158 (reg-ia64.c): Remove.
1159 (reg-m32r.c): Remove.
1160 (reg-m68k.c): Remove.
1161 (reg-cf.c): Remove.
1162 (mips-linux.c): Remove.
1163 (mips-dsp-linux.c): Remove.
1164 (mips64-linux.c): Remove.
1165 (mips64-dsp-linux.c): Remove.
1166 (nios2-linux.c): Remove.
1167 (powerpc-32.c): Remove.
1168 (powerpc-32l.c): Remove.
1169 (powerpc-altivec32l.c): Remove.
1170 (powerpc-cell32l.c): Remove.
1171 (powerpc-vsx32l.c): Remove.
1172 (powerpc-isa205-32l.c): Remove.
1173 (powerpc-isa205-altivec32l.c): Remove.
1174 (powerpc-isa205-vsx32l.c): Remove.
1175 (powerpc-e500l.c): Remove.
1176 (powerpc-64l.c): Remove.
1177 (powerpc-altivec64l.c): Remove.
1178 (powerpc-cell64l.c): Remove.
1179 (powerpc-vsx64l.c): Remove.
1180 (powerpc-isa205-64l.c): Remove.
1181 (powerpc-isa205-altivec64l.c): Remove.
1182 (powerpc-isa205-vsx64l.c): Remove.
1183 (s390-linux32.c): Remove.
1184 (s390-linux32v1.c): Remove.
1185 (s390-linux32v2.c): Remove.
1186 (s390-linux64.c): Remove.
1187 (s390-linux64v1.c): Remove.
1188 (s390-linux64v2.c): Remove.
1189 (s390-te-linux64.c): Remove.
1190 (s390-vx-linux64.c): Remove.
1191 (s390-tevx-linux64.c): Remove.
1192 (s390x-linux64.c): Remove.
1193 (s390x-linux64v1.c): Remove.
1194 (s390x-linux64v2.c): Remove.
1195 (s390x-te-linux64.c): Remove.
1196 (s390x-vx-linux64.c): Remove.
1197 (s390x-tevx-linux64.c): Remove.
1198 (tic6x-c64xp-linux.c): Remove.
1199 (tic6x-c64x-linux.c): Remove.
1200 (tic6x-c62x-linux.c): Remove.
1201 (reg-sh.c): Remove.
1202 (reg-sparc64.c): Remove.
1203 (reg-spu.c): Remove.
1204 (amd64.c): Remove.
1205 (amd64-linux.c): Remove.
1206 (amd64-avx.c): Remove.
1207 (amd64-avx-linux.c): Remove.
1208 (amd64-avx-avx512.c): Remove.
1209 (amd64-avx-avx512-linux.c): Remove.
1210 (amd64-mpx.c): Remove.
1211 (amd64-mpx-linux.c): Remove.
1212 (amd64-avx-mpx-avx512-pku.c): Remove.
1213 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1214 (amd64-avx-mpx.c): Remove.
1215 (amd64-avx-mpx-linux.c): Remove.
1216 (x32.c): Remove.
1217 (x32-linux.c): Remove.
1218 (x32-avx.c): Remove.
1219 (x32-avx-linux.c): Remove.
1220 (x32-avx-avx512.c): Remove.
1221 (x32-avx-avx512-linux.c): Remove.
1222 (reg-xtensa.c): Remove.
1223 (reg-tilegx.c): Remove.
1224 (reg-tilegx32.c): Remove.
1225
1672e0d9
SDJ
12262017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1227
1228 * Makefile.in (SFILES): Add "common/environ.c".
1229 (OBJS): Add "common/environ.h".
1230
239b6d10
WT
12312017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1232
1233 * configure.ac: Check if the fs_base and gs_base members of
1234 `struct user_regs_struct' exist.
1235 * config.in: Regenerated.
1236 * configure: Likewise.
1237
694b382c
AT
12382017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1239
1240 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1241 target_read_memory.
1242 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1243 (get_next_pcs_syscall_next_pc): Likewise.
1244
7dc53023
LM
12452016-12-23 Luis Machado <lgustavo@codesourcery.com>
1246
1247 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1248 * nto-x86-low.c: Likewise.
1249
ad02e4fe
SM
12502016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1251
1252 * Makefile.in: Include disable-implicit-rules.mk.
1253
dcb07cfa
PA
12542016-11-23 Pedro Alves <palves@redhat.com>
1255
1256 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1257 (debug_vprintf): Use std::chrono::steady_clock instead of
1258 gettimeofday. Use '.' instead of ':'.
1259 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1260 (get_timestamp): Use std::chrono::steady_clock instead of
1261 gettimeofday.
1262
8629c02c
SM
12632016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1264
1265 * Makefile.in: Fix whitespace formatting.
1266
b593ecca
SM
12672016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1268
1269 * Makefile.in (SFILES, OBS): Flatten list and order
1270 alphabetically.
1271
9986ba08
PA
12722016-11-23 Pedro Alves <palves@redhat.com>
1273
1274 * event-loop.c (handle_file_event): Use warning.
1275 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1276 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1277 Use warning.
1278
4eefa7bc
PA
12792016-11-23 Pedro Alves <palves@redhat.com>
1280
1281 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1282 output.
1283 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1284 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1285 debug_printf and debug_flush for debug output.
1286 * server.c (handle_general_set): Likewise.
1287 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1288 output.
1289
5443506e
SM
12902016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1291
1292 * Makefile.in (.c.o): Replace rule with ...
1293 (%.o: %.c): ... this one.
1294
3b165252
SM
12952016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1296
1297 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1298 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1299 make.
1300 * configure.ac: Remove checks for the make program.
1301 * configure: Re-generate.
1302
0bcda685
PA
13032016-10-28 Pedro Alves <palves@redhat.com>
1304
1305 * Makefile.in (CXX_DIALECT): Get from configure.
1306 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1307 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1308 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1309 * config.in: Regenerate.
1310 * configure: Regenerate.
1311
c3805894
YQ
13122016-10-27 Yao Qi <yao.qi@linaro.org>
1313
1314 * linux-low.c (linux_supports_range_stepping): Return true if
1315 can_software_single_step return true.
1316
89342618
YQ
13172016-10-27 Yao Qi <yao.qi@linaro.org>
1318
1319 * inferiors.c (find_inferior_in_random): New function.
1320 * inferiors.h (find_inferior_in_random): Declare.
1321 * linux-low.c (linux_wait_for_event_filtered): Call
1322 find_inferior_in_random instead of find_inferior.
1323
e3652c84
YQ
13242016-10-27 Yao Qi <yao.qi@linaro.org>
1325
1326 * linux-low.c (linux_wait_1): If single-step breakpoints are
1327 inserted, remove them.
1328
5a04c4cf
PA
13292016-10-26 Pedro Alves <palves@redhat.com>
1330
1331 * linux-low.c (handle_extended_wait): Link parent/child fork
1332 threads.
1333 (linux_wait_1): Unlink them.
1334 (linux_set_resume_request): Ignore resume requests for
1335 already-resumed and unhandled fork child threads.
1336 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1337 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1338 New functions.
1339 (handle_v_requests) <vCont>: Don't call require_running.
1340 * server.h (in_queued_stop_replies): New declaration.
1341
cb93dc7f
YQ
13422016-10-24 Yao Qi <yao.qi@linaro.org>
1343
1344 PR server/20733
1345 * linux-aarch64-low.c (append_insns): Cast the return value to
1346 'uint32_t *'.
1347
a1078bea
YQ
13482016-10-10 Yao Qi <yao.qi@linaro.org>
1349
1350 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1351
1fb77080
SDJ
13522016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1353
1354 * target.c (target_supports_multi_process): New function, moved
1355 from...
1356 * target.h (target_supports_multi_process): ... here. Remove
1357 macro.
1358
39b5a3b9
TT
13592016-10-05 Tom Tromey <tom@tromey.com>
1360
1361 PR remote/20655:
1362 * tracepoint.c (handle_tracepoint_bkpts): Check
1363 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1364
c1d0b70a
YQ
13652016-10-05 Yao Qi <yao.qi@linaro.org>
1366
1367 * configure.srv: Update the path of arm-*.xml files.
1368
0a69eedb
YQ
13692016-10-05 Terry Guo <terry.guo@arm.com>
1370 Yao Qi <yao.qi@linaro.org>
1371
1372 * Makefile.in: Adjust the path of rules.
1373 * configure.srv: Update the path of xml files.
1374 * regformats/arm-with-iwmmxt.dat: Regenerated.
1375 * regformats/arm-with-neon.dat: Likewise.
1376 * regformats/arm-with-vfpv2.dat: Likewise.
1377 * regformats/arm-with-vfpv3.dat Likewise.
1378
17e16485
YQ
13792016-09-30 Yao Qi <yao.qi@linaro.org>
1380
1381 PR gdbserver/20627
1382 * target.c (target_stop_and_wait): Don't call
1383 target_continue_no_signal, use resume_stop instead.
1384
edeeb602
YQ
13852016-09-26 Yao Qi <yao.qi@linaro.org>
1386
1387 * linux-low.c (linux_wait_1): Call debug_exit.
1388
503b1c39
PA
13892016-09-23 Pedro Alves <palves@redhat.com>
1390
1391 * Makefile.in (SFILES): Add common/new-op.c.
1392 (OBS): Add common/new-op.o.
1393 (new-op.o): New rule.
1394
74172ecf
SM
13952016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1396
1397 * .gitinore: Ignore more files.
1398
fc6cda2e
YQ
13992016-09-21 Yao Qi <yao.qi@linaro.org>
1400
1401 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1402 23.
1403
bc1e6c81
SDJ
14042016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1405
1406 * server.c (start_inferior): Call target_mourn_inferior instead of
1407 mourn_inferior; pass ptid_t argument to it.
1408 (resume): Likewise.
1409 (handle_target_event): Likewise.
1410 * target.c (target_mourn_inferior): New function.
1411 * target.h (mourn_inferior): Delete macro.
1412
0e00e962
AA
14132016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1414
1415 * linux-low.c (lwp_is_stepping): New function.
1416
1d8cb77d
CL
14172016-09-06 Carl Love <cel@us.ibm.com>
1418
1419 * server.c (start_inferior): Fixed comment, requested comment change
1420 didn't get updated correctly. Removed reference to ptrace () call as
1421 it is only true on Linux systems.
1422
7313bced
CL
14232016-09-06 Carl Love <cel@us.ibm.com>
1424
1425 * server.c (start_inferior): Do not call
1426 function target_post_create_inferior () if the
1427 inferior process has already exited.
1428
cf6de44d
PA
14292016-09-05 Pedro Alves <palves@redhat.com>
1430
1431 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1432 (COMPILE.pre, CC_LD): Use CXX directly.
1433 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1434 * acinclude.m4: Don't include build-with-cxx.m4.
1435 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1436 * configure: Regenerate.
1437
c1da6748
AT
14382016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1439
1440 PR gdb/19495
1441 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1442 call writing data to own_buf.
1443
f2b9e3df
SDJ
14442016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1445
1446 * target.c (mywait): Call target_wait instead of
1447 the_target->wait.
1448 (target_wait): New function.
1449
049a8570
SDJ
14502016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1451
1452 * server.c (start_inferior): New variable 'ptid'. Replace calls
1453 to the_target->resume by target_continue{,_no_signal}, depending
1454 on the case.
1455 * target.c (target_stop_and_wait): Call target_continue_no_signal
1456 instead of the_target->resume.
1457 (target_continue): New function.
1458
3aa5cfa0
AT
14592016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1460
1461 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1462
754653a7
AZ
14632016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1464
1465 PR server/20491
1466 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1467 ps_prochandle.
1468 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1469 * linux-arm-low.c (ps_get_thread_area): Likewise.
1470 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1471 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1472 * linux-mips-low.c (ps_get_thread_area): Likewise.
1473 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1474 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1475 * linux-x86-low.c (ps_get_thread_area): Likewise.
1476 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1477
ed036b40
PA
14782016-08-19 Pedro Alves <palves@redhat.com>
1479
1480 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1481
c8ef42ee
PA
14822016-08-19 Pedro Alves <palves@redhat.com>
1483
1484 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1485 comment. Use memcpy instead of casting through unsigned long.
1486
9c235a72
PA
14872016-08-19 Pedro Alves <palves@redhat.com>
1488
1489 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1490 allocating around 0x80000000.
1491
201506da
PA
14922016-08-19 Pedro Alves <palves@redhat.com>
1493
1494 PR gdb/20415
1495 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1496 (x32-avx512-linux-ipa.o): New rules.
1497 * configure.ac (x86_64-*-linux*): New x32 check.
1498 * configure.srv (ipa_x32_linux_regobj): New.
1499 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1500 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1501 descriptions.
1502 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1503 descriptions.
1504 * configure: Regenerate.
1505
f348d89a
PA
15062016-08-09 Pedro Alves <palves@redhat.com>
1507
1508 PR gdb/18653
1509 * Makefile.in (OBS): Add signals-state-save-restore.o.
1510 (signals-state-save-restore.o): New rule.
1511 * config.in: Regenerate.
1512 * configure: Regenerate.
1513 * linux-low.c: Include "signals-state-save-restore.h".
1514 (linux_create_inferior): Call
1515 restore_original_signals_state.
1516 * server.c: Include "dispositions-save-restore.h".
1517 (captured_main): Call save_original_signals_state.
1518
1baf5149
PA
15192016-08-05 Pedro Alves <palves@redhat.com>
1520
1521 * configure: Regenerate.
1522
fcd4a73d
YQ
15232016-08-04 Yao Qi <yao.qi@linaro.org>
1524
1525 * linux-low.c (regsets_fetch_inferior_registers): Check
1526 errno is ESRCH or not.
1527
979659d0
YQ
15282016-08-02 Yao Qi <yao.qi@linaro.org>
1529
1530 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1531 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1532 (thread_db_load_search): Update.
1533 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1534 td_ta_set_event and td_ta_event_getmsg.
1535
6598661d
PA
15362016-07-26 Pedro Alves <palves@redhat.com>
1537
1538 PR server/20414
1539 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1540 of unsigned long for 64-bit registers and use uint32_t instead of
1541 unsigned int for 32-bit registers.
1542
9cf12d57
PA
15432016-07-26 Pedro Alves <palves@redhat.com>
1544
1545 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1546 to 'ptrace'.
1547
305450ed
TT
15482016-07-21 Tom Tromey <tom@tromey.com>
1549
1550 * configure: Rebuild.
1551
2583da7c
YQ
15522016-07-21 Yao Qi <yao.qi@linaro.org>
1553
1554 * mem-break.c (find_gdb_breakpoint): Cast bp to
1555 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1556
21536b36
YQ
15572016-07-21 Yao Qi <yao.qi@linaro.org>
1558
1559 * server.c (handle_v_requests): Support s and S actions
1560 if target_supports_software_single_step return true.
1561
8901d193
YQ
15622016-07-21 Yao Qi <yao.qi@linaro.org>
1563
1564 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1565 is resume_step, call maybe_hw_step.
1566 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1567 and unstop them.
1568 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1569 breakpoints or not.
1570 (proceed_one_lwp): If resume request is resume_step, install
1571 reinsert breakpoints and call maybe_hw_step.
1572
0e9a339e
YQ
15732016-07-21 Yao Qi <yao.qi@linaro.org>
1574
1575 * linux-low.c (proceed_one_lwp): Declare.
1576 (linux_resume_one_thread): Remove local variable 'step'.
1577 Lift code enqueue signal. Call proceed_one_lwp instead of
1578 linux_resume_one_lwp.
1579
4281b351
YQ
15802016-07-21 Yao Qi <yao.qi@linaro.org>
1581
1582 * linux-low.c (linux_resume_one_thread): Call
1583 enqueue_pending_signal.
1584
984a2c04
YQ
15852016-07-21 Yao Qi <yao.qi@linaro.org>
1586
1587 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1588 * inferiors.c (do_restore_current_thread_cleanup): New function.
1589 (make_cleanup_restore_current_thread): Likewise.
1590 * linux-low.c (install_software_single_step_breakpoints): Call
1591 make_cleanup_restore_current_thread. Switch current_thread to
1592 thread.
1593
bec903c9
YQ
15942016-07-21 Yao Qi <yao.qi@linaro.org>
1595
1596 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1597 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1598 (clone_one_breakpoint): Likewise.
1599 (delete_reinsert_breakpoints): Change parameter to thread.
1600 Callers updated.
1601 (has_reinsert_breakpoints): Likewise.
1602 (uninsert_reinsert_breakpoints): Likewise.
1603 (reinsert_reinsert_breakpoints): Likewise.
1604 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1605 (delete_reinsert_breakpoints): Likewise.
1606 (reinsert_reinsert_breakpoints): Likewise.
1607 (uninsert_reinsert_breakpoints): Likewise.
1608 (has_reinsert_breakpoints): Likewise.
1609
63c40ec7
YQ
16102016-07-21 Yao Qi <yao.qi@linaro.org>
1611
1612 * inferiors.c (get_thread_process): Make parameter const.
1613 * inferiors.h (get_thread_process): Update declaration.
1614 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1615 Add new parameters child_thread and parent_thread. Callers
1616 updated.
1617 * mem-break.h (clone_all_breakpoints): Update declaration.
1618
9aa76cd0
YQ
16192016-07-21 Yao Qi <yao.qi@linaro.org>
1620
1621 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1622 <command_list, handler>: Remove.
1623 (struct gdb_breakpoint): New.
1624 (struct other_breakpoint): New.
1625 (struct reinsert_breakpoint): New.
1626 (is_gdb_breakpoint): New function.
1627 (any_persistent_commands): Update command_list if
1628 is_gdb_breakpoint returns true.
1629 (set_breakpoint): Create breakpoints according to their types.
1630 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1631 (set_gdb_breakpoint_1): Likewise.
1632 (set_gdb_breakpoint): Likewise.
1633 (clear_breakpoint_conditions): Change parameter type to
1634 'struct gdb_breakpoint *'.
1635 (clear_breakpoint_commands): Likewise.
1636 (clear_breakpoint_conditions_and_commands): Likewise.
1637 (add_condition_to_breakpoint): Likewise.
1638 (add_breakpoint_condition): Likewise.
1639 (add_commands_to_breakpoint): Likewise.
1640 (check_breakpoints): Check other_breakpoint.
1641 (clone_one_breakpoint): Clone breakpopint according to its type.
1642 * mem-break.h (struct gdb_breakpoint): Declare.
1643 (set_gdb_breakpoint): Update declaration.
1644 (clear_breakpoint_conditions_and_commands): Likewise.
1645 (add_breakpoint_condition): Likewise.
1646 (add_breakpoint_commands): Likewise.
1647 * server.c (process_point_options): Change parameter type to
1648 'struct gdb_breakpoint *'.
1649
811f8301
YQ
16502016-07-21 Yao Qi <yao.qi@linaro.org>
1651
1652 * mem-break.c (set_breakpoint_at): Rename it to ...
1653 (set_breakpoint_type_at): ... it.
1654 (set_breakpoint_at): Call set_breakpoint_type_at.
1655 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1656 * mem-break.h (set_breakpoint_at): Update comments.
1657
b1c51e36
CLT
16582016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1659
1660 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1661 to buf parameter.
1662 (nios2_store_gregset): Likewise.
1663
ced2dffb
PA
16642016-07-01 Pedro Alves <palves@redhat.com>
1665 Antoine Tremblay <antoine.tremblay@ericsson.com>
1666
1667 * linux-low.c: Change interface to take the target lwp_info
1668 pointer directly and return void. Handle detaching from a zombie
1669 thread.
1670 (linux_detach_lwp_callback): New function.
1671 (linux_detach): Detach from the leader thread after detaching from
1672 the clone threads.
1673
2ac09a5b
YQ
16742016-06-28 Yao Qi <yao.qi@linaro.org>
1675
1676 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1677 for variable new_offset.
1678 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1679 (aarch64_ftrace_insn_reloc_cb): Likewise.
1680 (aarch64_ftrace_insn_reloc_tb): Likewise.
1681 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1682 PRIx64 instead of PRIx32.
1683
79e7fd4f
YQ
16842016-06-28 Yao Qi <yao.qi@linaro.org>
1685
1686 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1687 (the_low_target): Install arm_get_syscall_trapinfo.
1688
061fc021
YQ
16892016-06-28 Yao Qi <yao.qi@linaro.org>
1690
1691 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1692 function.
1693 (the_low_target): Install aarch64_get_syscall_trapinfo.
1694
4cc32bec
YQ
16952016-06-28 Yao Qi <yao.qi@linaro.org>
1696
1697 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1698 Callers updated.
1699 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1700 Remove parameter sysno.
1701 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1702 sysret.
1703
782c1122
AA
17042016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1705
1706 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1707 (s390_emit_ne_goto): Likewise.
1708 (s390_emit_lt_goto): Likewise.
1709 (s390_emit_le_goto): Likewise.
1710 (s390_emit_gt_goto): Likewise.
1711 (s390_emit_ge_goto): Likewise.
1712 (s390x_emit_eq_goto): Likewise.
1713 (s390x_emit_ne_goto): Likewise.
1714 (s390x_emit_lt_goto): Likewise.
1715 (s390x_emit_le_goto): Likewise.
1716 (s390x_emit_gt_goto): Likewise.
1717 (s390x_emit_ge_goto): Likewise.
1718 (s390_emit_ops_impl): Mark variable static.
1719 (s390x_emit_ops): Likewise.
1720
2e7b624b
YQ
17212016-06-17 Yao Qi <yao.qi@linaro.org>
1722
1723 * linux-low.c (handle_extended_wait): Call
1724 uninsert_reinsert_breakpoints for the parent process. Remove
1725 reinsert breakpoints from the child process. Reinsert them to
1726 the parent process when vfork is done.
1727 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1728 (reinsert_reinsert_breakpoints): New function.
1729 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1730 (reinsert_reinsert_breakpoints): Declare.
1731
8a81c5d7
YQ
17322016-06-17 Yao Qi <yao.qi@linaro.org>
1733
1734 * linux-low.c (handle_extended_wait): If the parent is doing
1735 step-over, remove the reinsert breakpoints from the forked child.
1736
f50bf8e5
YQ
17372016-06-17 Yao Qi <yao.qi@linaro.org>
1738
1739 * linux-low.c (unsuspend_all_lwps): Declare.
1740 (linux_low_filter_event): If thread exited, call finish_step_over.
1741 If step-over is finished, unsuspend other threads.
1742
8376a3cb
YQ
17432016-06-17 Yao Qi <yao.qi@linaro.org>
1744
1745 * linux-low.c (linux_resume_one_lwp_throw): Assert
1746 has_reinsert_breakpoints returns false.
1747 * mem-break.c (delete_disabled_breakpoints): Assert
1748 bp type isn't reinsert_breakpoint.
1749
f79b145d
YQ
17502016-06-17 Yao Qi <yao.qi@linaro.org>
1751
1752 * linux-low.c (maybe_hw_step): New function.
1753 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1754 (finish_step_over): Switch current_thread to lwp temporarily,
1755 and assert has_reinsert_breakpoints returns true.
1756 (proceed_one_lwp): Call maybe_hw_step.
1757 * mem-break.c (has_reinsert_breakpoints): New function.
1758 * mem-break.h (has_reinsert_breakpoints): Declare.
1759
0ae534d2
JT
17602016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1761
1762 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1763
fcdad592
YQ
17642016-05-17 Yao Qi <yao.qi@linaro.org>
1765
1766 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1767 instead of find_inferior.
1768
9e784964
YQ
17692016-05-05 Yao Qi <yao.qi@linaro.org>
1770
1771 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1772 Initialize res to zero.
1773
cf2ebb6e
YQ
17742016-05-05 Yao Qi <yao.qi@linaro.org>
1775
1776 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1777 to uint32_t.
1778
c1aebf87
UW
17792016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1780
1781 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1782 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1783 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1784
35fd2deb 17852016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 1786 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
1787
1788 * tracepoint.c (write_inferior_int8): New function.
1789 (cmd_qtenable_disable): Write enable flag using
1790 write_inferior_int8.
1791
484b3c32
YQ
17922016-04-25 Yao Qi <yao.qi@linaro.org>
1793
1794 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1795 (need_step_over_p): Return zero if the LWP has pending signals
1796 can be delivered on software single step target.
1797
85ba7d86
YQ
17982016-04-25 Yao Qi <yao.qi@linaro.org>
1799
1800 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1801 return instead of error.
1802
3539aa13
YQ
18032016-04-22 Yao Qi <yao.qi@linaro.org>
1804
1805 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1806 to 23.
1807
5b061e98
YQ
18082016-04-22 Yao Qi <yao.qi@linaro.org>
1809
1810 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1811 signal when stepping over breakpoint with software single
1812 step.
1813
3451269c
PA
18142016-04-21 Pedro Alves <palves@redhat.com>
1815
1816 * linux-s390-low.c (s390_collect_ptrace_register)
1817 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1818 add casts.
1819 (s390_check_regset): Use void * instead of gdb_byte *.
1820
a2358508
PA
18212016-04-20 Pedro Alves <palves@redhat.com>
1822
1823 * configure: Renegerate.
1824
6885166d
YQ
18252016-04-20 Yao Qi <yao.qi@linaro.org>
1826
1827 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1828 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1829 number 16.
1830 (arm_store_gregset): Likewise.
1831
2b863f51
WT
18322016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1833
1834 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1835 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1836 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1837 (amd64-avx-mpx-linux.c): New rules.
1838 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1839 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1840 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1841 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1842 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1843 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1844 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1845 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1846 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1847 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1848 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1849 * linux-x86-low.c (x86_linux_read_description): Add case for
1850 X86_XSTATE_AVX_MPX_MASK.
1851 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1852 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1853 init_registers_i386_avx_mpx_linux.
1854 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1855 (initialize_low_tracepoint): Call
1856 init_registers_i386_avx_mpx_linux.
1857 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1858 (initialize_low_tracepoint): Call
1859 init_registers_amd64_avx_mpx_linux.
1860 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1861 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1862 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1863 declarations.
1864
9b30624b
PA
18652016-04-18 Pedro Alves <palves@redhat.com>
1866
1867 * configure: Regenerate.
1868
45e3745e
AT
18692016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1870
1871 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1872 (aarch64_emit_sub): Likewise.
1873
2afc13ff
PA
18742016-04-12 Pedro Alves <palves@redhat.com>
1875
1876 * utils.c (prepare_to_throw_exception): Delete.
1877
6e774b13
SM
18782016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1879
1880 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1881
4dca19f8
MK
18822016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1883
1884 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1885
d0a9981f
MK
18862016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1887
1888 * linux-aarch64-ipa.c: Add <elf.h> include.
1889 * linux-ppc-ipa.c: Add <elf.h> include.
1890 * linux-s390-ipa.c: Add <elf.h> include.
1891
252db07e
MK
18922016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1893
1894 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1895 (get_raw_reg_ptr): Likewise.
1896 (get_trace_state_variable_value_ptr): Likewise.
1897 (set_trace_state_variable_value_ptr): Likewise.
1898 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1899 char *.
1900
14e2b6d9
MK
19012016-03-31 Wei-cheng Wang <cole945@gmail.com>
1902 Marcin Kościelnicki <koriakin@0x04.net>
1903
1904 PR/17221
1905 * linux-ppc-low.c (emit_insns): New function.
1906 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1907 (ppc_emit_prologue): New function.
1908 (ppc_emit_epilogue): New function.
1909 (ppc_emit_add): New function.
1910 (ppc_emit_sub): New function.
1911 (ppc_emit_mul): New function.
1912 (ppc_emit_lsh): New function.
1913 (ppc_emit_rsh_signed): New function.
1914 (ppc_emit_rsh_unsigned): New function.
1915 (ppc_emit_ext): New function.
1916 (ppc_emit_zero_ext): New function.
1917 (ppc_emit_log_not): New function.
1918 (ppc_emit_bit_and): New function.
1919 (ppc_emit_bit_or): New function.
1920 (ppc_emit_bit_xor): New function.
1921 (ppc_emit_bit_not): New function.
1922 (ppc_emit_equal): New function.
1923 (ppc_emit_less_signed): New function.
1924 (ppc_emit_less_unsigned): New function.
1925 (ppc_emit_ref): New function.
1926 (ppc_emit_const): New function.
1927 (ppc_emit_reg): New function.
1928 (ppc_emit_pop): New function.
1929 (ppc_emit_stack_flush): New function.
1930 (ppc_emit_swap): New function.
1931 (ppc_emit_stack_adjust): New function.
1932 (ppc_emit_call): New function.
1933 (ppc_emit_int_call_1): New function.
1934 (ppc_emit_void_call_2): New function.
1935 (ppc_emit_if_goto): New function.
1936 (ppc_emit_goto): New function.
1937 (ppc_emit_eq_goto): New function.
1938 (ppc_emit_ne_goto): New function.
1939 (ppc_emit_lt_goto): New function.
1940 (ppc_emit_le_goto): New function.
1941 (ppc_emit_gt_goto): New function.
1942 (ppc_emit_ge_goto): New function.
1943 (ppc_write_goto_address): New function.
1944 (ppc_emit_ops_impl): New static variable.
1945 (ppc64v1_emit_prologue): New function.
1946 (ppc64v2_emit_prologue): New function.
1947 (ppc64_emit_epilogue): New function.
1948 (ppc64_emit_add): New function.
1949 (ppc64_emit_sub): New function.
1950 (ppc64_emit_mul): New function.
1951 (ppc64_emit_lsh): New function.
1952 (ppc64_emit_rsh_signed): New function.
1953 (ppc64_emit_rsh_unsigned): New function.
1954 (ppc64_emit_ext): New function.
1955 (ppc64_emit_zero_ext): New function.
1956 (ppc64_emit_log_not): New function.
1957 (ppc64_emit_bit_and): New function.
1958 (ppc64_emit_bit_or): New function.
1959 (ppc64_emit_bit_xor): New function.
1960 (ppc64_emit_bit_not): New function.
1961 (ppc64_emit_equal): New function.
1962 (ppc64_emit_less_signed): New function.
1963 (ppc64_emit_less_unsigned): New function.
1964 (ppc64_emit_ref): New function.
1965 (ppc64_emit_const): New function.
1966 (ppc64v1_emit_reg): New function.
1967 (ppc64v2_emit_reg): New function.
1968 (ppc64_emit_pop): New function.
1969 (ppc64_emit_stack_flush): New function.
1970 (ppc64_emit_swap): New function.
1971 (ppc64v1_emit_call): New function.
1972 (ppc64v2_emit_call): New function.
1973 (ppc64v1_emit_int_call_1): New function.
1974 (ppc64v2_emit_int_call_1): New function.
1975 (ppc64v1_emit_void_call_2): New function.
1976 (ppc64v2_emit_void_call_2): New function.
1977 (ppc64_emit_if_goto): New function.
1978 (ppc64_emit_eq_goto): New function.
1979 (ppc64_emit_ne_goto): New function.
1980 (ppc64_emit_lt_goto): New function.
1981 (ppc64_emit_le_goto): New function.
1982 (ppc64_emit_gt_goto): New function.
1983 (ppc64_emit_ge_goto): New function.
1984 (ppc64v1_emit_ops_impl): New static variable.
1985 (ppc64v2_emit_ops_impl): New static variable.
1986 (ppc_emit_ops): New function.
1987 (linux_low_target): Wire in ppc_emit_ops.
1988
a2174ba4
MK
19892016-03-31 Wei-cheng Wang <cole945@gmail.com>
1990 Marcin Kościelnicki <koriakin@0x04.net>
1991
1992 PR/17221
1993 * Makefile.in: Add powerpc-*-ipa.o
1994 * configure.srv: Add ipa_obj for powerpc*-linux.
1995 * linux-ppc-ipa.c: New file.
1996 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1997 includes.
1998 (PPC_FIELD): New macro.
1999 (PPC_SEXT): New macro.
2000 (PPC_OP6): New macro.
2001 (PPC_BO): New macro.
2002 (PPC_LI): New macro.
2003 (PPC_BD): New macro.
2004 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2005 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2006 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2007 (ppc_get_thread_area): New function.
2008 (is_elfv2_inferior): New function.
2009 (gen_ds_form): New function.
2010 (GEN_STD): New macro.
2011 (GEN_STDU): New macro.
2012 (GEN_LD): New macro.
2013 (GEN_LDU): New macro.
2014 (gen_d_form): New function.
2015 (GEN_ADDI): New macro.
2016 (GEN_ADDIS): New macro.
2017 (GEN_LI): New macro.
2018 (GEN_LIS): New macro.
2019 (GEN_ORI): New macro.
2020 (GEN_ORIS): New macro.
2021 (GEN_LWZ): New macro.
2022 (GEN_STW): New macro.
2023 (GEN_STWU): New macro.
2024 (gen_xfx_form): New function.
2025 (GEN_MFSPR): New macro.
2026 (GEN_MTSPR): New macro.
2027 (GEN_MFCR): New macro.
2028 (GEN_MTCR): New macro.
2029 (GEN_SYNC): New macro.
2030 (GEN_LWSYNC): New macro.
2031 (gen_x_form): New function.
2032 (GEN_OR): New macro.
2033 (GEN_MR): New macro.
2034 (GEN_LWARX): New macro.
2035 (GEN_STWCX): New macro.
2036 (GEN_CMPW): New macro.
2037 (gen_md_form): New function.
2038 (GEN_RLDICL): New macro.
2039 (GEN_RLDICR): New macro.
2040 (gen_i_form): New function.
2041 (GEN_B): New macro.
2042 (GEN_BL): New macro.
2043 (gen_b_form): New function.
2044 (GEN_BNE): New macro.
2045 (GEN_LOAD): New macro.
2046 (GEN_STORE): New macro.
2047 (gen_limm): New function.
2048 (gen_atomic_xchg): New function.
2049 (gen_call): New function.
2050 (ppc_relocate_instruction): New function.
2051 (ppc_install_fast_tracepoint_jump_pad): New function.
2052 (ppc_get_min_fast_tracepoint_insn_len): New function.
2053 (ppc_get_ipa_tdesc_idx): New function.
2054 (the_low_target): Wire in the new functions.
2055 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2056 tdescs.
2057 * linux-ppc-tdesc.h: New file.
2058
a13c4696
MK
20592016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2060
2061 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2062 (alloc_jump_pad_buffer): New function.
2063 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2064 (alloc_jump_pad_buffer): New function.
2065 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2066 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2067 (alloc_jump_pad_buffer): New function.
2068 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2069 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2070 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2071 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2072
1cda1512
MK
20732016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2074
2075 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2076 * linux-amd64-ipa.c: Likewise.
2077 * linux-i386-ipa.c: Likewise.
2078 * linux-s390-ipa.c: Likewise.
2079 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2080 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2081 set_trace_state_variable_value_ptr.
2082 (struct ipa_sym_addresses): Likewise.
2083 (symbol_list): Likewise.
2084 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2085 accessing gdb_collect directly.
2086 (gdb_collect_ptr_type): New typedef.
2087 (get_raw_reg_ptr_type): New typedef.
2088 (get_trace_state_variable_value_ptr_type): New typedef.
2089 (set_trace_state_variable_value_ptr_type): New typedef.
2090 (gdb_collect_ptr): New global.
2091 (get_raw_reg_ptr): New global.
2092 (get_trace_state_variable_value_ptr): New global.
2093 (set_trace_state_variable_value_ptr): New global.
2094 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2095 accessing get_raw_reg directly.
2096 (get_get_tsv_func_addr): Likewise for
2097 get_trace_state_variable_value_ptr.
2098 (get_set_tsv_func_addr): Likewise for
2099 set_trace_state_variable_value_ptr.
2100 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2101
72fb5488
SM
21022016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2103
2104 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2105
28170b88
MK
21062016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2107
2108 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2109 packets.
2110 (relocate_instruction): Remove own_buf.
2111 * server.c (own_buf): Make global.
2112 (handle_v_requests): Make global.
2113 * server.h (own_buf): New declaration.
2114 (handle_v_requests): New prototype.
2115
f39e8743
MK
21162016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2117
2118 PR 18377
2119 * linux-s390-low.c (add_insns): New function.
2120 (s390_emit_prologue): New function.
2121 (s390_emit_epilogue): New function.
2122 (s390_emit_add): New function.
2123 (s390_emit_sub): New function.
2124 (s390_emit_mul): New function.
2125 (s390_emit_lsh): New function.
2126 (s390_emit_rsh_signed): New function.
2127 (s390_emit_rsh_unsigned): New function.
2128 (s390_emit_ext): New function.
2129 (s390_emit_log_not): New function.
2130 (s390_emit_bit_and): New function.
2131 (s390_emit_bit_or): New function.
2132 (s390_emit_bit_xor): New function.
2133 (s390_emit_bit_not): New function.
2134 (s390_emit_equal): New function.
2135 (s390_emit_less_signed): New function.
2136 (s390_emit_less_unsigned): New function.
2137 (s390_emit_ref): New function.
2138 (s390_emit_if_goto): New function.
2139 (s390_emit_goto): New function.
2140 (s390_write_goto_address): New function.
2141 (s390_emit_litpool): New function.
2142 (s390_emit_const): New function.
2143 (s390_emit_call): New function.
2144 (s390_emit_reg): New function.
2145 (s390_emit_pop): New function.
2146 (s390_emit_stack_flush): New function.
2147 (s390_emit_zero_ext): New function.
2148 (s390_emit_swap): New function.
2149 (s390_emit_stack_adjust): New function.
2150 (s390_emit_set_r2): New function.
2151 (s390_emit_int_call_1): New function.
2152 (s390_emit_void_call_2): New function.
2153 (s390_emit_eq_goto): New function.
2154 (s390_emit_ne_goto): New function.
2155 (s390_emit_lt_goto): New function.
2156 (s390_emit_le_goto): New function.
2157 (s390_emit_gt_goto): New function.
2158 (s390_emit_ge_goto): New function.
2159 (s390x_emit_prologue): New function.
2160 (s390x_emit_epilogue): New function.
2161 (s390x_emit_add): New function.
2162 (s390x_emit_sub): New function.
2163 (s390x_emit_mul): New function.
2164 (s390x_emit_lsh): New function.
2165 (s390x_emit_rsh_signed): New function.
2166 (s390x_emit_rsh_unsigned): New function.
2167 (s390x_emit_ext): New function.
2168 (s390x_emit_log_not): New function.
2169 (s390x_emit_bit_and): New function.
2170 (s390x_emit_bit_or): New function.
2171 (s390x_emit_bit_xor): New function.
2172 (s390x_emit_bit_not): New function.
2173 (s390x_emit_equal): New function.
2174 (s390x_emit_less_signed): New function.
2175 (s390x_emit_less_unsigned): New function.
2176 (s390x_emit_ref): New function.
2177 (s390x_emit_if_goto): New function.
2178 (s390x_emit_const): New function.
2179 (s390x_emit_call): New function.
2180 (s390x_emit_reg): New function.
2181 (s390x_emit_pop): New function.
2182 (s390x_emit_stack_flush): New function.
2183 (s390x_emit_zero_ext): New function.
2184 (s390x_emit_swap): New function.
2185 (s390x_emit_stack_adjust): New function.
2186 (s390x_emit_int_call_1): New function.
2187 (s390x_emit_void_call_2): New function.
2188 (s390x_emit_eq_goto): New function.
2189 (s390x_emit_ne_goto): New function.
2190 (s390x_emit_lt_goto): New function.
2191 (s390x_emit_le_goto): New function.
2192 (s390x_emit_gt_goto): New function.
2193 (s390x_emit_ge_goto): New function.
2194 (s390_emit_ops): New function.
2195 (struct linux_target_ops): Fill in emit_ops hook.
2196
abd9baf9
MK
21972016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2198
2199 PR 18377
2200 * Makefile.in: Add s390 IPA files.
2201 * configure.srv: Build IPA for s390.
2202 * linux-s390-ipa.c: New file.
2203 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2204 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2205 (tdesc_s390_linux32): Likewise.
2206 (init_registers_s390_linux32v1): Likewise.
2207 (tdesc_s390_linux32v1): Likewise.
2208 (init_registers_s390_linux32v2): Likewise.
2209 (tdesc_s390_linux32v2): Likewise.
2210 (init_registers_s390_linux64): Likewise.
2211 (tdesc_s390_linux64): Likewise.
2212 (init_registers_s390_linux64v1): Likewise.
2213 (tdesc_s390_linux64v1): Likewise.
2214 (init_registers_s390_linux64v2): Likewise.
2215 (tdesc_s390_linux64v2): Likewise.
2216 (init_registers_s390_te_linux64): Likewise.
2217 (tdesc_s390_te_linux64): Likewise.
2218 (init_registers_s390_vx_linux64): Likewise.
2219 (tdesc_s390_vx_linux64): Likewise.
2220 (init_registers_s390_tevx_linux64): Likewise.
2221 (tdesc_s390_tevx_linux64): Likewise.
2222 (init_registers_s390x_linux64): Likewise.
2223 (tdesc_s390x_linux64): Likewise.
2224 (init_registers_s390x_linux64v1): Likewise.
2225 (tdesc_s390x_linux64v1): Likewise.
2226 (init_registers_s390x_linux64v2): Likewise.
2227 (tdesc_s390x_linux64v2): Likewise.
2228 (init_registers_s390x_te_linux64): Likewise.
2229 (tdesc_s390x_te_linux64): Likewise.
2230 (init_registers_s390x_vx_linux64): Likewise.
2231 (tdesc_s390x_vx_linux64): Likewise.
2232 (init_registers_s390x_tevx_linux64): Likewise.
2233 (tdesc_s390x_tevx_linux64): Likewise.
2234 (have_hwcap_s390_vx): New static variable.
2235 (s390_arch_setup): Fill have_hwcap_s390_vx.
2236 (s390_get_thread_area): New function.
2237 (s390_ft_entry_gpr_esa): New const.
2238 (s390_ft_entry_gpr_zarch): New const.
2239 (s390_ft_entry_misc): New const.
2240 (s390_ft_entry_fr): New const.
2241 (s390_ft_entry_vr): New const.
2242 (s390_ft_main_31): New const.
2243 (s390_ft_main_64): New const.
2244 (s390_ft_exit_fr): New const.
2245 (s390_ft_exit_vr): New const.
2246 (s390_ft_exit_misc): New const.
2247 (s390_ft_exit_gpr_esa): New const.
2248 (s390_ft_exit_gpr_zarch): New const.
2249 (append_insns): New function.
2250 (s390_relocate_instruction): New function.
2251 (s390_install_fast_tracepoint_jump_pad): New function.
2252 (s390_get_min_fast_tracepoint_insn_len): New function.
2253 (s390_get_ipa_tdesc_idx): New function.
2254 (struct linux_target_ops): Wire in the above functions.
2255 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2256 * linux-s390-tdesc.h: New file.
2257
a4105d04
MK
22582016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2259
2260 * linux-s390-low.c (s390_supports_tracepoints): New function.
2261 (struct linux_target_ops): Fill supports_tracepoints hook.
2262
35ac8b3e
YQ
22632016-03-18 Yao Qi <yao.qi@linaro.org>
2264
2265 * linux-low.c (lwp_signal_can_be_delivered): New function.
2266 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2267
94610ec4
YQ
22682016-03-18 Yao Qi <yao.qi@linaro.org>
2269
2270 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2271 0 if signal is enqueued. Remove 'signal' from one debugging
2272 message. Move one debugging message to some lines below.
2273 Remove code setting 'signal' to 0.
2274
80aea927
YQ
22752016-03-18 Yao Qi <yao.qi@linaro.org>
2276
2277 * linux-low.c (linux_low_filter_event): Remove redundant
2278 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2279
b04fd3be
MK
22802016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2281
2282 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2283 (struct linux_target_ops): Wire in the above.
2284
c40c8d4b
YQ
22852016-03-03 Yao Qi <yao.qi@linaro.org>
2286
2287 * linux-low.c: Update comments to start_step_over.
2288
0f8288ae
YQ
22892016-03-03 Yao Qi <yao.qi@linaro.org>
2290
2291 PR server/19736
2292 * linux-low.c (handle_extended_wait): Set child suspended
2293 if event_lwp->bp_reinsert isn't zero.
2294
fdbd04a8
YQ
22952016-03-02 Yao Qi <yao.qi@linaro.org>
2296
2297 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2298 enqueue_pending_signal.
2299
6896a8fa
MK
23002016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2301
2302 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2303 is actually loaded.
2304
ab503087
MK
23052016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2306
2307 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2308 (s390_regmap_3264) [!__s390x__]: New global.
2309 (s390_collect_ptrace_register): Skip map entries containing -1.
2310 (s390_supply_ptrace_register): Ditto.
2311 (s390_fill_gprs_high): New function.
2312 (s390_store_gprs_high): New function.
2313 (s390_regsets): Add NT_S390_HIGH_GPRS.
2314 (s390_get_hwcap): Enable on 31-bit.
2315 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2316 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2317 Detect NT_S390_HIGH_GPRS.
2318 (s390_usrregs_info_3264): Enable on 31-bit.
2319 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2320 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2321
ae91f625
MK
23222016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2323
2324 PR gdb/13808
2325 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2326 * configure.srv: Ditto.
2327 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2328 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2329 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2330 (init_registers_amd64_linux): Remove prototype.
2331 (tdesc_amd64_linux): Remove declaration.
2332 (get_ipa_tdesc): New function.
2333 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2334 initialize remaining tdescs.
2335 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2336 (init_registers_i386_linux): Remove prototype.
2337 (tdesc_i386_linux): Remove declaration.
2338 (get_ipa_tdesc): New function.
2339 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2340 initialize remaining tdescs.
2341 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2342 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2343 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2344 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2345 (x86_get_ipa_tdesc_idx): New function.
2346 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2347 * linux-x86-tdesc.h: New file.
2348 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2349 (target_get_ipa_tdesc_idx): New macro.
2350 * tracepoint.c (ipa_tdesc_idx): New macro.
2351 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2352 (symbol_list): Add ipa_tdesc_idx.
2353 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2354 (ipa_tdesc): Remove.
2355 (ipa_tdesc_idx): New variable.
2356 (get_context_regcache): Use get_ipa_tdesc.
2357 (gdb_collect): Ditto.
2358 (gdb_probe): Ditto.
2359 * tracepoint.h (get_ipa_tdesc): New prototype.
2360 (ipa_tdesc): Remove.
2361
e7ad2f14
PA
23622016-02-24 Pedro Alves <palves@redhat.com>
2363
2364 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2365 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2366 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2367 Factor out common code between the USE_SIGTRAP_SIGINFO and
2368 !USE_SIGTRAP_SIGINFO blocks.
2369 (linux_low_filter_event): Call save_stop_reason instead of
2370 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2371 Update comments.
2372 (linux_wait_1): Update comments.
2373
657f9cde
WW
23742016-02-24 Wei-cheng Wang <cole945@gmail.com>
2375
2376 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2377 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2378 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2379 ppc_insert_point, ppc_remove_point.
2380
b00b61e1
MK
23812016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2382
2383 * linux-s390-low.c (s390_supports_z_point_type): New function.
2384 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2385
553cb527
YQ
23862016-02-16 Yao Qi <yao.qi@linaro.org>
2387
2388 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2389 PC. Get pc from regcache_read_pc.
2390
a5652c21
YQ
23912016-02-12 Yao Qi <yao.qi@linaro.org>
2392
2393 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2394 or linux_get_pc_32bit.
2395 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2396
ed443b61
YQ
23972016-02-12 Yao Qi <yao.qi@linaro.org>
2398
2399 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2400 arm_linux_get_next_pcs_fixup.
2401
020ecd38
MK
24022016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2403
2404 * tracepoint.c (x_tracepoint_action_download): Change
2405 write_inferior_data_ptr to write_inferior_data_pointer.
2406 (cmd_qtstart): Likewise.
2407 (write_inferior_data_ptr): Remove.
2408 (download_agent_expr): Change write_inferior_data_ptr to
2409 write_inferior_data_pointer.
2410 (download_tracepoint_1): Likewise.
2411 (download_tracepoint): Likewise.
2412 (download_trace_state_variables): Likewise.
2413
7cae9051
WW
24142016-02-11 Wei-cheng Wang <cole945@gmail.com>
2415 Marcin Kościelnicki <koriakin@0x04.net>
2416
2417 * tracepoint.c (struct tracepoint_action_ops): Remove.
2418 (struct tracepoint_action): Remove ops.
2419 (m_tracepoint_action_download, r_tracepoint_action_download)
2420 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2421 size and offset accordingly.
2422 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2423 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2424 (tracepoint_action_send, tracepoint_action_download): New functions.
2425 Helpers for trace action handlers.
2426 (add_tracepoint_action): Remove setup actions ops.
2427 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2428
9f6a71b4
YQ
24292016-02-10 Yao Qi <yao.qi@linaro.org>
2430
2431 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2432
1e94266c
SM
24332016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2434
2435 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2436 to AC_OUTPUT.
2437 * configure: Regenerate.
2438
8adce034
SM
24392016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2440
2441 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2442 void * to gdb_byte *.
2443 * linux-low.c (siginfo_fixup): Likewise.
2444 (linux_xfer_siginfo): Likewise.
2445 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2446 Likewise.
2447 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2448
93813b37
WT
24492016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2450
2451 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2452 to srv_tgtobj.
2453 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2454 to srv_tgtobj.
2455 * linux-x86-low.c [__x86_64__]: Include
2456 "nat/amd64-linux-siginfo.h".
2457 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2458 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2459 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2460 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2461 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2462 (cpt_si_fd, si_timerid, si_overrun): Move from
2463 nat/amd64-linux-siginfo.c.
2464 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2465
8424cc97
SM
24662016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2467
2468 * server.c (skip_to_semicolon): Remove.
2469 (process_point_options): Use strchrnul instead of
2470 skip_to_semicolon.
2471
4d18591b
YQ
24722016-01-26 Yao Qi <yao.qi@linaro.org>
2473
2474 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2475 * linux-low.c (install_software_single_step_breakpoints): Don't
2476 call regcache_read_pc.
2477 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2478 argument pc.
2479
d8020970
YQ
24802016-01-26 Yao Qi <yao.qi@linaro.org>
2481
2482 * linux-low.c (install_software_single_step_breakpoints): Call
2483 regcache_read_pc instead of get_pc.
2484
8b207339
YQ
24852016-01-26 Yao Qi <yao.qi@linaro.org>
2486
2487 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2488 (unblock_async_io): Rename to ...
2489 (block_unblock_async_io): ... it. New function.
2490 (enable_async_io): Don't install SIGIO handler. Unblock it
2491 instead.
2492 (disable_async_io): Don't ignore SIGIO. Block it instead.
2493 (initialize_async_io): Install SIGIO handler. Don't call
2494 unblock_async_io.
2495
18879fef
YQ
24962016-01-26 Yao Qi <yao.qi@linaro.org>
2497
2498 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2499 first character is '\003', call *the_target->request_interrupt.
2500
a0f8e08a
YQ
25012016-01-25 Yao Qi <yao.qi@linaro.org>
2502
2503 * remote-utils.c (new_thread_notify): Remove.
2504 (dead_thread_notify): Likewise.
2505 * remote-utils.h (new_thread_notify): Remove declaration.
2506 (dead_thread_notify): Likewise.
2507
cc5fd9ab
MK
25082016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2509
2510 * gdb.trace/pending.exp: Fix expected message on continue.
2511
99e8eb11
MK
25122016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2513
2514 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2515 it works properly on big-endian machines where sizeof (CORE_ADDR)
2516 != sizeof (void *).
2517
a994041d
PA
25182016-01-21 Pedro Alves <palves@redhat.com>
2519
2520 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2521 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2522 * configure: Regenerate.
2523
f7a6a40d
YQ
25242016-01-21 Yao Qi <yao.qi@linaro.org>
2525
2526 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2527 is_thumb and set it according to CPSR saved on the stack.
2528 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2529 arm_sigreturn_next_pc.
2530
6f69e520
YQ
25312016-01-18 Yao Qi <yao.qi@linaro.org>
2532
2533 * linux-low.c (linux_set_pc_64bit): New function.
2534 (linux_get_pc_64bit): New function.
2535 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2536 Declare.
2537 * linux-sparc-low.c (debug_threads): Remove declaration.
2538 (sparc_get_pc): Remove.
2539 (the_low_target): Use linux_get_pc_64bit instead of
2540 sparc_get_pc.
2541 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2542 (the_low_target): Use linux_get_pc_64bit and
2543 linux_set_pc_64bit.
2544
276d4552
YQ
25452016-01-18 Yao Qi <yao.qi@linaro.org>
2546
2547 * linux-arm-low.c (debug_threads): Remove declaration.
2548 (arm_get_pc, arm_set_pc): Remove.
2549 (the_low_target): Use linux_get_pc_32bit and
2550 linux_set_pc_32bit.
2551 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2552 (the_low_target): Use linux_get_pc_32bit and
2553 linux_set_pc_32bit.
2554 * linux-cris-low.c (debug_threads): Remove declaration.
2555 (cris_get_pc, cris_set_pc,): Remove.
2556 (the_low_target): Use linux_get_pc_32bit and
2557 linux_set_pc_32bit.
2558 * linux-crisv32-low.c (debug_threads): Remove declaration.
2559 (cris_get_pc, cris_set_pc): Remove.
2560 (the_low_target): Use linux_get_pc_32bit and
2561 linux_set_pc_32bit.
2562 * linux-low.c: Include inttypes.h.
2563 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2564 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2565 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2566 (the_low_target): Use linux_get_pc_32bit and
2567 linux_set_pc_32bit.
2568 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2569 (the_low_target): Use linux_get_pc_32bit and
2570 linux_set_pc_32bit.
2571 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2572 (the_low_target): Use linux_get_pc_32bit and
2573 linux_set_pc_32bit.
2574 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2575 (the_low_target): Use linux_get_pc_32bit and
2576 linux_set_pc_32bit.
2577 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2578 (the_low_target): Use linux_get_pc_32bit and
2579 linux_set_pc_32bit.
2580
eb0edac8
GB
25812016-01-18 Gary Benson <gbenson@redhat.com>
2582
2583 * configure.ac (AC_FUNC_FORK): New check.
2584 * config.in: Regenerate.
2585 * configure: Likewise.
2586
1b451dda
YQ
25872016-01-14 Yao Qi <yao.qi@linaro.org>
2588
2589 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2590 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2591 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2592 arm_get_next_pcs_ctor.
2593
82075af2
JS
25942016-01-12 Josh Stone <jistone@redhat.com>
2595 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2596
2597 * inferiors.h: Include "gdb_vecs.h".
2598 (struct process_info): Add syscalls_to_catch.
2599 * inferiors.c (remove_process): Free syscalls_to_catch.
2600 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2601 syscall_return stops.
2602 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2603 * server.c (handle_general_set): Handle QCatchSyscalls.
2604 (handle_query): Report support for QCatchSyscalls.
2605 * target.h (struct target_ops): Add supports_catch_syscall.
2606 (target_supports_catch_syscall): New macro.
2607 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2608 (struct lwp_info): Add syscall_state.
2609 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2610 Maintain syscall_state and syscalls_to_catch across exec.
2611 (get_syscall_trapinfo): New function, proxy to the_low_target.
2612 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2613 (linux_low_filter_event): Toggle syscall_state entry/return for
2614 syscall traps, and set it ignored for all others.
2615 (gdb_catching_syscalls_p): New function.
2616 (gdb_catch_this_syscall_p): New function.
2617 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2618 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2619 (linux_supports_catch_syscall): New function.
2620 (linux_target_ops): Install it.
2621 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2622 (the_low_target): Install it.
2623
8f13a3ce
MF
26242016-01-12 Mike Frysinger <vapier@gentoo.org>
2625
2626 * acinclude.m4: Include new ../warning.m4 file.
2627 * configure: Regenerated.
2628 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2629
5b3da067
MF
26302016-01-12 Mike Frysinger <vapier@gentoo.org>
2631
2632 * ax.c (is_goto_target): Mark static.
2633 * linux-low.c (register_addr): Likewise.
2634 (linux_fetch_registers, linux_store_registers): Likewise.
2635 * mem-break.c (any_persistent_commands): Fix old prototype.
2636 (add_commands_to_breakpoint): Mark static.
2637 * regcache.c (find_register_by_name): Delete unused func.
2638 * remote-utils.c (hex_or_minus_one): Mark static.
2639 * server.c (monitor_show_help): Mark static.
2640 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2641 handle_v_requests): Likewise.
2642
bc504a31
PA
26432016-01-12 Pedro Alves <palves@redhat.com>
2644
2645 Remove use of the registered trademark symbol throughout.
2646
5a0dd67a
YQ
26472016-01-08 Yao Qi <yao.qi@linaro.org>
2648
2649 * remote-utils.c (getpkt): If c is '\003', call target hook
2650 request_interrupt.
2651
b2ca446f
YQ
26522016-01-06 Yao Qi <yao.qi@linaro.org>
2653
2654 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2655 linux-aarch32-low.c.
2656 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2657 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2658 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2659 (thumb2_breakpoint): Declare.
2660 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2661 linux-aarch32-low.h.
2662 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2663 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2664 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2665
edd88788
JB
26662016-01-01 Joel Brobecker <brobecker@adacore.com>
2667
2668 * gdbreplay.c (gdbreplay_version): Change copyright year in
2669 version message.
2670 * server.c (gdbserver_version): Likewise.
2671
65da7f14
PP
26722015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2673
2674 * server.c (crc32_table): Delete.
2675 (crc32): Use libiberty's xcrc32 function.
2676
4abd5ed2
JB
26772015-12-22 Joel Brobecker <brobecker@adacore.com>
2678
2679 * lynx-low.c (lynx_delete_thread_callback): New function.
2680 (lynx_mourn): Properly delete our process and all of its
2681 threads. Remove call to clear_inferiors.
2682
0e50fe5c
JB
26832015-12-22 Joel Brobecker <brobecker@adacore.com>
2684
2685 * target.c (thread_search_callback): Add check that
2686 the thread_stopped target callback is not NULL before
2687 calling it.
2688
35adc03f
YQ
26892015-12-21 Yao Qi <yao.qi@linaro.org>
2690
2691 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2692 arm breakpoint.
2693
bd2b2909
AT
26942015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2695
2696 * server.c (handle_query): Call target_supports_software_single_step.
2697
7fe5e27e
AT
26982015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2699
2700 * linux-low.c (single_step): New function.
2701 (linux_resume_one_lwp_throw): Call single_step.
2702 (start_step_over): Likewise.
2703
d9311bfa
AT
27042015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2705
2706 * Makefile.in (SFILES): Append arch/arm-linux.c,
2707 arch/arm-get-next-pcs.c.
2708 (arm-linux.o): New rule.
2709 (arm-get-next-pcs.o): New rule.
2710 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2711 arm-linux.o.
2712 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2713 to linux-aarch32-low.c.
2714 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2715 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2716 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2717 (thumb2_breakpoint_len): Likewise.
2718 (arm_is_thumb_mode): Make non-static.
2719 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2720 from linux-aarch32-low.c.
2721 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2722 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2723 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2724 (thumb2_breakpoint_len): Likewise.
2725 (arm_is_thumb_mode): New declaration.
2726 * linux-arm-low.c: Include arch/arm-linux.h
2727 aarch/arm-get-next-pcs.h, sys/syscall.h.
2728 (get_next_pcs_ops): New struct.
2729 (get_next_pcs_addr_bits_remove): New function.
2730 (get_next_pcs_is_thumb): New function.
2731 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2732 (arm_sigreturn_next_pc): Likewise.
2733 (get_next_pcs_syscall_next_pc): Likewise.
2734 (arm_gdbserver_get_next_pcs): Likewise.
2735 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2736 Initialize.
2737 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2738 * server.h: Include gdb_vecs.h.
2739
68ce2059
AT
27402015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2741
2742 * Makefile.in (SFILES): Append common/common-regcache.c.
2743 (OBS): Append common-regcache.o.
2744 (common-regcache.o): New rule.
2745 * regcache.c (init_register_cache): Initialize cache to
2746 REG_UNAVAILABLE.
2747 (regcache_raw_read_unsigned): New function.
2748 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2749 register_status enum.
2750
fa5308bd
AT
27512015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2752
2753 * linux-aarch64-low.c (the_low_targets): Rename
2754 breakpoint_reinsert_addr to get_next_pcs.
2755 * linux-arm-low.c (the_low_targets): Likewise.
2756 * linux-bfin-low.c (the_low_targets): Likewise.
2757 * linux-cris-low.c (the_low_targets): Likewise.
2758 * linux-crisv32-low.c (the_low_targets): Likewise.
2759 * linux-low.c (can_software_single_step): Likewise.
2760 (install_software_single_step_breakpoints): New function.
2761 (start_step_over): Use install_software_single_step_breakpoints.
2762 * linux-low.h: New CORE_ADDR vector.
2763 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2764 get_next_pcs.
2765 * linux-mips-low.c (the_low_targets): Likewise.
2766 * linux-nios2-low.c (the_low_targets): Likewise.
2767 * linux-sparc-low.c (the_low_targets): Likewise.
2768
4a6ed09b
PA
27692015-12-17 Pedro Alves <palves@redhat.com>
2770
2771 * linux-low.c (linux_kill_one_lwp): Remove references to
2772 LinuxThreads.
2773 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2774 to 'kill'.
2775 (linux_init_signals): Delete.
2776 (initialize_low): Adjust.
2777 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2778
7544db95
PA
27792015-12-16 Pedro Alves <palves@redhat.com>
2780
2781 * configure.ac (compiler warning flags): When testing a
2782 -Wno-foo option, check whether -Wfoo works instead.
2783 * configure: Regenerate.
2784
8020350c
DB
27852015-12-11 Don Breazeal <donb@codesourcery.com>
2786
2787 * server.c (process_serial_event): Don't exit from gdbserver
2788 in remote mode if there are still active inferiors.
2789
db91f502
YQ
27902015-12-11 Yao Qi <yao.qi@linaro.org>
2791
2792 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2793 arm_breakpoint_at if the process is 32-bit.
2794
b37a6290
YQ
27952015-12-11 Yao Qi <yao.qi@linaro.org>
2796
2797 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2798 arm breakpoint.
2799
17b1509a
YQ
28002015-12-07 Yao Qi <yao.qi@linaro.org>
2801
2802 * configure.srv: Append arm.o to srv_tgtobj for
2803 aarch64*-*-linux* target.
2804 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2805 from linux-arm-low.c.
2806 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2807 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2808 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2809 (thumb2_breakpoint_len): Likewise.
2810 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2811 (arm_breakpoint_kinds): Likewise.
2812 (arm_breakpoint_kind_from_pc): Likewise.
2813 (arm_sw_breakpoint_from_kind): Likewise.
2814 (arm_breakpoint_kind_from_current_state): Likewise.
2815 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2816 (arm_sw_breakpoint_from_kind): Declare.
2817 (arm_breakpoint_kind_from_current_state): Declare.
2818 (arm_breakpoint_at): Declare.
2819 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2820 arm_sw_breakpoint_from_kind if process is 32-bit.
2821 (aarch64_breakpoint_kind_from_pc): New function.
2822 (aarch64_breakpoint_kind_from_current_state): New function.
2823 (the_low_target): Initialize fields breakpoint_kind_from_pc
2824 and breakpoint_kind_from_current_state.
2825 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2826 linux-aarch32-low.c.
2827 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2828 (arm_breakpoint, arm_breakpoint_len): Likewise.
2829 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2830 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2831 (arm_is_thumb_mode): Likewise.
2832 (arm_breakpoint_at): Likewise.
2833 (arm_breakpoint_kind_from_pc): Likewise.
2834 (arm_sw_breakpoint_from_kind): Likewise.
2835 (arm_breakpoint_kind_from_current_state): Likewise.
2836
2837 Revert:
2838 2015-08-04 Yao Qi <yao.qi@linaro.org>
2839
2840 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2841 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2842 * server.c (extended_protocol): Remove "static".
2843 * server.h (extended_protocol): Declare it.
2844
ece66d65
JS
28452015-12-04 Josh Stone <jistone@redhat.com>
2846
2847 * target.h (struct target_ops) <arch_setup>: Rename to ...
2848 (struct target_ops) <post_create_inferior>: ... this.
2849 (target_arch_setup): Rename to ...
2850 (target_post_create_inferior): ... this, calling post_create_inferior.
2851 * server.c (start_inferior): Update target_arch_setup calls to
2852 target_post_create_inferior.
2853 * linux-low.c (linux_low_ptrace_options): Forward declare.
2854 (linux_arch_setup): Update its comment for general use.
2855 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2856 (struct linux_target_ops): Use linux_post_create_inferior.
2857 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2858 to post_create_inferior.
2859 * nto-low.c (struct nto_target_ops): Likewise.
2860 * spu-low.c (struct spu_target_ops): Likewise.
2861 * win32-low.c (struct win32_target_ops): Likewise.
2862
e58c48b4
AT
28632015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2864
2865 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2866
fbec8956
AT
28672015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2868
2869 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2870 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2871 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2872 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2873 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2874 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2875 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2876 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2877 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2878 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2879 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2880 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2881
9b4c5f87
AT
28822015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2883
2884 * linux-low.c (linux_look_up_symbols): Don't call
2885 linux_supports_traceclone.
2886 * linux-low.h (thread_db_init): Remove use_events argument.
2887 * thread-db.c (thread_db_use_event): Remove global variable.
2888 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2889 (struct thread_db) <td_create_bp>: Remove field.
2890 (thread_db_create_event): Remove function.
2891 (thread_db_enable_reporting): Likewise.
2892 (find_one_thread): Don't check for thread_db_use_events.
2893 (attach_thread): Likewise.
2894 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2895 (try_thread_db_load_1): Don't check for thread_db_use_events.
2896 (thread_db_init): Remove use_events argument and thread events
2897 handling.
2898 (remove_thread_event_breakpoints): Remove function.
2899 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2900
7d00775e
AT
29012015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2902
2903 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2904 New function.
2905 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2906 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2907 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2908 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2909 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2910 Initialize.
2911 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2912 New function.
2913 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2914 * linux-low.c (can_hardware_single_step): Use
2915 supports_hardware_single_step.
2916 (can_software_single_step): New function.
2917 (start_step_over): Call can_software_single_step.
2918 (linux_supports_hardware_single_step): New function.
2919 (struct target_ops) <supports_software_single_step>: Initialize.
2920 * linux-low.h (struct linux_target_ops)
2921 <supports_hardware_single_step>: Initialize.
2922 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2923 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2924 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2925 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2926 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2927 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2928 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2929 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2930 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2931 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2932 Initialize.
2933 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2934 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2935 Initialize.
2936 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2937 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2938 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2939 New function.
2940 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2941 * target.h (struct target_ops): <supports_software_single_step>:
2942 New field.
2943 (target_supports_software_single_step): New macro.
2944
2d97cd35
AT
29452015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2946
2947 * linux-low.c (linux_wait_1): Fix pc advance condition.
2948 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2949 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2950
769ef81f
AT
29512015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2952
2953 * linux-arm-low.c (arm_is_thumb_mode): New function.
2954 (arm_breakpoint_at): Use arm_is_thumb_mode.
2955 (arm_breakpoint_kind_from_current_state): New function.
2956 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2957 Initialize.
2958 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2959 (linux_breakpoint_kind_from_current_state): New function.
2960 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2961 * linux-low.h (struct linux_target_ops)
2962 <breakpoint_kind_from_current_state>: New field.
2963 * target.h (struct target_ops): Likewise.
2964 (target_breakpoint_kind_from_current_state): New macro.
2965
1bebeeca
PA
29662015-11-30 Pedro Alves <palves@redhat.com>
2967
2968 * linux-low.c (linux_resume): Wake up the event loop before
2969 returning.
2970
a67a9fae
PA
29712015-11-30 Pedro Alves <palves@redhat.com>
2972
2973 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2974 check.
2975 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2976 to -1.
2977 * target.c (struct thread_search): New structure.
2978 (thread_search_callback): New function.
2979 (prev_general_thread): New global.
2980 (prepare_to_access_memory, done_accessing_memory): New functions.
2981 * target.h (prepare_to_access_memory, done_accessing_memory):
2982 Replace macros with function declarations.
2983
f2faf941
PA
29842015-11-30 Pedro Alves <palves@redhat.com>
2985
2986 PR 14618
2987 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2988 report TARGET_WAITKIND_NO_RESUMED.
2989 * remote-utils.c (prepare_resume_reply): Handle
2990 TARGET_WAITKIND_NO_RESUMED.
2991 * server.c (report_no_resumed): New global.
2992 (handle_query) <qSupported>: Handle "no-resumed+". Report
2993 "no-resumed+" support.
2994 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2995 return error if the client doesn't support no-resumed events.
2996 (push_stop_notification): New function.
2997 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2998 events if the client supports them.
2999
a681f9c9
PA
30002015-11-30 Pedro Alves <palves@redhat.com>
3001
3002 * linux-low.c (thread_still_has_status_pending_p): Don't check
3003 vCont;t here.
3004 (lwp_resumed): New function.
3005 (status_pending_p_callback): Return early if the LWP is not
3006 supposed to be resumed.
3007
65706a29
PA
30082015-11-30 Pedro Alves <palves@redhat.com>
3009
3010 * linux-low.c (handle_extended_wait): Assert that the LWP's
3011 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3012 thread create events, leave the new child's status pending.
3013 (linux_low_filter_event): If GDB wants to hear about thread exit
3014 events, leave the LWP marked dead and don't delete it.
3015 (linux_wait_for_event_filtered): Don't check for thread exit.
3016 (filter_exit_event): New function.
3017 (linux_wait_1): Use it, when returning an exit event.
3018 (linux_resume_one_lwp_throw): Assert that the LWP's
3019 waitstatus is TARGET_WAITKIND_IGNORE.
3020 * remote-utils.c (prepare_resume_reply): Handle
3021 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3022 * server.c (report_thread_events): New global.
3023 (handle_general_set): Handle QThreadEvents.
3024 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3025 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3026 TARGET_WAITKIND_THREAD_EXITED.
3027 * server.h (report_thread_events): Declare.
3028
56cf4bed
PA
30292015-11-30 Pedro Alves <palves@redhat.com>
3030
3031 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3032 the thread's last_resume_kind was resume_stop.
3033
500c1d85
PA
30342015-11-30 Pedro Alves <palves@redhat.com>
3035
3036 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3037 before returning.
3038
de979965
PA
30392015-11-30 Pedro Alves <palves@redhat.com>
3040
3041 * server.c (handle_v_requests): Handle vCtrlC.
3042
34c65914
PA
30432015-11-30 Pedro Alves <palves@redhat.com>
3044
3045 * gdbthread.h (find_any_thread_of_pid): Declare.
3046 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3047 functions.
3048 * server.c (handle_query): If current_thread is NULL, look for
3049 another thread of the selected process.
3050
79efa585 30512015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 3052 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
3053
3054 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3055 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3056 name in reply.
3057 * target.h (struct target_ops) <thread_name>: New field.
3058 (target_thread_name): New macro.
3059
80d82c19
JB
30602015-11-23 Joel Brobecker <brobecker@adacore.com>
3061
3062 * regcache.h (regcache_invalidate_pid): Add declaration.
3063 * regcache.c (regcache_invalidate_pid): New function, extracted
3064 from regcache_invalidate.
3065 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3066 Add trivial documentation comment.
3067 * lynx-low.c: Use regcache_invalidate_pid instead of
3068 regcache_invalidate.
3069
64da5dd5
JB
30702015-11-23 Joel Brobecker <brobecker@adacore.com>
3071
3072 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3073 and Elf64_auxv_t if the target is Android.
3074
37ce4055
DE
30752015-11-22 Doug Evans <xdje42@gmail.com>
3076
3077 * target.h: #include <sys/types.h>.
3078
06e03fff
PA
30792015-11-19 Pedro Alves <palves@redhat.com>
3080
3081 * linux-low.c (linux_process_qsupported): Change prototype.
3082 Adjust.
3083 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3084 Change prototype.
3085 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3086 and adjust to loop over all features.
3087 * server.c (handle_query) <qSupported>: Adjust to call
3088 target_process_qsupported once, passing it a vector of unprocessed
3089 features.
3090 * target.h (struct target_ops) <process_qsupported>: Change
3091 prototype.
3092 (target_process_qsupported): Adjust.
3093
9a084706
PA
30942015-11-19 Pedro Alves <palves@redhat.com>
3095
3096 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3097 mode.
3098 * configure: Regenerate.
3099
dad44a1f
PA
31002015-11-19 Pedro Alves <palves@redhat.com>
3101
3102 * configure: Regenerate.
3103
231c0592
YQ
31042015-11-19 Yao Qi <yao.qi@linaro.org>
3105
3106 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3107 type to uint32_t.
3108
6c1c9a8b
YQ
31092015-11-19 Yao Qi <yao.qi@linaro.org>
3110
3111 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3112 (struct aarch64_operand): Move enum out.
3113
9caa3311
YQ
31142015-11-19 Yao Qi <yao.qi@linaro.org>
3115
3116 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3117 struct user_fpsimd_state *.
3118 (aarch64_store_fpregset): Likewise.
3119
6a69a054
YQ
31202015-11-19 Yao Qi <yao.qi@linaro.org>
3121
3122 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3123 struct user_pt_regs *.
3124 (aarch64_store_gregset): Likewise.
3125
1798301e
PA
31262015-11-18 Pedro Alves <palves@redhat.com>
3127
3128 * Makefile.in (all_object_files): Add $IPA_OBJS.
3129
ce7715e2
PA
31302015-11-17 Pedro Alves <palves@redhat.com>
3131
3132 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3133 GDB_SIGNAL_0 and gdb_signal_to_string.
3134
c0879059
PA
31352015-11-17 Pedro Alves <palves@redhat.com>
3136
3137 * win32-low.c (handle_output_debug_string): Remove parameter.
3138 (win32_kill): Remove our_status local and adjust call to
3139 handle_output_debug_string.
3140 (get_child_debug_event): Adjust call to
3141 handle_output_debug_string.
3142
1996e237
SM
31432015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3144
3145 * linux-mips-low.c (mips_fill_gregset): Add cast.
3146 (mips_store_gregset): Likewise.
3147 (mips_fill_fpregset): Likewise.
3148 (mips_store_fpregset): Likewise.
3149
cbec665b
SM
31502015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3151
3152 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3153 priv.
3154
eb3e3c67
SM
31552015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3156
3157 * linux-mips-low.c (mips_linux_new_thread): Change type of
3158 watch_type to enum target_hw_bp_type.
3159
171de4b8
SM
31602015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3161
3162 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3163 Change return type to arm_hwbp_type.
3164
04248ead
SM
31652015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3166
3167 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3168 (arm_store_gregset): Likewise.
3169 * linux-arm-low.c (arm_get_hwcap): Likewise.
3170 (arm_read_description): Likewise.
3171
04b3479c
SM
31722015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3173
3174 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3175
2bc84e8a
SM
31762015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3177
3178 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3179 (ppc_fill_vsxregset): Likewise.
3180 (ppc_store_vsxregset): Likewise.
3181 (ppc_fill_vrregset): Likewise.
3182 (ppc_store_vrregset): Likewise.
3183 (ppc_fill_evrregset): Likewise.
3184 (ppc_store_evrregset): Likewise.
3185
e6c5bb05
SM
31862015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3187
3188 * linux-ppc-low.c (ppc_usrregs_info): Remove
3189 forward-declaration.
3190 (ppc_arch_setup): Move lower in file.
3191
7ea45d72
SM
31922015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3193
3194 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3195 (ps_pdwrite): Likewise.
3196
69291610
HW
31972015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3198
3199 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3200 to after assert checks.
3201
b42945fd
SM
32022015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3203
3204 * proc-service.c (ps_pdread): Add/adjust casts.
3205 (ps_pdwrite): Add/adjust casts.
3206
d6f85c84
SM
32072015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3208
3209 * server.c (handle_search_memory_1): Cast return value of
3210 memmem.
3211
f98cd059
SM
32122015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3213
3214 * server.c (write_qxfer_response): Change type of data to
3215 gdb_byte *.
3216
d2412fa5
PA
32172015-10-29 Pedro Alves <palves@redhat.com>
3218
3219 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3220
c17414a2
PA
32212015-10-29 Pedro Alves <palves@redhat.com>
3222
3223 * tracepoint.c (clear_installed_tracepoints): Add casts.
3224
e053fbc4
PA
32252015-10-29 Pedro Alves <palves@redhat.com>
3226
3227 * server.c (handle_v_cont, process_serial_event): Add enum
3228 gdb_signal casts to signal parsing code.
3229
add67df8
PA
32302015-10-29 Pedro Alves <palves@redhat.com>
3231
3232 * linux-low.h (NULL_REGSET): Define.
3233 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3234 * linux-arm-low.c (arm_regsets): Likewise.
3235 * linux-crisv32-low.c (cris_regsets): Likewise.
3236 * linux-m68k-low.c (m68k_regsets): Likewise.
3237 * linux-mips-low.c (mips_regsets): Likewise.
3238 * linux-nios2-low.c (nios2_regsets): Likewise.
3239 * linux-ppc-low.c (ppc_regsets): Likewise.
3240 * linux-s390-low.c (s390_regsets): Likewise.
3241 * linux-sh-low.c (sh_regsets): Likewise.
3242 * linux-sparc-low.c (sparc_regsets): Likewise.
3243 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3244 * linux-tile-low.c (tile_regsets): Likewise.
3245 * linux-x86-low.c (x86_regsets): Likewise.
3246 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3247
50bc912a
PA
32482015-10-29 Pedro Alves <palves@redhat.com>
3249
3250 * linux-low.h (NULL_REGSET): Define.
3251 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3252 * linux-arm-low.c (arm_regsets): Likewise.
3253 * linux-crisv32-low.c (cris_regsets): Likewise.
3254 * linux-m68k-low.c (m68k_regsets): Likewise.
3255 * linux-mips-low.c (mips_regsets): Likewise.
3256 * linux-nios2-low.c (nios2_regsets): Likewise.
3257 * linux-ppc-low.c (ppc_regsets): Likewise.
3258 * linux-s390-low.c (s390_regsets): Likewise.
3259 * linux-sh-low.c (sh_regsets): Likewise.
3260 * linux-sparc-low.c (sparc_regsets): Likewise.
3261 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3262 * linux-tile-low.c (tile_regsets): Likewise.
3263 * linux-x86-low.c (x86_regsets): Likewise.
3264 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3265
682b2546
DE
32662015-10-26 Doug Evans <dje@google.com>
3267
3268 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3269
963843d4
DE
32702015-10-26 Doug Evans <dje@google.com>
3271
3272 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3273
d41401ac
DE
32742015-10-26 Doug Evans <dje@google.com>
3275
3276 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3277 for debug_printf.
3278 (attach_thread, find_new_threads_callback): Ditto.
3279
3db28855
AT
32802015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3281
3282 * mem-break.h (set_breakpoint_data): Remove.
3283
fb78e89c
AT
32842015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3285
3286 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3287 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3288 (initialize_low): Remove set_breakpoint_data call.
3289 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3290 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3291 (initialize_low): Remove set_breakpoint_data call.
3292 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3293 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3294 (initialize_low): Remove set_breakpoint_data call.
3295
2e6ee069
AT
32962015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3297
3298 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3299 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3300 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3301 * target.h (target_breakpoint_kind_from_pc): New macro.
3302
1652a986
AT
33032015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3304
3305 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3306 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3307 the default breakpoint kind.
3308
abeead09
AT
33092015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3310
3311 * linux-arm-low.c (arm_supports_z_point_type): Add software
3312 breakpoint support.
3313
b0b4b501
AT
33142015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3315
3316 * linux-arm-low.c: Refactor breakpoint definitions.
3317 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3318 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3319
8689682c
AT
33202015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3321
3322 * Makefile.in: Add arm.c/o.
3323 * configure.srv: Likewise.
3324 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3325 (arm_breakpoint_kind_from_pc): New function.
3326 (arm_sw_breakpoint_from_kind): Return proper kind.
3327 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3328
27165294
AT
33292015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3330
3331 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3332 removal.
3333 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3334 (struct raw_breakpoint) <size>: Remove.
3335 (struct raw_breakpoint) <kind>: Add.
3336 (bp_size): New function.
3337 (bp_opcode): Likewise.
3338 (find_raw_breakpoint_at): Adjust for kind.
3339 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3340 (remove_memory_breakpoint): Adjust for kind call bp_size.
3341 (set_raw_breakpoint_at): Adjust for kind.
3342 (set_breakpoint): Likewise.
3343 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3344 (delete_raw_breakpoint): Adjust for kind.
3345 (delete_breakpoint): Likewise.
3346 (find_gdb_breakpoint): Likewise.
3347 (set_gdb_breakpoint_1): Likewise.
3348 (set_gdb_breakpoint): Likewise.
3349 (delete_gdb_breakpoint_1): Likewise.
3350 (delete_gdb_breakpoint): Likewise.
3351 (uninsert_raw_breakpoint): Likewise.
3352 (reinsert_raw_breakpoint): Likewise.
3353 (set_breakpoint_data): Remove.
3354 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3355 (check_mem_read): Adjust for kind call bp_size.
3356 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3357 (clone_one_breakpoint): Adjust for kind.
3358 * mem-break.h (set_gdb_breakpoint): Likewise.
3359 (delete_gdb_breakpoint): Likewise.
3360 * server.c (process_serial_event): Likewise.
3361
dd373349
AT
33622015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3363
3364 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3365 (struct linux_target_ops) <breakpoint>: Remove.
3366 (struct linux_target_ops) <breakpoint_len>: Remove.
3367 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3368 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3369 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3370 (arm_sw_breakpoint_from_kind): New function.
3371 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3372 (struct linux_target_ops) <breakpoint>: Remove.
3373 (struct linux_target_ops) <breakpoint_len>: Remove.
3374 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3375 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3376 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3377 (struct linux_target_ops) <breakpoint>: Remove.
3378 (struct linux_target_ops) <breakpoint_len>: Remove.
3379 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3380 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3381 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3382 (struct linux_target_ops) <breakpoint>: Remove.
3383 (struct linux_target_ops) <breakpoint_len>: Remove.
3384 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3385 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3386 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3387 and sw_breakpoint_from_kind to increment the pc.
3388 (linux_breakpoint_kind_from_pc): New function.
3389 (linux_sw_breakpoint_from_kind): New function.
3390 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3391 (initialize_low): Call breakpoint_kind_from_pc and
3392 sw_breakpoint_from_kind to replace breakpoint_data/len.
3393 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3394 New field.
3395 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3396 * linux-m32r-low.c (m32r_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-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3402 (struct linux_target_ops) <breakpoint>: Remove.
3403 (struct linux_target_ops) <breakpoint_len>: Remove.
3404 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3405 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3406 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3407 (struct linux_target_ops) <breakpoint>: Remove.
3408 (struct linux_target_ops) <breakpoint_len>: Remove.
3409 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3410 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3411 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3412 (struct linux_target_ops) <breakpoint>: Remove.
3413 (struct linux_target_ops) <breakpoint_len>: Remove.
3414 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3415 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3416 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3417 (struct linux_target_ops) <breakpoint>: Remove.
3418 (struct linux_target_ops) <breakpoint_len>: Remove.
3419 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3420 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3421 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3422 (struct linux_target_ops) <breakpoint>: Remove.
3423 (struct linux_target_ops) <breakpoint_len>: Remove.
3424 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3425 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3426 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3427 (struct linux_target_ops) <breakpoint>: Remove.
3428 (struct linux_target_ops) <breakpoint_len>: Remove.
3429 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3430 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3431 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3432 (struct linux_target_ops) <breakpoint>: Remove.
3433 (struct linux_target_ops) <breakpoint_len>: Remove.
3434 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3435 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3436 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3437 (struct linux_target_ops) <breakpoint>: Remove.
3438 (struct linux_target_ops) <breakpoint_len>: Remove.
3439 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3440 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3441 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3442 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3443 (struct linux_target_ops) <breakpoint>: Remove.
3444 (struct linux_target_ops) <breakpoint_len>: Remove.
3445 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3446 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3447 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3448 (struct linux_target_ops) <breakpoint>: Remove.
3449 (struct linux_target_ops) <breakpoint_len>: Remove.
3450 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3451 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3452
4cd98a19
AT
34532015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3454
3455 * linux-cris-low.c (cris_get_pc): Remove void arg.
3456
774ee6d2
AR
34572015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3458
3459 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3460 variable name.
3461
833dcd29
AR
34622015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3463
3464 * inferiors.c (thread_pid_matches_callback): New function.
3465 (find_thread_process): New function.
3466 (remove_thread): Reset current_thread.
3467 (remove_process): Assert threads have been removed first.
3468
8d689ee5
YQ
34692015-10-15 Yao Qi <yao.qi@linaro.org>
3470
3471 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3472 if it is 3.
3473 (aarch64_remove_point): Likewise.
3474 * regcache.c (regcache_register_size): New function.
3475
1c2e1515
YQ
34762015-10-12 Yao Qi <yao.qi@linaro.org>
3477
3478 * linux-aarch64-low.c: Update all callers as emit_load_store
3479 is renamed to aarch64_emit_load_store.
3480
e1c587c3
YQ
34812015-10-12 Yao Qi <yao.qi@linaro.org>
3482
3483 * linux-aarch64-low.c: Update all callers of function renaming
3484 from emit_insn to aarch64_emit_insn.
3485
b6542f81
YQ
34862015-10-12 Yao Qi <yao.qi@linaro.org>
3487
3488 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3489 arch/aarch64-insn.h.
3490 (struct aarch64_memory_operand): Likewise.
3491 (ENCODE): Likewise.
3492 (emit_insn): Move to arch/aarch64-insn.c.
3493 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3494 (emit_load_store): Move to arch/aarch64-insn.c.
3495 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3496 (can_encode_int32): Remove.
3497
246994ce
YQ
34982015-10-12 Yao Qi <yao.qi@linaro.org>
3499
3500 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3501 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3502 (aarch64_relocate_instruction): Likewise.
3503 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3504 (struct aarch64_insn_visitor): Likewise.
3505
0badd99f
YQ
35062015-10-12 Yao Qi <yao.qi@linaro.org>
3507
3508 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3509 (struct aarch64_insn_visitor): New.
3510 (struct aarch64_insn_relocation_data): New.
3511 (aarch64_ftrace_insn_reloc_b): New function.
3512 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3513 (aarch64_ftrace_insn_reloc_cb): Likewise.
3514 (aarch64_ftrace_insn_reloc_tb): Likewise.
3515 (aarch64_ftrace_insn_reloc_adr): Likewise.
3516 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3517 (aarch64_ftrace_insn_reloc_others): Likewise.
3518 (visitor): New.
3519 (aarch64_relocate_instruction): Use visitor.
3520
dfaffe9d
YQ
35212015-10-12 Yao Qi <yao.qi@linaro.org>
3522
3523 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3524 int. Add argument buf.
3525 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3526 aarch64_relocate_instruction.
3527
70b439f0
YQ
35282015-10-12 Yao Qi <yao.qi@linaro.org>
3529
3530 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3531 argument insn. Remove local variable insn. Don't call
3532 target_read_uint32.
3533 (aarch64_install_fast_tracepoint_jump_pad): Call
3534 target_read_uint32.
3535
7781c06f
YQ
35362015-09-30 Yao Qi <yao.qi@linaro.org>
3537
3538 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3539 (emit_load_store_pair): Likewise.
3540
9a3c8263
SM
35412015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3542
3543 * dll.c (match_dll): Add cast(s).
3544 (unloaded_dll): Likewise.
3545 * linux-low.c (second_thread_of_pid_p): Likewise.
3546 (delete_lwp_callback): Likewise.
3547 (count_events_callback): Likewise.
3548 (select_event_lwp_callback): Likewise.
3549 (linux_set_resume_request): Likewise.
3550 * server.c (accumulate_file_name_length): Likewise.
3551 (emit_dll_description): Likewise.
3552 (handle_qxfer_threads_worker): Likewise.
3553 (visit_actioned_threads): Likewise.
3554 * thread-db.c (any_thread_of): Likewise.
3555 * tracepoint.c (same_process_p): Likewise.
3556 (match_blocktype): Likewise.
3557 (build_traceframe_info_xml): Likewise.
3558
224c3ddb
SM
35592015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3560
3561 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3562 assignment.
3563 (gdb_unparse_agent_expr): Likewise.
3564 * hostio.c (require_data): Likewise.
3565 (handle_pread): Likewise.
3566 * linux-low.c (disable_regset): Likewise.
3567 (fetch_register): Likewise.
3568 (store_register): Likewise.
3569 (get_dynamic): Likewise.
3570 (linux_qxfer_libraries_svr4): Likewise.
3571 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3572 (set_fast_tracepoint_jump): Likewise.
3573 (uninsert_fast_tracepoint_jumps_at): Likewise.
3574 (reinsert_fast_tracepoint_jumps_at): Likewise.
3575 (validate_inserted_breakpoint): Likewise.
3576 (clone_agent_expr): Likewise.
3577 * regcache.c (init_register_cache): Likewise.
3578 * remote-utils.c (putpkt_binary_1): Likewise.
3579 (decode_M_packet): Likewise.
3580 (decode_X_packet): Likewise.
3581 (look_up_one_symbol): Likewise.
3582 (relocate_instruction): Likewise.
3583 (monitor_output): Likewise.
3584 * server.c (handle_search_memory): Likewise.
3585 (handle_qxfer_exec_file): Likewise.
3586 (handle_qxfer_libraries): Likewise.
3587 (handle_qxfer): Likewise.
3588 (handle_query): Likewise.
3589 (handle_v_cont): Likewise.
3590 (handle_v_run): Likewise.
3591 (captured_main): Likewise.
3592 * target.c (write_inferior_memory): Likewise.
3593 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3594 * tracepoint.c (init_trace_buffer): Likewise.
3595 (add_tracepoint_action): Likewise.
3596 (add_traceframe): Likewise.
3597 (add_traceframe_block): Likewise.
3598 (cmd_qtdpsrc): Likewise.
3599 (cmd_qtdv): Likewise.
3600 (cmd_qtstatus): Likewise.
3601 (response_source): Likewise.
3602 (response_tsv): Likewise.
3603 (cmd_qtnotes): Likewise.
3604 (gdb_collect): Likewise.
3605 (initialize_tracepoint): Likewise.
3606
afbe19f8
PL
36072015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3608
3609 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3610 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3611 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3612 <NOP>: New.
3613 (enum aarch64_condition_codes): New enum.
3614 (w0): New static global.
3615 (fp): Likewise.
3616 (lr): Likewise.
3617 (struct aarch64_memory_operand) <type>: New
3618 MEMORY_OPERAND_POSTINDEX type.
3619 (postindex_memory_operand): New helper function.
3620 (emit_ret): New function.
3621 (emit_load_store_pair): New function, factored out of emit_stp
3622 with support for MEMORY_OPERAND_POSTINDEX.
3623 (emit_stp): Rewrite using emit_load_store_pair.
3624 (emit_ldp): New function.
3625 (emit_load_store): Likewise.
3626 (emit_ldr): Mention post-index instruction in comment.
3627 (emit_ldrh): New function.
3628 (emit_ldrb): New function.
3629 (emit_ldrsw): Mention post-index instruction in comment.
3630 (emit_str): Likewise.
3631 (emit_subs): New function.
3632 (emit_cmp): Likewise.
3633 (emit_and): Likewise.
3634 (emit_orr): Likewise.
3635 (emit_orn): Likewise.
3636 (emit_eor): Likewise.
3637 (emit_mvn): Likewise.
3638 (emit_lslv): Likewise.
3639 (emit_lsrv): Likewise.
3640 (emit_asrv): Likewise.
3641 (emit_mul): Likewise.
3642 (emit_sbfm): Likewise.
3643 (emit_sbfx): Likewise.
3644 (emit_ubfm): Likewise.
3645 (emit_ubfx): Likewise.
3646 (emit_csinc): Likewise.
3647 (emit_cset): Likewise.
3648 (emit_nop): Likewise.
3649 (emit_ops_insns): New helper function.
3650 (emit_pop): Likewise.
3651 (emit_push): Likewise.
3652 (aarch64_emit_prologue): New function.
3653 (aarch64_emit_epilogue): Likewise.
3654 (aarch64_emit_add): Likewise.
3655 (aarch64_emit_sub): Likewise.
3656 (aarch64_emit_mul): Likewise.
3657 (aarch64_emit_lsh): Likewise.
3658 (aarch64_emit_rsh_signed): Likewise.
3659 (aarch64_emit_rsh_unsigned): Likewise.
3660 (aarch64_emit_ext): Likewise.
3661 (aarch64_emit_log_not): Likewise.
3662 (aarch64_emit_bit_and): Likewise.
3663 (aarch64_emit_bit_or): Likewise.
3664 (aarch64_emit_bit_xor): Likewise.
3665 (aarch64_emit_bit_not): Likewise.
3666 (aarch64_emit_equal): Likewise.
3667 (aarch64_emit_less_signed): Likewise.
3668 (aarch64_emit_less_unsigned): Likewise.
3669 (aarch64_emit_ref): Likewise.
3670 (aarch64_emit_if_goto): Likewise.
3671 (aarch64_emit_goto): Likewise.
3672 (aarch64_write_goto_address): Likewise.
3673 (aarch64_emit_const): Likewise.
3674 (aarch64_emit_call): Likewise.
3675 (aarch64_emit_reg): Likewise.
3676 (aarch64_emit_pop): Likewise.
3677 (aarch64_emit_stack_flush): Likewise.
3678 (aarch64_emit_zero_ext): Likewise.
3679 (aarch64_emit_swap): Likewise.
3680 (aarch64_emit_stack_adjust): Likewise.
3681 (aarch64_emit_int_call_1): Likewise.
3682 (aarch64_emit_void_call_2): Likewise.
3683 (aarch64_emit_eq_goto): Likewise.
3684 (aarch64_emit_ne_goto): Likewise.
3685 (aarch64_emit_lt_goto): Likewise.
3686 (aarch64_emit_le_goto): Likewise.
3687 (aarch64_emit_gt_goto): Likewise.
3688 (aarch64_emit_ge_got): Likewise.
3689 (aarch64_emit_ops_impl): New static global variable.
3690 (aarch64_emit_ops): New target function, return
3691 &aarch64_emit_ops_impl.
3692 (struct linux_target_ops): Install it.
3693
bb903df0
PL
36942015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3695
3696 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3697 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3698 aarch64-ipa.o.
3699 * linux-aarch64-ipa.c: New file.
3700 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3701 and endian.h.
3702 (aarch64_get_thread_area): New target method.
3703 (extract_signed_bitfield): New helper function.
3704 (aarch64_decode_ldr_literal): New function.
3705 (enum aarch64_opcodes): New enum.
3706 (struct aarch64_register): New struct.
3707 (struct aarch64_operand): New struct.
3708 (x0): New static global.
3709 (x1): Likewise.
3710 (x2): Likewise.
3711 (x3): Likewise.
3712 (x4): Likewise.
3713 (w2): Likewise.
3714 (ip0): Likewise.
3715 (sp): Likewise.
3716 (xzr): Likewise.
3717 (aarch64_register): New helper function.
3718 (register_operand): Likewise.
3719 (immediate_operand): Likewise.
3720 (struct aarch64_memory_operand): New struct.
3721 (offset_memory_operand): New helper function.
3722 (preindex_memory_operand): Likewise.
3723 (enum aarch64_system_control_registers): New enum.
3724 (ENCODE): New macro.
3725 (emit_insn): New helper function.
3726 (emit_b): New function.
3727 (emit_bcond): Likewise.
3728 (emit_cb): Likewise.
3729 (emit_tb): Likewise.
3730 (emit_blr): Likewise.
3731 (emit_stp): Likewise.
3732 (emit_ldp_q_offset): Likewise.
3733 (emit_stp_q_offset): Likewise.
3734 (emit_load_store): Likewise.
3735 (emit_ldr): Likewise.
3736 (emit_ldrsw): Likewise.
3737 (emit_str): Likewise.
3738 (emit_ldaxr): Likewise.
3739 (emit_stxr): Likewise.
3740 (emit_stlr): Likewise.
3741 (emit_data_processing_reg): Likewise.
3742 (emit_data_processing): Likewise.
3743 (emit_add): Likewise.
3744 (emit_sub): Likewise.
3745 (emit_mov): Likewise.
3746 (emit_movk): Likewise.
3747 (emit_mov_addr): Likewise.
3748 (emit_mrs): Likewise.
3749 (emit_msr): Likewise.
3750 (emit_sevl): Likewise.
3751 (emit_wfe): Likewise.
3752 (append_insns): Likewise.
3753 (can_encode_int32_in): New helper function.
3754 (aarch64_relocate_instruction): New function.
3755 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3756 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3757 (struct linux_target_ops): Install aarch64_get_thread_area,
3758 aarch64_install_fast_tracepoint_jump_pad and
3759 aarch64_get_min_fast_tracepoint_insn_len.
3760
787749ea
PL
37612015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3762
3763 * Makefile.in (aarch64-insn.o): New rule.
3764 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3765
9812b2e6
YQ
37662015-09-21 Yao Qi <yao.qi@linaro.org>
3767
3768 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3769
18fe412b
YQ
37702015-09-21 Yao Qi <yao.qi@linaro.org>
3771
3772 * tracepoint.c (max_jump_pad_size): Remove.
3773
a0cc84cd
YQ
37742015-09-18 Yao Qi <yao.qi@linaro.org>
3775
3776 * linux-aarch64-low.c: Don't include sys/uio.h.
3777 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3778
d78908cf
WW
37792015-09-16 Wei-cheng Wang <cole945@gmail.com>
3780
3781 * tracepoint.c (eval_result_type): Change prototype.
3782 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3783
d57e0d50
PA
37842015-09-15 Pedro Alves <palves@redhat.com>
3785
3786 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3787 Check whether to report exec events instead of checking whether
3788 multiprocess is enabled.
3789
5a676acc
PA
37902015-09-15 Pedro Alves <palves@redhat.com>
3791
3792 PR remote/18965
3793 * remote-utils.c (prepare_resume_reply): Merge
3794 TARGET_WAITKIND_VFORK_DONE switch case with the
3795 TARGET_WAITKIND_FORKED case.
3796
7c5d0fad
YQ
37972015-09-15 Yao Qi <yao.qi@linaro.org>
3798
3799 * server.c (handle_query): Check string comparison using
3800 "else if" instead of "if".
3801
750ce8d1
YQ
38022015-09-15 Yao Qi <yao.qi@linaro.org>
3803
3804 * server.c (vCont_supported): New global variable.
3805 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3806 matches. Append ";vContSupported+" to own_buf.
3807 (handle_v_requests): Append ";s;S" to own_buf if target supports
3808 hardware single step or vCont_supported is false.
3809 (capture_main): Set vCont_supported to zero.
3810
70b90b91
YQ
38112015-09-15 Yao Qi <yao.qi@linaro.org>
3812
3813 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3814 it to ...
3815 (linux_supports_hardware_single_step): ... New function.
3816 (linux_target_ops): Update.
3817 * lynx-low.c (lynx_target_ops): Set field
3818 supports_hardware_single_step to target_can_do_hardware_single_step.
3819 * nto-low.c (nto_target_ops): Likewise.
3820 * spu-low.c (spu_target_ops): Likewise.
3821 * win32-low.c (win32_target_ops): Likewise.
3822 * target.c (target_can_do_hardware_single_step): New function.
3823 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3824 Remove. <supports_hardware_single_step>: New field.
3825 (target_supports_conditional_breakpoints): Remove.
3826 (target_supports_hardware_single_step): New macro.
3827 (target_can_do_hardware_single_step): Declare.
3828 * server.c (handle_query): Use target_supports_hardware_single_step
3829 instead of target_supports_conditional_breakpoints.
3830
ade90bde
YQ
38312015-09-15 Yao Qi <yao.qi@linaro.org>
3832
3833 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3834 function.
3835 (struct linux_target_ops the_low_target): Install
3836 aarch64_linux_siginfo_fixup.
3837
94585166
DB
38382015-09-11 Don Breazeal <donb@codesourcery.com>
3839 Luis Machado <lgustavo@codesourcery.com>
3840
3841 * linux-low.c (linux_mourn): Static declaration.
3842 (linux_arch_setup): Move in front of
3843 handle_extended_wait.
3844 (linux_arch_setup_thread): New function.
3845 (handle_extended_wait): Handle exec events. Call
3846 linux_arch_setup_thread. Make event_lwp argument a
3847 pointer-to-a-pointer.
3848 (check_zombie_leaders): Do not check stopped threads.
3849 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3850 (linux_low_filter_event): Add lwp and thread for exec'ing
3851 non-leader thread if leader thread has been deleted.
3852 Refactor code into linux_arch_setup_thread and call it.
3853 Pass child lwp pointer by reference to handle_extended_wait.
3854 (linux_wait_for_event_filtered): Update comment.
3855 (linux_wait_1): Prevent clobbering exec event status.
3856 (linux_supports_exec_events): New function.
3857 (linux_target_ops) <supports_exec_events>: Initialize new member.
3858 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3859 new member.
3860 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3861 * server.c (report_exec_events): New global variable.
3862 (handle_query): Handle qSupported query for exec-events feature.
3863 (captured_main): Initialize report_exec_events.
3864 * server.h (report_exec_events): Declare new global variable.
3865 * target.h (struct target_ops) <supports_exec_events>: New
3866 member.
3867 (target_supports_exec_events): New macro.
3868 * win32-low.c (win32_target_ops) <supports_exec_events>:
3869 Initialize new member.
3870
0568462b
MM
38712015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3872
3873 * linux-low.c (linux_low_enable_btrace): Remove.
3874 (linux_target_ops): Replace linux_low_enable_btrace with
3875 linux_enable_btrace.
3876
39edd165
YQ
38772015-09-03 Yao Qi <yao.qi@linaro.org>
3878
3879 * linux-aarch64-low.c (aarch64_insert_point): Call
3880 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3881 returns true.
3882
1db33b5a
UW
38832015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3884
3885 * linux-low.c (check_stopped_by_breakpoint): Use
3886 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3887
ab290430
PA
38882015-08-27 Pedro Alves <palves@redhat.com>
3889
3890 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3891
8d749320
SM
38922015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3893
6711b7f8
SM
3894 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3895 the XNEW-family equivalent.
8d749320
SM
3896 (compile_bytecodes): Likewise.
3897 * dll.c (loaded_dll): Likewise.
3898 * event-loop.c (append_callback_event): Likewise.
3899 (create_file_handler): Likewise.
3900 (create_file_event): Likewise.
3901 * hostio.c (handle_open): Likewise.
3902 * inferiors.c (add_thread): Likewise.
3903 (add_process): Likewise.
3904 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3905 * linux-arm-low.c (arm_new_process): Likewise.
3906 (arm_new_thread): Likewise.
3907 * linux-low.c (add_to_pid_list): Likewise.
3908 (linux_add_process): Likewise.
3909 (handle_extended_wait): Likewise.
3910 (add_lwp): Likewise.
3911 (enqueue_one_deferred_signal): Likewise.
3912 (enqueue_pending_signal): Likewise.
3913 (linux_resume_one_lwp_throw): Likewise.
3914 (linux_resume_one_thread): Likewise.
3915 (linux_read_memory): Likewise.
3916 (linux_write_memory): Likewise.
3917 * linux-mips-low.c (mips_linux_new_process): Likewise.
3918 (mips_linux_new_thread): Likewise.
3919 (mips_add_watchpoint): Likewise.
3920 * linux-x86-low.c (initialize_low_arch): Likewise.
3921 * lynx-low.c (lynx_add_process): Likewise.
3922 * mem-break.c (set_raw_breakpoint_at): Likewise.
3923 (set_breakpoint): Likewise.
3924 (add_condition_to_breakpoint): Likewise.
3925 (add_commands_to_breakpoint): Likewise.
3926 (clone_agent_expr): Likewise.
3927 (clone_one_breakpoint): Likewise.
3928 * regcache.c (new_register_cache): Likewise.
3929 * remote-utils.c (look_up_one_symbol): Likewise.
3930 * server.c (queue_stop_reply): Likewise.
3931 (start_inferior): Likewise.
3932 (queue_stop_reply_callback): Likewise.
3933 (handle_target_event): Likewise.
3934 * spu-low.c (fetch_ppc_memory): Likewise.
3935 (store_ppc_memory): Likewise.
3936 * target.c (set_target_ops): Likewise.
3937 * thread-db.c (thread_db_load_search): Likewise.
3938 (try_thread_db_load_1): Likewise.
3939 * tracepoint.c (add_tracepoint): Likewise.
3940 (add_tracepoint_action): Likewise.
3941 (create_trace_state_variable): Likewise.
3942 (cmd_qtdpsrc): Likewise.
3943 (cmd_qtro): Likewise.
3944 (add_while_stepping_state): Likewise.
3945 * win32-low.c (child_add_thread): Likewise.
3946 (get_image_name): Likewise.
3947
ed8b7b42
YQ
39482015-08-25 Yao Qi <yao.qi@linaro.org>
3949
3950 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3951
db3cb7cb
YQ
39522015-08-25 Yao Qi <yao.qi@linaro.org>
3953
3954 * Makefile.in (aarch64-linux.o): New rule.
3955 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3956 srv_tgtobj.
3957 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3958 (aarch64_init_debug_reg_state): Make it extern.
3959 (aarch64_linux_prepare_to_resume): Remove.
3960
f6011a1c
YQ
39612015-08-25 Yao Qi <yao.qi@linaro.org>
3962
3963 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3964 lwp_arch_private_info and ptid_of_lwp.
3965
88e2cf7e
YQ
39662015-08-25 Yao Qi <yao.qi@linaro.org>
3967
3968 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3969 Find proc_info by find_process_pid. All callers updated.
3970
5e35436e
YQ
39712015-08-25 Yao Qi <yao.qi@linaro.org>
3972
3973 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3974 Remove.
3975 (debug_reg_change_callback): Remove.
3976 (aarch64_notify_debug_reg_change): Remove.
3977
4a8a7965
YQ
39782015-08-25 Yao Qi <yao.qi@linaro.org>
3979
3980 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3981 Call current_lwp_ptid.
3982
32a271ee
YQ
39832015-08-25 Yao Qi <yao.qi@linaro.org>
3984
3985 * linux-aarch64-low.c (debug_reg_change_callback): Use
3986 debug_printf.
3987
0d51c8d7
YQ
39882015-08-25 Yao Qi <yao.qi@linaro.org>
3989
3990 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3991
31a43dd5
YQ
39922015-08-25 Yao Qi <yao.qi@linaro.org>
3993
3994 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3995
8ee52567
YQ
39962015-08-25 Yao Qi <yao.qi@linaro.org>
3997
3998 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3999 the code.
4000
ff3f0f45
YQ
40012015-08-25 Yao Qi <yao.qi@linaro.org>
4002
4003 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4004 Remove.
4005 (debug_reg_change_callback): Remove argument entry and add argument
4006 lwp. Remove local variable thread. Don't print thread id in the
4007 debugging output. Don't check whether pid of thread equals to pid.
4008 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4009 iterate_over_lwps instead find_inferior.
4010
3d40fbb5
PA
40112015-08-24 Pedro Alves <palves@redhat.com>
4012
4013 * inferiors.c (get_first_process): New function.
4014 * inferiors.h (get_first_process): New declaration.
4015 * remote-utils.c (read_ptid): Default to the first process in the
4016 list, instead of to the current thread's process.
4017
438e1e42
PA
40182015-08-24 Pedro Alves <palves@redhat.com>
4019
4020 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4021 * event-loop.c: Likewise.
4022 * remote-utils.c: Likewise.
4023 * tracepoint.c: Likewise.
4024
a8c6d4fc
PA
40252015-08-24 Pedro Alves <palves@redhat.com>
4026
4027 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4028 ptid_get_lwp.
4029
99b0bb12
PA
40302015-08-21 Pedro Alves <palves@redhat.com>
4031
4032 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4033 instead of literal 1.
4034
f8904751
PA
40352015-08-21 Pedro Alves <palves@redhat.com>
4036
4037 * tdesc.c (default_description): Explicitly zero-initialize.
4038
465a859e
PA
40392015-08-21 Pedro Alves <palves@redhat.com>
4040
4041 PR gdb/18749
4042 * inferiors.c (remove_thread): Discard any pending stop reply for
4043 this thread.
4044 * server.c (remove_all_on_match_pid): Rename to ...
4045 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4046 instead of a pid.
4047 (discard_queued_stop_replies): Change parameter to a ptid. Now
4048 extern.
4049 (handle_v_kill, kill_inferior_callback, captured_main)
4050 (process_serial_event): Adjust.
4051 * server.h (discard_queued_stop_replies): Declare.
4052
f0db101d
PA
40532015-08-21 Pedro Alves <palves@redhat.com>
4054
4055 * linux-low.c (wait_for_sigstop): Always switch to no thread
4056 selected if the previously current thread dies.
4057 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4058 process instead of the current thread's.
4059 * remote-utils.c (input_interrupt): Don't check if there's no
4060 current thread.
4061 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4062 current thread to the general thread fails, error out.
4063 (handle_qxfer_auxv, handle_qxfer_libraries)
4064 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4065 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4066 (handle_query): Check if there's a thread selected instead of
4067 checking whether there's any thread in the thread list.
4068 (handle_qxfer_threads, handle_qxfer_btrace)
4069 (handle_qxfer_btrace_conf): Don't error out early if there's no
4070 thread in the thread list.
4071 (handle_v_cont, myresume): Don't set the current thread to the
4072 continue thread.
4073 (process_serial_event) <Hg handling>: Also set thread_id if the
4074 previous general thread is still alive.
4075 (process_serial_event) <g/G handling>: If setting the current
4076 thread to the general thread fails, error out.
4077 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4078 thread's lwp instead of the current thread's.
4079 * target.c (set_desired_thread): If the desired thread was not
4080 found, leave the current thread pointing to NULL. Return an int
4081 (boolean) indicating success.
4082 * target.h (set_desired_thread): Change return type to int.
4083
40045d91
MF
40842015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4085
4086 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4087 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4088 #includes.
4089 (ps_get_thread_area): New function.
4090
45face3b
GB
40912015-08-19 Gary Benson <gbenson@redhat.com>
4092
4093 * hostio.c (handle_pread): Do not attempt to read more data
4094 than hostio_reply_with_data can fit in a packet.
4095
16d5f642
JB
40962015-08-18 Joel Brobecker <brobecker@adacore.com>
4097
4098 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4099
a738da3a
MF
41002015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4101
4102 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4103
33ebda9d
PA
41042015-08-06 Pedro Alves <palves@redhat.com>
4105
4106 * tracepoint.c (expr_eval_result): Now an int.
4107
a44892be
PA
41082015-08-06 Pedro Alves <palves@redhat.com>
4109
4110 * gdbthread.h (struct regcache): Forward declare.
4111 (struct thread_info) <regcache_data>: Now a struct regcache
4112 pointer.
4113 * inferiors.c (inferior_regcache_data)
4114 (set_inferior_regcache_data): Now work with struct regcache
4115 pointers.
4116 * inferiors.h (struct regcache): Forward declare.
4117 (inferior_regcache_data, set_inferior_regcache_data): Now work
4118 with struct regcache pointers.
4119 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4120 (free_register_cache_thread): Remove struct regcache pointer
4121 casts.
4122
608a1e46
PA
41232015-08-06 Pedro Alves <palves@redhat.com>
4124
4125 * server.c (captured_main): On error, print the exception message
4126 to stderr, and if run_once is set, throw a quit.
4127
f0ce0d3a
PA
41282015-08-06 Pedro Alves <palves@redhat.com>
4129
4130 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4131 the current thread.
4132
bf47e248
PA
41332015-08-06 Pedro Alves <palves@redhat.com>
4134
4135 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4136 reading beyond the passed in buffer length.
4137
b6b9ffcc
PL
41382015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4139
4140 * tracepoint.c (symbol_list) <required>: Remove.
4141
863d01bd
PA
41422015-08-06 Pedro Alves <palves@redhat.com>
4143
4144 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4145 count if stopping and suspending threads.
4146 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4147 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4148 (linux_detach): Complete an ongoing step-over.
4149 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4150 throughout.
4151 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4152 (linux_wait_1): If passing a signal to the inferior after
4153 finishing a step-over, unsuspend and re-resume all lwps. If we
4154 see a single-step event but the thread should be continuing, don't
4155 pass the trap to gdb.
4156 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4157 internal_error instead of gdb_assert.
4158 (enqueue_pending_signal): New function.
4159 (check_ptrace_stopped_lwp_gone): Add debug output.
4160 (start_step_over): Use internal_error instead of gdb_assert.
4161 (complete_ongoing_step_over): New function.
4162 (linux_resume_one_thread): Don't resume a suspended thread.
4163 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4164 it stepping.
4165
00db26fa
PA
41662015-08-06 Pedro Alves <palves@redhat.com>
4167
4168 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4169 (linux_thread_alive): Use lwp_is_marked_dead.
4170 (extended_event_reported): Delete.
4171 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4172 instead of extended_event_reported.
4173 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4174 as well.
4175 (lwp_is_marked_dead): New function.
4176 (lwp_running): Use lwp_is_marked_dead.
4177 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4178 comment.
4179
ad071a30
PA
41802015-08-06 Pedro Alves <palves@redhat.com>
4181
4182 * linux-low.c (linux_wait_1): Move fork event output out of the
4183 !report_to_gdb check. Pass event_child->waitstatus to
4184 target_waitstatus_to_string instead of ourstatus.
4185
524b57e6
YQ
41862015-08-04 Yao Qi <yao.qi@linaro.org>
4187
4188 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4189 if current_thread is 32 bit.
4190
6085d6f6
YQ
41912015-08-04 Yao Qi <yao.qi@linaro.org>
4192
4193 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4194 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4195 * server.c (extended_protocol): Remove "static".
4196 * server.h (extended_protocol): Declare it.
4197
8a7e4587
YQ
41982015-08-04 Yao Qi <yao.qi@linaro.org>
4199
4200 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4201 both aarch64 and aarch32.
4202 (aarch64_set_pc): Likewise.
4203
3b53ae99
YQ
42042015-08-04 Yao Qi <yao.qi@linaro.org>
4205
4206 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4207 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4208 arm-with-neon.xml to srv_xmlfiles.
4209 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4210 (is_64bit_tdesc): New function.
4211 (aarch64_linux_read_description): New function.
4212 (aarch64_arch_setup): Call aarch64_linux_read_description.
4213 (regs_info): Rename to regs_info_aarch64.
4214 (aarch64_regs_info): Return right regs_info.
4215 (initialize_low_arch): Call initialize_low_arch_aarch32.
4216
bd9e6534
YQ
42172015-08-04 Yao Qi <yao.qi@linaro.org>
4218
4219 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4220 * linux-aarch32-low.c: New file.
4221 * linux-aarch32-low.h: New file.
4222 * linux-arm-low.c (arm_fill_gregset): Move it to
4223 linux-aarch32-low.c.
4224 (arm_store_gregset): Likewise.
4225 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4226 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4227 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4228 (regs_info): Rename to regs_info_arm.
4229 (arm_regs_info): Return regs_info_aarch32 if
4230 have_ptrace_getregset is 1 and target description is
4231 arm_with_neon or arm_with_vfpv3.
4232 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4233 Call initialize_low_arch_aarch32 instead.
4234
ded48a5e
YQ
42352015-08-04 Yao Qi <yao.qi@linaro.org>
4236
4237 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4238 * linux-low.c: ... here.
4239 * linux-low.h (have_ptrace_getregset): Declare it.
4240
96e9210f
PA
42412015-08-04 Pedro Alves <palves@redhat.com>
4242
4243 * thread-db.c (struct thread_db): Use new typedefs.
4244 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4245 CHK calls.
4246 (disable_thread_event_reporting): Cast result of dlsym to
4247 destination function pointer type.
4248 (thread_db_mourn): Use td_ta_delete_ftype.
4249
af60a1ef
SL
42502015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4251
4252 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4253 arch variant.
4254 (CDX_BREAKPOINT): Define for R2.
4255 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4256 (the_low_target): Add comments.
4257
e8b41681
YQ
42582015-07-30 Yao Qi <yao.qi@linaro.org>
4259
4260 * linux-arm-low.c (arm_hwcap): Remove it.
4261 (arm_read_description): New local variable arm_hwcap. Don't
4262 set arm_hwcap to zero.
4263
89abb039
YQ
42642015-07-30 Yao Qi <yao.qi@linaro.org>
4265
4266 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4267 Use regcache->tdesc instead.
4268 (arm_store_wmmxregset): Likewise.
4269 (arm_fill_vfpregset): Likewise.
4270 (arm_store_vfpregset): Likewise.
4271
deca266c
YQ
42722015-07-30 Yao Qi <yao.qi@linaro.org>
4273
4274 * linux-arm-low.c: Include arch/arm.h.
4275 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4276 (arm_store_gregset): Likewise.
4277
aa58a496
SM
42782015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4279
4280 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4281 ptrace's 4th parameter.
4282
50904b25
YQ
42832015-07-27 Yao Qi <yao.qi@linaro.org>
4284
4285 * configure.srv (case aarch64*-*-linux*): Don't set
4286 srv_linux_usrregs.
4287
5826e159
PA
42882015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4289
4290 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4291 sys/ptrace.h.
4292 * linux-arm-low.c: Likewise.
4293 * linux-cris-low.c: Likewise.
4294 * linux-crisv32-low.c: Likewise.
4295 * linux-low.c: Likewise.
4296 * linux-m68k-low.c: Likewise.
4297 * linux-mips-low.c: Likewise.
4298 * linux-nios2-low.c: Likewise.
4299 * linux-s390-low.c: Likewise.
4300 * linux-sparc-low.c: Likewise.
4301 * linux-tic6x-low.c: Likewise.
4302 * linux-tile-low.c: Likewise.
4303 * linux-x86-low.c: Likewise.
4304
54019719
PA
43052015-07-24 Pedro Alves <palves@redhat.com>
4306
4307 * config.in: Regenerate.
4308 * configure: Regenerate.
4309
eb7aa561
PA
43102015-07-24 Pedro Alves <palves@redhat.com>
4311
4312 * acinclude.m4: Include ../ptrace.m4.
4313 * configure.ac: Call GDB_AC_PTRACE.
4314 * config.in, configure: Regenerate.
4315
55d7b841
YQ
43162015-07-24 Yao Qi <yao.qi@linaro.org>
4317
4318 * linux-low.c (linux_create_inferior): Remove setting to
4319 proc->priv->new_inferior.
4320 (linux_attach): Likewise.
4321 (linux_low_filter_event): Likewise.
4322 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4323
c06cbd92
YQ
43242015-07-24 Yao Qi <yao.qi@linaro.org>
4325
4326 * linux-low.c (linux_arch_setup): New function.
4327 (linux_low_filter_event): If proc->tdesc is NULL and
4328 proc->attached is true, call the_low_target.arch_setup.
4329 Otherwise, keep status pending, and return.
4330 (linux_resume_one_lwp_throw): Don't call get_pc if
4331 thread->while_stepping isn't NULL. Don't call
4332 get_thread_regcache if proc->tdesc is NULL.
4333 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4334 (linux_target_ops): Install arch_setup.
4335 * server.c (start_inferior): Call the_target->arch_setup.
4336 * target.h (struct target_ops) <arch_setup>: New field.
4337 (target_arch_setup): New marco.
4338 * lynx-low.c (lynx_target_ops): Update.
4339 * nto-low.c (nto_target_ops): Update.
4340 * spu-low.c (spu_target_ops): Update.
4341 * win32-low.c (win32_target_ops): Update.
4342
5ae3ebba
YQ
43432015-07-24 Yao Qi <yao.qi@linaro.org>
4344
4345 * linux-low.c (linux_add_process): Don't set
4346 proc->priv->new_inferior.
4347 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4348 (linux_attach): Likewise.
4349
eb97750b
YQ
43502015-07-24 Yao Qi <yao.qi@linaro.org>
4351
4352 * server.c (start_inferior): Code refactor.
4353
51aee833
YQ
43542015-07-24 Yao Qi <yao.qi@linaro.org>
4355
4356 * server.c (process_serial_event): Set general_thread.
4357
af1b22f3
YQ
43582015-07-21 Yao Qi <yao.qi@linaro.org>
4359
4360 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4361 aarch64_linux_get_debug_reg_capacity.
4362
554717a3
YQ
43632015-07-17 Yao Qi <yao.qi@linaro.org>
4364
4365 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4366 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4367 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4368 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4369 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4370 (AARCH64_HWP_ALIGNMENT): Likewise.
4371 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4372 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4373 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4374 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4375 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4376 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4377 (struct aarch64_debug_reg_state): Likewise.
4378 (struct arch_lwp_info): Likewise.
4379 (aarch64_align_watchpoint): Likewise.
4380 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4381 (aarch64_watchpoint_length): Likewise.
4382 (aarch64_point_encode_ctrl_reg): Likewise
4383 (aarch64_point_is_aligned): Likewise.
4384 (aarch64_align_watchpoint): Likewise.
4385 (aarch64_linux_set_debug_regs):
4386 (aarch64_dr_state_insert_one_point): Likewise.
4387 (aarch64_dr_state_remove_one_point): Likewise.
4388 (aarch64_handle_breakpoint): Likewise.
4389 (aarch64_handle_aligned_watchpoint): Likewise.
4390 (aarch64_handle_unaligned_watchpoint): Likewise.
4391 (aarch64_handle_watchpoint): Likewise.
4392
c67ca4de
YQ
43932015-07-17 Yao Qi <yao.qi@linaro.org>
4394
4395 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4396 and don't aarch64_get_debug_reg_state. All callers update.
4397 (aarch64_handle_aligned_watchpoint): Likewise.
4398 (aarch64_handle_unaligned_watchpoint): Likewise.
4399 (aarch64_handle_watchpoint): Likewise.
4400 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4401 (aarch64_remove_point): Likewise.
4402
25abf979
YQ
44032015-07-17 Yao Qi <yao.qi@linaro.org>
4404
4405 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4406 debug_printf.
4407 (aarch64_handle_unaligned_watchpoint): Likewise.
4408
db1ff28b
JK
44092015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4410
4411 Revert the previous 3 commits:
4412 Move gdb_regex* to common/
4413 Move linux_find_memory_regions_full & co.
4414 gdbserver build-id attribute generator
4415
700ca40f
JK
44162015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4417 Jan Kratochvil <jan.kratochvil@redhat.com>
4418
4419 gdbserver build-id attribute generator.
4420 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4421 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4422 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4423 (find_phdr): New.
4424 (get_dynamic): Use find_pdhr to traverse program headers.
4425 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4426 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4427 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4428 (get_hex_build_id): New.
4429 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4430 to reply XML document.
4431
9904185c
JK
44322015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4433 Jan Kratochvil <jan.kratochvil@redhat.com>
4434
4435 * target.c: Include target/target-utils.h and fcntl.h.
4436 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4437 (target_fileio_read_stralloc): New functions.
4438
6e5b4429
JK
44392015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4440
4441 * Makefile.in (OBS): Add gdb_regex.o.
4442 (gdb_regex.o): New.
4443 * config.in: Rebuilt.
4444 * configure: Rebuilt.
4445
ddc98fbf
JK
44462015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4447 Jan Kratochvil <jan.kratochvil@redhat.com>
4448
4449 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4450 * Makefile.in (OBS): Add target-utils.o.
4451 (linux-maps.o, target-utils.o): New.
4452 * configure.srv (srv_linux_obj): Add linux-maps.o.
4453
e57bb7a0
PL
44542015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4455
4456 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4457 function, return 1.
4458 (the_low_target): Install it.
4459
586b02a9
PA
44602015-07-14 Pedro Alves <palves@redhat.com>
4461
4462 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4463 Instead, ignore ECHILD, and throw an error for other errnos.
4464
58c1b36c
PA
44652015-07-10 Pedro Alves <palves@redhat.com>
4466
4467 * event-loop.c (struct callback_event) <data>: Change type to
4468 gdb_client_data instance instead of gdb_client_data pointer.
4469 (append_callback_event): Adjust.
4470
421530db
PL
44712015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4472
4473 * linux-aarch64-low.c: Add comments for each linux_target_ops
4474 method. Remove comments already covered in target_ops and
4475 linux_target_ops definitions.
4476 (the_low_target): Add comments for each unimplemented method.
4477
c2d65f38
YQ
44782015-07-09 Yao Qi <yao.qi@linaro.org>
4479
4480 * linux-aarch64-low.c (aarch64_regmap): Remove.
4481 (aarch64_usrregs_info): Remove.
4482 (regs_info): Set field usrregs to NULL.
4483
b20a6524
MM
44842015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4485
4486 * linux-low.c: Include "rsp-low.h"
4487 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4488 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4489 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4490 (handle_btrace_enable_pt): New.
4491 (handle_btrace_general_set): Support "pt".
4492 (handle_btrace_conf_general_set): Support "pt:size".
4493
96c97461
PL
44942015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4495
4496 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4497 Z_PACKET_SW_BP.
4498
37d66942
PL
44992015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4500
4501 * linux-aarch64-low.c: Remove comment about endianness.
4502 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4503 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4504 memcmp.
4505
dc06243f
GB
45062015-06-24 Gary Benson <gbenson@redhat.com>
4507
4508 * linux-i386-ipa.c (stdint.h): Do not include.
4509 * lynx-i386-low.c (stdint.h): Likewise.
4510 * lynx-ppc-low.c (stdint.h): Likewise.
4511 * mem-break.c (stdint.h): Likewise.
4512 * thread-db.c (stdint.h): Likewise.
4513 * tracepoint.c (stdint.h): Likewise.
4514 * win32-low.c (stdint.h): Likewise.
4515
124e13d9
SM
45162015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4517
4518 * server.c (write_qxfer_response): Update call to
4519 remote_escape_output.
4520
909c2cda
JK
45212015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4522 Jan Kratochvil <jan.kratochvil@redhat.com>
4523
4524 Merge multiple hex conversions.
4525 * gdbreplay.c (tohex): Rename to 'fromhex'.
4526 (logchar): Use fromhex.
4527
24c05f46
JK
45282015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4529
4530 * server.c (handle_qxfer_libraries): Set `version' attribute for
4531 <library-list>.
4532
14d2069a
GB
45332015-06-10 Gary Benson <gbenson@redhat.com>
4534
4535 * target.h (struct target_ops) <multifs_open>: New field.
4536 <multifs_unlink>: Likewise.
4537 <multifs_readlink>: Likewise.
4538 * linux-low.c (nat/linux-namespaces.h): New include.
4539 (linux_target_ops): Initialize the_target->multifs_open,
4540 the_target->multifs_unlink and the_target->multifs_readlink.
4541 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4542 * hostio.c (hostio_fs_pid): New static variable.
4543 (hostio_handle_new_gdb_connection): New function.
4544 (handle_setfs): Likewise.
4545 (handle_open): Use the_target->multifs_open as appropriate.
4546 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4547 (handle_readlink): Use the_target->multifs_readlink as
4548 appropriate.
4549 (handle_vFile): Handle vFile:setfs packets.
4550 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4551 after target_handle_new_gdb_connection.
4552
4b8b5e72
GB
45532015-06-10 Gary Benson <gbenson@redhat.com>
4554
4555 * configure.ac (AC_CHECK_FUNCS): Add setns.
4556 * config.in: Regenerate.
4557 * configure: Likewise.
4558 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4559 (linux-namespaces.o): New rule.
4560 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4561
3ac2e371
GB
45622015-06-09 Gary Benson <gbenson@redhat.com>
4563
4564 * hostio.c (handle_open): Process mode argument with
4565 fileio_to_host_mode.
4566
ca9b78ce
YQ
45672015-06-01 Yao Qi <yao.qi@linaro.org>
4568
4569 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4570 * linux-x86-low.c: Likewise.
4571
bfacd19d
DB
45722015-05-28 Don Breazeal <donb@codesourcery.com>
4573
4574 * linux-low.c (handle_extended_wait): Initialize
4575 thread_info.last_resume_kind for new fork children.
4576
452003ef
PA
45772015-05-15 Pedro Alves <palves@redhat.com>
4578
4579 * target.h (target_handle_new_gdb_connection): Rewrite using if
4580 wrapped in do/while.
4581
1041a03c
JB
45822015-05-14 Joel Brobecker <brobecker@adacore.com>
4583
4584 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4585 * configure, config.in: Regenerate.
4586 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4587 Declare typedef.
4588
c269dbdb
DB
45892015-05-12 Don Breazeal <donb@codesourcery.com>
4590
4591 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4592 PTRACE_EVENT_VFORK_DONE.
4593 (linux_low_ptrace_options, extended_event_reported): Add vfork
4594 events.
4595 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4596 and "vforkdone" for RSP 'T' Stop Reply Packet.
4597 * server.h (report_vfork_events): Declare
4598 global variable.
4599
3a8a0396
DB
46002015-05-12 Don Breazeal <donb@codesourcery.com>
4601
4602 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4603 (the_low_target) <new_fork>: Initialize new member.
4604 * linux-arm-low.c (arm_new_fork): New function.
4605 (the_low_target) <new_fork>: Initialize new member.
4606 * linux-low.c (handle_extended_wait): Call new target function
4607 new_fork.
4608 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4609 * linux-mips-low.c (mips_add_watchpoint): New function
4610 extracted from mips_insert_point.
4611 (the_low_target) <new_fork>: Initialize new member.
4612 (mips_linux_new_fork): New function.
4613 (mips_insert_point): Call mips_add_watchpoint.
4614 * linux-x86-low.c (x86_linux_new_fork): New function.
4615 (the_low_target) <new_fork>: Initialize new member.
4616
de0d863e
DB
46172015-05-12 Don Breazeal <donb@codesourcery.com>
4618
4619 * linux-low.c (handle_extended_wait): Implement return value,
4620 rename argument 'event_child' to 'event_lwp', handle
4621 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4622 (linux_low_ptrace_options): New function.
4623 (linux_low_filter_event): Call linux_low_ptrace_options,
4624 use different argument fo linux_enable_event_reporting,
4625 use return value from handle_extended_wait.
4626 (extended_event_reported): New function.
4627 (linux_wait_1): Call extended_event_reported and set
4628 status to report fork events.
4629 (linux_write_memory): Add pid to debug message.
4630 (reset_lwp_ptrace_options_callback): New function.
4631 (linux_handle_new_gdb_connection): New function.
4632 (linux_target_ops): Initialize new structure member.
4633 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4634 * lynx-low.c: Initialize new structure member.
4635 * remote-utils.c (prepare_resume_reply): Implement stop reason
4636 "fork" for "T" stop message.
4637 * server.c (handle_query): Call handle_new_gdb_connection.
4638 * server.h (report_fork_events): Declare global flag.
4639 * target.h (struct target_ops) <handle_new_gdb_connection>:
4640 New member.
4641 (target_handle_new_gdb_connection): New macro.
4642 * win32-low.c: Initialize new structure member.
4643
ddcbc397
DB
46442015-05-12 Don Breazeal <donb@codesourcery.com>
4645
4646 * mem-break.c (APPEND_TO_LIST): Define macro.
4647 (clone_agent_expr): New function.
4648 (clone_one_breakpoint): New function.
4649 (clone_all_breakpoints): New function.
4650 * mem-break.h: Declare new functions.
4651
89245bc0
DB
46522015-05-12 Don Breazeal <donb@codesourcery.com>
4653
4654 * linux-low.c (linux_supports_fork_events): New function.
4655 (linux_supports_vfork_events): New function.
4656 (linux_target_ops): Initialize new structure members.
4657 (initialize_low): Call linux_check_ptrace_features.
4658 * lynx-low.c (lynx_target_ops): Initialize new structure
4659 members.
4660 * server.c (report_fork_events, report_vfork_events):
4661 New global flags.
4662 (handle_query): Add new features to qSupported packet and
4663 response.
4664 (captured_main): Initialize new global variables.
4665 * target.h (struct target_ops) <supports_fork_events>:
4666 New member.
4667 <supports_vfork_events>: New member.
4668 (target_supports_fork_events): New macro.
4669 (target_supports_vfork_events): New macro.
4670 * win32-low.c (win32_target_ops): Initialize new structure
4671 members.
4672
835205d0
GB
46732015-05-12 Gary Benson <gbenson@redhat.com>
4674
4675 * server.c (handle_qxfer_exec_file): Use current process
4676 if annex is empty.
4677
21e94bd9
SL
46782015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4679
4680 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4681 Remove HAVE_PTRACE_GETREGS conditionals.
4682 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4683 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4684
45614f15
YQ
46852015-05-08 Yao Qi <yao.qi@linaro.org>
4686
4687 * linux-low.c (linux_supports_conditional_breakpoints): New
4688 function.
4689 (linux_target_ops): Install new target method.
4690 * lynx-low.c (lynx_target_ops): Install NULL hook for
4691 supports_conditional_breakpoints.
4692 * nto-low.c (nto_target_ops): Likewise.
4693 * spu-low.c (spu_target_ops): Likewise.
4694 * win32-low.c (win32_target_ops): Likewise.
4695 * server.c (handle_query): Check
4696 target_supports_conditional_breakpoints.
4697 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4698 New field.
4699 (target_supports_conditional_breakpoints): New macro.
4700
80ad801e
PA
47012015-05-06 Pedro Alves <palves@redhat.com>
4702
4703 PR server/18081
4704 * server.c (start_inferior): If the process exits, mourn it.
4705
819843c7
GB
47062015-04-21 Gary Benson <gbenson@redhat.com>
4707
4708 * hostio.c (fileio_open_flags_to_host): Factored out to
4709 fileio_to_host_openflags in common/fileio.c. Single use
4710 updated.
4711
a2d5a9d7
MF
47122015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4713
4714 * linux-xtensa-low.c (xtensa_fill_gregset)
4715 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4716 XCHAL_HAVE_LOOP.
4717
deb44829
MF
47182015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4719
4720 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4721 (regs_info): Replace usrregs pointer with NULL.
4722
e57f1de3
GB
47232015-04-17 Gary Benson <gbenson@redhat.com>
4724
4725 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4726 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4727 * server.c (handle_qxfer_exec_file): New function.
4728 (qxfer_packets): Add exec-file entry.
4729 (handle_query): Report qXfer:exec-file:read as supported packet.
4730
62828379
RN
47312015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4732
4733 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4734
b88bb450
GB
47352015-04-09 Gary Benson <gbenson@redhat.com>
4736
4737 * hostio-errno.c (errno_to_fileio_error): Remove function.
4738 Update caller to use remote_fileio_to_fio_error.
4739
c8f4bfdd
YQ
47402015-04-09 Yao Qi <yao.qi@linaro.org>
4741
4742 * linux-low.c (linux_insert_point): Call
4743 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4744 (linux_remove_point): Call remove_memory_breakpoint if type is
4745 raw_bkpt_type_sw.
4746 * linux-x86-low.c (x86_insert_point): Don't call
4747 insert_memory_breakpoint.
4748 (x86_remove_point): Don't call remove_memory_breakpoint.
4749
41f98f02
PA
47502015-04-01 Pedro Alves <palves@redhat.com>
4751 Cleber Rosa <crosa@redhat.com>
4752
4753 * server.c (gdbserver_usage): Reorganize and extend the usage
4754 message.
4755
2bf6fb9d
PA
47562015-03-24 Pedro Alves <palves@redhat.com>
4757
4758 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4759 output. Also dump TRAP_TRACE.
4760 (linux_low_filter_event): In debug output, distinguish a
4761 resume_stop SIGSTOP from a delayed SIGSTOP.
4762
369f6daa
GB
47632015-03-24 Gary Benson <gbenson@redhat.com>
4764
4765 * linux-x86-low.c (x86_linux_new_thread): Moved to
4766 nat/x86-linux.c.
4767 (x86_linux_prepare_to_resume): Likewise.
4768
8e5d4070
GB
47692015-03-24 Gary Benson <gbenson@redhat.com>
4770
4771 * Makefile.in (x86-linux-dregs.o): New rule.
4772 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4773 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4774 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4775 (x86_linux_dr_get): Likewise.
4776 (x86_linux_dr_set): Likewise.
4777 (update_debug_registers_callback): Likewise.
4778 (x86_linux_dr_set_addr): Likewise.
4779 (x86_linux_dr_get_addr): Likewise.
4780 (x86_linux_dr_set_control): Likewise.
4781 (x86_linux_dr_get_control): Likewise.
4782 (x86_linux_dr_get_status): Likewise.
4783 (x86_linux_update_debug_registers): Likewise.
4784
2b95d440
GB
47852015-03-24 Gary Benson <gbenson@redhat.com>
4786
4787 * linux-x86-low.c (x86_linux_update_debug_registers):
4788 New function, factored out from...
4789 (x86_linux_prepare_to_resume): ...this.
4790
14b0bc68
GB
47912015-03-24 Gary Benson <gbenson@redhat.com>
4792
4793 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4794 (x86_linux_dr_set): Likewise.
4795 (update_debug_registers_callback): Likewise.
4796 (x86_linux_dr_set_addr): Likewise.
4797 (x86_linux_dr_get_addr): Likewise.
4798 (x86_linux_dr_set_control): Likewise.
4799 (x86_linux_dr_get_control): Likewise.
4800 (x86_linux_dr_get_status): Likewise.
4801 (x86_linux_prepare_to_resume): Likewise.
4802
5dfe6ca8
GB
48032015-03-24 Gary Benson <gbenson@redhat.com>
4804
4805 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4806 Use perror_with_name. Pass string through gettext.
4807 (x86_linux_dr_set): Likewise.
4808
d33472ad
GB
48092015-03-24 Gary Benson <gbenson@redhat.com>
4810
4811 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4812 (x86_linux_dr_set_addr): ...this.
4813 (x86_dr_low_get_addr): Rename to...
4814 (x86_linux_dr_get_addr): ...this.
4815 (x86_dr_low_set_control): Rename to...
4816 (x86_linux_dr_set_control): ...this.
4817 (x86_dr_low_get_control): Rename to...
4818 (x86_linux_dr_get_control): ...this.
4819 (x86_dr_low_get_status): Rename to...
4820 (x86_linux_dr_get_status): ...this.
4821 (x86_dr_low): Update with new function names.
4822
4b134ca1
GB
48232015-03-24 Gary Benson <gbenson@redhat.com>
4824
4825 * Makefile.in (x86-linux.o): New rule.
4826 * configure.srv: Add x86-linux.o to relevant targets.
4827 * linux-low.c (lwp_set_arch_private_info): New function.
4828 (lwp_arch_private_info): Likewise.
4829 * linux-x86-low.c: Include nat/x86-linux.h.
4830 (arch_lwp_info): Removed structure.
4831 (update_debug_registers_callback):
4832 Use lwp_set_debug_registers_changed.
4833 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4834 and lwp_set_debug_registers_changed.
4835 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4836
34c703da
GB
48372015-03-24 Gary Benson <gbenson@redhat.com>
4838
4839 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4840 * linux-arm-low.c (arm_new_thread): Likewise.
4841 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4842 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4843 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4844 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4845
cff068da
GB
48462015-03-24 Gary Benson <gbenson@redhat.com>
4847
4848 * linux-low.c (ptid_of_lwp): New function.
4849 (lwp_is_stopped): Likewise.
4850 (lwp_stop_reason): Likewise.
4851 * linux-x86-low.c (update_debug_registers_callback):
4852 Use lwp_is_stopped.
4853 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4854 lwp_stop_reason.
4855
b2f7c7e8
GB
48562015-03-24 Gary Benson <gbenson@redhat.com>
4857
4858 * linux-low.h (linux_stop_lwp): Remove declaration.
4859
6d4ee8c6
GB
48602015-03-24 Gary Benson <gbenson@redhat.com>
4861
4862 * linux-low.h: Include nat/linux-nat.h.
4863 * linux-low.c (iterate_over_lwps_args): New structure.
4864 (iterate_over_lwps_filter): New function.
4865 (iterate_over_lwps): Likewise.
4866 * linux-x86-low.c (update_debug_registers_callback):
4867 Update signature to what iterate_over_lwps expects.
4868 Remove PID check that iterate_over_lwps now performs.
4869 (x86_dr_low_set_addr): Use iterate_over_lwps.
4870 (x86_dr_low_set_control): Likewise.
4871
70a0bb6b
GB
48722015-03-24 Gary Benson <gbenson@redhat.com>
4873
4874 * linux-x86-low.c (x86_debug_reg_state): New function.
4875 (x86_linux_prepare_to_resume): Use the above.
4876
7b669087
GB
48772015-03-24 Gary Benson <gbenson@redhat.com>
4878
4879 * linux-low.c (current_lwp_ptid): New function.
4880 * linux-x86-low.c: Include nat/linux-nat.h.
4881 (x86_dr_low_get_addr): Use current_lwp_ptid.
4882 (x86_dr_low_get_control): Likewise.
4883 (x86_dr_low_get_status): Likewise.
4884
eef49a3d
PA
48852015-03-20 Pedro Alves <palves@redhat.com>
4886
4887 * tracepoint.c (cmd_qtstatus): Make "str" const.
4888
b2333d22
PA
48892015-03-20 Pedro Alves <palves@redhat.com>
4890
4891 * server.c (handle_general_set): Make "req_str" const.
4892
23f238d3
PA
48932015-03-19 Pedro Alves <palves@redhat.com>
4894
4895 * linux-low.c (linux_resume_one_lwp): Rename to ...
4896 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4897 instead call perror_with_name.
4898 (check_ptrace_stopped_lwp_gone): New function.
4899 (linux_resume_one_lwp): Reimplement as wrapper around
4900 linux_resume_one_lwp_throw that swallows errors if the LWP is
4901 gone.
4902
91baf43f
PA
49032015-03-19 Pedro Alves <palves@redhat.com>
4904
4905 * linux-low.c (count_events_callback, select_event_lwp_callback):
4906 No longer check whether the thread has resume_stop as last resume
4907 kind.
4908
8bf3b159
PA
49092015-03-19 Pedro Alves <palves@redhat.com>
4910
4911 * linux-low.c (count_events_callback, select_event_lwp_callback):
4912 Use the lwp's status_pending_p field, not the thread's.
4913
b90fc188
PA
49142015-03-19 Pedro Alves <palves@redhat.com>
4915
4916 * linux-low.c (select_event_lwp_callback): Update comments to
4917 no longer mention SIGTRAP.
4918
464b0089
GB
49192015-03-18 Gary Benson <gbenson@redhat.com>
4920
4921 * server.c (handle_query): Do not report vFile:fstat as supported.
4922
aa9e327f
GB
49232015-03-11 Gary Benson <gbenson@redhat.com>
4924
4925 * hostio.c (sys/types.h): New include.
4926 (sys/stat.h): Likewise.
4927 (common-remote-fileio.h): Likewise.
4928 (handle_fstat): New function.
4929 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 4930
791c0056
GB
49312015-03-11 Gary Benson <gbenson@redhat.com>
4932
4933 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4934 struct stat.st_blocks and struct stat.st_blksize.
4935 * configure: Regenerate.
4936 * config.in: Likewise.
4937 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4938 (OBS): Add common-remote-fileio.o.
4939 (common-remote-fileio.o): New rule.
4940
9a9df970
PA
49412015-03-09 Pedro Alves <palves@redhat.com>
4942
4943 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4944 'struct sockaddr' pointer in 'accept' call.
4945
9eb1356e
PA
49462015-03-09 Pedro Alves <palves@redhat.com>
4947
4948 Revert:
4949 2015-03-07 Pedro Alves <palves@redhat.com>
4950 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4951 or <winsock2.h> here. Instead include "gdb_socket.h".
4952 (remote_open): Use union gdb_sockaddr_u.
4953 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4954 or <winsock2.h> here. Instead include "gdb_socket.h".
4955 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4956 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4957 or <sys/un.h>.
4958 (init_named_socket, gdb_agent_helper_thread): Use union
4959 gdb_sockaddr_u.
4960
aac331e4
PA
49612015-03-07 Pedro Alves <palves@redhat.com>
4962
4963 * configure.ac (build_warnings): Move
4964 -Wdeclaration-after-statement to the C-specific set.
4965 * configure: Regenerate.
4966
366c75fc
PA
49672015-03-07 Pedro Alves <palves@redhat.com>
4968
4969 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4970 or <winsock2.h> here. Instead include "gdb_socket.h".
4971 (remote_open): Use union gdb_sockaddr_u.
4972 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4973 or <winsock2.h> here. Instead include "gdb_socket.h".
4974 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4975 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4976 or <sys/un.h>.
4977 (init_named_socket, gdb_agent_helper_thread): Use union
4978 gdb_sockaddr_u.
4979
492d29ea
PA
49802015-03-07 Pedro Alves <palves@redhat.com>
4981
4982 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4983 instead.
4984
60a191ed
YQ
49852015-03-06 Yao Qi <yao.qi@linaro.org>
4986
4987 * linux-aarch64-low.c (aarch64_insert_point): Use
4988 show_debug_regs as a boolean.
4989 (aarch64_remove_point): Likewise.
4990
f5771b1d
PA
49912015-03-05 Pedro Alves <palves@redhat.com>
4992
4993 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4994 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4995 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4996 * nto-low.c (nto_target_ops): Likewise.
4997 * spu-low.c (spu_target_ops): Likewise.
4998 * win32-low.c (win32_target_ops): Likewise.
4999
3e572f71
PA
50002015-03-04 Pedro Alves <palves@redhat.com>
5001
72f4393d 5002 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
5003 Decide whether a breakpoint triggered based on the SIGTRAP's
5004 siginfo.si_code.
72f4393d
L
5005 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5006 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
5007 (linux_low_filter_event): Check for breakpoints before checking
5008 watchpoints.
5009 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5010 siginfo.si_code.
72f4393d
L
5011 (linux_stopped_by_sw_breakpoint)
5012 (linux_supports_stopped_by_sw_breakpoint)
5013 (linux_stopped_by_hw_breakpoint)
5014 (linux_supports_stopped_by_hw_breakpoint): New functions.
5015 (linux_target_ops): Install new target methods.
3e572f71 5016
1ec68e26
PA
50172015-03-04 Pedro Alves <palves@redhat.com>
5018
5019 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5020 * server.c (swbreak_feature, hwbreak_feature): New globals.
5021 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5022 (captured_main): Clear swbreak_feature and hwbreak_feature.
5023 * server.h (swbreak_feature, hwbreak_feature): Declare.
5024 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5025 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5026 supports_stopped_by_hw_breakpoint>: New fields.
5027 (target_supports_stopped_by_sw_breakpoint)
5028 (target_stopped_by_sw_breakpoint)
5029 (target_supports_stopped_by_hw_breakpoint)
5030 (target_stopped_by_hw_breakpoint): Declare.
5031
15c66dd6
PA
50322015-03-04 Pedro Alves <palves@redhat.com>
5033
5034 enum lwp_stop_reason -> enum target_stop_reason
5035 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5036 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5037 (linux_wait_1, stuck_in_jump_pad_callback)
5038 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5039 (linux_stopped_by_watchpoint):
5040 * linux-low.h (enum lwp_stop_reason): Delete.
5041 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5042 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5043
98fc70d6
YQ
50442015-03-04 Yao Qi <yao.qi@linaro.org>
5045
5046 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5047
dd2ac174
GB
50482015-03-03 Gary Benson <gbenson@redhat.com>
5049
5050 * hostio.c (handle_vFile): Fix prefix lengths.
5051
d68e53f4
MM
50522015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5053
5054 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5055 ptr_bits.
5056
bf2d68ab
AA
50572015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5058
5059 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5060 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5061 (clean): Add "rm -f" for above C files.
5062 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5063 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5064 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5065 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5066 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5067 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5068 (init_registers_s390x_vx_linux64)
5069 (init_registers_s390x_tevx_linux64)
5070 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5071 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5072 declarations.
5073 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5074 (s390_store_vxrs_high): New functions.
5075 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5076 NT_S390_VXRS_HIGH.
5077 (s390_arch_setup): Add logic for selecting one of the new target
5078 descriptions. Activate the new vector regsets if applicable.
5079 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5080 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5081 and init_registers_s390x_tevx_linux64.
5082
c966a859
PA
50832015-03-01 Pedro Alves <palves@redhat.com>
5084
5085 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5086 parameter.
5087
4180215b
PA
50882015-02-27 Pedro Alves <palves@redhat.com>
5089
5090 * linux-x86-low.c (u_debugreg_offset): New function.
5091 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5092
749bab01
PA
50932015-02-27 Pedro Alves <palves@redhat.com>
5094
5095 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5096 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5097 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5098 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5099 (ps_lsetfpregs, ps_getpid)
5100 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5101 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5102 (ps_lsetxregs, ps_plog): Declare.
5103
3c14e5a3
PA
51042015-02-27 Pedro Alves <palves@redhat.com>
5105
5106 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5107 IP_AGENT_EXPORT_FUNC.
5108 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5109 IP_AGENT_EXPORT_FUNC.
5110 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5111 (IP_AGENT_EXPORT): Delete.
5112 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5113 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5114 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5115 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5116 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5117 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5118 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5119 (traceframe_read_count, traceframe_write_count)
5120 (traceframes_created, trace_state_variables, get_raw_reg)
5121 (get_trace_state_variable_value, set_trace_state_variable_value)
5122 (ust_loaded, helper_thread_id, cmd_buf): Use
5123 IPA_SYM_EXPORTED_NAME.
5124 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5125 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5126 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5127 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5128 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5129 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5130 EXTERN_C_PUSH/EXTERN_C_POP.
5131 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5132 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5133 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5134 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5135 (traceframe_write_count, traceframe_read_count)
5136 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5137 (about_to_request_buffer_space, get_trace_state_variable_value)
5138 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5139 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5140 EXTERN_C_PUSH/EXTERN_C_POP.
5141 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5142 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5143 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5144 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5145 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5146 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5147 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5148 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5149 Define.
5150 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5151 (IP_AGENT_EXPORT_VAR_DECL): Define.
5152 (tracing): Declare.
5153 (gdb_agent_get_raw_reg): Declare.
5154
fe978cb0
PA
51552015-02-27 Tom Tromey <tromey@redhat.com>
5156 Pedro Alves <palves@redhat.com>
5157
5158 Rename symbols whose names are reserved C++ keywords throughout.
5159
3bc3d82a
PA
51602015-02-27 Pedro Alves <palves@redhat.com>
5161
5162 * Makefile.in (COMPILER): New, get it from autoconf.
5163 (CXX): Get from autoconf instead.
5164 (COMPILE.pre): Use COMPILER.
5165 (CC-LD): Rename to ...
5166 (CC_LD): ... this. Use COMPILER.
5167 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5168 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5169 * acinclude.m4: Include build-with-cxx.m4.
5170 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5171 Disable -Werror by default if building in C++ mode.
5172 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5173 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5174 the C++ compiler. Save/restore CXXFLAGS too.
5175 * configure: Regenerate.
5176
07697489
PA
51772015-02-27 Pedro Alves <palves@redhat.com>
5178
5179 * acinclude.m4: Include libiberty.m4.
5180 * configure.ac: Call libiberty_INIT.
5181 * config.in, configure: Regenerate.
5182
9beb7c4e
PA
51832015-02-26 Pedro Alves <palves@redhat.com>
5184
5185 * linux-low.c (linux_wait_1): When incrementing the PC past a
5186 program breakpoint always use the_low_target.breakpoint_len as
5187 increment, rather than the maximum between that and
5188 the_low_target.decr_pc_after_break.
5189
8090aef2
PA
51902015-02-23 Pedro Alves <palves@redhat.com>
5191
5192 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5193 thread was doing a step-over; always adjust the PC if
5194 we stepped over a permanent breakpoint.
5195 (linux_wait_1): If we stepped over breakpoint that was on top of a
5196 permanent breakpoint, manually advance the PC past it.
5197
bc9540e8
PA
51982015-02-23 Pedro Alves <palves@redhat.com>
5199
5200 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5201 modes.
5202 (x86_fill_gregset, x86_store_gregset): Use it when handling
5203 $orig_eax.
5204
2db9a427
PA
52052015-02-20 Pedro Alves <palves@redhat.com>
5206
5207 * thread-db.c: Include "nat/linux-procfs.h".
5208 (thread_db_init): Skip listing new threads if the kernel supports
5209 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5210
afa8d396
PA
52112015-02-20 Pedro Alves <palves@redhat.com>
5212
5213 * linux-low.c (status_pending_p_callback): Use ptid_match.
5214
c9587f88
AT
52152015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5216
5217 PR breakpoints/16812
5218 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5219 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5220 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5221
b05ec7a5
AT
52222015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5223
5224 PR breakpoints/15956
5225 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5226
d33501a5
MM
52272015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5228
5229 * linux-low.c (linux_low_btrace_conf): Print size.
5230 * server.c (handle_btrace_conf_general_set): New.
5231 (hanle_general_set): Call handle_btrace_conf_general_set.
5232 (handle_query): Report Qbtrace-conf:bts:size as supported.
5233
f4abbc16
MM
52342015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5235
5236 * linux-low.c (linux_low_enable_btrace): Update parameters.
5237 (linux_low_btrace_conf): New.
5238 (linux_target_ops)<to_btrace_conf>: Initialize.
5239 * server.c (current_btrace_conf): New.
5240 (handle_btrace_enable): Rename to ...
5241 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5242 to target_enable_btrace. Update comment. Update users.
5243 (handle_qxfer_btrace_conf): New.
5244 (qxfer_packets): Add btrace-conf entry.
5245 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5246 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5247 (target_ops)<read_btrace_conf>: New.
5248 (target_enable_btrace): Update parameters.
5249 (target_read_btrace_conf): New.
5250
043c3577
MM
52512015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5252
5253 * server.c (handle_btrace_general_set): Remove call to
5254 target_supports_btrace.
5255 (supported_btrace_packets): New.
5256 (handle_query): Call supported_btrace_packets.
5257 * target.h: include btrace-common.h.
5258 (btrace_target_info): Removed.
5259 (supports_btrace, target_supports_btrace): Update parameters.
5260
734b0e4b
MM
52612015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5262
5263 * Makefile.in (SFILES): Add common/btrace-common.c.
5264 (OBS): Add common/btrace-common.o.
5265 (btrace-common.o): Add build rules.
5266 * linux-low: Include btrace-common.h.
5267 (linux_low_read_btrace): Use struct btrace_data. Call
5268 btrace_data_init and btrace_data_fini.
5269
d6c146e9
PA
52702015-02-06 Pedro Alves <palves@redhat.com>
5271
5272 * thread-db.c (find_new_threads_callback): Add debug output.
5273
20ba1ce6
PA
52742015-02-04 Pedro Alves <palves@redhat.com>
5275
5276 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5277 (resume_stopped_resumed_lwps): New function.
5278 (linux_wait_for_event_filtered): Use it.
5279
8cc73a39
SDJ
52802015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5281
5282 * Makefile.in (SFILES): Add linux-personality.c.
5283 (linux-personality.o): New rule.
5284 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5285 list of objects to be built.
5286 * linux-low.c: Include nat/linux-personality.h.
5287 (linux_create_inferior): Remove code to disable address space
5288 randomization (moved to ../nat/linux-personality.c). Create
5289 cleanup to disable address space randomization.
5290
fb23d554
SDJ
52912015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5292
5293 * Makefile.in (posix-strerror.o): New rule.
5294 (mingw-strerror.o): Likewise.
5295 * configure: Regenerated.
5296 * configure.ac: Source file ../common/common.host. Initialize new
5297 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5298
cdf43629
YQ
52992015-01-14 Yao Qi <yao@codesourcery.com>
5300
5301 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5302 (ppc-linux.o): New rule.
5303 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5304 * configure.ac: AC_CHECK_FUNCS(getauxval).
5305 * config.in: Re-generated.
5306 * configure: Re-generated.
5307 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5308 ppc64_64bit_inferior_p
5309
514c5338
YQ
53102015-01-14 Yao Qi <yao@codesourcery.com>
5311
5312 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5313 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5314 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5315 (PT_ORIG_R3, PT_TRAP): Likewise.
5316 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5317 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5318 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5319
3368c1e5
JB
53202015-01-10 Joel Brobecker <brobecker@adacore.com>
5321
5322 * i387-fp.c (i387_cache_to_xsave): In look over
5323 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5324 zmmh_low_space field by use of zmmh_high_space.
5325
582511be
PA
53262015-01-09 Pedro Alves <palves@redhat.com>
5327
5328 * linux-low.c (step_over_bkpt): Move higher up in the file.
5329 (handle_extended_wait): Don't store the stop_pc here.
5330 (get_stop_pc): Adjust comments and rename to ...
5331 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5332 stopped for a software breakpoint or hardware breakpoint.
5333 (thread_still_has_status_pending_p): New function.
5334 (status_pending_p_callback): Use
5335 thread_still_has_status_pending_p. If the event is no longer
5336 interesting, resume the LWP.
5337 (handle_tracepoints): Add assert.
5338 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5339 (wstatus_maybe_breakpoint): New function.
5340 (cancel_breakpoint): Delete function.
5341 (check_stopped_by_watchpoint): New function, factored out from
5342 linux_low_filter_event.
5343 (lp_status_maybe_breakpoint): Delete function.
5344 (linux_low_filter_event): Remove filter_ptid argument.
5345 Leave thread group exits pending here. Store the LWP's stop PC.
5346 Always leave events pending.
5347 (linux_wait_for_event_filtered): Pull all events out of the
5348 kernel, and leave them all pending.
5349 (count_events_callback, select_event_lwp_callback): Consider all
5350 events.
5351 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5352 (select_event_lwp): Only give preference to the stepping LWP in
5353 all-stop mode. Adjust comments.
5354 (ignore_event): New function.
5355 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5356 references to cancel_breakpoints. Adjust to renames. Also give
5357 equal priority to all LWPs that have had events in non-stop mode.
5358 If reporting a software breakpoint event, unadjust the LWP's PC.
5359 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5360 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5361 Adjust.
5362 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5363 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5364 (linux_stopped_by_watchpoint): Adjust.
5365 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5366 * linux-low.h (enum lwp_stop_reason): New.
5367 (struct lwp_info) <stop_pc>: Adjust comment.
5368 <stopped_by_watchpoint>: Delete field.
5369 <stop_reason>: New field.
5370 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5371 * mem-break.c (software_breakpoint_inserted_here)
5372 (hardware_breakpoint_inserted_here): New function.
5373 * mem-break.h (software_breakpoint_inserted_here)
5374 (hardware_breakpoint_inserted_here): Declare.
5375 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5376 (cancel_breakpoints): Delete.
5377 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5378 (upload_fast_traceframes): Remove references to
5379 cancel_breakpoints.
5380
a33e3959
PA
53812015-01-09 Pedro Alves <palves@redhat.com>
5382
5383 * thread-db.c (find_new_threads_callback): Ignore thread if the
5384 kernel thread ID is -1.
5385
8784d563
PA
53862015-01-09 Pedro Alves <palves@redhat.com>
5387
5388 * linux-low.c (linux_attach_fail_reason_string): Move to
5389 nat/linux-ptrace.c, and rename.
5390 (linux_attach_lwp): Update comment.
5391 (attach_proc_task_lwp_callback): New function.
5392 (linux_attach): Adjust to rename and use
5393 linux_proc_attach_tgid_threads.
5394 (linux_attach_fail_reason_string): Delete declaration.
5395
76f2b779
JB
53962015-01-01 Joel Brobecker <brobecker@adacore.com>
5397
5398 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5399 * server.c (gdbserver_version): Likewise.
5400
fafcc06a
SDJ
54012014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5402
5403 * remote-utils.c: Include ctype.h.
5404 (input_interrupt): Explicitly handle the case when the char
5405 received is the NUL byte. Improve the printing of non-ASCII
5406 characters.
5407
beed38b8
JB
54082014-12-16 Joel Brobecker <brobecker@adacore.com>
5409
5410 * linux-low.c (linux_low_filter_event): Update call to
5411 linux_enable_event_reporting following the addition of
5412 a new parameter to that function.
5413
bf330350
CU
54142014-12-16 Catalin Udma <catalin.udma@freescale.com>
5415
5416 PR server/17457
5417 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5418 (AARCH64_FPCR_REGNO): Likewise.
5419 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5420 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5421 (aarch64_store_fpregset): Likewise.
5422
5227d625
JB
54232014-12-15 Joel Brobecker <brobecker@adacore.com>
5424
5425 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5426 Remove FIXME comment about assumption about N.
5427
f93b65a0
JB
54282014-12-13 Joel Brobecker <brobecker@adacore.com>
5429
5430 * configure.ac: If large-file support is disabled in GDBserver,
5431 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5432 * configure: Regenerate.
5433
e5a9158d
AA
54342014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5435
5436 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5437 warning upon ENODATA from ptrace.
5438 * linux-s390-low.c (s390_store_tdb): New.
5439 (s390_regsets): Add regset for NT_S390_TDB.
5440
feea5f36
AA
54412014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5442
5443 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5444 without a fill_function.
5445 * linux-s390-low.c (s390_fill_last_break): Remove.
5446 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5447 (s390_arch_setup): Use regset's size instead of fill_function for
5448 loop end condition.
5449
098dbe61
AA
54502014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5451
5452 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5453 the regset's store function when ptrace returned an error.
5454 * regcache.c (get_thread_regcache): Invalidate register cache
5455 before fetching inferior's registers.
5456
28eef672
AA
54572014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5458
5459 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5460 while-loop as for-loop.
5461 (regsets_store_inferior_registers): Likewise.
5462
bdca27a2
YQ
54632014-11-28 Yao Qi <yao@codesourcery.com>
5464
5465 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5466 * config.in, configure: Re-generate.
5467 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5468 is defined.
5469
9c232dda
YQ
54702014-11-21 Yao Qi <yao@codesourcery.com>
5471
5472 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5473 (AC_CHECK_HEADERS): Remove malloc.h.
5474 * configure: Re-generated.
5475 * config.in: Re-generated.
5476 * server.h: Don't include alloca.h and malloc.h.
5477 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5478 Don't include malloc.h.
5479
43968415
JB
54802014-11-17 Joel Brobecker <brobecker@adacore.com>
5481
5482 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5483 corresponding ERRNO check in same block.
5484
40e91bc7
PA
54852014-11-12 Pedro Alves <palves@redhat.com>
5486
5487 * server.c (cont_thread): Update comment.
5488 (start_inferior, attach_inferior): No longer clear cont_thread.
5489 (handle_v_cont): No longer set cont_thread.
5490 (captured_main): Clear cont_thread each time a GDB connects.
5491
c2c118cf
PA
54922014-11-12 Pedro Alves <palves@redhat.com>
5493
5494 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5495 thread, and don't resume all threads if the Hc thread has exited.
5496
78708b7c
PA
54972014-11-12 Pedro Alves <palves@redhat.com>
5498
5499 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5500 the process group instead of to a specific LWP.
5501
a2abc7de
PA
55022014-10-15 Pedro Alves <palves@redhat.com>
5503
5504 PR server/17487
5505 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5506 parameter.
5507 (arm_set_thread_context): Delete.
5508 (the_low_target): Adjust.
5509 * win32-i386-low.c (debug_registers_changed)
5510 (debug_registers_used): Delete.
5511 (update_debug_registers_callback): New function.
5512 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5513 needing to update their debug registers.
5514 (win32_get_current_dr): New function.
5515 (x86_dr_low_get_addr, x86_dr_low_get_control)
5516 (x86_dr_low_get_status): Fetch the debug register from the thread
5517 record's context.
5518 (i386_initial_stuff): Adjust.
5519 (i386_get_thread_context): Remove current_event parameter. Don't
5520 clear debug_registers_changed nor copy DR values to
5521 debug_reg_state.
5522 (i386_set_thread_context): Delete.
5523 (i386_prepare_to_resume): New function.
5524 (i386_thread_added): Mark the thread as needing to update irs
5525 debug registers.
5526 (the_low_target): Remove i386_set_thread_context and install
5527 i386_prepare_to_resume.
5528 * win32-low.c (win32_get_thread_context): Adjust.
5529 (win32_set_thread_context): Use SetThreadContext
5530 directly.
5531 (win32_prepare_to_resume): New function.
5532 (win32_require_context): New function, factored out from ...
5533 (thread_rec): ... this.
5534 (continue_one_thread): Call win32_prepare_to_resume on each thread
5535 we're about to continue.
5536 (win32_resume): Call win32_prepare_to_resume on the event thread.
5537 * win32-low.h (struct win32_thread_info)
5538 <debug_registers_changed>: New field.
5539 (struct win32_target_ops): Change prototype of set_thread_context,
5540 delete set_thread_context and add prepare_to_resume.
5541 (win32_require_context): New declaration.
5542
a442d071
GB
55432014-10-08 Gary Benson <gbenson@redhat.com>
5544
5545 * server.h: Do not include common-exceptions.h.
5546
6f1947e8
GB
55472014-10-08 Gary Benson <gbenson@redhat.com>
5548
5549 * server.h: Do not include cleanups.h.
5550
63b434a4
JH
55512014-09-30 James Hogan <james.hogan@imgtec.com>
5552
5553 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5554 mips64-dsp-linux.c.
5555
c4d9ceb6
YQ
55562014-09-23 Yao Qi <yao@codesourcery.com>
5557
5558 * linux-low.c (lp_status_maybe_breakpoint): New function.
5559 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5560 (count_events_callback): Likewise.
5561 (select_event_lwp_callback): Likewise.
5562 (cancel_breakpoints_callback): Likewise.
5563
89a5711c
DB
55642014-09-19 Don Breazeal <donb@codesourcery.com>
5565
5566 * linux-low.c (handle_extended_wait): Call
5567 linux_ptrace_get_extended_event.
5568 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5569 linux_is_extended_waitstatus.
5570
bffc0964
JB
55712014-09-16 Joel Brobecker <brobecker@adacore.com>
5572
5573 * Makefile.in (CPPFLAGS): Define.
5574 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5575 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5576
0bfdf32f
GB
55772014-09-16 Gary Benson <gbenson@redhat.com>
5578
5579 * inferiors.h (current_inferior): Renamed as...
5580 (current_thread): New variable. All uses updated.
5581 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5582 (maybe_move_out_of_jump_pad): Likewise.
5583 (cancel_breakpoint): Likewise.
5584 (linux_low_filter_event): Likewise.
5585 (wait_for_sigstop): Likewise.
5586 (linux_resume_one_lwp): Likewise.
5587 (need_step_over_p): Likewise.
5588 (start_step_over): Likewise.
5589 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5590 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5591 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5592 and save_inferior as saved_thread.
5593 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5594 saved_thread.
5595 (regcache_invalidate_thread): Likewise.
5596 * remote-utils.c (prepare_resume_reply): Likewise.
5597 * thread-db.c (thread_db_get_tls_address): Likewise.
5598 (disable_thread_event_reporting): Likewise.
5599 (remove_thread_event_breakpoints): Likewise.
5600 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5601 as saved_thread.
5602 * target.h (set_desired_inferior): Renamed as...
5603 (set_desired_thread): New declaration. All uses updated.
5604 * server.c (myresume): Updated comment to reference thread instead
5605 of inferior.
5606 (handle_serial_event): Likewise.
5607 (handle_target_event): Likewise.
5608
361c8ade
GB
56092014-09-12 Tom Tromey <tromey@redhat.com>
5610 Gary Benson <gbenson@redhat.com>
5611
5612 * regcache.h: Include common-regcache.h.
5613 (regcache_read_pc): Don't declare.
5614 * regcache.c (get_thread_regcache_for_ptid): New function.
5615
bd9269f7
GB
56162014-09-11 Tom Tromey <tromey@redhat.com>
5617 Gary Benson <gbenson@redhat.com>
5618
5619 * symbol.c: New file.
5620 * Makefile.in (SFILES): Add symbol.c.
5621 (OBS): Add symbol.o.
5622
f8c1d06b
GB
56232014-09-11 Gary Benson <gbenson@redhat.com>
5624
5625 * target.c (target_stop_ptid, target_continue_ptid): New
5626 functions.
5627
721ec300
GB
56282014-09-11 Tom Tromey <tromey@redhat.com>
5629 Gary Benson <gbenson@redhat.com>
5630
5631 * target.h: Include target/target.h.
5632 * target.c (target_read_memory, target_read_uint32)
5633 (target_write_memory): New functions.
5634
c5e92cca
GB
56352014-09-11 Gary Benson <gbenson@redhat.com>
5636
5637 * server.h (debug_hw_points): Don't declare.
5638 * server.c (debug_hw_points): Don't define. Replace all uses
5639 with show_debug_regs.
5640 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5641 all uses with show_debug_regs.
5642
2e4bb98a
EBM
56432014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5644
5645 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5646 endianness into account.
5647 (ppc_supply_ptrace_register): Likewise.
5648
ac740bc7
JH
56492014-09-03 James Hogan <james.hogan@imgtec.com>
5650
5651 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5652 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5653
97ea6506
GB
56542014-09-03 Gary Benson <gbenson@redhat.com>
5655
5656 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5657 ALL_DEBUG_ADDRESS_REGISTERS.
5658
df7e5265
GB
56592014-09-02 Gary Benson <gbenson@redhat.com>
5660
5661 * i386-low.h: Renamed as...
5662 * x86-low.h: New file. All type, function and variable name
5663 prefixes changed from "i386_" to "x86_". All references updated.
5664 * i386-low.c: Renamed as...
5665 * x86-low.c: New file. All type, function and variable name
5666 prefixes changed from "i386_" to "x86_". All references updated.
5667
ed859da7
GB
56682014-09-02 Gary Benson <gbenson@redhat.com>
5669
5670 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5671 (x86_linux_new_thread): Likewise.
5672
860789c7
GB
56732014-08-29 Gary Benson <gbenson@redhat.com>
5674
5675 * server.h (setjmp.h): Do not include.
5676 (toplevel): Do not declare.
5677 (common-exceptions.h): Include.
5678 (cleanups.h): Likewise.
5679 * server.c (toplevel): Do not define.
5680 (exit_code): New static global.
5681 (detach_or_kill_for_exit_cleanup): New function.
5682 (main): New function. Original main renamed to...
5683 (captured_main): New function.
5684 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5685
ff55e1b5
GB
56862014-08-29 Gary Benson <gbenson@redhat.com>
5687
5688 * Makefile.in (SFILES): Add common/common-exceptions.c.
5689 (OBS): Add common-exceptions.o.
5690 (common-exceptions.o): New rule.
5691 * utils.c (prepare_to_throw_exception): New function.
5692
e9bcb658
GB
56932014-08-29 Gary Benson <gbenson@redhat.com>
5694
5695 * config.in: Regenerate.
5696 * configure: Likewise.
5697
e3180625
GB
56982014-08-29 Gary Benson <gbenson@redhat.com>
5699
5700 * Makefile.in (SFILES): Add common/cleanups.c.
5701 (OBS): cleanups.o.
5702 (cleanups.o): New rule.
5703
e3d6ba5d
GB
57042014-08-29 Gary Benson <gbenson@redhat.com>
5705
5706 * utils.c (internal_vwarning): New function.
5707
7096e886
GB
57082014-08-28 Gary Benson <gbenson@redhat.com>
5709
5710 * utils.h (fatal): Remove declaration.
5711 * utils.c (fatal): Remove function.
5712
14ce3192
GB
57132014-08-28 Gary Benson <gbenson@redhat.com>
5714
5715 * tracepoint.c (gdb_agent_init): Replace fatal with
5716 perror_with_name.
5717 (initialize_tracepoint): Likewise.
5718
50278d59
GB
57192014-08-28 Gary Benson <gbenson@redhat.com>
5720
5721 * remote-utils.c (remote_prepare): Replace fatal with error.
5722
aa96c426
GB
57232014-08-28 Gary Benson <gbenson@redhat.com>
5724
5725 * linux-low.c (linux_async): Replace fatal with warning.
5726 Tidy up and return.
5727 (linux_start_non_stop): Return -1 if linux_async failed.
5728
f7160e97
GB
57292014-08-28 Gary Benson <gbenson@redhat.com>
5730
5731 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5732 gdb_assert.
5733 (i386_dr_low_get_addr): Remove vague comment.
5734 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5735 gdb_assert.
5736
38e08fca
GB
57372014-08-28 Gary Benson <gbenson@redhat.com>
5738
5739 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5740 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5741 internal_error.
5742 (linux_resume_one_lwp): Likewise.
5743 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5744 gdb_assert.
5745 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5746 with internal_error.
5747 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5748 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5749 (find_register_by_name): Replace fatal with internal_error.
5750 (find_regno): Likewise.
5751 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5752 * thread-db.c (thread_db_create_event): Likewise.
5753 (thread_db_load_search): Likewise.
5754 (try_thread_db_load_1): Likewise.
5755 * tracepoint.c (get_jump_space_head): Replace fatal with
5756 internal_error.
5757 (claim_trampoline_space): Likewise.
5758 (have_fast_tracepoint_trampoline_buffer): Likewise.
5759 (cmd_qtstart): Likewise.
5760 (stop_tracing): Likewise.
5761 (fast_tracepoint_collecting): Likewise.
5762 (target_malloc): Likewise.
5763 (download_tracepoint): Likewise.
5764 (download_trace_state_variables): Replace check with gdb_assert.
5765 (upload_fast_traceframes): Replace fatal with internal_error.
5766
34abf635
GB
57672014-08-19 Tom Tromey <tromey@redhat.com>
5768 Gary Benson <gbenson@redhat.com>
5769
5770 * Makefile.in (SFILES): Add common/common-debug.c.
5771 (OBS): Add common-debug.o.
5772 (common-debug.o): New rule.
5773 * debug.h (debug_printf): Don't declare.
5774 * debug.c (debug_printf): Renamed and rewritten as...
5775 (debug_vprintf): New function.
5776
f6e94d78
GB
57772014-08-19 Gary Benson <gbenson@redhat.com>
5778
5779 * utils.h: Do not include print-utils.h.
5780
9239eeab
GB
57812014-08-19 Tom Tromey <tromey@redhat.com>
5782 Gary Benson <gbenson@redhat.com>
5783
5784 * server.h: Add static assertion.
5785 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5786
ef87c8bb
GB
57872014-08-19 Tom Tromey <tromey@redhat.com>
5788 Gary Benson <gbenson@redhat.com>
5789
5790 * Makefile.in (SFILES): Add common/errors.c.
5791 (OBS): Add errors.o.
5792 (IPA_OBS): Add errors-ipa.o.
5793 (errors.o): New rule.
5794 (errors-ipa.o): Likewise.
5795 * utils.h (perror_with_name, error, warning): Don't declare.
5796 * utils.c (warning): Renamed and rewritten as...
5797 (vwarning): New function.
5798 (error): Renamed and rewritten as...
5799 (verror): New function.
5800 (internal_error): Renamed and rewritten as...
5801 (internal_verror): New function.
5802
bb974a24
GB
58032014-08-07 Gary Benson <gbenson@redhat.com>
5804
5805 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5806 * configure: Regenerate.
5807 * config.in: Likewise.
5808 * server.h: Do not include errno.h.
5809 * event-loop.c: Likewise.
5810 * hostio-errno.c: Likewise.
5811 * linux-low.c: Likewise.
5812 * remote-utils.c: Likewise.
5813 * spu-low.c: Likewise.
5814 * utils.c: Likewise.
5815 * gdbreplay.c: Unconditionally include errno.h.
5816
6d3d12eb
GB
58172014-08-07 Gary Benson <gbenson@redhat.com>
5818
5819 * server.h: Do not include string.h.
5820 * event-loop.c: Likewise.
5821 * linux-low.c: Likewise.
5822 * regcache.c: Likewise.
5823 * remote-utils.c: Likewise.
5824 * spu-low.c: Likewise.
5825 * utils.c: Likewise.
5826
dccbb609
GB
58272014-08-07 Gary Benson <gbenson@redhat.com>
5828
5829 * server.h: Do not include gdb_assert.h.
5830
e76df0d0
GB
58312014-08-07 Gary Benson <gbenson@redhat.com>
5832
5833 * server.h: Do not include common-utils.h.
5834
4cb9c816
GB
58352014-08-07 Gary Benson <gbenson@redhat.com>
5836
5837 * server.h: Do not include ptid.h.
5838 * notif.h: Likewise.
5839
3995eeee
GB
58402014-08-07 Gary Benson <gbenson@redhat.com>
5841
5842 * server.h: Do not include gdb_locale.h.
5843
cb9f1a9b
GB
58442014-08-07 Gary Benson <gbenson@redhat.com>
5845
5846 * server.h: Do not include gdb/signals.h.
5847 * win32-low.c: Likewise.
5848
a5fceff8
GB
58492014-08-07 Gary Benson <gbenson@redhat.com>
5850
5851 * server.h: Do not include pathmax.h.
5852
b9391142
GB
58532014-08-07 Gary Benson <gbenson@redhat.com>
5854
5855 * server.h: Do not include libiberty.h.
5856 * linux-bfin-low.c: Likewise.
5857
0e443c87
GB
58582014-08-07 Gary Benson <gbenson@redhat.com>
5859
5860 * server.h: Do not include ansidecl.h.
5861
8ebb3f56
GB
58622014-08-07 Gary Benson <gbenson@redhat.com>
5863
5864 * linux-x86-low.c: Do not include stddef.h.
5865 * lynx-ppc-low.c: Likewise.
5866 * tracepoint.c: Likewise.
5867
8980bdf6
GB
58682014-08-07 Gary Benson <gbenson@redhat.com>
5869
5870 * server.h: Do not include stdarg.h.
5871 * nto-low.c: Likewise.
5872
d7096f71
GB
58732014-08-07 Gary Benson <gbenson@redhat.com>
5874
5875 * server.h: Do not include stdlib.h.
5876 * inferiors.c: Likewise.
5877 * linux-low.c: Likewise.
5878 * regcache.c: Likewise.
5879 * spu-low.c: Likewise.
5880 * tracepoint.c: Likewise.
5881 * utils.c: Likewise.
5882
d02f550d
GB
58832014-08-07 Gary Benson <gbenson@redhat.com>
5884
5885 * server.h: Do not include stdio.h.
5886 * linux-low.c: Likewise.
5887 * remote-utils.c: Likewise.
5888 * spu-low.c: Likewise.
5889 * utils.c: Likewise.
5890 * wincecompat.c: Likewise.
5891
87f6c4e3
GB
58922014-08-06 Gary Benson <gbenson@redhat.com>
5893
5894 * regcache.c (init_register_cache): Move conditionals inside if.
5895
7089dca4
GB
58962014-08-06 Gary Benson <gbenson@redhat.com>
5897
5898 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5899
462f517e
GB
59002014-07-31 Gary Benson <gbenson@redhat.com>
5901
5902 * ax.h: Do not include server.h.
5903 * gdbthread.h: Likewise.
5904 * lynx-low.h: Likewise.
5905 * notif.h: Likewise.
5906
976411d6
GB
59072014-07-30 Gary Benson <gbenson@redhat.com>
5908
5909 * server.h: Include common-defs.h.
5910 Do not include config.h or build-gnulib-gdbserver/config.h.
5911
d41f6d8e
GB
59122014-07-30 Gary Benson <gbenson@redhat.com>
5913
5914 * hostio-errno.c: Move server.h to top of includes list.
5915 * inferiors.c: Likewise.
5916 * linux-x86-low.c: Likewise.
5917 * notif.c: Include server.h.
5918
314c6a35
TT
59192014-07-24 Tom Tromey <tromey@redhat.com>
5920 Gary Benson <gbenson@redhat.com>
5921
5922 * server.h (CORE_ADDR): Now unsigned.
5923
69ff6be5
PA
59242014-07-16 Pedro Alves <palves@redhat.com>
5925
5926 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5927
ce9e3fe7
PA
59282014-07-15 Pedro Alves <palves@redhat.com>
5929
5930 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5931 copy.
5932
e76126e8
PA
59332014-07-11 Pedro Alves <palves@redhat.com>
5934
5935 * linux-low.c (kill_wait_lwp): New function, based on
5936 kill_one_lwp_callback, but use my_waitpid directly.
5937 (kill_one_lwp_callback, linux_kill): Use it.
5938
8e9db26e
PA
59392014-06-23 Pedro Alves <palves@redhat.com>
5940
5941 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5942 before setting DR0..DR3.
5943
698b3e08
GB
59442014-06-20 Gary Benson <gbenson@redhat.com>
5945
5946 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5947 * configure: Regenerated.
5948 * config.in: Likewise.
5949
125f8a3d
GB
59502014-06-20 Gary Benson <gbenson@redhat.com>
5951
5952 * Makefile.in (SFILES): Update locations for files moved
5953 from common to nat.
5954 (object file files): Reordered.
5955
42995dbd
GB
59562014-06-20 Gary Benson <gbenson@redhat.com>
5957
5958 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5959 (i386_dr_low_set_addr): Likewise.
5960 (i386_dr_low_get_addr): Likewise.
5961 (i386_dr_low_can_set_control): Likewise.
5962 (i386_dr_low_set_control): Likewise.
5963 (i386_dr_low_get_control): Likewise.
5964 (i386_dr_low_get_status): Likewise.
5965 (i386_get_debug_register_length): Likewise.
5966 * linux-x86-low.c (i386_dr_low_set_addr):
5967 Changed signature. Made static.
5968 (i386_dr_low_get_addr): Likewise.
5969 (i386_dr_low_set_control): Likewise.
5970 (i386_dr_low_get_control): Likewise.
5971 (i386_dr_low_get_status): Likewise.
5972 (i386_dr_low): New global variable.
5973 * win32-i386-low.c (i386_dr_low_set_addr):
5974 Changed signature. Made static.
5975 (i386_dr_low_get_addr): Likewise.
5976 (i386_dr_low_set_control): Likewise.
5977 (i386_dr_low_get_control): Likewise.
5978 (i386_dr_low_get_status): Likewise.
5979 (i386_dr_low): New global variable.
5980
e1d2394b
MS
59812014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5982
5983 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5984 * Makefile.in (AR, AR_FLAGS): Define.
5985 * configure: Regenerate.
5986
3a8ee006
GB
59872014-06-19 Gary Benson <gbenson@redhat.com>
5988
5989 * Makefile.in (i386-dregs.o): New rule.
5990 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5991 * i386-low.c (target.h): Remove include.
5992 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5993 (DR_CONTROL_SHIFT): Likewise.
5994 (DR_CONTROL_SIZE): Likewise.
5995 (DR_RW_EXECUTE): Likewise.
5996 (DR_RW_WRITE): Likewise.
5997 (DR_RW_READ): Likewise.
5998 (DR_RW_IORW): Likewise.
5999 (DR_LEN_1): Likewise.
6000 (DR_LEN_2): Likewise.
6001 (DR_LEN_4): Likewise.
6002 (DR_LEN_8): Likewise.
6003 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6004 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6005 (DR_ENABLE_SIZE): Likewise.
6006 (DR_LOCAL_SLOWDOWN): Likewise.
6007 (DR_GLOBAL_SLOWDOWN): Likewise.
6008 (DR_CONTROL_RESERVED): Likewise.
6009 (I386_DR_CONTROL_MASK): Likewise.
6010 (I386_DR_VACANT): Likewise.
6011 (I386_DR_LOCAL_ENABLE): Likewise.
6012 (I386_DR_GLOBAL_ENABLE): Likewise.
6013 (I386_DR_DISABLE): Likewise.
6014 (I386_DR_SET_RW_LEN): Likewise.
6015 (I386_DR_GET_RW_LEN): Likewise.
6016 (I386_DR_WATCH_HIT): Likewise.
6017 (i386_wp_op_t): Likewise.
6018 (i386_show_dr): Likewise.
6019 (i386_length_and_rw_bits): Likewise.
6020 (i386_insert_aligned_watchpoint): Likewise.
6021 (i386_remove_aligned_watchpoint): Likewise.
6022 (i386_handle_nonaligned_watchpoint): Likewise.
6023 i386_update_inferior_debug_regs(): Likewise.
6024 (i386_dr_insert_watchpoint): Likewise.
6025 (i386_dr_remove_watchpoint): Likewise.
6026 (i386_dr_region_ok_for_watchpoint): Likewise.
6027 (i386_dr_stopped_data_address): Likewise.
6028 (i386_dr_stopped_by_watchpoint): Likewise.
6029
8f26655c
GB
60302014-06-19 Gary Benson <gbenson@redhat.com>
6031
6032 * i386-low.c (i386_dr_show): Renamed to
6033 i386_show_dr and made static. All uses updated.
6034 (i386_dr_length_and_rw_bits): Renamed to
6035 i386_length_and_rw_bits and made static.
6036 All uses updated.
6037 (i386_dr_insert_aligned_watchpoint): Renamed to
6038 i386_insert_aligned_watchpoint and made static.
6039 All uses updated.
6040 (i386_dr_remove_aligned_watchpoint): Renamed to
6041 i386_remove_aligned_watchpoint and made static.
6042 All uses updated.
6043 (i386_dr_update_inferior_debug_regs): Renamed to
6044 i386_update_inferior_debug_regs and made static.
6045 All uses updated.
6046
b9228891
GB
60472014-06-18 Gary Benson <gbenson@redhat.com>
6048
5171def3
GB
6049 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6050 (i386_dr_low_can_set_control): Likewise.
6051 (i386_get_debug_register_length): Likewise.
6052 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6053 (i386_dr_low_can_set_control): Likewise.
6054 (i386_get_debug_register_length): Likewise.
6055
60562014-06-17 Gary Benson <gbenson@redhat.com>
6057
b9228891
GB
6058 * i386-low.h (i386-dregs.h): New include.
6059 (DR_FIRSTADDR): Now in i386-dregs.h.
6060 (DR_LASTADDR): Likewise.
6061 (DR_NADDR): Likewise.
6062 (DR_STATUS): Likewise.
6063 (DR_CONTROL): Likewise.
6064 (i386_debug_reg_state): Likewise.
6065 (i386_dr_insert_watchpoint): Likewise.
6066 (i386_dr_remove_watchpoint): Likewise.
6067 (i386_dr_region_ok_for_watchpoint): Likewise.
6068 (i386_dr_stopped_data_address): Likewise.
6069 (i386_dr_stopped_by_watchpoint): Likewise.
6070 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6071
4be83cc2
GB
60722014-06-18 Gary Benson <gbenson@redhat.com>
6073
6074 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6075 i386_dr_insert_watchpoint.
6076 (i386_low_remove_watchpoint): Renamed to
6077 i386_dr_remove_watchpoint.
6078 (i386_low_region_ok_for_watchpoint): Renamed to
6079 i386_dr_region_ok_for_watchpoint.
6080 (i386_low_stopped_data_address): Renamed to
6081 i386_dr_stopped_data_address.
6082 (i386_low_stopped_by_watchpoint): Renamed to
6083 i386_dr_stopped_by_watchpoint.
6084 * i386-low.c (i386_show_dr): Renamed to
6085 i386_dr_show and made nonstatic. All uses updated.
6086 (i386_length_and_rw_bits): Renamed to
6087 i386_dr_length_and_rw_bits and made nonstatic.
6088 All uses updated.
6089 (i386_insert_aligned_watchpoint): Renamed to
6090 i386_dr_insert_aligned_watchpoint and made nonstatic.
6091 All uses updated.
6092 (i386_remove_aligned_watchpoint): Renamed to
6093 i386_dr_remove_aligned_watchpoint and made nonstatic.
6094 All uses updated.
6095 (i386_update_inferior_debug_regs): Renamed to
6096 i386_dr_update_inferior_debug_regs and made nonstatic.
6097 All uses updated.
6098 (i386_low_insert_watchpoint): Renamed to
6099 i386_dr_insert_watchpoint. All uses updated.
6100 (i386_low_remove_watchpoint): Renamed to
6101 i386_dr_remove_watchpoint. All uses updated.
6102 (i386_low_region_ok_for_watchpoint): Renamed to
6103 i386_dr_region_ok_for_watchpoint. All uses updated.
6104 (i386_low_stopped_data_address): Renamed to
6105 i386_dr_stopped_data_address. All uses updated.
6106 (i386_low_stopped_by_watchpoint): Renamed to
6107 i386_dr_stopped_by_watchpoint. All uses updated.
6108
131aa0d4
GB
61092014-06-18 Gary Benson <gbenson@redhat.com>
6110
6111 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6112 (i386_dr_low_can_set_control): Likewise.
6113 (i386_insert_aligned_watchpoint): New check.
6114
d9305f7f
GB
61152014-06-18 Gary Benson <gbenson@redhat.com>
6116
6117 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6118 Renamed to state.
6119
e927c9fc
GB
61202014-06-18 Gary Benson <gbenson@redhat.com>
6121
6122 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6123 instead of fatal and error.
6124 (i386_handle_nonaligned_watchpoint): Likewise.
6125
1b6d4134
GB
61262014-06-18 Gary Benson <gbenson@redhat.com>
6127
6128 * i386-low.c (i386_get_debug_register_length): New macro.
6129 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6130 (i386_show_dr): Use debug_printf instead of fprintf. Use
6131 phex to format values.
6132
6e62758f
GB
61332014-06-18 Gary Benson <gbenson@redhat.com>
6134
6135 * i386-low.h: Comment changes.
6136 * i386-low.c: Likewise.
6137
fc6e2f03
GB
61382014-06-18 Gary Benson <gbenson@redhat.com>
6139
6140 * i386-low.c: Whitespace changes.
6141
f9d1eeed
TT
61422014-06-12 Tom Tromey <tromey@redhat.com>
6143
6144 * utils.c (freeargv): Remove.
6145
0b04e523
TT
61462014-06-12 Tom Tromey <tromey@redhat.com>
6147
6148 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6149 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6150 (parse_debug_format_options): Likewise.
6151 (gdbserver_usage): Likewise.
6152 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6153 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6154 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6155 against libiberty.
6156 ($(LIBGNU)): Depend on libiberty.
6157 (all-lib): Recurse into all subdirs.
6158 (install-only): Invoke "install" target in subdirs.
6159 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6160 targets.
6161 * configure: Rebuild.
6162 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6163 for vasprintf, vsnprintf, or gettimeofday.
6164 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6165 srv_tgtobj.
6166
270c9937
JB
61672014-06-05 Joel Brobecker <brobecker@adacore.com>
6168
6169 * development.sh: Delete.
6170 * Makefile.in (config.status): Adjust dependency on development.sh.
6171 * configure.ac: Adjust development.sh source call.
6172 * configure: Regenerate.
6173
0a261ed8
PA
61742014-06-02 Pedro Alves <palves@redhat.com>
6175
6176 * ax.c (gdb_free_agent_expr): New function.
6177 * ax.h (gdb_free_agent_expr): New declaration.
6178 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6179 list.
6180 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6181 static.
6182 (clear_breakpoint_conditions_and_commands): New function.
6183 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6184 (clear_breakpoint_conditions_and_commands): New declaration.
6185
e9dae05e
RR
61862014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6187
6188 * linux-aarch64-low.c (asm/ptrace.h): Include.
6189
5876f503
JK
61902014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6191
6192 Fix TLS access for -static -pthread.
6193 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6194 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6195 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6196
802e8e6d
PA
61972014-05-20 Pedro Alves <palves@redhat.com>
6198
6199 * linux-aarch64-low.c (aarch64_insert_point)
6200 (aarch64_remove_point): No longer check whether the type is
6201 supported here. Adjust to new interface.
6202 (the_low_target): Install aarch64_supports_z_point_type as
6203 supports_z_point_type method.
6204 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6205 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6206 instead of a Z packet char. Adjust.
6207 (arm_supports_z_point_type): New function.
6208 (arm_insert_point, arm_remove_point): Adjust to new interface.
6209 (the_low_target): Install arm_supports_z_point_type.
6210 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6211 (cris_insert_point, cris_remove_point): Adjust to new interface.
6212 Don't check whether the type is supported here.
6213 (the_low_target): Install cris_supports_z_point_type.
6214 * linux-low.c (linux_supports_z_point_type): New function.
6215 (linux_insert_point, linux_remove_point): Adjust to new interface.
6216 * linux-low.h (struct linux_target_ops) <insert_point,
6217 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6218 raw_breakpoint pointer parameter.
6219 <supports_z_point_type>: New method.
6220 * linux-mips-low.c (mips_supports_z_point_type): New function.
6221 (mips_insert_point, mips_remove_point): Adjust to new interface.
6222 Use mips_supports_z_point_type.
6223 (the_low_target): Install mips_supports_z_point_type.
6224 * linux-ppc-low.c (the_low_target): Install NULL as
6225 supports_z_point_type method.
6226 * linux-s390-low.c (the_low_target): Install NULL as
6227 supports_z_point_type method.
6228 * linux-sparc-low.c (the_low_target): Install NULL as
6229 supports_z_point_type method.
6230 * linux-x86-low.c (x86_supports_z_point_type): New function.
6231 (x86_insert_point): Adjust to new insert_point interface. Use
6232 insert_memory_breakpoint. Adjust to new
6233 i386_low_insert_watchpoint interface.
6234 (x86_remove_point): Adjust to remove_point interface. Use
6235 remove_memory_breakpoint. Adjust to new
6236 i386_low_remove_watchpoint interface.
6237 (the_low_target): Install x86_supports_z_point_type.
6238 * lynx-low.c (lynx_target_ops): Install NULL as
6239 supports_z_point_type callback.
6240 * nto-low.c (nto_supports_z_point_type): New.
6241 (nto_insert_point, nto_remove_point): Adjust to new interface.
6242 (nto_target_ops): Install nto_supports_z_point_type.
6243 * mem-break.c: Adjust intro comment.
6244 (struct raw_breakpoint) <raw_type, size>: New fields.
6245 <inserted>: Update comment.
6246 <shlib_disabled>: Delete field.
6247 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6248 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6249 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6250 (raw_bkpt_type_to_target_hw_bp_type): New function.
6251 (find_enabled_raw_code_breakpoint_at): New function.
6252 (find_raw_breakpoint_at): New type and size parameters. Use them.
6253 (insert_memory_breakpoint): New function, based off
6254 set_raw_breakpoint_at.
6255 (remove_memory_breakpoint): New function.
6256 (set_raw_breakpoint_at): Reimplement.
6257 (set_breakpoint): New, based on set_breakpoint_at.
6258 (set_breakpoint_at): Reimplement.
6259 (delete_raw_breakpoint): Go through the_target->remove_point
6260 instead of assuming memory breakpoints.
6261 (find_gdb_breakpoint_at): Delete.
6262 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6263 (find_gdb_breakpoint): New function.
6264 (set_gdb_breakpoint_at): Delete.
6265 (z_type_supported): New function.
6266 (set_gdb_breakpoint_1): New function, loosely based off
6267 set_gdb_breakpoint_at.
6268 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6269 (delete_gdb_breakpoint_at): Delete.
6270 (delete_gdb_breakpoint_1): New function, loosely based off
6271 delete_gdb_breakpoint_at.
6272 (delete_gdb_breakpoint): New function.
6273 (clear_gdb_breakpoint_conditions): Rename to ...
6274 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6275 breakpoint.
6276 (add_condition_to_breakpoint): Make static.
6277 (add_breakpoint_condition): Take a struct breakpoint pointer
6278 instead of an address. Adjust.
6279 (gdb_condition_true_at_breakpoint): Rename to ...
6280 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6281 z_type parameter.
6282 (gdb_condition_true_at_breakpoint): Reimplement.
6283 (add_breakpoint_commands): Take a struct breakpoint pointer
6284 instead of an address. Adjust.
6285 (gdb_no_commands_at_breakpoint): Rename to ...
6286 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6287 parameter. Return true if no breakpoint was found. Change debug
6288 output.
6289 (gdb_no_commands_at_breakpoint): Reimplement.
6290 (run_breakpoint_commands): Rename to ...
6291 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6292 and change return type to boolean.
6293 (run_breakpoint_commands): New function.
6294 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6295 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6296 breakpoint. Go through the_target->remove_point instead of
6297 assuming memory breakpoint.
6298 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6299 software and hardware breakpoints.
6300 (reinsert_raw_breakpoint): Go through the_target->insert_point
6301 instead of assuming memory breakpoint.
6302 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6303 software and hardware breakpoints.
6304 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6305 Check both software and hardware breakpoints.
6306 (validate_inserted_breakpoint): Assert the breakpoint is a
6307 software breakpoint. Set the inserted flag to -1 instead of
6308 setting shlib_disabled.
6309 (delete_disabled_breakpoints): Adjust.
6310 (validate_breakpoints): Only validate software breakpoints.
6311 Adjust to inserted flag change.
6312 (check_mem_read, check_mem_write): Skip breakpoint types other
6313 than software breakpoints. Adjust to inserted flag change.
6314 * mem-break.h (enum raw_bkpt_type): New enum.
6315 (raw_breakpoint, struct process_info): Forward declare.
6316 (Z_packet_to_target_hw_bp_type): Delete declaration.
6317 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6318 (set_gdb_breakpoint, delete_gdb_breakpoint)
6319 (clear_breakpoint_conditions): New declarations.
6320 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6321 (breakpoint_inserted_here): Update comment.
6322 (add_breakpoint_condition, add_breakpoint_commands): Replace
6323 address parameter with a breakpoint pointer parameter.
6324 (gdb_breakpoint_here): Update comment.
6325 (delete_gdb_breakpoint_at): Delete.
6326 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6327 * server.c (process_point_options): Take a struct breakpoint
6328 pointer instead of an address. Adjust.
6329 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6330 delete_gdb_breakpoint.
6331 * spu-low.c (spu_target_ops): Install NULL as
6332 supports_z_point_type method.
6333 * target.h: Include mem-break.h.
6334 (struct target_ops) <prepare_to_access_memory>: Update comment.
6335 <supports_z_point_type>: New field.
6336 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6337 instead of a char. Also take a raw breakpoint pointer.
6338 * win32-arm-low.c (the_low_target): Install NULL as
6339 supports_z_point_type.
6340 * win32-i386-low.c (i386_supports_z_point_type): New function.
6341 (i386_insert_point, i386_remove_point): Adjust to new interface.
6342 (the_low_target): Install i386_supports_z_point_type.
6343 * win32-low.c (win32_supports_z_point_type): New function.
6344 (win32_insert_point, win32_remove_point): Adjust to new interface.
6345 (win32_target_ops): Install win32_supports_z_point_type.
6346 * win32-low.h (struct win32_target_ops):
6347 <supports_z_point_type>: New method.
6348 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6349 instead of a char. Also take a raw breakpoint pointer.
6350
932539e3
PA
63512014-05-20 Pedro Alves <palves@redhat.com>
6352
6353 * mem-break.h: Include break-common.h.
6354 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6355 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6356 (Z_packet_to_target_hw_bp_type): New declaration.
6357 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6358 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6359 (Z_PACKET_ACCESS_WP): Delete macros.
6360 (Z_packet_to_hw_type): Delete function.
6361 * i386-low.h: Don't include break-common.h here.
6362 (Z_packet_to_hw_type): Delete declaration.
6363 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6364 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6365 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6366 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6367 * linux-aarch64-low.c: Don't include break-common.h here.
6368 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6369 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6370 (Z_packet_to_target_hw_bp_type): Delete function.
6371 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6372 function.
6373 (mips_insert_point, mips_remove_point): Use
6374 Z_packet_to_target_hw_bp_type.
6375
4ff0d3d8
PA
63762014-05-20 Pedro Alves <palves@redhat.com>
6377
6378 * linux-aarch64-low.c: Include break-common.h.
6379 (enum target_point_type): Delete.
6380 (Z_packet_to_point_type): Rename to ...
6381 (Z_packet_to_target_hw_bp_type): ... this, and return a
6382 target_hw_bp_type instead.
6383 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6384 instead of an enum target_point_type.
6385 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6386 breakpoint type.
6387 (aarch64_dr_state_insert_one_point)
6388 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6389 (aarch64_handle_aligned_watchpoint)
6390 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6391 Take an enum target_hw_bp_type instead of an enum
6392 target_point_type.
6393 (aarch64_supports_z_point_type): New function.
6394 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6395 use Z_packet_to_target_hw_bp_type.
6396
786dc519
JB
63972014-05-20 Joel Brobecker <brobecker@adacore.com>
6398
6399 * configure.ac: Only use -Werror by default when DEVELOPMENT
6400 is true.
6401 * configure: Regenerate.
6402
9e0aa64f
JK
64032014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6404
6405 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6406 * linux-x86-low.c (X86_64_USER_REGS): New.
6407 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6408
2b577b92
YQ
64092014-04-28 Yao Qi <yao@codesourcery.com>
6410
6411 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6412 name.
6413
94611da2
PA
64142014-04-25 Pedro Alves <palves@redhat.com>
6415
6416 PR server/16255
6417 * linux-low.c (linux_attach_fail_reason_string): New function.
6418 (linux_attach_lwp): Delete.
6419 (linux_attach_lwp_1): Rename to ...
6420 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6421 argument. Remove "initial" parameter. Return int instead of
6422 void. Don't error or warn here.
6423 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6424 failure to attach to the tgid. Call warning when failing to
6425 attach to an lwp.
6426 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6427 argument. Remove "initial" parameter. Return int instead of
6428 void. Don't error or warn here.
6429 (linux_attach_fail_reason_string): New declaration.
6430 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6431 interface change. Use linux_attach_fail_reason_string.
6432
01f9f808
MS
64332014-04-24 Michael Sturm <michael.sturm@mintel.com>
6434 Walfred Tedeschi <walfred.tedeschi@intel.com>
6435
6436 * Makefile.in: Added rules to handle new files
6437 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6438 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6439 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6440 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6441 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6442 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6443 x32-avx512-linux.o.
6444 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6445 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6446 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6447 i386/x32-avx512.xml.
6448 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6449 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6450 i386/x32-avx512-linux.xml.
6451 * i387-fp.c (num_avx512_k_registers): New constant for number
6452 of K registers.
6453 (num_avx512_zmmh_low_registers): New constant for number of
6454 lower ZMM registers (0-15).
6455 (num_avx512_zmmh_high_registers): New constant for number of
6456 higher ZMM registers (16-31).
6457 (num_avx512_ymmh_registers): New contant for number of higher
6458 YMM registers (ymm16-31 added by avx521 on x86_64).
6459 (num_avx512_xmm_registers): New constant for number of higher
6460 XMM registers (xmm16-31 added by AVX512 on x86_64).
6461 (struct i387_xsave): Add space for AVX512 registers.
6462 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6463 Add code to handle AVX512 registers.
6464 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6465 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6466 prototypei from generated file.
6467 (tdesc_amd64_avx512_linux): Likewise.
6468 (init_registers_x32_avx512_linux): Likewise.
6469 (tdesc_x32_avx512_linux): Likewise.
6470 (init_registers_i386_avx512_linux): Likewise.
6471 (tdesc_i386_avx512_linux): Likewise.
6472 (x86_64_regmap): Add AVX512 registers.
6473 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6474 mask.
6475 (initialize_low_arch): Add code to initialize AVX512 registers.
6476
51aa91f9
PA
64772014-04-23 Pedro Alves <palves@redhat.com>
6478
6479 * mem-break.c (find_gdb_breakpoint_at): Make static.
6480 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6481
a4165e94
PA
64822014-04-23 Pedro Alves <palves@redhat.com>
6483
6484 * i386-low.c: Don't include break-common.h here.
6485 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6486 prototype to take target_hw_bp_type as argument instead of a Z
6487 packet char.
6488 * i386-low.h: Include break-common.h here.
6489 (Z_packet_to_hw_type): Declare.
6490 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6491 prototypes.
6492 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6493 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6494 (x86_remove_point): Convert the packet number to a
6495 target_hw_bp_type before calling i386_low_remove_watchpoint.
6496 * win32-i386-low.c (i386_insert_point): Convert the packet number
6497 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6498 (i386_remove_point): Convert the packet number to a
6499 target_hw_bp_type before calling i386_low_remove_watchpoint.
6500
b8acf843
PA
65012014-04-23 Pedro Alves <palves@redhat.com>
6502
6503 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6504
d708bcd1
PA
65052014-04-10 Pedro Alves <palves@redhat.com>
6506
6507 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6508 Check if the condition or command is NULL before checking if the
6509 breakpoint is known. On success, return true.
6510 * mem-break.h (add_breakpoint_condition): Document return.
6511 (add_breakpoint_commands): Add describing comment.
6512 * server.c (skip_to_semicolon): New function.
6513 (process_point_options): Use it.
6514
2eec7d5b
PA
65152014-04-09 Pedro Alves <palves@redhat.com>
6516
6517 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6518 to lwpid_of.
6519
fa96cb38
PA
65202014-02-27 Pedro Alves <palves@redhat.com>
6521
6522 PR 12702
6523 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6524 macros.
6525 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6526 output.
6527 (last_thread_of_process_p): Take a PID argument instead of a
6528 thread pointer.
6529 (linux_wait_for_lwp): Delete.
6530 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6531 functions.
6532 (linux_low_filter_event): New function, party factored out from
6533 linux_wait_for_event.
6534 (linux_wait_for_event): Rename to ...
6535 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6536 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6537 sigsuspend. Check for zombie leaders.
6538 (linux_wait_for_event): Reimplement as wrapper around
6539 linux_wait_for_event_filtered.
6540 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6541 a normal or signal exit is seen, it's the whole process exiting.
6542 (wait_for_sigstop): No longer a for_each_inferior callback.
6543 Rewrite on top of linux_wait_for_event_filtered.
6544 (stop_all_lwps): Call wait_for_sigstop directly.
6545 * server.c (resume, handle_target_event): Handle
6546 TARGET_WAITKIND_NO_RESUMED.
6547
d763de10
JB
65482014-02-26 Joel Brobecker <brobecker@adacore.com>
6549
6550 * win32-low.c (psapi_get_dll_name,
6551 * win32_CreateToolhelp32Snapshot): Delete.
6552 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6553 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6554 Delete.
6555 (handle_load_dll): Add function description.
6556 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6557
850a0f76
JB
65582014-02-26 Joel Brobecker <brobecker@adacore.com>
6559
6560 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6561 Add comment.
6562 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6563 base address when calling win32_add_one_solib.
6564 (handle_load_dll): Delete local variable load_addr.
6565 Remove 0x1000 offset applied to DLL base address when calling
6566 win32_add_one_solib.
6567 (handle_unload_dll): Add comment.
6568
f25b3fc3
JB
65692014-02-26 Joel Brobecker <brobecker@adacore.com>
6570
6571 * win32-low.c (win32_add_all_dlls): Renames
6572 win32_ensure_ntdll_loaded. Rewrite function documentation.
6573 Adjust implementation to always load all DLLs.
6574 Add 0x1000 offset to DLL base address when calling
6575 win32_add_one_solib.
6576 (child_initialization_done): New static global.
6577 (do_initial_child_stuff): Set child_initialization_done to
6578 zero during child initialization, and 1 after. Replace call
6579 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6580 Add comment.
6581 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6582 (handle_unload_dll): Add function documentation.
6583 (get_child_debug_event): Ignore load and unload DLL events
6584 during child initialization.
6585
d86d4aaf
DE
65862014-02-20 Doug Evans <dje@google.com>
6587
3bc32da3 6588 Remove global all_lwps.
d86d4aaf
DE
6589 * inferiors.h (ptid_of): Move here from linux-low.h.
6590 (pid_of, lwpid_of): Ditto.
6591 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6592 parameter is a struct thread_info * now.
6593 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6594 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6595 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6596 directly.
6597 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6598 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6599 * linux-arm-low.c (update_registers_callback): Update, "entry"
6600 parameter is a struct thread_info * now.
6601 Fetch lwpid from current_inferior directly.
6602 (arm_insert_point): Pass &all_threads to find_inferior instead of
6603 &all_lwps.
6604 (arm_remove_point): Ditto.
6605 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6606 (arm_prepare_to_resume): Fetch pid from thread.
6607 (arm_read_description): Fetch lwpid from current_inferior directly.
6608 * linux-low.c (all_lwps): Delete.
6609 (delete_lwp): Delete call to remove_inferior.
6610 (handle_extended_wait): Fetch lwpid from thread.
6611 (add_lwp): Don't set lwp->entry.id. Remove call to
6612 add_inferior_to_list.
6613 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6614 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6615 (kill_one_lwp_callback): Ditto.
6616 (linux_kill): Don't dereference NULL pointer.
6617 Fetch ptid,lwpid from thread.
6618 (get_detach_signal): Fetch ptid from thread.
6619 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6620 Simplify call to regcache_invalidate_thread.
6621 (delete_lwp_callback): Update, "entry" parameter is a
6622 struct thread_info * now. Fetch pid from thread.
6623 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6624 (status_pending_p_callback): Update, "entry" parameter is a
6625 struct thread_info * now. Fetch ptid from thread.
6626 (find_lwp_pid): Update, "entry" parameter is a
6627 struct thread_info * now.
6628 (linux_wait_for_lwp): Fetch pid from thread.
6629 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6630 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6631 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6632 (dequeue_one_deferred_signal): Ditto.
6633 (cancel_breakpoint): Fetch ptid from current_inferior.
6634 (linux_wait_for_event): Pass &all_threads to find_inferior,
6635 not &all_lwps. Fetch ptid, lwpid from thread.
6636 (count_events_callback): Update, "entry" parameter is a
6637 struct thread_info * now.
6638 (select_singlestep_lwp_callback): Ditto.
6639 (select_event_lwp_callback): Ditto.
6640 (cancel_breakpoints_callback): Ditto.
6641 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6642 not &all_lwps.
6643 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6644 (unsuspend_one_lwp): Update, "entry" parameter is a
6645 struct thread_info * now.
6646 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6647 not &all_lwps.
6648 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6649 Fetch lwpid from thread, not lwp.
6650 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6651 Pass &all_threads to find_inferior, not &all_lwps.
6652 (send_sigstop): Fetch lwpid from thread, not lwp.
6653 (send_sigstop_callback): Update, "entry" parameter is a
6654 struct thread_info * now.
6655 (suspend_and_send_sigstop_callback): Ditto.
6656 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6657 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6658 struct thread_info * now.
6659 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6660 from thread, lwp.
6661 (lwp_running): Update, "entry" parameter is a
6662 struct thread_info * now.
6663 (stop_all_lwps): Fetch ptid from thread.
6664 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6665 (linux_resume_one_lwp): Fetch lwpid from thread.
6666 (linux_set_resume_request): Update, "entry" parameter is a
6667 struct thread_info * now. Fetch pid, lwpid from thread.
6668 (resume_status_pending_p): Update, "entry" parameter is a
6669 struct thread_info * now.
6670 (need_step_over_p): Ditto. Fetch lwpid from thread.
6671 (start_step_over): Fetch lwpid from thread.
6672 (linux_resume_one_thread): Update, "entry" parameter is a
6673 struct thread_info * now. Fetch lwpid from thread.
6674 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6675 (proceed_one_lwp): Update, "entry" parameter is a
6676 struct thread_info * now. Fetch lwpid from thread.
6677 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6678 struct thread_info * now.
6679 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6680 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6681 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6682 directly.
6683 (regsets_store_inferior_registers): Ditto.
6684 (fetch_register, store_register): Ditto.
6685 (linux_read_memory, linux_write_memory): Ditto.
6686 (linux_request_interrupt): Ditto.
6687 (linux_read_auxv): Ditto.
6688 (linux_xfer_siginfo): Ditto.
6689 (linux_qxfer_spu): Ditto.
6690 (linux_qxfer_libraries_svr4): Ditto.
6691 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6692 moved to inferiors.h.
6693 (get_lwp): Delete.
6694 (get_thread_lwp): Update.
6695 (struct lwp_info): Delete member "entry". Simplify comment for
6696 member "thread".
6697 (all_lwps): Delete.
6698 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6699 current_inferior directly.
6700 (update_watch_registers_callback): Update, "entry" parameter is a
6701 struct thread_info * now. Fetch pid from thread.
6702 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6703 (mips_insert_point): Fetch lwpid from current_inferior.
6704 Pass &all_threads to find_inferior, not &all_lwps.
6705 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6706 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6707 directly.
6708 (mips_stopped_data_address): Ditto.
6709 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6710 directly.
6711 * linux-tile-low.c (tile_arch_setup): Ditto.
6712 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6713 (update_debug_registers_callback): Update, "entry" parameter is a
6714 struct thread_info * now. Fetch pid from thread.
6715 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6716 Pass &all_threads to find_inferior, not &all_lwps.
6717 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6718 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6719 Pass &all_threads to find_inferior, not &all_lwps.
6720 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6721 (i386_dr_low_get_status): Ditto.
6722 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6723 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6724 (x86_linux_read_description): Ditto.
6725 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6726
3b8361aa
DE
67272014-02-20 Doug Evans <dje@google.com>
6728
6729 * inferiors.c (get_first_inferior): Fix buglet.
6730
f7667f0d
DE
67312014-02-19 Doug Evans <dje@google.com>
6732
6733 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6734 * inferiors.c (add_thread): Change result type to struct thread_info *.
6735 All callers updated.
6736 (add_lwp): Call add_thread here instead of in callers.
6737 All callers updated.
6738 * linux-low.h (get_lwp_thread): Rewrite.
6739 (struct lwp_info): New member "thread".
6740
b3312d80
DE
67412014-02-19 Doug Evans <dje@google.com>
6742
6743 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6744 All callers updated.
6745
ecc6f45c
DE
67462014-02-19 Doug Evans <dje@google.com>
6747
6748 * inferiors.c (add_thread): Fix whitespace.
6749
649ebbca
DE
67502014-02-19 Doug Evans <dje@google.com>
6751
6752 * dll.c (clear_dlls): Replace accessing list implemention details
6753 with API function.
6754 * gdbthread.h (get_first_thread): Declare.
6755 * inferiors.c (for_each_inferior_with_data): New function.
6756 (get_first_thread): New function.
6757 (find_thread_ptid): Simplify.
6758 (get_first_inferior): New function.
6759 (clear_list): Delete.
6760 (one_inferior_p): New function.
6761 (clear_inferior_list): New function.
6762 (clear_inferiors): Update.
6763 * inferiors.h (for_each_inferior_with_data): Declare.
6764 (clear_inferior_list): Declare.
6765 (one_inferior_p): Declare.
6766 (get_first_inferior): Declare.
6767 * linux-low.c (linux_wait_for_event): Replace accessing list
6768 implemention details with API function.
6769 * server.c (target_running): Ditto.
6770 (accumulate_file_name_length): New function.
6771 (emit_dll_description): New function.
6772 (handle_qxfer_libraries): Replace accessing list implemention
6773 details with API function.
6774 (handle_qxfer_threads_worker): New function.
6775 (handle_qxfer_threads_proper): Replace accessing list implemention
6776 details with API function.
6777 (handle_query): Ditto.
6778 (visit_actioned_threads_callback_ftype): New typedef.
6779 (visit_actioned_threads_data): New struct.
6780 (visit_actioned_threads): Rewrite to be find_inferior callback.
6781 (resume): Call find_inferior.
6782 (handle_status): Replace accessing list implemention
6783 details with API function.
6784 (process_serial_event): Replace accessing list implemention details
6785 with API function.
6786 * target.c (set_desired_inferior): Replace accessing list implemention
6787 details with API function.
6788 * tracepoint.c (same_process_p): New function.
6789 (gdb_agent_about_to_close): Replace accessing list implemention
6790 details with API function.
6791 * win32-low.c (child_delete_thread): Replace accessing list
6792 implemention details with API function.
6793 (match_dll_by_basename): New function.
6794 (dll_is_loaded_by_basename): New function.
6795 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6796 details call to dll_is_loaded_by_basename.
6797
80894984
DE
67982014-02-19 Doug Evans <dje@google.com>
6799
6800 * dll.h (struct dll_info): Add comment.
6801 * gdbthread.h (struct thread_info): Add comment.
6802 (current_ptid): Simplify.
6803 * inferiors.c (add_process): Update.
6804 (remove_process): Update.
6805 * inferiors.h (struct process_info): Rename member "head" to "entry".
6806 * linux-low.c (delete_lwp): Update.
6807 (add_lwp): Update.
6808 (last_thread_of_process_p): Update.
6809 (kill_one_lwp_callback, linux_kill): Update.
6810 (status_pending_p_callback): Update.
6811 (wait_for_sigstop): Update. Simplify read of ptid.
6812 (start_step_over): Update.
6813 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6814 (get_lwp_thread): Update.
6815 (struct lwp_info): Rename member "head" to "entry".
6816 * regcache.h (inferior_list_entry): Delete.
6817 * server.c (kill_inferior_callback): Update.
6818 (detach_or_kill_inferior_callback): Update.
6819 (print_started_pid): Update.
6820 (print_attached_pid): Update.
6821 (process_serial_event): Simplify read of ptid.
6822 * thread-db.c (thread_db_create_event): Update.
6823 (thread_db_get_tls_address): Update.
6824 * win32-low.c (current_inferior_ptid): Simplify.
6825
46917d26
TT
68262014-02-19 Tom Tromey <tromey@redhat.com>
6827
6828 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6829 argument.
6830 (target_supports_btrace): Update.
6831
0759a81e
YQ
68322014-02-14 Yao Qi <yao@codesourcery.com>
6833
6834 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6835 (rsp-low-ipa.o): New target.
6836
a7191e8b
TT
68372014-02-12 Tom Tromey <tromey@redhat.com>
6838
6839 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6840 convert_ascii_to_int.
6841 * regcache.c (registers_to_string): Likewise.
6842 * remote-utils.c (decode_M_packet): Likewise.
6843 * server.c (process_serial_event): Likewise.
6844
ff0e980e
TT
68452014-02-12 Tom Tromey <tromey@redhat.com>
6846
6847 * server.c (handle_query, handle_v_run): Use hex2bin, not
6848 unhexify.
6849 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6850
e9371aff
TT
68512014-02-12 Tom Tromey <tromey@redhat.com>
6852
6853 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6854 convert_int_to_ascii.
6855 * regcache.c (registers_to_string, collect_register_as_string):
6856 Likewise.
6857 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6858 Likewise.
6859 * server.c (process_serial_event): Likewise.
6860 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6861 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6862
971dc0b8
TT
68632014-02-12 Tom Tromey <tromey@redhat.com>
6864
6865 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6866 bin2hex, not hexify.
6867 * tracepoint.c (cmd_qtstatus): Likewise.
6868
0a822afb
TT
68692014-02-12 Tom Tromey <tromey@redhat.com>
6870
6871 * remote-utils.c (monitor_output): Pass explicit length to
6872 hexify.
6873
9c3d6531
TT
68742014-02-12 Tom Tromey <tromey@redhat.com>
6875
6876 * tracepoint.c: Include rsp-low.h.
6877 * server.c: Include rsp-low.h.
6878 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6879 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6880 declare.
6881 * remote-utils.c: Include rsp-low.h.
6882 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6883 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6884 (convert_int_to_ascii, convert_ascii_to_int): Move to
6885 common/rsp-low.c.
6886 * regcache.c: Include rsp-low.h.
6887 * ax.c: Include rsp-low.h.
6888 * Makefile.in (SFILES): Add common/rsp-low.c.
6889 (OBS): Add rsp-low.o.
6890 (rsp-low.o): New target.
6891
01fd3ea5
TT
68922014-02-12 Tom Tromey <tromey@redhat.com>
6893
6894 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6895 Include print-utils.h.
6896 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6897 (plongest, thirty_two, phex_nz): Remove.
6898 * Makefile.in (SFILES): Add common/print-utils.c.
6899 (OBS): Add print-utils.o.
6900 (print-utils-ipa.o): New target.
6901 (print-utils.o): New target.
6902 (IPA_OBJS): Add print-utils-ipa.o.
6903
e99dc820
TT
69042014-02-06 Tom Tromey <tromey@redhat.com>
6905
6906 * Makefile.in (SFILES): Fix indentation.
6907
ee1e2d4f
DE
69082014-02-05 Doug Evans <dje@google.com>
6909
6910 * linux-low.c (linux_wait_for_event): Improve comment.
6911 (linux_wait_1): Keep current_inferior in sync with event_child.
6912
f5a02773
DE
69132014-01-22 Doug Evans <dje@google.com>
6914
6915 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6916
87ce2a04
DE
69172014-01-22 Doug Evans <dje@google.com>
6918
6919 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6920 * configure: Regenerate.
6921 * config.in: Regenerate.
6922 * Makefile.in (SFILES): Add debug.c.
6923 (OBS): Add debug.o.
6924 * debug.c: New file.
6925 * debug.h: New file.
6926 * linux-aarch64-low.c (*): Update all debugging printfs to use
6927 debug_printf instead of fprintf.
6928 * linux-arm-low.c (*): Ditto.
6929 * linux-cris-low.c (*): Ditto.
6930 * linux-crisv32-low.c (*): Ditto.
6931 * linux-m32r-low.c (*): Ditto.
6932 * linux-sparc-low.c (*): Ditto.
6933 * linux-x86.c (*): Ditto.
6934 * linux-low.c (*): Ditto.
6935 (linux_wait_1): Add calls to debug_enter, debug_exit.
6936 (linux_wait): Remove redundant debugging printf.
6937 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6938 (linux_resume, unstop_all_lwps): Ditto.
6939 * mem-break.c (*): Update all debugging printfs to use
6940 debug_printf instead of fprintf.
6941 * remote-utils.c (*): Ditto.
6942 * thread-db.c (*): Ditto.
6943 * server.c #include <ctype.h>, "gdb_vecs.h".
6944 (debug_threads): Moved to debug.c.
6945 (*): Update all debugging printfs to use debug_printf instead of
6946 fprintf.
6947 (start_inferior): Replace call to fflush with call to debug_flush.
6948 (monitor_show_help): Mention set debug-format.
6949 (parse_debug_format_options): New function.
6950 (handle_monitor_command): Handle "monitor set debug-format".
6951 (gdbserver_usage): Mention --debug-format.
6952 (main): Parse --debug-format.
6953 * server.h (debug_threads): Declaration moved to debug.h.
6954 #include "debug.h".
6955 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6956 trace_debug_1 that uses debug_printf.
6957 (tracepoint_look_up_symbols): Update all debugging printfs to use
6958 debug_printf instead of fprintf.
6959
e671835b
BS
69602014-01-20 Baruch Siach <baruch@tkos.co.il>
6961
6962 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6963 sys/ptrace.h.
6964
b5737fa9
PA
69652014-01-17 Pedro Alves <palves@redhat.com>
6966
ea38d2a9 6967 PR build/16445
c7faa97a
PA
6968 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6969 defined after including gdb_proc_service.h.
b5737fa9 6970
40ed484e
DE
69712014-01-16 Doug Evans <dje@google.com>
6972
6973 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6974 (match_dll): Use it.
6975
969c39fb
MM
69762014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6977
6978 * target.h (target_ops) <read_btrace>: Change parameters and
6979 return type to allow error reporting.
6980 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6981 trace reading errors on.
6982 * linux-low.c (linux_low_read_btrace): Pass trace reading
6983 errors on.
6984 (linux_low_disable_btrace): New.
6985
ab7f45ba
DE
69862014-01-15 Doug Evans <dje@google.com>
6987
6988 * inferiors.c (thread_id_to_gdb_id): Delete.
6989 * inferiors.h (thread_id_to_gdb_id): Delete.
6990
66af0f44
EZ
69912014-01-13 Eli Zaretskii <eliz@gnu.org>
6992
6993 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6994 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6995 versions.
6996
9939e131
PA
69972014-01-08 Pedro Alves <palves@redhat.com>
6998
6999 * server.c (handle_status): Don't discard previous queued stop
7000 replies or thread's pending status here.
7001 (main) <disconnection>: Do it here instead.
7002
b7ea362b
PA
70032014-01-08 Pedro Alves <palves@redhat.com>
7004
7005 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7006 * server.c (visit_actioned_threads, handle_pending_status): New
7007 function.
7008 (handle_v_cont): Factor out parts to ...
7009 (resume): ... this new function. If in all-stop, and a thread
7010 being resumed has a pending status, report it without actually
7011 resuming.
7012 (myresume): Adjust to use the new 'resume' function.
7013 (clear_pending_status_callback, set_pending_status_callback)
7014 (find_status_pending_thread_callback): New functions.
7015 (handle_status): Handle the case of multiple threads having
7016 interesting statuses to report. Report threads' real last signal
7017 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7018 with an interesting thread to report the status for, instead of
7019 always reporting the status of the first thread.
7020
28498c42
JB
70212014-01-01 Joel Brobecker <brobecker@adacore.com>
7022
7023 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7024 * gdbreplay.c (gdbreplay_version): Likewise.
7025
f45c82da
YZ
70262013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7027
7028 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7029 iov.iov_len with the real length in use.
7030
379a5e2d
JB
70312013-12-13 Joel Brobecker <brobecker@adacore.com>
7032
7033 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7034 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7035 for all targets that use win32-low.c.
7036 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7037 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7038
4210d83e
PA
70392013-12-13 Pedro Alves <palves@redhat.com>
7040
7041 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7042 if equal to TARGET_WAITKIND_LOADED.
7043 * win32-low.c (cached_status): New static global.
7044 (win32_wait): Add declaration.
7045 (do_initial_child_stuff): Flush all initial pending debug events
7046 up to the initial breakpoint.
7047 (win32_wait): If CACHED_STATUS was set, return that instead
7048 of doing a real wait. Remove the code resuming the execution
7049 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7050 during the initial phase. Also remove the code changing
7051 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7052 TARGET_WAITKIND_STOPPED.
7053
e7f0d979
YQ
70542013-12-11 Yao Qi <yao@codesourcery.com>
7055
7056 * notif.c (handle_notif_ack): Return 0 if no notification
7057 matches.
7058
ebcf782c
DE
70592013-11-20 Doug Evans <dje@google.com>
7060
7061 * linux-low.c (linux_set_resume_request): Fix comment.
7062
20ad9378
DE
70632013-11-20 Doug Evans <dje@google.com>
7064
7065 * linux-low.c (resume_status_pending_p): Tweak comment.
7066
a196ebeb
WT
70672013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7068
7069 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7070 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7071 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7072 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7073 (srv_amd64_regobj): Add amd64-mpx.o.
7074 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7075 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7076 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7077 * i387-fp.c (num_pl_bnd_register) Added constant.
7078 (num_pl_bnd_cfg_registers) Added constant.
7079 (struct i387_xsave) Added reserved area and MPX fields.
7080 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7081 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7082 function.
7083 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7084 (init_registers_amd64_mpx_linux): Declare new function.
7085 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7086 (x86_64_regmap): Add MPX registers.
7087 (x86_linux_read_description): Add MPX case.
7088 (initialize_low_arch): Initialize MPX targets.
7089
0080a2f6
TT
70902013-11-18 Tom Tromey <tromey@redhat.com>
7091
7092 * configure: Rebuild.
7093 * configure.ac: Don't check for stdlib.h.
7094 * gdbreplay.c: Unconditionally include stdlib.h.
7095
2978b111
TT
70962013-11-18 Tom Tromey <tromey@redhat.com>
7097
7098 * config.in: Rebuild.
7099 * configure: Rebuild.
7100 * configure.ac: Don't use AC_HEADER_DIRENT.
7101
a3d08894
TT
71022013-11-18 Tom Tromey <tromey@redhat.com>
7103
7104 * server.h: Don't check HAVE_STRING_H.
7105 * gdbreplay.c: Don't check HAVE_STRING_H.
7106 * configure: Rebuild.
7107
0a5dd17d
TT
71082013-11-18 Tom Tromey <tromey@redhat.com>
7109
7110 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7111 LIBGNU.
7112
1bd2f0ba
TT
71132013-11-08 Tom Tromey <tromey@redhat.com>
7114
7115 * configure, config.in: Rebuild.
7116 * configure.ac: Remove unused configury.
7117
3266f10b
TT
71182013-11-08 Tom Tromey <tromey@redhat.com>
7119
7120 * acinclude.m4: Include common.m4, codeset.m4.
7121 * configure, config.in: Rebuild.
7122 * configure.ac: Use GDB_AC_COMMON.
7123
6682d959
AA
71242013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7125
7126 * linux-s390-low.c (HWCAP_S390_TE): New define.
7127 (s390_arch_setup): Consider the TE field in the HWCAP for
7128 determining 'have_regset_tdb'.
7129
fd0a4d76
SDJ
71302013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7131
7132 PR gdb/16014
7133 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7134 call to sizeof.
7135
1a3d890b
PA
71362013-10-02 Pedro Alves <palves@redhat.com>
7137
7138 * server.c (process_serial_event): Don't output "GDBserver
7139 exiting" if GDB is connected through stdio.
7140 * target.c (mywait): Likewise, be silent if GDB is connected
7141 through stdio.
7142
97ad4581
JB
71432013-10-01 Joel Brobecker <brobecker@adacore.com>
7144
7145 * lynx-low.c (lynx_add_threads_after_attach): New function.
7146 (lynx_attach): Remove call to add_thread. Add call to
7147 lynx_add_threads_after_attach instead.
7148
5b4e221c
MF
71492013-09-28 Mike Frysinger <vapier@gentoo.org>
7150
7151 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7152 * config.in, configure: Regenerated.
7153
ee47b2f8
YQ
71542013-09-18 Yao Qi <yao@codesourcery.com>
7155
7156 PR server/15959
7157 * server.c (start_inferior): Clear 'resume_info'.
7158
d6707650 71592013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7160
d6707650
JW
7161 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7162 for each register.
7163
9243dd0e 71642013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7165
9243dd0e
JW
7166 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7167 linux-tile-low.o to srv_tgtobj.
7168
c623a6ef
WN
71692013-09-16 Will Newton <will.newton@linaro.org>
7170
7171 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7172 out regs.
7173
fb71d39e
PA
71742013-09-06 Pedro Alves <palves@redhat.com>
7175
7176 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7177 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7178 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7179 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7180 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7181 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7182
8e7e9910
PA
71832013-09-06 Pedro Alves <palves@redhat.com>
7184
7185 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7186 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7187
7c3a12ca
PA
71882013-09-06 Pedro Alves <palves@redhat.com>
7189
7190 * linux-amd64-ipa.c: Include tracepoint.h.
7191 * linux-i386-ipa.c: Include tracepoint.h.
7192
8eb3d7b6
RW
71932013-09-06 Ricard Wanderlof <ricardw@axis.com>
7194
7195 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7196 (ps_get_thread_area): New function.
7197
eddddb9d
RW
71982013-09-06 Ricard Wanderlof <ricardw@axis.com>
7199
7200 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7201 (initialize_low_arch): Call init_registers_crisv32 rather than
7202 init_register_crisv32.
7203
533b0600
PA
72042013-09-05 Pedro Alves <palves@redhat.com>
7205
7206 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7207 to ...
7208 * hostio.h: ... this new file.
7209 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7210 win32-low.c: Include hostio.h.
7211
0ce3d3b5
PA
72122013-09-05 Pedro Alves <palves@redhat.com>
7213
7214 * server.h (gdb_client_data, handler_func, callback_handler_func)
7215 (delete_file_handler, add_file_handler, append_callback_event)
7216 (delete_callback_event, start_event_loop, initialize_event_loop):
7217 Move to event-loop.h and include it.
7218 * event-loop.h: New file.
7219
799cdc37
PA
72202013-09-05 Pedro Alves <palves@redhat.com>
7221
7222 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7223 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7224 (loaded_dll, unloaded_dll): Move to ...
7225 * dll.h: ... this new file.
7226 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7227
6a6bbd9d
PA
72282013-09-05 Pedro Alves <palves@redhat.com>
7229
7230 * server.h (current_process, get_thread_process, all_processes)
7231 (add_inferior_to_list, for_each_inferior, current_inferior)
7232 (remove_inferior, add_process, remove_process, find_process_pid)
7233 (have_started_inferiors_p, have_attached_inferiors_p)
7234 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7235 (clear_inferiors, find_inferior, find_inferior_id)
7236 (inferior_target_data, set_inferior_target_data)
7237 (inferior_regcache_data, set_inferior_regcache_data): Move to
7238 inferiors.h, and include it.
7239 * inferiors.h: New file.
7240
f699aaba
PA
72412013-09-05 Pedro Alves <palves@redhat.com>
7242
7243 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7244 Move ...
72f4393d 7245 * ax.h: ... here.
f699aaba 7246
c144c7a0
PA
72472013-09-05 Pedro Alves <palves@redhat.com>
7248
7249 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7250 tracepoint.h.
7251 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7252 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7253 (handle_tracepoint_general_set, handle_tracepoint_query)
7254 (tracepoint_finished_step, tracepoint_was_hit)
7255 (release_while_stepping_state_list, current_traceframe)
7256 (in_readonly_region, traceframe_read_mem)
7257 (fetch_traceframe_registers, traceframe_read_sdata)
7258 (traceframe_read_info, struct fast_tpoint_collect_status)
7259 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7260 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7261 (supply_fast_tracepoint_registers)
7262 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7263 (ipa_tdesc, claim_trampoline_space)
7264 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7265 (agent_mem_read, agent_get_trace_state_variable_value)
7266 (agent_set_trace_state_variable_value, agent_tsv_read)
7267 (agent_mem_read_string, get_raw_reg_func_addr)
7268 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7269 * tracepoint.h: ... this new file.
7270
ff42e6ab
PA
72712013-09-05 Pedro Alves <palves@redhat.com>
7272
7273 * server.h (perror_with_name, error, fatal, warning, paddress)
7274 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7275 include it.
7276 * utils.h: New file.
7277
541af0f4
PA
72782013-09-05 Pedro Alves <palves@redhat.com>
7279
7280 * server.h (remote_debug, noack_mode, transport_is_reliable)
7281 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7282 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7283 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7284 (write_enn, initialize_async_io, enable_async_io)
7285 (disable_async_io, check_remote_input_interrupt_request)
7286 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7287 (dead_thread_notify, prepare_resume_reply)
7288 (decode_address_to_semicolon, decode_address, decode_m_packet)
7289 (decode_M_packet, decode_X_packet, decode_xfer_write)
7290 (decode_search_memory_packet, unhexify, hexify)
7291 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7292 (look_up_one_symbol, relocate_instruction)
7293 (monitor_output): Move to remote-utils.h, and include it.
7294 * remote-utils.h: New file.
7295
eebdf26b
PA
72962013-09-05 Pedro Alves <palves@redhat.com>
7297
7298 * server.h (_): Delete.
7299
3aafd2ff
PA
73002013-09-02 Pedro Alves <palves@redhat.com>
7301
7302 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7303 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7304 allocated.
7305 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7306
cee83bcb
PM
73072013-09-02 Pierre Muller <muller@sourceware.org>
7308
7309 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7310 or WriteProcessMemory complete successfully and handle
7311 ERROR_PARTIAL_COPY error.
7312
9a13b2fa
PA
73132013-09-02 Pedro Alves <palves@redhat.com>
7314
7315 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7316 error instead of EIO.
7317
602e3198
JK
73182013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7319
7320 PR server/15604
7321 * linux-low.c: Include filestuff.h.
7322 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7323 * lynx-low.c: Include filestuff.h.
7324 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7325 * server.c: Include filestuff.h.
7326 (main): Call notice_open_fds.
7327 * spu-low.c: Include filestuff.h.
7328 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7329
96d7229d
LM
73302013-08-22 Luis Machado <lgustavo@codesourcery.com>
7331
7332 * Makefile.in: Explain why ../target and ../nat are not
7333 listed as include file search paths.
7334 (linux-waitpid.o): New object file rule.
7335 * configure.srv (srv_native_linux_obj): New variable.
7336 Replace all occurrences of linux native object files with
7337 $srv_native_linux_obj.
7338 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7339 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7340 (linux_enable_event_reporting): Remove declaration.
7341 (my_waitpid): Moved to common/linux-waitpid.c.
7342 (linux_wait_for_event): Pass ptid when calling
7343 linux_enable_event_reporting.
7344 (linux_supports_tracefork_flag): Remove.
7345 (linux_enable_event_reporting): Likewise.
7346 (linux_tracefork_grandchild): Remove.
7347 (STACK_SIZE): Moved to common/linux-ptrace.c.
7348 (linux_tracefork_child): Remove.
7349 (linux_test_for_tracefork): Remove.
7350 (linux_look_up_symbols): Call linux_supports_traceclone.
7351 (initialize_low): Remove call to linux_test_for_tracefork.
7352 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7353 common/linux-ptrace.h.
7354 (PTRACE_TYPE_ARG4): Likewise.
7355 Include linux-ptrace.h.
7356
32940073
PA
73572013-08-21 Pedro Alves <palves@redhat.com>
7358
7359 * config.in: Renegerate.
7360
33b60d58 73612013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 7362
33b60d58
LM
7363 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7364 (SFILES): Remove $(srcdir)/common/target-common.c and
7365 add $(srcdir)/target/waitstatus.c.
7366 (OBS): Remove target-common.o and add waitstatus.o.
7367 (server_h): Remove $(srcdir)/../common/target-common.h and
7368 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7369 and $(srcdir)/../target/waitstatus.h.
7370 (target-common.o): Remove.
7371 (waitstatus.o): New target object file.
7372 * target.h: Do not include target-common.h and
7373 include target/resume.h, target/wait.h and
7374 target/waitstatus.h.
7375
b8e1b30e
LM
73762013-08-13 Luis Machado <lgustavo@codesourcery.com>
7377
7378 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7379 to PTRACE_TYPE_ARG3.
7380 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7381 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7382 PTRACE_TYPE_ARG4.
7383 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7384 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7385
7a60ad40
YQ
73862013-07-27 Jie Zhang <jie@codesourcery.com>
7387 Daniel Jacobowitz <dan@codesourcery.com>
7388 Yao Qi <yao@codesourcery.com>
7389
7390 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7391 (mips-linux-watch.o): New rule.
7392 (mips_linux_watch_h): New variable.
7393 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7394 srv_tgtobj.
7395 * linux-mips-low.c: Include mips-linux-watch.h.
7396 (struct arch_process_info, struct arch_lwp_info): New.
7397 (update_watch_registers_callback): New function.
7398 (mips_linux_new_process, mips_linux_new_thread) New functions.
7399 (mips_linux_prepare_to_resume, mips_insert_point): New
7400 functions.
7401 (mips_remove_point, mips_stopped_by_watchpoint): New
7402 functions.
7403 (rsp_bp_type_to_target_hw_bp_type): New function.
7404 (mips_stopped_data_address): New function.
7405 (the_low_target): Add watchpoint support functions.
7406
de6f69ad
YQ
74072013-07-27 Yao Qi <yao@codesourcery.com>
7408
7409 * i386-low.c: Include break-common.h.
7410 (enum target_hw_bp_type): Remove.
7411
3360c0bf
LM
74122013-07-24 Luis Machado <lgustavo@codesourcery.com>
7413
7414 * Makefile.in (SFILES): /common/target-common.c.
7415 (OBS): Add target-common.o.
7416 (server_h): Add $(srcdir)/../common/target-common.h.
7417 (target-common.o): New target.
7418 * server.c (queue_stop_reply_callback): Free
7419 status string after use.
7420 * target.c (target_waitstatus_to_string): Remove.
7421 * target.h: Include target-common.h.
7422 (resume_kind): Likewise.
7423 (target_waitkind): Likewise.
7424 (target_waitstatus): Likewise.
7425 (TARGET_WNOHANG): Likewise.
7426
bd885420
YQ
74272013-07-04 Yao Qi <yao@codesourcery.com>
7428
7429 * Makefile.in (host_alias): Use @host_noncanonical@.
7430 (target_alias): Use @target_noncanonical@.
7431 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7432 ACX_NONCANONICAL_HOST.
7433 * configure: Regenerated.
7434
7435 Revert:
7436 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7437
7438 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7439 * configure: Rebuild.
7440 * Makefile.in (version_host, version_target): Get from configure.
7441 (version.c): Use $(version_host) and $(version_target).
7442
17ef446e
PA
74432013-07-03 Pedro Alves <palves@redhat.com>
7444
7445 * Makefile.in (config.status): Depend on development.sh.
7446 * acinclude.m4: Include libmcheck.m4.
7447 * configure: Regenerate.
7448
7a9a7487
MG
74492013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7450
7451 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7452 attribute inside the parentheses.
7453 (winapi_DebugSetProcessKillOnExit): Ditto.
7454 (winapi_DebugBreakProcess): Ditto.
7455 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 7456
49b64de6
MG
74572013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7458
7459 * notif.h (notif_event): Add a dummy member to avoid compiler
7460 errors.
7461
d5749ee7
PA
74622013-07-01 Pedro Alves <palves@redhat.com>
7463
7464 * hostio.c (HOSTIO_PATH_MAX): Define.
7465 (require_filename, handle_open, handle_unlink, handle_readlink):
7466 Use it.
7467
d8d2a3ee
PA
74682013-07-01 Pedro Alves <palves@redhat.com>
7469
7470 * server.h: Include "pathmax.h".
7471 * linux-low.c: Don't include sys/param.h.
7472 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7473 MAXPATHLEN.
7474 * win32-low.c: Don't include sys/param.h.
7475 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7476
bc7dea8d
PA
74772013-07-01 Pedro Alves <palves@redhat.com>
7478
7479 * event-loop.c: Don't check HAVE_UNISTD_H before including
7480 <unistd.h>.
7481 * gdbreplay.c: Likewise.
7482 * remote-utils.c: Likewise.
7483 * server.c: Likewise.
7484 * configure.ac: Don't check for unistd.h.
7485 * configure: Regenerate.
7486
d6c2da54
TT
74872013-06-28 Tom Tromey <tromey@redhat.com>
7488
7489 * Makefile.in (version.c): Use version.in, not
7490 common/version.in.
7491
257b6bec
MG
74922013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7493
7494 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7495 * configure: Rebuild.
7496 * Makefile.in (version_host, version_target): Get from configure.
7497 (version.c): Use $(version_host) and $(version_target).
7498
86ebe149
DK
74992013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7500
7501 Fix trace-status to output user name without trailing colon.
7502 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7503
f30aa5af
DK
75042013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7505
7506 Fix trace-status to output proper start-time and stop-time.
7507 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7508 output start time and stop time in hex as gdb expects.
7509
28a93511
YQ
75102013-06-26 Pedro Alves <pedro@codesourcery.com>
7511
7512 * tracepoint.c (build_traceframe_info_xml): Output trace state
7513 variables present in the trace buffer.
7514
01208463
TT
75152013-06-24 Tom Tromey <tromey@redhat.com>
7516
7517 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7518 create-version.sh.
7519 (version.o): Remove.
7520 * gdbreplay.c: Include version.h.
7521 (version, host_name): Don't declare.
7522 * server.h: Include version.h.
7523 (version, host_name): Don't declare.
7524
760256f9
PA
75252013-06-12 Pedro Alves <palves@redhat.com>
7526
7527 * linux-x86-low.c (linux_is_elf64): Delete global.
7528 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7529 with local linux_pid_exe_is_elf_64_file use.
7530
030031ee
PA
75312013-06-11 Pedro Alves <palves@redhat.com>
7532
7533 * linux-low.c (regset_disabled, disable_regset): New functions.
7534 (regsets_fetch_inferior_registers)
7535 (regsets_store_inferior_registers): Use them.
7536 (initialize_regsets_info); Don't allocate the disabled_regsets
7537 array here.
7538 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7539 comment.
7540
5da6eb0a
PA
75412013-06-11 Pedro Alves <palves@redhat.com>
7542
7543 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7544 xmalloc.
7545
7e5aaa09
PA
75462013-06-11 Pedro Alves <palves@redhat.com>
7547
7548 * linux-x86-low.c (initialize_low_arch): Call
7549 init_registers_x32_avx_linux.
7550
d878444c
JK
75512013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7552
7553 Fix compatibility with Android Bionic.
7554 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7555 it is not empty.
7556
3aee8918
PA
75572013-06-07 Pedro Alves <palves@redhat.com>
7558
5f2b57b5 7559 PR server/14823
3aee8918
PA
7560 * Makefile.in (OBS): Add tdesc.o.
7561 (IPA_OBJS): Add tdesc-ipa.o.
7562 (tdesc-ipa.o): New rule.
7563 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7564 interface.
7565 * linux-low.c (new_inferior): Delete.
7566 (disabled_regsets, num_regsets): Delete.
7567 (linux_add_process): Adjust to set the new per-process
7568 new_inferior flag.
7569 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7570 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7571 was a stop. When calling arch_setup, switch the current inferior
7572 to the thread that got an event.
7573 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7574 (regsets_fetch_inferior_registers)
7575 (regsets_store_inferior_registers): New regsets_info parameter.
7576 Adjust to use it.
7577 (linux_register_in_regsets): New regs_info parameter. Adjust to
7578 use it.
7579 (register_addr, fetch_register, store_register): New usrregs_info
7580 parameter. Adjust to use it.
7581 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7582 parameter regs_info. Adjust to use it.
7583 (linux_fetch_registers): Get the current inferior's regs_info, and
7584 adjust to use it.
7585 (linux_store_registers): Ditto.
7586 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7587 (initialize_low): Don't initialize the target_regsets here. Call
7588 initialize_low_arch.
7589 * linux-low.h (target_regsets): Delete declaration.
7590 (struct regsets_info): New.
7591 (struct usrregs_info): New.
7592 (struct regs_info): New.
7593 (struct process_info_private) <new_inferior>: New field.
7594 (struct linux_target_ops): Delete the num_regs, regmap, and
7595 regset_bitmap fields. New field regs_info.
7596 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7597 * i387-fp.c (num_xmm_registers): Delete.
7598 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7599 calls to new interface.
7600 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7601 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7602 Infer the number of xmm registers from the regcache's target
7603 description.
7604 * i387-fp.h (num_xmm_registers): Delete.
7605 * inferiors.c (add_thread): Don't install the thread's regcache
7606 here.
7607 * proc-service.c (gregset_info): Fetch the current inferior's
7608 regs_info. Adjust to use it.
7609 * regcache.c: Include tdesc.h.
7610 (register_bytes, reg_defs, num_registers)
7611 (gdbserver_expedite_regs): Delete.
7612 (get_thread_regcache): If the thread doesn't have a regcache yet,
7613 create one, instead of aborting gdbserver.
7614 (regcache_invalidate_one): Rename to ...
7615 (regcache_invalidate_thread): ... this.
7616 (regcache_invalidate_one): New.
7617 (regcache_invalidate): Only invalidate registers of the current
7618 process.
7619 (init_register_cache): Add target_desc parameter, and use it.
7620 (new_register_cache): Ditto. Assert the target description has a
7621 non zero registers_size.
7622 (regcache_cpy): Add assertions. Adjust.
7623 (realloc_register_cache, set_register_cache): Delete.
7624 (registers_to_string, registers_from_string): Adjust.
7625 (find_register_by_name, find_regno, find_register_by_number)
7626 (register_cache_size): Add target_desc parameter, and use it.
7627 (free_register_cache_thread, free_register_cache_thread_one)
7628 (regcache_release, register_cache_size): New.
7629 (register_size): Add target_desc parameter, and use it.
7630 (register_data, supply_register, supply_register_zeroed)
7631 (supply_regblock, supply_register_by_name, collect_register)
7632 (collect_register_as_string, collect_register_by_name): Adjust.
7633 * regcache.h (struct target_desc): Forward declare.
7634 (struct regcache) <tdesc>: New field.
7635 (init_register_cache, new_register_cache): Add target_desc
7636 parameter.
7637 (regcache_invalidate_thread): Declare.
7638 (regcache_invalidate_one): Delete declaration.
7639 (regcache_release): Declare.
7640 (find_register_by_number, register_cache_size, register_size)
7641 (find_regno): Add target_desc parameter.
7642 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7643 declarations.
7644 * remote-utils.c: Include tdesc.h.
7645 (outreg, prepare_resume_reply): Adjust.
7646 * server.c: Include tdesc.h.
7647 (gdbserver_xmltarget): Delete declaration.
7648 (get_features_xml, process_serial_event): Adjust.
7649 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7650 declare.
7651 (struct process_info) <tdesc>: New field.
7652 (ipa_tdesc): Declare.
7653 * tdesc.c: New file.
7654 * tdesc.h: New file.
7655 * tracepoint.c: Include tdesc.h.
7656 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7657 (get_context_regcache): Adjust to pass ipa_tdesc down.
7658 (do_action_at_tracepoint): Adjust to get the register cache size
7659 from the context regcache's description.
7660 (traceframe_walk_blocks): Adjust to get the register cache size
7661 from the current trace frame's description.
7662 (traceframe_get_pc): Adjust to get current trace frame's
7663 description and pass it down.
7664 (gdb_collect): Adjust to get the register cache size from the
7665 IPA's description.
7666 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7667 (gdbserver_xmltarget): Delete.
7668 (initialize_low_tracepoint): Set the ipa's target description.
7669 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7670 (initialize_low_tracepoint): Set the ipa's target description.
7671 * linux-x86-low.c: Include tdesc.h.
7672 [__x86_64__] (is_64bit_tdesc): New.
7673 (ps_get_thread_area, x86_get_thread_area): Use it.
7674 (i386_cannot_store_register): Rename to ...
7675 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7676 (i386_cannot_fetch_register): Rename to ...
7677 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7678 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7679 to new interface.
7680 (target_regsets): Rename to ...
7681 (x86_regsets): ... this.
7682 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7683 interface.
7684 (x86_siginfo_fixup): Use is_64bit_tdesc.
7685 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7686 (tdesc_x32_avx_linux, tdesc_x32_linux)
7687 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7688 Declare.
7689 (x86_linux_update_xmltarget): Delete.
7690 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7691 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7692 (AMD64_LINUX_USER64_CS): New.
7693 (x86_linux_read_description): New, based on
7694 x86_linux_update_xmltarget.
7695 (same_process_callback): New.
7696 (x86_arch_setup_process_callback): New.
7697 (x86_linux_update_xmltarget): New.
7698 (x86_regsets_info): New.
7699 (amd64_linux_regs_info): New.
7700 (i386_linux_usrregs_info): New.
7701 (i386_linux_regs_info): New.
7702 (x86_linux_regs_info): New.
7703 (x86_arch_setup): Reimplement.
7704 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7705 (x86_emit_ops): Ditto.
7706 (the_low_target): Adjust. Install x86_linux_regs_info,
7707 x86_cannot_fetch_register, and x86_cannot_store_register.
7708 (initialize_low_arch): New.
7709 * linux-ia64-low.c (tdesc_ia64): Declare.
7710 (ia64_fetch_register): Adjust.
7711 (ia64_usrregs_info, regs_info): New globals.
7712 (ia64_regs_info): New function.
7713 (the_low_target): Adjust.
7714 (initialize_low_arch): New function.
7715 * linux-sparc-low.c (tdesc_sparc64): Declare.
7716 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7717 Adjust.
7718 (sparc_arch_setup): New function.
7719 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7720 (the_low_target): Adjust.
7721 (initialize_low_arch): New function.
7722 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7723 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7724 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7725 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7726 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7727 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7728 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7729 (tdesc_powerpc_isa205_vsx64l): Declare.
7730 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7731 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7732 (ppc_set_pc, ppc_get_hwcap): Adjust.
7733 (ppc_usrregs_info): Forward declare.
7734 (!__powerpc64__) ppc_regmap_adjusted: New global.
7735 (ppc_arch_setup): Adjust to the current process'es target
7736 description.
7737 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7738 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7739 (ppc_store_evrregset): Adjust.
7740 (target_regsets): Rename to ...
7741 (ppc_regsets): ... this, and make static.
7742 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7743 (ppc_regs_info): New function.
7744 (the_low_target): Adjust.
7745 (initialize_low_arch): New function.
7746 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7747 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7748 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7749 (tdesc_s390x_linux64v2): Declare.
7750 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7751 (s390_fill_gregset, s390_store_last_break): Adjust.
7752 (target_regsets): Rename to ...
7753 (s390_regsets): ... this, and make static.
7754 (s390_get_pc, s390_set_pc): Adjust.
7755 (s390_get_hwcap): New target_desc parameter, and use it.
7756 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7757 (s390_arch_setup): Adjust to set the current process'es target
7758 description. Don't adjust the regmap.
7759 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7760 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7761 (regs_info_3264): New globals.
7762 (s390_regs_info): New function.
7763 (the_low_target): Adjust.
7764 (initialize_low_arch): New function.
7765 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7766 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7767 [__mips64] (init_registers_mips_linux)
7768 (init_registers_mips_dsp_linux): Delete defines.
7769 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7770 (have_dsp): New global.
7771 (mips_read_description): New, based on mips_arch_setup.
7772 (mips_arch_setup): Reimplement.
7773 (get_usrregs_info): New function.
7774 (mips_cannot_fetch_register, mips_cannot_store_register)
7775 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7776 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7777 (target_regsets): Rename to ...
7778 (mips_regsets): ... this, and make static.
7779 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7780 (dsp_regs_info, regs_info): New globals.
7781 (mips_regs_info): New function.
7782 (the_low_target): Adjust.
7783 (initialize_low_arch): New function.
7784 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7785 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7786 Declare.
7787 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7788 (arm_read_description): New, with bits factored from
7789 arm_arch_setup.
7790 (arm_arch_setup): Reimplement.
7791 (target_regsets): Rename to ...
7792 (arm_regsets): ... this, and make static.
7793 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7794 (arm_regs_info): New function.
7795 (the_low_target): Adjust.
7796 (initialize_low_arch): New function.
7797 * linux-m68k-low.c (tdesc_m68k): Declare.
7798 (target_regsets): Rename to ...
7799 (m68k_regsets): ... this, and make static.
7800 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7801 (m68k_regs_info): New function.
7802 (m68k_arch_setup): New function.
7803 (the_low_target): Adjust.
7804 (initialize_low_arch): New function.
7805 * linux-sh-low.c (tdesc_sharch): Declare.
7806 (target_regsets): Rename to ...
7807 (sh_regsets): ... this, and make static.
7808 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7809 (sh_regs_info, sh_arch_setup): New functions.
7810 (the_low_target): Adjust.
7811 (initialize_low_arch): New function.
7812 * linux-bfin-low.c (tdesc_bfin): Declare.
7813 (bfin_arch_setup): New function.
7814 (bfin_usrregs_info, regs_info): New globals.
7815 (bfin_regs_info): New function.
7816 (the_low_target): Adjust.
7817 (initialize_low_arch): New function.
7818 * linux-cris-low.c (tdesc_cris): Declare.
7819 (cris_arch_setup): New function.
7820 (cris_usrregs_info, regs_info): New globals.
7821 (cris_regs_info): New function.
7822 (the_low_target): Adjust.
7823 (initialize_low_arch): New function.
7824 * linux-cris-low.c (tdesc_crisv32): Declare.
7825 (cris_arch_setup): New function.
7826 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7827 (cris_regs_info): New function.
7828 (the_low_target): Adjust.
7829 (initialize_low_arch): New function.
7830 * linux-m32r-low.c (tdesc_m32r): Declare.
7831 (m32r_arch_setup): New function.
7832 (m32r_usrregs_info, regs_info): New globals.
7833 (m32r_regs_info): Adjust.
7834 (initialize_low_arch): New function.
7835 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7836 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7837 (tic6x_usrregs_info): Forward declare.
7838 (tic6x_read_description): New function, based on ...
7839 (tic6x_arch_setup): ... this. Reimplement.
7840 (target_regsets): Rename to ...
7841 (tic6x_regsets): ... this, and make static.
7842 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7843 (tic6x_regs_info): New function.
7844 (the_low_target): Adjust.
7845 (initialize_low_arch): New function.
7846 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7847 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7848 (target_regsets): Rename to ...
7849 (xtensa_regsets): ... this, and make static.
7850 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7851 globals.
7852 (xtensa_arch_setup, xtensa_regs_info): New functions.
7853 (the_low_target): Adjust.
7854 (initialize_low_arch): New function.
7855 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7856 (nios2_arch_setup): Set the current process'es tdesc.
7857 (target_regsets): Rename to ...
7858 (nios2_regsets): ... this.
7859 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7860 (nios2_regs_info): New function.
7861 (the_low_target): Adjust.
7862 (initialize_low_arch): New function.
a261b8f5
PA
7863 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7864 (aarch64_arch_setup): Set the current process'es tdesc.
7865 (target_regsets): Rename to ...
7866 (aarch64_regsets): ... this.
7867 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7868 (aarch64_regs_info): New function.
7869 (the_low_target): Adjust.
7870 (initialize_low_arch): New function.
3aee8918
PA
7871 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7872 globals.
7873 (target_regsets): Rename to ...
7874 (tile_regsets): ... this.
7875 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7876 (tile_regs_info): New function.
7877 (tile_arch_setup): Set the current process'es tdesc.
7878 (the_low_target): Adjust.
7879 (initialize_low_arch): New function.
7880 * spu-low.c (tdesc_spu): Declare.
7881 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7882 * win32-arm-low.c (tdesc_arm): Declare.
7883 (arm_arch_setup): New function.
7884 (the_low_target): Install arm_arch_setup instead of
7885 init_registers_arm.
7886 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7887 (init_windows_x86): Rename to ...
7888 (i386_arch_setup): ... this. Set `win32_tdesc'.
7889 (the_low_target): Adjust.
7890 * win32-low.c (win32_tdesc): New global.
7891 (child_add_thread): Don't create the thread cache here.
7892 (do_initial_child_stuff): Set the new process'es tdesc.
7893 * win32-low.h (struct target_desc): Forward declare.
7894 (win32_tdesc): Declare.
7895 * lynx-i386-low.c (tdesc_i386): Declare global.
7896 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7897 * lynx-low.c (lynx_tdesc): New global.
7898 (lynx_add_process): Set the new process'es tdesc.
7899 * lynx-low.h (struct target_desc): Forward declare.
7900 (lynx_tdesc): Declare global.
7901 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7902 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7903 * nto-low.c (nto_tdesc): New global.
7904 (do_attach): Set the new process'es tdesc.
7905 * nto-low.h (struct target_desc): Forward declare.
7906 (nto_tdesc): Declare.
7907 * nto-x86-low.c (tdesc_i386): Declare.
7908 (nto_x86_arch_setup): Set `nto_tdesc'.
7909
b1fbec62
GB
79102013-06-04 Gary Benson <gbenson@redhat.com>
7911
7912 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7913 to qSupported response when appropriate.
7914 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7915 with nonzero-length annex.
7916 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7917 arguments supplied in annex.
7918
d1ec4ce7
DE
79192013-05-31 Doug Evans <dje@google.com>
7920
ac44adcb 7921 PR server/15594
d1ec4ce7
DE
7922 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7923 64 bits in 64-cross-32 environment.
7924
9b25f2d3
PA
79252013-05-28 Pedro Alves <palves@redhat.com>
7926
7927 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7928 (aarch64-without-fpu.c): Delete rule.
7929 * configure.srv (aarch64*-*-linux*): Remove references to
7930 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7931 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7932 declaration.
7933
6740dc9c
PA
79342013-05-24 Pedro Alves <palves@redhat.com>
7935
7936 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7937 instead of strchr/decode_address. Error if the range isn't split
7938 with a ','. Don't assume there's be a ':' in the action.
7939
c2d6af84
PA
79402013-05-23 Yao Qi <yao@codesourcery.com>
7941 Pedro Alves <palves@redhat.com>
7942
7943 * linux-low.c (lwp_in_step_range): New function.
7944 (linux_wait_1): If the thread was range stepping and stopped
7945 outside the stepping range, report the stop to GDB. Otherwise,
7946 continue stepping. Add range stepping debug output.
7947 (linux_set_resume_request): Copy the step range from the resume
7948 request to the lwp.
7949 (linux_supports_range_stepping): New.
7950 (linux_target_ops) <supports_range_stepping>: Set to
7951 linux_supports_range_stepping.
7952 * linux-low.h (struct linux_target_ops)
7953 <supports_range_stepping>: New field.
7954 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7955 * linux-x86-low.c (x86_supports_range_stepping): New.
7956 (the_low_target) <supports_range_stepping>: Set to
7957 x86_supports_range_stepping.
7958 * server.c (handle_v_cont): Handle 'r' action.
7959 (handle_v_requests): Append ";r" if the target supports range
7960 stepping.
7961 * target.h (struct thread_resume) <step_range_start,
7962 step_range_end>: New fields.
7963 (struct target_ops) <supports_range_stepping>:
7964 New field.
7965 (target_supports_range_stepping): New macro.
7966
58794e1a
JB
79672013-05-17 Joel Brobecker <brobecker@adacore.com>
7968
7969 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7970 confusion in comment.
7971
d631c5a7
JB
79722013-05-17 Joel Brobecker <brobecker@adacore.com>
7973
7974 * lynx-low.c (struct process_info_private): New type.
7975 (lynx_add_process): New function.
7976 (lynx_create_inferior, lynx_attach): Replace calls to
7977 add_process by calls to lynx_add_process.
7978 (lynx_resume): If PTID is null, then try using
7979 current_process()->private->last_wait_event_ptid.
7980 Add comments.
7981 (lynx_clear_inferiors): Delete. The contents of that function
7982 has been inlined in lynx_mourn;
7983 (lynx_wait_1): Save the ptid in the process's private data.
7984 (lynx_mourn): Free the process' private data. Replace call
7985 to lynx_clear_inferiors by call to clear_inferiors.
7986
96f7a20f
YQ
79872013-05-17 Yao Qi <yao@codesourcery.com>
7988
7989 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7990 the right place.
7991
db0dfaa0
LM
79922013-05-16 Luis Machado <lgustavo@codesourcery.com>
7993
7994 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7995 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7996 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7997 PT_TEXT_END_ADDR guards. Update comments.
7998 (linux_target_op) <read_offsets>: Conditionally define to
7999 linux_read_offsets if the target is UCLIBC and if it defines
8000 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8001
68f5f838
SL
80022013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8003 Andrew Jenner <andrew@codesourcery.com>
8004
8005 * Makefile.in (SFILES): Add linux-nios2-low.c.
8006 (clean): Add action to delete nios2-linux.c.
8007 (nios2-linux.c): New rule.
8008 * configure.srv: Add nios2*-*-linux*.
8009 * linux-nios2-low.c: New.
8010
1ebff1fd
HAQ
80112013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8012
8013 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8014
f6150862
HZ
80152013-04-25 Hui Zhu <hui@codesourcery.com>
8016
8017 PR gdb/15186
f6150862
HZ
8018 * ax.c (ax_printf): Add fflush.
8019
614c279d
TT
80202013-04-22 Tom Tromey <tromey@redhat.com>
8021
8022 * Makefile.in (SFILES): Add filestuff.c.
8023 (OBS): Add filestuff.o.
8024 (filestuff.o): New target.
8025 * config.in, configure: Rebuild.
8026 * configure.ac: Check for fdwalk, pipe2.
8027
7d4e5717
PA
80282013-04-17 Pedro Alves <palves@redhat.com>
8029
8030 * configure.ac (USE_THREAD_DB): Delete variable.
8031 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8032 Don't AC_SUBST USE_THREAD_DB.
8033 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8034 * config.in, configure: Regenerate.
8035
d5c93e41
PA
80362013-04-16 Pedro Alves <palves@redhat.com>
8037
8038 * linux-low.h (struct lwp_info) <thread_known>: Move under
8039 the USE_THREAD_DB #ifdef.
8040
04f5fe89
PA
80412013-04-16 Pedro Alves <palves@redhat.com>
8042
8043 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8044 (linux-low.o): Delete rule.
8045 * linux-low.h: Always include "gdb_thread_db.h" instead of
8046 conditionally including thread_db.h.
8047 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8048 HAVE_THREAD_DB_H.
8049
480b27bf
JK
80502013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8051
8052 * Makefile.in (install-only): Fix make install regression.
8053
43662968
JK
80542013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8055
8056 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8057 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8058 installation.
8059 * gdbserver.1: Remove.
8060
3e74e146
PA
80612013-03-22 Pedro Alves <palves@redhat.com>
8062
8063 * linux-low.c (handle_extended_wait): Don't call
8064 linux_enable_event_reporting.
8065
a8347a2a
TT
80662013-03-15 Tony Theodore <tonyt@logyst.com>
8067
8068 PR build/9098:
8069 * Makefile.in (SHELL): Use @SHELL@.
8070
eeb56fa7
SDJ
80712013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8072
8073 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8074 compiler warning.
8075
4fa7e2ff
JB
80762013-03-13 Joel Brobecker <brobecker@adacore.com>
8077
8078 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8079 Remove extraneous NULL element.
8080
8ddb1965
YQ
80812013-03-13 Yao Qi <yao@codesourcery.com>
8082
8083 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8084 'V' block in trace frame.
8085
9accd112
MM
80862013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8087
8088 * target.h (struct target_ops): Add btrace ops.
8089 (target_supports_btrace): New macro.
8090 (target_enable_btrace): New macro.
8091 (target_disable_btrace): New macro.
8092 (target_read_btrace): New macro.
8093 * gdbthread.h (struct thread_info): Add btrace field.
8094 * server.c: Include btrace-common.h.
8095 (handle_btrace_general_set): New function.
8096 (handle_btrace_enable): New function.
8097 (handle_btrace_disable): New function.
8098 (handle_general_set): Call handle_btrace_general_set.
8099 (handle_qxfer_btrace): New function.
8100 (struct qxfer qxfer_packets[]): Add btrace entry.
8101 * inferiors.c (remove_thread): Disable btrace.
8102 * linux-low: Include linux-btrace.h.
8103 (linux_low_enable_btrace): New function.
8104 (linux_low_read_btrace): New function.
8105 (linux_target_ops): Add btrace ops.
8106 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8107 Add srv_linux_btrace=yes.
8108 (x86_64-*-linux*): Add linux-btrace.o.
8109 Add srv_linux_btrace=yes.
8110 * configure.ac: Define HAVE_LINUX_BTRACE.
8111 * config.in: Regenerated.
8112 * configure: Regenerated.
8113
5cc22e4c
MM
81142013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8115
8116 * server.c (handle_qxfer): Preserve error message if -3 is
8117 returned.
8118 (qxfer): Document the -3 return value.
8119
7c97f91e
MM
81202013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8121
8122 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8123 (linux_btrace_h): New variable.
8124 (linux-btrace.o): New rule.
8125
be9a119c 81262013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
8127 Hafiz Abid Qadeer <abidh@codesourcery.com>
8128
8129 * tracepoint.c (trace_buffer_size): New global.
8130 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8131 (init_trace_buffer): Change to one-argument function. Allocate
8132 trace buffer memory.
8133 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8134 handle QTBuffer:size packet.
8135 (cmd_bigqtbuffer_size): New function.
8136 (initialize_tracepoint): Call init_trace_buffer with
8137 DEFAULT_TRACE_BUFFER_SIZE.
8138 * server.c (handle_query): Add QTBuffer:size in the
8139 supported packets.
8140
e64f7499
YQ
81412013-03-07 Yao Qi <yao@codesourcery.com>
8142
8143 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8144 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8145 of -1.
8146 (cmd_qtsp): Adjust condition. Do post increment.
8147 Set cur_action and cur_step_action back to 0.
8148
f0ae6fc3
PA
81492013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8150
8151 PR server/15236
8152 * linux-low.c (linux_write_memory): Return early success if LEN is
8153 zero.
8154
b5b0b0af
CV
81552013-03-05 Corinna Vinschen <vinschen@redhat.de>
8156
334ad4a8 8157 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 8158
589bc927
TT
81592013-02-28 Tom Tromey <tromey@redhat.com>
8160
8161 * configure.ac: Invoke AC_SYS_LARGEFILE.
8162 * configure, config.in: Rebuild.
8163
dfe07582
CV
81642013-02-28 Corinna Vinschen <vinschen@redhat.com>
8165
8166 * win32-low.c: Throughout, fix format strings and casts of
8167 printf-like functions to avoid type related warnings on all
8168 platforms.
8169 (get_child_debug_event): Print dwDebugEventCode as hex since
8170 that's how it's usually documented.
8171
736cd585
YQ
81722013-02-28 Yao Qi <yao@codesourcery.com>
8173
8174 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8175 pulongest.
8176
e1f58301
JW
81772013-02-27 Jiong Wang <jiwang@tilera.com>
8178
8179 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8180 (reg-tilegx32.c): New rule.
8181 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8182 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8183 different register info initializer according to elf class.
8184 (init_registers_tilgx32): New function. The tilegx32 register info
8185 initializer.
8186 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8187 (tile_store_gregset): Likewise.
8188
d171ca78
YQ
81892013-02-27 Yao Qi <yao@codesourcery.com>
8190
8191 * server.c (process_point_options): Print debug message when
8192 debug_threads is true.
8193
282bbdf3
YQ
81942013-02-26 Yao Qi <yao@codesourcery.com>
8195
8196 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8197
aca22551
PA
81982013-02-19 Pedro Alves <palves@redhat.com>
8199 Kai Tietz <ktietz@redhat.com>
8200
8201 PR gdb/15161
8202
8203 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8204 instead of strtoul to extract address from packet.
8205 (process_serial_event) <'z'>: Likewise.
8206
4f3cee1c
YQ
82072013-02-18 Yao Qi <yao@codesourcery.com>
8208
8209 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8210
8e1d55a3
PA
82112013-02-14 Pedro Alves <palves@redhat.com>
8212
8213 Plug memory leak.
8214
8215 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8216 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8217
458820da
PA
82182013-02-14 Pedro Alves <palves@redhat.com>
8219
8220 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8221
baea0dae
PA
82222013-02-14 Pedro Alves <palves@redhat.com>
8223
8224 * tracepoint.c (save_string): Delete.
8225 (add_tracepoint_action): Use savestring instead of save_string.
8226
0b1afbb3
PA
82272013-02-12 Pedro Alves <palves@redhat.com>
8228
8229 * linux-xtensa-low.c: Ditto.
8230 * xtensa-xtregs.c: Ditto.
8231
8a4ac37e
PA
82322013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8233
8234 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8235 thread_db.
8236
148de6bb
MS
82372013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8238
8239 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8240 aarch64_num_wp_regs and aarch64_num_bp_regs to
8241 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8242
55fac6e0
MS
82432013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8244
8245 * linux-aarch64-low.c (ps_get_thread_area): Replace
8246 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8247
176eb98c
MS
82482013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8249 Marcus Shawcroft <marcus.shawcroft@arm.com>
8250 Nigel Stephens <nigel.stephens@arm.com>
8251 Yufeng Zhang <yufeng.zhang@arm.com>
8252
8253 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8254 (aarch64.c, aarch64-without-fpu.c): New targets.
8255 * configure.srv (aarch64*-*-linux*): New.
8256 * linux-aarch64-low.c: New file.
8257
56f7af9c
MS
82582013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8259
43aaf8b6 8260 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
8261 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8262 (dequeue_one_deferred_signal, linux_resume_one_thread)
8263 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8264 (linux_tracefork_grandchild, linux_test_for_tracefork)
8265 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8266 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8267 where the argument is 0.
8268
60f662b0
YQ
82692013-01-25 Yao Qi <yao@codesourcery.com>
8270
8271 * event-loop.c: Include "queue.h".
8272 (gdb_event_p): New typedef.
8273 (struct gdb_event) <next_event>: Remove.
8274 (event_queue): Change to QUEUE(gdb_event_p).
8275 (async_queue_event): Remove.
8276 (gdb_event_xfree): New.
8277 (initialize_event_loop): New.
8278 (process_event): Use API from QUEUE.
8279 (wait_for_event): Likewise.
8280 * server.c (main): Call initialize_event_loop.
8281 * server.h (initialize_event_loop): Declare.
8282
5ae4861a
YQ
82832013-01-18 Yao Qi <yao@codesourcery.com>
8284
8285 * ax.h (struct eval_agent_expr_context): New.
8286 (gdb_eval_agent_expr): Update declaration.
8287 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8288 TFRAME. Add new argument CTX.
8289 * server.h (struct eval_agent_expr_context): Declare.
8290 (agent_mem_read, agent_tsv_read): Update declaration.
8291 (agent_mem_read_string): Likewise.
8292 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8293 (add_traceframe_block): Add new argument TPOINT.
8294 Increase TPOINT->traceframe_usage.
8295 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8296 eval_tracepoint_agent_expr.
8297 (condition_true_at_tracepoint): Likewise.
8298 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8299 (agent_mem_read_string, agent_tsv_read): Likewise.
8300
85e00e85
YQ
83012013-01-16 Yao Qi <yao@codesourcery.com>
8302
8303 * linux-low.c (linux_resume_one_lwp): Don't check
8304 'lwp->bp_reinsert != 0'.
8305
4039cf45
JB
83062013-01-07 Joel Brobecker <brobecker@adacore.com>
8307 Pedro Alves <palves@redhat.com>
8308
8309 * lynx-low.c (ptrace_request_to_str): Define a temporary
8310 macro and use it to simplify this function's implementation.
8311
9044dee2
JB
83122013-01-07 Joel Brobecker <brobecker@adacore.com>
8313
8314 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8315 sets errno.
8316
e6352c8f
JB
83172013-01-07 Joel Brobecker <brobecker@adacore.com>
8318
8319 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8320
50681a27
JB
83212013-01-07 Joel Brobecker <brobecker@adacore.com>
8322
8323 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8324
3f6e77ef
JB
83252013-01-07 Joel Brobecker <brobecker@adacore.com>
8326
8327 * lynx-low.c (lynx_resume): Use the resume_info parameter
8328 to determine the ptid for the lynx_ptrace call, unless
8329 it is equal to minus_one_ptid, in which case we use the
8330 ptid of the current_inferior.
8331 (lynx_wait_1): After having received a thread create/exit
8332 event, resume the inferior's execution using the signaling
8333 thread's ptid, rather than the old ptid.
8334
7fda33ae
JB
83352013-01-07 Joel Brobecker <brobecker@adacore.com>
8336
8337 * lynx-low.c (lynx_resume): Delete variable ret.
8338
b9786c74
JB
83392013-01-01 Joel Brobecker <brobecker@adacore.com>
8340
8341 * gdbreplay.c (gdbreplay_version): Update copyright year.
8342 * server.c (gdbserver_version): Likewise.
8343
8b93d60f
JB
83442012-12-17 Joel Brobecker <brobecker@adacore.com>
8345
8346 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8347 new thread.
8348
037335a7
JB
83492012-12-17 Joel Brobecker <brobecker@adacore.com>
8350
8351 * lynx-low.c (ptrace_request_to_str): Add handling for
8352 PTRACE_GETTRACESIG.
8353
52d4cbd8
JB
83542012-12-17 Joel Brobecker <brobecker@adacore.com>
8355
8356 * lynx-low.c (lynx_attach): Delete variable new_process.
8357
ab8f6ca9
JB
83582012-12-17 Joel Brobecker <brobecker@adacore.com>
8359
8360 * lynx-low.c (lynx_create_inferior): Delete variable
8361 new_process.
8362
78cbc024
JB
83632012-12-17 Joel Brobecker <brobecker@adacore.com>
8364
8365 * lynx-low.c (ptrace_request_to_str): Do not handle
8366 PTRACE_GETTHREADLIST if this macro does not exist.
8367
14a00470
YQ
83682012-12-15 Yao Qi <yao@codesourcery.com>
8369
8370 * Makefile.in (OBS): Add notif.o.
8371 * notif.c, notif.h: New.
8372 * server.c: Include "notif.h".
8373 (struct vstop_notif) <next>: Remove.
8374 <base>: New field.
8375 (queue_stop_reply): Update.
8376 (push_event, send_next_stop_reply): Remove.
8377 (discard_queued_stop_replies): Update.
8378 (notif_stop): New variable.
8379 (handle_v_stopped): Remove.
8380 (handle_v_requests): Don't call handle_v_stopped. Call
8381 handle_ack_notif instead.
8382 (queue_stop_reply_callback): Call notif_event_enque instead
8383 of queue_stop_reply.
8384 (handle_status): Don't call send_next_stop_reply, call
8385 notif_write_event instead.
8386 (kill_inferior_callback): Likewise.
8387 (detach_or_kill_inferior_callback): Likewise.
8388 (main): Call initialize_notif.
8389 (process_serial_event): Call QUEUE_is_empty.
8390 (handle_target_event): Call notif_push instead of push event.
8391 * server.h (push_event): Remove declaration.
8392
61c125b9
TT
83932012-12-10 Tom Tromey <tromey@redhat.com>
8394
8395 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8396 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8397 macros.
8398 (.c.o): Rewrite.
8399 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8400 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8401 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8402 (amd64-linux-ipa.o, ax.o): Rewrite.
8403 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8404 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8405 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8406 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8407 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8408 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8409 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8410 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8411 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8412 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8413 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8414 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8415 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8416 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8417 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8418 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8419 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8420 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8421 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8422 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8423 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8424 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8425 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8426 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8427 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8428 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8429 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8430 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8431 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8432 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8433 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8434 (reg-tilegx.o): Remove.
8435 (all_object_files): New macro.
8436 Include .deps files.
8437 * aclocal.m4, configure: Rebuild.
8438 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8439 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8440 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8441
e90e9ad9
TT
84422012-12-05 Tom Tromey <tromey@redhat.com>
8443
8444 PR gdb/14917:
8445 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8446
02d403bf 84472012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
8448
8449 * configure.ac: Check for linux/perf_event.h.
8450 * config.in: Regenerated.
8451 * configure: Regenerated.
8452
0270a750
PA
84532012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8454
8455 * hostio.c (handle_readlink): Decrease buffer size
8456 parameter passed to readlink by one byte.
8457
8c29b58e
YQ
84582012-11-26 Yao Qi <yao@codesourcery.com>
8459
8460 * configure.ac (build_warnings): Append '-Wempty-body'.
8461 * configure: Regenerated.
8462 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8463 body.
8464
8bdce1ff
PM
84652012-11-15 Pierre Muller <muller@sourceware.org>
8466
8467 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8468 * config.in: Regenerate.
8469 * configure: Regenerate.
8470 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8471 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8472 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8473 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8474 header.
8475 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8476 instead of <sys/wait.h> header.
8477 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8478
02d403bf 84792012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
8480
8481 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8482 (various make rules): Remove -DGDBSERVER
8483
fbd5db48
YQ
84842012-11-09 Yao Qi <yao@codesourcery.com>
8485
8486 * spu-low.c (current_ptid): Move it to ..
8487 * gdbthread.h: ... here. New.
8488 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8489 * server.c (myresume, process_serial_event): Likewise.
8490 * thread-db.c (thread_db_find_new_threads): Likewise.
8491 * tracepoint.c (run_inferior_command): Likewise.
8492
b3dc46ff
AB
84932012-10-01 Andrew Burgess <aburgess@broadcom.com>
8494
8495 * server.c (handle_search_memory_1): Include access length in
8496 warning message.
8497
07c04788
HPN
84982012-09-05 Michael Brandt <michael.brandt@axis.com>
8499
8500 * linux-crisv32-low.c: Fix compile errors.
8501
918d227b
YQ
85022012-09-04 Yao Qi <yao@codesourcery.com>
8503
8504 * tracepoint.c (cmd_qtsv): Adjust debug message.
8505 Don't check CUR_TPOINT.
8506
18c1b81a
YQ
85072012-08-28 Yao Qi <yao@codesourcery.com>
8508
8509 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8510 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8511 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8512 Remove declarations of xmalloc, xreallloc, xstrdup and
8513 freeargv.
8514 * Makefile.in (libiberty_h): New.
8515 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8516 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8517
dc82f37b
YQ
85182012-08-23 Yao Qi <yao@codesourcery.com>
8519
8520 * server.h: Remove declaration of 'xsnprintf'.
8521
406b1477
KS
85222012-08-22 Keith Seitz <keiths@redhat.com>
8523
8524 * server.h: Include build-gnulib-gbserver/config.h.
8525 * gdbreplay.c: Likewise.
8526
e6712ff1
DE
85272012-08-08 Doug Evans <dje@google.com>
8528
8529 * Makefile.in (SFILES): Add gdb_vecs.c.
8530 (OBS): Add gdb_vecs.o.
8531 (gdb_vecs_h, host_defs_h): New variables.
8532 (thread-db.o): Add $(gdb_vecs_h) dependency.
8533 (gdb_vecs.o): New rule.
8534 * thread-db.c: #include "gdb_vecs.h".
8535 (thread_db_load_search): Use a vector to iterate over path elements.
8536 Handle text appearing after "$pdir".
8537
8538 * configure.ac: Add check for strstr.
8539 * config.in: Regenerate.
8540 * configure: Regenerate.
8541
7c3270ae
UW
85422012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8543
8544 * hostio.c (handle_pread): If pread fails, fall back to attempting
8545 lseek/read.
8546 (handle_pwrite): Likewise for pwrite.
8547
b62e2b27
UW
85482012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8549
8550 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8551 between unsupported TYPE and unimplementable ADDR/LEN combination.
8552 (arm_insert_point): Act on new return value.
8553
78a99e91
PA
85542012-07-31 Pedro Alves <palves@redhat.com>
8555
8556 * server.c (process_point_options): Only skip tokens if we find
8557 one that is unrecognized. Don't treat 'X' specially while
8558 skipping unrecognized tokens.
8559
fcf303ab
UW
85602012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8561
8562 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8563 to 4-byte-align HW breakpoint addresses for Thumb.
8564
7255706c
YQ
85652012-07-27 Yao Qi <yao@codesourcery.com>
8566
8567 PR remote/14161.
8568
8569 * server.h: Declare gdb_agent_about_to_close.
8570 * target.c (kill_inferior): Include "agent.h".
8571 New. Send command 'kill'.
8572 * target.h (kill_inferior): Removed macro.
8573 * tracepoint.c (gdb_agent_about_to_close): New.
8574 (gdb_agent_helper_thread): Handle command 'close'.
8575 Wait endlessly until the inferior stops.
8576 Install gdb_agent_remove_socket to atexit hook.
8577 (agent_socket_name): New static variable.
8578 (gdb_agent_socket_init): Replace local variable 'name' with
8579 'agent_socket_name'.
8580 (gdb_agent_remove_socket): New.
8581
5a3f286f
YQ
85822012-07-27 Yao Qi <yao@codesourcery.com>
8583
8584 * server.c (process_point_options): Stop at 'X' when parsing.
8585
961bd387
ME
85862012-07-19 Michael Eager <eager@eagercon.com>
8587
a261b8f5 8588 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
8589 to hw_execute.
8590 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8591 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8592 hardware breakpoint.
8593
aa7c7447
JK
85942012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8595
8596 * gdbserver/linux-low.c (initialize_low): Call
8597 linux_ptrace_init_warnings.
8598
7f216e7c
DE
85992012-07-02 Doug Evans <dje@google.com>
8600
8601 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8602 pointer to int.
8603
d3ce09f5
SS
86042012-07-02 Stan Shebs <stan@codesourcery.com>
8605
8606 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8607 (ax.o): Add it to build rule.
8608 (ax-ipa.o): Ditto.
8609 (OBS): Add format.o.
8610 (IPA_OBS): Add format.o.
8611 * server.c (handle_query): Claim support for breakpoint commands.
8612 (process_point_options): Add command case.
8613 (process_serial_event): Leave running if there are printfs in
8614 effect.
8615 * mem-break.h (any_persistent_commands): Declare.
8616 (add_breakpoint_commands): Declare.
8617 (gdb_no_commands_at_breakpoint): Declare.
8618 (run_breakpoint_commands): Declare.
8619 * mem-break.c (struct point_command_list): New struct.
8620 (struct breakpoint): New field command_list.
8621 (any_persistent_commands): New function.
8622 (add_commands_to_breakpoint): New function.
8623 (add_breakpoint_commands): New function.
8624 (gdb_no_commands_at_breakpoint): New function.
8625 (run_breakpoint_commands): New function.
8626 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8627 locally.
8628 * ax.c: Include format.h.
8629 (ax_printf): New function.
8630 (gdb_eval_agent_expr): Add printf opcode.
8631
2f8f6aed
YQ
86322012-06-13 Yao Qi <yao@codesourcery.com>
8633
8634 * server.c (start_inferior): Remove duplicated writes to fields
8635 'last_resume_kind' and 'last_status' of 'current_inferior'.
8636
0c9070b3
YQ
86372012-06-12 Yao Qi <yao@codesourcery.com>
8638 Pedro Alves <palves@redhat.com>
8639
8640 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8641 comment.
8642 * server.c (handle_v_cont): Extend comment.
8643
c52daf70
YQ
86442012-06-11 Yao Qi <yao@codesourcery.com>
8645
8646 * linux-low.c (linux_attach): Add 'static'.
8647
d38bbb0a
YQ
86482012-06-06 Yao Qi <yao@codesourcery.com>
8649
8650 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8651
89dc0afd
JK
86522012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8653
8654 Fix gcc -flto compilation warning.
8655 * server.c (main): Make variable multi_mode and attach volatile.
8656
75f62ce7
TJB
86572012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8658
8659 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8660 if the platform doesn't know about it.
8661
65f479b6
PA
86622012-05-30 Jeff Kenton <jkenton@tilera.com>
8663
8664 * Makefile.in (SFILES): Add linux-tile-low.c.
8665 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8666 * configure.srv: Handle tilegx-*-linux*.
8667 * linux-tile-low.c: New file.
8668
0c5bf5a9
JK
86692012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8670
8671 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8672
a493e3e2
PA
86732012-05-24 Pedro Alves <palves@redhat.com>
8674
8675 PR gdb/7205
8676
43aaf8b6 8677 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 8678
2ea28649
PA
86792012-05-24 Pedro Alves <palves@redhat.com>
8680
8681 PR gdb/7205
8682
8683 Replace target_signal with gdb_signal throughout.
8684
8d409d16
MR
86852012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8686
8687 * linux-low.c (linux_store_registers): Avoid the copying sequence
8688 when no data has been retrieved by ptrace.
8689
23512c01
MGD
86902012-05-22 Will Deacon <will.deacon@arm.com>
8691
8692 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8693 Include asm/ptrace.h.
8694 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8695 already defined.
8696
4934b29e
MR
86972012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8698
8699 * linux-low.c (linux_store_registers): Don't re-retrieve data
8700 with ptrace that has already been obtained from /proc. Always
8701 copy any data retrieved with ptrace to the buffer supplied.
8702
bde24c0a
PA
87032012-05-11 Yao Qi <yao@codesourcery.com>
8704 Pedro Alves <palves@redhat.com>
8705
8706 * linux-low.c (enum stopping_threads_kind): New.
8707 (stopping_threads): Change type to `enum stopping_threads_kind'.
8708 (handle_extended_wait): If stopping and suspending threads, leave
8709 the new_lwp suspended too.
8710 (linux_wait_for_event): Adjust.
8711 (stop_all_lwps): Set `stopping_threads' to
8712 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8713 whether we're suspending threads or just stopping them. Assert no
8714 recursion happens.
8715
623b6bdf
YQ
87162012-04-29 Yao Qi <yao@codesourcery.com>
8717
8718 * server.h: Move some code to ...
8719 * gdbthread.h: ... here. New.
8720 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8721 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8722 (nto-low.o, win32-low.o): Likewise.
8723 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8724 * regcache.c, remote-utils.c, server.c: Likewise.
8725 * target.c, tracepoint.c, win32-low.c: Likewise.
8726
f15f9948
TJB
87272012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8728
8729 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8730 (PTRACE_ARG4_TYPE): Likewise.
8731 (PTRACE_XFER_TYPE): Likewise.
8732 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8733 ptrace to PTRACE_ARG3_TYPE.
8734 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8735 (PTRACE_ARG4_TYPE): Likewise.
8736 (PTRACE_XFER_TYPE): Likewise.
8737 (linux_detach_one_lwp): Cast fourth argument of
8738 ptrace to long then PTRACE_ARG4_TYPE.
8739 (regsets_fetch_inferior_registers): Cast third argument of
8740 ptrace to long then PTRACE_ARG3_TYPE.
8741 (regsets_store_inferior_registers): Likewise.
8742
38ea300a
PA
87432012-04-20 Pedro Alves <palves@redhat.com>
8744
8745 * configure: Regenerate.
8746
c971b7fa
PA
87472012-04-19 Pedro Alves <palves@redhat.com>
8748
43aaf8b6 8749 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 8750 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
8751 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8752 (all, install-only, uninstall, clean-info, all-lib, clean): No
8753 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8754 (maintainer-clean realclean distclean): Use subdir_do.
8755 (subdir_do): New.
8756 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 8757 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
8758 * acinclude.m4: Include acx_configure_dir.m4.
8759 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8760 calls. Call AC_PROG_RANLIB. Configure gnulib using
8761 ACX_CONFIGURE_DIR.
8762 (GNULIB): New.
8763 (GNULIB_STDINT_H): Adjust.
8764 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8765 * gdbreplay.c: Include build-gnulib/config.h.
8766 * server.h: Likewise.
8767 * aclocal.m4: Regenerate.
8768 * config.in: Regenerate.
8769 * configure: Regenerate.
c971b7fa 8770
809277f8
PA
87712012-04-19 Pedro Alves <palves@redhat.com>
8772
8773 * Makefile.in (LIBGNU, INCGNU): Adjust.
8774 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8775 (all, install-only, uninstall, clean-info, all-lib, clean)
8776 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8777 * configure.ac: Adjust AC_OUTPUT output.
8778 * aclocal.m4: Regenerate.
8779 * configure: Regenerate.
8780
fd9bb8b8
PA
87812012-04-19 Pedro Alves <palves@redhat.com>
8782
8783 * Makefile.in (generated_files): New.
8784 (server_h): Remove the explicit dependency on config.h, and depend
8785 on $generated_files.
8786
1c298c66
PA
87872012-04-19 Pedro Alves <palves@redhat.com>
8788
8789 * Makefile.in (INCGNU): Add -Ignulib.
8790
57c4b50b
PA
87912012-04-19 Pedro Alves <palves@redhat.com>
8792
8793 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8794 (INCGNU): ... this, and spell out -I here.
8795 (GNULIB_LIB): Rename to ...
8796 (LIBGNU): ... this.
8797 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8798
1030e047
PA
87992012-04-19 Pedro Alves <palves@redhat.com>
8800
8801 * config.in: Regenerate.
8802
447d4319
PA
88032012-04-19 Pedro Alves <palves@redhat.com>
8804
8805 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8806 * server.h (memmem): Remove declaration.
8807 * config.in: Regenerate.
8808 * configure: Regenerate.
8809
aad9eab9
YQ
88102012-04-19 Yao Qi <yao@codesourcery.com>
8811
8812 * Makefile.in (SFILES): Add common/vec.c.
8813 (OBS): Add vec.o.
8814 (vec.o): New rule.
8815
3e10640f
YQ
88162012-04-19 Yao Qi <yao@codesourcery.com>
8817
8818 * remote-utils.c (prepare_resume_reply): Replace with macro
8819 target_core_of_thread.
8820 * server.c (handle_qxfer_threads_proper): Likewise.
8821 * target.h (traget_core_of_thread): New macro.
8822
71622373
PA
88232012-04-18 Pedro Alves <palves@redhat.com>
8824
8825 * aclocal.m4: Regenerate.
8826 * configure: Regenerate.
8827
80d26939
YQ
88282012-04-16 Yao Qi <yao@codesourcery.com>
8829
8830 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8831 duplicated on address.
8832
42476b70
YQ
88332012-04-16 Yao Qi <yao@codesourcery.com>
8834
8835 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8836 (struct tracepoint_action_ops) <send>: New field.
8837 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8838 (agent_expr_send, x_tracepoint_action_send): New.
8839 (l_tracepoint_action_send): New.
8840 (cmd_qtdp): Download and install tracepoint
8841 according to `use_agent'.
8842 (run_inferior_command): Add one more parameter `len'.
8843 Update callers.
8844 (tracepoint_send_agent): New.
8845 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8846
7bc83639
YQ
88472012-04-16 Yao Qi <yao@codesourcery.com>
8848
8849 * tracepoint.c (download_tracepoints): Moved to ...
8850 (cmd_qtstart): ... here.
8851
5f18041e
YQ
88522012-04-14 Yao Qi <yao@codesourcery.com>
8853
8854 * tracepoint.c: Include inttypes.h.
8855 (struct collect_memory_action): Use sized types.
8856 (struct tracepoint): Likewise.
8857 (cmd_qtdp, stop_tracing): Update print specifiers.
8858 (cmd_qtp, response_tracepoint): Likewise.
8859 (collect_data_at_tracepoint): Likewise.
8860 (collect_data_at_step): Likewise.
8861
55a8c076
YQ
88622012-04-14 Yao Qi <yao@codesourcery.com>
8863
8864 Import gnulib module inttypes.
8865 * aclocal.m4, config.in, configure: Regenerated.
8866
dc750257
YQ
88672012-04-14 Yao Qi <yao@codesourcery.com>
8868
8869 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8870 Makefile and config.status at last.
8871
0ab5faf9
YQ
88722012-04-13 Yao Qi <yao@codesourcery.com>
8873
8874 * tracepoint.c: Include stdint.h unconditionally.
8875
18f5fd81
TJB
88762012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8877
8878 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8879 on BFD_HAVE_SYS_PROCFS_TYPE.
8880 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8881 * configure: Regenerate.
8882 * config.in: Likewise.
8883
4d47af5c
L
88842012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8885
8886 * Makefile.in (clean): Also remove x32.c x32-linux.c
8887 x32-avx.c x32-avx-linux.c.
8888 (x32.o): New target.
8889 (x32.c): Likewise.
8890 (x32-linux.o): Likewise.
8891 (x32-linux.c): Likewise.
8892 (x32-avx.o): Likewise.
8893 (x32-avx.c): Likewise.
8894 (x32-avx-linux.o): Likewise.
8895 (x32-avx-linux.c): Likewise.
8896
8897 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8898 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8899 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8900 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8901 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8902 i386/x32-avx-linux.xml.
8903
8904 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8905 (init_registers_x32_avx_linux): Likwise.
8906 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8907 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8908
ecedbe58
PA
89092012-04-13 Pedro Alves <palves@redhat.com>
8910
8911 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8912 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8913 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8914 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8915 the sub-make.
8916
c92b5177
L
89172012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8918
8919 * linux-x86-low.c (compat_x32_clock_t): New.
8920 (compat_x32_siginfo_t): Likewise.
8921 (compat_x32_siginfo_from_siginfo): Likewise.
8922 (siginfo_from_compat_x32_siginfo): Likewise.
8923 (linux_is_elf64): Likewise.
8924 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8925 and siginfo_from_compat_x32_siginfo for x32.
8926 (x86_arch_setup): Set linux_is_elf64.
8927
214d508e
L
89282012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8929
8930 PR gdb/13969
8931 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8932 e_machine field.
8933 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8934 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8935 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8936 compatible with process.
8937
c9a1864a
YQ
89382012-04-12 Yao Qi <yao@codesourcery.com>
8939
8940 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8941 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8942 (install-only, install-info, clean): Handle sub dir gnulib.
8943 (all-lib, am--refresh): New targets.
8944 (memmem.o): Remove target.
8945 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8946 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8947 (AC_REPLACE_FUNCS): Remove memmem.
8948 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8949 (AC_OUTPUT): Generate Makefile in gnulib/.
8950 * aclocal.m4, config.in, configure: Regenerated.
8951
367ba2c2
MR
89522012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8953
8954 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8955
9d236627
PA
89562012-04-05 Pedro Alves <palves@redhat.com>
8957
8958 -Werror=strict-aliasing
8959
8960 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8961 pointer.
8962
111217b3
PA
89632012-04-04 Pedro Alves <palves@redhat.com>
8964
8965 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8966 (sparc_store_gregset_from_stack, sparc_store_gregset)
8967 (sparc_breakpoint_at): Fix formatting.
8968
8365dcf5
TJB
89692012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8970
8971 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8972 are available.
8973 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8974 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8975 * config.in: Regenerate.
8976 * configure: Likewise.
8977
689cc2ae
PA
89782012-03-29 Pedro Alves <palves@redhat.com>
8979
8980 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8981 Correct ptrace arguments.
8982
c14dfd32
PA
89832012-03-28 Pedro Alves <palves@redhat.com>
8984
8985 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8986 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8987 (IA64_FR1_REGNUM): New defines.
8988 (ia64_fetch_register): New.
8989 (the_low_target): Install it.
8990 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8991 field.
8992 * linux-low.c (linux_fetch_registers): Try the
8993 the_low_target.fetch_register hook first.
8994
8995 * linux-arm-low.c (the_low_target): Adjust.
8996 * linux-bfin-low.c (the_low_target): Adjust.
8997 * linux-cris-low.c (the_low_target): Adjust.
8998 * linux-crisv32-low.c (the_low_target): Adjust.
8999 * linux-m32r-low.c (the_low_target): Adjust.
9000 * linux-m68k-low.c (the_low_target): Adjust.
9001 * linux-mips-low.c (the_low_target): Adjust.
9002 * linux-ppc-low.c (the_low_target): Adjust.
9003 * linux-s390-low.c (the_low_target): Adjust.
9004 * linux-sh-low.c (the_low_target): Adjust.
9005 * linux-sparc-low.c (the_low_target): Adjust.
9006 * linux-tic6x-low.c (the_low_target): Adjust.
9007 * linux-x86-low.c (the_low_target): Adjust.
9008 * linux-xtensa-low.c (the_low_target): Adjust.
9009
63c88e13
PA
90102012-03-26 Pedro Alves <palves@redhat.com>
9011
9012 * server.c (handle_qxfer_libraries): Don't bail early if
9013 the_target->qxfer_libraries_svr4 is not NULL.
9014
fb723180
PA
90152012-03-26 Pedro Alves <palves@redhat.com>
9016
9017 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9018
0afae3cf
PA
90192012-03-23 Pedro Alves <palves@redhat.com>
9020
9021 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9022 "library-list-svr4" element's start tag when the the DSO list is
9023 empty.
9024
485f1ee4
PA
90252012-03-23 Pedro Alves <palves@redhat.com>
9026
9027 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9028 a variable whose type size is the same as the inferior's pointer
9029 size.
9030
a5362b9a
TS
90312012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9032
9033 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9034 struct siginfo.
9035 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9036 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9037 * linux-low.h: Include <signal.h>.
9038 (struct siginfo): Remove forward declaration.
9039 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9040 struct siginfo.
9041
d226c142
MF
90422012-03-21 Mike Frysinger <vapier@gentoo.org>
9043
9044 * .gitignore: Ignore more files.
9045
122f36ef
PA
90462012-03-19 Pedro Alves <palves@redhat.com>
9047 Jan Kratochvil <jan.kratochvil@redhat.com>
9048
9049 * server.c (cont_thread, general_thread): Add describing comments.
9050 (start_inferior): Clear `cont_thread'.
9051 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9052 of a process.
9053
fc3e5175
YQ
90542012-03-15 Yao Qi <yao@codesourcery.com>
9055
9056 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9057 handling to ...
9058 (cmd_qtdp): ... here.
9059
8d0d92cd
YQ
90602012-03-15 Yao Qi <yao@codesourcery.com>
9061
9062 * tracepoint.c (struct tracepoint_action_ops): New.
9063 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9064 (m_tracepoint_action_download): New.
9065 (r_tracepoint_action_download): New.
9066 (x_tracepoint_action_download): New.
9067 (l_tracepoint_action_download): New.
9068 (add_tracepoint_action): Install `action->ops' according type.
9069 (download_tracepoint_1): Move code `download' function pointer
9070 of various tracepoint_action_ops.
9071
87b0bb13
JK
90722012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9073
9074 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9075 linux_ptrace_attach_warnings.
9076
5f572dec
JK
90772012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9078
9079 * Makefile.in (linux-ptrace.o): New.
9080 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9081 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9082 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9083 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9084 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9085 of these targets.
9086 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9087
f4647387
YQ
90882012-03-08 Yao Qi <yao@codesourcery.com>
9089 Pedro Alves <palves@redhat.com>
9090
9091 Fix PR server/13392.
9092 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9093 offset of JMP insn.
9094 * tracepoint.c (remove_tracepoint): New.
9095 (cmd_qtdp): Call remove_tracepoint when failed to install.
9096
9b224c5e
PA
90972012-03-07 Pedro Alves <palves@redhat.com>
9098
9099 * linux-low.c (get_detach_signal): New.
9100 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9101 Pass on pending signals to PTRACE_DETACH. Check the result of the
9102 ptrace call.
9103 * server.c (program_signals, program_signals_p): New.
9104 (handle_general_set): Handle QProgramSignals.
9105 * server.h (program_signals, program_signals_p): Declare.
9106
e237a7e2
JK
91072012-03-05 Pedro Alves <palves@redhat.com>
9108 Jan Kratochvil <jan.kratochvil@redhat.com>
9109
9110 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9111 New comment why.
9112
5808517f
YQ
91132012-03-03 Yao Qi <yao@codesourcery.com>
9114
9115 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9116 agent_look_up_symbols.
9117
58b4daa5
YQ
91182012-03-03 Yao Qi <yao@codesourcery.com>
9119
9120 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9121 (linux-x86-low.o): Likewise.
9122 * server.h: Remove in_process_agent_loaded.
9123 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9124 common/agent.c.
9125 Update callers.
9126
8ffcbaaf
YQ
91272012-03-03 Yao Qi <yao@codesourcery.com>
9128
9129 * tracepoint.c (gdb_agent_capability): New global.
9130 (in_process_agent_loaded_ust): Renamed to
9131 `in_process_agent_supports_ust'.
9132 Update callers.
9133 (in_process_agent_supports_ust): Call agent_capability_check.
9134 (clear_installed_tracepoints): Assert that agent supports
9135 agent.
9136
d1feda86
YQ
91372012-03-03 Yao Qi <yao@codesourcery.com>
9138
9139 * linux-low.c (linux_supports_agent): New.
9140 (linux_target_ops): Initialize field `supports_agent' with
9141 linux_supports_agent.
9142 * target.h (struct target_ops) <supports_agent>: New.
9143 (target_supports_agent): New macro.
9144 * server.c (handle_general_set): Handle packet 'QAgent'.
9145 (handle_query): Send `QAgent+'.
9146 * Makefile.in (server.o): Depends on agent.h.
9147
2fa291ac
YQ
91482012-03-03 Yao Qi <yao@codesourcery.com>
9149
9150 * Makefile.in (OBS): Add agent.o.
9151 Add new rule for agent.o.
9152 Track dependence of tracepoint.c on agent.h.
9153 * tracepoint.c (run_inferior_command_1):
9154 (run_inferior_command): Call agent_run_command.
9155 (gdb_ust_connect_sync_socket): Deleted. Move it to
9156 common/agent.c.
9157 (resume_thread, stop_thread): Likewise.
9158 (gdb_ust_socket_init): Renamed to ...
9159 (gdb_agent_socket_init): ... New.
9160 (gdb_ust_thread): Renamed to ...
9161 (gdb_agent_helper_thread): ... New.
9162 (gdb_ust_init): Move some code to ...
9163 (gdb_agent_init): ... here. New.
9164 [HAVE_UST]: Call gdb_ust_init.
9165 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9166 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9167 * config.in, configure: Regenerated.
9168
05044653
PA
91692012-03-02 Pedro Alves <palves@redhat.com>
9170
9171 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9172 * linux-low.c (struct simple_pid_list): New.
9173 (stopped_pids): New a struct simple_pid_list pointer.
9174 (add_to_pid_list, pull_pid_from_list): New.
9175 (handle_extended_wait): Don't assume the first signal new children
9176 report is SIGSTOP. Adjust call to pull_pid_from_list.
9177 (linux_wait_for_lwp): Adjust.
9178
8d00225b
YQ
91792012-03-02 Yao Qi <yao@codesourcery.com>
9180
9181 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9182 debug log.
9183
19560ba5
YQ
91842012-03-02 Yao Qi <yao@codesourcery.com>
9185
9186 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9187 `stop_pc' and `tpoint'. Update caller.
9188
1faeff08
MR
91892012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9190
9191 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9192 * linux-low.c (use_linux_regsets): New macro.
9193 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9194 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9195 (linux_register_in_regsets): New function.
9196 (usr_fetch_inferior_registers): Skip registers covered by
9197 regsets.
9198 (usr_store_inferior_registers): Likewise.
9199 (usr_fetch_inferior_registers): New macro.
9200 (usr_store_inferior_registers): Likewise.
9201 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9202 (linux_store_registers): Likewise.
9203 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9204 prototype.
9205 (init_registers_mips64_dsp_linux): Likewise.
9206 (init_registers_mips_linux): New macro.
9207 (init_registers_mips_dsp_linux): Likewise.
9208 (mips_dsp_num_regs): Likewise.
9209 (DSP_BASE, DSP_CONTROL): New fallback macros.
9210 (mips_base_regs): New macro.
9211 (mips_regmap): Use it. Fix the size.
9212 (mips_dsp_regmap): New variable.
9213 (mips_dsp_regset_bitmap): Likewise.
9214 (mips_arch_setup): New function.
9215 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9216 than mips_regmap.
9217 (mips_cannot_store_register): Likewise.
9218 (the_low_target): Update .arch_setup, .num_regs and .regmap
9219 initializers. Add .regset_bitmap initializer.
9220 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9221 initializer.
9222 * linux-bfin-low.c (the_low_target): Likewise.
9223 * linux-cris-low.c (the_low_target): Likewise.
9224 * linux-crisv32-low.c (the_low_target): Likewise.
9225 * linux-ia64-low.c (the_low_target): Likewise.
9226 * linux-m32r-low.c (the_low_target): Likewise.
9227 * linux-m68k-low.c (the_low_target): Likewise.
9228 * linux-ppc-low.c (the_low_target): Likewise.
9229 * linux-s390-low.c (the_low_target): Likewise.
9230 * linux-sh-low.c (the_low_target): Likewise.
9231 * linux-sparc-low.c (the_low_target): Likewise.
9232 * linux-tic6x-low.c (the_low_target): Likewise.
9233 * linux-x86-low.c (the_low_target): Likewise.
9234 * linux-xtensa-low.c (the_low_target): Likewise.
9235 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9236 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9237 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9238 srv_xmlfiles.
9239 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9240 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9241
c03e6ccc
YQ
92422012-02-29 Yao Qi <yao@codesourcery.com>
9243 Pedro Alves <palves@redhat.com>
9244
9245 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9246 `step_over_finished' is true.
9247
644cebc9
PA
92482012-02-27 Pedro Alves <palves@redhat.com>
9249
9250 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9251 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9252
c14d7ab2
PA
92532012-02-27 Pedro Alves <palves@redhat.com>
9254
9255 PR server/9684
9256 * linux-low.c (pid_is_stopped): New.
9257 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9258
412c89dd
LM
92592012-02-25 Luis Machado <lgustavo@codesourcery.com>
9260
9261 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9262 of conditions.
9263
b745defe
MR
92642012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9265
9266 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9267
9f3a5c85
LM
92682012-02-24 Luis Machado <lgustavo@codesourcery>
9269
9270 * server.c (handle_query): Advertise support for target-side
9271 breakpoint condition evaluation.
9272 (process_point_options): New function.
9273 (process_serial_event): When inserting a breakpoint, check for
9274 a target-side condition that should be evaluated.
9275
9276 * mem-break.c: Include regcache.h and ax.h.
9277 (point_cond_list_t): New data structure.
9278 (breakpoint) <cond_list>: New field.
9279 (find_gdb_breakpoint_at): Make non-static.
9280 (delete_gdb_breakpoint_at): Clear any target-side
9281 conditions.
9282 (clear_gdb_breakpoint_conditions): New function.
9283 (add_condition_to_breakpoint): Likewise.
9284 (add_breakpoint_condition): Likewise.
9285 (gdb_condition_true_at_breakpoint): Likewise.
9286 (gdb_breakpoint_here): Return result directly instead
9287 of going through a local variable.
9288
9289 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9290 (clear_gdb_breakpoint_conditions): Likewise.
9291 (add_breakpoint_condition): Likewise.
9292 (gdb_condition_true_at_breakpoint): Likewise.
9293
9294 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9295 (need_step_over_p): Take target-side breakpoint condition into
9296 consideration.
9297
5e1dc496
LM
92982012-02-24 Luis Machado <lgustavo@codesourcery>
9299
9300 * server.h: Include tracepoint.h.
9301 (agent_mem_read, agent_get_trace_state_variable_value,
9302 agent_set_trace_state_variable_value,
9303 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9304 get_set_tsv_func_addr): New prototypes.
9305
9306 * ax.h: New include file.
9307 * ax.c: New source file.
9308
9309 * tracepoint.c: Include ax.h.
9310 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9311 agent_expr, eval_result_type): Move to ax.h.
9312 (parse_agent_expr): Rename to ...
9313 (gdb_parse_agent_expr): ... this, make it non-static and move
9314 to ax.h.
9315 (unparse_agent_expr) Rename to ...
9316 (gdb_unparse_agent_expr): ... this, make it non-static and move
9317 to ax.h.
9318 (eval_agent_expr): Rename to ...
9319 (eval_tracepoint_agent_expr): ... this.
9320 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9321 forward declarations.
9322 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9323 (agent_get_trace_state_variable_value): New function.
9324 (agent_set_trace_state_variable_value): New function.
9325 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9326 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9327 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9328 (condition_true_at_tracepoint): Likewise.
9329 (parse_agent_expr): Rename to ...
9330 (gdb_parse_agent_expr): ... this and move to ax.c.
9331 (unparse_agent_expr): Rename to ...
9332 (gdb_unparse_agent_expr): ... this and move to ax.c.
9333 (gdb_agent_op_name): Move to ax.c.
9334 (eval_agent_expr): Rename to ...
9335 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9336 and move to ax.c.
9337 (eval_tracepoint_agent_expr): New function.
9338 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 9339 non-static.
5e1dc496
LM
9340 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9341 ax.c.
9342 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9343 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9344 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9345 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9346 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9347 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9348 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9349 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9350 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9351 (compile_bytecodes): Remove forward declaration.
9352 (is_goto_target): Move to ax.c.
9353 (compile_bytecodes): Move to ax.c and call
9354 agent_get_trace_state_variable_value (...) and
9355 agent_set_trace_state_variable_value (...).
9356
9357 * Makefile.in: Update ax.c and IPA dependencies.
9358
277e4e52
PA
93592012-02-24 Pedro Alves <palves@redhat.com>
9360
9361 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9362 (cmd_bigqtbuffer_circular): ... this. Only handle
9363 'QTBuffer:circular:'.
9364 (handle_tracepoint_general_set): Adjust.
9365
bf4c19f7
YQ
93662012-02-16 Yao Qi <yao@codesourcery.com>
9367
9368 * inferiors.c: Move code to ...
9369 * dll.c: .... here. New.
9370 * server.h: Declare clear_dlls.
9371 * Makefile.in (SFILES): Add dll.c.
9372 (OBS): Add dll.o
9373 (dll.o): New rule.
9374
d73f2619
YQ
93752012-02-11 Yao Qi <yao@codesourcery.com>
9376
9377 * server.c: (handle_monitor_command): Add a new parameter
9378 `own_buf'.
9379 (handle_query): Update caller.
9380
f8255c2a
JB
93812012-02-09 Joel Brobecker <brobecker@adacore.com>
9382
9383 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9384 * configure, config.in: Regenerate.
9385 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9386 is not defined.
9387
da84f473
PA
93882012-02-02 Pedro Alves <palves@redhat.com>
9389
9390 Try SIGKILL first, then PTRACE_KILL.
9391 * linux-low.c (linux_kill_one_lwp): New.
9392 (linux_kill_one_lwp): Rename to ...
9393 (kill_one_lwp_callback): ... this. Use the new
9394 linux_kill_one_lwp.
9395
e886a173
PA
93962012-02-02 Pedro Alves <palves@redhat.com>
9397
9398 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9399 inferior.
9400
be07f1a2
PA
94012012-01-27 Pedro Alves <palves@redhat.com>
9402
9403 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9404 (elf_64_file_p): Make static.
9405 (linux_pid_exe_is_elf_64_file): New.
9406 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9407 Delete declarations.
9408 (linux_pid_exe_is_elf_64_file): Declare.
9409 * linux-x86-low.c (x86_arch_setup): Use
9410 linux_pid_exe_is_elf_64_file.
9411
d8301ad1
JK
94122012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9413
9414 * linux-low.c (linux_wait_for_event_1): Rename to ...
9415 (linux_wait_for_event): ... here and merge it with former
9416 linux_wait_for_event - new variable wait_ptid, use it.
9417 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9418
01b17894
PA
94192012-01-23 Pedro Alves <palves@redhat.com>
9420
9421 * server.c (main): Avoid yet another case of infinite loop while
9422 detaching/killing after a longjmp.
9423
e825046f
JK
94242012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9425
9426 Code cleanup.
9427 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9428
b9e7b9c3
UW
94292012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9430
9431 * hostio.c (handle_readlink): New function.
9432 (handle_vFile): Call it to handle "vFile:readlink" packets.
9433
901f9912
UW
94342012-01-20 Pedro Alves <palves@redhat.com>
9435 Ulrich Weigand <ulrich.weigand@linaro.org>
9436
9437 * server.c (handle_v_requests): Only support vAttach and vRun to
9438 start multiple processes when in extended protocol mode.
9439
fc1ab1a0
PA
94402012-01-17 Pedro Alves <palves@redhat.com>
9441
9442 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9443 memalign plus mprotect to allocate the scratch buffer.
9444
7d5d4e98
PA
94452012-01-13 Pedro Alves <palves@redhat.com>
9446
9447 * server.c (attach_inferior): Clear `cont_thread'.
9448
f128d5e9
PA
94492012-01-13 Pedro Alves <palves@redhat.com>
9450
9451 * server.c (main): Avoid infinite loop while detaching/killing
9452 after a longjmp.
9453
06db92f0
DE
94542012-01-09 Doug Evans <dje@google.com>
9455
9456 * server.c (start_inferior): Set last_ptid in --wrapper case.
9457
32d92999
YQ
94582012-01-06 Yao Qi <yao@codesourcery.com>
9459
9460 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9461 defined.
9462 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9463
5e0a92a9
YQ
94642012-01-04 Yao Qi <yao@codesourcery.com>
9465
9466 * tracepoint.c (cmd_qtdp): Print debug message
9467 for static tracepoint.
9468
ae639e8c
YQ
94692012-01-04 Yao Qi <yao@codesourcery.com>
9470
9471 * tracepoint.c (trace_vdebug): Differentiate debug message
9472 between gdbserver and IPA.
9473
f72429c5
YQ
94742012-01-03 Yao Qi <yao@codesourcery.com>
9475
9476 * tracepoint.c (tracepoint_was_hit): Don't collect for
9477 static tracepoint.
9478
12c3e59c
JB
94792012-01-02 Joel Brobecker <brobecker@adacore.com>
9480
9481 * terminal.h: Reformat copyright header.
9482
67827812
JB
94832012-01-02 Joel Brobecker <brobecker@adacore.com>
9484
9485 * server.c (gdbserver_version): Update copyright year.
9486 * gdbreplay.c (gdbreplay_version): Likewise.
9487
3e52c33d
JK
94882011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9489
9490 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9491
9492 Revert:
9493 2011-12-18 Hui Zhu <teawater@gmail.com>
9494 * linux-low.c (linux_create_inferior): Save return value to ret.
9495
66f1260e
HZ
94962011-12-18 Hui Zhu <teawater@gmail.com>
9497
9498 * linux-low.c (linux_create_inferior): Save return value to ret.
9499
e77616d7
DE
95002011-12-16 Doug Evans <dje@google.com>
9501
e7b06c57
DE
9502 * linux-low.c (linux_create_inferior): If stdio connection,
9503 redirect stdin from /dev/null, stdout to stderr.
9504 * remote-utils.c (remote_is_stdio): New static global.
9505 (remote_connection_is_stdio): New function.
9506 (remote_prepare): Handle stdio connection.
9507 (remote_open): Ditto.
9508 (remote_close): Don't close stdin for stdio connections.
9509 (read_prim,write_prim): New functions. Replace all calls to
9510 read/write to these.
9511 * server.c (main): Watch for "-" argument. Move call to
9512 remote_prepare before start_inferior.
9513 * server.h (STDIO_CONNECTION_NAME): New macro.
9514 (remote_connection_is_stdio): Declare.
9515
e77616d7
DE
9516 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9517 in debugging output.
9518
82067193
YQ
95192011-12-15 Yao Qi <yao@codesourcery.com>
9520
9521 * tracepoint.c: Include sys/syscall.h.
9522 (gdb_ust_thread): Remove preprocessor conditional.
9523
82bfbe7e
PA
95242011-12-14 Pedro Alves <pedro@codesourcery.com>
9525
9526 * linux-low.c (linux_detach_one_lwp): Call
9527 the_low_target.prepare_to_resume before detaching.
9528
712c6575
YQ
95292011-12-14 Yao Qi <yao@codesourcery.com>
9530
9531 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9532 of write.
9533
d54d1edf
YQ
95342011-12-14 Yao Qi <yao@codesourcery.com>
9535
9536 * i386-low.c (i386_low_stopped_data_address): Initialize local
9537 variable `control'.
9538
6210a125
PA
95392011-12-13 Pedro Alves <pedro@codesourcery.com>
9540
9541 PR remote/13492
9542
9543 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9544 DR_CONTROL unless necessary. Extend comments.
9545 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9546 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9547
2ece8244
YQ
95482011-12-13 Yao Qi <yao@codesourcery.com>
9549
9550 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9551 macros.
9552 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9553
784867a5
JK
95542011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9555
9556 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9557 Print new debug message for such case.
9558
6bf36717
JK
95592011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9560
9561 Fix overlapping memcpy.
9562 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9563 the read_inferior_memory transfer.
9564 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9565 write_inferior_memory transfer.
9566 (set_fast_tracepoint_jump): New variable buf. Use it for the
9567 read_inferior_memory and write_inferior_memory transfers.
9568 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9569 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9570 Use it for the write_inferior_memory transfer.
9571 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9572 buffers.
9573
50275556
MR
95742011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9575
9576 * linux-low.c (fetch_register, store_register): Make code
9577 consistent, fix formatting.
9578
7325beb4
MR
95792011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9580
9581 * linux-low.c (usr_store_inferior_registers): Factor out code
9582 to handle individual registers into...
9583 (store_register): ... this new function.
9584
c642a434
UW
95852011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9586
9587 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9588 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9589 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9590 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9591 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9592 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9593 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9594 (srv_xmlfiles): Add new XML files.
9595
9596 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9597 and <sys/uio.h>.
9598 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9599 (init_registers_s390_linux32v1): Add prototype.
9600 (init_registers_s390_linux32v2): Likewise.
9601 (init_registers_s390_linux64v1): Likewise.
9602 (init_registers_s390_linux64v2): Likewise.
9603 (init_registers_s390x_linux64v1): Likewise.
9604 (init_registers_s390x_linux64v2): Likewise.
9605 (s390_num_regs): Increment to 52.
9606 (s390_regmap): Add orig_r2 register.
9607 (s390_num_regs_3264): Increment to 68.
9608 (s390_regmap_3264): Add orig_r2 register.
9609 (s390_collect_ptrace_register): Handle orig_r2 register.
9610 (s390_supply_ptrace_register): Likewise.
9611 (s390_fill_last_break): New function.
9612 (s390_store_last_break): Likewise.
9613 (s390_fill_system_call): New function.
9614 (s390_store_system_call): Likewise.
9615 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9616 register sets.
9617 (s390_check_regset): New function.
9618 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9619 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9620 Update target_regsets for available register sets.
9621
2268b414
JK
96222011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9623 Jan Kratochvil <jan.kratochvil@redhat.com>
9624
9625 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9626 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9627 New.
9628 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9629 * linux-low.h (struct process_info_private): New member r_debug.
9630 * server.c (handle_qxfer_libraries): Call
9631 the_target->qxfer_libraries_svr4.
9632 (handle_qxfer_libraries_svr4): New function.
9633 (qxfer_packets): New entry "libraries-svr4".
9634 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9635 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9636 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9637 PACKET_qXfer_libraries_svr4.
9638
d6db1fab
UW
96392011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9640
9641 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9642 PSW address/mask between 8-byte and 16-byte formats.
9643 (s390_supply_ptrace_register): Likewise.
9644 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9645 basic addressing mode bit.
9646
242f5f1c
SS
96472011-11-24 Stan Shebs <stan@codesourcery.com>
9648
9649 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9650
f196051f
SS
96512011-11-17 Stan Shebs <stan@codesourcery.com>
9652
9653 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9654 (tracing_start_time): New global.
9655 (tracing_stop_time): New global.
9656 (tracing_user_name): New global.
9657 (tracing_notes): New global.
9658 (tracing_stop_note): New global.
9659 (cmd_qtstart): Set traceframe_usage, start_time.
9660 (stop_tracing): Set stop_time.
9661 (cmd_qtstatus): Report additional status.
9662 (cmd_qtp): New function.
9663 (handle_tracepoint_query): Call it.
9664 (cmd_qtnotes): New function.
9665 (handle_tracepoint_general_set): Call it.
9666 (get_timestamp): Rename from tsv_get_timestamp.
9667
405f8e94
SS
96682011-11-14 Stan Shebs <stan@codesourcery.com>
9669 Kwok Cheung Yeung <kcy@codesourcery.com>
9670
9671 * linux-x86-low.c (small_jump_insn): New.
9672 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9673 trampoline and error message, build a trampoline and issue a small
9674 jump instruction to it.
9675 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9676 trampoline and error message.
9677 (x86_get_min_fast_tracepoint_insn_len): New.
9678 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9679 * linux-low.h (struct linux_target_ops): Add arguments to
9680 install_fast_tracepoint_jump_pad operation, add new operation.
9681 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9682 arguments.
9683 (linux_get_min_fast_tracepoint_insn_len): New function.
9684 (linux_target_op): Add new operation.
9685 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9686 (gdb_trampoline_buffer_end): Ditto.
9687 (gdb_trampoline_buffer_error): Ditto.
9688 (struct ipa_sym_addresses): Add fields for new IPA variables.
9689 (symbol_list): Add entries for new IPA variables.
9690 (struct tracepoint): Add fields to hold the address range of the
9691 trampoline used by the tracepoint.
9692 (trampoline_buffer_head): New static variable.
9693 (trampoline_buffer_tail): Ditto.
9694 (claim_trampoline_space): New function.
9695 (have_fast_tracepoint_trampoline_buffer): New function.
9696 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9697 structure.
9698 (install_fast_tracepoint): Ditto, also add error buffer argument.
9699 (cmd_qtminftpilen): New function.
9700 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9701 (fast_tracepoint_from_trampoline_address): New function.
9702 (fast_tracepoint_collecting): Handle trampoline as part of jump
9703 pad space.
9704 (set_trampoline_buffer_space): New function.
9705 (initialize_tracepoint): Initialize new IPA variables.
9706 * target.h (struct target_ops): Add arguments to
9707 install_fast_tracepoint_jump_pad operation, add new
9708 get_min_fast_tracepoint_insn_len operation.
9709 (target_get_min_fast_tracepoint_insn_len): New.
9710 (install_fast_tracepoint_jump_pad): Add arguments.
9711 * server.h (IPA_BUFSIZ): Define.
9712 * linux-i386-ipa.c: Include extra header files.
9713 (initialize_fast_tracepoint_trampoline_buffer): New function.
9714 (initialize_low_tracepoint): Call it.
9715 * server.h (set_trampoline_buffer_space): Declare.
9716 (claim_trampoline_space): Ditto.
9717 (have_fast_tracepoint_trampoline_buffer): Ditto.
9718
1e4d1764
YQ
97192011-11-14 Yao Qi <yao@codesourcery.com>
9720
9721 * server.c (handle_query): Handle InstallInTrace for qSupported.
9722 * tracepoint.c (add_tracepoint): Sort list.
9723 (install_tracepoint, download_tracepoint): New.
9724 (cmd_qtdp): Call them to install and download tracepoints.
9725 (sort_tracepoints): Removed.
9726 (cmd_qtstart): Update.
9727
5c73ff4e
YQ
97282011-11-14 Yao Qi <yao@codesourcery.com>
9729
9730 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9731 * mem-break.h: Declare.
9732 * tracepoint.c (cmd_qtstart): Move some code to ...
9733 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9734 New.
9735 (download_tracepoints): Move some code to ...
9736 (download_tracepoint_1): ... here. New.
9737
86a30030
YQ
97382011-11-08 Yao Qi <yao@codesourcery.com>
9739
9740 * remote-utils.c (relocate_instruction): A comment fix.
9741
8d26e50c
JB
97422011-11-07 Joel Brobecker <brobecker@adacore.com>
9743
9744 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9745 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9746 dr_status_mirror and dr_control_mirror from debug_reg_state.
9747 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9748 (i386_initial_stuff): Remove use of deleted globals.
9749 (i386_get_thread_context, i386_set_thread_context,
9750 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9751 from debug_reg_state.
9752
a59306a3
YQ
97532011-11-05 Yao Qi <yao@codesourcery.com>
9754
9755 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9756 address as TPOINT's.
9757
3065dfb6
SS
97582011-11-02 Stan Shebs <stan@codesourcery.com>
9759
9760 * tracepoint.c (agent_mem_read_string): New function.
9761 (eval_agent_expr): Call it for tracenz.
9762 * server.c (handle_query): Report support for tracenz.
9763
fd0d8c7c
YQ
97642011-11-02 Yao Qi <yao@codesourcery.com>
9765
9766 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9767
609086b1
YQ
97682011-11-02 Yao Qi <yao@codesourcery.com>
9769
9770 * target.h: Fix a typo in comment.
9771
b9fd1791
PA
97722011-10-31 Pedro Alves <pedro@codesourcery.com>
9773
9774 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9775 clobber the breakpoints' shadows with fast tracepoint jumps.
9776 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9777 * target.c (write_inferior_memory): Also pass MYADDR down to
9778 check_mem_write.
9779
03583c20
UW
97802011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9781
9782 * configure.ac: Check support for personality routine.
9783 * configure: Regenerate.
9784 * config.in: Likewise.
9785 * linux-low.c: Include <sys/personality.h>.
9786 Define ADDR_NO_RANDOMIZE if necessary.
9787 (linux_create_inferior): Disable address space randomization when
9788 forking inferior, if requested.
9789 (linux_supports_disable_randomization): New function.
9790 (linux_target_ops): Install it.
9791 * server.h (disable_randomization): Declare.
9792 * server.c (disable_randomization): New global variable.
9793 (handle_general_set): Handle QDisableRandomization.
9794 (handle_query): Likewise for qSupported.
9795 (main): Support --disable-randomization and --no-disable-randomization
9796 command line arguments.
9797 * target.h (struct target_ops): Add supports_disable_randomization.
9798 (target_supports_disable_randomization): New macro.
9799
723b724b
MF
98002011-09-29 Mike Frysinger <vapier@gentoo.org>
9801
9802 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9803 ifdef check.
9804 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9805 [!PT_GETDSBT] (target_loadmap): New definition.
9806 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9807 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9808 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9809 and PT_GETDSBT to LINUX_LOADMAP.
9810 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9811 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9812
55329a5c 98132011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
9814
9815 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9816 (arm_linux_hwbp_cap): New static variable.
9817 (arm_linux_get_hwbp_cap): Replace by ...
9818 (arm_linux_init_hwbp_cap): ... this new function.
9819 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9820 (arm_linux_get_hw_watchpoint_count): Likewise.
9821 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9822 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9823 (arm_prepare_to_resume): Use perror_with_name instead of error.
9824
55329a5c 98252011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
9826
9827 * linux-arm-low.c: Include <signal.h>.
9828 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9829 (struct arm_linux_hwbp_cap): New data type.
9830 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9831 (struct arm_linux_hw_breakpoint): New data type.
9832 (MAX_BPTS, MAX_WPTS): Define.
9833 (struct arch_process_info, struct arch_lwp_info): New data types.
9834 (arm_linux_get_hwbp_cap): New function.
9835 (arm_linux_get_hw_breakpoint_count): Likewise.
9836 (arm_linux_get_hw_watchpoint_count): Likewise.
9837 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9838 (arm_hwbp_control_initialize): Likewise.
9839 (arm_hwbp_control_is_enabled): Likewise.
9840 (arm_hwbp_control_is_initialized): Likewise.
9841 (arm_hwbp_control_disable): Likewise.
9842 (arm_linux_hw_breakpoint_equal): Likewise.
9843 (arm_linux_hw_point_initialize): Likewise.
9844 (struct update_registers_data): New data structure.
9845 (update_registers_callback: New function.
9846 (arm_insert_point): Likewise.
9847 (arm_remove_point): Likewise.
9848 (arm_stopped_by_watchpoint): Likewise.
9849 (arm_stopped_data_address): Likewise.
9850 (arm_new_process): Likewise.
9851 (arm_new_thread): Likewise.
9852 (arm_prepare_to_resume): Likewise.
9853 (the_low_target): Register arm_insert_point, arm_remove_point,
9854 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9855 arm_new_thread, and arm_prepare_to_resume.
9856
6b9801d4
SS
98572011-09-15 Stan Shebs <stan@codesourcery.com>
9858
9859 * server.h (struct emit_ops): Add compare-goto fields.
9860 * tracepoint.c (gdb_agent_op_sizes): New table.
9861 (emit_eq_goto): New function.
9862 (emit_ne_goto): New function.
9863 (emit_lt_goto): New function.
9864 (emit_le_goto): New function.
9865 (emit_gt_goto): New function.
9866 (emit_ge_goto): New function.
9867 (is_goto_target): New function.
9868 (compile_bytecodes): Recognize special cases of compare-goto
9869 combinations and call specialized emitters for them.
9870 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9871 (amd64_emit_ne_goto): New function.
9872 (amd64_emit_lt_goto): New function.
9873 (amd64_emit_le_goto): New function.
9874 (amd64_emit_gt_goto): New function.
9875 (amd64_emit_ge_goto): New function.
9876 (amd64_emit_ops): Add the new functions.
9877 (i386_emit_eq_goto): New function.
9878 (i386_emit_ne_goto): New function.
9879 (i386_emit_lt_goto): New function.
9880 (i386_emit_le_goto): New function.
9881 (i386_emit_gt_goto): New function.
9882 (i386_emit_ge_goto): New function.
9883 (i386_emit_ops): Add the new functions.
9884
bf15cbda
SS
98852011-09-08 Stan Shebs <stan@codesourcery.com>
9886
9887 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9888 (i386_emit_epilogue): Restore %ebx.
9889
943ca1dd
JZ
98902011-08-31 Jie Zhang <jzhang918@gmail.com>
9891
9892 * server.c (step_thread): Remove definition.
9893 (process_serial_event): Don't handle Hs.
9894 * server.h (step_thread): Remove declaration.
9895 * target.c (set_desired_inferior): Remove use of step_thread.
9896
e3deef73
LM
98972011-08-24 Luis Machado <lgustavo@codesourcery.com>
9898
9899 * linux-low.c: Include linux-procfs.h.
9900 (linux_attach_lwp_1): Update comments.
9901 (linux_attach): Scan for existing threads when attaching to a
9902 process that is the tgid.
9903 * Makefile.in: Update dependencies.
9904
13da1c97
LM
99052011-08-24 Luis Machado <lgustavo@codesourcery.com>
9906
9907 * configure.srv: Add linux-procfs.o dependencies.
9908
881127c9
YQ
99092011-08-14 Yao Qi <yao@codesourcery.com>
9910
9911 * target.h (struct target_ops): Fix indent.
9912 * win32-low.c (win32_target_ops): Fix comment.
9913
58dbd541
YQ
99142011-08-14 Andrew Jenner <andrew@codesourcery.com>
9915 Yao Qi <yao@codesourcery.com>
9916
9917 * Makefile.in (clean): Remove tic6x-*.c files.
9918 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9919 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9920 (tic6x-c64xp-linux.c): Likewise.
9921 * configure.srv: Add support for tic6x-*-uclinux.
9922 * linux-tic6x-low.c: New.
9923 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9924
78d85199
YQ
99252011-08-14 Andrew Stubbs <ams@codesourcery.com>
9926 Yao Qi <yao@codesourcery.com>
9927
9928 * target.h (struct target_ops): Add read_loadmap.
9929 * linux-low.c (struct target_loadseg): New type.
9930 (struct target_loadmap): New type.
9931 (linux_read_loadmap): New function.
9932 (linux_target_ops): Add linux_read_loadmap.
9933 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
9934 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9935 to NULL.
78d85199 9936
a959a88d
EZ
99372011-08-05 Eli Zaretskii <eliz@gnu.org>
9938
9939 * win32-low.c: Include <stdint.h>.
9940
1ced966e
PA
99412011-07-22 Pedro Alves <pedro@codesourcery.com>
9942
9943 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9944 to the inferior here.
9945 (i386_remove_aligned_watchpoint): Ditto.
9946 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9947 fit part of the watchpoint in the debug registers.
9948 (i386_update_inferior_debug_regs): New.
9949 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9950 registers, and only update the inferior on success.
9951 (i386_low_remove_watchpoint): Ditto.
9952
d26e3629
KY
99532011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9954
9955 * linux-low.c (compare_ints, unique, list_threads, show_process,
9956 linux_core_of_thread): Delete.
9957 (linux_target_ops): Change linux_core_of_thread to
9958 linux_common_core_of_thread.
9959 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9960 * utils.c (malloc_failure): Change type of argument.
9961 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9962 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9963 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9964 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9965 (IPA_OBJS): Add common-utils-ipa.o.
9966 (ptid_h, linux_osdata_h): New macros.
9967 (server_h): Add common/common-utils.h, common/xml-utils.h,
9968 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9969 common/ptid.h.
9970 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9971 ptid.o, buffer.o): New rules.
9972 (linux-low.o): Add common/linux-osdata.h as a dependency.
9973 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9974 * configure.ac: Add AC_HEADER_DIRENT check.
9975 * config.in: Regenerate.
9976 * configure: Regenerate.
9977 * remote-utils.c (xml_escape_text): Delete.
9978 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9979 buffer_xml_printf): Move to common/buffer.c.
9980 * server.c (main): Remove call to initialize_inferiors.
9981 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9982 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9983 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9984 internal_error, gdb_assert, gdb_assert_fail): Delete.
9985 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9986 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9987 common/buffer.h.
9988 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9989 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9990 initialize_inferiors): Delete.
9991
2275a1a7
PA
99922011-07-20 Pedro Alves <pedro@codesourcery.com>
9993
9994 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9995 symbol error.
9996
0a5b1e09
PA
99972011-05-31 Pedro Alves <pedro@codesourcery.com>
9998
9999 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10000 assertion.
10001 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10002
6938fd34
YQ
100032011-05-26 Yao Qi <yao@codesourcery.com>
10004
10005 * Makefile.in (thread-db.o): Track dependence to
10006 common/gdb_thread_db.h.
10007 * thread-db.c: include gdb_thread_db.h from right place.
10008
b481f9e0
TT
100092011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10010
10011 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10012 __FILE__ and __LINE__ to internal_error.
10013
98a5dd13
DE
100142011-05-13 Doug Evans <dje@google.com>
10015
10016 * thread-db.c (try_thread_db_load_from_sdir): New function.
10017 (try_thread_db_load_from_dir): New function.
10018 (thread_db_load_search): Handle $sdir, ignore $pdir.
10019 Remove trying of system directories if search of
10020 libthread-db-search-path fails, that is now done via $sdir.
10021
d248b706
KY
100222011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10023
10024 * server.c (handle_query): Add EnableDisableTracepoints to the list
10025 of supported features.
43aaf8b6 10026 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 10027 tracepoints.
43aaf8b6
PA
10028 (cmd_qtenable_disable): New.
10029 (cmd_qtstart): Install tracepoints even if disabled.
10030 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10031 receiving a QTEnable or QTDisable packet.
10032 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10033 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10034 tracepoints.
10035 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 10036
84e578fb
DE
100372011-05-10 Doug Evans <dje@google.com>
10038
10039 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10040
71f55dd8
DE
100412011-05-04 Doug Evans <dje@google.com>
10042
10043 * linux-low.c (linux_join): Skip process lookup.
10044 * spu-low.c (spu_join): Ditto.
10045 * server.c (join_inferiors_callback): Delete.
10046 (process_serial_event): For 'D' packet (detach) call join_inferior
10047 directly.
10048
4d393d60
JM
100492011-05-04 Joseph Myers <joseph@codesourcery.com>
10050
10051 * README: Don't mention xscale*-*-linux*.
10052 * configure.srv (xscale*-*-linux*): Don't handle target.
10053
b00ad6ff
NF
100542011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10055
10056 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10057 casting pointers.
10058 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10059 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10060 (i386_emit_void_call_2): Likewise.
10061
af96c192
YQ
100622011-04-26 Yao Qi <yao@codesourcery.com>
10063
43aaf8b6
PA
10064 * linux-low.c: Move common macros to linux-ptrace.h.
10065 Include linux-ptrace.h.
af96c192
YQ
10066 * Makefile.in (linux_ptrace_h): New.
10067 (linux-low.o): Depends on linux-ptrace.h.
10068
03f2bd59
JK
100692011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10070
10071 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10072 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10073 (remote_prepare): New function with most of the TCP code from ...
10074 (remote_open): ... here. Detect PORT here unconditionally. Move also
10075 setting transport_is_reliable.
10076 * server.c (run_once): New variable.
10077 (gdbserver_usage): Document it.
10078 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10079 the first run if RUN_ONCE.
10080 * server.h (run_once, remote_prepare): New declarations.
10081
7a9dd1b2
TT
100822011-04-19 Tom Tromey <tromey@redhat.com>
10083
10084 * win32-low.c (handle_load_dll): Remove duplicate "the".
10085
81239425
PM
100862011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10087
10088 Remove support for old Cygwin 1.5 versions.
10089 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10090 function to avoid warning.
10091 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10092 warning.
10093
9e0627f1
PM
100942011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10095
10096 * gdbserver/server.h (Macro _): Define it if not available.
10097
588eebee
MS
100982011-03-14 Michael Snyder <msnyder@vmware.com>
10099
348af9f7 10100 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 10101
43f70d4c
JB
101022011-03-10 Joel Brobecker <brobecker@adacore.com>
10103
10104 * Makefile.in (maintainer-clean realclean distclean): Remove
10105 "make ... subdir_do" command.
10106
348af9f7
MS
101072011-03-10 Michael Snyder <msnyder@vmware.com>
10108
10109 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10110
10111 * server.c (handle_v_run): Free alloced buffer on early return.
10112
e637a4f5
YQ
101132011-03-09 Yao Qi <yao@codesourcery.com>
10114
10115 Revert:
10116 2011-03-04 Yao Qi <yao@codesourcery.com>
10117
10118 * Makefile.in: Remove GNU make feature --directory.
10119
10120 2011-03-05 Yao Qi <yao@codesourcery.com>
10121
10122 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10123 (subdir_do): New make target. Copied from gdb/Makefile.
10124 (maintainer-clean, realclean, distclean, clean): Call corresponding
10125 make targets in common/Makefile.
10126
10127 2011-02-11 Yao Qi <yao@codesourcery.com>
10128
10129 * configure.ac: Call AC_PROG_RANLIB.
10130 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10131 * configure: Regenerate.
10132
e6edda56
JK
101332011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10134
10135 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10136
e5141119
JB
101372011-03-06 Yao Qi <yao@codesourcery.com>
10138
10139 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10140
64794aa4
JB
101412011-03-05 Yao Qi <yao@codesourcery.com>
10142
10143 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10144 (subdir_do): New make target. Copied from gdb/Makefile.
10145 (maintainer-clean, realclean, distclean, clean): Call corresponding
10146 make targets in common/Makefile.
10147
7a762829
YQ
101482011-03-04 Yao Qi <yao@codesourcery.com>
10149
10150 * Makefile.in: Remove GNU make feature --directory.
10151
348af9f7
MS
101522011-03-04 Michael Snyder <msnyder@vmware.com>
10153
10154 * server.c (queue_stop_reply): Call xmalloc not malloc.
10155
101562011-03-02 Michael Snyder <msnyder@vmware.com>
10157
10158 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10159
9f72fee2
MS
101602011-02-28 Michael Snyder <msnyder@vmware.com>
10161
588eebee
MS
10162 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10163 (cmd_qtframe): Ditto.
10164 (cmd_qtbuffer): Ditto.
10165 (cmd_bigqtbuffer): Ditto.
10166
9f72fee2
MS
10167 * utils.c (decimal2str): Initialize 'width' to nine, then
10168 don't mess with it.
10169
8040bd49
UW
101702011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10171
10172 * hostio.c (require_data): Free *data, not data.
10173
7e52cbd0
JK
101742011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10175
10176 * hostio.c (require_data): Use free, not xfree.
10177
9130f83e
MS
101782011-02-27 Michael Snyder <msnyder@vmware.com>
10179
4b812f4e
MS
10180 * server.c (handle_query): Discard unused value.
10181
9130f83e
MS
10182 * hostio.c (require_data): Free malloc memory before returning
10183 error.
10184
69d37113
MS
101852011-02-26 Michael Snyder <msnyder@vmware.com>
10186
10187 * linux-low.c (list_threads): Call closedir for dirent.
10188
35f5825a
MS
101892011-02-27 Michael Snyder <msnyder@vmware.com>
10190
2a589cef
MS
10191 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10192 a case statement falls through.
10193
0adea5f7
MS
10194 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10195
35f5825a
MS
10196 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10197 in comparison.
10198
238f1c74
MS
101992011-02-26 Michael Snyder <msnyder@vmware.com>
10200
10201 * utils.c (decimal2str): Eliminate dead code and dead param.
10202 (pulongest): Drop dead param from call to decimal2str.
10203 (plongest): Ditto.
10204
633ff500
JB
102052011-02-24 Joel Brobecker <brobecker@adacore.com>
10206
10207 Revert the following patch (not approved yet):
10208 2011-02-21 Hui Zhu <teawater@gmail.com>
10209 * tracepoint.c (tp_printf): New function.
10210 (eval_agent_expr): Handle gdb_agent_op_printf.
10211
f9c6ff72
HZ
102122011-02-21 Hui Zhu <teawater@gmail.com>
10213
10214 * tracepoint.c (tp_printf): New function.
10215 (eval_agent_expr): Handle gdb_agent_op_printf.
10216
94d5e490
TT
102172011-02-18 Tom Tromey <tromey@redhat.com>
10218
10219 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10220 (tracepoint.o): Likewise.
10221 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10222 (gdb_agent_op_names): Likewise.
10223
c7f96d2b
TT
102242011-02-18 Tom Tromey <tromey@redhat.com>
10225
10226 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10227 gdb_agent_op_rot>: New constants.
10228 (gdb_agent_op_names): Add pick and roll.
10229 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10230 cases.
10231
0feedb2c
JK
102322011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10233
10234 * aclocal.m4: Regenerated with aclocal-1.11.1.
10235
b3b9301e
PA
102362011-02-14 Pedro Alves <pedro@codesourcery.com>
10237
10238 * server.c (handle_qxfer_traceframe_info): New.
10239 (qxfer_packets): Register "traceframe-info".
10240 (handle_query): Report support for qXfer:traceframe-info:read+.
10241 * tracepoint.c (match_blocktype): New.
10242 (traceframe_find_block_type): Rename to ...
10243 (traceframe_walk_blocks): ... this. Add callback filter argument,
10244 and use it.
10245 (traceframe_find_block_type): New, reimplemented on top of
10246 traceframe_walk_blocks.
10247 (build_traceframe_info_xml): New.
10248 (traceframe_read_info): New.
10249 * server.h (traceframe_read_info): Declare.
10250
4f3e6fb7
YQ
102512011-02-11 Yao Qi <yao@codesourcery.com>
10252
10253 * configure.ac: Call AC_PROG_RANLIB.
10254 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10255 * configure: Regenerate.
10256
764880b7
PA
102572011-02-07 Pedro Alves <pedro@codesourcery.com>
10258
10259 * server.c (gdb_read_memory): Change return semantics to allow
10260 partial transfers.
10261 (handle_search_memory_1): Adjust.
10262 (process_serial_event) <'m' packet>: Handle partial transfers.
10263 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10264
1c79eb8a
PA
102652011-01-28 Pedro Alves <pedro@codesourcery.com>
10266
10267 * regcache.c (init_register_cache): Initialize
10268 regcache->register_status.
10269 (free_register_cache): Release regcache->register_status.
10270 (regcache_cpy): Copy register_status.
10271 (registers_to_string): Print 'x's for unavailable registers.
10272 (supply_register): Mark the register's status valid or
10273 unavailable, depending on whether a buffer was passed in or not.
10274 (supply_register_zeroed): New.
10275 (supply_regblock): Mark the registers' status valid or
10276 unavailable, depending on whether a buffer was passed in or not.
10277 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10278 (struct regcache): New `register_status' field.
10279 (supply_register_zeroed): Declare.
10280 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10281 supply_register_zeroed, rather than passing a NULL buffer to
10282 supply_register.
10283 * tracepoint.c (fetch_traceframe_registers): Update comment.
10284
85724a0e
PA
102852011-01-28 Pedro Alves <pedro@codesourcery.com>
10286
10287 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10288 buffer explicit.
10289
d08aafef
PA
102902011-01-25 Pedro Alves <pedro@codesourcery.com>
10291
10292 * server.h (decode_xfer_write): Change prototype.
10293 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10294 and don't extract the annex here.
10295 * server.c (decode_xfer_read): Remove `annex' parameter,
10296 and don't extract the annex here.
10297 (decode_xfer): New.
10298 (struct qxfer): New.
10299 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10300 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10301 (handle_qxfer_statictrace): New functions, abstracted out from
10302 handle_query, and made to use the struct qxfer interface.
10303 (handle_threads_qxfer_proper): Rename to ...
10304 (handle_qxfer_threads_proper): ... this.
10305 (handle_threads_qxfer): Rename to ...
10306 (handle_qxfer_threads): ... this. Adjust.
10307 (qxfer_packets): New array.
10308 (handle_qxfer): New function.
10309 (handle_query): Use handle_qxfer.
10310
493e2a69
MS
103112011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10312
10313 * gdbreplay.c: Shorten lines of >= 80 columns.
10314 * linux-low.c: Ditto.
10315 * linux-ppc-low.c: Ditto.
10316 * linux-s390-low.c: Ditto.
10317 * linux-sparc-low.c: Ditto.
10318 * linux-x86-low.c: Ditto.
10319 * linux-xtensa-low.c: Ditto.
10320 * mem-break.c: Ditto.
10321 * nto-low.c: Ditto.
10322 * regcache.h: Ditto.
10323 * remote-utils.c: Ditto.
10324 * server.c: Ditto.
10325 * server.h: Ditto.
10326 * thread-db.c: Ditto.
10327 * tracepoint.c: Ditto.
10328 * utils.c: Ditto.
10329 * win32-low.h: Ditto.
10330
44944448
JB
103312011-01-05 Joel Brobecker <brobecker@adacore.com>
10332
10333 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10334 update.
10335
71ce852c
JB
103362011-01-01 Joel Brobecker <brobecker@adacore.com>
10337
10338 * server.c (gdbserver_version): Update copyright year in version
10339 output.
10340 * gdbreplay.c (gdbreplay_version): Ditto.
10341
eb826dc6
MF
103422010-12-29 Jie Zhang <jie.zhang@analog.com>
10343
10344 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10345 * linux-bfin-low.c: New file.
10346 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10347 PT_DATA_ADDR for BFIN targets.
10348 * Makefile.in (SFILES): Add linux-bfin-low.c.
10349 (clean): Remove reg-bfin.c.
10350 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10351 * README: Mention supported Blackfin targets.
10352
39ab222a
MF
103532010-12-23 Mike Frysinger <vapier@gentoo.org>
10354
10355 * .gitignore: New file.
10356
a1f2ce7d
MF
103572010-11-16 Mike Frysinger <vapier@gentoo.org>
10358
10359 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10360
f474844c
JZ
103612010-10-22 Jie Zhang <jie@codesourcery.com>
10362
10363 * Makefile.in: Add FLAGS_TO_PASS variable.
10364 (install): Remove dependency of install-only and recursively
10365 invoke make for install-only.
10366
f1048712
DE
103672010-10-04 Doug Evans <dje@google.com>
10368
10369 * Makefile.in (uninstall): Use $(DESTDIR).
10370
b53a1623
PA
103712010-09-24 Pedro Alves <pedro@codesourcery.com>
10372
e6ee044d
PA
10373 PR gdb/11842
10374
b53a1623
PA
10375 * linux-x86-low.c (compat_siginfo_from_siginfo)
10376 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10377 si_code is < 0. Check for si_code == SI_TIMER before checking for
10378 si_code < 0.
10379
fa1bd1e4
JB
103802010-09-13 Joel Brobecker <brobecker@adacore.com>
10381
10382 * lynx-i386-low.c: New file.
10383 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10384
47fac8f8
JB
103852010-09-13 Joel Brobecker <brobecker@adacore.com>
10386
10387 * lynx-low.c (ptrace_request_to_str): Remove handling for
10388 request values that have been removed in LynxOS 5.x.
10389
1adfc54d
JB
103902010-09-13 Joel Brobecker <brobecker@adacore.com>
10391
10392 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10393 <ptrace.h>
10394
c2a66c29
NS
103952010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10396
10397 * configure.ac: Add --enable-inprocess-agent option.
10398 * configure: Rebuilt.
10399
32fcada3
YQ
104002010-09-06 Yao Qi <yao@codesourcery.com>
10401
10402 * linux-low.c (linux_kill): Remove unused variable.
10403 (linux_stabilize_threads): Likewise.
10404 * server.c (start_inferior): Likewise.
10405 (queue_stop_reply_callback): Likewise.
10406 * tracepoint.c (do_action_at_tracepoint): Likewise.
10407
0cccb683
YQ
104082010-09-06 Yao Qi <yao@codesourcery.com>
10409
10410 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10411 on return.
10412
423ec54c
JK
104132010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10414
10415 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10416
12ac6819
PA
104172010-09-06 Pedro Alves <pedro@codesourcery.com>
10418
10419 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10420 "$(IPA_DEPFILES)".
10421
8ed54b31
JB
104222010-09-01 Joel Brobecker <brobecker@adacore.com>
10423
10424 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10425 gdbserver/lynx-ppc-low.c: New files.
10426 * Makefile.in (lynx_low_h): New variable.
10427 (lynx-low.o, lynx-ppc-low.o): New rules.
10428 * configure.ac: On LynxOS, link with -lnetinet.
10429 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10430 * configure: regenerate.
10431
bb0116a4
JB
104322010-09-01 Joel Brobecker <brobecker@adacore.com>
10433
10434 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10435 * configure.ac: Add check for vasprintf and vsnprintf.
10436 * configure, config.in: Regenerate.
10437 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10438
a778ab81 104392010-09-01 Joel Brobecker <brobecker@adacore.com>
10440
10441 * gdbreplay.c: Move include of alloca.h up, next to include of
10442 malloc.h.
10443 * server.h: Add include of malloc.h.
10444 * mem-break.c: Remove include of malloc.h.
10445 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10446
8b034a19 104472010-09-01 Joel Brobecker <brobecker@adacore.com>
10448
10449 * Makefile.in (memmem.o): Build with -Wno-error.
10450
104512010-09-01 Joel Brobecker <brobecker@adacore.com>
10452
10453 * utils.c (xsnprintf): Make non-static.
10454 * server.h: Add xsnprintf declaration.
10455 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10456 replace calls to snprintf by calls to xsnprintf throughout.
10457
104582010-09-01 Joel Brobecker <brobecker@adacore.com>
10459
10460 * configure.ac: Add configure check for alloca.
10461 * configure, config.in: Regenerate.
10462 * server.h: Include alloca.h if it exists.
10463 * gdbreplay.c: Include alloca.h if it exists.
10464
1a981360
PA
104652010-08-28 Pedro Alves <pedro@codesourcery.com>
10466
10467 * linux-low.c (__SIGRTMIN): Define if not already defined.
10468 (linux_create_inferior): Check for __ANDROID__ rather than
10469 __SIGRTMIN.
10470 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10471 are already deferred.
10472 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10473 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10474 stopped and already has a pending signal to report.
10475 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10476 a pending signal to report or is moving out of a jump pad.
10477 (linux_init_signals): Check for __ANDROID__ rather than
10478 __SIGRTMIN.
10479
b4d51a55
PA
104802010-08-28 Pedro Alves <pedro@codesourcery.com>
10481
10482 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10483 debug_threads check. Avoid a linear search when not doing debug
10484 output.
10485
ec48365d
PA
104862010-08-27 Pedro Alves <pedro@codesourcery.com>
10487
10488 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10489 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10490 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10491 (process_event): Change local fd's type to gdb_fildes_t.
10492 (create_file_handler): Adjust prototype.
10493 (delete_file_handler): Adjust prototype.
10494 (handle_file_event): Adjust prototype. Use pfildes.
10495 (create_file_event): Adjsut prototype.
10496 * remote-utils.c (remote_desc, listen_desc): Change type to
10497 gdb_fildes_t.
10498 * server.h: New gdb_fildes_t typedef.
10499 [USE_WIN32API]: Include winsock2.h.
10500 (delete_file_handler, add_file_handler): Adjust prototypes.
10501 (pfildes): Declare.
10502 * utils.c (pfildes): New.
10503
854d88f0
PA
105042010-08-27 Pedro Alves <pedro@codesourcery.com>
10505
10506 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10507 * configure: Regenerate.
10508
0146f85b
PA
105092010-08-27 Pedro Alves <pedro@codesourcery.com>
10510
10511 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10512 (linux_done_accessing_memory): ... this.
10513 (linux_target_ops): Adjust.
10514 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10515 * nto-low.c (nto_target_ops): Adjust comment.
10516 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10517 * spu-low.c (spu_target_ops): Adjust comment.
10518 * target.h (target_ops): Rename unprepare_to_access_memory field
10519 to done_accessing_memory.
10520 (unprepare_to_access_memory): Rename to ...
10521 (done_accessing_memory): ... this.
10522
90d74c30
PA
105232010-08-26 Pedro Alves <pedro@codesourcery.com>
10524
10525 * linux-low.c (linux_prepare_to_access_memory): New.
10526 (linux_unprepare_to_access_memory): New.
10527 (linux_target_ops): Install them.
10528 * server.c (read_memory): Rename to ...
10529 (gdb_read_memory): ... this. Use
10530 prepare_to_access_memory/prepare_to_access_memory.
10531 (write_memory): Rename to ...
10532 (gdb_write_memory): ... this. Use
10533 prepare_to_access_memory/prepare_to_access_memory.
10534 (handle_search_memory_1): Adjust.
10535 (process_serial_event): Adjust.
10536 * target.h (struct target_ops): New fields
10537 prepare_to_access_memory and unprepare_to_access_memory.
10538 (prepare_to_access_memory, unprepare_to_access_memory): New.
10539 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10540 prepare_to_access_memory/prepare_to_access_memory.
10541 * nto-low.c (nto_target_ops): Adjust.
10542 * spu-low.c (spu_target_ops): Adjust.
10543 * win32-low.c (win32_target_ops): Adjust.
10544
fd467969
PA
105452010-08-26 Pedro Alves <pedro@codesourcery.com>
10546
10547 * Makefile.in (WARN_CFLAGS): Get it from configure.
10548 (WERROR_CFLAGS): New.
10549 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10550 * configure.ac: Introduce --enable-werror, which adds -Werror to
10551 the compiler command line. Enabled by default. Disable with
10552 --disable-werror. Add -Wdeclaration-after-statement
10553 Wpointer-arith and -Wformat-nonliteral to warning flags.
10554 * configure: Regenerate.
10555
331e2f5f
PA
105562010-08-26 Pedro Alves <pedro@codesourcery.com>
10557
10558 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10559
e581f2b4
PA
105602010-08-26 Pedro Alves <pedro@codesourcery.com>
10561
10562 * gdbreplay.c (remote_error): New.
10563 (gdbchar): New.
10564 (expect): Use gdbchar. Check for error reading from GDB.
10565 Clarify sync error output.
10566 (play): Check for errors writing to GDB.
10567 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10568 * remote-utils.c (getpkt): Check for errors writing to the remote
10569 descriptor.
10570
3c11dd79
PA
105712010-08-25 Pedro Alves <pedro@codesourcery.com>
10572
10573 * linux-low.c (linux_wait_1): Move non-debugging code out of
10574 `debug_threads' control.
10575
d20a8ad9
PA
105762010-08-25 Pedro Alves <pedro@codesourcery.com>
10577
10578 * linux-low.c (linux_wait_1): Don't set last_status here.
10579 * server.c (push_event, queue_stop_reply_callback): Assert we're
10580 not pushing a TARGET_WAITKIND_IGNORE event.
10581 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10582 (myresume, handle_target_event): Set the thread's last_resume_kind
10583 and last_status from the target returned status.
10584
964e4306
PA
105852010-08-25 Pedro Alves <pedro@codesourcery.com>
10586
10587 PR threads/10729
10588
10589 * linux-x86-low.c (update_debug_registers_callback): New.
10590 (i386_dr_low_set_addr): Use it.
10591 (i386_dr_low_get_addr): New.
10592 (i386_dr_low_set_control): Use update_debug_registers_callback.
10593 (i386_dr_low_get_control): New.
10594 (i386_dr_low_get_status): Adjust.
10595 * linux-low.c (linux_stop_lwp): New.
10596 * linux-low.h (linux_stop_lwp): Declare.
10597
10598 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10599 argument instead of a i386_debug_reg_state.
10600 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10601 a i386_debug_reg_state.
10602 (i386_insert_aligned_watchpoint): Adjust.
10603 (i386_remove_aligned_watchpoint): Adjust.
10604 (i386_low_stopped_data_address): Read the debug registers from the
10605 inferior instead of from the mirrors.
10606 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10607 (i386_dr_low_get_addr): Declare.
10608 (i386_dr_low_get_control): Declare.
10609 (i386_dr_low_get_status): Change prototype.
10610
10611 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10612 (i386_dr_low_get_addr): New.
10613 (i386_dr_low_get_control): New.
10614 (i386_dr_low_get_status): Adjust prototype. Return
10615 dr_status_mirror.
10616 (i386_initial_stuff): Clear dr_status_mirror and
10617 dr_control_mirror.
10618 (i386_get_thread_context): Adjust.
10619 (i386_set_thread_context): Adjust.
10620 (i386_thread_added): Adjust.
10621
5f21a75b
PA
106222010-08-24 Pedro Alves <pedro@codesourcery.com>
10623
10624 * linux-low.h (linux_thread_area): Delete declaration.
10625
3e4c1235
TS
106262010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10627
10628 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10629 after its termination.
10630
1971b033
PA
106312010-08-09 Pedro Alves <pedro@codesourcery.com>
10632
10633 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10634 (gdb_wants_all_stopped): Delete.
10635 (linux_wait_1): Don't call them.
10636 * server.c (handle_v_cont): Tag all threads as want-stopped.
10637 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10638 stopped as "client-wants-stopped".
10639
310444ac
PA
106402010-07-31 Pedro Alves <pedro@codesourcery.com>
10641
10642 * Makefile.in (signals_h): New.
10643 (server_h): Depend on it.
10644 (server.o): Don't depend on $(signals_def).
10645 (signals.o): Depend on $(signals_def).
10646
a19cae16
JK
106472010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10648
10649 * Makefile.in (signals_def): New.
10650 (server_h): Append include/gdb/signals.h and signals_def.
10651 (server.o): Append signals_def.
10652
30d50328
JK
106532010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10654
10655 * server.c (handle_target_event): Use target_signal_to_host for
10656 resume_info.sig initialization.
10657 * target.h (struct thread_resume) <sig>: New comment.
10658
5c3216e2
OS
106592010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10660
c6f46ca0
OS
10661 * server.c (handle_query): strcpy() the returned string from paddress()
10662 instead of sprintf().
5c3216e2
OS
10663 * utils.c (paddress): Return phex_nz().
10664
6bd31874
JB
106652010-07-07 Joel Brobecker <brobecker@adacore.com>
10666
10667 * server.c (handle_v_cont): Call mourn_inferior if process
10668 just exited.
10669 (myresume): Likewise.
10670
0fb4aa4b
PA
106712010-07-01 Pedro Alves <pedro@codesourcery.com>
10672
10673 Static tracepoints, and integration with UST.
10674
10675 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10676 * mem-break.c (uninsert_all_breakpoints)
10677 (reinsert_all_breakpoints): New.
10678 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10679 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10680 (gdb_agent_ust_loaded, helper_thread_id)
10681 (gdb_agent_helper_thread_id): New macros.
10682 (struct ipa_sym_addresses): Add addr_ust_loaded,
10683 addr_helper_thread_id, addr_cmd_buf.
10684 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10685 (in_process_agent_loaded_ust): New.
10686 (write_e_ust_not_loaded): New.
10687 (maybe_write_ipa_ust_not_loaded): New.
10688 (struct collect_static_trace_data_action): New.
10689 (enum tracepoint_type) <static_tracepoint>: New.
10690 (struct tracepoint) <handle>: Mention static tracepoints.
10691 (struct static_tracepoint_ctx): New.
10692 (CMD_BUF_SIZE): New.
10693 (add_tracepoint_action): Handle static tracepoint actions.
10694 (unprobe_marker_at): New.
10695 (clear_installed_tracepoints): Handle static tracepoints.
10696 (cmd_qtdp): Handle static tracepoints.
10697 (probe_marker_at): New.
10698 (cmd_qtstart): Handle static tracepoints.
10699 (response_tracepoint): Handle static tracepoints.
10700 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10701 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10702 (get_context_regcache): Handle static tracepoints.
10703 (do_action_at_tracepoint): Handle static tracepoint actions.
10704 (traceframe_find_block_type): Handle static trace data blocks.
10705 (traceframe_read_sdata): New.
10706 (download_tracepoints): Download static tracepoint actions.
10707 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10708 (GDB_PROBE_NAME): New.
10709 (ust_ops): New.
10710 (GET_UST_SYM): New.
10711 (USTF): New.
10712 (dlsym_ust): New.
10713 (ust_marker_to_static_tracepoint): New.
10714 (gdb_probe): New.
10715 (collect_ust_data_at_tracepoint): New.
10716 (gdb_ust_probe): New.
10717 (UNIX_PATH_MAX, SOCK_DIR): New.
10718 (gdb_ust_connect_sync_socket): New.
10719 (resume_thread, stop_thread): New.
10720 (run_inferior_command): New.
10721 (init_named_socket): New.
10722 (gdb_ust_socket_init): New.
10723 (cstr_to_hexstr): New.
10724 (next_st): New.
10725 (first_marker, next_marker): New.
10726 (response_ust_marker): New.
10727 (cmd_qtfstm, cmd_qtsstm): New.
10728 (unprobe_marker_at, probe_marker_at): New.
10729 (cmd_qtstmat, gdb_ust_thread): New.
10730 (gdb_ust_init): New.
10731 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10732 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10733 (ST_REGENTRY): New.
10734 (x86_64_st_collect_regmap): New.
10735 (X86_64_NUM_ST_COLLECT_GREGS): New.
10736 (AMD64_RIP_REGNUM): New.
10737 (supply_static_tracepoint_registers): New.
10738 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10739 (ST_REGENTRY): New.
10740 (i386_st_collect_regmap): New.
10741 (i386_NUM_ST_COLLECT_GREGS): New.
10742 (supply_static_tracepoint_registers): New.
10743 * server.c (handle_query): Handle qXfer:statictrace:read.
10744 <qSupported>: Report support for StaticTracepoints, and
10745 qXfer:statictrace:read features.
10746 * server.h (traceframe_read_sdata)
10747 (supply_static_tracepoint_registers): Declare.
10748 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10749 (unpack_varlen_hex): Include in IPA build.
10750 * Makefile.in (ustlibs, ustinc): New.
10751 (IPA_OBJS): Add remote-utils-ipa.o.
10752 ($(IPA_LIB)): Link -ldl and -lpthread.
10753 (UST_CFLAGS): New.
10754 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10755 * config.in, configure: Regenerate.
10756
9e4344e5
PA
107572010-06-20 Ian Lance Taylor <iant@google.com>
10758 Pedro Alves <pedro@codesourcery.com>
10759
10760 * linux-x86-low.c (always_true): Delete.
10761 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10762 trying to fool the compiler with always_true.
10763
c6beb2cb
PA
107642010-06-20 Pedro Alves <pedro@codesourcery.com>
10765
10766 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10767 conditions in gdbserver.
10768
d2ed6730
UW
107692010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10770
10771 * spu-low.c (spu_read_memory): Wrap around local store limit.
10772 (spu_write_memory): Likewise.
10773
4e29fb54
PA
107742010-06-15 Pedro Alves <pedro@codesourcery.com>
10775
10776 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10777 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10778 LONGEST uses.
10779 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10780 uses.
10781 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10782 uses with LONGEST uses.
10783
6a271cae
PA
107842010-06-14 Stan Shebs <stan@codesourcery.com>
10785 Pedro Alves <pedro@codesourcery.com>
10786
10787 Bytecode compiler.
10788
10789 * linux-x86-low.c: Include limits.h.
10790 (add_insns): New.
10791 (always_true): New.
10792 (EMIT_ASM): New.
10793 (EMIT_ASM32): New.
10794 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10795 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10796 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10797 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10798 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10799 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10800 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10801 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10802 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10803 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10804 (amd64_emit_void_call_2): New.
10805 (amd64_emit_ops): New.
10806 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10807 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10808 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10809 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10810 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10811 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10812 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10813 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10814 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10815 (i386_emit_stack_adjust, i386_emit_int_call_1)
10816 (i386_emit_void_call_2): New.
10817 (i386_emit_ops): New.
10818 (x86_emit_ops): New.
10819 (the_low_target): Install x86_emit_ops.
10820 * server.h (struct emit_ops): New.
10821 (get_raw_reg_func_addr): Declare.
10822 (current_insn_ptr, emit_error): Declare.
10823 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10824 (set_trace_state_variable_value): New defines.
10825 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10826 addr_get_trace_state_variable_value and
10827 addr_set_trace_state_variable_value.
10828 (symbol_list): New fields for get_raw_reg,
10829 get_trace_state_variable_value and set_trace_state_variable_value.
10830 (condfn): New typedef.
10831 (struct tracepoint): New field `compiled_cond'.
10832 (do_action_at_tracepoint): Clear compiled_cond.
10833 (get_trace_state_variable_value, set_trace_state_variable_value):
10834 Export in the IPA.
10835 (condition_true_at_tracepoint): If there's a compiled condition,
10836 run that.
10837 (current_insn_ptr, emit_error): New globals.
10838 (struct bytecode_address): New.
10839 (get_raw_reg_func_addr): New.
10840 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10841 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10842 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10843 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10844 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10845 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10846 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10847 (compile_tracepoint_condition, compile_bytecodes): New.
10848 * target.h (emit_ops): Forward declare.
10849 (struct target_ops): New field emit_ops.
10850 (target_emit_ops): New.
10851 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10852 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10853 * linux-low.c (linux_emit_ops): New.
10854 (linux_target_ops): Install it.
10855 * linux-low.h (struct linux_target_ops): New field emit_ops.
10856
92b72907
UW
108572010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10858
10859 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10860 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10861
fa593d66
PA
108622010-06-01 Pedro Alves <pedro@codesourcery.com>
10863 Stan Shebs <stan@codesourcery.com>
10864
10865 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10866 (all): Depend on $(extra_libraries).
10867 (install-only): Install the IPA.
10868 (IPA_OBJS, IPA_LIB): New.
10869 (clean): Remove the IPA lib.
10870 (IPAGENT_CFLAGS): New.
10871 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10872 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10873 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10874 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10875 * configure.ac: Check for atomic builtins support in the compiler.
10876 (IPA_DEPFILES, extra_libraries): Define.
10877 * configure.srv (ipa_obj): Add description.
10878 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10879 (i[34567]86-*-linux*): Set ipa_obj.
10880 (x86_64-*-linux*): Set ipa_obj.
10881 * linux-low.c (stabilizing_threads): New.
10882 (supports_fast_tracepoints): New.
10883 (linux_detach): Stabilize threads before detaching.
10884 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10885 the lwp is either not stabilizing, or is moving out of a jump pad.
10886 (linux_fast_tracepoint_collecting): New.
10887 (maybe_move_out_of_jump_pad): New.
10888 (enqueue_one_deferred_signal): New.
10889 (dequeue_one_deferred_signal): New.
10890 (linux_wait_for_event_1): If moving out of a jump pad, defer
10891 pending signals to later.
10892 (linux_stabilize_threads): New.
10893 (linux_wait_1): Check if threads need moving out of jump pads, and
10894 do it if so.
10895 (stuck_in_jump_pad_callback): New.
10896 (move_out_of_jump_pad_callback): New.
10897 (lwp_running): New.
10898 (linux_resume_one_lwp): Handle moving out of jump pads.
10899 (linux_set_resume_request): Dequeue deferred signals.
10900 (need_step_over_p): Also step over fast tracepoint jumps.
10901 (start_step_over): Also uninsert fast tracepoint jumps.
10902 (finish_step_over): Also reinsert fast tracepoint jumps.
10903 (linux_install_fast_tracepoint_jump): New.
10904 (linux_target_ops): Install linux_stabilize_threads and
10905 linux_install_fast_tracepoint_jump_pad.
10906 * linux-low.h (linux_target_ops) <get_thread_area,
10907 install_fast_tracepoint_jump_pad>: New fields.
10908 (struct lwp_info) <collecting_fast_tracepoint,
10909 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10910 (linux_get_thread_area): Declare.
10911 * linux-x86-low.c (jump_insn): New.
10912 (x86_get_thread_area): New.
10913 (append_insns): New.
10914 (push_opcode): New.
10915 (amd64_install_fast_tracepoint_jump_pad): New.
10916 (i386_install_fast_tracepoint_jump_pad): New.
10917 (x86_install_fast_tracepoint_jump_pad): New.
10918 (the_low_target): Install x86_get_thread_area and
10919 x86_install_fast_tracepoint_jump_pad.
10920 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10921 (struct fast_tracepoint_jump): New.
10922 (fast_tracepoint_jump_insn): New.
10923 (fast_tracepoint_jump_shadow): New.
10924 (find_fast_tracepoint_jump_at): New.
10925 (fast_tracepoint_jump_here): New.
10926 (delete_fast_tracepoint_jump): New.
10927 (set_fast_tracepoint_jump): New.
10928 (uninsert_fast_tracepoint_jumps_at): New.
10929 (reinsert_fast_tracepoint_jumps_at): New.
10930 (set_breakpoint_at): Use write_inferior_memory.
10931 (uninsert_raw_breakpoint): Use write_inferior_memory.
10932 (check_mem_read): Mask out fast tracepoint jumps.
10933 (check_mem_write): Mask out fast tracepoint jumps.
10934 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10935 (set_fast_tracepoint_jump): Declare.
10936 (delete_fast_tracepoint_jump)
10937 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10938 (reinsert_fast_tracepoint_jumps_at): Declare.
10939 * regcache.c: Don't compile many functions when building the
10940 in-process agent library.
10941 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10942 the register buffer in the heap.
10943 (free_register_cache): If the register buffer isn't owned by the
10944 regcache, don't free it.
10945 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10946 pre-existing register caches.
10947 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10948 type.
10949 (convert_ascii_to_int): : Constify `from' parameter type.
10950 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10951 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10952 the needed buffer in-place.
10953 (relocate_instruction): New.
10954 * server.c (handle_query) <qSymbols>: If the target supports
10955 tracepoints, give it a chance of looking up symbols. Report
10956 support for fast tracepoints.
10957 (handle_status): Stabilize threads.
10958 (process_serial_event): Adjust.
10959 * server.h (struct fast_tracepoint_jump): Forward declare.
10960 (struct process_info) <fast_tracepoint_jumps>: New field.
10961 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10962 (decode_X_packet, decode_M_packet): Adjust.
10963 (relocate_instruction): Declare.
10964 (in_process_agent_loaded): Declare.
10965 (tracepoint_look_up_symbols): Declare.
10966 (struct fast_tpoint_collect_status): Declare.
10967 (fast_tracepoint_collecting): Declare.
10968 (force_unlock_trace_buffer): Declare.
10969 (handle_tracepoint_bkpts): Declare.
10970 (initialize_low_tracepoint)
10971 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10972 * target.h (struct target_ops) <stabilize_threads,
10973 install_fast_tracepoint_jump_pad>: New fields.
10974 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10975 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10976 [HAVE_STDINT_H]: Include stdint.h.
10977 (trace_debug_1): Rename to ...
10978 (trace_vdebug): ... this.
10979 (trace_debug): Rename to ...
10980 (trace_debug_1): ... this. Add `level' parameter.
10981 (trace_debug): New.
10982 (ATTR_USED, ATTR_NOINLINE): New.
10983 (IP_AGENT_EXPORT): New.
10984 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10985 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10986 (about_to_request_buffer_space, trace_buffer_is_full)
10987 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10988 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10989 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10990 (traceframe_write_count, traceframes_created)
10991 (trace_state_variables)
10992 New renaming defines.
10993 (struct ipa_sym_addresses): New.
10994 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10995 (symbol_list): New.
10996 (ipa_sym_addrs): New.
10997 (all_tracepoint_symbols_looked_up): New.
10998 (in_process_agent_loaded): New.
10999 (write_e_ipa_not_loaded): New.
11000 (maybe_write_ipa_not_loaded): New.
11001 (tracepoint_look_up_symbols): New.
11002 (debug_threads) [IN_PROCESS_AGENT]: New.
11003 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11004 (UNKNOWN_SIDE_EFFECTS): New.
11005 (stop_tracing): New.
11006 (flush_trace_buffer): New.
11007 (stop_tracing_bkpt): New.
11008 (flush_trace_buffer_bkpt): New.
11009 (read_inferior_integer): New.
11010 (read_inferior_uinteger): New.
11011 (read_inferior_data_pointer): New.
11012 (write_inferior_data_pointer): New.
11013 (write_inferior_integer): New.
11014 (write_inferior_uinteger): New.
11015 (struct collect_static_trace_data_action): Delete.
11016 (enum tracepoint_type): New.
11017 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
11018 <actions_str, step_actions, step_actions_str>: Only include in
11019 GDBserver.
fa593d66
PA
11020 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11021 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11022 (tracepoints): Use IP_AGENT_EXPORT.
11023 (last_tracepoint): Don't include in the IPA.
11024 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11025 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11026 (alloced_trace_state_variables): New.
11027 (trace_state_variables): Use IP_AGENT_EXPORT.
11028 (traceframe_t): Delete unused variable.
11029 (circular_trace_buffer): Don't include in the IPA.
11030 (trace_buffer_start): Delete.
11031 (struct trace_buffer_control): New.
11032 (trace_buffer_free): Delete.
11033 (struct ipa_trace_buffer_control): New.
11034 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11035 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11036 New.
11037 (trace_buffer_ctrl): New.
11038 (TRACE_BUFFER_CTRL_CURR): New.
11039 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11040 Reimplement as macros.
11041 (trace_buffer_wrap): Delete.
11042 (traceframe_write_count, traceframe_read_count)
11043 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11044 (struct tracepoint_hit_ctx) <type>: New field.
11045 (struct fast_tracepoint_ctx): New.
11046 (memory_barrier): New.
11047 (cmpxchg): New.
11048 (record_tracepoint_error): Update atomically in the IPA.
11049 (clear_inferior_trace_buffer): New.
11050 (about_to_request_buffer_space): New.
11051 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11052 updating the same buffer.
11053 (add_tracepoint): Default the tracepoint's type to trap
11054 tracepoint, and orig_size to -1.
11055 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11056 internal variables.
11057 (create_trace_state_variable): New parameter `gdb'. Handle it.
11058 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11059 (cmd_qtdp): Handle fast tracepoints.
11060 (cmd_qtdv): Adjust.
11061 (max_jump_pad_size): New.
11062 (gdb_jump_pad_head): New.
11063 (get_jump_space_head): New.
11064 (claim_jump_space): New.
11065 (sort_tracepoints): New.
11066 (MAX_JUMP_SIZE): New.
11067 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11068 IPA.
11069 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11070 support. Upload fast traceframes, and delete internal IPA
11071 breakpoints.
11072 (stop_tracing_handler): New.
11073 (flush_trace_buffer_handler): New.
11074 (cmd_qtstop): Upload fast tracepoints.
11075 (response_tracepoint): Handle fast tracepoints.
11076 (tracepoint_finished_step): Upload fast traceframes. Set the
11077 tracepoint hit context's tracepoint type.
11078 (handle_tracepoint_bkpts): New.
11079 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11080 type. Add comment about fast tracepoints.
11081 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11082 non-existing action_str field.
11083 (get_context_regcache): Handle fast tracepoints.
11084 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11085 to the regcache.
11086 (fast_tracepoint_from_jump_pad_address): New.
11087 (fast_tracepoint_from_ipa_tpoint_address): New.
11088 (collecting_t): New.
11089 (force_unlock_trace_buffer): New.
11090 (fast_tracepoint_collecting): New.
11091 (collecting): New.
11092 (gdb_collect): New.
11093 (write_inferior_data_ptr): New.
11094 (target_tp_heap): New.
11095 (target_malloc): New.
11096 (download_agent_expr): New.
11097 (UALIGN): New.
11098 (download_tracepoints): New.
11099 (download_trace_state_variables): New.
11100 (upload_fast_traceframes): New.
11101 (IPA_FIRST_TRACEFRAME): New.
11102 (IPA_NEXT_TRACEFRAME_1): New.
11103 (IPA_NEXT_TRACEFRAME): New.
11104 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11105 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11106 (gdb_jump_pad_buffer_end): New.
11107 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11108 (initialize_tracepoint): Adjust.
11109 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11110 buffer. Initialize the low module.
11111 * utils.c (PREFIX, TOOLNAME): New.
11112 (malloc_failure): Use PREFIX.
11113 (error): In the IPA, an error causes an exit.
11114 (fatal, warning): Use PREFIX.
11115 (internal_error): Use TOOLNAME.
11116 (NUMCELLS): Increase to 10.
11117 * configure, config.in: Regenerate.
11118
d149dd1d
PA
111192010-06-01 Pedro Alves <pedro@codesourcery.com>
11120
11121 * server.c (handle_query) <qSupported>: Do two passes over the
11122 qSupported string to avoid nesting strtok.
11123
f6528abd
JK
111242010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11125
11126 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11127 (CDEPS): New.
11128 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11129 -Wl,--dynamic-list.
11130 * configure: Regenerate.
11131 * proc-service.list: New.
11132
ca2a87a0
JK
111332010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11134
11135 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11136 New comment.
11137
363a6e9f
OS
111382010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11139
11140 * gdbreplay.c (remote_open): Check error return from socket() call by
11141 its equality to -1 not by it being negative.
11142 * remote-utils.c (remote_open): Likewise.
11143
d23b6cb1
PA
111442010-05-23 Pedro Alves <pedro@codesourcery.com>
11145
11146 * config.h: Regenerate.
11147
28d3cf85
MK
111482010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11149
11150 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11151 doesn't provide PTRACE_GET_THREAD_AREA.
11152
fea36a59
MK
111532010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11154
11155 * linux-m68k-low.c: Include <asm/ptrace.h>
11156 (ps_get_thread_area): Implement.
11157
24b066ba
DE
111582010-05-03 Doug Evans <dje@google.com>
11159
11160 * event-loop.c (struct callback_event): New struct.
11161 (callback_list): New global.
11162 (append_callback_event, delete_callback_event): New functions.
11163 (process_callback): New function.
11164 (start_event_loop): Call it.
11165 * remote-utils.c (NOT_SCHEDULED): Define.
11166 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11167 moved out of readchar.
11168 (readchar): Rewrite. Call reschedule before returning.
11169 (reset_readchar): New function.
11170 (remote_close): Call it.
11171 (process_remaining, reschedule): New functions.
11172 * server.h (callback_handler_func): New typedef.
11173 (append_callback_event, delete_callback_event): Declare.
11174
9836d6ea
PA
111752010-05-03 Pedro Alves <pedro@codesourcery.com>
11176
11177 * proc-service.c (ps_pglobal_lookup): Use
11178 thread_db_look_up_one_symbol.
11179 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11180 parameter. Use it instead of all_symbols_looked_up.
11181 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11182 field.
11183 (all_symbols_looked_up): Don't declare.
11184 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11185 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11186 field.
11187 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11188 Set all_symbols_looked_up here.
11189 (thread_db_look_up_one_symbol): New.
11190 (thread_db_get_tls_address): Adjust.
11191 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11192 thread_db object on the heap, and tentatively set it in the
11193 process structure.
11194 (thread_db_init): Don't set all_symbols_looked_up here.
11195 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11196
7984d532
PA
111972010-05-03 Pedro Alves <pedro@codesourcery.com>
11198
11199 * linux-low.c (linux_kill, linux_detach): Adjust.
11200 (status_pending_p_callback): Remove redundant statement. Check
11201 for !TARGET_WAITIKIND_IGNORE, instead of
11202 TARGET_WAITKIND_STOPPED.
11203 (handle_tracepoints): Make sure LWP is locked. Adjust.
11204 (linux_wait_for_event_1): Adjust.
11205 (linux_cancel_breakpoints): New.
11206 (unsuspend_one_lwp): New.
11207 (unsuspend_all_lwps): New.
11208 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11209 (send_sigstop_callback): Change return type to int, add new
11210 `except' parameter and handle it.
11211 (suspend_and_send_sigstop_callback): New.
11212 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11213 pass them down. If SUSPEND, also increment the lwp's suspend
11214 count.
11215 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11216 (need_step_over_p): Don't consider suspended LWPs.
11217 (start_step_over): Adjust.
11218 (proceed_one_lwp): Change return type to int, add new `except'
11219 parameter and handle it.
11220 (unsuspend_and_proceed_one_lwp): New.
11221 (proceed_all_lwps): Use find_inferior instead of
11222 for_each_inferior.
11223 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11224 also decrement the suspend count of LWPs. Pass `except' down,
11225 instead of hacking its suspend count.
11226 (linux_pause_all): Add `freeze' parameter. Adjust.
11227 (linux_unpause_all): New.
11228 (linux_target_ops): Install linux_unpause_all.
11229 * server.c (handle_status): Adjust.
11230 * target.h (struct target_ops): New fields `unpause_all' and
11231 `cancel_breakpoints'. Add new parameter to `pause_all'.
11232 (pause_all): Add new `freeze' parameter.
11233 (unpause_all): New.
11234 (cancel_breakpoints): New.
11235 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11236 cancel breakpoints.
11237 (cmd_qtstart): Pause threads.
11238 (stop_tracing): Pause threads, and cancel breakpoints.
11239 * win32-low.c (win32_target_ops): Adjust.
11240
e471f25b
PA
112412010-05-03 Pedro Alves <pedro@codesourcery.com>
11242
11243 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11244 the inferior right away from here...
11245 (linux_wait_1): ... to here, and adjust to check the thread's
11246 last_resume_kind instead of the lwp's step or stop_expected flags.
11247
1915ef4f
PA
112482010-05-02 Pedro Alves <pedro@codesourcery.com>
11249
11250 * README: Use consistent `GDB' and `GDBserver' spellings.
11251
f9e39928
PA
112522010-05-02 Pedro Alves <pedro@codesourcery.com>
11253
11254 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11255 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11256 (linux_detach_one_lwp): Assume the lwp is stopped.
11257 (any_thread_of): Delete.
11258 (linux_detach): Stop all lwps here. Don't blindly delete all
11259 breakpoints.
11260 (delete_lwp_callback): New.
11261 (linux_mourn): Delete all lwps of the process that is gone.
11262 (linux_wait_1): Don't delete the last lwp of the process here.
11263 * mem-break.h (mark_breakpoints_out): Declare.
11264 * mem-break.c (mark_breakpoints_out): New.
11265 (free_all_breakpoints): Use it.
11266 * server.c (handle_target_event): If the process is gone, mark
11267 breakpoints out.
11268 * thread-db.c (struct thread_db) <create_bp>: New field.
11269 (thread_db_enable_reporting): Fix prototype. Store a thread event
11270 breakpoint reference in the thread_db struct.
11271 (thread_db_load_search): Clear the thread_db object.
11272 (try_thread_db_load_1): Ditto.
11273 (switch_to_process): New.
11274 (disable_thread_event_reporting): Use it.
11275 (remove_thread_event_breakpoints): New.
11276 (thread_db_detach, thread_db_mourn): Use it.
11277
1e7fc18c
PA
112782010-05-01 Pedro Alves <pedro@codesourcery.com>
11279
11280 * linux-low.c (linux_enable_event_reporting): New.
11281 (linux_wait_for_event_1, handle_extended_wait): Use it.
11282
02fc4de7
PA
112832010-04-30 Pedro Alves <pedro@codesourcery.com>
11284
11285 * linux-low.c (linux_kill_one_lwp, linux_kill)
11286 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11287 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11288 SIGSTOP even if the LWP is stopped.
11289 (send_sigstop_callback): New.
11290 (stop_all_lwps): Use send_sigstop_callback instead.
11291 (linux_resume_one_thread): Adjust.
11292 (proceed_one_lwp): Still proceed an LWP that the client has
11293 requested to stop, if we haven't reported it as stopped yet. Make
11294 sure that LWPs the client want stopped, have a pending SIGSTOP.
11295
bc3b5632
DE
112962010-04-26 Doug Evans <dje@google.com>
11297
ae1ada35
DE
11298 * server.c (handle_general_set): Make static.
11299
bc3b5632
DE
11300 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11301 Print received char after testing for error/eof instead of before.
11302 (input_interrupt): Tweak comment.
11303
65730243
DE
113042010-04-23 Doug Evans <dje@google.com>
11305
11306 * server.c (start_inferior): Print inferior argv if --debug.
11307
a8ae7dc0
AR
113082010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11309
11310 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11311 * nto-x86-low.c: Include server.h
11312
1c07cc19
PM
113132010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11314
11315 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11316 be consistent with other sources of this directory.
11317 (init_registers_amd64): Correct name of source file of this function
11318 in the comment.
11319
e0a61e09
PM
113202010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11321
11322 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11323 64-bit executables.
11324
54709339
PM
113252010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11326
11327 * win32-i386-low.c: Add 64-bit support.
11328 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11329 (init_registers_amd64): Declare.
11330 (mappings): Add 64-bit version of array.
11331 (init_windows_x86): New function.
11332 (the_low_target): Change init_arch field to init_windows_x86.
11333
e8f0053d
PM
113342010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11335
11336 * win32-low.c: Adapt to support also 64-bit architecture.
11337 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11338 (get_image_name): Use SIZE_T type for local variable `done'.
11339 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11340 (toolhelp_get_dll_name): Idem.
11341 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11342 Use uintptr_t typecast to avoid warning.
11343 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11344 (handle_exception): Use phex_nz to avoid warning.
11345 (win32_wait): Remove unused local variable `process'.
11346
c481e77e
PM
113472010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11348
11349 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11350 `amd64-avx.o'.
11351
12ea4b69
PM
113522010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11353
11354 * configure.ac: Use `ws2_32' library for srv_mingw.
11355 * configure: Regenerate.
11356 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11357 * remote-utils.c: Likewise.
11358
f6d1620c
L
113592010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11360
11361 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11362 if __x86_64__ is defined.
11363
8e642873
PM
113642010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11365
11366 * configure: Regenerate.
11367
711e434b
PM
113682010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11369
11370 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11371 * target.h (target_ops): New get_tib_address field.
11372 * win32-low.h (win32_thread_info): Add thread_local_base field.
11373 * win32-low.c (child_add_thread): Add tlb argument.
11374 Set thread_local_base field to TLB.
11375 (get_child_debug_event): Adapt to child_add_thread change.
11376 (win32_get_tib_address): New function.
11377 (win32_target_ops): Set get_tib_address field to
11378 win32_get_tib_address.
11379 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11380
505106cd
PA
113812010-04-12 Pedro Alves <pedro@codesourcery.com>
11382
505106cd
PA
11383 * linux-low.c (linux_mourn): Also remove the process.
11384 * server.c (handle_target_event): Don't remove the process here.
11385 * nto-low.c (nto_mourn): New.
11386 (nto_target_ops): Install it.
11387 * spu-low.c (spu_mourn): New.
11388 (spu_target_ops): Install it.
11389 * win32-low.c (win32_mourn): New.
11390 (win32_target_ops): Install it.
11391
e8470a06
PA
113922010-04-12 Pedro Alves <pedro@codesourcery.com>
11393
11394 * server.h (buffer_xml_printf): Remove redundant `;'.
11395
45ba0d02
PA
113962010-04-12 Pedro Alves <pedro@codesourcery.com>
11397
11398 * regcache.c (set_register_cache): Invalidate regcaches before
11399 changing the register cache layout.
11400 (regcache_invalidate_one): Allow a NULL regcache.
11401 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11402 regcaches before changing the register cache layout or the target
11403 regsets.
11404
59e04013
L
114052010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11406
11407 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11408 variable warning on Linux/x86-64.
11409
8336d594
PA
114102010-04-11 Pedro Alves <pedro@codesourcery.com>
11411
11412 GDBserver disconnected tracing support.
11413
11414 * linux-low.c (linux_remove_process): Delete.
11415 (add_lwp): Don't set last_resume_kind here.
11416 (linux_kill): Use `mourn'.
11417 (linux_detach): Use `thread_db_detach', and `mourn'.
11418 (linux_mourn): New.
11419 (linux_attach_lwp_1): Adjust comment.
11420 (linux_attach): last_resume_kind moved the thread_info; adjust.
11421 (status_pending_p_callback): Adjust.
11422 (linux_wait_for_event_1): Adjust.
11423 (count_events_callback, select_singlestep_lwp_callback)
11424 (select_event_lwp_callback, cancel_breakpoints_callback)
11425 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11426 (proceed_one_lwp): Adjust.
11427 (linux_async): Add debug output.
11428 (linux_thread_stopped): New.
11429 (linux_pause_all): New.
11430 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11431 linux_pause_all.
11432 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11433 (thread_db_free): Delete declaration.
11434 (thread_db_detach, thread_db_mourn): Declare.
11435 * thread-db.c (thread_db_init): Use thread_db_mourn.
11436 (thread_db_free): Delete, split in two.
11437 (disable_thread_event_reporting): New.
11438 (thread_db_detach): New.
11439 (thread_db_mourn): New.
11440
11441 * server.h (struct thread_info) <last_resume_kind>: New field.
11442 <attached>: Add comment.
11443 <gdb_detached>: New field.
11444 (handler_func): Change return type to int.
11445 (handle_serial_event, handle_target_event): Ditto.
11446 (gdb_connected): Declare.
11447 (tracing): Delete.
11448 (disconnected_tracing): Declare.
11449 (stop_tracing): Declare.
11450
11451 * server.c (handle_query) <qSupported>: Report support for
11452 disconnected tracing.
11453 (queue_stop_reply_callback): Account for running threads.
11454 (gdb_wants_thread_stopped): New.
11455 (gdb_wants_all_threads_stopped): New.
11456 (gdb_reattached_process): New.
11457 (handle_status): Clear the `gdb_detached' flag of all processes.
11458 In all-stop, stop all threads.
11459 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11460 (process_serial_event): If the remote connection breaks, or if an
11461 exit was forced with "monitor exit", force an event loop exit.
11462 Handle disconnected tracing on detach.
11463 (handle_serial_event): Adjust.
11464 (handle_target_event): If GDB isn't connected, forward events back
11465 to the inferior, unless the last process exited, in which case,
11466 exit gdbserver. Adjust interface.
11467
11468 * remote-utils.c (remote_open): Don't block in accept. Instead
11469 register an event loop source on the listen socket file
11470 descriptor. Refactor bits into ...
11471 (listen_desc): ... this new global.
11472 (gdb_connected): ... this new function.
11473 (enable_async_notification): ... this new function.
11474 (handle_accept_event): ... this new function.
11475 (remote_close): Clear remote_desc.
11476
11477 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11478
11479 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11480 New fields.
11481 (mourn_inferior): Define.
11482 (target_process_qsupported): Avoid the dangling else problem.
11483 (thread_stopped): Define.
11484 (pause_all): Define.
11485 (target_waitstatus_to_string): Declare.
11486 * target.c (target_waitstatus_to_string): New.
11487
11488 * tracepoint.c (tracing): Make extern.
11489 (disconnected_tracing): New.
11490 (stop_tracing): Make extern. Handle tracing stops due to GDB
11491 disconnecting.
11492 (cmd_qtdisconnected): New.
11493 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11494 (handle_tracepoint_general_set): Handle QTDisconnected.
11495
11496 * event-loop.c (event_handler_func): Change return type to int.
11497 (process_event): Bail out if the event handler wants the event
11498 loop to stop.
11499 (handle_file_event): Ditto.
11500 (start_event_loop): Bail out if the event handler wants the event
11501 loop to stop.
11502
11503 * nto-low.c (nto_target_ops): Adjust.
11504 * spu-low.c (spu_wait): Don't remove the process here.
11505 (spu_target_ops): Adjust.
11506 * win32-low.c (win32_wait): Don't remove the process here.
11507 (win32_target_ops): Adjust.
11508
5d267c4c
PA
115092010-04-11 Pedro Alves <pedro@codesourcery.com>
11510
11511 * regcache.c (realloc_register_cache): Invalidate inferior's
11512 regcache before recreating it.
11513
623ccd72
PA
115142010-04-09 Pedro Alves <pedro@codesourcery.com>
11515
11516 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11517
219f2f23
PA
115182010-04-09 Stan Shebs <stan@codesourcery.com>
11519 Pedro Alves <pedro@codesourcery.com>
11520
11521 * server.h (LONGEST): New.
11522 (struct thread_info) <while_stepping>: New field.
11523 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11524 Declare.
11525 (initialize_tracepoint, handle_tracepoint_general_set)
11526 (handle_tracepoint_query, tracepoint_finished_step)
11527 (tracepoint_was_hit, release_while_stepping_state_list):
11528 (current_traceframe): Declare.
11529 * server.c (handle_general_set): Handle tracepoint packets.
11530 (read_memory): New.
11531 (write_memory): New.
11532 (handle_search_memory_1): Use read_memory.
11533 (handle_query): Report support for conditional tracepoints, trace
11534 state variables, and tracepoint sources. Handle tracepoint
11535 queries.
11536 (main): Initialize the tracepoints module.
11537 (process_serial_event): Handle traceframe reads/writes.
11538
11539 * linux-low.c (handle_tracepoints): New.
11540 (linux_wait_1): Call it.
11541 (linux_resume_one_lwp): Handle while-stepping.
11542 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11543 (linux_target_ops): Install them.
11544 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11545 New field.
11546 * linux-x86-low.c (x86_supports_tracepoints): New.
11547 (the_low_target). Install it.
11548
11549 * mem-break.h (delete_breakpoint): Declare.
11550 * mem-break.c (delete_breakpoint): Make external.
11551
11552 * target.h (struct target_ops): Add `supports_tracepoints',
11553 `read_pc', and `write_pc' fields.
11554 (target_supports_tracepoints): Define.
11555 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11556 (phex_nz): New.
11557
11558 * regcache.h (struct regcache) <registers_owned>: New field.
11559 (init_register_cache, regcache_cpy): Declare.
11560 (regcache_read_pc, regcache_write_pc): Declare.
11561 (register_cache_size): Declare.
11562 (supply_regblock): Declare.
11563 * regcache.c (init_register_cache): New.
11564 (new_register_cache): Use it.
11565 (regcache_cpy): New.
11566 (register_cache_size): New.
11567 (supply_regblock): New.
11568 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 11569
219f2f23
PA
11570 * tracepoint.c: New.
11571
11572 * Makefile.in (OBS): Add tracepoint.o.
11573 (tracepoint.o): New rule.
11574
3a13a53b
L
115752010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11576
11577 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11578 (i386-mmx.o): New.
11579 (i386-mmx.c): Likewise.
11580 (i386-mmx-linux.o): Likewise.
11581 (i386-mmx-linux.c): Likewise.
11582
11583 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11584 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11585 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11586 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11587
11588 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11589 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11590 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11591
1570b33e
L
115922010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11593
11594 * Makefile.in (clean): Updated.
11595 (i386-avx.o): New.
11596 (i386-avx.c): Likewise.
11597 (i386-avx-linux.o): Likewise.
11598 (i386-avx-linux.c): Likewise.
11599 (amd64-avx.o): Likewise.
11600 (amd64-avx.c): Likewise.
11601 (amd64-avx-linux.o): Likewise.
11602 (amd64-avx-linux.c): Likewise.
11603
11604 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11605 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11606 (srv_amd64_regobj): Add amd64-avx.o.
11607 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11608 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11609 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11610 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11611 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11612 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11613 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11614
11615 * i387-fp.c: Include "i386-xstate.h".
11616 (i387_xsave): New.
11617 (i387_cache_to_xsave): Likewise.
11618 (i387_xsave_to_cache): Likewise.
11619 (x86_xcr0): Likewise.
11620
11621 * i387-fp.h (i387_cache_to_xsave): Likewise.
11622 (i387_xsave_to_cache): Likewise.
11623 (x86_xcr0): Likewise.
11624
11625 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11626 * linux-crisv32-low.c (target_regsets): Likewise.
11627 * linux-m68k-low.c (target_regsets): Likewise.
11628 * linux-mips-low.c (target_regsets): Likewise.
11629 * linux-ppc-low.c (target_regsets): Likewise.
11630 * linux-s390-low.c (target_regsets): Likewise.
11631 * linux-sh-low.c (target_regsets): Likewise.
11632 * linux-sparc-low.c (target_regsets): Likewise.
11633 * linux-xtensa-low.c (target_regsets): Likewise.
11634
11635 * linux-low.c: Include <sys/uio.h>.
11636 (regsets_fetch_inferior_registers): Support nt_type.
11637 (regsets_store_inferior_registers): Likewise.
11638 (linux_process_qsupported): New.
11639 (linux_target_ops): Add linux_process_qsupported.
11640
11641 * linux-low.h (regset_info): Add nt_type.
11642 (linux_target_ops): Add process_qsupported.
11643
11644 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11645 and <sys/uio.h>.
11646 (init_registers_i386_avx_linux): New.
11647 (init_registers_amd64_avx_linux): Likewise.
11648 (xmltarget_i386_linux_no_xml): Likewise.
11649 (xmltarget_amd64_linux_no_xml): Likewise.
11650 (PTRACE_GETREGSET): Likewise.
11651 (PTRACE_SETREGSET): Likewise.
11652 (x86_fill_xstateregset): Likewise.
11653 (x86_store_xstateregset): Likewise.
11654 (use_xml): Likewise.
11655 (x86_linux_update_xmltarget): Likewise.
11656 (x86_linux_process_qsupported): Likewise.
11657 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11658 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11659 init_registers_i386_linux here. Call
11660 x86_linux_update_xmltarget.
11661 (the_low_target): Add x86_linux_process_qsupported.
11662
11663 * server.c (handle_query): Call target_process_qsupported.
11664
11665 * target.h (target_ops): Add process_qsupported.
11666 (target_process_qsupported): New.
11667
fc7238bb
PA
116682010-04-03 Pedro Alves <pedro@codesourcery.com>
11669
11670 * inferiors.c (add_thread): Set last_status kind to
11671 TARGET_WAITKIND_IGNORE.
11672 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11673 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11674 (linux_wait_1): Move `thread' local definition to block that uses
11675 it. Don't NULL initialize `event_child'.
11676 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11677 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11678 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11679
bdabb078
PA
116802010-04-01 Pedro Alves <pedro@codesourcery.com>
11681
11682 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11683 an extended waitstatus, or by a watchpoint.
11684 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11685 thread was stepping or has been stopped by a watchpoint.
11686
d3bbe7a0
PA
116872010-04-01 Pedro Alves <pedro@codesourcery.com>
11688
11689 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11690 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11691 of another, then delete the previous, and validate all
11692 breakpoints.
11693 (validate_inserted_breakpoint): New.
11694 (delete_disabled_breakpoints): New.
11695 (validate_breakpoints): New.
11696 (check_mem_read): Validate breakpoints before trusting their
11697 shadow. Delete disabled breakpoints.
11698 (check_mem_write): Validate breakpoints before trusting they
11699 should be inserted. Delete disabled breakpoints.
11700 * mem-break.h (validate_breakpoints):
11701 * server.c (handle_query): Validate breakpoints when we see a
11702 qSymbol query.
11703
8b07ae33
PA
117042010-04-01 Pedro Alves <pedro@codesourcery.com>
11705
11706 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11707 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11708 if we could tell there's a GDB breakpoint at stop_pc.
11709 (need_step_over_p): Don't do a step over if we find a GDB
11710 breakpoint at the resume PC.
11711
11712 * mem-break.c (struct raw_breakpoint): New.
11713 (enum bkpt_type): New type `gdb_breakpoint'.
11714 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11715 fields. New field `raw'.
11716 (find_raw_breakpoint_at): New.
11717 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11718 breakpoint instead.
11719 (set_breakpoint_at): Adjust.
11720 (delete_raw_breakpoint): New.
11721 (release_breakpoint): New.
11722 (delete_breakpoint): Rename to...
11723 (delete_breakpoint_1): ... this. Add proc parameter. Use
11724 release_breakpoint. Return ENOENT.
11725 (delete_breakpoint): Reimplement.
11726 (find_breakpoint_at): Delete.
11727 (find_gdb_breakpoint_at): New.
11728 (delete_breakpoint_at): Delete.
11729 (set_gdb_breakpoint_at): New.
11730 (delete_gdb_breakpoint_at): New.
11731 (gdb_breakpoint_here): New.
11732 (set_reinsert_breakpoint): Use release_breakpoint.
11733 (uninsert_breakpoint): Rename to ...
11734 (uninsert_raw_breakpoint): ... this.
11735 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11736 (reinsert_raw_breakpoint): Change parameter type to
11737 raw_breakpoint.
11738 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11739 instead.
11740 (check_breakpoints): Adjust. Use release_breakpoint.
11741 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11742 (breakpoint_inserted_here): Ditto.
11743 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11744 Don't trust the breakpoint's shadow if it is not inserted.
11745 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11746 (delete_all_breakpoints): Adjust.
11747 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11748 use delete_breakpoint_1.
11749
11750 * mem-break.h (breakpoints_supported): Delete declaration.
11751 (set_gdb_breakpoint_at): Declare.
11752 (gdb_breakpoint_here): Declare.
11753 (delete_breakpoint_at): Delete.
11754 (delete_gdb_breakpoint_at): Declare.
11755
11756 * server.h (struct raw_breakpoint): Forward declare.
11757 (struct process_info): New field `raw_breakpoints'.
11758
11759 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11760 breakpoints.
11761
6bf5e0ba
PA
117622010-03-24 Pedro Alves <pedro@codesourcery.com>
11763
11764 * linux-low.c (status_pending_p_callback): Fix comment.
11765 (linux_wait_for_event_1): Move most of the internal breakpoint
11766 handling from here...
11767 (linux_wait_1): ... to here.
11768 (count_events_callback): New.
11769 (select_singlestep_lwp_callback): New.
11770 (select_event_lwp_callback): New.
11771 (cancel_breakpoints_callback): New.
11772 (select_event_lwp): New.
11773 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11774 priority to all LWPs that have had events that should be reported
11775 to the client. Cancel breakpoints when about to reporting the
11776 event to the client, not while stopping lwps. No longer cancel
11777 finished single-steps here.
11778 (cancel_finished_single_step): Delete.
11779 (cancel_finished_single_steps): Delete.
11780
414a389f
PA
117812010-03-24 Pedro Alves <pedro@codesourcery.com>
11782
11783 * mem-break.c (enum bkpt_type): New.
11784 (struct breakpoint): New field `type'.
11785 (set_breakpoint_at): Change return type to struct breakpoint
11786 pointer. Set type to `other_breakpoint' by default.
11787 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11788 in the breakpoint list.
11789 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11790 (reinsert_breakpoint): Rename to ...
11791 (reinsert_raw_breakpoint): ... this.
11792 (reinsert_breakpoints_at): Adjust.
11793 * mem-break.h (struct breakpoint): Declare.
11794 (set_breakpoint_at): Change return type to struct breakpoint
11795 pointer.
11796
2280c721
PA
117972010-03-24 Pedro Alves <pedro@codesourcery.com>
11798
11799 * server.c (handle_query): Assign, not compare.
11800
d50171e4
PA
118012010-03-24 Pedro Alves <pedro@codesourcery.com>
11802
11803 Teach linux gdbserver to step-over-breakpoints.
11804
11805 * linux-low.c (can_hardware_single_step): New.
11806 (supports_breakpoints): New.
11807 (handle_extended_wait): If stopping threads, read the stop pc of
11808 the new cloned LWP.
11809 (get_pc): New.
11810 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11811 low target doesn't support retrieving the PC.
11812 (add_lwp): Set last_resume_kind to resume_continue.
11813 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11814 (linux_attach): Don't clear stop_expected. Set the lwp's
11815 last_resume_kind to resume_stop.
11816 (linux_detach_one_lwp): Don't check for removed breakpoints.
11817 (check_removed_breakpoint): Delete.
11818 (status_pending_p): Rename to ...
11819 (status_pending_p_callback): ... this. Don't check for removed
11820 breakpoints. Don't consider threads that are stopped from GDB's
11821 perspective.
11822 (linux_wait_for_lwp): Always read the stop_pc here.
11823 (cancel_breakpoint): New.
11824 (step_over_bkpt): New global.
11825 (linux_wait_for_event_1): Implement stepping over breakpoints.
11826 (gdb_wants_lwp_stopped): New.
11827 (gdb_wants_all_stopped): New.
11828 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11829 single-step traps here. Store the thread's last reported target
11830 wait status.
11831 (send_sigstop): Don't clear stop_expected. Always set it,
11832 instead.
11833 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11834 (cancel_finished_single_step): New.
11835 (cancel_finished_single_steps): New.
11836 (wait_for_sigstop): Don't cancel finished single-step traps here.
11837 (linux_resume_one_lwp): Don't check for removed breakpoints.
11838 Don't set `step' on non-hardware step archs.
11839 (linux_set_resume_request): Ignore resume_stop requests if already
11840 stopping or stopped. Set the lwp's last_resume_kind.
11841 (resume_status_pending_p): Don't check for removed breakpoints.
11842 (need_step_over_p): New.
11843 (start_step_over): New.
11844 (finish_step_over): New.
11845 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11846 requests. Clear the thread's last reported target waitstatus.
11847 Don't use the `suspended' flag. Don't consider pending breakpoints.
11848 (linux_resume): Start a step-over if necessary.
11849 (proceed_one_lwp): New.
11850 (proceed_all_lwps): New.
11851 (unstop_all_lwps): New.
11852 * linux-low.h (struct lwp_info): Rewrite comment for the
11853 `suspended' flag. Add the `stop_pc' field. Delete the
11854 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11855 Add `'last_resume_kind' and `need_step_over' fields.
11856 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11857 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11858 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11859 (set_raw_breakpoint_at): New.
11860 (set_breakpoint_at): Rewrite to use it.
11861 (reinsert_breakpoint_handler): Delete.
11862 (set_reinsert_breakpoint): New.
11863 (reinsert_breakpoint_by_bp): Delete.
11864 (delete_reinsert_breakpoints): New.
11865 (uninsert_breakpoint): Rewrite.
11866 (uninsert_breakpoints_at): New.
11867 (reinsert_breakpoint): Rewrite.
11868 (reinsert_breakpoints_at): New.
11869 (check_breakpoints): Rewrite.
11870 (breakpoint_here): New.
11871 (breakpoint_inserted_here): New.
11872 (check_mem_read): Adjust.
11873 * mem-break.h (breakpoints_supported, breakpoint_here)
11874 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11875 (reinsert_breakpoint_by_bp): Delete declaration.
11876 (delete_reinsert_breakpoints): Declare.
11877 (reinsert_breakpoint): Delete declaration.
11878 (reinsert_breakpoints_at): Declare.
11879 (uninsert_breakpoint): Delete declaration.
11880 (uninsert_breakpoints_at): Declare.
11881 (check_breakpoints): Adjust prototype.
11882 * server.h: Adjust include order.
11883 (struct thread_info): Declare here. Add a `last_status' field.
11884
30ba68cb
MS
118852010-03-23 Michael Snyder <msnyder@vmware.com>
11886
11887 * server.c (crc32): New function.
11888 (handle_query): Add handling for 'qCRC:' request.
11889
b9a881c2
PA
118902010-03-23 Pedro Alves <pedro@codesourcery.com>
11891
11892 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11893 lwp had been stopped by a watchpoint.
11894
e92d13d5
PA
118952010-03-16 Pedro Alves <pedro@codesourcery.com>
11896
11897 * server.h (internal_error): Declare.
11898 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11899 * utils.c (internal_error): New function.
11900
64daa791
AS
119012010-03-15 Andreas Schwab <schwab@redhat.com>
11902
11903 * configure.srv: Fix typo setting srv_regobj.
11904
f52cd8cd
PA
119052010-03-15 Pedro Alves <pedro@codesourcery.com>
11906
11907 * linux-low.c (fetch_register): Avoid passing a non string literal
11908 format to `error'.
11909 (usr_store_inferior_registers): Ditto.
11910
93ae6fdc
PA
119112010-03-14 Pedro Alves <pedro@codesourcery.com>
11912
11913 * linux-low.c (linux_write_memory): Bail out early if peeking
11914 memory failed.
11915
c3adc08c
PA
119162010-03-14 Pedro Alves <pedro@codesourcery.com>
11917
11918 * linux-low.h (struct lwp_info): New fields
11919 `stopped_by_watchpoint' and `stopped_data_address'.
11920 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11921 here, and cache them in the lwp object.
11922 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11923 directly.
11924 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11925 field.
11926 (linux_stopped_by_watchpoint): Rewrite.
11927 (linux_stopped_data_address): Rewrite.
11928
bce522a2
PA
119292010-03-06 Simo Melenius <simo.melenius@iki.fi>
11930
11931 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11932 switching the current inferior, not before.
11933
90884b2b
L
119342010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11935
11936 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11937 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11938 i386-linux.c and amd64-linux.c.
11939 (reg-i386.o): Removed.
11940 (reg-i386.c): Likewise.
11941 (reg-i386-linux.o): Likewise.
11942 (reg-i386-linux.c): Likewise.
11943 (reg-x86-64.o): Likewise.
11944 (reg-x86-64.c): Likewise.
11945 (reg-x86-64-linux.o): Likewise.
11946 (reg-x86-64-linux.c): Likewise.
11947 (i386.o): New.
11948 (i386.c): Likewise.
11949 (i386-linux.o): Likewise.
11950 (i386-linux.c): Likewise.
11951 (amd64.o): Likewise.
11952 (amd64.c): Likewise.
11953 (amd64-linux.o): Likewise.
11954 (amd64-linux.c): Likewise.
11955
11956 * configure.srv (srv_i386_regobj): New.
11957 (srv_i386_linux_regobj): Likewise.
11958 (srv_amd64_regobj): Likewise.
11959 (srv_amd64_linux_regobj): Likewise.
11960 (srv_i386_32bit_xmlfiles): Likewise.
11961 (srv_i386_64bit_xmlfiles): Likewise.
11962 (srv_i386_xmlfiles): Likewise.
11963 (srv_amd64_xmlfiles): Likewise.
11964 (srv_i386_linux_xmlfiles): Likewise.
11965 (srv_amd64_linux_xmlfiles): Likewise.
11966 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11967 srv_xmlfiles to $srv_i386_xmlfiles.
11968 (i[34567]86-*-mingw32ce*): Likewise.
11969 (i[34567]86-*-mingw*): Likewise.
11970 (i[34567]86-*-nto*): Likewise.
11971 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11972 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11973 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11974 (x86_64-*-linux*): Likewise.
11975
11976 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11977 (init_registers_amd64_linux): New.
11978 (x86_arch_setup): Replace init_registers_x86_64_linux with
11979 init_registers_amd64_linux.
11980
193f13e6
MK
119812010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11982
11983 * configure.ac: Check for libdl. If it is not available link against
11984 static libthread_db.
11985 * configure: Regenerate.
11986
85d721b8
PA
119872010-02-22 Pedro Alves <pedro@codesourcery.com>
11988
11989 PR9605
11990
11991 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11992 handing a read watchpoint.
11993 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11994
6076632b
DE
119952010-02-12 Doug Evans <dje@google.com>
11996
11997 * linux-low.c (linux_supports_tracefork_flag): Document.
11998 (linux_look_up_symbols): Add comment.
11999
3327ccf7
L
120002010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12001
12002 * regcache.c (supply_register): Clear regcache if buf is NULL.
12003
0718675c 120042010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 12005 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
12006
12007 * inferiors.c (find_inferior): Add function documentation.
12008 (unloaded_dll): Handle the case where the unloaded dll has not
12009 been previously registered in the dll list.
12010
177321bd
DJ
120112010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12012
12013 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12014 (thumb2_breakpoint): New.
12015 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12016
2b009048
DJ
120172010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12018
12019 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12020 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12021 breakpoints.
12022
3be029c7
PA
120232010-01-21 Pedro Alves <pedro@codesourcery.com>
12024
12025 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12026
18f5de3b
JK
120272010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12028
12029 * linux-s390-low.c (s390_collect_ptrace_register)
12030 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12031
3743bb4f
DE
120322010-01-21 Doug Evans <dje@google.com>
12033
14ce3065
DE
12034 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12035 (PTRACE_ARG4_TYPE): New macro.
12036 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12037 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12038 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12039 (usr_store_inferior_registers): Ditto.
12040 (linux_read_memory, linux_write_memory): Ditto.
12041 (linux_test_for_tracefork): Ditto.
12042
3743bb4f
DE
12043 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12044 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12045
8b315be5
PA
120462010-01-21 Pedro Alves <pedro@codesourcery.com>
12047
12048 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12049 target.
12050
85492558
PA
120512010-01-21 Pedro Alves <pedro@codesourcery.com>
12052
12053 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12054 prototype to take a regcache. Adjust.
12055
442ea881
PA
120562010-01-20 Pedro Alves <pedro@codesourcery.com>
12057
12058 * regcache.h (struct thread_info): Forward declare.
12059 (struct regcache): New.
12060 (new_register_cache): Adjust prototype.
12061 (get_thread_regcache): Declare.
12062 (free_register_cache): Adjust prototype.
12063 (registers_to_string, registers_from_string): Ditto.
12064 (supply_register, supply_register_by_name, collect_register)
12065 (collect_register_as_string, collect_register_by_name): Ditto.
12066 * regcache.c (struct inferior_regcache_data): Delete.
12067 (get_regcache): Rename to ...
12068 (get_thread_regcache): ... this. Adjust. Switch inferior before
12069 fetching registers.
12070 (regcache_invalidate_one): Adjust.
12071 (regcache_invalidate): Fix prototype.
12072 (new_register_cache): Return the new register cache.
12073 (free_register_cache): Change prototype.
12074 (realloc_register_cache): Adjust.
12075 (registers_to_string): Change prototype to take a regcache. Adjust.
12076 (registers_from_string): Ditto.
12077 (register_data): Ditto.
12078 (supply_register): Ditto.
12079 (supply_register_by_name): Ditto.
12080 (collect_register): Ditto.
12081 (collect_register_as_string): Ditto.
12082 (collect_register_by_name): Ditto.
12083 * server.c (process_serial_event): Adjust.
12084 * linux-low.h (regset_fill_func, regset_store_func): Change
12085 prototype.
12086 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12087 Change prototype.
12088 * linux-low.c (get_stop_pc): Adjust.
12089 (check_removed_breakpoint): Adjust.
12090 (linux_wait_for_event): Adjust.
12091 (linux_resume_one_lwp): Adjust.
12092 (fetch_register): Add regcache parameter. Adjust.
12093 (usr_store_inferior_registers): Ditto.
12094 (regsets_fetch_inferior_registers): Ditto.
12095 (regsets_store_inferior_registers): Ditto.
12096 (linux_fetch_registers, linux_store_registers): Ditto.
12097 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12098 regcache. Adjust.
43aaf8b6
PA
12099 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12100 Ditto.
442ea881
PA
12101 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12102 prototype to take a regcache.
12103 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12104 * remote-utils.c (convert_ascii_to_int, outreg)
12105 (prepare_resume_reply): Change prototype to take a regcache.
12106 Adjust.
12107 * target.h (struct target_ops) <fetch_registers, store_registers>:
12108 Change prototype to take a regcache.
12109 (fetch_inferior_registers, store_inferior_registers): Change
12110 prototype to take a regcache. Adjust.
12111 * proc-service.c (ps_lgetregs): Adjust.
12112 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12113 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12114 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12115 take a regcache. Adjust.
12116 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12117 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12118 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12119 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12120 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12121 (cris_cannot_fetch_register):
12122 (cris_breakpoint_at): Change prototype to take a regcache.
12123 Adjust.
12124 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12125 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12126 to take a regcache. Adjust.
12127 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12128 Adjust.
12129 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12130 take a regcache. Adjust.
12131 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12132 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12133 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12134 * linux-mips-low.c (mips_get_pc):
12135 (mips_set_pc): Change prototype to take a regcache. Adjust.
12136 (mips_reinsert_addr): Adjust.
12137 (mips_collect_register): Change prototype to take a regcache.
12138 Adjust.
12139 (mips_supply_register):
12140 (mips_collect_register_32bit, mips_supply_register_32bit)
12141 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12142 (mips_store_fpregset): Ditto.
43aaf8b6
PA
12143 * linux-ppc-low.c (ppc_supply_ptrace_register)
12144 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
12145 (parse_spufs_run): Adjust.
12146 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12147 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12148 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12149 take a regcache. Adjust.
12150 * linux-s390-low.c (s390_collect_ptrace_register)
12151 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12152 (s390_set_pc): Change prototype to take a regcache. Adjust.
12153 (s390_arch_setup): Adjust.
12154 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12155 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12156 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12157 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12158 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12159 regcache. Adjust.
12160 (sparc_breakpoint_at): Adjust.
12161 * linux-xtensa-low.c (xtensa_fill_gregset):
12162 (xtensa_store_gregset):
12163 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12164 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12165 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12166 prototype to take a regcache. Adjust.
12167 * win32-arm-low.c (arm_fetch_inferior_register)
12168 (arm_store_inferior_register): Change prototype to take a
12169 regcache. Adjust.
12170 * win32-i386-low.c (i386_fetch_inferior_register)
12171 (i386_store_inferior_register): Change prototype to take a
12172 regcache. Adjust.
12173 * win32-low.c (child_fetch_inferior_registers)
12174 (child_store_inferior_registers): Change prototype to take a
12175 regcache. Adjust.
12176 (win32_wait): Adjust.
12177 (win32_fetch_inferior_registers): Change prototype to take a
12178 regcache. Adjust.
12179 (win32_store_inferior_registers): Adjust.
12180 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12181 store_inferior_register>: Change prototype to take a regcache.
12182
60c3d7b0
DE
121832010-01-20 Doug Evans <dje@google.com>
12184
12185 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12186 #ifdef.
12187 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 12188 (W_STOPCODE): Provide definition if missing.
60c3d7b0 12189
dc146f7c
VP
121902010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12191
12192 * linux-low.c (linux_core_of_thread): New.
12193 (compare_ints, show_process, list_threads): New.
12194 (linux_qxfer_osdata): Report threads and cores.
12195 (linux_target_op): Register linux_core_of_thread.
12196 * remote-utils.c (prepare_resume_reply): Report the core.
12197 (buffer_xml_printf): Support %d specifier.
12198 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12199 New.
12200 (handle_query): Handle qXfer:threads. Announce availability
12201 thereof.
12202 * target.h (struct target_ops): New field core_of_thread.
12203
7803799a
UW
122042010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12205
12206 * Makefile.in (clean): Remove new generated files.
12207 (reg-s390.o, reg-s390.c): Remove rules.
12208 (reg-s390x.o, reg-s390x.c): Likewise.
12209 (s390-linux32.o, s390-linux32.c): Add rules.
12210 (s390-linux64.o, s390-linux64.c): Likewise.
12211 (s390x-linux64.o, s390x-linux64.c): Likewise.
12212 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12213 * linux-s390-low.c: Include <elf.h>.
12214 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12215 (init_registers_s390): Remove prototype.
12216 (init_registers_s390x): Likewise.
12217 (init_registers_s390_linux32): Add prototype.
12218 (init_registers_s390_linux64): Likewise.
12219 (init_registers_s390x_linux64): Likewise.
12220 (s390_num_regs_3264): New define.
12221 (s390_regmap_3264): New global variable.
12222 (s390_cannot_fetch_register): Remove obsolete check.
12223 (s390_cannot_store_register): Likewise.
12224 (s390_collect_ptrace_register): Handle upper/lower register halves.
12225 (s390_supply_ptrace_register): Likewise.
12226 (s390_fill_gregset): Update to register number changes.
12227 (s390_get_hwcap): New routine.
12228 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12229 Install appropriate regmap and register set.
12230
6e7ffa39
JB
122312010-01-01 Joel Brobecker <brobecker@adacore.com>
12232
12233 * server.c (gdbserver_version): Update copyright year to 2010.
12234 * gdbreplay.c (gdbreplay_version): Likewise.
12235
957f3f49
DE
122362009-12-28 Doug Evans <dje@google.com>
12237
12238 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12239 elf/external.h. Include <elf.h> instead but only if necessary.
12240
ca5c370d
PA
122412009-12-28 Pedro Alves <pedro@codesourcery.com>
12242
12243 * linux-low.c (linux_remove_process): Remove `detaching'
12244 parameter. Don't release/detach from thread_db here.
12245 (linux_kill): Release/detach from thread_db here, ...
12246 (linux_detach): ... and here, before actually detaching.
12247 (linux_wait_1): ... and here, when a process exits.
12248 * thread-db.c (any_thread_of): New.
12249 (thread_db_free): Switch the current inferior to a thread of the
12250 passed in process.
12251
4ee62156
DE
122522009-12-21 Doug Evans <dje@google.com>
12253
d90e6a88
DE
12254 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12255
c5f62d5f
DE
12256 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12257 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12258 warning ifndef __NR_tkill. Move setting of errno there too.
12259 Delete unnecessary resetting of errno after syscall.
12260 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12261
10e86dd7
DE
12262 * configure.ac: Check for dladdr.
12263 * config.in: Regenerate.
12264 * configure: Regenerate.
12265 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12266 (try_thread_db_load): Update.
12267
4ee62156
DE
12268 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12269
00f515da
DE
122702009-12-18 Doug Evans <dje@google.com>
12271
e9464885
DE
12272 * event-loop.c: Include unistd.h if it exists.
12273
07d4f67e
DE
12274 * linux-low.c (my_waitpid): Move definition away from being in
12275 between linux_tracefork_child/linux_test_for_tracefork.
12276
00f515da
DE
12277 * gdb_proc_service.h (psaddr_t): Fix type.
12278 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12279 signature to match glibc.
12280
1de1badb
DE
122812009-12-16 Doug Evans <dje@google.com>
12282
12283 * linux-low.c (linux_read_memory): Fix argument to read.
12284
aeeb81d1
PA
122852009-11-26 Pedro Alves <pedro@codesourcery.com>
12286
12287 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12288 events, don't leave current_inferior pointing at null.
12289
10357975
PA
122902009-11-26 Pedro Alves <pedro@codesourcery.com>
12291
12292 * win32-low.c (LOG): Delete.
12293 (OUTMSG): Output to stderr.
12294 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12295 on compile time LOG macro.
12296 (win32_wait): Fix debug output.
12297
cf6e3471
PA
122982009-11-26 Pedro Alves <pedro@codesourcery.com>
12299
12300 * win32-low.c (win32_add_one_solib): If the dll name is
12301 "ntdll.dll", prepend the system directory to the dll path.
12302
0c85e18e
MK
123032009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12304
12305 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12306
9ac544ce 123072009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 12308 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
12309
12310 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12311 * configure.ac: Check for __mcoldfire__ and set
12312 gdb_cv_m68k_is_coldfire.
12313 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12314 reg-cf.o and reg-m68k.o.
12315 * configure: Regenerated.
12316
fd7dd3e6
PA
123172009-11-16 Pedro Alves <pedro@codesourcery.com>
12318
12319 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12320 Pass it to thread_db_free.
12321 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12322 proper `detaching' argument to linux_remove_process.
12323 * linux-low.h (thread_db_free): Add `detaching' parameter.
12324 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12325 to thread_db_free.
12326 (thread_db_free): Add `detaching' parameter. Only
12327 call td_ta_clear_event if detaching from process.
12328
75aa492e
MK
123292009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12330
12331 * thread-db.c (thread_db_free): Fix typo.
12332
21e1bee4
PP
123332009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12334
12335 PR gdb/10838
12336 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12337
8838b45e
NS
123382009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12339
12340 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12341 with an i686 compiler.
12342 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12343 needed.
12344 * configure: Rebuilt.
12345
8a35fb51
SL
123462009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12347
12348 PR gdb/10783
12349
12350 * server.c (handle_search_memory_1): Correct read_addr initialization
12351 in loop for searching subsequent chunks.
12352
96f15937
PP
123532009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12354
12355 * configure.ac: New --with-libthread-db option.
12356 * thread-db.c: Allow direct dependence on libthread_db.
12357 (thread_db_free): Adjust.
12358 * config.in: Regenerate.
12359 * configure: Likewise.
889bf7c5 12360
5f7d1694
PP
123612009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12362
12363 PR gdb/10757
12364 * thread-db.c (attach_thread): New function.
12365 (maybe_attach_thread): Return success/failure.
12366 (find_new_threads_callback): Adjust.
889bf7c5
PA
12367 (thread_db_find_new_threads): Loop until no new threads.
12368
88e3b899
PA
123692009-10-13 Pedro Alves <pedro@codesourcery.com>
12370
12371 * proc-service.c (ps_lgetregs): Formatting.
12372
cdbfd419
PP
123732009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12374
12375 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12376 * configure.ac: Adjust.
12377 * linux-low.h (struct process_info_private): Move members to struct
12378 thread_db.
12379 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12380 * linux-low.c (linux_remove_process): Adjust.
12381 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12382 * server.c (handle_query): Move code ...
12383 (handle_monitor_command): ... here. New function.
12384 * target.h (struct target_ops): New member.
12385 * thread-db.c (struct thread_db): New.
12386 (libthread_db_search_path): New variable.
12387 (thread_db_create_event, thread_db_enable_reporting)
12388 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12389 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12390 (try_thread_db_load_1, dladdr_to_soname): New functions.
12391 (try_thread_db_load, thread_db_load_search): New functions.
12392 (thread_db_init): Search for libthread_db.
12393 (thread_db_free): New function.
12394 (thread_db_handle_monitor_command): Likewise.
12395 * config.in: Regenerate.
12396 * configure: Regenerate.
889bf7c5 12397
4168d2d6
UW
123982009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12399
12400 * spu-low.c (spu_kill): Wait for inferior to terminate.
12401 Call clear_inferiors.
12402 (spu_detach): Call clear_inferiors.
12403
81ecdfbb
RW
124042009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12405
12406 * aclocal.m4: Regenerate.
12407 * config.in: Likewise.
12408 * configure: Likewise.
12409
0b9ff2c0
UW
124102009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12411
12412 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12413 (parse_spufs_run): New function.
12414 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12415 (ppc_breakpoint_at): Handle SPU breakpoints.
12416
efcbbd14
UW
124172009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12418
12419 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12420 (SPUFS_MAGIC): Define.
12421 (spu_enumerate_spu_ids): New function.
12422 (linux_qxfer_spu): New function.
12423 (linux_target_ops): Install linux_qxfer_spu.
12424
f4d9bade
UW
124252009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12426
12427 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12428 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12429 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12430 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12431 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12432 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12433 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12434 (init_registers_powerpc_cell32l): Add prototype.
12435 (init_registers_powerpc_cell64l): Likewise.
12436 (ppc_arch_setup): Detect Cell/B.E. architecture.
12437
96e946ca
RW
124382009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12439
12440 * Makefile.in (datarootdir): New variable.
12441
58d6951d
DJ
124422009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12443
12444 * linux-low.c (linux_write_memory): Update debugging output.
12445 * Makefile.in (clean): Add new descriptions.
12446 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12447 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12448 * configure.srv: Add new files for arm*-*-linux*.
12449 * linux-arm-low.c: Add new declarations.
12450 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12451 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12452 (HWCAP_VFPv3D16): New.
12453 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12454 instead of __IWMMXT__.
12455 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12456 (arm_arch_setup): New.
12457 (target_regsets): Remove #ifdef. Add VFP regset.
12458 (the_low_target): Use arm_arch_setup.
12459
12b42a12
DJ
124602009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12461
12462 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12463 the main thread again.
12464
ac8c974e
AR
124652009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12466
12467 Adding Neutrino gdbserver.
12468 * configure: Regenerated.
12469 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12470 * configure.srv (i[34567]86-*-nto*): New target.
12471 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12472 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12473 (nto_comctrl) [__QNX__]: New function.
12474 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12475
4424e0c3 124762009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
12477
12478 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12479 srv_tgtobj.
12480
912cf4ba
PA
124812009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12482 Pedro Alves <pedro@codesourcery.com>
12483
12484 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12485 don't support CONTEXT_EXTENDED_REGISTERS.
12486 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12487 (the_low_target): Install them.
12488 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12489 failing with ERROR_PIPE_NOT_CONNECTED.
12490
aa5ca48f
DE
124912009-06-30 Doug Evans <dje@google.com>
12492 Pierre Muller <muller@ics.u-strasbg.fr>
12493
12494 Add h/w watchpoint support to x86-linux, win32-i386.
12495 * Makefile.in (SFILES): Add i386-low.c
12496 (i386_low_h): Define.
12497 (i386-low.o): Add dependencies.
12498 (linux-x86-low.o): Add i386-low.h dependency.
12499 (win32-i386-low.o): Ditto.
12500 * i386-low.c: New file.
12501 * i386-low.h: New file.
12502 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12503 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12504 * linux-low.c (linux_add_process): Initialize arch_private.
12505 (linux_remove_process): Free arch_private.
12506 (add_lwp): Initialize arch_private.
12507 (delete_lwp): Free arch_private.
12508 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12509 provided.
12510 * linux-low.h (process_info_private): New member arch_private.
12511 (lwp_info): New member arch_private.
12512 (linux_target_ops): New members new_process, new_thread,
12513 prepare_to_resume.
12514 (ptid_of): New macro.
12515 * linux-x86-low.c: Include stddef.h, i386-low.h.
12516 (arch_process_info): New struct.
12517 (arch_lwp_info): New struct.
12518 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12519 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12520 (i386_dr_low_get_status): New function.
12521 (x86_insert_point, x86_remove_point): New functions.
12522 (x86_stopped_by_watchpoint): New function.
12523 (x86_stopped_data_address): New function.
12524 (x86_linux_new_process, x86_linux_new_thread): New functions.
12525 (x86_linux_prepare_to_resume): New function.
12526 (the_low_target): Add entries for insert_point, remove_point,
12527 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12528 prepare_to_resume.
12529 * server.c (debug_hw_points): New global.
12530 (monitor_show_help): Document set debug-hw-points.
12531 (handle_query): Process "set debug-hw-points".
12532 * server.h (debug_hw_points): Declare.
12533 (paddress): Declare.
12534 * utils.c (NUMCELLS, CELLSIZE): New macros.
12535 (get_sell, xsnprintf, paddress): New functions.
12536 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12537 remove_point, stopped_by_watchpoint, stopped_data_address.
12538 * win32-i386-low.c: Include i386-low.h.
12539 (debug_reg_state): Replaces dr.
12540 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12541 (i386_dr_low_get_status): New function.
12542 (i386_insert_point, i386_remove_point): New functions.
12543 (i386_stopped_by_watchpoint): New function.
12544 (i386_stopped_data_address): New function.
12545 (i386_initial_stuff): Update.
12546 (get_thread_context,set_thread_context,i386_thread_added): Update.
12547 (the_low_target): Add entries for insert_point,
12548 remove_point, stopped_by_watchpoint, stopped_data_address.
12549 * win32-low.c (win32_insert_watchpoint): New function.
12550 (win32_remove_watchpoint): New function.
12551 (win32_stopped_by_watchpoint): New function.
12552 (win32_stopped_data_address): New function.
12553 (win32_target_ops): Add entries for insert_watchpoint,
12554 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12555 * win32-low.h (win32_target_ops): New members insert_point,
12556 remove_point, stopped_by_watchpoint, stopped_data_address.
12557
d993e290
PA
125582009-06-25 Pedro Alves <pedro@codesourcery.com>
12559
12560 * server.c (process_serial_event): Re-return unsupported, not
12561 error, if the type isn't recognized. Re-allow supporting only
12562 insert or remove packets. Also call require_running for
12563 breakpoints. Add missing break statement to default case. Tidy.
12564 * target.h (struct target_ops): Rename insert_watchpoint to
12565 insert_point, and remove_watchpoint to remove_point.
12566
12567 * linux-low.h (struct linux_target_ops): Likewise.
12568 * linux-low.c (linux_insert_watchpoint): Rename to ...
12569 (linux_insert_point): ... this. Adjust.
12570 (linux_remove_watchpoint): Rename to ...
12571 (linux_remove_point): ... this. Adjust.
12572 (linux_target_ops): Adjust.
12573 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12574 (cris_insert_point): ... this.
12575 (cris_remove_watchpoint): Rename to ...
12576 (cris_remove_point): ... this.
12577 (the_low_target): Adjust.
12578
0f54c268
PM
125792009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12580
12581 * server.c (handle_v_kill): Pass signal_pid to
12582 kill_inferior if multi_process is zero.
12583
c6314022
AR
125842009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12585
12586 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12587 * target.h (target_ops): Comment for *_watchpoint to make it clear
12588 the functions can get types '0' and '1'.
12589
4463ce24
AR
125902009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12591
12592 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12593 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12594 * regcache.c (get_regcache): Likewise.
12595 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12596 * win32-low.c (child_fetch_inferior_registers): Remove check for
12597 regno 0.
12598
cf8fd78b
PA
125992009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12600 Pedro Alves <pedro@codesourcery.com>
12601
12602 * target.h (struct target_ops) <supports_multi_process>: New
12603 callback.
12604 (target_supports_multi_process): New.
12605 * server.c (handle_query): Even if GDB reports support, only
12606 enable multi-process if the target also supports it. Report
12607 multi-process support only if the target backend supports it.
12608 * linux-low.c (linux_supports_multi_process): New function.
12609 (linux_target_ops): Install it as target_supports_multi_process
12610 callback.
12611
47c0c975
DE
126122009-05-24 Doug Evans <dje@google.com>
12613
e09875d4
DE
12614 Global renaming of find_thread_pid to find_thread_ptid.
12615 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12616 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12617 All callers updated.
12618
e27d73f6
DE
12619 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12620 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12621 directly.
12622
47c0c975
DE
12623 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12624 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12625 (linux_resume_one_lwp): Ditto.
12626
2acc282a
DE
126272009-05-23 Doug Evans <dje@google.com>
12628
12629 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12630 from struct inferior_list_entry * to struct lwp_info *.
12631 All callers updated.
12632
9f1036c1
DE
126332009-05-13 Doug Evans <dje@google.com>
12634
12635 * linux-x86-low.c: Don't include assert.h.
12636 (x86_siginfo_fixup): Use fatal, not assert.
12637 (x86_arch_setup): Fix comment.
12638
d0722149
DE
126392009-05-12 Doug Evans <dje@google.com>
12640
12641 Biarch support for i386/amd64 gdbserver.
12642 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12643 Add linux-x86-low.c.
12644 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12645 (linux-x86-low.o): Add.
12646 * linux-x86-64-low.c: Delete.
12647 * linux-i386-low.c: Delete.
12648 * linux-x86-low.c: New file.
12649 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12650 linux-x86-low.o.
12651 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12652 linux-x86-low.o.
12653 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12654 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12655 (linux_child_pid_to_exec_file): New function.
12656 (elf_64_header_p, elf_64_file_p): New functions.
12657 (siginfo_fixup): New function.
12658 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12659 give target a chance to convert layout.
12660 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12661 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12662
fdeb2a12
DE
126632009-05-07 Doug Evans <dje@google.com>
12664
12665 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12666 (regsets_store_inferior_registers): Ditto.
12667
a6dbe5df
PA
126682009-05-06 Pedro Alves <pedro@codesourcery.com>
12669
12670 PR server/10048
12671
12672 * linux-low.c (must_set_ptrace_flags): Delete.
12673 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12674 of the global.
12675 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12676 `lwp->must_set_ptrace_flags' instead.
ba42693b 12677 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
12678 (linux_wait_1): ... not here.
12679
5091eb23
DE
126802009-04-30 Doug Evans <dje@google.com>
12681
9f767825
DE
12682 * inferiors.c (started_inferior_callback): New function.
12683 (attached_inferior_callback): New function.
12684 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12685 * server.c (print_started_pid, print_attached_pid): New functions.
12686 (detach_or_kill_for_exit): New function.
12687 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12688 * server.h (have_started_inferiors_p): Declare.
12689 (have_attached_inferiors_p): Declare.
12690
5091eb23
DE
12691 * inferiors.c (remove_process): Fix memory leak, free process.
12692 * linux-low.c (linux_remove_process): New function.
12693 (linux_kill): Call it instead of remove_process.
12694 (linux_detach, linux_wait_1): Ditto.
12695
155c8968
PA
126962009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12697
12698 * configure.srv: Add x86 Windows CE target.
12699
7fe519cb
UW
127002009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12701
12702 * inferiors.c (get_thread_process): Make global.
12703 * server.h (get_thread_process): Add prototype.
12704 * thread-db.c (find_one_thread): Use get_thread_process
12705 instead of current_process.
12706 (thread_db_get_tls_address): Do not crash if called when
12707 thread layer is not yet initialized.
12708
5472f405
UW
127092009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12710
12711 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12712 * spu-low.c (current_tid): Rename to ...
12713 (current_ptid): ... this.
12714 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12715 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12716 ptid_get_lwp (current_ptid) instead of current_tid.
12717 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12718 instead of current_tid. Use find_process_pid to verify pid
12719 argument is valid. Pass proper argument to remove_process.
12720 (spu_thread_alive): Compare current_ptid instead of current_tid.
12721 (spu_resume): Likewise.
12722
55ac2b99
PA
127232009-04-02 Pedro Alves <pedro@codesourcery.com>
12724
12725 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12726 variable.
12727
95954743
PA
127282009-04-01 Pedro Alves <pedro@codesourcery.com>
12729
12730 Implement the multiprocess extensions, and add linux multiprocess
12731 support.
12732
12733 * server.h (ULONGEST): Declare.
12734 (struct ptid, ptid_t): New.
12735 (minus_one_ptid, null_ptid): Declare.
12736 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12737 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12738 (struct inferior_list_entry): Change `id' type from unsigned from
12739 to ptid_t.
12740 (struct sym_cache, struct breakpoint, struct
12741 process_info_private): Forward declare.
12742 (struct process_info): Declare.
12743 (current_process): Declare.
12744 (all_processes): Declare.
12745 (initialize_inferiors): Declare.
12746 (add_thread): Adjust to use ptid_t.
12747 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12748 (add_process, remove_process, find_thread_pid): Declare.
12749 (find_inferior_id): Adjust to use ptid_t.
12750 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12751 (multi_process): Declare.
12752 (push_event): Adjust to use ptid_t.
12753 (read_ptid, write_ptid): Declare.
12754 (prepare_resume_reply): Adjust to use ptid_t.
12755 (clear_symbol_cache): Declare.
12756 * inferiors.c (all_processes): New.
12757 (null_ptid, minus_one_ptid): New.
12758 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12759 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12760 (add_thread): Change unsigned long to ptid. Remove gdb_id
12761 parameter. Adjust.
12762 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12763 (gdb_id_to_thread): Rename to ...
12764 (find_thread_pid): ... this. Change unsigned long to ptid.
12765 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12766 (loaded_dll, pull_pid_from_list): Adjust.
12767 (add_process, remove_process, find_process_pid)
12768 (get_thread_process, current_process, initialize_inferiors): New.
12769 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12770 (struct target_waitstatus) <related_pid>: Ditto.
12771 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12772 return type to int.
12773 (struct target_ops) <join>: Add `pid' argument.
12774 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12775 (struct target_ops) <wait>: Add `ptid' field. Change return type
12776 to ptid.
12777 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12778 (mywait): Add `ptid' argument. Change return type to ptid_t.
12779 (target_pid_to_str): Declare.
12780 * target.c (set_desired_inferior): Adjust to use ptids.
12781 (mywait): Add new `ptid' argument. Adjust.
12782 (target_pid_to_str): New.
12783 * mem-break.h (free_all_breakpoints): Declare.
12784 * mem-break.c (breakpoints): Delelete.
12785 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12786 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12787 to use per-process breakpoint list.
12788 (free_all_breakpoints): New.
12789 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12790 (symbol_cache, all_symbols_looked_up): Delete.
12791 (hexchars): New.
12792 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12793 read_ptid): New.
12794 (prepare_resume_reply): Change ptid argument's type from unsigned
12795 long to ptid_t. Adjust. Implement W;process and X;process.
12796 (free_sym_cache, clear_symbol_cache): New.
12797 (look_up_one_symbol): Adjust to per-process symbol cache. *
12798 * server.c (cont_thread, general_thread, step_thread): Change type
12799 to ptid_t.
12800 (attached): Delete.
12801 (multi_process): New.
12802 (last_ptid): Change type to ptid_t.
12803 (struct vstop_notif) <ptid>: Change type to ptid_t.
12804 (queue_stop_reply, push_event): Change `ptid' argument's type to
12805 ptid_t.
12806 (discard_queued_stop_replies): Add `pid' argument.
12807 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12808 changes. Don't reference the `attached' global.
12809 (attach_inferior): Adjust to mywait interface changes.
12810 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12811 features. Handle and report "multiprocess+". Handle
12812 "qAttached:PID".
12813 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12814 changes.
12815 (handle_v_kill): New.
12816 (handle_v_stopped): Adjust to use target_pid_to_str.
12817 (handle_v_requests): Allow multiple attaches and runs when
12818 multiprocess extensions are in effect. Handle "vKill".
12819 (myresume): Adjust to use ptids.
12820 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12821 (handle_status): Adjust to discard_queued_stop_replies interface
12822 change.
12823 (first_thread_of, kill_inferior_callback)
12824 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12825 (main): Call initialize_inferiors. Adjust to use ptids, killing
12826 and detaching from all inferiors. Handle multiprocess packet
12827 variants.
12828 * linux-low.h: Include gdb_proc_service.h.
12829 (struct process_info_private): New.
12830 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12831 <lwpid_of>: Use ptid_get_lwp.
12832 (get_lwp_thread): Adjust.
12833 (struct lwp_info): Add `dead' member.
12834 (find_lwp_pid): Declare.
12835 * linux-low.c (thread_db_active): Delete.
12836 (new_inferior): Adjust comment.
12837 (inferior_pid): Delete.
12838 (linux_add_process): New.
12839 (handle_extended_wait): Adjust.
12840 (add_lwp): Change unsigned long to ptid.
12841 (linux_create_inferior): Add process to processes table. Adjust
12842 to use ptids. Don't set new_inferior here.
12843 (linux_attach_lwp): Rename to ...
12844 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12845 it. Adjust to use ptids.
12846 (linux_attach_lwp): New.
12847 (linux_attach): Add process to processes table. Don't set
12848 new_inferior here.
12849 (struct counter): New.
12850 (second_thread_of_pid_p, last_thread_of_process_p): New.
12851 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12852 multiple processes.
12853 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12854 processes. Remove process from process table.
12855 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12856 to multiple processes.
12857 (any_thread_of): New.
12858 (linux_detach): Add `pid' argument, and handle it. Remove process
12859 from processes table.
12860 (linux_join): Add `pid' argument. Handle it.
12861 (linux_thread_alive): Change unsighed long argument to ptid_t.
12862 Consider dead lwps as not being alive.
12863 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12864 threads we're not interested in.
12865 (same_lwp, find_lwp_pid): New.
12866 (linux_wait_for_lwp): Change `pid' argument's type from int to
12867 ptid_t. Adjust.
12868 (linux_wait_for_event): Rename to ...
12869 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12870 from int to ptid_t. Adjust.
12871 (linux_wait_for_event): New.
12872 (linux_wait_1): Add `ptid' argument. Change return type to
12873 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12874 that exit from the process table.
12875 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12876 Adjust.
12877 (mark_lwp_dead): New.
12878 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12879 stopping all threads, mark its main lwp as dead.
12880 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12881 ptids.
12882 (fetch_register, usr_store_inferior_registers)
12883 (regsets_fetch_inferior_registers)
12884 (regsets_store_inferior_registers, linux_read_memory)
12885 (linux_write_memory): Inline `inferior_pid'.
12886 (linux_look_up_symbols): Adjust to use per-process
12887 `thread_db_active'.
12888 (linux_request_interrupt): Adjust to use ptids.
12889 (linux_read_auxv): Inline `inferior_pid'.
12890 (initialize_low): Don't reference thread_db_active.
12891 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12892 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12893 (ps_getpid): Return the pid of the current inferior.
12894 * thread-db.c (proc_handle, thread_agent): Delete.
12895 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12896 per-process data.
12897 (find_one_thread): Change argument type to ptid_t. Adjust to
12898 per-process data.
12899 (maybe_attach_thread): Adjust to per-process data and ptids.
12900 (thread_db_find_new_threads): Ditto.
12901 (thread_db_init): Ditto.
12902 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12903 processes table. Adjust to use ptids.
12904 (spu_kill, spu_detach): Adjust interface. Remove process from
12905 processes table.
12906 (spu_join, spu_thread_alive): Adjust interface.
12907 (spu_wait): Adjust interface. Remove process from processes
12908 table. Adjust to use ptids.
12909 * win32-low.c (current_inferior_tid): Delete.
12910 (current_inferior_ptid): New.
12911 (debug_event_ptid): New.
12912 (thread_rec): Take a ptid. Adjust.
12913 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12914 (child_delete_thread): Ditto.
12915 (do_initial_child_stuff): Add `attached' argument. Add process to
12916 processes table.
12917 (child_fetch_inferior_registers, child_store_inferior_registers):
12918 Adjust.
12919 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12920 (win32_attach): Pass 1 to do_initial_child_stuff.
12921 (win32_kill): Adjust interface. Remove process from processes
12922 table.
12923 (win32_detach): Ditto.
12924 (win32_join): Adjust interface.
12925 (win32_thread_alive): Take a ptid.
12926 (win32_resume): Adjust to use ptids.
12927 (get_child_debug_event): Ditto.
12928 (win32_wait): Adjust interface. Remove exiting process from
12929 processes table.
12930
bd99dc85
PA
129312009-04-01 Pedro Alves <pedro@codesourcery.com>
12932
12933 Non-stop mode support.
12934
12935 * server.h (non_stop): Declare.
12936 (gdb_client_data, handler_func): Declare.
12937 (delete_file_handler, add_file_handler, start_event_loop):
12938 Declare.
12939 (handle_serial_event, handle_target_event, push_event)
12940 (putpkt_notif): Declare.
12941 * target.h (enum resume_kind): New.
12942 (struct thread_resume): Replace `step' field by `kind' field.
12943 (TARGET_WNOHANG): Define.
12944 (struct target_ops) <wait>: Add `options' argument.
12945 <supports_non_stop, async, start_non_stop>: New fields.
12946 (target_supports_non_stop, target_async): New.
12947 (start_non_stop): Declare.
12948 (mywait): Add `options' argument.
12949 * target.c (mywait): Add `options' argument. Print child exit
12950 notifications here.
12951 (start_non_stop): New.
12952 * server.c (non_stop, own_buf, mem_buf): New globals.
12953 (struct vstop_notif): New.
12954 (notif_queue): New global.
12955 (queue_stop_reply, push_event, discard_queued_stop_replies)
12956 (send_next_stop_reply): New.
12957 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12958 interface changes.
12959 (attach_inferior): In non-stop mode, don't wait for the target
12960 here.
12961 (handle_general_set): Handle QNonStop.
12962 (handle_query): When handling qC, return the current general
12963 thread, instead of the first thread of the list.
12964 (handle_query): If the backend supports non-stop mode, include
12965 QNonStop+ in the qSupported query response.
12966 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12967 and non-stop mode.
12968 (handle_v_attach, handle_v_run): Handle non-stop mode.
12969 (handle_v_stopped): New.
12970 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12971 (myresume): Adjust to use resume_kind. Handle non-stop.
12972 (queue_stop_reply_callback): New.
12973 (handle_status): Handle non-stop mode.
12974 (main): Clear non_stop flag on reconnection. Use the event-loop.
12975 Refactor serial protocol handling from here ...
12976 (process_serial_event): ... to this new function. When GDB
12977 selects any thread, select one here. In non-stop mode, wait until
12978 GDB acks all pending events before exiting.
12979 (handle_serial_event, handle_target_event): New.
12980 * remote-utils.c (remote_open): Install remote_desc in the event
12981 loop.
12982 (remote_close): Remove remote_desc from the event loop.
12983 (putpkt_binary): Rename to...
12984 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12985 (putpkt_binary): New as wrapper around putpkt_binary_1.
12986 (putpkt_notif): New.
12987 (prepare_resume_reply): In non-stop mode, don't change the
12988 general_thread.
12989 * event-loop.c: New.
12990 * Makefile.in (OBJ): Add event-loop.o.
12991 (event-loop.o): New rule.
12992
12993 * linux-low.h (pid_of): Moved here.
12994 (lwpid_of): New.
12995 (get_lwp_thread): Use lwpid_of.
12996 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12997 * linux-low.c (pid_of): Delete.
12998 (inferior_pid): Use lwpid_of.
12999 (linux_event_pipe): New.
13000 (target_is_async_p): New.
13001 (delete_lwp): New.
13002 (handle_extended_wait): Use lwpid_of.
13003 (add_lwp): Don't set lwpid field.
13004 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13005 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13006 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13007 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13008 first. Adjust to linux_wait_for_event interface changes. Use
13009 lwpid_of.
13010 (linux_detach): Don't delete the main lwp here.
13011 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13012 (status_pending_p): Don't consider explicitly suspended lwps.
13013 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13014 pointer. Add OPTIONS argument. Change return type to int. Use
13015 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13016 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13017 pointer. Add status pointer argument. Return a pid instead of a
13018 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13019 changes. In non-stop mode, don't switch to a random thread.
13020 (linux_wait): Rename to...
13021 (linux_wait_1): ... this. Add target_options argument, and handle
13022 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13023 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13024 clean exit and signal exit code. Don't stop all threads in
13025 non-stop mode. In all-stop mode, only stop all threads when
13026 reporting a stop to GDB. Handle explicit thread stop requests.
13027 (async_file_flush, async_file_mark): New.
13028 (linux_wait): New.
13029 (send_sigstop): Use lwpid_of.
13030 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13031 interface changes. In non-stop mode, don't switch to a random
13032 thread.
13033 (linux_resume_one_lwp): Use lwpid_of.
13034 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13035 (linux_resume_one_thread): ... this. Handle resume_stop. In
13036 non-stop mode, don't look for pending flag in all threads.
13037 (resume_status_pending_p): Don't consider explicitly suspended
13038 threads.
13039 (my_waitpid): Reimplement. Emulate __WALL.
13040 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13041 Use lwpid_of.
13042 (sigchld_handler, linux_supports_non_stop, linux_async)
13043 (linux_start_non_stop): New.
13044 (linux_target_ops): Register linux_supports_non_stop, linux_async
13045 and linux_start_non_stop.
13046 (initialize_low): Install SIGCHLD handler.
13047 * thread-db.c (thread_db_create_event, find_one_thread)
13048 (thread_db_get_tls_address): Use lwpid_of.
13049 * win32-low.c (win32_detach): Adjust to use resume_kind.
13050 (win32_wait): Add `options' argument.
13051 * spu-low.c (spu_resume): Adjust to use resume_kind.
13052 (spu_wait): Add `options' argument.
13053
5b1c542e
PA
130542009-04-01 Pedro Alves <pedro@codesourcery.com>
13055
13056 Decouple target code from remote protocol.
13057
13058 * target.h (enum target_waitkind): New.
13059 (struct target_waitstatus): New.
13060 (struct target_ops) <wait>: Return an unsigned long. Take a
13061 target_waitstatus pointer instead of a char pointer.
13062 (mywait): Likewise.
13063 * target.c (mywait): Change prototype to return an unsigned long.
13064 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13065 * server.h (thread_from_wait, old_thread_from_wait): Delete
13066 declarations.
13067 (prepare_resume_reply): Change prototype to take a
13068 target_waitstatus.
13069 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13070 (last_status, last_ptid): New.
13071 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13072 pid instead of a signal.
13073 (attach_inferior): Remove "status" and "signal" parameters.
13074 Adjust.
13075 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13076 not as an address.
13077 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13078 (handle_v_requests, myresume): Remove "status" and "signal"
13079 parameters. Adjust.
13080 (handle_status): New.
13081 (main): Delete local `status'. Adjust.
13082 * remote-utils.c: Include target.h.
13083 (prepare_resume_reply): Change prototype to take a
13084 target_waitstatus. Adjust.
13085
13086 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13087 interface.
13088 * spu-low.c (spu_wait): Adjust.
13089 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13090 Delete.
13091 (win32_wait): Adjust.
13092
2bd7c093
PA
130932009-04-01 Pedro Alves <pedro@codesourcery.com>
13094
13095 * target.h (struct thread_resume): Delete leave_stopped member.
13096 (struct target_ops): Add a `n' argument to the `resume' callback.
13097 * server.c (start_inferior): Adjust.
13098 (handle_v_cont, myresume): Adjust.
13099 * linux-low.c (check_removed_breakpoint): Adjust to resume
13100 interface change, and to removed leave_stopped field.
13101 (resume_ptr): Delete.
13102 (struct thread_resume_array): New.
13103 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13104 resume interface change.
13105 (linux_continue_one_thread, linux_queue_one_thread)
13106 (resume_status_pending_p): Check if the resume field is NULL
13107 instead of checking the leave_stopped member.
13108 (linux_resume): Adjust to the target resume interface change.
13109 * spu-low.c (spu_resume): Adjust to the target resume interface
13110 change.
13111 * win32-low.c (win32_detach, win32_resume): Ditto.
13112
c35fafde
PA
131132009-04-01 Pedro Alves <pedro@codesourcery.com>
13114
13115 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13116 flag.
13117 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13118 pending.
13119 (linux_continue_one_thread): Only preserve the stepping flag if
13120 there's a pending breakpoint.
13121
0a59d50b
PA
131222009-03-31 Pedro Alves <pedro@codesourcery.com>
13123
13124 * server.c (main): After the inferior having exited, call
13125 remote_close before exiting gdbserver.
13126
f04c6d38
TJB
131272009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13128
13129 Fix size of FPSCR in Power 7 processors.
13130 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13131 (PPC_FEATURE_HAS_DFP): New #define.
13132 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13133 size of the FPSCR.
13134
78e5cee6
PA
131352009-03-23 Pedro Alves <pedro@codesourcery.com>
13136
13137 * server.c (handle_query) Whitespace and formatting.
13138
1b3f6016
PA
131392009-03-22 Pedro Alves <pedro@codesourcery.com>
13140
13141 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13142 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13143 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13144 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13145 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13146 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13147 Makefile.in, configure.ac: Fix whitespace throughout.
13148 * configure: Regenerate.
13149
a07b2135
PA
131502009-03-22 Pedro Alves <pedro@codesourcery.com>
13151
13152 * inferiors.c (find_inferior): Make it safe for the callback
13153 function to delete the currently iterated inferior.
13154
67cc2626
PA
131552009-03-22 Pedro Alves <pedro@codesourcery.com>
13156
13157 * Makefile.in (linuw_low_h): Move higher.
13158 (thread-db.o): Depend on $(linux_low_h).
13159
54a0b537
PA
131602009-03-17 Pedro Alves <pedro@codesourcery.com>
13161
13162 Rename "process" to "lwp" throughout.
13163
13164 * linux-low.c (all_processes): Rename to...
13165 (all_lwps): ... this.
13166 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13167 (add_process): Rename to ...
13168 (add_lwp): ... this. Adjust.
13169 (linux_create_inferior): Adjust.
13170 (linux_attach_lwp): Adjust.
13171 (linux_attach): Adjust.
13172 (linux_kill_one_process): Rename to ...
13173 (linux_kill_one_lwp): ... this. Adjust.
13174 (linux_kill): Adjust.
13175 (linux_detach_one_process): Rename to ...
13176 (linux_detach_one_lwp): ... this. Adjust.
13177 (linux_detach): Adjust.
13178 (check_removed_breakpoint): Adjust.
13179 (status_pending_p): Adjust.
13180 (linux_wait_for_process): Rename to ...
13181 (linux_wait_for_lwp): ... this. Adjust.
13182 (linux_wait_for_event): Adjust.
13183 (send_sigstop): Adjust.
13184 (wait_for_sigstop): Adjust.
13185 (stop_all_processes): Rename to ...
13186 (stop_all_lwps): ... this.
13187 (linux_resume_one_process): Rename to ...
13188 (linux_resume_one_lwp): ... this. Adjust.
13189 (linux_set_resume_request, linux_continue_one_thread)
13190 (linux_queue_one_thread, resume_status_pending_p)
13191 (usr_store_inferior_registers, regsets_store_inferior_registers)
13192 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13193 Adjust.
13194 * linux-low.h (get_process): Rename to ...
13195 (get_lwp): ... this. Adjust.
13196 (get_thread_process): Rename to ...
13197 (get_thread_lwp): ... this. Adjust.
13198 (get_process_thread): Rename to ...
13199 (get_lwp_thread): ... this. Adjust.
13200 (struct process_info): Rename to ...
13201 (struct lwp_info): ... this.
13202 (all_processes): Rename to ...
13203 (all_lwps): ... this.
13204 * proc-service.c (ps_lgetregs): Adjust.
13205 * thread-db.c (thread_db_create_event, find_one_thread)
13206 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13207
0b16c5cf
PA
132082009-03-14 Pedro Alves <pedro@codesourcery.com>
13209
13210 * server.c (handle_query): Handle "qAttached".
13211
32de4b9d
NS
132122009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13213
13214 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13215 GPLv3, update license URL.
13216
2aecd87f
DE
132172009-03-01 Doug Evans <dje@google.com>
13218
93efd302 13219 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
13220 (server_h): Add gdb_signals.h.
13221 (signals.o): Update.
13222 * server.h (target_signal_from_host,target_signal_to_host_p)
13223 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13224
86b1f9c5
PM
132252009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13226
13227 * remote-utils.c (getpkt): Also generate remote-debug
13228 information if noack_mode is set.
13229
4aa995e1
PA
132302009-02-06 Pedro Alves <pedro@codesourcery.com>
13231
13232 * server.c (handle_query): Report qXfer:siginfo:read and
13233 qXfer:siginfo:write as supported and handle them.
13234 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13235 * linux-low.c (linux_xfer_siginfo): New.
13236 (linux_target_ops): Set it.
13237
62709adf
PA
132382009-01-26 Pedro Alves <pedro@codesourcery.com>
13239
13240 * server.c (gdbserver_usage): Mention --remote-debug.
13241 (main): Accept '--remote-debug' switch.
13242
aef93bd7
DE
132432009-01-18 Doug Evans <dje@google.com>
13244
13245 * regcache.c (new_register_cache): No need to check result of xcalloc.
13246 * server.c (handle_search_memory): Back out calls to xmalloc,
13247 result is checked and error is returned to user upon failure.
13248 (handle_query): Ditto. Add more checks for result of malloc.
13249 (handle_v_cont): Check result of malloc, report error back to
13250 user upon failure.
13251 (handle_v_run): Ditto. Call freeargv.
13252 * server.h (freeargv): Declare.
13253 * utils.c (freeargv): New fn.
13254
54363045
DE
132552009-01-15 Doug Evans <dje@google.com>
13256
f626972c
DE
13257 * gdbreplay.c (perror_with_name): Make arg const char *.
13258 * server.h (target_signal_to_name): Make return type const char *.
0842e787 13259 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 13260 * utils.c (perror_with_name): Make arg const char *.
54363045 13261
18aae699
PA
132622009-01-14 Pedro Alves <pedro@codesourcery.com>
13263
13264 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13265 when handling a EXIT_PROCESS_DEBUG_EVENT.
13266
ff703abe
JB
132672009-01-06 Joel Brobecker <brobecker@adacore.com>
13268
13269 * gdbreplay.c (gdbreplay_version): Update copyright year.
13270 * server.c (gdbserver_version): Likewise.
13271
f21cc1a2 132722009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
13273
13274 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 13275 (handle_extended_wait): Improve comment.
0e21c1ec 13276
bca929d3
DE
132772008-12-13 Doug Evans <dje@google.com>
13278
13279 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13280 * server.h (ATTR_MALLOC): New macro.
13281 (xmalloc,xcalloc,xstrdup): Declare.
13282 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13283 * inferiors.c: Ditto.
13284 * linux-low.c: Ditto.
13285 * mem-break.c: Ditto.
13286 * regcache.c: Ditto.
13287 * remote-utils.c: Ditto.
13288 * server.c: Ditto.
13289 * target.c: Ditto.
13290 * win32-low.c: Ditto.
13291
97438e3f
DE
132922008-12-12 Doug Evans <dje@google.com>
13293
896c7fbb
DE
13294 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13295 in debugging printf.
13296
97438e3f
DE
13297 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13298
e3b886f8
DE
132992008-12-09 Doug Evans <dje@google.com>
13300
13301 * linux-low.h (struct process_info): Delete member tid, unused.
13302 * thread-db.c (find_one_thread): Update.
13303 (maybe_attach_thread): Update.
13304
07e059b5
VP
133052008-12-02 Pedro Alves <pedro@codesourcery.com>
13306
889bf7c5
PA
13307 * target.h (struct target_ops): Add qxfer_osdata member.
13308 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13309 and dirent.h.
13310 (linux_qxfer_osdata): New functions.
13311 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13312 callback.
13313 * server.c (handle_query): Handle "qXfer:osdata:read:".
13314 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13315 (buffer_xml_printf): New functions.
13316 * server.h (struct buffer): New.
13317 (buffer_grow_str, buffer_grow_str0): New macros.
13318 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13319 (buffer_xml_printf): Declare.
07e059b5 13320
4cab47ab
DE
133212008-11-24 Doug Evans <dje@google.com>
13322
13323 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13324
f142445f
DJ
133252008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13326
13327 * server.c (handle_v_run): Always use the supplied argument list.
13328
d0107bb6 133292008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 13330
d0107bb6
BW
13331 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13332 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 13333
2c4ad781
TJB
133342008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13335
13336 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13337 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13338 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13339 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13340 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13341 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13342 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13343 XML target descriptions.
13344 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13345 when inferior is running on an ISA 2.05 or later processor. Add
13346 special case to return offset for full 64-bit slot of FPSCR when
13347 in 32-bits.
13348
dfb64f85
DJ
133492008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13350
13351 * Makefile.in (SFILES, clean): Added sparc64 files.
13352 (reg-sparc64.o, reg-sparc64.c): New.
13353 * configure.srv (sparc*-*-linux*): New configuration.
13354 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13355 syscall arguments for SPARC.
13356 (regsets_store_inferior_registers): Likewise.
13357 * linux-sparc-low.c: New file.
13358
66b6e1dd
DE
133592008-10-21 Doug Evans <dje@google.com>
13360
13361 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13362 (READLINE_DIR,READLINE_DEP): Delete.
13363 (INTERNAL_CFLAGS): Update.
13364 (LINTFLAGS): Update.
13365
9b710a42
PA
133662008-10-10 Pedro Alves <pedro@codesourcery.com>
13367
13368 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13369 whole argv from the last run, not just argv[0].
13370
5822d809
PA
133712008-09-08 Pedro Alves <pedro@codesourcery.com>
13372
13373 * regcache.c (new_register_cache): Return NULL if the register
13374 cache size isn't known yet.
13375 (free_register_cache): Avoid dereferencing a NULL regcache.
13376
74aac56f
DJ
133772008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13378
13379 * configure.srv: Merge MIPS and MIPS64.
13380
400b20f5
MR
133812008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13382
13383 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13384
677c5bb1
LM
133852008-08-18 Luis Machado <luisgpm@br.ibm.com>
13386
13387 * Makefile.in: Add required vsx dependencies.
13388
13389 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13390 Declare init_registers_powerpc_vsx32l.
13391 Declare init_registers_powerpc_vsx64l.
13392 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13393 (ppc_arch_setup): Check for VSX in hwcap.
13394 (ppc_fill_vsxregset): New function.
13395 (ppc_store_vsxregset): New function.
13396 Add new VSX entry in regset_info target_regsets.
13397
13398 * configure.srv: Add new VSX dependencies.
13399
a6f3e723
SL
134002008-08-12 Pedro Alves <pedro@codesourcery.com>
13401
13402 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13403 (remote_open): Set or clear transport_is_reliable.
13404 (putpkt_binary): Don't expect acks in noack mode.
13405 (getpkt): Don't send ack/nac in noack mode.
13406 * server.c (handle_general_set): Handle QStartNoAckMode.
13407 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13408 qSupported.
13409 (main): Reset noack_mode on every connection.
13410 * server.h (noack_mode): Declare.
13411
a417dc56
RW
134122008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13413
13414 * Makefile.in (GDBREPLAY_OBS): New variable.
13415 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13416
3221518c
UW
134172008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13418 Daniel Jacobowitz <dan@codesourcery.com>
13419
13420 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13421 (usr_store_inferior_registers): Likewise.
13422 (regsets_store_inferior_registers): Likewise.
13423
ec56be1b
PA
134242008-07-31 Rolf Jansen <rj@surtec.com>
13425 Pedro Alves <pedro@codesourcery.com>
13426
13427 * configure.ac: Check for memmem declaration.
13428 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13429 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13430 (disable_packet_qfThreadInfo): Unconditionally compile.
13431 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13432 * configure, config.in: Regenerate.
13433
2fe5e3ff
DE
134342008-07-28 Doug Kwan <dougkwan@google.com>
13435
13436 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13437 (linux_write_memory): Remove declaration of errno.
13438
836acd6d
UW
134392008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13440
13441 * linux-low.c (handle_extended_wait): Do not use "status"
13442 variable uninitialized.
13443
aeba519e
PA
134442008-07-07 Pedro Alves <pedro@codesourcery.com>
13445
13446 * server.c (handle_v_attach): Inhibit reporting dll changes.
13447
db42f210
PA
134482008-06-27 Pedro Alves <pedro@codesourcery.com>
13449
13450 * remote-utils.c (prepare_resume_reply): If requested, don't
13451 output "thread:TID" in the T stop reply.
13452
13453 * server.c (disable_packet_vCont, disable_packet_Tthread)
13454 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13455 (handle_query): If requested, disable support for qC, qfThreadInfo
13456 and qsThreadInfo.
13457 (handle_v_requests): If requested, disable support for vCont.
13458 (gdbserver_show_disableable): New.
13459 (main): Handle --disable-packet and --disable-packet=LIST.
13460
13461 * server.h (disable_packet_vCont, disable_packet_Tthread)
13462 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13463
8e4c5421
CD
134642008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13465
13466 * server.c (gdbserver_usage): Mention --version.
13467
6e23a804
DJ
134682008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13469
13470 * Makefile.in (gdbreplay.o): New rule.
13471
90aa6a40
JM
134722008-06-06 Joseph Myers <joseph@codesourcery.com>
13473
13474 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13475 message, not gdbserver.
13476
c16158bc 134772008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
13478 Nathan Sidwell <nathan@codesourcery.com>
13479 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
13480
13481 * acinclude.m4: Include ../../config/acx.m4.
13482 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13483 * configure, config.in: Regenerate.
13484 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13485 * server.c (gdbserver_version): Print PKGVERSION.
13486 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13487 (main): Adjust gdbserver_usage calls.
13488 * gdbreplay.c (version, host_name): Add declarations.
13489 (gdbreplay_version, gdbreplay_usage): New.
13490 (main): Accept --version and --help options.
13491
aeb75bf5
DJ
134922008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13493
13494 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13495 (arm_breakpoint_at): Handle Thumb.
13496 (the_low_target): Add comment.
13497
76b233dd
UW
134982008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13499
13500 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13501
08388c79
DE
135022008-05-09 Doug Evans <dje@google.com>
13503
a3c83fae
DE
13504 * server.h (decode_search_memory_packet): Declare.
13505 * remote-utils.c (decode_search_memory_packet): New fn.
13506 * server.c (handle_search_memory_1): New fn.
08388c79
DE
13507 (handle_search_memory): New fn.
13508 (handle_query): Process qSearch:memory packets.
13509
bb9c3d36
UW
135102008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13511
13512 * regcache.c (registers_length): Remove.
13513 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13514 full register packet.
13515 * regcache.h (registers_length): Remove prototype.
13516 * server.h (PBUFSIZ): Define to 16384.
13517
7284e1be
UW
135182008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13519
13520 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13521 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13522 powerpc-64l.o, and powerpc-altivec64l.o.
13523 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13524 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13525 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13526 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13527 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13528 to srv_xmlfiles.
13529
13530 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13531 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13532 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13533 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13534 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13535 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13536 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13537 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13538 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13539 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13540 (clean): Update.
13541
13542 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13543 (init_registers_powerpc_32l): ... this new prototype.
13544 (init_registers_powerpc_32): Remove, replace by ...
13545 (init_registers_powerpc_altivec32l): ... this new prototype.
13546 (init_registers_powerpc_e500): Remove, replace by ...
13547 (init_registers_powerpc_e500l): ... this new prototype.
13548 (init_registers_ppc64): Remove, replace by ...
13549 (init_registers_powerpc_64l): ... this new prototype.
13550 (init_registers_powerpc_64): Remove, replace by ...
13551 (init_registers_powerpc_altivec64l): ... this new prototype.
13552 (ppc_num_regs): Set to 73.
13553 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13554 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13555 (ppc_cannot_store_register): Handle orig_r3 and trap.
13556 (ppc_arch_setup): Update init_registers_... calls.
13557 (ppc_fill_gregset): Handle orig_r3 and trap.
13558
13559 * inferiors.c (clear_inferiors): Reset current_inferior.
13560
fdc59709
PB
135612008-04-23 Paolo Bonzini <bonzini@gnu.org>
13562
889bf7c5
PA
13563 * acinclude.m4: Add override.m4.
13564 * configure: Regenerate.
fdc59709 13565
c9b2f845
UW
135662008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13567
13568 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13569 initial call to init_register_ppc64.
13570
550512b8
UW
135712008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13572
43aaf8b6
PA
13573 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13574 single powerpc*-*-linux* case.
550512b8
UW
13575 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13576
b6430ec3
UW
135772008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13578
13579 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 13580 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
13581 from reg_xmlfiles.
13582 * linux-ppc-low.c: Include <elf.h>.
13583 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13584 (ppc_hwcap): New global variable.
13585 (ppc_regmap): Remove __SPE__ #ifdef sections.
13586 (ppc_regmap_e500): New global variable.
13587 (ppc_cannot_store_register): Update __SPE__ special case.
13588 (ppc_get_hwcap): New function.
13589 (ppc_arch_setup): Use it to determine whether inferior supports
13590 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13591 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13592 Do not access registers if target does not support AltiVec.
13593 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13594 Do not access registers if target does not support SPE.
13595 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13596
52fa2412
UW
135972008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13598
13599 * linux-low.c (disabled_regsets, num_regsets): New.
13600 (use_regsets_p): Delete.
13601 (linux_wait_for_process): Clear disabled_regsets.
13602 (regsets_fetch_inferior_registers): Check and set it.
13603 (regsets_store_inferior_registers): Likewise.
13604 (linux_fetch_registers, linux_store_registers): Do not use
13605 use_regsets_p.
13606 (initialize_low): Allocate disabled_regsets.
13607
e28b3332
DJ
136082008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13609
13610 * Makefile.in (LIBOBJS): New.
13611 (OBS): Use LIBOBJS.
13612 (memmem.o): New rule.
13613 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13614 * configure: Regenerated.
13615
4536995d
UW
136162008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13617
13618 * server.c (handle_query): Never return "unsupported" for
13619 qXfer:features:read queries.
13620
221c031f
UW
136212008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13622
13623 * server.c (get_features_xml): Fix inverted condition.
13624 (handle_query): Always support qXfer:feature:read.
13625
ccd213ac
DJ
136262008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13627
13628 * server.c (wrapper_argv): New.
13629 (start_inferior): Handle wrapper_argv. If set, expect an extra
13630 trap.
13631 (gdbserver_usage): Document --wrapper.
13632 (main): Parse --wrapper.
13633
6fe305f7
UW
136342008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13635
13636 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13637 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13638 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13639 (ppc_set_pc): Likewise.
13640 (ppc_arch_setup): New function.
13641 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13642 of collect_register.
889bf7c5 13643 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 13644
5b0a002e
UW
136452008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13646
13647 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13648 instead of linux-ppc64-low.o.
13649 * linux-ppc64-low.c: Remove file.
13650 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13651 (linux-ppc64-low.o): Remove rule.
13652
13653 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13654 (init_registers_powerpc_64): Likewise.
13655 (ppc_regmap): Conditionally define depending on __powerpc64__.
13656 (ppc_cannot_store_register): Do not special-case "fpscr" when
13657 compiled on __powerpc64__.
13658 (ppc_collect_ptrace_register): New function.
13659 (ppc_supply_ptrace_register): New function.
13660 (ppc_breakpoint): Change type to "unsigned int".
13661 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13662 (the_low_target): Conditionally provide initializers for the
889bf7c5 13663 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
13664 collect_ptrace_register and supply_ptrace_register members.
13665
9b4b61c8
UW
136662008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13667
13668 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13669 * server.c (gdbserver_xmltarget): Define.
13670 (get_features_xml): Use it to replace "target.xml" and arch_string.
13671
13672 * configure.srv: Remove srv_xmltarget. Add XML files that were
13673 mentioned there to srv_xmlfiles instead. Remove conditional tests
13674 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13675 srv_xmlfiles and srv_regobj to include all possible choices.
13676 * configure.ac (srv_xmltarget): Remove.
13677 (srv_xmlfiles): Do not add "target.xml".
13678 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13679 checks for supplementary target information.
13680 * configure: Regenerate.
13681 * Makefile.in (XML_TARGET): Remove.
13682 (target.xml): Remove rule.
13683 (clean): Do not clean up target.xml.
13684 (.PRECIOUS): Do not mention target.xml.
13685
13686 * target.h (struct target_ops): Remove arch_string member.
13687 * linux-low.c (linux_arch_string): Remove.
13688 (linux_target_ops): Remove arch_string initializer.
13689 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13690 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13691 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13692 * spu-low.c (spu_arch_string): Remove.
13693 (spu_target_ops): Remove arch_string initializer.
13694 * win32-low.c (win32_arch_string): Remove.
13695 (win32_target_ops): Remove arch_string initializer.
13696 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13697 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13698 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13699
ee1a7ae4
UW
137002008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13701
13702 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13703 by collect_ptrace_register and supply_ptrace_register hooks.
13704 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13705 instead of checking for the_low_target.left_pad_xfer.
13706 (usr_store_inferior_registers): Use collect_ptrace_register callback
13707 instead of checking for the_low_target.left_pad_xfer.
13708
13709 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13710 (s390_supply_ptrace_register): Likewise.
13711 (s390_fill_gregset): Call s390_collect_ptrace_register.
13712 (the_low_target): Update.
13713
13714 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13715 (ppc_supply_ptrace_register): Likewise.
13716 (the_low_target): Update.
13717
13718 * linux-i386-low.c (the_low_target): Update.
13719 * linux-x86-64-low.c (the_low_target): Update.
13720
d61ddec4
UW
137212008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13722
13723 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13724 reg-s390.o and reg-s390x.o.
13725
13726 * linux-low.c (new_inferior): New global variable.
13727 (linux_create_inferior, linux_attach): Set it.
13728 (linux_wait_for_process): Call the_low_target.arch_setup after the
13729 target has stopped for the first time.
13730 (initialize_low): Do not call the_low_target.arch_setup.
13731
13732 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13733 (s390_set_pc): Likewise.
13734 (s390_arch_setup): New function.
13735 (the_low_target): Use s390_arch_setup as arch_setup routine.
13736
13737 * regcache.c (realloc_register_cache): New function.
13738 (set_register_cache): Call it for each existing regcache.
13739
d05b4ac3
UW
137402008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13741
13742 * server.h (init_registers): Remove prototype.
13743
13744 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13745 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13746 instead of init_registers ().
13747 * linux-arm-low.c (init_registers_arm): Add prototype.
13748 (init_registers_arm_with_iwmmxt): Likewise.
13749 (the_low_target): Add initializer for arch_setup field.
13750 * linux-cris-low.c (init_registers_cris): Add prototype.
13751 (the_low_target): Add initializer for arch_setup field.
13752 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13753 (the_low_target): Add initializer for arch_setup field.
13754 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13755 (the_low_target): Add initializer for arch_setup field.
13756 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13757 (the_low_target): Add initializer for arch_setup field.
13758 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13759 (the_low_target): Add initializer for arch_setup field.
13760 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13761 (the_low_target): Add initializer for arch_setup field.
13762 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13763 (init_registers_mips64_linux): Likewise.
13764 (the_low_target): Add initializer for arch_setup field.
13765 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13766 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13767 (the_low_target): Add initializer for arch_setup field.
13768 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13769 (init_registers_powerpc_64): Likewise.
13770 (the_low_target): Add initializer for arch_setup field.
13771 * linux-s390-low.c (init_registers_s390): Add prototype.
13772 (init_registers_s390x): Likewise.
13773 (the_low_target): Add initializer for arch_setup field.
13774 * linux-sh-low.c (init_registers_sh): Add prototype.
13775 (the_low_target): Add initializer for arch_setup field.
13776 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13777 (the_low_target): Add initializer for arch_setup field.
13778 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13779 (the_low_target): Add initializer for arch_setup field.
13780
13781 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13782 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13783 instead of init_registers ().
13784 * win32-arm-low.c (init_registers_arm): Add prototype.
13785 (the_low_target): Add initializer for arch_setup field.
13786 * win32-i386-low.c (init_registers_i386): Add prototype.
13787 (the_low_target): Add initializer for arch_setup field.
13788
13789 * spu-low.c (init_registers_spu): Add prototype.
13790 (initialize_low): Call initialie_registers_spu () instead of
13791 initialize_registers ().
13792
fd96d250
PA
137932008-02-19 Pedro Alves <pedro@codesourcery.com>
13794
13795 * server.c (handle_v_requests): When handling the vRun and vAttach
13796 packets, if already debugging a process, don't kill it. Return an
13797 error instead.
13798
d41b6bb4
DJ
137992008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13800
13801 * server.c (handle_query): Correct length check.
13802
5ac588cf
PA
138032008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13804
13805 * win32-low.c (do_initial_child_stuff): Add process handle
13806 parameter. Set current_process_handle and current_process_id from the
13807 parameters. Clear globals.
13808 (win32_create_inferior): Don't set current_process_handle and
13809 current_process_id here. Instead pass them on the call to
13810 do_initial_child_stuff.
13811 (win32_attach): Likewise.
13812 (win32_clear_inferiors): New.
13813 (win32_kill): Don't close the current process handle or the
13814 current thread handle here. Instead call win32_clear_inferiors.
13815 (win32_detach): Don't open a new handle to the process. Call
13816 win32_clear_inferiors.
13817 (win32_join): Don't rely on current_process_handle; open a new
13818 handle using the process id.
13819 (win32_wait): Call win32_clear_inferiors when the inferior process
13820 has exited.
13821
ecd7ecbc
DJ
138222008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13823
13824 * server.c (monitor_show_help): Add "exit".
13825
1525d545
MG
138262008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13827
ecd7ecbc 13828 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
13829 (clean): Add reg-xtensa.c.
13830 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
13831 * configure.srv (xtensa*-*-linux*) New target.
13832 * linux-xtensa-low.c: New.
13833 * xtensa-xtregs.c: New.
1525d545 13834
59a016f0
PA
138352008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13836
13837 * hostio.c: Don't include errno.h.
13838 (errno_to_fileio_errno): Move to hostio-errno.
13839 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13840 error number outputting to the target->hostio_last_error callback.
13841 (hostio_packet_error): Use FILEIO_EINVAL directly.
13842 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13843 calls to hostio_error.
13844 * hostio-errno.c: New.
13845 * server.h (hostio_last_error_from_errno): Declare.
13846 * target.h (target_ops): Add hostio_last_error member.
13847 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13848 as hostio_last_error handler.
889bf7c5 13849 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
13850 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13851 (wince_hostio_last_error): New functions.
13852 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13853 as hostio_last_error handler.
13854 (win32_target_ops) [!_WIN32_WCE]: Register
13855 hostio_last_error_from_errno as hostio_last_error handler.
13856 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13857 (hostio-errno.o): New rule.
13858 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13859 * configure.srv (srv_hostio_err_objs): New variable. Default to
13860 hostio-errno.o.
13861 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13862 * configure: Regenerate.
13863
2d717e4f
DJ
138642008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13865
13866 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13867 (linux_kill, linux_detach): Clean up the process list.
13868 * remote-utils.c (remote_open): Improve port number parsing.
13869 (putpkt_binary, input_interrupt): Only send interrupts if the target
13870 is running.
13871 * server.c (extended_protocol): Make static.
13872 (attached): Define earlier.
13873 (exit_requested, response_needed, program_argv): New variables.
13874 (target_running): New.
13875 (start_inferior): Clear attached here.
13876 (attach_inferior): Set attached here.
13877 (require_running): Define.
13878 (handle_query): Use require_running and target_running. Implement
13879 "monitor exit".
13880 (handle_v_attach, handle_v_run): New.
13881 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13882 (gdbserver_usage): Update.
13883 (main): Redo argument parsing. Handle --debug and --multi. Handle
13884 --attach along with other options or after the port. Save
13885 program_argv. Support no initial program. Resynchronize
13886 communication with GDB after an error. Handle "monitor exit".
13887 Use require_running and target_running. Always allow the extended
13888 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13889 restart in extended mode.
13890 * README: Refer to the GDB manual. Update --attach usage.
13891
7407e2de
AS
138922007-12-20 Andreas Schwab <schwab@suse.de>
13893
13894 * linux-low.c (STACK_SIZE): Define.
13895 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13896 (linux_test_for_tracefork): Likewise.
13897
b65d95c5
DJ
138982007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13899
13900 * linux-low.c (linux_wait_for_event): Update messages. Do not
13901 reinsert auto-delete breakpoints.
13902 * mem-break.c (struct breakpoint): Change return type of handler to
13903 int.
13904 (set_breakpoint_at): Update handler type.
13905 (reinsert_breakpoint_handler): Return 1 instead of calling
13906 delete_breakpoint.
13907 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13908 setting a new one.
13909 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13910 * mem-break.h (set_breakpoint_at): Update handler type.
13911 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13912 * win32-low.c (auto_delete_breakpoint): New.
13913 (get_child_debug_event): Use it.
13914
4e799345
DJ
139152007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13916
13917 * configure.ac: Check for pread and pwrite.
13918 * hostio.c (handle_pread): Fall back to lseek and read.
13919 (handle_pwrite): Fall back to lseek and write.
13920 * config.in, configure: Regenerated.
13921
27524b67
DJ
139222007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13923
13924 * server.c (myresume): Add own_buf argument.
13925 (main): Update calls.
13926
a20d5e98
DJ
139272007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13928
13929 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13930 * remote-utils.c (remote_open): Do not call disable_async_io.
13931 (block_async_io): Delete.
13932 (unblock_async_io): Make static.
13933 (initialize_async_io): New.
13934 * server.c (handle_v_cont): Handle async I/O here.
13935 (myresume): Likewise. Move other common resume tasks here...
13936 (main): ... from here. Call initialize_async_io. Disable async
13937 I/O before the main loop.
13938 * server.h (initialize_async_io): Declare.
13939 (block_async_io, unblock_async_io): Delete prototypes.
13940 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13941
b79d787e
DJ
139422007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13943
13944 * remote-utils.c (readchar): Allow binary data in received messages.
13945
d97903b2
PA
139462007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13947
13948 * win32-low.c (attaching): New global.
13949 (win32_create_inferior): Clear the `attaching' global.
13950 (win32_attach): Set the `attaching' global.
13951 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13952 attaching. Only set a breakpoint at the entry point if not
13953 attaching.
13954
311de423
PA
139552007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13956
13957 * server.c (main): Don't report dll events on the initial
13958 connection on attaches.
13959
6c2d16d2
PA
139602007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13961
13962 * server.c (main): Relax numerical bases supported for the pid of
13963 the --attach command line argument.
13964
5ca906e6
PA
139652007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13966
13967 * win32-low.c (win32_attach): Call OpenProcess before
13968 DebugActiveProcess, not after. Add last error output to error
13969 call.
13970
9c6c8194
PA
139712007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13972
13973 * win32-low.c (win32_get_thread_context)
13974 (win32_set_thread_context): New functions.
13975 (thread_rec): Use win32_get_thread_context.
13976 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13977 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13978 field.
13979
4d5d1aaa
PA
139802007-12-03 Leo Zayas
13981 Pedro Alves <pedro_alves@portugalmail.pt>
13982
13983 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13984 global variables.
13985 (child_add_thread): Minor cleanup.
13986 (child_continue): Resume artificially suspended threads before
13987 calling ContinueDebugEvent.
13988 (suspend_one_thread): New.
13989 (fake_breakpoint_event): New.
13990 (get_child_debug_event): Change return type to int. Check here if
13991 gdb sent an interrupt request. If a soft interrupt was requested,
13992 fake a breakpoint event. Return 0 if there is no event to handle,
13993 and 1 otherwise.
13994 (win32_wait): Don't check here if gdb sent an interrupt request.
13995 Ensure there is a valid event to handle.
13996 (win32_request_interrupt): Add soft interruption method as last
13997 resort.
13998
c436e841
PA
139992007-12-03 Leo Zayas
14000 Pedro Alves <pedro_alves@portugalmail.pt>
14001
14002 * win32-low.h (win32_thread_info): Add descriptions to the
14003 structure members. Replace `suspend_count' counter by a
14004 `suspended' flag.
14005 * win32-low.c (thread_rec): Update condition of when to get the
14006 context from the inferior. Rely on ContextFlags being set if it
14007 has already been retrieved. Only suspend the inferior thread if
14008 we haven't already. Warn if that fails.
14009 (continue_one_thread): s/suspend_count/suspended/. Only call
14010 ResumeThread once. Warn if that fails.
14011
e7b5fa67
PA
140122007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14013
14014 * win32-low.c (win32_wait): Don't read from the inferior when it
14015 has already exited.
14016
a385171d
PA
140172007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14018
14019 * Makefile.in (win32_low_h): New variable.
14020 (win32-low.o): Add dependency on $(win32_low_h).
14021 (win32-arm-low.o, win32-i386-low.o): New rules.
14022
f80c84b3
DJ
140232007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14024
14025 * hostio.c: Correct copyright year.
14026
a6b151f1
DJ
140272007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14028
14029 * Makefile.in (OBS): Add hostio.o.
14030 (hostio.o): New rule.
14031 * server.h (handle_vFile): Declare.
14032 * hostio.c: New file.
14033 * server.c (handle_v_requests): Take packet_len and new_packet_len
14034 for binary packets. Call handle_vFile.
14035 (main): Update call to handle_v_requests.
14036
f9387fc3
DJ
140372007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14038
14039 * linux-low.c: Include <sched.h>.
14040
51c2684e
DJ
140412007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14042
14043 * linux-low.c (linux_tracefork_grandchild): New.
14044 (linux_tracefork_child): Use clone.
14045 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14046
75f83163
JB
140472007-10-31 Joel Brobecker <brobecker@adacore.com>
14048
14049 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14050
da5898ce
DJ
140512007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14052
14053 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14054
24a09b5f
DJ
140552007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14056
14057 * inferiors.c (change_inferior_id): Delete.
14058 (add_pid_to_list, pull_pid_from_list): New.
14059 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14060 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14061 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14062 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14063 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14064 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14065 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14066 (using_threads): Always set to 1.
14067 (handle_extended_wait): New.
14068 (add_process): Do not set TID.
14069 (linux_create_inferior): Set must_set_ptrace_flags.
14070 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14071 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14072 (linux_thread_alive): Rename TID argument to LWPID.
14073 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14074 (linux_wait_for_event): Do not use TID or check using_threads. Update
14075 call to dead_thread_notify. Call handle_extended_wait.
14076 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14077 (send_sigstop): Delete sigstop_sent.
14078 (wait_for_sigstop): Avoid TID.
14079 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14080 (linux_test_for_tracefork): New.
14081 (linux_lookup_signals): Use thread_db_active and
14082 linux_supports_tracefork_flag.
14083 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14084 * linux-low.h (get_process_thread): Avoid TID.
14085 (struct process_ifo): Move thread_known and tid to the end. Remove
14086 sigstop_sent.
14087 (linux_attach_lwp, thread_db_init): Update prototypes.
14088 * server.h (change_inferior_id): Delete prototype.
14089 (add_pid_to_list, pull_pid_from_list): New prototypes.
14090 * thread-db.c (thread_db_use_events): New.
14091 (find_first_thread): Rename to...
14092 (find_one_thread): ...this. Update callers and messages. Do not
14093 call fatal. Check thread_db_use_events. Do not call
14094 change_inferior_id or new_thread_notify.
14095 (maybe_attach_thread): Update. Do not call new_thread_notify.
14096 (thread_db_init): Set thread_db_use_events. Check use_events.
14097 * utils.c (fatal, warning): Correct message prefix.
14098
30ed0a8f
DJ
140992007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14100
14101 * Makefile.in (clean): Remove new files.
14102 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14103 (powerpc-64.o, powerpc-64.c): New rules.
14104 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14105 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14106 with SPE.
14107 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14108 SPE targets.
14109 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14110 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14111 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14112 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14113 (target_regsets): Add AltiVec and SPE register sets.
14114 * configure.ac: Check for AltiVec and SPE.
14115 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14116 (ppc_fill_vrregset, ppc_store_vrregset): New.
14117 (target_regsets): Add AltiVec register set.
14118 * configure: Regenerated.
14119
fd462a61
DJ
141202007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14121
14122 * linux-low.c (O_LARGEFILE): Define.
14123 (linux_read_memory): Use /proc/PID/mem.
14124 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14125 * configure, config.in: Regenerated.
14126
69f223ed
DJ
141272007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14128
14129 * linux-low.c (linux_wait_for_event): Do not pass signals while
14130 single-stepping.
14131
aec18585
PA
141322007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14133
14134 * win32-low.c (create_process): New.
14135 (win32_create_inferior): Use create_process instead of
14136 CreateProcess. If create_process failed retry appending an ".exe"
14137 suffix. Store the GetLastError result immediatelly after
14138 create_process calls and use it on the call to error.
14139
34d86ddd
PA
141402007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14141
14142 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14143
5a0e3bd0
JB
141442007-08-23 Joel Brobecker <brobecker@adacore.com>
14145
14146 * configure.ac: Switch license to GPLv3.
14147
f88c79e6
MS
141482007-08-01 Michael Snyder <msnyder@access-company.com>
14149
14150 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14151
6b3d9b83
PA
141522007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14153
14154 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14155 typedef.
14156 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14157 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14158 CloseToolhelp32Snapshot.
14159 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14160 CloseToolhelp32Snapshot.
14161
c588c53c
MS
141622007-07-27 Michael Snyder <michael.snyder@access-company.com>
14163
14164 * server.c (main): Check for inferior exit before main loop.
14165
aa0403d9
PA
141662007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14167
14168 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14169 instead of on tmp_desc.
14170
255e7678
DJ
141712007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14172 Daniel Jacobowitz <dan@codesourcery.com>
14173
14174 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14175 (add_thread): Minor cleanups.
14176 (clear_inferiors): Move lower in the file. Clear the DLL
14177 list.
14178 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14179 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14180 (xml_escape_text): New.
14181 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14182 for qSupported.
14183 (handle_v_cont): Report errors.
14184 (gdbserver_version): Update.
14185 (main): Correct size of own_buf. Do not report initial DLL events.
14186 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14187 (unloaded_dll, xml_escape_text): New.
14188 * win32-low.c (enum target_waitkind): Update comments.
14189 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14190 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14191 (win32_EnumProcessModules, win32_GetModuleInformation)
14192 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14193 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14194 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14195 (win32_Module32First, win32_Module32Next, load_toolhelp)
14196 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14197 (get_child_debug_event): Handle DLL events.
14198 (win32_wait): Likewise.
14199
0d37add9
DJ
142002007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14201
14202 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14203 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14204
45e2715e
PA
142052007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14206
14207 * win32-low.c (handle_output_debug_string): Ignore event if not
14208 waiting.
14209
c5674cf1
PA
142102007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14211
14212 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14213
2bbe3cc1
DJ
142142007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14215
14216 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14217
ae13219e
DJ
142182007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14219
14220 * inferiors.c (change_inferior_id): Add comment.
14221 * linux-low.c (check_removed_breakpoint): Add an early
14222 prototype. Improve debug output.
14223 (linux_attach): Doc update.
14224 (linux_detach_one_process, linux_detach): Clean up before releasing
14225 each process.
14226 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14227 * linux-low.h (struct process_info): Doc improvement.
14228 * mem-break.c (delete_all_breakpoints): New.
14229 * mem-break.h (delete_all_breakpoints): New prototype.
14230 * thread-db.c (find_first_thread): New.
14231 (thread_db_create_event): Call it instead of
14232 thread_db_find_new_threads. Clean up unused variables.
14233 (maybe_attach_thread): Remove first thread handling.
14234 (thread_db_find_new_threads): Use find_first_thread.
14235 (thread_db_get_tls_address): Likewise.
14236
4105de34
DJ
142372007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14238
14239 * thread-db.c (thread_db_find_new_threads): Add prototype.
14240 (thread_db_create_event): Check for the main thread before adding
14241 a new thread.
14242 (maybe_attach_thread): Only enable event reporting if TID == 0.
14243 (thread_db_get_tls_address): Check for new threads.
14244
2b876972
DJ
142452007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14246
14247 * linux-low.c (linux_create_inferior): Try execv before execvp.
14248 * spu-low.c (spu_create_inferior): Likewise.
14249
7a245884
DJ
142502007-06-13 Mike Frysinger <vapier@gentoo.org>
14251
14252 * linux-low.c (linux_create_inferior): Change execv to execvp.
14253 * spu-low.c (spu_create_inferior): Likewies.
14254
117ce543
DJ
142552007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14256
14257 * Makefile.in (clean): Clean new files instead of deleted ones.
14258 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14259 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14260 rules.
14261 * configure.srv: Specify XML files and new regformats for MIPS and
14262 MIPS64 GNU/Linux.
14263 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14264 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14265 an entry for the restart register.
14266 (mips_cannot_fetch_register, mips_cannot_store_register)
14267 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14268 register names to match the XML descriptions.
14269 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14270 restart register instead of $0.
14271
0e7f50da
UW
142722007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14273 Markus Deuling <deuling@de.ibm.com>
14274
14275 * remote-utils.c (decode_xfer_write): New function.
14276 * server.h (decode_xfer_write): Add prototype.
14277 * server.c (handle_query): Add PACKET_LEN argument. Support
14278 qXfer:spu:read and qXfer:spu:write packets.
14279 (main): Pass packet_len to handle_query.
14280 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14281 * target.h (target_ops): Add qxfer_spu.
14282
374c1d38
UW
142832007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14284
14285 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14286 accessing non-seekable spufs files.
14287
bb63802a
UW
142882007-05-16 Markus Deuling <deuling@de.ibm.com>
14289
889bf7c5 14290 * server.c (handle_query): Add reply for qC packet.
bb63802a 14291
7390519e
PA
142922007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14293 Leo Zayas <lerele@champenstudios@com>
14294
14295 * server.h (check_remote_input_interrupt_request): New function.
14296 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14297 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14298 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14299 (check_remote_input_interrupt_request): New function.
14300 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 14301 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
14302 winapi_GenerateConsoleCtrlEvent): New typedefs.
14303 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14304 to 250 ms.
14305 (win32_wait): Check for remote interrupt request
14306 with check_remote_input_interrupt_request.
14307 (win32_request_interrupt): New function.
14308 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14309
34b34921
PA
143102007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14311
14312 * win32-low.c (debug_registers_changed,
14313 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14314 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14315 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14316 (thread_rec): Get context using the low target.
14317 (child_add_thread): Call thread_added on the low target,
14318 which does the same thing.
14319 (regptr): Delete.
14320 (do_initial_child_stuff): Remove debug registers references.
14321 Set context using the low target. Resume threads after
14322 setting the contexts.
14323 (child_continue): Remove dead variable. Remove debug
14324 registers references.
14325 (child_fetch_inferior_registers): Go through the low target.
14326 (do_child_store_inferior_registers): Remove.
14327 (child_store_inferior_registers): Go through the low target.
14328 (win32_resume): Remove debug registers references.
14329 Set context using the low target.
14330 (handle_exception): Change return type to void. Don't record
14331 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14332 first chance exception.
889bf7c5 14333 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
14334 goto loop. Always return after waiting for debug event.
14335 (win32_wait): Convert to switch statement. Handle spurious
14336 events.
14337
14338 * win32-i386-low.c (debug_registers_changed,
14339 debug_registers_used): New.
14340 (initial_stuff): Rename to ...
14341 (i386_initial_stuff): ... this. Clear debug registers
14342 state variables.
14343 (store_debug_registers): Delete.
14344 (i386_get_thread_context): New.
14345 (load_debug_registers): Delete.
14346 (i386_set_thread_context): New.
14347 (i386_thread_added): New.
14348 (single_step): Rename to ...
14349 (i386_single_step): ... this.
14350 (do_fetch_inferior_registers): Rename to ...
14351 (i386_fetch_inferior_register): ... this.
14352 (i386_store_inferior_register): New.
14353 (the_low_target): Adapt to new interface.
14354
14355 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14356 (arm_get_thread_context): New.
14357 (arm_set_thread_context): New.
14358 (regptr): New.
14359 (do_fetch_inferior_registers): Rename to ...
14360 (arm_fetch_inferior_register): ... this.
14361 (arm_store_inferior_register): New.
14362 (arm_wince_breakpoint): Reimplement as unsigned long.
14363 (arm_wince_breakpoint_len): Define.
14364 (the_low_target): Adapt to new interface.
14365
14366 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14367 load_debug_registers. Add get_thread_context, set_thread_context,
14368 thread_added and store_inferior_register. Rename
14369 fetch_inferior_registers to fetch_inferior_register.
14370 (regptr): Remove declaration.
14371
dd6953e1
PA
143722007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14373
14374 * linux-low.c (linux_detach): Change return type to int. Return 0.
14375 * spu-low.c (spu_detach): Likewise.
14376
444d6139
PA
143772007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14378
14379 * target.h (target_ops): Change return type of detach to int.
14380 Add join.
14381 (join_inferior): New.
14382 * server.c (main): Don't skip detach support on mingw32.
14383 If the inferior doesn't support detaching return error.
14384 Call join_inferior instead of using waitpid.
14385 * linux-low.c (linux_join): New.
14386 (linux_target_op): Add linux_join.
14387 * spu-low.c (spu_join): New.
14388 (spu_target_ops): Add spu_join.
14389 * win32-low.c (win32_detach): Adapt to new interface.
14390 Reopen current_process_handle before detaching. Issue a child
14391 resume before detaching.
14392 (win32_join): New.
14393 (win32_target_op): Add win32_join.
14394
1d5315fe
PA
143952007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14396
14397 * win32-low.c (win32-attach): Fix return value.
14398 * target.h (target_ops): Describe ATTACH return values.
14399
bf914831
PA
144002007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14401
14402 * win32-low.c (GETPROCADDRESS): Define.
14403 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14404 (winapi_DebugSetProcessKillOnExit): Likewise.
14405 (win32_create_inferior): Force usage of ansi CreateProcessA.
14406 (win32_attach): Use GETPROCADDRESS.
14407 (win32_detach): Likewise.
14408
f72f3e60
PA
144092007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14410
14411 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14412
ed50f18f
PA
144132007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14414
14415 * win32-low.c: Commit leftover changes from 2007-03-29.
14416
0c2ead7e
DJ
144172007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14418
14419 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14420 fields short instead of int. Add explicit padding.
14421 (i387_cache_to_fsave): Remove unnecessary casts.
14422 (i387_fsave_to_cache): Doc fix.
14423 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14424
73725ff3
DJ
144252007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14426
14427 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14428 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14429
d99f33d8
PA
144302007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14431
14432 * configure.srv (arm*-*-mingw32ce*): Move near the other
14433 arm targets.
14434
68070c10
PA
144352007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14436
2482afc6 14437 * configure.ac: Add errno checking.
68070c10
PA
14438 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14439 sys/file.h and malloc.h.
14440 (AC_CHECK_DECLS): Add perror.
14441 (srv_mingwce): Handle.
2482afc6 14442 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
14443 win32-i386-low.o to srv_tgtobj.
14444 (i[34567]86-*-mingw*): Likewise.
14445 (arm*-*-mingw32ce*): Add case.
14446 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14447 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14448 [__MINGW32CE__] (strerror): New function.
14449 [__MINGW32CE__] (errno): Define to GetLastError.
14450 [__MINGW32CE__] (COUNTOF): New macro.
14451 (remote_open): Remove extra close call.
14452 * mem-break.c (delete_breakpoint_at): New function.
14453 * mem-break.h (delete_breakpoint_at): Declare.
14454 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14455 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14456 [USE_WIN32API] (read, write): Add char* casts.
14457 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14458 * server.h: Include wincecompat.h on Windows CE.
14459 [HAVE_ERRNO_H]: Check.
14460 (perror): Declare if not declared.
14461 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14462 (perror_with_name): Remove errno declaration.
14463 * wincecompat.h: New.
14464 * wincecompat.c: New.
14465 * win32-low.h: New.
14466 * win32-arm-low.c: New.
14467 * win32-i386-low.c: New.
14468 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14469 (OUTMSG2): Make it safe.
14470 (_T): New macro.
14471 (COUNTOF): New macro.
14472 (NUM_REGS): Get it from the low target.
14473 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14474 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14475 (thread_rec): Let low target handle debug registers.
14476 (child_add_thread): Likewise.
14477 (child_init_thread_list): Likewise.
14478 (continue_one_thread): Likewise.
14479 (regptr): New.
14480 (do_child_fetch_inferior_registers): Move to ...
14481 * win32-i386-low.c: ... here, and rename to ...
14482 (do_fetch_inferior_registers): ... this.
889bf7c5 14483 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
14484 Go through the low target.
14485 (do_child_store_inferior_registers): Use regptr.
14486 (strwinerror): New function.
14487 (win32_create_inferior): Handle Windows CE.
14488 Use strwinerror instead of strerror on Windows error
14489 codes. Add program to the error output.
14490 Don't close the main thread handle on Windows CE.
14491 (win32_attach): Use coredll.dll on Windows CE.
14492 (win32_kill): Close current process and current
14493 thread handles.
14494 (win32_detach): Use coredll.dll on Windows CE.
14495 (win32_resume): Let low target handle debug registers, and
14496 step request.
14497 (handle_exception): Add/Remove initial breakpoint. Avoid
14498 non-existant WSTOPSIG on Windows CE.
14499 (win32_read_inferior_memory): Cast to remove warning.
14500 (win32_arch_string): Go through the low target.
14501 (initialize_low): Call set_breakpoint_data with the low
14502 target's breakpoint.
14503 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14504 FOP_REGNUM, mappings): Move to ...
14505 * win32-i386-low.c: ... here.
14506 * win32-low.c (win32_thread_info): Move to ...
14507 * win32-low.h: ... here.
14508 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14509 win32-arm-low.c and wincecompat.c.
14510 (all:): Add $EXEEXT.
14511 (install-only:): Likewise.
14512 (gdbserver:): Likewise.
14513 (gdbreplay:): Likewise.
14514 * config.in: Regenerate.
14515 * configure: Regenerate.
14516
41093d81
PA
145172007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14518
14519 * win32-low.c: Rename typedef thread_info to
14520 win32_thread_info throughout.
14521
544afa54
PA
145222007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14523
14524 * win32-i386-low.c: Rename to ...
14525 * win32-low.c: ... this.
14526 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14527 * Makefile.in: Likewise.
14528
bce7165d
PA
145292007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14530
14531 * remote-utils.c (monitor_output): Constify msg parameter.
14532 * server.h (monitor_output): Likewise.
14533 * win32-i386-low.c (handle_output_debug_string): New.
14534 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14535 handle_output_debug_string.
14536 (get_child_debug_event): Likewise.
14537
506c7aa0
DJ
145382007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14539
14540 * server.c (main): Correct strtoul check.
14541
42c81e2a
DJ
145422007-03-27 Jon Ringle <jon@ringle.org>
14543
14544 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14545
9453113a
DJ
145462007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14547
14548 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14549
64a69107
DJ
145502007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14551
14552 * terminal.h: Check HAVE_SGTTY_H.
14553
145542007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
14555
14556 * remote-utils.c (remote_open): Print out the assigned port number.
14557
c74d0ad8
DJ
145582007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14559
14560 * remote-utils.c (monitor_output): New function.
14561 * server.c (debug_threads): Define here.
14562 (monitor_show_help): New function.
14563 (handle_query): Handle qRcmd.
14564 (main): Do not handle 'd' packet.
14565 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14566 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14567 of debug_threads.
14568
de7c3b4a
PA
145692007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14570
14571 * Makefile.in (EXEEXT): New.
14572 (clean): Use $(EXEEXT).
14573
ef57601b
PA
145742007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14575
14576 * target.h (target_ops): Rename send_signal to request_interrupt,
14577 and remove enum target_signal parameter.
14578 * linux-low.c (linux_request_interrupt): Rename from
14579 linux_send_signal, and always send SIGINT.
14580 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14581 and always send SIGINT.
14582 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14583 of send_signal.
14584 (input_interrupt): Likewise.
14585
820f2bda
PA
145862007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14587
14588 * server.c (get_features_xml): Check if target implemented
14589 arch_string.
14590 * win32-i386-low.c (win32_arch_string): New.
14591 (win32_target_ops): Add win32_arch_string as arch_string member.
14592
ab39bf24
UW
145932007-02-22 Markus Deuling <deuling@de.ibm.com>
14594
14595 * spu-low.c (spu_arch_string): New.
14596 (spu_target_ops): Add spu_arch_string.
14597
61ff6e04
DJ
145982007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14599
14600 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14601 * configure.ac: Do not check for terminal.h.
14602 * configure, config.in: Regenerated.
14603
fb1e4ffc
DJ
146042007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14605
14606 * Makefile.in (OBS): Add $(XML_BUILTIN).
14607 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14608 (clean): Update.
14609 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14610 (arm-with-iwmmxt.c): New.
14611 * config.in, configure: Regenerate.
14612 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14613 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14614 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14615 (arm*-*-linux*): Add iWMMXt and regset support.
14616 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14617 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14618 (arm_store_wmmxregset, target_regsets): New.
14619 * server.c (get_features_xml): Take annex argument. Check builtin
14620 XML documents.
14621 (handle_query): Handle multiple annexes.
14622
0f48aa01
DJ
146232007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14624
14625 * remote-utils.c [USE_WIN32API] (read, write): Define.
14626 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14627 write.
14628
23181151
DJ
146292007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14630
14631 * linux-i386-low.c (the_low_target): Set arch_string.
14632 * linux-x86-64-low.c (the_low_target): Likewise.
14633 * linux-low.c (linux_arch_string): New.
14634 (linux_target_ops): Add it.
14635 * linux-low.h (struct linux_target_ops): Add arch_string.
14636 * server.c (write_qxfer_response): Use const void * for DATA.
14637 (get_features_xml): New.
14638 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14639 * target.h (struct target_ops): Add arch_string method.
14640
9d606399
DJ
146412007-01-03 Denis Pilat <denis.pilat@st.com>
14642 Daniel Jacobowitz <dan@codesourcery.com>
14643
14644 * linux-low.c (linux_kill): Handle being called with no threads.
14645 * win32-i386-low.c (win32_kill): Likewise.
14646 (get_child_debug_event): Clear current_process_handle.
14647
146482006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
14649 Daniel Jacobowitz <dan@codesourcery.com>
14650
14651 * remote-utils.c (remote_open): Check the type of specified
14652 serial port devices before opening them.
14653 * server.c (main): Kill the inferior if an error occurs during
14654 the first remote_open.
14655
a5e13d24
DJ
146562006-12-05 Markus Deuling <deuling@de.ibm.com>
14657
14658 * README: Update supported targets.
14659
186947f7
DJ
146602006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14661
14662 * Makefile.in (clean): Remove reg-mips64.c.
14663 (reg-mips64.c, reg-mips64.o): New rules.
14664 * configure.srv: Handle mips64. Include regset support for mips.
14665 * linux-mips-low.c (union mips_register): New.
14666 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14667 (mips_breakpoint, mips_breakpoint_at): Use int.
14668 (mips_collect_register, mips_supply_register)
14669 (mips_collect_register_32bit, mips_supply_register_32bit)
14670 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14671 (mips_store_fpregset, target_regsets): New.
14672 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14673
a13e2c95
UW
146742006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14675
14676 * configure.srv: Add target "spu*-*-*".
14677 * Makefile.in (clean): Remove reg-spu.c.
14678 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14679 * spu-low.c: New file.
14680
cb7283db
DJ
146812006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14682
14683 * configure.ac: Correct td_thr_tls_get_addr test.
14684 * configure: Regenerated.
14685
89be2091
DJ
146862006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14687
14688 * linux-low.c (linux_wait_for_event): Reformat. Use the
14689 pass_signals array.
14690 * remote-utils.c (decode_address_to_semicolon): New.
14691 * server.c (pass_signals, handle_general_set): New.
14692 (handle_query): Mention QPassSignals for qSupported.
14693 (main): Call handle_general_set.
14694 * server.h (pass_signals, decode_address_to_semicolon): New.
14695
000ef4f0
DJ
146962006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14697
14698 * server.c (handle_query): Correct error handling for read_auxv.
14699
b7149293
UW
147002005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14701
14702 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14703 and srv_linux_thread_db to yes.
14704 * linux-s390-low.c (s390_fill_gregset): New function.
14705 (target_regsets): Define data structure.
14706
dae5f5cf
DJ
147072006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14708
14709 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14710 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14711 * config.in, configure: Regenerated.
14712 * inferiors.c (gdb_id_to_thread): New function.
14713 (gdb_id_to_thread_id): Use it.
14714 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14715 * linux-low.h (struct process_info): Add th member.
14716 (thread_db_get_tls_address): New prototype.
14717 * remote-utils.c (decode_address): Make non-static.
14718 * server.c (handle_query): Handle qGetTLSAddr.
14719 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14720 * target.h (struct target_ops): Add get_tls_address.
14721 * thread-db.c (maybe_attach_thread): Save the thread handle.
14722 (thread_db_get_tls_address): New.
14723
32ca6d61
DJ
147242006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14725
14726 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14727 (linux_resume_one_process): Take a siginfo_t *. Update all
14728 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14729 (struct pending_signals): Add a siginfo_t.
14730 (linux_wait_for_process): Always set last_status.
14731 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14732 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14733 * linux-low.h (struct process_info): Add last_status.
14734
5ffff7c1
DJ
147352006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14736
14737 * remote-utils.c (try_rle): New function.
14738 (putpkt_binary): Use it.
14739
8695c747
DJ
147402006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14741
14742 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14743 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14744 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14745 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14746 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14747 point registers.
14748
290fadea
RS
147492006-08-08 Richard Sandiford <richard@codesourcery.com>
14750
14751 * server.c (terminal_fd): New variable.
14752 (old_foreground_pgrp): Likewise.
14753 (restore_old_foreground_pgrp): New function.
14754 (start_inferior): Record the terminal file descriptor in terminal_fd
14755 and its original foreground group in old_foreground_pgrp. Register
14756 restore_old_foreground_pgrp with atexit().
14757
9f2e1e63
DJ
147582006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14759
14760 * server.c (handle_query): Correct qPart to qXfer.
14761
b80864fb
DJ
147622006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14763
14764 * configure.ac: Check for more headers which are missing on
14765 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14766 * configure.srv: Add Cygwin and mingw32.
14767 * remote-utils.c: Don't include headers unconditionally which
14768 are missing on mingw32. Include <winsock.h> for mingw32.
14769 (remote_open): Adjust for mingw32 support. Flush
14770 standard error after writing to it.
14771 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14772 (unblock_async_io, enable_async_io, disable_async_io)
14773 (readchar, getpkt): Update for Winsock support.
14774 (prepare_resume_reply): Expect a protocol signal number.
14775 * server.c: Disable <sys/wait.h> on mingw32.
14776 (start_inferior): Adjust for mingw32 support. Flush
14777 standard error after writing to it.
14778 (attach_inferior): Likewise. Use protocol signal
14779 numbers.
14780 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14781 and names.
14782 * win32-i386-low.c: New file.
14783 * Makefile.in (XM_CLIBS): Set.
14784 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14785 (win32-i386-low.o): New dependency rule.
14786 * linux-low.c (linux_wait): Use target signal numbers.
14787 * target.h (struct target_ops): Doc fix.
14788 * server.h (target_signal_to_name): New prototype.
14789 * gdbreplay.c: Don't include headers unconditionally which
14790 are missing on mingw32. Include <winsock.h> for mingw32.
14791 (remote_close, remote_open): Adjust for Winsock support.
14792 * configure, config.in: Regenerated.
14793
0876f84a
DJ
147942006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14795
14796 * server.c (decode_xfer_read, write_qxfer_response): New.
14797 (handle_query): Take a packet length argument. Handle
14798 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14799 the qSupported response.
14800 (main): Update call to handle_query.
14801
01f9e8fa
DJ
148022006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14803
14804 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14805 (putpkt_binary): Renamed from putpkt and adjusted for binary
14806 data.
14807 (putpkt): New wrapper for putpkt_binary.
14808 (readchar): Don't mask off the high bit.
14809 (decode_X_packet): New function.
14810 * server.c (main): Call putpkt_binary if a handler sets the packet
14811 length. Save the length of the incoming packet. Handle 'X'.
14812 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14813
be2a5f71
DJ
148142006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14815
14816 * server.c (handle_query): Handle qSupported.
14817
ea025f5f
DJ
148182006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14819
14820 * remote-utils.c (all_symbols_looked_up): New variable.
14821 (look_up_one_symbol): Check it.
14822 * server.h (look_up_one_symbol): New declaration.
14823 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14824
9308fc88
DJ
148252006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14826
14827 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 14828 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
14829 (PTRACE_GET_THREAD_AREA): Define.
14830 (ps_get_thread_area): New function.
14831
52fb6437
NS
148322006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14833
14834 * configure.srv (m68k*-*-uclinux*): New target.
14835 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14836 (linux_resume_one_process): Remove extraneous cast.
14837 (linux_read_offsets): New.
14838 (linux_target_op): Add linux_read_offsets on mmuless systems.
14839 * server.c (handle_query): Add qOffsets logic.
14840 * target.h (struct target_ops): Add read_offsets.
14841
21b0f40c
DJ
148422006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14843
14844 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14845 (PTRACE_GET_THREAD_AREA): Define.
14846 (ps_get_thread_area): New function.
14847 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14848 (linux-x86-64-low.o): Update.
14849
0050a760
DJ
148502006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14851
14852 * configure.ac: Remove checks for prfpregset_t.
14853 * gdb_proc_service.h: New file.
14854 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14855 new "gdb_proc_service.h".
14856 * proc-service.c: Likewise.
14857 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14858 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14859 * Makefile.in (gdb_proc_service_h): Updated.
14860 * configure, config.in: Regenerated.
14861
b92a518e
DJ
148622006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14863
14864 * remote-utils.c (prepare_resume_reply): Move declaration
14865 of gdb_id_from_wait to the top of the block.
14866
545587ee
DJ
148672006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14868
14869 * linux-low.c (regsets_store_inferior_registers): Read the regset
14870 from the target before filling it.
14871
9db87ebd
DJ
148722006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14873
14874 * server.c (attach_inferior): Return SIGTRAP for a successful
14875 attach.
14876
dd24457d
DJ
148772006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14878
14879 * Makefile.in (OBS): Add version.o.
14880 (STAGESTUFF): Delete.
14881 (version.o): Add dependencies.
14882 (version.c): Replace rule.
14883 (clean): Remove version.c.
14884 * server.c (gdbserver_version): New.
14885 (gdbserver_usage): Use printf.
14886 (main): Handle --version and --help.
14887 * server.h (version, host_name): Add declarations.
14888
6f0f660e
EZ
148892005-12-23 Eli Zaretskii <eliz@gnu.org>
14890
889bf7c5
PA
14891 * linux-arm-low.c:
14892 * linux-arm-low.c:
14893 * inferiors.c:
14894 * i387-fp.h:
14895 * i387-fp.c:
14896 * gdbreplay.c:
14897 * regcache.c:
14898 * proc-service.c:
14899 * mem-break.h:
14900 * mem-break.c:
14901 * linux-x86-64-low.c:
14902 * linux-sh-low.c:
14903 * linux-s390-low.c:
14904 * linux-ppc64-low.c:
14905 * linux-ppc-low.c:
14906 * linux-mips-low.c:
14907 * linux-m68k-low.c:
14908 * linux-m32r-low.c:
14909 * linux-low.h:
14910 * linux-low.c:
14911 * linux-ia64-low.c:
14912 * linux-i386-low.c:
14913 * linux-crisv32-low.c:
14914 * thread-db.c:
14915 * terminal.h:
14916 * target.h:
14917 * target.c:
14918 * server.h:
14919 * server.c:
14920 * remote-utils.c:
14921 * regcache.h:
14922 * utils.c:
14923 * Makefile.in:
14924 * configure.ac:
6f0f660e
EZ
14925 * gdbserver.1: Add (C) after Copyright. Update the FSF
14926 address.
14927
9d1fb177
DJ
149282005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14929
14930 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14931 (arm_breakpoint_at): Recognize both breakpoints.
14932 (the_low_target): Use the correct breakpoint instruction.
14933
011a70c2
DJ
149342005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14935
14936 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14937 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14938 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14939 (the_low_target): Update.
14940
7fb85e41
AS
149412005-10-25 Andreas Schwab <schwab@suse.de>
14942
14943 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14944
14945 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14946 (ia64_num_regs): Reduce to 462.
14947
3db0444b
DJ
149482005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14949
14950 * acinclude.m4: Correct quoting.
14951 * aclocal.m4: Regenerated.
14952
14953 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14954 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14955 (thread_db_init): Call thread_db_err_str.
14956 * configure.ac: Check for TD_VERSION.
14957 * config.in, configure: Regenerated.
14958
bee0189a
DJ
149592005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14960
14961 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14962
e9d25b98
DJ
149632005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14964
14965 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14966 is not available. Define HAVE_PTRACE_GETREGS if it is.
14967 * config.in, configure: Regenerated.
14968 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14969 * linux-i386-low.c, linux-m68k-low.c: Update to use
14970 HAVE_PTRACE_GETREGS.
14971 * linux-low.c (regsets_fetch_inferior_registers)
14972 (regsets_store_inferior_registers): Only return 0 if we processed
14973 GENERAL_REGS.
14974 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14975 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14976
a06660f7
DJ
149772005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14978
14979 * inferiors.c (struct thread_info): Add gdb_id.
14980 (add_thread): Add gdb_id argument.
14981 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14982 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14983 calls to add_thread.
14984 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14985 * server.c (handle_query): Use thread_to_gdb_id.
14986 (handle_v_cont, main): Use gdb_id_to_thread_id.
14987 * server.h (add_thread): Update prototype.
14988 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14989 prototypes.
14990
5a1f5858
DJ
149912005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14992
14993 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14994 left-padded registers.
14995 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14996 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14997
e122f1f5
SE
149982005-07-01 Steve Ellcey <sje@cup.hp.com>
14999
15000 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15001 * configure: Regenerate.
15002 * config.in: Regenerate.
15003 * server.h (NEED_DECLARATION_STRERROR):
15004 Replace with !HAVE_DECL_STRERROR.
15005
d592fa2f
DJ
150062005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15007
15008 * linux-low.c (linux_wait, linux_send_signal): Don't test
15009 an unsigned long variable for > 0 if it could be MAX_ULONG.
15010 * server.c (myresume): Likewise.
15011 * target.c (set_desired_inferior): Likewise.
15012
ccbd4912
MK
150132005-06-13 Mark Kettenis <kettenis@gnu.org>
15014
15015 * configure.ac: Simplify and improve check for socklen_t.
15016 * configure, config.in: Regenerate.
15017
f450004a
DJ
150182005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15019
15020 * acconfig.h: Remove.
15021 * configure.ac: Add a test for socklen_t. Use three-argument
15022 AC_DEFINE throughout.
15023 * config.in: Regenerated using autoheader 2.59.
15024 * configure: Regenerated.
15025
15026 * gdbreplay.c (socklen_t): Provide a default.
15027 (remote_open): Use socklen_t.
15028 * remote-utils.c (socklen_t): Provide a default.
15029 (remote_open): Use socklen_t.
15030 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15031 unsigned char.
15032
15033 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15034 char for buffers.
15035 * linux-low.c (linux_read_memory, linux_write_memory)
15036 (linux_read_auxv): Likewise.
15037 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15038 (check_mem_write): Likewise.
15039 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15040 Likewise.
15041 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15042 (registers_from_string, register_data): Likewise.
15043 * server.c (handle_query, main): Likewise.
15044 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15045 (decode_M_packet): Likewise.
15046 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15047 * target.h (struct target_ops): Update read_memory, write_memory,
15048 and read_auxv.
15049 (read_inferior_memory, write_inferior_memory): Update.
15050 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15051 to unsigned char *.
15052 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15053 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15054 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15055 linux-s390-low.c, linux-sh-low.c: Update for changes in
15056 read_inferior_memory and the_low_target->breakpoint.
15057
eee84df1
DJ
150582005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15059
15060 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15061 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15062 * configure.srv: Add powerpc64-*-linux*.
15063 * linux-ppc64-low.c: New file.
15064
45b134e5
OF
150652005-05-23 Orjan Friberg <orjanf@axis.com>
15066
15067 * linux-cris-low.c: New file with support for CRIS.
15068 * linux-crisv32-low.c: Ditto for CRISv32.
15069 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15070 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 15071 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
15072 reg-crisv32.o, and reg-crisv32.c to make rules.
15073 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15074 recognized targets.
15075
48d93c75
UW
150762005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15077
15078 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15079 of sizeof (PTRACE_XFER_TYPE).
15080 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15081
e013ee27
OF
150822005-05-12 Orjan Friberg <orjanf@axis.com>
15083
889bf7c5 15084 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
15085 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15086 pointers for hardware watchpoint support.
15087 * linux-low.h (struct linux_target_ops): Ditto.
15088 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15089 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15090 to linux_target_ops.
15091 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15092 reply packet.
15093 * server.c (main): Recognize 'Z' and 'z' packets.
15094
b0ded00b
UW
150952005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15096
15097 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15098 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15099 (the_low_target): Add new members.
15100
8643e2ad
DJ
151012005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15102
15103 * proc-service.c (ps_lgetregs): Search all_processes instead of
15104 all_threads.
15105
fc620387
DJ
151062005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15107
15108 * server.c (start_inferior): Change return type to int.
15109 (attach_inferior): Change sigptr to int *.
15110 (handle_v_cont, handle_v_requests): Change signal to int *.
15111 (main): Change signal to int.
15112
151132005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
15114
15115 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15116 * configure.srv: Add m32r*-*-linux*.
15117 * linux-m32r-low.c: New file.
15118
e0e76420
DJ
151192005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15120
15121 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15122
a1928bad
DJ
151232005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15124
15125 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15126 Take unsigned long arguments for PIDs.
15127 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15128 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15129 (wait_for_sigstop, linux_resume_one_process)
15130 (regsets_fetch_inferior_registers, linux_send_signal)
15131 (linux_read_auxv): Likewise. Update the types of variables holding
15132 PIDs. Update format string specifiers.
15133 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15134 * remote-utils.c (prepare_resume_reply): Likewise.
15135 * server.c (cont_thread, general_thread, step_thread)
15136 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15137 unsigned long.
15138 (handle_query): Update format specifiers.
15139 (handle_v_cont, main): Use strtoul for thread IDs.
15140 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15141 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15142 (general_thread, step_thread, thread_from_wait)
15143 (old_thread_from_wait): Update.
15144 * target.h (struct thread_resume): Use unsigned long for THREAD.
15145 (struct target_ops): Use unsigned long for arguments to attach and
15146 thread_alive.
15147
dcdb98d2
DJ
151482005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15149
15150 * acinclude.m4: Include bfd/bfd.m4 directly.
15151 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15152 <agriffis@toolchain.org>.
15153 * aclocal.m4, configure: Regenerated.
15154
bec39cab
AC
151552005-01-07 Andrew Cagney <cagney@gnu.org>
15156
15157 * configure.ac: Rename configure.in, require autoconf 2.59.
15158 * configure: Re-generate.
15159
434c4c77
DJ
151602004-12-08 Daniel Jacobowitz <dan@debian.org>
15161
15162 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15163 LIBS when finished.
15164 * aclocal.m4: Regenerated.
15165 * configure: Regenerated.
15166
db1d3e1b
AS
151672004-11-21 Andreas Schwab <schwab@suse.de>
15168
15169 * linux-m68k-low.c (m68k_num_gregs): Define.
15170 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15171 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15172 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15173 (m68k_breakpoint_at): New. Add to the_low_target.
15174
15175 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15176 srv_linux_thread_db to yes.
15177
43360365
JB
151782004-10-20 Joel Brobecker <brobecker@gnat.com>
15179
15180 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15181 (ARCH_SET_FS): Likewise.
15182 (ARCH_GET_FS): Likewise.
15183 (ARCH_GET_GS): Likewise.
15184
fd500816
DJ
151852004-10-16 Daniel Jacobowitz <dan@debian.org>
15186
15187 * linux-i386-low.c (ps_get_thread_area): New.
15188 * linux-x86-64-low.c (ps_get_thread_area): New.
15189 * linux-low.c: Include <sys/syscall.h>.
15190 (linux_kill_one_process): Don't kill the first thread here.
15191 (linux_kill): Kill the first thread here.
15192 (kill_lwp): New function.
15193 (send_sigstop, linux_send_signal): Use it.
15194 * proc-service.c: Clean up #ifdefs.
15195 (fpregset_info): Delete.
15196 (ps_lgetregs): Update and enable implementation.
15197 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15198 implementations.
15199 * remote-utils.c (struct sym_cache, symbol_cache): New.
15200 (input_interrupt): Print a clearer message.
15201 (async_io_enabled): New variable.
15202 (enable_async_io, disable_async_io): Use it. Update comments.
15203 (look_up_one_symbol): Use the symbol cache.
15204 * thread-db.c (thread_db_look_up_symbols): New function.
15205 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15206
f6de3c42
DJ
152072004-10-16 Daniel Jacobowitz <dan@debian.org>
15208
15209 * configure.in: Test for -rdynamic.
15210 * configure: Regenerated.
15211 * Makefile (INTERNAL_LDFLAGS): New.
15212 (gdbserver, gdbreplay): Use it.
15213
2c0fc042
AC
152142004-09-02 Andrew Cagney <cagney@gnu.org>
15215
15216 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15217
075b3282
DJ
152182004-03-23 Daniel Jacobowitz <drow@mvista.com>
15219
15220 * linux-low.c (linux_wait): Clear all_processes list also.
15221
fa6a77dc
DJ
152222004-03-12 Daniel Jacobowitz <drow@mvista.com>
15223
15224 * linux-low.c: Include <errno.h>. Remove extern declaration of
15225 errno.
15226
6d782a97
DJ
152272004-03-12 Daniel Jacobowitz <drow@mvista.com>
15228
15229 * gdbreplay.c, server.h, utils.c: Update copyright years.
15230
3a7fb99b
DJ
152312004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15232
15233 * server.c (main): Print child status or termination signal from
15234 variable 'signal', not 'sig'.
15235
c3e735a6
DJ
152362004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15237
15238 * linux-low.c (linux_read_memory): Change return type to
15239 int. Check for and return error from ptrace().
15240 * target.c (read_inferior_memory): Change return type to int. Pass
15241 back return status from the_target->read_memory().
15242 * target.h (struct target_ops): Adapt *read_memory() prototype.
15243 Update comment.
15244 (read_inferior_memory): Adapt prototype.
15245 * server.c (main): Return an error packet if
15246 read_inferior_memory() returns an error.
15247
a59d1c82
DJ
152482004-03-04 Daniel Jacobowitz <drow@mvista.com>
15249
15250 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15251 Unify with other clean targets.
15252
dc3f8883
DJ
152532004-02-29 Daniel Jacobowitz <drow@mvista.com>
15254
15255 * server.c (handle_v_cont): Call set_desired_inferior.
15256
89a208da
DJ
152572004-02-29 Daniel Jacobowitz <drow@mvista.com>
15258
15259 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15260
62ea82f5
DJ
152612004-02-29 Daniel Jacobowitz <drow@mvista.com>
15262
15263 * linux-low.c (linux_wait): Unblock async I/O.
15264 (linux_resume): Block and enable async I/O.
15265 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15266 * server.h (block_async_io, unblock_async_io): Add prototypes.
15267
6910d122
DJ
152682004-02-29 Daniel Jacobowitz <drow@mvista.com>
15269
15270 * remote-utils.c (remote_open): Print a status notice after
15271 opening a TCP port.
15272 * server.c (attach_inferior): Print a status notice after
15273 attaching.
15274
152752004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
15276
15277 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15278
c89dc5d4
DJ
152792004-02-26 Daniel Jacobowitz <drow@mvista.com>
15280
15281 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15282 error packet.
15283 * server.c, target.h: Update copyright years.
15284
4b8dad4a
RM
152852004-02-25 Roland McGrath <roland@redhat.com>
15286
15287 * target.h (struct target_ops): New member `read_auxv'.
15288 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15289 * linux-low.c (linux_read_auxv): New function.
15290 (linux_target_ops): Initialize `read_auxv' member to that.
15291
d7446758
JB
152922004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15293
15294 Committed by Jim Blandy <jimb@redhat.com>.
15295
15296 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 15297 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
15298 instead of GPR_SIZE to distiguish s390 and s390x targets.
15299
5544ad89
DJ
153002004-01-31 Daniel Jacobowitz <drow@mvista.com>
15301
15302 * linux-low.c: Update copyright year.
15303 (check_removed_breakpoint): Clear pending_is_breakpoint.
15304 (linux_set_resume_request, linux_queue_one_thread)
15305 (resume_status_pending_p): New functions.
15306 (linux_continue_one_thread): Use process->resume.
15307 (linux_resume): Only resume threads if there are no pending events.
15308 * linux-low.h (struct process_info): Add resume request
15309 pointer.
15310
2a68b70e
DJ
153112004-01-30 Daniel Jacobowitz <drow@mvista.com>
15312
15313 * regcache.c (new_register_cache): Clear the allocated register
15314 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15315
64386c31
DJ
153162003-10-13 Daniel Jacobowitz <drow@mvista.com>
15317
15318 * linux-low.c (linux_resume): Take a struct thread_resume *
15319 argument.
15320 (linux_wait): Update call.
15321 (resume_ptr): New static variable.
15322 (linux_continue_one_thread): Renamed from
15323 linux_continue_one_process. Use resume_ptr.
15324 (linux_resume): Use linux_continue_one_thread.
15325 * server.c (handle_v_cont, handle_v_requests): New functions.
15326 (myresume): New function.
15327 (main): Handle 'v' case.
15328 * target.h (struct thread_resume): New type.
15329 (struct target_ops): Change argument of "resume" to struct
15330 thread_resume *.
15331 (myresume): Delete macro.
15332
c938e9b0
L
153332003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15334
15335 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15336 (uninstall): Support DESTDIR.
15337
7f313d07
BC
15338Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15339
15340 * configure.srv: Add xscale*linux copy of arm*linux entry.
15341
3b2fc2ea
DJ
153422003-07-24 Daniel Jacobowitz <drow@mvista.com>
15343
15344 * linux-arm-low.c (arm_reinsert_addr): New function.
15345 (the_low_target): Add arm_reinsert_addr.
15346
1c0a559e
MK
153472003-07-08 Mark Kettenis <kettenis@gnu.org>
15348
15349 * mem-break.c: Remove whitespace at end of file.
15350
43d5792c
DJ
153512003-06-28 Daniel Jacobowitz <drow@mvista.com>
15352
15353 * configure.in: Check whether we need to prototype strerror.
15354 * server.h: Optionally prototype strerror.
15355 * gdbreplay.c (perror_with_name): Use strerror.
15356 * linux-low.c (linux_attach_lwp): Use strerror.
15357 * utils.c (perror_with_name): Use strerror.
15358 * config.in, configure: Regenerated.
15359
c8a86edf
DJ
153602003-06-28 Daniel Jacobowitz <drow@mvista.com>
15361
15362 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15363 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15364
73d37363
DJ
153652003-06-20 Daniel Jacobowitz <drow@mvista.com>
15366
15367 * Makefile.in (SFILES): Update.
15368 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15369 low-sun3.c: Remove files.
15370
6ad8ae5c
DJ
153712003-06-17 Daniel Jacobowitz <drow@mvista.com>
15372
15373 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15374 (linux_detach_one_process, linux_detach): New functions.
15375 (linux_target_ops): Add linux_detach.
15376 * server.c (main): Handle 'D' packet.
15377 * target.h (struct target_ops): Add "detach" member.
15378 (detach_inferior): Define.
15379
1581182a
MK
153802003-06-13 Mark Kettenis <kettenis@gnu.org>
15381
15382 From Kelley Cook <kelleycook@wideopenwest.com>:
15383 * configure.srv: Accept i[34567]86 variants.
15384
e5379b03
DJ
153852003-06-05 Daniel Jacobowitz <drow@mvista.com>
15386
15387 * linux-low.c (linux_wait_for_event): Correct comment typos.
15388 (linux_resume_one_process): Call check_removed_breakpoint.
15389 (linux_send_signal): New function.
15390 (linux_target_ops): Add linux_send_signal.
15391 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15392 of kill.
15393 * target.h (struct target_ops): Add send_signal.
15394
2ff29de4
JB
153952003-05-29 Jim Blandy <jimb@redhat.com>
15396
15397 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15398 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15399 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15400 away part of the register's value.
15401
254787d4
DJ
154022003-03-26 Daniel Jacobowitz <drow@mvista.com>
15403
15404 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15405 (linux_wait_for_event, linux_init_signals): Likewise.
15406
94e10508
DJ
154072003-03-17 Daniel Jacobowitz <drow@mvista.com>
15408
15409 * configure.in: Check for stdlib.h.
15410 * configure: Regenerated.
15411 * config.in: Regenerated.
15412
4c0711e0
DJ
154132003-01-04 Andreas Schwab <schwab@suse.de>
15414
15415 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15416
ef66e766
AC
154172003-01-02 Andrew Cagney <ac131313@redhat.com>
15418
15419 * Makefile.in: Remove obsolete code.
15420
a1358604
DJ
154212002-11-20 Daniel Jacobowitz <drow@mvista.com>
15422
15423 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15424 defined(PT_FPR0_HI).
15425
23ce3b1c
DJ
154262002-11-17 Stuart Hughes <seh@zee2.com>
15427
15428 * linux-arm-low.c (arm_num_regs): Increase.
15429 (arm_regmap): Include status register.
15430
154312002-11-17 Daniel Jacobowitz <drow@mvista.com>
15432
15433 * linux-low.c (register_addr): Remove incorrect -1 check.
15434
a9fa9f7d
DJ
154352002-08-29 Daniel Jacobowitz <drow@mvista.com>
15436
15437 * linux-low.c (linux_create_inferior): Call setpgid. Return
15438 the new PID.
15439 (unstopped_p, linux_signal_pid): Remove.
15440 (linux_target_ops): Remove linux_signal_pid.
15441 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15442 global instead of target method.
15443 * target.h (struct target_ops): Remove signal_pid. Update comment
15444 for create_inferior.
15445 * server.c (signal_pid): New variable.
15446 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 15447 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
15448 (attach_inferior): Set signal_pid.
15449
17574093
DJ
154502002-08-23 Daniel Jacobowitz <drow@mvista.com>
15451
15452 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15453
154542002-08-20 Jim Blandy <jimb@redhat.com>
15455
15456 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15457 default for this.
15458
154592002-08-01 Andrew Cagney <cagney@redhat.com>
15460
15461 * Makefile.in: Make chill references obsolete.
15462
154632002-07-24 Kevin Buettner <kevinb@redhat.com>
15464
15465 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15466 * configure: Regenerate.
15467 * config.in: Regenerate.
15468
154692002-07-09 David O'Brien <obrien@FreeBSD.org>
15470
15471 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15472 (perror_with_name, remote_close, remote_open, expect, play): Static.
15473
154742002-07-04 Michal Ludvig <mludvig@suse.cz>
15475
4b8dad4a 15476 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
15477 byte offsets instead of an array of indexes.
15478 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15479
154802002-06-13 Daniel Jacobowitz <drow@mvista.com>
15481
15482 * regcache.c: Add comment.
15483
154842002-06-11 Daniel Jacobowitz <drow@mvista.com>
15485
15486 * thread-db.c: New file.
15487 * proc-service.c: New file.
15488 * acinclude.m4: New file.
15489 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15490 proc-service.o, and thread-db.o.
15491 (linux-low.o): Add USE_THREAD_DB.
15492 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15493 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15494 * aclocal.m4: Regenerated.
15495 * config.in: Regenerated.
15496 * configure: Regenerated.
15497 * configure.in: Check for proc_service.h, sys/procfs.h,
15498 thread_db.h, and linux/elf.h headrs.
15499 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15500 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15501 Check for -lthread_db and thread support.
15502 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15503 PowerPC, and SuperH.
15504 * i387-fp.c: Constify arguments.
15505 * i387-fp.h: Likewise.
15506 * inferiors.c: (struct thread_info): Renamed from
15507 `struct inferior_info'. Remove PID member. Use generic inferior
15508 list header. All uses updated.
15509 (inferiors, signal_pid): Removed.
15510 (all_threads): New variable.
15511 (get_thread): Define.
15512 (add_inferior_to_list): New function.
15513 (for_each_inferior): New function.
15514 (change_inferior_id): New function.
15515 (add_inferior): Removed.
15516 (remove_inferior): New function.
15517 (add_thread): New function.
15518 (free_one_thread): New function.
15519 (remove_thread): New function.
15520 (clear_inferiors): Use for_each_inferior and free_one_thread.
15521 (find_inferior): New function.
15522 (find_inferior_id): New function.
15523 (inferior_target_data): Update argument type.
15524 (set_inferior_target_data): Likewise.
15525 (inferior_regcache_data): Likewise.
15526 (set_inferior_regcache_data): Likewise.
15527 * linux-low.c (linux_bp_reinsert): Remove.
15528 (all_processes, stopping_threads, using_thrads)
15529 (struct pending_signals, debug_threads, pid_of): New.
15530 (inferior_pid): Replace with macro.
15531 (struct inferior_linux_data): Remove.
15532 (get_stop_pc, add_process): New functions.
15533 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15534 Use add_process and add_thread.
15535 (linux_attach_lwp): New function, based on old linux_attach. Use
15536 add_process and add_thread. Set stop_expected for new threads.
15537 (linux_attach): New function.
15538 (linux_kill_one_process): New function.
15539 (linux_kill): Kill all LWPs.
15540 (linux_thread_alive): Use find_inferior_id.
15541 (check_removed_breakpoints, status_pending_p): New functions.
15542 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15543 Update. Use WNOHANG. Wait for cloned processes also. Update process
15544 struct for the found process.
15545 (linux_wait_for_event): New function.
15546 (linux_wait): Use it. Support LWPs.
15547 (send_sigstop, wait_for_sigstop, stop_all_processes)
15548 (linux_resume_one_process, linux_continue_one_process): New functions.
15549 (linux_resume): Support LWPs.
15550 (REGISTER_RAW_SIZE): Remove.
15551 (fetch_register): Use register_size instead. Call supply_register.
15552 (usr_store_inferior_registers): Likewise. Call collect_register.
15553 Fix recursive case.
15554 (regsets_fetch_inferior_registers): Improve error message.
15555 (regsets_store_inferior_registers): Add debugging.
15556 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15557 (unstopped_p, linux_signal_pid): New functions.
15558 (linux_target_ops): Add linux_signal_pid.
15559 (linux_init_signals): New function.
15560 (initialize_low): Call it. Initialize using_threads.
15561 * regcache.c (inferior_regcache_data): Add valid
15562 flag.
15563 (get_regcache): Fetch registers lazily. Add fetch argument
15564 and update all callers.
15565 (regcache_invalidate_one, regcache_invalidate): New
15566 functions.
15567 (new_register_cache): Renamed from create_register_cache.
15568 Return the new regcache.
15569 (free_register_cache): Change argument to a void *.
15570 (registers_to_string, registers_from_string): Call get_regcache
15571 with fetch flag set.
15572 (register_data): Make static. Pass fetch flag to get_regcache.
15573 (supply_register): Call get_regcache with fetch flag clear.
15574 (collect_register): Call get_regcache with fetch flag set.
15575 (collect_register_as_string): New function.
15576 * regcache.h: Update.
15577 * remote-utils.c (putpkt): Flush after debug output and use
15578 stderr.
15579 Handle input interrupts while waiting for an ACK.
15580 (input_interrupt): Use signal_pid method.
15581 (getpkt): Flush after debug output and use stderr.
15582 (outreg): Use collect_register_as_string.
15583 (new_thread_notify, dead_thread_notify): New functions.
15584 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15585 and general_thread.
15586 (look_up_one_symbol): Flush after debug output.
15587 * server.c (step_thread, server_waiting): New variables.
15588 (start_inferior): Don't use signal_pid. Update call to mywait.
15589 (attach_inferior): Update call to mywait.
15590 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15591 (main): Don't fetch/store registers explicitly. Use
15592 set_desired_inferior. Support proposed ``Hs'' packet. Update
15593 calls to mywait.
15594 * server.h: Update.
15595 (struct inferior_list, struct_inferior_list_entry): New.
15596 * target.c (set_desired_inferior): New.
15597 (write_inferior_memory): Constify.
15598 (mywait): New function.
15599 * target.h: Update.
15600 (struct target_ops): New signal_pid method.
15601 (mywait): Removed macro, added prototype.
15602
15603 * linux-low.h (regset_func): Removed.
15604 (regset_fill_func, regset_store_func): New.
15605 (enum regset_type): New.
15606 (struct regset_info): Add type field. Use new operation types.
15607 (struct linux_target_ops): stop_pc renamed to get_pc.
15608 Add decr_pc_after_break and breakpoint_at.
15609 (get_process, get_thread_proess, get_process_thread)
15610 (strut process_info, all_processes, linux_attach_lwp)
15611 (thread_db_init): New.
15612
15613 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15614 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15615 (the_low_target): Add new members.
15616 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15617 (i386_store_fpxregset): Constify.
15618 (target_regsets): Add new kind identifier.
15619 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15620 (i386_set_pc): Add debugging.
15621 (i386_breakpoint_at): New function.
15622 (the_low_target): Add new members.
15623 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15624 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15625 (mips_breakpoint_at): New.
15626 (the_low_target): Add new members.
15627 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15628 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15629 (the_low_target): Add new members.
15630 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15631 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15632 (the_low_target): Add new members.
15633 * linux-x86-64-low.c (target_regsets): Add new kind
15634 identifier.
15635
156362002-05-15 Daniel Jacobowitz <drow@mvista.com>
15637
15638 From Martin Pool <mbp@samba.org>:
15639 * server.c (gdbserver_usage): New function.
15640 (main): Call it.
15641
156422002-05-14 Daniel Jacobowitz <drow@mvista.com>
15643
15644 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15645 stop_at -> stop_pc.
15646
156472002-05-04 Andrew Cagney <ac131313@redhat.com>
15648
15649 * Makefile.in: Remove obsolete code.
15650
156512002-04-24 Michal Ludvig <mludvig@suse.cz>
15652
15653 * linux-low.c (regsets_fetch_inferior_registers),
15654 (regsets_store_inferior_registers): Removed cast to int from
15655 ptrace() calls.
15656 * regcache.h: Added declaration of struct inferior_info.
15657
156582002-04-20 Daniel Jacobowitz <drow@mvista.com>
15659
15660 * inferiors.c (struct inferior_info): Add regcache_data.
15661 (add_inferior): Call create_register_cache.
15662 (clear_inferiors): Call free_register_cache.
15663 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15664 * regcache.c (struct inferior_regcache_data): New.
15665 (registers): Remove.
15666 (get_regcache): New function.
15667 (create_register_cache, free_register_cache): New functions.
15668 (set_register_cache): Don't initialize the register cache here.
15669 (registers_to_string, registers_from_string, register_data): Call
15670 get_regcache.
15671 * regcache.h: Add prototypes.
15672 * server.h: Likewise.
15673
156742002-04-20 Daniel Jacobowitz <drow@mvista.com>
15675
15676 * mem-break.c: New file.
15677 * mem-break.h: New file.
15678 * Makefile.in: Add mem-break.o rule; update server.h
15679 dependencies.
15680 * inferiors.c (struct inferior_info): Add target_data
15681 member.
15682 (clear_inferiors): Free target_data member if set.
15683 (inferior_target_data, set_inferior_target_data): New functions.
15684 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15685 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15686 * linux-low.c (linux_bp_reinsert): New variable.
15687 (struct inferior_linux_data): New.
15688 (linux_create_inferior): Use set_inferior_target_data.
15689 (linux_attach): Likewise. Call add_inferior.
15690 (linux_wait_for_one_inferior): New function.
15691 (linux_wait): Call it.
15692 (linux_write_memory): Add const.
15693 (initialize_low): Call set_breakpoint_data.
15694 * linux-low.h (struct linux_target_ops): Add breakpoint
15695 handling members.
15696 * server.c (attach_inferior): Remove extra add_inferior
15697 call.
15698 * server.h: Include mem-break.h. Update inferior.c
15699 prototypes.
15700 * target.c (read_inferior_memory)
15701 (write_inferior_memory): New functions.
15702 * target.h (read_inferior_memory)
15703 (write_inferior_memory): Change macros to prototypes.
15704 (struct target_ops): Update comments. Add const to write_memory
15705 definition.
15706
157072002-04-11 Daniel Jacobowitz <drow@mvista.com>
15708
15709 * linux-low.c (usr_store_inferior_registers): Support
15710 registers which are allowed to fail to store.
15711 * linux-low.h (linux_target_ops): Likewise.
15712 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15713 (ppc_cannot_store_register): FPSCR may not be storable.
15714
157152002-04-09 Daniel Jacobowitz <drow@mvista.com>
15716
15717 * server.h: Include <string.h> if HAVE_STRING_H.
15718 * ChangeLog: Correct paths in last ChangeLog entry.
15719
157202002-04-09 Daniel Jacobowitz <drow@mvista.com>
15721
15722 * linux-low.h: Remove obsolete prototypes.
15723 (struct linux_target_ops): New.
15724 (extern the_low_target): New.
15725 * linux-low.c (num_regs, regmap): Remove declarations.
15726 (register_addr): Use the_low_target explicitly.
15727 (fetch_register): Likewise.
15728 (usr_fetch_inferior_registers): Likewise.
15729 (usr_store_inferior_registers): Likewise.
15730 * linux-arm-low.c (num_regs): Remove.
15731 (arm_num_regs): Define.
15732 (arm_regmap): Renamed from regmap, made static.
15733 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15734 made static.
15735 (arm_cannot_store_register): Renamed from cannot_store_register,
15736 made static.
15737 (the_low_target): New.
15738 * linux-i386-low.c (num_regs): Remove.
15739 (i386_num_regs): Define.
15740 (i386_regmap): Renamed from regmap, made static.
15741 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15742 made static.
15743 (i386_cannot_store_register): Renamed from cannot_store_register,
15744 made static.
15745 (the_low_target): New.
15746 * linux-ia64-low.c (num_regs): Remove.
15747 (ia64_num_regs): Define.
15748 (ia64_regmap): Renamed from regmap, made static.
15749 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15750 made static.
15751 (ia64_cannot_store_register): Renamed from cannot_store_register,
15752 made static.
15753 (the_low_target): New.
15754 * linux-m68k-low.c (num_regs): Remove.
15755 (m68k_num_regs): Define.
15756 (m68k_regmap): Renamed from regmap, made static.
15757 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15758 made static.
15759 (m68k_cannot_store_register): Renamed from cannot_store_register,
15760 made static.
15761 (the_low_target): New.
15762 * linux-mips-low.c (num_regs): Remove.
15763 (mips_num_regs): Define.
15764 (mips_regmap): Renamed from regmap, made static.
15765 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15766 made static.
15767 (mips_cannot_store_register): Renamed from cannot_store_register,
15768 made static.
15769 (the_low_target): New.
15770 * linux-ppc-low.c (num_regs): Remove.
15771 (ppc_num_regs): Define.
15772 (ppc_regmap): Renamed from regmap, made static.
15773 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15774 made static.
15775 (ppc_cannot_store_register): Renamed from cannot_store_register,
15776 made static.
15777 (the_low_target): New.
15778 * linux-s390-low.c (num_regs): Remove.
15779 (s390_num_regs): Define.
15780 (s390_regmap): Renamed from regmap, made static.
15781 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15782 made static.
15783 (s390_cannot_store_register): Renamed from cannot_store_register,
15784 made static.
15785 (the_low_target): New.
15786 * linux-sh-low.c (num_regs): Remove.
15787 (sh_num_regs): Define.
15788 (sh_regmap): Renamed from regmap, made static.
15789 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15790 made static.
15791 (sh_cannot_store_register): Renamed from cannot_store_register,
15792 made static.
15793 (the_low_target): New.
15794 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15795 (the_low_target): New.
15796
157972002-04-09 Daniel Jacobowitz <drow@mvista.com>
15798
15799 * Makefile.in: Add stamp-h target.
15800 * configure.in: Create stamp-h.
15801 * configure: Regenerated.
15802
158032002-04-09 Daniel Jacobowitz <drow@mvista.com>
15804
15805 * inferiors.c: New file.
15806 * target.c: New file.
15807 * target.h: New file.
15808 * Makefile.in: Add target.o and inferiors.o. Update
15809 dependencies.
15810 * linux-low.c (inferior_pid): New static variable,
15811 moved from server.c.
15812 (linux_create_inferior): Renamed from create_inferior.
15813 Call add_inferior. Return 0 on success instead of a PID.
15814 (linux_attach): Renamed from myattach.
15815 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15816 (linux_thread_alive): Renamed from mythread_alive.
15817 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15818 child dies.
15819 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15820 (regsets_store_inferior_registers): Correct error message.
15821 Add missing ``return 0''.
15822 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15823 (linux_store_registers): Renamed from store_inferior_registers.
15824 (linux_read_memory): Renamed from read_inferior_memory.
15825 (linux_write_memory): Renamed from write_inferior_memory.
15826 (linux_target_ops): New structure.
15827 (initialize_low): Call set_target_ops ().
15828 * remote-utils.c (unhexify): New function.
15829 (hexify): New function.
15830 (input_interrupt): Send signals to ``signal_pid''.
15831 * server.c (inferior_pid): Remove.
15832 (start_inferior): Update create_inferior call.
15833 (attach_inferior): Call add_inferior.
15834 (handle_query): New function.
15835 (main): Call handle_query for `q' packets.
15836 * server.h: Include "target.h". Remove obsolete prototypes.
15837 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15838
158392002-04-09 Daniel Jacobowitz <drow@mvista.com>
15840
15841 * Makefile.in: Add WARN_CFLAGS. Update configury
15842 dependencies.
15843 * configure.in: Check for <string.h>
15844 * configure: Regenerate.
15845 * config.in: Regenerate.
15846 * gdbreplay.c: Include needed system headers.
15847 (remote_open): Remove strchr prototype.
15848 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15849 * regcache.c (supply_register): Change buf argument to const void *.
15850 (supply_register_by_name): Likewise.
15851 (collect_register): Change buf argument to void *.
15852 (collect_register_by_name): Likewise.
15853 * regcache.h: Add missing prototypes.
15854 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15855 * server.c (handle_query): New function.
15856 (attached): New static variable, moved out of main.
15857 (main): Quiet longjmp clobber warnings.
15858 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15859 * utils.c (error): Remove NORETURN.
15860 (fatal): Likewise.