Make open_fds an std::vector
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
e849ea89
PA
12017-11-16 Pedro Alves <palves@redhat.com>
2
3 * remote-utils.c (remote_close): Block SIGIO signals instead of
4 uninstalling the SIGIO handler.
5
1d0aa65c
AH
62017-11-16 Alan Hayward <alan.hayward@arm.com>
7
8 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
9
3491a34c
YQ
102017-11-16 Yao Qi <yao.qi@linaro.org>
11
12 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
13 (tic6x_store_gregset): Likewise.
14 (tic6x_usrregs_info): Move it up.
15
a602f924
AH
162017-11-15 Alan Hayward <alan.hayward@arm.com>
17
18 * Makefile.in: Update arch rules.
19 * configure.srv: Explicitly mark arch/ files.
20
5616b6c3
AS
212017-11-13 Andreas Schwab <schwab@suse.de>
22
23 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
24 function.
25 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
26
d1928160
PA
272017-11-06 Pedro Alves <palves@redhat.com>
28
29 * config.in, configure: Regenerate.
30
bac608e7
SM
312017-10-27 Simon Marchi <simon.marchi@ericsson.com>
32
33 * target.c (struct thread_search): Remove.
34 (thread_search_callback): Remove.
35 (prepare_to_access_memory): Use for_each_thread instead of
36 find_inferior. Inline code from thread_search_callback.
37
eaddb425
SM
382017-10-27 Simon Marchi <simon.marchi@ericsson.com>
39
40 * server.c (struct visit_actioned_threads_data): Remove.
41 (visit_actioned_threads): Change prototype to take arguments
42 directly.
43 (resume): Use find_thread instead of find_inferior.
44
99078d34
SM
452017-10-27 Simon Marchi <simon.marchi@ericsson.com>
46
47 * server.c (queue_stop_reply_callback): Change prototype, return
48 void.
49 (find_status_pending_thread_callback): Remove.
50 (handle_status): Replace find_inferior with find_thread and
51 for_each_thread.
52
cc628f3d
AH
532017-10-25 Alan Hayward <alan.hayward@arm.com>
54
55 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
56 with REGNO.
57 (aarch64_store_gregset): Likewise.
58 (aarch64_fill_fpregset): Likewise.
59 (aarch64_store_fpregset): Likewise.
60
4d3bb80e
SM
612017-10-21 Simon Marchi <simon.marchi@ericsson.com>
62
63 * gdbthread.h (find_thread, for_each_thread): New functions.
64 * inferiors.c (thread_of_pid): Remove.
65 (find_any_thread_of_pid): Use find_thread.
66 * linux-low.c (num_lwps): Use for_each_thread.
67
7a7cdfa0
YQ
682017-10-17 Yao Qi <yao.qi@linaro.org>
69
70 * Makefile.in: Remove one rule.
71 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
72
e675d170
YQ
732017-10-17 Yao Qi <yao.qi@linaro.org>
74
75 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
76 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
77
7eb4e0f9
YQ
782017-10-17 Yao Qi <yao.qi@linaro.org>
79
80 * configure.srv: Rename arm.o with arch/arm.o.
81
60d6cfc9
YQ
822017-10-17 Yao Qi <yao.qi@linaro.org>
83
84 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
85 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
86 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
87 (arch-i386.o, arch-amd64.o): Remove rules.
88 (arch/%.o): New rule.
89 Update POSTCOMPILE and COMPILE.pre.
90 * configure.ac: Invoke AC_CONFIG_COMMANDS.
91 * configure: Re-generated.
92 * configure.srv: Replace arch-i386.o with arch/i386.o.
93 Replace arch-amd64.o with arch/amd64.o.
94
5bfda255
YQ
952017-10-16 Yao Qi <yao.qi@linaro.org>
96
97 * configure: Regenerated.
98
9c80ecd6
SM
992017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
100
101 * inferiors.h: (struct inferior_list): Remove.
102 (struct inferior_list_entry); Remove.
103 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
104 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
105 get_first_inferior): Remove.
106 (for_each_inferior, for_each_inferior_with_data, find_inferior,
107 find_inferior_id, find_inferior_in_random): Change signature.
108 * inferiors.c (all_threads): Change type to
109 std::list<thread_info *>.
110 (get_thread): Remove macro.
111 (find_inferior, find_inferior_id): Change signature, implement
112 using find_thread.
113 (find_inferior_in_random): Change signature, implement using
114 find_thread_in_random.
115 (for_each_inferior, for_each_inferior_with_data): Change
116 signature, implement using for_each_thread.
117 (add_inferior_to_list, remove_inferior): Remove.
118 (add_thread, get_first_thread, thread_of_pid,
119 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
120 (get_first_inferior, one_inferior_p, clear_inferior_list):
121 Remove.
122 (clear_inferiors, get_thread_process): Update.
123 * gdbthread.h: Include <list>.
124 (struct thread_info) <entry>: Remove field.
125 <id>: New field.
126 (all_threads): Change type to std::list<thread_info *>.
127 (get_first_inferior): Add doc.
128 (find_thread, for_each_thread, find_thread_in_random): New
129 functions.
130 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
131 * linux-arm-low.c (update_registers_callback): Update.
132 * linux-low.c (second_thread_of_pid_p): Update.
133 (kill_one_lwp_callback, linux_detach_lwp_callback,
134 delete_lwp_callback, status_pending_p_callback, same_lwp,
135 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
136 iterate_over_lwps, not_stopped_callback,
137 resume_stopped_resumed_lwps, count_events_callback,
138 select_singlestep_lwp_callback, select_event_lwp_callback,
139 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
140 suspend_and_send_sigstop_callback, wait_for_sigstop,
141 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
142 lwp_running, linux_set_resume_request, resume_status_pending_p,
143 need_step_over_p, start_step_over, linux_resume_one_thread,
144 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
145 reset_lwp_ptrace_options_callback): Update.
146 * linux-mips-low.c (update_watch_registers_callback): Update.
147 * regcache.c (regcache_invalidate_one, regcache_invalidate):
148 Update.
149 (free_register_cache_thread_one): Remove.
150 (regcache_release): Update.
151 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
152 handle_qxfer_threads_worker): Update.
153 (handle_query): Update, use list iterator.
154 (visit_actioned_threads, handle_pending_status,
155 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
156 clear_pending_status_callback, set_pending_status_callback,
157 find_status_pending_thread_callback, handle_status,
158 process_serial_event): Update.
159 * target.c (thread_search_callback): Update.
160 * thread-db.c (thread_db_get_tls_address): Update.
161 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
162 Update.
163 * win32-i386-low.c (update_debug_registers_callback): Update.
164 * win32-low.c (delete_thread_info, child_delete_thread,
165 continue_one_thread, suspend_one_thread,
166 get_child_debug_event): Adjust.
167
9179355e
SM
1682017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
169
170 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
171 * inferiors.h: Include <list>.
172 (struct process_info) <entry>: Remove field.
173 <pid>: New field.
174 (pid_of): Change macro to function.
175 (ptid_of, lwpid_of): Remove macro.
176 (all_processes): Change type to std::list<process_info *>.
177 (ALL_PROCESSES): Remove macro.
178 (for_each_process, find_process): New function.
179 * inferiors.c (all_processes): Change type to
180 std::list<process_info *>.
181 (find_thread_process): Adjust.
182 (add_process): Likewise.
183 (remove_process): Likewise.
184 (find_process_pid): Likewise.
185 (get_first_process): Likewise.
186 (started_inferior_callback): Remove.
187 (have_started_inferiors_p): Adjust.
188 (attached_inferior_callback): Remove.
189 (have_attached_inferiors_p): Adjust.
190 * linux-low.c (check_zombie_leaders): Likewise.
191 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
192 (x86_linux_update_xmltarget): Adjust.
193 * server.c (handle_query): Likewise.
194 (gdb_reattached_process): Remove.
195 (handle_status): Adjust.
196 (kill_inferior_callback): Likewise.
197 (detach_or_kill_inferior): Remove.
198 (print_started_pid): Likewise.
199 (print_attached_pid): Likewise.
200 (detach_or_kill_for_exit): Update.
201 (process_serial_event): Likewise.
202 * linux-arm-low.c (arm_new_fork): Likewise.
203
c9cb8905
SM
2042017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
205
206 * dll.h: Include <list>.
207 (struct dll_info): Add constructor.
208 <entry>: Remove field.
209 (all_dlls): Change type to std::list<dll_info>.
210 * dll.c: Include <algorithm>.
211 (get_dll): Remove macro.
212 (all_dlls): Change type to std::list<dll_info *>.
213 (free_one_dll): Remove.
214 (match_dll): Likewise.
215 (loaded_dll): Adjust.
216 (unloaded_dll): Adjust to all_dlls type change, use
217 std::find_if. Inline code from match_dll.
218 (clear_dlls): Adjust to all_dlls type change.
219 * server.c (emit_dll_description): Remove.
220 (handle_qxfer_libraries): Adjust to all_dlls type change,
221 integrate emit_dll_description's functionality.
222
04ec7890
SM
2232017-10-12 Simon Marchi <simon.marchi@ericsson.com>
224
225 * linux-low.h (struct linux_target_ops) <delete_process>: New
226 field.
227 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
228 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
229 (struct linux_target_ops): Add delete_process callback.
230 * linux-arm-low.c (arm_delete_process): New.
231 (struct linux_target_ops): Add delete_process callback.
232 * linux-bfin-low.c (struct linux_target_ops): Likewise.
233 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
234 * linux-m32r-low.c (struct linux_target_ops): Likewise.
235 * linux-mips-low.c (mips_linux_delete_process): New.
236 (struct linux_target_ops): Add delete_process callback.
237 * linux-ppc-low.c (struct linux_target_ops): Likewise.
238 * linux-s390-low.c (struct linux_target_ops): Likewise.
239 * linux-sh-low.c (struct linux_target_ops): Likewise.
240 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
241 * linux-tile-low.c (struct linux_target_ops): Likewise.
242 * linux-x86-low.c (x86_linux_delete_process): New.
243 (struct linux_target_ops): Add delete_process callback.
244 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
245
466eecee
SM
2462017-10-12 Simon Marchi <simon.marchi@ericsson.com>
247
248 * linux-aarch64-low.c (the_low_target): Add thread delete
249 callback.
250 * linux-arm-low.c (arm_delete_thread): New function.
251 (the_low_target): Add thread delete callback.
252 * linux-bfin-low.c (the_low_target): Likewise.
253 * linux-crisv32-low.c (the_low_target): Likewise.
254 * linux-low.c (delete_lwp): Invoke delete_thread callback if
255 set.
256 * linux-low.h (struct linux_target_ops) <delete_thread>: New
257 field.
258 * linux-m32r-low.c (the_low_target): Add thread delete callback.
259 * linux-mips-low.c (mips_linux_delete_thread): New function.
260 (the_low_target): Add thread delete callback.
261 * linux-ppc-low.c (the_low_target): Likewise.
262 * linux-s390-low.c (the_low_target): Likewise.
263 * linux-sh-low.c (the_low_target): Likewise.
264 * linux-tic6x-low.c (the_low_target): Likewise.
265 * linux-tile-low.c (the_low_target): Likewise.
266 * linux-x86-low.c (the_low_target): Likewise.
267 * linux-xtensa-low.c (the_low_target): Likewise.
268
b79f7801
YZ
2692017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
270
271 * win32-low.c: Include "common-inferior.h".
272
bc3b087d
SDJ
2732017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
274
275 * inferiors.c (set_inferior_cwd): New function.
276 * server.c (handle_general_set): Handle QSetWorkingDir packet.
277 (handle_query): Inform that QSetWorkingDir is supported.
278 * win32-low.c (create_process): Pass the inferior's cwd to
279 CreateProcess.
280
d092c5a2
SDJ
2812017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
282
283 * inferiors.c (current_inferior_cwd): New global variable.
284 (get_inferior_cwd): New function.
285 * inferiors.h (struct process_info) <cwd>: New field.
286
7da0a886
SDJ
2872017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
288
289 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
290 (OBS): Add gdb_tilde_expand.o.
291
289a6840
SM
2922017-10-02 Simon Marchi <simon.marchi@ericsson.com>
293
294 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
295 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
296
256642e8
PA
2972017-09-29 Pedro Alves <palves@redhat.com>
298
299 * ax.c (gdb_parse_agent_expr): Constify.
300 * ax.h (gdb_parse_agent_expr): Constify.
301 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
302 Constify.
303 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
304 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
305 * remote-utils.h (read_ptid): Constify.
306 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
307 (process_point_options, process_serial_event): Constify.
308 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
309 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
310 (cmd_qtbuffer): Constify.
311
5b9ca4d4
PA
3122017-09-29 Pedro Alves <palves@redhat.com>
313
314 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
315 fails.
316
94c207e0
PA
3172017-09-29 Pedro Alves <palves@redhat.com>
318
319 * linux-low.c (handle_extended_wait): Pass parent thread instead
320 of process to thread_db_notice_clone.
321 * linux-low.h (thread_db_notice_clone): Replace parent process
322 parameter with parent thread parameter.
323 * thread-db.c (find_one_thread): Add comment.
324 (thread_db_notice_clone): Replace parent process parameter with
325 parent thread parameter. Temporarily switch to the parent thread.
326
75352e28
SDJ
3272017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
328
329 * gdbthread.h: Include "common-gdbthread.h".
330 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
331 "if" when validating the ptid.
332 * remote-utils.c: Include "gdbthread.h".
333 (prepare_resume_reply): Use "switch_to_thread".
334 * target.c (done_accessing_memory): Likewise.
335
ad339634
AA
3362017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
337
338 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
339 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
340 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
341 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
342 s390x-gs-linux64-ipa.o to ipa_obj.
343 * linux-s390-low.c (HWCAP_S390_GS): New define.
344 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
345 New functions.
346 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
347 (s390_arch_setup): Check for guarded-storage support and choose
348 appropriate tdesc.
349 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
350 init_registers_s390x_gs_linux64.
351 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
352 enum value.
353 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
354 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
355
cc4d742f
SM
3562017-09-22 Simon Marchi <simon.marchi@ericsson.com>
357
358 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
359
f6327dcb
KB
3602017-09-21 Kevin Buettner <kevinb@redhat.com>
361
362 * linux-low.h (struct lwp_info): Add new field, thread_handle.
363 (thread_db_thread_handle): Declare.
364 * linux-low.c (linux_target_ops): Initialize thread_handle.
365 * server.c (handle_qxfer_threads_worker): Add support for
366 "handle" attribute.
367 * target.h (struct target_ops): Add new function pointer,
368 thread_handle.
369 (target_thread_handle): Define.
370 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
371 field in lwp.
372 (thread_db_thread_handle): New function.
373
86299109
KB
3742017-09-21 Kevin Buettner <kevinb@redhat.com>
375
376 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
377 * linux-low.h (thread_db_notice_clone): Declare.
378 * thread-db.c (thread_db_notice_clone): New function.
379
f557a88a
PA
3802017-09-21 Pedro Alves <palves@redhat.com>
381
382 * server.c (gdb_read_memory, handle_status, process_serial_event)
383 (handle_serial_event, handle_target_event): Adjust to
384 set_desired_thread prototype change.
385 * target.c (set_desired_thread): Remove 'use_general' parameter
386 and adjust.
387 * target.h (set_desired_thread): Remove 'use_general' parameter.
388
223ffa71
TT
3892017-09-20 Tom Tromey <tom@tromey.com>
390
391 * target.c (target_terminal::terminal_state): Define.
392 (target_terminal::init): Rename from target_terminal_init.
393 (target_terminal::inferior): Rename from
394 target_terminal_inferior.
395 (target_terminal::ours): Rename from target_terminal_ours.
396 (target_terminal::ours_for_output, target_terminal::info): New.
397
04fd3ba9
SM
3982017-09-16 Simon Marchi <simon.marchi@ericsson.com>
399
400 * server.c (accumulate_file_name_length): Remove.
401 (emit_dll_description): Adjust to std::string change.
402 (handle_qxfer_libraries): Use std::string to hold document.
403
5e187554
SM
4042017-09-16 Simon Marchi <simon.marchi@ericsson.com>
405
406 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
407 return type of xml_escape_text.
408 * server.c (emit_dll_description): Likewise.
409
1526853e
SM
4102017-09-16 Simon Marchi <simon.marchi@ericsson.com>
411
412 * server.c (captured_main): Accept argument for --selftest.
413 Update run_tests call.
414 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
415 when registering selftests.
416
c4dfafab
SDJ
4172017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
418
419 * regcache.c (get_thread_regcache): Update code to use "std::vector"
420 instead of "VEC" for "target_desc.reg_defs".
421 (regcache_cpy): Likewise.
422 (registers_to_string): Likewise.
423 (registers_from_string): Likewise.
424 (find_regno): Likewise.
425 (supply_regblock): Likewise.
426 (regcache_raw_read_unsigned): Likewise.
427 * tdesc.c (init_target_desc): Likewise.
428 (tdesc_create_reg): Likewise.
429 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
430 (struct target_desc) <reg_defs>: Convert to "std::vector".
431 (target_desc): Do not initialize "reg_defs".
432 (~target_desc): Update code to use "std::vector" instead of "VEC"
433 for "target_desc.reg_defs".
434 (operator==): Likewise.
435
124aceb4
SM
4362017-09-15 Simon Marchi <simon.marchi@ericsson.com>
437
438 * inferiors.h (thread_to_gdb_id): Remove.
439 * inferiors.c (thread_to_gdb_id): Remove.
440 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
441 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
442 lynx_store_registers, lynx_read_memory, lynx_write_memory):
443 Likewise.
444 * nto-low.c (nto_fetch_registers, nto_store_registers,
445 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
446
96cde54f
SM
4472017-09-15 Simon Marchi <simon.marchi@ericsson.com>
448
449 * inferiors.h (gdb_id_to_thread_id): Remove.
450 * inferiors.c (gdb_id_to_thread_id): Remove.
451 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
452 removal. Move pid declaration closer to where it's used.
453
e8ca139e
SM
4542017-09-15 Simon Marchi <simon.marchi@ericsson.com>
455
456 * server.c (handle_detach): New function.
457 (process_serial_event): Move code out, call handle_detach.
458
f8a4e119
SM
4592017-09-15 Simon Marchi <simon.marchi@ericsson.com>
460
461 * server.c (require_running): Rename to ...
462 (require_running_or_return): ... this ...
463 (require_running_or_break): ... and this.
464 (handle_query, process_serial_event): Adjust.
465
0eb0a407
SM
4662017-09-15 Simon Marchi <simon.marchi@ericsson.com>
467
468 * linux-low.c (linux_set_resume_request): Remove unused
469 variables.
470
785922a5
SM
4712017-09-15 Simon Marchi <simon.marchi@ericsson.com>
472
473 * server.c (first_thread_of): Remove.
474 (process_serial_event): Replace usage of first_thread_of with
475 find_any_thread_of_pid.
476 * tracepoint.c (same_process_p): Remove.
477 (gdb_agent_about_to_close): Replace usage of same_process_p with
478 find_any_thread_of_pid.
479 * linux-x86-low.c (same_process_callback): Remove.
480 (x86_arch_setup_process_callback): Replace usage of
481 same_process_callback with find_any_thread_of_pid.
482 * thread-db.c (any_thread_of): Remove.
483 (switch_to_process): Replace usage of any_thread_of with
484 find_any_thread_of_pid.
485 * inferiors.c (thread_pid_matches_callback): Remove.
486 (find_thread_process): Adjust to use find_any_thread_of_pid.
487
a059f00c
SDJ
4882017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
489
490 * regcache.c (get_thread_regcache): Guard calls to "memset"
491 with "!VEC_empty".
492
cc397f3a
SDJ
4932017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
494
495 * linux-low.c (handle_extended_wait): Use
496 "allocate_target_description" instead of "XNEW".
497 * linux-x86-low.c (initialize_low_arch): Likewise.
498
22916b07
YQ
4992017-09-05 Yao Qi <yao.qi@linaro.org>
500
501 * configure.srv (srv_i386_regobj): Remove.
502 (srv_amd64_regobj): Remove.
503 (srv_regobj): Set it to "" for x86 non-linux targets.
504 * linux-x86-tdesc.c (i386_linux_read_description):
505 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
506 (init_registers_i386): Remove the declaration.
507 (tdesc_i386): Remove the declaration.
508 (lynx_i386_arch_setup): Call i386_create_target_description.
509 * nto-x86-low.c: Likewise.
510 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
511 [!__x86_64__]: include arch/i386.h.
512 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
513
38602d55
YQ
5142017-09-05 Yao Qi <yao.qi@linaro.org>
515
516 * configure.srv (srv_amd64_linux_xmlfiles): Remove
517 i386/amd64-XXX-linux from it.
518
44b886ff
YQ
5192017-09-05 Yao Qi <yao.qi@linaro.org>
520
521 * configure.srv: Empty srv_amd64_linux_regobj if $development is
522 false.
523 (ipa_amd64_linux_regobj): Remove.
524 (ipa_x32_linux_regobj): Remove.
525
b4570e4b
YQ
5262017-09-05 Yao Qi <yao.qi@linaro.org>
527
528 * Makefile.in (arch-amd64.o): New rule.
529 * configure.srv: Append arch-amd64.o.
530 * linux-amd64-ipa.c: Include common/x86-xstate.h.
531 (get_ipa_tdesc): Call amd64_linux_read_description.
532 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
533 and init_registers_amd64_XXX.
534 * linux-x86-low.c (x86_linux_read_description): Call
535 amd64_linux_read_description.
536 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
537 (initialize_low_arch): Don't call init_registers_x32_XXX and
538 init_registers_amd64_XXX.
539 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
540 and tdesc_amd64_XXX.
541 [__x86_64__] (amd64_tdesc_test): New function.
542 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
543 and init_registers_amd64_XXX.
544 * linux-x86-tdesc.c: Include arch/amd64.h.
545 (xcr0_to_tdesc_idx): New function.
546 (i386_linux_read_description): New function.
547 (amd64_get_ipa_tdesc_idx): New function.
548 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
549 (amd64_get_ipa_tdesc): Declare.
550
d1f28ea2
YQ
5512017-09-05 Yao Qi <yao.qi@linaro.org>
552
553 * configure.srv (srv_i386_linux_xmlfiles): Remove
554 i386/i386-XXX-linux.xml from it.
555
25a93583
YQ
5562017-09-05 Yao Qi <yao.qi@linaro.org>
557
558 * configure.srv: Set srv_i386_linux_regobj empty if $development
559 is false.
560 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
561 initialize_low_tdesc.
562 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
563 with #if initialize_low_tdesc.
564 * linux-x86-tdesc-selftest.c: New file.
565 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
566
5f035c07
YQ
5672017-09-05 Yao Qi <yao.qi@linaro.org>
568
569 * Makefile.in (arch-i386.o): New rule.
570 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
571 (x86_64-*-linux*): Likewise.
572 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
573 include arch/i386.h.
574 (i386_linux_read_description): Remove code and call
575 i386_create_target_description.
576 * tdesc.c (allocate_target_description): New function.
577 * tdesc.h (set_tdesc_architecture): Remove declaration.
578 (set_tdesc_osabi): Likewise.
579
0abe8a89
YQ
5802017-09-05 Yao Qi <yao.qi@linaro.org>
581
582 * linux-x86-tdesc.c: Don't include <inttypes.h>.
583 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
584 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
585 .xmltarget.
586 * server.c (get_features_xml): Call tdesc_get_features_xml.
587 * tdesc.c (set_tdesc_architecture): New function.
588 (set_tdesc_osabi): New function.
589 (tdesc_get_features_xml): New function.
590 (tdesc_create_feature): Add an argument.
591 * tdesc.h (struct target_desc) <features>: New field.
592 <arch, osabi>: New field.
593 (~target_desc): xfree features, arch, and osabi.
594 (target_desc::oerator==): Don't compare .xmltarget.
595 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
596 (set_tdesc_osabi): Likewise.
597 (tdesc_get_features_xml): Likewise.
598
0a188386
YQ
5992017-09-05 Yao Qi <yao.qi@linaro.org>
600
601 * linux-x86-tdesc.c: Include selftest.h.
602 (i386_tdesc_test): New function.
603 (initialize_low_tdesc): Call selftests::register_test.
604 * tdesc.h: Include regdef.h.
605 (target_desc): Override operator == and !=.
606
f49ff000
YQ
6072017-09-05 Yao Qi <yao.qi@linaro.org>
608
609 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
610 (ipa_obj): Likewise.
611 * linux-i386-ipa.c: Include common/x86-xstate.h
612 (get_ipa_tdesc): Call i386_linux_read_description.
613 (initialize_low_tracepoint): Don't call init_registers_XXX
614 functions, call initialize_low_tdesc instead.
615 * linux-x86-low.c (x86_linux_read_description): Call
616 i386_linux_read_description.
617 (initialize_low_arch): Don't call init_registers_i386_XXX
618 functions, call initialize_low_tdesc.
619 * linux-x86-tdesc.c: New file.
620 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
621 (i386_get_ipa_tdesc_idx): Declare.
622 (i386_get_ipa_tdesc): Declare.
623 (initialize_low_tdesc): Declare.
624
2b68ef2f
YQ
6252017-09-05 Yao Qi <yao.qi@linaro.org>
626
627 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
628 instead of 0.
629
f7000548
YQ
6302017-09-05 Yao Qi <yao.qi@linaro.org>
631
632 * Makefile.in (IPA_OBJS): Add vec-ipa.o
633 * regcache.c (get_thread_regcache): Use VEC_length.
634 (init_register_cache): Likewise.
635 (regcache_cpy): Likewise.
636 (registers_to_string): Iterate reg_defs via VEC_iterate.
637 (find_regno): Likewise.
638 (find_register_by_number): Use VEC_index.
639 (register_size): Call find_register_by_number.
640 (register_data): Call find_register_by_number.
641 (supply_regblock): Use VEC_length.
642 (regcache_raw_read_unsigned): Likewise.
643 * tdesc.c (init_target_desc): Iterate reg_defs via
644 VEC_iterate.
645 (default_description): Update initializer.
646 (copy_target_description): Don't update field num_registers.
647 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
648 <num_registers>: Remove.
649
50a421ac
SM
6502017-09-04 Simon Marchi <simon.marchi@ericsson.com>
651
652 * Makefile.in (.SECONDARY): Define target.
653
23fdd69e
SM
6542017-09-03 Simon Marchi <simon.marchi@ericsson.com>
655
656 * linux-low.c (linux_wait_1): Adjust.
657 * server.c (queue_stop_reply_callback): Adjust.
658
0a2dde4a
SDJ
6592017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
660
661 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
662 QEnvironmentUnset and QEnvironmentReset packets.
663 (handle_query): Inform remote that QEnvironmentHexEncoded,
664 QEnvironmentUnset and QEnvironmentReset are supported.
665
6afd337d
SM
6662017-08-25 Simon Marchi <simon.marchi@ericsson.com>
667
668 * inferiors.h (inferior_target_data): Rename to ...
669 (thread_target_data): ... this.
670 (inferior_regcache_data): Rename to ...
671 (thread_regcache_data): ... this.
672 (set_inferior_regcache_data): Rename to ...
673 (set_thread_regcache_data): ... this.
674 * inferiors.c (inferior_target_data): Rename to ...
675 (thread_target_data): ... this.
676 (inferior_regcache_data): Rename to ...
677 (thread_regcache_data): ... this.
678 (set_inferior_regcache_data): Rename to ...
679 (set_thread_regcache_data): ... this.
680 (free_one_thread): Update.
681 * linux-low.h (get_thread_lwp): Update.
682 * regcache.c (get_thread_regcache): Update.
683 (regcache_invalidate_thread): Update.
684 (free_register_cache_thread): Update.
685 * win32-i386-low.c (update_debug_registers_callback): Update.
686 (win32_get_current_dr): Update.
687 * win32-low.c (thread_rec): Update.
688 (delete_thread_info): Update.
689 (continue_one_thread): Update.
690 (suspend_one_thread): Update.
691
a160cc46
SM
6922017-08-24 Simon Marchi <simon.marchi@ericsson.com>
693
694 * inferiors.c (set_inferior_target_data): Remove.
695 * inferiors.h (set_inferior_target_data): Remove.
696
6d580b63
YQ
6972017-08-18 Yao Qi <yao.qi@linaro.org>
698
699 * Makefile.in (OBS): Add selftest.o.
700 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
701 * configure, config.in: Re-generated.
702 * server.c: Include common/sefltest.h.
703 (captured_main): Handle option --selftest.
704
f5a29eb0
YQ
7052017-08-09 Yao Qi <yao.qi@linaro.org>
706
707 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
708 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
709 i386-avx-mpx.o and i386-mmx.o.
710 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
711 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
712 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
713 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
714 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
715 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
716 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
717 i386/amd64-avx-mpx.xml.
718
57757c2f
YQ
7192017-08-09 Yao Qi <yao.qi@linaro.org>
720
721 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
722 and x32-avx-avx512.o.
723 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
724 i386/x32-avx-avx512.xml.
725
229d26fc
SM
7262017-07-26 Simon Marchi <simon.marchi@ericsson.com>
727
728 * tracepoint.h (enum class fast_tpoint_collect_result): New
729 enumeration.
730 (fast_tracepoint_collecting): Change return type to
731 fast_tpoint_collect_result.
732 * tracepoint.c (fast_tracepoint_collecting): Likewise.
733 * linux-low.h: Include tracepoint.h.
734 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
735 fast_tpoint_collect_result.
736 * linux-low.c (handle_tracepoints): Adjust.
737 (linux_fast_tracepoint_collecting): Change return type to
738 fast_tpoint_collect_result.
739 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
740 linux_wait_1, stuck_in_jump_pad_callback,
741 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
742 proceed_one_lwp): Adjust to type change.
743
2e1e43e1
YQ
7442017-07-10 Yao Qi <yao.qi@linaro.org>
745
746 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
747
adc764e7
YQ
7482017-06-29 Yao Qi <yao.qi@linaro.org>
749
750 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
751 Remove.
752 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
753
a206891a
SM
7542017-06-20 Simon Marchi <simon.marchi@ericsson.com>
755
756 * Makefile.in (IPA_OBJS): Sort and format one item per line.
757
9a6c7d9c
SDJ
7582017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
759
760 * linux-low.c (linux_create_inferior): Adjust code to access the
761 environment information via 'gdb_environ' class.
762 * lynx-low.c (lynx_create_inferior): Likewise.
763 * server.c (our_environ): Make it an instance of 'gdb_environ'.
764 (get_environ): Return a pointer to 'our_environ'.
765 (captured_main): Initialize 'our_environ'.
766 * server.h (get_environ): Adjust prototype.
767 * spu-low.c (spu_create_inferior): Adjust code to access the
768 environment information via 'gdb_environ' class.
769
ae3e2ccf
SM
7702017-06-17 Simon Marchi <simon.marchi@ericsson.com>
771
772 * linux-low.c (linux_read_memory, linux_write_memory): Remove
773 usage of "register" keyword.
774
3e019bdc
SM
7752017-06-17 Simon Marchi <simon.marchi@ericsson.com>
776
777 * configure: Re-generate.
778
8465943a
SM
7792017-06-17 Simon Marchi <simon.marchi@ericsson.com>
780
781 * configure: Re-generate.
782
cf0dd6f0
SM
7832017-06-17 Simon Marchi <simon.marchi@ericsson.com>
784
785 * Makefile.in (COMPILE.pre): Add "-x c++".
786
9845682b
SDJ
7872017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
788
789 * fork-child.c: Conditionally include <signal.h>.
790
aefd8b33
SDJ
7912017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
792
793 * server.c (handle_general_set): Handle new packet
794 "QStartupWithShell".
795 (handle_query): Add "QStartupWithShell" to the list of supported
796 packets.
797 (gdbserver_usage): Add help text explaining the
798 new "--startup-with-shell" and "--no-startup-with-shell" CLI
799 options.
800 (captured_main): Recognize and act upon the presence of the new
801 CLI options.
802
2090129c
SDJ
8032017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
804 Pedro Alves <palves@redhat.com>
805
806 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
807 * configure: Regenerate.
808 * configure.srv (srv_linux_obj): Add "fork-child.o" and
809 "fork-inferior.o".
810 (i[34567]86-*-lynxos*): Likewise.
811 (spu*-*-*): Likewise.
812 * fork-child.c: New file.
813 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
814 and "environ.h".
815 (linux_ptrace_fun): New function.
816 (linux_create_inferior): Adjust function prototype to reflect
817 change on "target.h". Adjust function code to use
818 "fork_inferior".
819 (linux_request_interrupt): Delete "signal_pid".
820 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
821 (lynx_ptrace_fun): New function.
822 (lynx_create_inferior): Adjust function prototype to reflect
823 change on "target.h". Adjust function code to use
824 "fork_inferior".
825 * nto-low.c (nto_create_inferior): Adjust function prototype and
826 code to reflect change on "target.h". Update comments.
827 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
828 "common-terminal.h" and "environ.h".
829 (terminal_fd): Moved to fork-child.c.
830 (old_foreground_pgrp): Likewise.
831 (restore_old_foreground_pgrp): Likewise.
832 (last_status): Make it global.
833 (last_ptid): Likewise.
834 (our_environ): New variable.
835 (startup_with_shell): Likewise.
836 (program_name): Likewise.
837 (program_argv): Rename to...
838 (program_args): ...this.
839 (wrapper_argv): New variable.
840 (start_inferior): Delete function.
841 (get_exec_wrapper): New function.
842 (get_exec_file): Likewise.
843 (get_environ): Likewise.
844 (prefork_hook): Likewise.
845 (post_fork_inferior): Likewise.
846 (postfork_hook): Likewise.
847 (postfork_child_hook): Likewise.
848 (handle_v_run): Update code to deal with arguments coming from the
849 remote host. Update calls from "start_inferior" to
850 "create_inferior".
851 (captured_main): Likewise. Initialize environment variable. Call
852 "have_job_control".
853 * server.h (post_fork_inferior): New prototype.
854 (get_environ): Likewise.
855 (last_status): Declare.
856 (last_ptid): Likewise.
857 (signal_pid): Likewise.
858 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
859 (spu_ptrace_fun): New function.
860 (spu_create_inferior): Adjust function prototype to reflect change
861 on "target.h". Adjust function code to use "fork_inferior".
862 * target.c (target_terminal_init): New function.
863 (target_terminal_inferior): Likewise.
864 (target_terminal_ours): Likewise.
865 * target.h: Include <vector>.
866 (struct target_ops) <create_inferior>: Update prototype.
867 (create_inferior): Update macro.
868 * utils.c (gdb_flush_out_err): New function.
869 * win32-low.c (win32_create_inferior): Adjust function prototype
870 and code to reflect change on "target.h".
871
043a4934
SDJ
8722017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
873
874 * inferiors.c (switch_to_thread): New function.
875
15652511
SDJ
8762017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
877
878 * Makefile.in (SFILE): Add "common/job-control.c".
879 (OBS): Add "job-control.o".
880
21ea5acd
SDJ
8812017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
882
883 * Makefile: Remove "@host_makefile_frag@".
884
e13cb306
PA
8852017-05-05 Pedro Alves <palves@redhat.com>
886
887 * configure: Regenerate.
888
c94fee56
SDJ
8892017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
890
891 * configure: Regenerate.
892
a0ff9e1a
SM
8932017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
894
895 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
896 software_single_step change of return type to
897 std::vector<CORE_ADDR>.
898 * linux-low.c (install_software_single_step_breakpoints):
899 Likewise.
900 * linux-low.h (install_software_single_step_breakpoints):
901 Likewise.
902
be628ab8
SDJ
9032017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
904
905 * remote-utils.c: Include "gdb_termios.h" instead of
906 "terminal.h".
907 * terminal.h: Delete file.
908
7c5ded6a
SDJ
9092017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
910
911 * server.c: Include <vector>.
912 <program_argv, wrapper_argv>: Convert to std::vector.
913 (start_inferior): Rewrite function to use C++.
914 (handle_v_run): Likewise. Update code that calculates the argv
915 based on the vRun packet; use C++.
916 (captured_main): Likewise.
917
436252de
SM
9182017-04-06 Simon Marchi <simon.marchi@ericsson.com>
919
920 * server.c (handle_v_cont): Initialize thread_resume::thread
921 with null_ptid.
922
9bf2a700
PA
9232017-04-05 Pedro Alves <palves@redhat.com>
924
925 * configure: Regenerate.
926
a121b7c1
PA
9272017-04-05 Pedro Alves <palves@redhat.com>
928
929 * gdbreplay.c (sync_error): Constify.
930 * linux-x86-low.c (push_opcode): Constify.
931
21c8a587
PA
9322017-04-05 Pedro Alves <palves@redhat.com>
933
934 * win32-low.c (get_child_debug_event)
935 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
936 Report TARGET_WAITKIND_SPURIOUS instead.
937
fb32b4f7
PA
9382017-04-05 Pedro Alves <palves@redhat.com>
939
940 * remote-utils.c (remote_prepare, remote_open): Constify.
941 * remote-utils.h (remote_prepare, remote_open): Constify.
942 * server.c (captured_main): Constify 'port' handling.
943
65dd1e59
SM
9442017-04-04 Simon Marchi <simon.marchi@ericsson.com>
945
946 * Makefile.in (clean): Clear .deps.
947
8fa5b777
SM
9482017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
949
950 * .gitignore: Remove generated files, replace with wildcard.
951 * (clean): Replace removal of generated files with wildcard.
952 (version.c): Replace with...
953 (version-generated.c): ...this.
954 (xml-builtin.c): Replace with...
955 (xml-builtin-generated.c): ...this.
956 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
957 (%.c: *regformats*): Replace with...
958 (%-generated.c: *regformats*): ...this.
959
a12e714b
MF
9602017-03-27 Max Filippov <jcmvbkbc@gmail.com>
961
962 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
963 (xtensa_fill_gregset): Call collect_register_by_name for
964 threadptr register.
965 (xtensa_store_gregset): Call supply_register_by_name for
966 threadptr register.
967
1a09b50a
MF
9682017-03-27 Max Filippov <jcmvbkbc@gmail.com>
969
970 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
971 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
972 (xtensa_store_gregset): Call supply_register for all registers in
973 a0_regnum..a0_regnum + C0_NREGS range.
974
1a01e7c6
SM
9752017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
976
977 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
978 (ax-ipa.o: ax.c): Remove.
979 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
980 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
981 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
982 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
983 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
984
36bc18a8
SM
9852017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
986
987 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
988 (print-utils-ipa.o: ../common/print-utils.c): Remove.
989 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
990 (errors-ipa.o: ../common/errors.c): Remove.
991 (format-ipa.o: ../common/format.c): Remove.
992 (common-utils-ipa.o: ../common/common-utils.c): Remove.
993
a8ebe3d5
SM
9942017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
995
996 * Makefile.in (%-ipa.o: %.c): New rule.
997 (tracepoint-ipa.o: tracepoint.c): Remove.
998 (utils-ipa.o: utils.c): Remove.
999 (remote-utils-ipa.o: remote-utils.c): Remove.
1000 (regcache-ipa.o: regcache.c): Remove.
1001 (i386-linux-ipa.o: i386-linux.c): Remove.
1002 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1003 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1004 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1005 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1006 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1007 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1008 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1009 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1010 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1011 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1012 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1013 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1014 (aarch64-ipa.o: aarch64.c): Remove.
1015 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1016 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1017 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1018 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1019 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1020 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1021 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1022 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1023 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1024 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1025 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1026 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1027 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1028 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1029 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1030 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1031 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1032 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1033 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1034 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1035 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1036 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1037 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1038 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1039 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1040 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1041 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1042 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1043 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1044 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1045 (tdesc-ipa.o: tdesc.c): Remove.
1046 (x32-linux-ipa.o: x32-linux.c): Remove.
1047 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1048 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1049
50cfacb7
SM
10502017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1051
1052 * Makefile.in (%.o: ../arch/%.c): New rule.
1053 (arm.o: ../arch/arm.c): Remove.
1054 (arm-linux.o: ../arch/arm-linux.c): Remove.
1055 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1056 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1057
c5a22423
SM
10582017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1059
1060 * Makefile.in (%.o: ../nat/%.c): New rule.
1061 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1062 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1063 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1064 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1065 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1066 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1067 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1068 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1069 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1070 (linux-personality.o: ../nat/linux-personality.c): Remove.
1071 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1072 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1073 (x86-linux.o: ../nat/x86-linux.c): Remove.
1074 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1075 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1076
6bda016b
SM
10772017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1078
1079 * Makefile.in (%.o: ../common/%.c): New rule.
1080 (signals.o: ../common/signals.c): Remove.
1081 (print-utils.o: ../common/print-utils.c): Remove.
1082 (rsp-low.o: ../common/rsp-low.c): Remove.
1083 (common-utils.o: ../common/common-utils.c): Remove.
1084 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1085 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1086 (vec.o: ../common/vec.c): Remove.
1087 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1088 (xml-utils.o: ../common/xml-utils.c): Remove.
1089 (ptid.o: ../common/ptid.c): Remove.
1090 (buffer.o: ../common/buffer.c): Remove.
1091 (format.o: ../common/format.c): Remove.
1092 (filestuff.o: ../common/filestuff.c): Remove.
1093 (agent.o: ../common/agent.c): Remove.
1094 (errors.o: ../common/errors.c): Remove.
1095 (environ.o: ../common/environ.c): Remove.
1096 (common-debug.o: ../common/common-debug.c): Remove.
1097 (cleanups.o: ../common/cleanups.c): Remove.
1098 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1099 (fileio.o: ../common/fileio.c): Remove.
1100 (common-regcache.o: ../common/common-regcache.c): Remove.
1101 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1102 (new-op.o: ../common/new-op.c): Remove.
1103 (btrace-common.o: ../common/btrace-common.c): Remove.
1104
21122961
SM
11052017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1106
1107 * Makefile.in (%.o: ../target/%.c): New rule.
1108 (waitstatus.o: ../target/waitstatus.c): Remove.
1109
c362e621
SM
11102017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1111
1112 * Makefile.in
1113 (%.c: ../regformats/%.dat,
1114 (%.c: ../regformats/arm/%.dat,
1115 (%.c: ../regformats/i386/%.dat,
1116 (%.c: ../regformats/rs6000/%.dat): New rules.
1117 (aarch64.c): Remove.
1118 (reg-arm.c): Remove.
1119 (arm-with-iwmmxt.c): Remove.
1120 (arm-with-vfpv2.c): Remove.
1121 (arm-with-vfpv3.c): Remove.
1122 (arm-with-neon.c): Remove.
1123 (reg-bfin.c): Remove.
1124 (reg-cris.c): Remove.
1125 (reg-crisv32.c): Remove.
1126 (i386.c): Remove.
1127 (i386-linux.c): Remove.
1128 (i386-avx.c): Remove.
1129 (i386-avx-linux.c): Remove.
1130 (i386-avx-avx512.c): Remove.
1131 (i386-avx-avx512-linux.c): Remove.
1132 (i386-mpx.c): Remove.
1133 (i386-mpx-linux.c): Remove.
1134 (i386-avx-mpx-avx512-pku.c): Remove.
1135 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1136 (i386-avx-mpx.c): Remove.
1137 (i386-avx-mpx-linux.c): Remove.
1138 (i386-mmx.c): Remove.
1139 (i386-mmx-linux.c): Remove.
1140 (reg-ia64.c): Remove.
1141 (reg-m32r.c): Remove.
1142 (reg-m68k.c): Remove.
1143 (reg-cf.c): Remove.
1144 (mips-linux.c): Remove.
1145 (mips-dsp-linux.c): Remove.
1146 (mips64-linux.c): Remove.
1147 (mips64-dsp-linux.c): Remove.
1148 (nios2-linux.c): Remove.
1149 (powerpc-32.c): Remove.
1150 (powerpc-32l.c): Remove.
1151 (powerpc-altivec32l.c): Remove.
1152 (powerpc-cell32l.c): Remove.
1153 (powerpc-vsx32l.c): Remove.
1154 (powerpc-isa205-32l.c): Remove.
1155 (powerpc-isa205-altivec32l.c): Remove.
1156 (powerpc-isa205-vsx32l.c): Remove.
1157 (powerpc-e500l.c): Remove.
1158 (powerpc-64l.c): Remove.
1159 (powerpc-altivec64l.c): Remove.
1160 (powerpc-cell64l.c): Remove.
1161 (powerpc-vsx64l.c): Remove.
1162 (powerpc-isa205-64l.c): Remove.
1163 (powerpc-isa205-altivec64l.c): Remove.
1164 (powerpc-isa205-vsx64l.c): Remove.
1165 (s390-linux32.c): Remove.
1166 (s390-linux32v1.c): Remove.
1167 (s390-linux32v2.c): Remove.
1168 (s390-linux64.c): Remove.
1169 (s390-linux64v1.c): Remove.
1170 (s390-linux64v2.c): Remove.
1171 (s390-te-linux64.c): Remove.
1172 (s390-vx-linux64.c): Remove.
1173 (s390-tevx-linux64.c): Remove.
1174 (s390x-linux64.c): Remove.
1175 (s390x-linux64v1.c): Remove.
1176 (s390x-linux64v2.c): Remove.
1177 (s390x-te-linux64.c): Remove.
1178 (s390x-vx-linux64.c): Remove.
1179 (s390x-tevx-linux64.c): Remove.
1180 (tic6x-c64xp-linux.c): Remove.
1181 (tic6x-c64x-linux.c): Remove.
1182 (tic6x-c62x-linux.c): Remove.
1183 (reg-sh.c): Remove.
1184 (reg-sparc64.c): Remove.
1185 (reg-spu.c): Remove.
1186 (amd64.c): Remove.
1187 (amd64-linux.c): Remove.
1188 (amd64-avx.c): Remove.
1189 (amd64-avx-linux.c): Remove.
1190 (amd64-avx-avx512.c): Remove.
1191 (amd64-avx-avx512-linux.c): Remove.
1192 (amd64-mpx.c): Remove.
1193 (amd64-mpx-linux.c): Remove.
1194 (amd64-avx-mpx-avx512-pku.c): Remove.
1195 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1196 (amd64-avx-mpx.c): Remove.
1197 (amd64-avx-mpx-linux.c): Remove.
1198 (x32.c): Remove.
1199 (x32-linux.c): Remove.
1200 (x32-avx.c): Remove.
1201 (x32-avx-linux.c): Remove.
1202 (x32-avx-avx512.c): Remove.
1203 (x32-avx-avx512-linux.c): Remove.
1204 (reg-xtensa.c): Remove.
1205 (reg-tilegx.c): Remove.
1206 (reg-tilegx32.c): Remove.
1207
1672e0d9
SDJ
12082017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1209
1210 * Makefile.in (SFILES): Add "common/environ.c".
1211 (OBJS): Add "common/environ.h".
1212
239b6d10
WT
12132017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1214
1215 * configure.ac: Check if the fs_base and gs_base members of
1216 `struct user_regs_struct' exist.
1217 * config.in: Regenerated.
1218 * configure: Likewise.
1219
694b382c
AT
12202017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1221
1222 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1223 target_read_memory.
1224 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1225 (get_next_pcs_syscall_next_pc): Likewise.
1226
7dc53023
LM
12272016-12-23 Luis Machado <lgustavo@codesourcery.com>
1228
1229 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1230 * nto-x86-low.c: Likewise.
1231
ad02e4fe
SM
12322016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1233
1234 * Makefile.in: Include disable-implicit-rules.mk.
1235
dcb07cfa
PA
12362016-11-23 Pedro Alves <palves@redhat.com>
1237
1238 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1239 (debug_vprintf): Use std::chrono::steady_clock instead of
1240 gettimeofday. Use '.' instead of ':'.
1241 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1242 (get_timestamp): Use std::chrono::steady_clock instead of
1243 gettimeofday.
1244
8629c02c
SM
12452016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1246
1247 * Makefile.in: Fix whitespace formatting.
1248
b593ecca
SM
12492016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1250
1251 * Makefile.in (SFILES, OBS): Flatten list and order
1252 alphabetically.
1253
9986ba08
PA
12542016-11-23 Pedro Alves <palves@redhat.com>
1255
1256 * event-loop.c (handle_file_event): Use warning.
1257 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1258 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1259 Use warning.
1260
4eefa7bc
PA
12612016-11-23 Pedro Alves <palves@redhat.com>
1262
1263 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1264 output.
1265 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1266 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1267 debug_printf and debug_flush for debug output.
1268 * server.c (handle_general_set): Likewise.
1269 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1270 output.
1271
5443506e
SM
12722016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1273
1274 * Makefile.in (.c.o): Replace rule with ...
1275 (%.o: %.c): ... this one.
1276
3b165252
SM
12772016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1278
1279 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1280 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1281 make.
1282 * configure.ac: Remove checks for the make program.
1283 * configure: Re-generate.
1284
0bcda685
PA
12852016-10-28 Pedro Alves <palves@redhat.com>
1286
1287 * Makefile.in (CXX_DIALECT): Get from configure.
1288 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1289 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1290 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1291 * config.in: Regenerate.
1292 * configure: Regenerate.
1293
c3805894
YQ
12942016-10-27 Yao Qi <yao.qi@linaro.org>
1295
1296 * linux-low.c (linux_supports_range_stepping): Return true if
1297 can_software_single_step return true.
1298
89342618
YQ
12992016-10-27 Yao Qi <yao.qi@linaro.org>
1300
1301 * inferiors.c (find_inferior_in_random): New function.
1302 * inferiors.h (find_inferior_in_random): Declare.
1303 * linux-low.c (linux_wait_for_event_filtered): Call
1304 find_inferior_in_random instead of find_inferior.
1305
e3652c84
YQ
13062016-10-27 Yao Qi <yao.qi@linaro.org>
1307
1308 * linux-low.c (linux_wait_1): If single-step breakpoints are
1309 inserted, remove them.
1310
5a04c4cf
PA
13112016-10-26 Pedro Alves <palves@redhat.com>
1312
1313 * linux-low.c (handle_extended_wait): Link parent/child fork
1314 threads.
1315 (linux_wait_1): Unlink them.
1316 (linux_set_resume_request): Ignore resume requests for
1317 already-resumed and unhandled fork child threads.
1318 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1319 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1320 New functions.
1321 (handle_v_requests) <vCont>: Don't call require_running.
1322 * server.h (in_queued_stop_replies): New declaration.
1323
cb93dc7f
YQ
13242016-10-24 Yao Qi <yao.qi@linaro.org>
1325
1326 PR server/20733
1327 * linux-aarch64-low.c (append_insns): Cast the return value to
1328 'uint32_t *'.
1329
a1078bea
YQ
13302016-10-10 Yao Qi <yao.qi@linaro.org>
1331
1332 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1333
1fb77080
SDJ
13342016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1335
1336 * target.c (target_supports_multi_process): New function, moved
1337 from...
1338 * target.h (target_supports_multi_process): ... here. Remove
1339 macro.
1340
39b5a3b9
TT
13412016-10-05 Tom Tromey <tom@tromey.com>
1342
1343 PR remote/20655:
1344 * tracepoint.c (handle_tracepoint_bkpts): Check
1345 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1346
c1d0b70a
YQ
13472016-10-05 Yao Qi <yao.qi@linaro.org>
1348
1349 * configure.srv: Update the path of arm-*.xml files.
1350
0a69eedb
YQ
13512016-10-05 Terry Guo <terry.guo@arm.com>
1352 Yao Qi <yao.qi@linaro.org>
1353
1354 * Makefile.in: Adjust the path of rules.
1355 * configure.srv: Update the path of xml files.
1356 * regformats/arm-with-iwmmxt.dat: Regenerated.
1357 * regformats/arm-with-neon.dat: Likewise.
1358 * regformats/arm-with-vfpv2.dat: Likewise.
1359 * regformats/arm-with-vfpv3.dat Likewise.
1360
17e16485
YQ
13612016-09-30 Yao Qi <yao.qi@linaro.org>
1362
1363 PR gdbserver/20627
1364 * target.c (target_stop_and_wait): Don't call
1365 target_continue_no_signal, use resume_stop instead.
1366
edeeb602
YQ
13672016-09-26 Yao Qi <yao.qi@linaro.org>
1368
1369 * linux-low.c (linux_wait_1): Call debug_exit.
1370
503b1c39
PA
13712016-09-23 Pedro Alves <palves@redhat.com>
1372
1373 * Makefile.in (SFILES): Add common/new-op.c.
1374 (OBS): Add common/new-op.o.
1375 (new-op.o): New rule.
1376
74172ecf
SM
13772016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1378
1379 * .gitinore: Ignore more files.
1380
fc6cda2e
YQ
13812016-09-21 Yao Qi <yao.qi@linaro.org>
1382
1383 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1384 23.
1385
bc1e6c81
SDJ
13862016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1387
1388 * server.c (start_inferior): Call target_mourn_inferior instead of
1389 mourn_inferior; pass ptid_t argument to it.
1390 (resume): Likewise.
1391 (handle_target_event): Likewise.
1392 * target.c (target_mourn_inferior): New function.
1393 * target.h (mourn_inferior): Delete macro.
1394
0e00e962
AA
13952016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1396
1397 * linux-low.c (lwp_is_stepping): New function.
1398
1d8cb77d
CL
13992016-09-06 Carl Love <cel@us.ibm.com>
1400
1401 * server.c (start_inferior): Fixed comment, requested comment change
1402 didn't get updated correctly. Removed reference to ptrace () call as
1403 it is only true on Linux systems.
1404
7313bced
CL
14052016-09-06 Carl Love <cel@us.ibm.com>
1406
1407 * server.c (start_inferior): Do not call
1408 function target_post_create_inferior () if the
1409 inferior process has already exited.
1410
cf6de44d
PA
14112016-09-05 Pedro Alves <palves@redhat.com>
1412
1413 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1414 (COMPILE.pre, CC_LD): Use CXX directly.
1415 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1416 * acinclude.m4: Don't include build-with-cxx.m4.
1417 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1418 * configure: Regenerate.
1419
c1da6748
AT
14202016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1421
1422 PR gdb/19495
1423 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1424 call writing data to own_buf.
1425
f2b9e3df
SDJ
14262016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1427
1428 * target.c (mywait): Call target_wait instead of
1429 the_target->wait.
1430 (target_wait): New function.
1431
049a8570
SDJ
14322016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1433
1434 * server.c (start_inferior): New variable 'ptid'. Replace calls
1435 to the_target->resume by target_continue{,_no_signal}, depending
1436 on the case.
1437 * target.c (target_stop_and_wait): Call target_continue_no_signal
1438 instead of the_target->resume.
1439 (target_continue): New function.
1440
3aa5cfa0
AT
14412016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1442
1443 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1444
754653a7
AZ
14452016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1446
1447 PR server/20491
1448 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1449 ps_prochandle.
1450 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1451 * linux-arm-low.c (ps_get_thread_area): Likewise.
1452 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1453 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1454 * linux-mips-low.c (ps_get_thread_area): Likewise.
1455 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1456 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1457 * linux-x86-low.c (ps_get_thread_area): Likewise.
1458 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1459
ed036b40
PA
14602016-08-19 Pedro Alves <palves@redhat.com>
1461
1462 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1463
c8ef42ee
PA
14642016-08-19 Pedro Alves <palves@redhat.com>
1465
1466 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1467 comment. Use memcpy instead of casting through unsigned long.
1468
9c235a72
PA
14692016-08-19 Pedro Alves <palves@redhat.com>
1470
1471 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1472 allocating around 0x80000000.
1473
201506da
PA
14742016-08-19 Pedro Alves <palves@redhat.com>
1475
1476 PR gdb/20415
1477 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1478 (x32-avx512-linux-ipa.o): New rules.
1479 * configure.ac (x86_64-*-linux*): New x32 check.
1480 * configure.srv (ipa_x32_linux_regobj): New.
1481 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1482 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1483 descriptions.
1484 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1485 descriptions.
1486 * configure: Regenerate.
1487
f348d89a
PA
14882016-08-09 Pedro Alves <palves@redhat.com>
1489
1490 PR gdb/18653
1491 * Makefile.in (OBS): Add signals-state-save-restore.o.
1492 (signals-state-save-restore.o): New rule.
1493 * config.in: Regenerate.
1494 * configure: Regenerate.
1495 * linux-low.c: Include "signals-state-save-restore.h".
1496 (linux_create_inferior): Call
1497 restore_original_signals_state.
1498 * server.c: Include "dispositions-save-restore.h".
1499 (captured_main): Call save_original_signals_state.
1500
1baf5149
PA
15012016-08-05 Pedro Alves <palves@redhat.com>
1502
1503 * configure: Regenerate.
1504
fcd4a73d
YQ
15052016-08-04 Yao Qi <yao.qi@linaro.org>
1506
1507 * linux-low.c (regsets_fetch_inferior_registers): Check
1508 errno is ESRCH or not.
1509
979659d0
YQ
15102016-08-02 Yao Qi <yao.qi@linaro.org>
1511
1512 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1513 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1514 (thread_db_load_search): Update.
1515 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1516 td_ta_set_event and td_ta_event_getmsg.
1517
6598661d
PA
15182016-07-26 Pedro Alves <palves@redhat.com>
1519
1520 PR server/20414
1521 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1522 of unsigned long for 64-bit registers and use uint32_t instead of
1523 unsigned int for 32-bit registers.
1524
9cf12d57
PA
15252016-07-26 Pedro Alves <palves@redhat.com>
1526
1527 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1528 to 'ptrace'.
1529
305450ed
TT
15302016-07-21 Tom Tromey <tom@tromey.com>
1531
1532 * configure: Rebuild.
1533
2583da7c
YQ
15342016-07-21 Yao Qi <yao.qi@linaro.org>
1535
1536 * mem-break.c (find_gdb_breakpoint): Cast bp to
1537 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1538
21536b36
YQ
15392016-07-21 Yao Qi <yao.qi@linaro.org>
1540
1541 * server.c (handle_v_requests): Support s and S actions
1542 if target_supports_software_single_step return true.
1543
8901d193
YQ
15442016-07-21 Yao Qi <yao.qi@linaro.org>
1545
1546 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1547 is resume_step, call maybe_hw_step.
1548 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1549 and unstop them.
1550 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1551 breakpoints or not.
1552 (proceed_one_lwp): If resume request is resume_step, install
1553 reinsert breakpoints and call maybe_hw_step.
1554
0e9a339e
YQ
15552016-07-21 Yao Qi <yao.qi@linaro.org>
1556
1557 * linux-low.c (proceed_one_lwp): Declare.
1558 (linux_resume_one_thread): Remove local variable 'step'.
1559 Lift code enqueue signal. Call proceed_one_lwp instead of
1560 linux_resume_one_lwp.
1561
4281b351
YQ
15622016-07-21 Yao Qi <yao.qi@linaro.org>
1563
1564 * linux-low.c (linux_resume_one_thread): Call
1565 enqueue_pending_signal.
1566
984a2c04
YQ
15672016-07-21 Yao Qi <yao.qi@linaro.org>
1568
1569 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1570 * inferiors.c (do_restore_current_thread_cleanup): New function.
1571 (make_cleanup_restore_current_thread): Likewise.
1572 * linux-low.c (install_software_single_step_breakpoints): Call
1573 make_cleanup_restore_current_thread. Switch current_thread to
1574 thread.
1575
bec903c9
YQ
15762016-07-21 Yao Qi <yao.qi@linaro.org>
1577
1578 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1579 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1580 (clone_one_breakpoint): Likewise.
1581 (delete_reinsert_breakpoints): Change parameter to thread.
1582 Callers updated.
1583 (has_reinsert_breakpoints): Likewise.
1584 (uninsert_reinsert_breakpoints): Likewise.
1585 (reinsert_reinsert_breakpoints): Likewise.
1586 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1587 (delete_reinsert_breakpoints): Likewise.
1588 (reinsert_reinsert_breakpoints): Likewise.
1589 (uninsert_reinsert_breakpoints): Likewise.
1590 (has_reinsert_breakpoints): Likewise.
1591
63c40ec7
YQ
15922016-07-21 Yao Qi <yao.qi@linaro.org>
1593
1594 * inferiors.c (get_thread_process): Make parameter const.
1595 * inferiors.h (get_thread_process): Update declaration.
1596 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1597 Add new parameters child_thread and parent_thread. Callers
1598 updated.
1599 * mem-break.h (clone_all_breakpoints): Update declaration.
1600
9aa76cd0
YQ
16012016-07-21 Yao Qi <yao.qi@linaro.org>
1602
1603 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1604 <command_list, handler>: Remove.
1605 (struct gdb_breakpoint): New.
1606 (struct other_breakpoint): New.
1607 (struct reinsert_breakpoint): New.
1608 (is_gdb_breakpoint): New function.
1609 (any_persistent_commands): Update command_list if
1610 is_gdb_breakpoint returns true.
1611 (set_breakpoint): Create breakpoints according to their types.
1612 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1613 (set_gdb_breakpoint_1): Likewise.
1614 (set_gdb_breakpoint): Likewise.
1615 (clear_breakpoint_conditions): Change parameter type to
1616 'struct gdb_breakpoint *'.
1617 (clear_breakpoint_commands): Likewise.
1618 (clear_breakpoint_conditions_and_commands): Likewise.
1619 (add_condition_to_breakpoint): Likewise.
1620 (add_breakpoint_condition): Likewise.
1621 (add_commands_to_breakpoint): Likewise.
1622 (check_breakpoints): Check other_breakpoint.
1623 (clone_one_breakpoint): Clone breakpopint according to its type.
1624 * mem-break.h (struct gdb_breakpoint): Declare.
1625 (set_gdb_breakpoint): Update declaration.
1626 (clear_breakpoint_conditions_and_commands): Likewise.
1627 (add_breakpoint_condition): Likewise.
1628 (add_breakpoint_commands): Likewise.
1629 * server.c (process_point_options): Change parameter type to
1630 'struct gdb_breakpoint *'.
1631
811f8301
YQ
16322016-07-21 Yao Qi <yao.qi@linaro.org>
1633
1634 * mem-break.c (set_breakpoint_at): Rename it to ...
1635 (set_breakpoint_type_at): ... it.
1636 (set_breakpoint_at): Call set_breakpoint_type_at.
1637 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1638 * mem-break.h (set_breakpoint_at): Update comments.
1639
b1c51e36
CLT
16402016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1641
1642 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1643 to buf parameter.
1644 (nios2_store_gregset): Likewise.
1645
ced2dffb
PA
16462016-07-01 Pedro Alves <palves@redhat.com>
1647 Antoine Tremblay <antoine.tremblay@ericsson.com>
1648
1649 * linux-low.c: Change interface to take the target lwp_info
1650 pointer directly and return void. Handle detaching from a zombie
1651 thread.
1652 (linux_detach_lwp_callback): New function.
1653 (linux_detach): Detach from the leader thread after detaching from
1654 the clone threads.
1655
2ac09a5b
YQ
16562016-06-28 Yao Qi <yao.qi@linaro.org>
1657
1658 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1659 for variable new_offset.
1660 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1661 (aarch64_ftrace_insn_reloc_cb): Likewise.
1662 (aarch64_ftrace_insn_reloc_tb): Likewise.
1663 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1664 PRIx64 instead of PRIx32.
1665
79e7fd4f
YQ
16662016-06-28 Yao Qi <yao.qi@linaro.org>
1667
1668 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1669 (the_low_target): Install arm_get_syscall_trapinfo.
1670
061fc021
YQ
16712016-06-28 Yao Qi <yao.qi@linaro.org>
1672
1673 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1674 function.
1675 (the_low_target): Install aarch64_get_syscall_trapinfo.
1676
4cc32bec
YQ
16772016-06-28 Yao Qi <yao.qi@linaro.org>
1678
1679 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1680 Callers updated.
1681 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1682 Remove parameter sysno.
1683 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1684 sysret.
1685
782c1122
AA
16862016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1687
1688 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1689 (s390_emit_ne_goto): Likewise.
1690 (s390_emit_lt_goto): Likewise.
1691 (s390_emit_le_goto): Likewise.
1692 (s390_emit_gt_goto): Likewise.
1693 (s390_emit_ge_goto): Likewise.
1694 (s390x_emit_eq_goto): Likewise.
1695 (s390x_emit_ne_goto): Likewise.
1696 (s390x_emit_lt_goto): Likewise.
1697 (s390x_emit_le_goto): Likewise.
1698 (s390x_emit_gt_goto): Likewise.
1699 (s390x_emit_ge_goto): Likewise.
1700 (s390_emit_ops_impl): Mark variable static.
1701 (s390x_emit_ops): Likewise.
1702
2e7b624b
YQ
17032016-06-17 Yao Qi <yao.qi@linaro.org>
1704
1705 * linux-low.c (handle_extended_wait): Call
1706 uninsert_reinsert_breakpoints for the parent process. Remove
1707 reinsert breakpoints from the child process. Reinsert them to
1708 the parent process when vfork is done.
1709 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1710 (reinsert_reinsert_breakpoints): New function.
1711 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1712 (reinsert_reinsert_breakpoints): Declare.
1713
8a81c5d7
YQ
17142016-06-17 Yao Qi <yao.qi@linaro.org>
1715
1716 * linux-low.c (handle_extended_wait): If the parent is doing
1717 step-over, remove the reinsert breakpoints from the forked child.
1718
f50bf8e5
YQ
17192016-06-17 Yao Qi <yao.qi@linaro.org>
1720
1721 * linux-low.c (unsuspend_all_lwps): Declare.
1722 (linux_low_filter_event): If thread exited, call finish_step_over.
1723 If step-over is finished, unsuspend other threads.
1724
8376a3cb
YQ
17252016-06-17 Yao Qi <yao.qi@linaro.org>
1726
1727 * linux-low.c (linux_resume_one_lwp_throw): Assert
1728 has_reinsert_breakpoints returns false.
1729 * mem-break.c (delete_disabled_breakpoints): Assert
1730 bp type isn't reinsert_breakpoint.
1731
f79b145d
YQ
17322016-06-17 Yao Qi <yao.qi@linaro.org>
1733
1734 * linux-low.c (maybe_hw_step): New function.
1735 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1736 (finish_step_over): Switch current_thread to lwp temporarily,
1737 and assert has_reinsert_breakpoints returns true.
1738 (proceed_one_lwp): Call maybe_hw_step.
1739 * mem-break.c (has_reinsert_breakpoints): New function.
1740 * mem-break.h (has_reinsert_breakpoints): Declare.
1741
0ae534d2
JT
17422016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1743
1744 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1745
fcdad592
YQ
17462016-05-17 Yao Qi <yao.qi@linaro.org>
1747
1748 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1749 instead of find_inferior.
1750
9e784964
YQ
17512016-05-05 Yao Qi <yao.qi@linaro.org>
1752
1753 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1754 Initialize res to zero.
1755
cf2ebb6e
YQ
17562016-05-05 Yao Qi <yao.qi@linaro.org>
1757
1758 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1759 to uint32_t.
1760
c1aebf87
UW
17612016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1762
1763 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1764 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1765 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1766
35fd2deb 17672016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 1768 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
1769
1770 * tracepoint.c (write_inferior_int8): New function.
1771 (cmd_qtenable_disable): Write enable flag using
1772 write_inferior_int8.
1773
484b3c32
YQ
17742016-04-25 Yao Qi <yao.qi@linaro.org>
1775
1776 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1777 (need_step_over_p): Return zero if the LWP has pending signals
1778 can be delivered on software single step target.
1779
85ba7d86
YQ
17802016-04-25 Yao Qi <yao.qi@linaro.org>
1781
1782 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1783 return instead of error.
1784
3539aa13
YQ
17852016-04-22 Yao Qi <yao.qi@linaro.org>
1786
1787 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1788 to 23.
1789
5b061e98
YQ
17902016-04-22 Yao Qi <yao.qi@linaro.org>
1791
1792 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1793 signal when stepping over breakpoint with software single
1794 step.
1795
3451269c
PA
17962016-04-21 Pedro Alves <palves@redhat.com>
1797
1798 * linux-s390-low.c (s390_collect_ptrace_register)
1799 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1800 add casts.
1801 (s390_check_regset): Use void * instead of gdb_byte *.
1802
a2358508
PA
18032016-04-20 Pedro Alves <palves@redhat.com>
1804
1805 * configure: Renegerate.
1806
6885166d
YQ
18072016-04-20 Yao Qi <yao.qi@linaro.org>
1808
1809 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1810 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1811 number 16.
1812 (arm_store_gregset): Likewise.
1813
2b863f51
WT
18142016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1815
1816 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1817 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1818 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1819 (amd64-avx-mpx-linux.c): New rules.
1820 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1821 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1822 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1823 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1824 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1825 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1826 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1827 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1828 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1829 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1830 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1831 * linux-x86-low.c (x86_linux_read_description): Add case for
1832 X86_XSTATE_AVX_MPX_MASK.
1833 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1834 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1835 init_registers_i386_avx_mpx_linux.
1836 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1837 (initialize_low_tracepoint): Call
1838 init_registers_i386_avx_mpx_linux.
1839 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1840 (initialize_low_tracepoint): Call
1841 init_registers_amd64_avx_mpx_linux.
1842 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1843 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1844 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1845 declarations.
1846
9b30624b
PA
18472016-04-18 Pedro Alves <palves@redhat.com>
1848
1849 * configure: Regenerate.
1850
45e3745e
AT
18512016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1852
1853 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1854 (aarch64_emit_sub): Likewise.
1855
2afc13ff
PA
18562016-04-12 Pedro Alves <palves@redhat.com>
1857
1858 * utils.c (prepare_to_throw_exception): Delete.
1859
6e774b13
SM
18602016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1861
1862 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1863
4dca19f8
MK
18642016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1865
1866 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1867
d0a9981f
MK
18682016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1869
1870 * linux-aarch64-ipa.c: Add <elf.h> include.
1871 * linux-ppc-ipa.c: Add <elf.h> include.
1872 * linux-s390-ipa.c: Add <elf.h> include.
1873
252db07e
MK
18742016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1875
1876 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1877 (get_raw_reg_ptr): Likewise.
1878 (get_trace_state_variable_value_ptr): Likewise.
1879 (set_trace_state_variable_value_ptr): Likewise.
1880 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1881 char *.
1882
14e2b6d9
MK
18832016-03-31 Wei-cheng Wang <cole945@gmail.com>
1884 Marcin Kościelnicki <koriakin@0x04.net>
1885
1886 PR/17221
1887 * linux-ppc-low.c (emit_insns): New function.
1888 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1889 (ppc_emit_prologue): New function.
1890 (ppc_emit_epilogue): New function.
1891 (ppc_emit_add): New function.
1892 (ppc_emit_sub): New function.
1893 (ppc_emit_mul): New function.
1894 (ppc_emit_lsh): New function.
1895 (ppc_emit_rsh_signed): New function.
1896 (ppc_emit_rsh_unsigned): New function.
1897 (ppc_emit_ext): New function.
1898 (ppc_emit_zero_ext): New function.
1899 (ppc_emit_log_not): New function.
1900 (ppc_emit_bit_and): New function.
1901 (ppc_emit_bit_or): New function.
1902 (ppc_emit_bit_xor): New function.
1903 (ppc_emit_bit_not): New function.
1904 (ppc_emit_equal): New function.
1905 (ppc_emit_less_signed): New function.
1906 (ppc_emit_less_unsigned): New function.
1907 (ppc_emit_ref): New function.
1908 (ppc_emit_const): New function.
1909 (ppc_emit_reg): New function.
1910 (ppc_emit_pop): New function.
1911 (ppc_emit_stack_flush): New function.
1912 (ppc_emit_swap): New function.
1913 (ppc_emit_stack_adjust): New function.
1914 (ppc_emit_call): New function.
1915 (ppc_emit_int_call_1): New function.
1916 (ppc_emit_void_call_2): New function.
1917 (ppc_emit_if_goto): New function.
1918 (ppc_emit_goto): New function.
1919 (ppc_emit_eq_goto): New function.
1920 (ppc_emit_ne_goto): New function.
1921 (ppc_emit_lt_goto): New function.
1922 (ppc_emit_le_goto): New function.
1923 (ppc_emit_gt_goto): New function.
1924 (ppc_emit_ge_goto): New function.
1925 (ppc_write_goto_address): New function.
1926 (ppc_emit_ops_impl): New static variable.
1927 (ppc64v1_emit_prologue): New function.
1928 (ppc64v2_emit_prologue): New function.
1929 (ppc64_emit_epilogue): New function.
1930 (ppc64_emit_add): New function.
1931 (ppc64_emit_sub): New function.
1932 (ppc64_emit_mul): New function.
1933 (ppc64_emit_lsh): New function.
1934 (ppc64_emit_rsh_signed): New function.
1935 (ppc64_emit_rsh_unsigned): New function.
1936 (ppc64_emit_ext): New function.
1937 (ppc64_emit_zero_ext): New function.
1938 (ppc64_emit_log_not): New function.
1939 (ppc64_emit_bit_and): New function.
1940 (ppc64_emit_bit_or): New function.
1941 (ppc64_emit_bit_xor): New function.
1942 (ppc64_emit_bit_not): New function.
1943 (ppc64_emit_equal): New function.
1944 (ppc64_emit_less_signed): New function.
1945 (ppc64_emit_less_unsigned): New function.
1946 (ppc64_emit_ref): New function.
1947 (ppc64_emit_const): New function.
1948 (ppc64v1_emit_reg): New function.
1949 (ppc64v2_emit_reg): New function.
1950 (ppc64_emit_pop): New function.
1951 (ppc64_emit_stack_flush): New function.
1952 (ppc64_emit_swap): New function.
1953 (ppc64v1_emit_call): New function.
1954 (ppc64v2_emit_call): New function.
1955 (ppc64v1_emit_int_call_1): New function.
1956 (ppc64v2_emit_int_call_1): New function.
1957 (ppc64v1_emit_void_call_2): New function.
1958 (ppc64v2_emit_void_call_2): New function.
1959 (ppc64_emit_if_goto): New function.
1960 (ppc64_emit_eq_goto): New function.
1961 (ppc64_emit_ne_goto): New function.
1962 (ppc64_emit_lt_goto): New function.
1963 (ppc64_emit_le_goto): New function.
1964 (ppc64_emit_gt_goto): New function.
1965 (ppc64_emit_ge_goto): New function.
1966 (ppc64v1_emit_ops_impl): New static variable.
1967 (ppc64v2_emit_ops_impl): New static variable.
1968 (ppc_emit_ops): New function.
1969 (linux_low_target): Wire in ppc_emit_ops.
1970
a2174ba4
MK
19712016-03-31 Wei-cheng Wang <cole945@gmail.com>
1972 Marcin Kościelnicki <koriakin@0x04.net>
1973
1974 PR/17221
1975 * Makefile.in: Add powerpc-*-ipa.o
1976 * configure.srv: Add ipa_obj for powerpc*-linux.
1977 * linux-ppc-ipa.c: New file.
1978 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1979 includes.
1980 (PPC_FIELD): New macro.
1981 (PPC_SEXT): New macro.
1982 (PPC_OP6): New macro.
1983 (PPC_BO): New macro.
1984 (PPC_LI): New macro.
1985 (PPC_BD): New macro.
1986 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1987 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1988 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1989 (ppc_get_thread_area): New function.
1990 (is_elfv2_inferior): New function.
1991 (gen_ds_form): New function.
1992 (GEN_STD): New macro.
1993 (GEN_STDU): New macro.
1994 (GEN_LD): New macro.
1995 (GEN_LDU): New macro.
1996 (gen_d_form): New function.
1997 (GEN_ADDI): New macro.
1998 (GEN_ADDIS): New macro.
1999 (GEN_LI): New macro.
2000 (GEN_LIS): New macro.
2001 (GEN_ORI): New macro.
2002 (GEN_ORIS): New macro.
2003 (GEN_LWZ): New macro.
2004 (GEN_STW): New macro.
2005 (GEN_STWU): New macro.
2006 (gen_xfx_form): New function.
2007 (GEN_MFSPR): New macro.
2008 (GEN_MTSPR): New macro.
2009 (GEN_MFCR): New macro.
2010 (GEN_MTCR): New macro.
2011 (GEN_SYNC): New macro.
2012 (GEN_LWSYNC): New macro.
2013 (gen_x_form): New function.
2014 (GEN_OR): New macro.
2015 (GEN_MR): New macro.
2016 (GEN_LWARX): New macro.
2017 (GEN_STWCX): New macro.
2018 (GEN_CMPW): New macro.
2019 (gen_md_form): New function.
2020 (GEN_RLDICL): New macro.
2021 (GEN_RLDICR): New macro.
2022 (gen_i_form): New function.
2023 (GEN_B): New macro.
2024 (GEN_BL): New macro.
2025 (gen_b_form): New function.
2026 (GEN_BNE): New macro.
2027 (GEN_LOAD): New macro.
2028 (GEN_STORE): New macro.
2029 (gen_limm): New function.
2030 (gen_atomic_xchg): New function.
2031 (gen_call): New function.
2032 (ppc_relocate_instruction): New function.
2033 (ppc_install_fast_tracepoint_jump_pad): New function.
2034 (ppc_get_min_fast_tracepoint_insn_len): New function.
2035 (ppc_get_ipa_tdesc_idx): New function.
2036 (the_low_target): Wire in the new functions.
2037 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2038 tdescs.
2039 * linux-ppc-tdesc.h: New file.
2040
a13c4696
MK
20412016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2042
2043 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2044 (alloc_jump_pad_buffer): New function.
2045 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2046 (alloc_jump_pad_buffer): New function.
2047 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2048 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2049 (alloc_jump_pad_buffer): New function.
2050 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2051 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2052 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2053 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2054
1cda1512
MK
20552016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2056
2057 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2058 * linux-amd64-ipa.c: Likewise.
2059 * linux-i386-ipa.c: Likewise.
2060 * linux-s390-ipa.c: Likewise.
2061 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2062 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2063 set_trace_state_variable_value_ptr.
2064 (struct ipa_sym_addresses): Likewise.
2065 (symbol_list): Likewise.
2066 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2067 accessing gdb_collect directly.
2068 (gdb_collect_ptr_type): New typedef.
2069 (get_raw_reg_ptr_type): New typedef.
2070 (get_trace_state_variable_value_ptr_type): New typedef.
2071 (set_trace_state_variable_value_ptr_type): New typedef.
2072 (gdb_collect_ptr): New global.
2073 (get_raw_reg_ptr): New global.
2074 (get_trace_state_variable_value_ptr): New global.
2075 (set_trace_state_variable_value_ptr): New global.
2076 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2077 accessing get_raw_reg directly.
2078 (get_get_tsv_func_addr): Likewise for
2079 get_trace_state_variable_value_ptr.
2080 (get_set_tsv_func_addr): Likewise for
2081 set_trace_state_variable_value_ptr.
2082 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2083
72fb5488
SM
20842016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2085
2086 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2087
28170b88
MK
20882016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2089
2090 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2091 packets.
2092 (relocate_instruction): Remove own_buf.
2093 * server.c (own_buf): Make global.
2094 (handle_v_requests): Make global.
2095 * server.h (own_buf): New declaration.
2096 (handle_v_requests): New prototype.
2097
f39e8743
MK
20982016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2099
2100 PR 18377
2101 * linux-s390-low.c (add_insns): New function.
2102 (s390_emit_prologue): New function.
2103 (s390_emit_epilogue): New function.
2104 (s390_emit_add): New function.
2105 (s390_emit_sub): New function.
2106 (s390_emit_mul): New function.
2107 (s390_emit_lsh): New function.
2108 (s390_emit_rsh_signed): New function.
2109 (s390_emit_rsh_unsigned): New function.
2110 (s390_emit_ext): New function.
2111 (s390_emit_log_not): New function.
2112 (s390_emit_bit_and): New function.
2113 (s390_emit_bit_or): New function.
2114 (s390_emit_bit_xor): New function.
2115 (s390_emit_bit_not): New function.
2116 (s390_emit_equal): New function.
2117 (s390_emit_less_signed): New function.
2118 (s390_emit_less_unsigned): New function.
2119 (s390_emit_ref): New function.
2120 (s390_emit_if_goto): New function.
2121 (s390_emit_goto): New function.
2122 (s390_write_goto_address): New function.
2123 (s390_emit_litpool): New function.
2124 (s390_emit_const): New function.
2125 (s390_emit_call): New function.
2126 (s390_emit_reg): New function.
2127 (s390_emit_pop): New function.
2128 (s390_emit_stack_flush): New function.
2129 (s390_emit_zero_ext): New function.
2130 (s390_emit_swap): New function.
2131 (s390_emit_stack_adjust): New function.
2132 (s390_emit_set_r2): New function.
2133 (s390_emit_int_call_1): New function.
2134 (s390_emit_void_call_2): New function.
2135 (s390_emit_eq_goto): New function.
2136 (s390_emit_ne_goto): New function.
2137 (s390_emit_lt_goto): New function.
2138 (s390_emit_le_goto): New function.
2139 (s390_emit_gt_goto): New function.
2140 (s390_emit_ge_goto): New function.
2141 (s390x_emit_prologue): New function.
2142 (s390x_emit_epilogue): New function.
2143 (s390x_emit_add): New function.
2144 (s390x_emit_sub): New function.
2145 (s390x_emit_mul): New function.
2146 (s390x_emit_lsh): New function.
2147 (s390x_emit_rsh_signed): New function.
2148 (s390x_emit_rsh_unsigned): New function.
2149 (s390x_emit_ext): New function.
2150 (s390x_emit_log_not): New function.
2151 (s390x_emit_bit_and): New function.
2152 (s390x_emit_bit_or): New function.
2153 (s390x_emit_bit_xor): New function.
2154 (s390x_emit_bit_not): New function.
2155 (s390x_emit_equal): New function.
2156 (s390x_emit_less_signed): New function.
2157 (s390x_emit_less_unsigned): New function.
2158 (s390x_emit_ref): New function.
2159 (s390x_emit_if_goto): New function.
2160 (s390x_emit_const): New function.
2161 (s390x_emit_call): New function.
2162 (s390x_emit_reg): New function.
2163 (s390x_emit_pop): New function.
2164 (s390x_emit_stack_flush): New function.
2165 (s390x_emit_zero_ext): New function.
2166 (s390x_emit_swap): New function.
2167 (s390x_emit_stack_adjust): New function.
2168 (s390x_emit_int_call_1): New function.
2169 (s390x_emit_void_call_2): New function.
2170 (s390x_emit_eq_goto): New function.
2171 (s390x_emit_ne_goto): New function.
2172 (s390x_emit_lt_goto): New function.
2173 (s390x_emit_le_goto): New function.
2174 (s390x_emit_gt_goto): New function.
2175 (s390x_emit_ge_goto): New function.
2176 (s390_emit_ops): New function.
2177 (struct linux_target_ops): Fill in emit_ops hook.
2178
abd9baf9
MK
21792016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2180
2181 PR 18377
2182 * Makefile.in: Add s390 IPA files.
2183 * configure.srv: Build IPA for s390.
2184 * linux-s390-ipa.c: New file.
2185 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2186 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2187 (tdesc_s390_linux32): Likewise.
2188 (init_registers_s390_linux32v1): Likewise.
2189 (tdesc_s390_linux32v1): Likewise.
2190 (init_registers_s390_linux32v2): Likewise.
2191 (tdesc_s390_linux32v2): Likewise.
2192 (init_registers_s390_linux64): Likewise.
2193 (tdesc_s390_linux64): Likewise.
2194 (init_registers_s390_linux64v1): Likewise.
2195 (tdesc_s390_linux64v1): Likewise.
2196 (init_registers_s390_linux64v2): Likewise.
2197 (tdesc_s390_linux64v2): Likewise.
2198 (init_registers_s390_te_linux64): Likewise.
2199 (tdesc_s390_te_linux64): Likewise.
2200 (init_registers_s390_vx_linux64): Likewise.
2201 (tdesc_s390_vx_linux64): Likewise.
2202 (init_registers_s390_tevx_linux64): Likewise.
2203 (tdesc_s390_tevx_linux64): Likewise.
2204 (init_registers_s390x_linux64): Likewise.
2205 (tdesc_s390x_linux64): Likewise.
2206 (init_registers_s390x_linux64v1): Likewise.
2207 (tdesc_s390x_linux64v1): Likewise.
2208 (init_registers_s390x_linux64v2): Likewise.
2209 (tdesc_s390x_linux64v2): Likewise.
2210 (init_registers_s390x_te_linux64): Likewise.
2211 (tdesc_s390x_te_linux64): Likewise.
2212 (init_registers_s390x_vx_linux64): Likewise.
2213 (tdesc_s390x_vx_linux64): Likewise.
2214 (init_registers_s390x_tevx_linux64): Likewise.
2215 (tdesc_s390x_tevx_linux64): Likewise.
2216 (have_hwcap_s390_vx): New static variable.
2217 (s390_arch_setup): Fill have_hwcap_s390_vx.
2218 (s390_get_thread_area): New function.
2219 (s390_ft_entry_gpr_esa): New const.
2220 (s390_ft_entry_gpr_zarch): New const.
2221 (s390_ft_entry_misc): New const.
2222 (s390_ft_entry_fr): New const.
2223 (s390_ft_entry_vr): New const.
2224 (s390_ft_main_31): New const.
2225 (s390_ft_main_64): New const.
2226 (s390_ft_exit_fr): New const.
2227 (s390_ft_exit_vr): New const.
2228 (s390_ft_exit_misc): New const.
2229 (s390_ft_exit_gpr_esa): New const.
2230 (s390_ft_exit_gpr_zarch): New const.
2231 (append_insns): New function.
2232 (s390_relocate_instruction): New function.
2233 (s390_install_fast_tracepoint_jump_pad): New function.
2234 (s390_get_min_fast_tracepoint_insn_len): New function.
2235 (s390_get_ipa_tdesc_idx): New function.
2236 (struct linux_target_ops): Wire in the above functions.
2237 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2238 * linux-s390-tdesc.h: New file.
2239
a4105d04
MK
22402016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2241
2242 * linux-s390-low.c (s390_supports_tracepoints): New function.
2243 (struct linux_target_ops): Fill supports_tracepoints hook.
2244
35ac8b3e
YQ
22452016-03-18 Yao Qi <yao.qi@linaro.org>
2246
2247 * linux-low.c (lwp_signal_can_be_delivered): New function.
2248 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2249
94610ec4
YQ
22502016-03-18 Yao Qi <yao.qi@linaro.org>
2251
2252 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2253 0 if signal is enqueued. Remove 'signal' from one debugging
2254 message. Move one debugging message to some lines below.
2255 Remove code setting 'signal' to 0.
2256
80aea927
YQ
22572016-03-18 Yao Qi <yao.qi@linaro.org>
2258
2259 * linux-low.c (linux_low_filter_event): Remove redundant
2260 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2261
b04fd3be
MK
22622016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2263
2264 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2265 (struct linux_target_ops): Wire in the above.
2266
c40c8d4b
YQ
22672016-03-03 Yao Qi <yao.qi@linaro.org>
2268
2269 * linux-low.c: Update comments to start_step_over.
2270
0f8288ae
YQ
22712016-03-03 Yao Qi <yao.qi@linaro.org>
2272
2273 PR server/19736
2274 * linux-low.c (handle_extended_wait): Set child suspended
2275 if event_lwp->bp_reinsert isn't zero.
2276
fdbd04a8
YQ
22772016-03-02 Yao Qi <yao.qi@linaro.org>
2278
2279 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2280 enqueue_pending_signal.
2281
6896a8fa
MK
22822016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2283
2284 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2285 is actually loaded.
2286
ab503087
MK
22872016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2288
2289 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2290 (s390_regmap_3264) [!__s390x__]: New global.
2291 (s390_collect_ptrace_register): Skip map entries containing -1.
2292 (s390_supply_ptrace_register): Ditto.
2293 (s390_fill_gprs_high): New function.
2294 (s390_store_gprs_high): New function.
2295 (s390_regsets): Add NT_S390_HIGH_GPRS.
2296 (s390_get_hwcap): Enable on 31-bit.
2297 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2298 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2299 Detect NT_S390_HIGH_GPRS.
2300 (s390_usrregs_info_3264): Enable on 31-bit.
2301 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2302 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2303
ae91f625
MK
23042016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2305
2306 PR gdb/13808
2307 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2308 * configure.srv: Ditto.
2309 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2310 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2311 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2312 (init_registers_amd64_linux): Remove prototype.
2313 (tdesc_amd64_linux): Remove declaration.
2314 (get_ipa_tdesc): New function.
2315 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2316 initialize remaining tdescs.
2317 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2318 (init_registers_i386_linux): Remove prototype.
2319 (tdesc_i386_linux): Remove declaration.
2320 (get_ipa_tdesc): New function.
2321 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2322 initialize remaining tdescs.
2323 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2324 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2325 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2326 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2327 (x86_get_ipa_tdesc_idx): New function.
2328 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2329 * linux-x86-tdesc.h: New file.
2330 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2331 (target_get_ipa_tdesc_idx): New macro.
2332 * tracepoint.c (ipa_tdesc_idx): New macro.
2333 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2334 (symbol_list): Add ipa_tdesc_idx.
2335 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2336 (ipa_tdesc): Remove.
2337 (ipa_tdesc_idx): New variable.
2338 (get_context_regcache): Use get_ipa_tdesc.
2339 (gdb_collect): Ditto.
2340 (gdb_probe): Ditto.
2341 * tracepoint.h (get_ipa_tdesc): New prototype.
2342 (ipa_tdesc): Remove.
2343
e7ad2f14
PA
23442016-02-24 Pedro Alves <palves@redhat.com>
2345
2346 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2347 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2348 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2349 Factor out common code between the USE_SIGTRAP_SIGINFO and
2350 !USE_SIGTRAP_SIGINFO blocks.
2351 (linux_low_filter_event): Call save_stop_reason instead of
2352 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2353 Update comments.
2354 (linux_wait_1): Update comments.
2355
657f9cde
WW
23562016-02-24 Wei-cheng Wang <cole945@gmail.com>
2357
2358 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2359 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2360 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2361 ppc_insert_point, ppc_remove_point.
2362
b00b61e1
MK
23632016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2364
2365 * linux-s390-low.c (s390_supports_z_point_type): New function.
2366 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2367
553cb527
YQ
23682016-02-16 Yao Qi <yao.qi@linaro.org>
2369
2370 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2371 PC. Get pc from regcache_read_pc.
2372
a5652c21
YQ
23732016-02-12 Yao Qi <yao.qi@linaro.org>
2374
2375 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2376 or linux_get_pc_32bit.
2377 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2378
ed443b61
YQ
23792016-02-12 Yao Qi <yao.qi@linaro.org>
2380
2381 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2382 arm_linux_get_next_pcs_fixup.
2383
020ecd38
MK
23842016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2385
2386 * tracepoint.c (x_tracepoint_action_download): Change
2387 write_inferior_data_ptr to write_inferior_data_pointer.
2388 (cmd_qtstart): Likewise.
2389 (write_inferior_data_ptr): Remove.
2390 (download_agent_expr): Change write_inferior_data_ptr to
2391 write_inferior_data_pointer.
2392 (download_tracepoint_1): Likewise.
2393 (download_tracepoint): Likewise.
2394 (download_trace_state_variables): Likewise.
2395
7cae9051
WW
23962016-02-11 Wei-cheng Wang <cole945@gmail.com>
2397 Marcin Kościelnicki <koriakin@0x04.net>
2398
2399 * tracepoint.c (struct tracepoint_action_ops): Remove.
2400 (struct tracepoint_action): Remove ops.
2401 (m_tracepoint_action_download, r_tracepoint_action_download)
2402 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2403 size and offset accordingly.
2404 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2405 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2406 (tracepoint_action_send, tracepoint_action_download): New functions.
2407 Helpers for trace action handlers.
2408 (add_tracepoint_action): Remove setup actions ops.
2409 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2410
9f6a71b4
YQ
24112016-02-10 Yao Qi <yao.qi@linaro.org>
2412
2413 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2414
1e94266c
SM
24152016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2416
2417 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2418 to AC_OUTPUT.
2419 * configure: Regenerate.
2420
8adce034
SM
24212016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2422
2423 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2424 void * to gdb_byte *.
2425 * linux-low.c (siginfo_fixup): Likewise.
2426 (linux_xfer_siginfo): Likewise.
2427 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2428 Likewise.
2429 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2430
93813b37
WT
24312016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2432
2433 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2434 to srv_tgtobj.
2435 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2436 to srv_tgtobj.
2437 * linux-x86-low.c [__x86_64__]: Include
2438 "nat/amd64-linux-siginfo.h".
2439 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2440 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2441 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2442 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2443 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2444 (cpt_si_fd, si_timerid, si_overrun): Move from
2445 nat/amd64-linux-siginfo.c.
2446 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2447
8424cc97
SM
24482016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2449
2450 * server.c (skip_to_semicolon): Remove.
2451 (process_point_options): Use strchrnul instead of
2452 skip_to_semicolon.
2453
4d18591b
YQ
24542016-01-26 Yao Qi <yao.qi@linaro.org>
2455
2456 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2457 * linux-low.c (install_software_single_step_breakpoints): Don't
2458 call regcache_read_pc.
2459 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2460 argument pc.
2461
d8020970
YQ
24622016-01-26 Yao Qi <yao.qi@linaro.org>
2463
2464 * linux-low.c (install_software_single_step_breakpoints): Call
2465 regcache_read_pc instead of get_pc.
2466
8b207339
YQ
24672016-01-26 Yao Qi <yao.qi@linaro.org>
2468
2469 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2470 (unblock_async_io): Rename to ...
2471 (block_unblock_async_io): ... it. New function.
2472 (enable_async_io): Don't install SIGIO handler. Unblock it
2473 instead.
2474 (disable_async_io): Don't ignore SIGIO. Block it instead.
2475 (initialize_async_io): Install SIGIO handler. Don't call
2476 unblock_async_io.
2477
18879fef
YQ
24782016-01-26 Yao Qi <yao.qi@linaro.org>
2479
2480 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2481 first character is '\003', call *the_target->request_interrupt.
2482
a0f8e08a
YQ
24832016-01-25 Yao Qi <yao.qi@linaro.org>
2484
2485 * remote-utils.c (new_thread_notify): Remove.
2486 (dead_thread_notify): Likewise.
2487 * remote-utils.h (new_thread_notify): Remove declaration.
2488 (dead_thread_notify): Likewise.
2489
cc5fd9ab
MK
24902016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2491
2492 * gdb.trace/pending.exp: Fix expected message on continue.
2493
99e8eb11
MK
24942016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2495
2496 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2497 it works properly on big-endian machines where sizeof (CORE_ADDR)
2498 != sizeof (void *).
2499
a994041d
PA
25002016-01-21 Pedro Alves <palves@redhat.com>
2501
2502 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2503 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2504 * configure: Regenerate.
2505
f7a6a40d
YQ
25062016-01-21 Yao Qi <yao.qi@linaro.org>
2507
2508 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2509 is_thumb and set it according to CPSR saved on the stack.
2510 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2511 arm_sigreturn_next_pc.
2512
6f69e520
YQ
25132016-01-18 Yao Qi <yao.qi@linaro.org>
2514
2515 * linux-low.c (linux_set_pc_64bit): New function.
2516 (linux_get_pc_64bit): New function.
2517 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2518 Declare.
2519 * linux-sparc-low.c (debug_threads): Remove declaration.
2520 (sparc_get_pc): Remove.
2521 (the_low_target): Use linux_get_pc_64bit instead of
2522 sparc_get_pc.
2523 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2524 (the_low_target): Use linux_get_pc_64bit and
2525 linux_set_pc_64bit.
2526
276d4552
YQ
25272016-01-18 Yao Qi <yao.qi@linaro.org>
2528
2529 * linux-arm-low.c (debug_threads): Remove declaration.
2530 (arm_get_pc, arm_set_pc): Remove.
2531 (the_low_target): Use linux_get_pc_32bit and
2532 linux_set_pc_32bit.
2533 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2534 (the_low_target): Use linux_get_pc_32bit and
2535 linux_set_pc_32bit.
2536 * linux-cris-low.c (debug_threads): Remove declaration.
2537 (cris_get_pc, cris_set_pc,): Remove.
2538 (the_low_target): Use linux_get_pc_32bit and
2539 linux_set_pc_32bit.
2540 * linux-crisv32-low.c (debug_threads): Remove declaration.
2541 (cris_get_pc, cris_set_pc): Remove.
2542 (the_low_target): Use linux_get_pc_32bit and
2543 linux_set_pc_32bit.
2544 * linux-low.c: Include inttypes.h.
2545 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2546 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2547 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2548 (the_low_target): Use linux_get_pc_32bit and
2549 linux_set_pc_32bit.
2550 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2551 (the_low_target): Use linux_get_pc_32bit and
2552 linux_set_pc_32bit.
2553 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2554 (the_low_target): Use linux_get_pc_32bit and
2555 linux_set_pc_32bit.
2556 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2557 (the_low_target): Use linux_get_pc_32bit and
2558 linux_set_pc_32bit.
2559 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2560 (the_low_target): Use linux_get_pc_32bit and
2561 linux_set_pc_32bit.
2562
eb0edac8
GB
25632016-01-18 Gary Benson <gbenson@redhat.com>
2564
2565 * configure.ac (AC_FUNC_FORK): New check.
2566 * config.in: Regenerate.
2567 * configure: Likewise.
2568
1b451dda
YQ
25692016-01-14 Yao Qi <yao.qi@linaro.org>
2570
2571 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2572 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2573 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2574 arm_get_next_pcs_ctor.
2575
82075af2
JS
25762016-01-12 Josh Stone <jistone@redhat.com>
2577 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2578
2579 * inferiors.h: Include "gdb_vecs.h".
2580 (struct process_info): Add syscalls_to_catch.
2581 * inferiors.c (remove_process): Free syscalls_to_catch.
2582 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2583 syscall_return stops.
2584 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2585 * server.c (handle_general_set): Handle QCatchSyscalls.
2586 (handle_query): Report support for QCatchSyscalls.
2587 * target.h (struct target_ops): Add supports_catch_syscall.
2588 (target_supports_catch_syscall): New macro.
2589 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2590 (struct lwp_info): Add syscall_state.
2591 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2592 Maintain syscall_state and syscalls_to_catch across exec.
2593 (get_syscall_trapinfo): New function, proxy to the_low_target.
2594 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2595 (linux_low_filter_event): Toggle syscall_state entry/return for
2596 syscall traps, and set it ignored for all others.
2597 (gdb_catching_syscalls_p): New function.
2598 (gdb_catch_this_syscall_p): New function.
2599 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2600 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2601 (linux_supports_catch_syscall): New function.
2602 (linux_target_ops): Install it.
2603 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2604 (the_low_target): Install it.
2605
8f13a3ce
MF
26062016-01-12 Mike Frysinger <vapier@gentoo.org>
2607
2608 * acinclude.m4: Include new ../warning.m4 file.
2609 * configure: Regenerated.
2610 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2611
5b3da067
MF
26122016-01-12 Mike Frysinger <vapier@gentoo.org>
2613
2614 * ax.c (is_goto_target): Mark static.
2615 * linux-low.c (register_addr): Likewise.
2616 (linux_fetch_registers, linux_store_registers): Likewise.
2617 * mem-break.c (any_persistent_commands): Fix old prototype.
2618 (add_commands_to_breakpoint): Mark static.
2619 * regcache.c (find_register_by_name): Delete unused func.
2620 * remote-utils.c (hex_or_minus_one): Mark static.
2621 * server.c (monitor_show_help): Mark static.
2622 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2623 handle_v_requests): Likewise.
2624
bc504a31
PA
26252016-01-12 Pedro Alves <palves@redhat.com>
2626
2627 Remove use of the registered trademark symbol throughout.
2628
5a0dd67a
YQ
26292016-01-08 Yao Qi <yao.qi@linaro.org>
2630
2631 * remote-utils.c (getpkt): If c is '\003', call target hook
2632 request_interrupt.
2633
b2ca446f
YQ
26342016-01-06 Yao Qi <yao.qi@linaro.org>
2635
2636 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2637 linux-aarch32-low.c.
2638 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2639 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2640 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2641 (thumb2_breakpoint): Declare.
2642 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2643 linux-aarch32-low.h.
2644 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2645 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2646 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2647
edd88788
JB
26482016-01-01 Joel Brobecker <brobecker@adacore.com>
2649
2650 * gdbreplay.c (gdbreplay_version): Change copyright year in
2651 version message.
2652 * server.c (gdbserver_version): Likewise.
2653
65da7f14
PP
26542015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2655
2656 * server.c (crc32_table): Delete.
2657 (crc32): Use libiberty's xcrc32 function.
2658
4abd5ed2
JB
26592015-12-22 Joel Brobecker <brobecker@adacore.com>
2660
2661 * lynx-low.c (lynx_delete_thread_callback): New function.
2662 (lynx_mourn): Properly delete our process and all of its
2663 threads. Remove call to clear_inferiors.
2664
0e50fe5c
JB
26652015-12-22 Joel Brobecker <brobecker@adacore.com>
2666
2667 * target.c (thread_search_callback): Add check that
2668 the thread_stopped target callback is not NULL before
2669 calling it.
2670
35adc03f
YQ
26712015-12-21 Yao Qi <yao.qi@linaro.org>
2672
2673 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2674 arm breakpoint.
2675
bd2b2909
AT
26762015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2677
2678 * server.c (handle_query): Call target_supports_software_single_step.
2679
7fe5e27e
AT
26802015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2681
2682 * linux-low.c (single_step): New function.
2683 (linux_resume_one_lwp_throw): Call single_step.
2684 (start_step_over): Likewise.
2685
d9311bfa
AT
26862015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2687
2688 * Makefile.in (SFILES): Append arch/arm-linux.c,
2689 arch/arm-get-next-pcs.c.
2690 (arm-linux.o): New rule.
2691 (arm-get-next-pcs.o): New rule.
2692 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2693 arm-linux.o.
2694 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2695 to linux-aarch32-low.c.
2696 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2697 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2698 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2699 (thumb2_breakpoint_len): Likewise.
2700 (arm_is_thumb_mode): Make non-static.
2701 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2702 from linux-aarch32-low.c.
2703 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2704 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2705 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2706 (thumb2_breakpoint_len): Likewise.
2707 (arm_is_thumb_mode): New declaration.
2708 * linux-arm-low.c: Include arch/arm-linux.h
2709 aarch/arm-get-next-pcs.h, sys/syscall.h.
2710 (get_next_pcs_ops): New struct.
2711 (get_next_pcs_addr_bits_remove): New function.
2712 (get_next_pcs_is_thumb): New function.
2713 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2714 (arm_sigreturn_next_pc): Likewise.
2715 (get_next_pcs_syscall_next_pc): Likewise.
2716 (arm_gdbserver_get_next_pcs): Likewise.
2717 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2718 Initialize.
2719 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2720 * server.h: Include gdb_vecs.h.
2721
68ce2059
AT
27222015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2723
2724 * Makefile.in (SFILES): Append common/common-regcache.c.
2725 (OBS): Append common-regcache.o.
2726 (common-regcache.o): New rule.
2727 * regcache.c (init_register_cache): Initialize cache to
2728 REG_UNAVAILABLE.
2729 (regcache_raw_read_unsigned): New function.
2730 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2731 register_status enum.
2732
fa5308bd
AT
27332015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2734
2735 * linux-aarch64-low.c (the_low_targets): Rename
2736 breakpoint_reinsert_addr to get_next_pcs.
2737 * linux-arm-low.c (the_low_targets): Likewise.
2738 * linux-bfin-low.c (the_low_targets): Likewise.
2739 * linux-cris-low.c (the_low_targets): Likewise.
2740 * linux-crisv32-low.c (the_low_targets): Likewise.
2741 * linux-low.c (can_software_single_step): Likewise.
2742 (install_software_single_step_breakpoints): New function.
2743 (start_step_over): Use install_software_single_step_breakpoints.
2744 * linux-low.h: New CORE_ADDR vector.
2745 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2746 get_next_pcs.
2747 * linux-mips-low.c (the_low_targets): Likewise.
2748 * linux-nios2-low.c (the_low_targets): Likewise.
2749 * linux-sparc-low.c (the_low_targets): Likewise.
2750
4a6ed09b
PA
27512015-12-17 Pedro Alves <palves@redhat.com>
2752
2753 * linux-low.c (linux_kill_one_lwp): Remove references to
2754 LinuxThreads.
2755 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2756 to 'kill'.
2757 (linux_init_signals): Delete.
2758 (initialize_low): Adjust.
2759 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2760
7544db95
PA
27612015-12-16 Pedro Alves <palves@redhat.com>
2762
2763 * configure.ac (compiler warning flags): When testing a
2764 -Wno-foo option, check whether -Wfoo works instead.
2765 * configure: Regenerate.
2766
8020350c
DB
27672015-12-11 Don Breazeal <donb@codesourcery.com>
2768
2769 * server.c (process_serial_event): Don't exit from gdbserver
2770 in remote mode if there are still active inferiors.
2771
db91f502
YQ
27722015-12-11 Yao Qi <yao.qi@linaro.org>
2773
2774 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2775 arm_breakpoint_at if the process is 32-bit.
2776
b37a6290
YQ
27772015-12-11 Yao Qi <yao.qi@linaro.org>
2778
2779 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2780 arm breakpoint.
2781
17b1509a
YQ
27822015-12-07 Yao Qi <yao.qi@linaro.org>
2783
2784 * configure.srv: Append arm.o to srv_tgtobj for
2785 aarch64*-*-linux* target.
2786 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2787 from linux-arm-low.c.
2788 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2789 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2790 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2791 (thumb2_breakpoint_len): Likewise.
2792 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2793 (arm_breakpoint_kinds): Likewise.
2794 (arm_breakpoint_kind_from_pc): Likewise.
2795 (arm_sw_breakpoint_from_kind): Likewise.
2796 (arm_breakpoint_kind_from_current_state): Likewise.
2797 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2798 (arm_sw_breakpoint_from_kind): Declare.
2799 (arm_breakpoint_kind_from_current_state): Declare.
2800 (arm_breakpoint_at): Declare.
2801 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2802 arm_sw_breakpoint_from_kind if process is 32-bit.
2803 (aarch64_breakpoint_kind_from_pc): New function.
2804 (aarch64_breakpoint_kind_from_current_state): New function.
2805 (the_low_target): Initialize fields breakpoint_kind_from_pc
2806 and breakpoint_kind_from_current_state.
2807 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2808 linux-aarch32-low.c.
2809 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2810 (arm_breakpoint, arm_breakpoint_len): Likewise.
2811 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2812 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2813 (arm_is_thumb_mode): Likewise.
2814 (arm_breakpoint_at): Likewise.
2815 (arm_breakpoint_kind_from_pc): Likewise.
2816 (arm_sw_breakpoint_from_kind): Likewise.
2817 (arm_breakpoint_kind_from_current_state): Likewise.
2818
2819 Revert:
2820 2015-08-04 Yao Qi <yao.qi@linaro.org>
2821
2822 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2823 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2824 * server.c (extended_protocol): Remove "static".
2825 * server.h (extended_protocol): Declare it.
2826
ece66d65
JS
28272015-12-04 Josh Stone <jistone@redhat.com>
2828
2829 * target.h (struct target_ops) <arch_setup>: Rename to ...
2830 (struct target_ops) <post_create_inferior>: ... this.
2831 (target_arch_setup): Rename to ...
2832 (target_post_create_inferior): ... this, calling post_create_inferior.
2833 * server.c (start_inferior): Update target_arch_setup calls to
2834 target_post_create_inferior.
2835 * linux-low.c (linux_low_ptrace_options): Forward declare.
2836 (linux_arch_setup): Update its comment for general use.
2837 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2838 (struct linux_target_ops): Use linux_post_create_inferior.
2839 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2840 to post_create_inferior.
2841 * nto-low.c (struct nto_target_ops): Likewise.
2842 * spu-low.c (struct spu_target_ops): Likewise.
2843 * win32-low.c (struct win32_target_ops): Likewise.
2844
e58c48b4
AT
28452015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2846
2847 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2848
fbec8956
AT
28492015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2850
2851 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2852 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2853 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2854 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2855 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2856 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2857 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2858 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2859 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2860 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2861 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2862 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2863
9b4c5f87
AT
28642015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2865
2866 * linux-low.c (linux_look_up_symbols): Don't call
2867 linux_supports_traceclone.
2868 * linux-low.h (thread_db_init): Remove use_events argument.
2869 * thread-db.c (thread_db_use_event): Remove global variable.
2870 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2871 (struct thread_db) <td_create_bp>: Remove field.
2872 (thread_db_create_event): Remove function.
2873 (thread_db_enable_reporting): Likewise.
2874 (find_one_thread): Don't check for thread_db_use_events.
2875 (attach_thread): Likewise.
2876 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2877 (try_thread_db_load_1): Don't check for thread_db_use_events.
2878 (thread_db_init): Remove use_events argument and thread events
2879 handling.
2880 (remove_thread_event_breakpoints): Remove function.
2881 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2882
7d00775e
AT
28832015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2884
2885 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2886 New function.
2887 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2888 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2889 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2890 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2891 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2892 Initialize.
2893 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2894 New function.
2895 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2896 * linux-low.c (can_hardware_single_step): Use
2897 supports_hardware_single_step.
2898 (can_software_single_step): New function.
2899 (start_step_over): Call can_software_single_step.
2900 (linux_supports_hardware_single_step): New function.
2901 (struct target_ops) <supports_software_single_step>: Initialize.
2902 * linux-low.h (struct linux_target_ops)
2903 <supports_hardware_single_step>: Initialize.
2904 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2905 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2906 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2907 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2908 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2909 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2910 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2911 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2912 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2913 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2914 Initialize.
2915 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2916 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2917 Initialize.
2918 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2919 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2920 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2921 New function.
2922 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2923 * target.h (struct target_ops): <supports_software_single_step>:
2924 New field.
2925 (target_supports_software_single_step): New macro.
2926
2d97cd35
AT
29272015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2928
2929 * linux-low.c (linux_wait_1): Fix pc advance condition.
2930 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2931 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2932
769ef81f
AT
29332015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2934
2935 * linux-arm-low.c (arm_is_thumb_mode): New function.
2936 (arm_breakpoint_at): Use arm_is_thumb_mode.
2937 (arm_breakpoint_kind_from_current_state): New function.
2938 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2939 Initialize.
2940 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2941 (linux_breakpoint_kind_from_current_state): New function.
2942 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2943 * linux-low.h (struct linux_target_ops)
2944 <breakpoint_kind_from_current_state>: New field.
2945 * target.h (struct target_ops): Likewise.
2946 (target_breakpoint_kind_from_current_state): New macro.
2947
1bebeeca
PA
29482015-11-30 Pedro Alves <palves@redhat.com>
2949
2950 * linux-low.c (linux_resume): Wake up the event loop before
2951 returning.
2952
a67a9fae
PA
29532015-11-30 Pedro Alves <palves@redhat.com>
2954
2955 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2956 check.
2957 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2958 to -1.
2959 * target.c (struct thread_search): New structure.
2960 (thread_search_callback): New function.
2961 (prev_general_thread): New global.
2962 (prepare_to_access_memory, done_accessing_memory): New functions.
2963 * target.h (prepare_to_access_memory, done_accessing_memory):
2964 Replace macros with function declarations.
2965
f2faf941
PA
29662015-11-30 Pedro Alves <palves@redhat.com>
2967
2968 PR 14618
2969 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2970 report TARGET_WAITKIND_NO_RESUMED.
2971 * remote-utils.c (prepare_resume_reply): Handle
2972 TARGET_WAITKIND_NO_RESUMED.
2973 * server.c (report_no_resumed): New global.
2974 (handle_query) <qSupported>: Handle "no-resumed+". Report
2975 "no-resumed+" support.
2976 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2977 return error if the client doesn't support no-resumed events.
2978 (push_stop_notification): New function.
2979 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2980 events if the client supports them.
2981
a681f9c9
PA
29822015-11-30 Pedro Alves <palves@redhat.com>
2983
2984 * linux-low.c (thread_still_has_status_pending_p): Don't check
2985 vCont;t here.
2986 (lwp_resumed): New function.
2987 (status_pending_p_callback): Return early if the LWP is not
2988 supposed to be resumed.
2989
65706a29
PA
29902015-11-30 Pedro Alves <palves@redhat.com>
2991
2992 * linux-low.c (handle_extended_wait): Assert that the LWP's
2993 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2994 thread create events, leave the new child's status pending.
2995 (linux_low_filter_event): If GDB wants to hear about thread exit
2996 events, leave the LWP marked dead and don't delete it.
2997 (linux_wait_for_event_filtered): Don't check for thread exit.
2998 (filter_exit_event): New function.
2999 (linux_wait_1): Use it, when returning an exit event.
3000 (linux_resume_one_lwp_throw): Assert that the LWP's
3001 waitstatus is TARGET_WAITKIND_IGNORE.
3002 * remote-utils.c (prepare_resume_reply): Handle
3003 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3004 * server.c (report_thread_events): New global.
3005 (handle_general_set): Handle QThreadEvents.
3006 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3007 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3008 TARGET_WAITKIND_THREAD_EXITED.
3009 * server.h (report_thread_events): Declare.
3010
56cf4bed
PA
30112015-11-30 Pedro Alves <palves@redhat.com>
3012
3013 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3014 the thread's last_resume_kind was resume_stop.
3015
500c1d85
PA
30162015-11-30 Pedro Alves <palves@redhat.com>
3017
3018 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3019 before returning.
3020
de979965
PA
30212015-11-30 Pedro Alves <palves@redhat.com>
3022
3023 * server.c (handle_v_requests): Handle vCtrlC.
3024
34c65914
PA
30252015-11-30 Pedro Alves <palves@redhat.com>
3026
3027 * gdbthread.h (find_any_thread_of_pid): Declare.
3028 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3029 functions.
3030 * server.c (handle_query): If current_thread is NULL, look for
3031 another thread of the selected process.
3032
79efa585 30332015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 3034 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
3035
3036 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3037 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3038 name in reply.
3039 * target.h (struct target_ops) <thread_name>: New field.
3040 (target_thread_name): New macro.
3041
80d82c19
JB
30422015-11-23 Joel Brobecker <brobecker@adacore.com>
3043
3044 * regcache.h (regcache_invalidate_pid): Add declaration.
3045 * regcache.c (regcache_invalidate_pid): New function, extracted
3046 from regcache_invalidate.
3047 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3048 Add trivial documentation comment.
3049 * lynx-low.c: Use regcache_invalidate_pid instead of
3050 regcache_invalidate.
3051
64da5dd5
JB
30522015-11-23 Joel Brobecker <brobecker@adacore.com>
3053
3054 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3055 and Elf64_auxv_t if the target is Android.
3056
37ce4055
DE
30572015-11-22 Doug Evans <xdje42@gmail.com>
3058
3059 * target.h: #include <sys/types.h>.
3060
06e03fff
PA
30612015-11-19 Pedro Alves <palves@redhat.com>
3062
3063 * linux-low.c (linux_process_qsupported): Change prototype.
3064 Adjust.
3065 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3066 Change prototype.
3067 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3068 and adjust to loop over all features.
3069 * server.c (handle_query) <qSupported>: Adjust to call
3070 target_process_qsupported once, passing it a vector of unprocessed
3071 features.
3072 * target.h (struct target_ops) <process_qsupported>: Change
3073 prototype.
3074 (target_process_qsupported): Adjust.
3075
9a084706
PA
30762015-11-19 Pedro Alves <palves@redhat.com>
3077
3078 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3079 mode.
3080 * configure: Regenerate.
3081
dad44a1f
PA
30822015-11-19 Pedro Alves <palves@redhat.com>
3083
3084 * configure: Regenerate.
3085
231c0592
YQ
30862015-11-19 Yao Qi <yao.qi@linaro.org>
3087
3088 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3089 type to uint32_t.
3090
6c1c9a8b
YQ
30912015-11-19 Yao Qi <yao.qi@linaro.org>
3092
3093 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3094 (struct aarch64_operand): Move enum out.
3095
9caa3311
YQ
30962015-11-19 Yao Qi <yao.qi@linaro.org>
3097
3098 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3099 struct user_fpsimd_state *.
3100 (aarch64_store_fpregset): Likewise.
3101
6a69a054
YQ
31022015-11-19 Yao Qi <yao.qi@linaro.org>
3103
3104 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3105 struct user_pt_regs *.
3106 (aarch64_store_gregset): Likewise.
3107
1798301e
PA
31082015-11-18 Pedro Alves <palves@redhat.com>
3109
3110 * Makefile.in (all_object_files): Add $IPA_OBJS.
3111
ce7715e2
PA
31122015-11-17 Pedro Alves <palves@redhat.com>
3113
3114 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3115 GDB_SIGNAL_0 and gdb_signal_to_string.
3116
c0879059
PA
31172015-11-17 Pedro Alves <palves@redhat.com>
3118
3119 * win32-low.c (handle_output_debug_string): Remove parameter.
3120 (win32_kill): Remove our_status local and adjust call to
3121 handle_output_debug_string.
3122 (get_child_debug_event): Adjust call to
3123 handle_output_debug_string.
3124
1996e237
SM
31252015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3126
3127 * linux-mips-low.c (mips_fill_gregset): Add cast.
3128 (mips_store_gregset): Likewise.
3129 (mips_fill_fpregset): Likewise.
3130 (mips_store_fpregset): Likewise.
3131
cbec665b
SM
31322015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3133
3134 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3135 priv.
3136
eb3e3c67
SM
31372015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3138
3139 * linux-mips-low.c (mips_linux_new_thread): Change type of
3140 watch_type to enum target_hw_bp_type.
3141
171de4b8
SM
31422015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3143
3144 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3145 Change return type to arm_hwbp_type.
3146
04248ead
SM
31472015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3148
3149 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3150 (arm_store_gregset): Likewise.
3151 * linux-arm-low.c (arm_get_hwcap): Likewise.
3152 (arm_read_description): Likewise.
3153
04b3479c
SM
31542015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3155
3156 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3157
2bc84e8a
SM
31582015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3159
3160 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3161 (ppc_fill_vsxregset): Likewise.
3162 (ppc_store_vsxregset): Likewise.
3163 (ppc_fill_vrregset): Likewise.
3164 (ppc_store_vrregset): Likewise.
3165 (ppc_fill_evrregset): Likewise.
3166 (ppc_store_evrregset): Likewise.
3167
e6c5bb05
SM
31682015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3169
3170 * linux-ppc-low.c (ppc_usrregs_info): Remove
3171 forward-declaration.
3172 (ppc_arch_setup): Move lower in file.
3173
7ea45d72
SM
31742015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3175
3176 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3177 (ps_pdwrite): Likewise.
3178
69291610
HW
31792015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3180
3181 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3182 to after assert checks.
3183
b42945fd
SM
31842015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3185
3186 * proc-service.c (ps_pdread): Add/adjust casts.
3187 (ps_pdwrite): Add/adjust casts.
3188
d6f85c84
SM
31892015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3190
3191 * server.c (handle_search_memory_1): Cast return value of
3192 memmem.
3193
f98cd059
SM
31942015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3195
3196 * server.c (write_qxfer_response): Change type of data to
3197 gdb_byte *.
3198
d2412fa5
PA
31992015-10-29 Pedro Alves <palves@redhat.com>
3200
3201 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3202
c17414a2
PA
32032015-10-29 Pedro Alves <palves@redhat.com>
3204
3205 * tracepoint.c (clear_installed_tracepoints): Add casts.
3206
e053fbc4
PA
32072015-10-29 Pedro Alves <palves@redhat.com>
3208
3209 * server.c (handle_v_cont, process_serial_event): Add enum
3210 gdb_signal casts to signal parsing code.
3211
add67df8
PA
32122015-10-29 Pedro Alves <palves@redhat.com>
3213
3214 * linux-low.h (NULL_REGSET): Define.
3215 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3216 * linux-arm-low.c (arm_regsets): Likewise.
3217 * linux-crisv32-low.c (cris_regsets): Likewise.
3218 * linux-m68k-low.c (m68k_regsets): Likewise.
3219 * linux-mips-low.c (mips_regsets): Likewise.
3220 * linux-nios2-low.c (nios2_regsets): Likewise.
3221 * linux-ppc-low.c (ppc_regsets): Likewise.
3222 * linux-s390-low.c (s390_regsets): Likewise.
3223 * linux-sh-low.c (sh_regsets): Likewise.
3224 * linux-sparc-low.c (sparc_regsets): Likewise.
3225 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3226 * linux-tile-low.c (tile_regsets): Likewise.
3227 * linux-x86-low.c (x86_regsets): Likewise.
3228 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3229
50bc912a
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
682b2546
DE
32482015-10-26 Doug Evans <dje@google.com>
3249
3250 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3251
963843d4
DE
32522015-10-26 Doug Evans <dje@google.com>
3253
3254 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3255
d41401ac
DE
32562015-10-26 Doug Evans <dje@google.com>
3257
3258 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3259 for debug_printf.
3260 (attach_thread, find_new_threads_callback): Ditto.
3261
3db28855
AT
32622015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3263
3264 * mem-break.h (set_breakpoint_data): Remove.
3265
fb78e89c
AT
32662015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3267
3268 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3269 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3270 (initialize_low): Remove set_breakpoint_data call.
3271 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3272 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3273 (initialize_low): Remove set_breakpoint_data call.
3274 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3275 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3276 (initialize_low): Remove set_breakpoint_data call.
3277
2e6ee069
AT
32782015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3279
3280 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3281 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3282 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3283 * target.h (target_breakpoint_kind_from_pc): New macro.
3284
1652a986
AT
32852015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3286
3287 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3288 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3289 the default breakpoint kind.
3290
abeead09
AT
32912015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3292
3293 * linux-arm-low.c (arm_supports_z_point_type): Add software
3294 breakpoint support.
3295
b0b4b501
AT
32962015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3297
3298 * linux-arm-low.c: Refactor breakpoint definitions.
3299 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3300 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3301
8689682c
AT
33022015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3303
3304 * Makefile.in: Add arm.c/o.
3305 * configure.srv: Likewise.
3306 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3307 (arm_breakpoint_kind_from_pc): New function.
3308 (arm_sw_breakpoint_from_kind): Return proper kind.
3309 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3310
27165294
AT
33112015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3312
3313 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3314 removal.
3315 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3316 (struct raw_breakpoint) <size>: Remove.
3317 (struct raw_breakpoint) <kind>: Add.
3318 (bp_size): New function.
3319 (bp_opcode): Likewise.
3320 (find_raw_breakpoint_at): Adjust for kind.
3321 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3322 (remove_memory_breakpoint): Adjust for kind call bp_size.
3323 (set_raw_breakpoint_at): Adjust for kind.
3324 (set_breakpoint): Likewise.
3325 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3326 (delete_raw_breakpoint): Adjust for kind.
3327 (delete_breakpoint): Likewise.
3328 (find_gdb_breakpoint): Likewise.
3329 (set_gdb_breakpoint_1): Likewise.
3330 (set_gdb_breakpoint): Likewise.
3331 (delete_gdb_breakpoint_1): Likewise.
3332 (delete_gdb_breakpoint): Likewise.
3333 (uninsert_raw_breakpoint): Likewise.
3334 (reinsert_raw_breakpoint): Likewise.
3335 (set_breakpoint_data): Remove.
3336 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3337 (check_mem_read): Adjust for kind call bp_size.
3338 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3339 (clone_one_breakpoint): Adjust for kind.
3340 * mem-break.h (set_gdb_breakpoint): Likewise.
3341 (delete_gdb_breakpoint): Likewise.
3342 * server.c (process_serial_event): Likewise.
3343
dd373349
AT
33442015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3345
3346 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3347 (struct linux_target_ops) <breakpoint>: Remove.
3348 (struct linux_target_ops) <breakpoint_len>: Remove.
3349 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3350 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3351 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3352 (arm_sw_breakpoint_from_kind): New function.
3353 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3354 (struct linux_target_ops) <breakpoint>: Remove.
3355 (struct linux_target_ops) <breakpoint_len>: Remove.
3356 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3357 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3358 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3359 (struct linux_target_ops) <breakpoint>: Remove.
3360 (struct linux_target_ops) <breakpoint_len>: Remove.
3361 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3362 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3363 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3364 (struct linux_target_ops) <breakpoint>: Remove.
3365 (struct linux_target_ops) <breakpoint_len>: Remove.
3366 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3367 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3368 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3369 and sw_breakpoint_from_kind to increment the pc.
3370 (linux_breakpoint_kind_from_pc): New function.
3371 (linux_sw_breakpoint_from_kind): New function.
3372 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3373 (initialize_low): Call breakpoint_kind_from_pc and
3374 sw_breakpoint_from_kind to replace breakpoint_data/len.
3375 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3376 New field.
3377 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3378 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3379 (struct linux_target_ops) <breakpoint>: Remove.
3380 (struct linux_target_ops) <breakpoint_len>: Remove.
3381 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3382 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3383 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3384 (struct linux_target_ops) <breakpoint>: Remove.
3385 (struct linux_target_ops) <breakpoint_len>: Remove.
3386 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3387 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3388 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3389 (struct linux_target_ops) <breakpoint>: Remove.
3390 (struct linux_target_ops) <breakpoint_len>: Remove.
3391 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3392 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3393 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3394 (struct linux_target_ops) <breakpoint>: Remove.
3395 (struct linux_target_ops) <breakpoint_len>: Remove.
3396 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3397 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3398 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3399 (struct linux_target_ops) <breakpoint>: Remove.
3400 (struct linux_target_ops) <breakpoint_len>: Remove.
3401 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3402 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3403 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3404 (struct linux_target_ops) <breakpoint>: Remove.
3405 (struct linux_target_ops) <breakpoint_len>: Remove.
3406 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3407 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3408 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3409 (struct linux_target_ops) <breakpoint>: Remove.
3410 (struct linux_target_ops) <breakpoint_len>: Remove.
3411 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3412 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3413 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3414 (struct linux_target_ops) <breakpoint>: Remove.
3415 (struct linux_target_ops) <breakpoint_len>: Remove.
3416 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3417 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3418 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3419 (struct linux_target_ops) <breakpoint>: Remove.
3420 (struct linux_target_ops) <breakpoint_len>: Remove.
3421 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3422 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3423 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3424 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3425 (struct linux_target_ops) <breakpoint>: Remove.
3426 (struct linux_target_ops) <breakpoint_len>: Remove.
3427 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3428 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3429 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3430 (struct linux_target_ops) <breakpoint>: Remove.
3431 (struct linux_target_ops) <breakpoint_len>: Remove.
3432 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3433 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3434
4cd98a19
AT
34352015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3436
3437 * linux-cris-low.c (cris_get_pc): Remove void arg.
3438
774ee6d2
AR
34392015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3440
3441 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3442 variable name.
3443
833dcd29
AR
34442015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3445
3446 * inferiors.c (thread_pid_matches_callback): New function.
3447 (find_thread_process): New function.
3448 (remove_thread): Reset current_thread.
3449 (remove_process): Assert threads have been removed first.
3450
8d689ee5
YQ
34512015-10-15 Yao Qi <yao.qi@linaro.org>
3452
3453 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3454 if it is 3.
3455 (aarch64_remove_point): Likewise.
3456 * regcache.c (regcache_register_size): New function.
3457
1c2e1515
YQ
34582015-10-12 Yao Qi <yao.qi@linaro.org>
3459
3460 * linux-aarch64-low.c: Update all callers as emit_load_store
3461 is renamed to aarch64_emit_load_store.
3462
e1c587c3
YQ
34632015-10-12 Yao Qi <yao.qi@linaro.org>
3464
3465 * linux-aarch64-low.c: Update all callers of function renaming
3466 from emit_insn to aarch64_emit_insn.
3467
b6542f81
YQ
34682015-10-12 Yao Qi <yao.qi@linaro.org>
3469
3470 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3471 arch/aarch64-insn.h.
3472 (struct aarch64_memory_operand): Likewise.
3473 (ENCODE): Likewise.
3474 (emit_insn): Move to arch/aarch64-insn.c.
3475 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3476 (emit_load_store): Move to arch/aarch64-insn.c.
3477 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3478 (can_encode_int32): Remove.
3479
246994ce
YQ
34802015-10-12 Yao Qi <yao.qi@linaro.org>
3481
3482 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3483 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3484 (aarch64_relocate_instruction): Likewise.
3485 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3486 (struct aarch64_insn_visitor): Likewise.
3487
0badd99f
YQ
34882015-10-12 Yao Qi <yao.qi@linaro.org>
3489
3490 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3491 (struct aarch64_insn_visitor): New.
3492 (struct aarch64_insn_relocation_data): New.
3493 (aarch64_ftrace_insn_reloc_b): New function.
3494 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3495 (aarch64_ftrace_insn_reloc_cb): Likewise.
3496 (aarch64_ftrace_insn_reloc_tb): Likewise.
3497 (aarch64_ftrace_insn_reloc_adr): Likewise.
3498 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3499 (aarch64_ftrace_insn_reloc_others): Likewise.
3500 (visitor): New.
3501 (aarch64_relocate_instruction): Use visitor.
3502
dfaffe9d
YQ
35032015-10-12 Yao Qi <yao.qi@linaro.org>
3504
3505 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3506 int. Add argument buf.
3507 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3508 aarch64_relocate_instruction.
3509
70b439f0
YQ
35102015-10-12 Yao Qi <yao.qi@linaro.org>
3511
3512 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3513 argument insn. Remove local variable insn. Don't call
3514 target_read_uint32.
3515 (aarch64_install_fast_tracepoint_jump_pad): Call
3516 target_read_uint32.
3517
7781c06f
YQ
35182015-09-30 Yao Qi <yao.qi@linaro.org>
3519
3520 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3521 (emit_load_store_pair): Likewise.
3522
9a3c8263
SM
35232015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3524
3525 * dll.c (match_dll): Add cast(s).
3526 (unloaded_dll): Likewise.
3527 * linux-low.c (second_thread_of_pid_p): Likewise.
3528 (delete_lwp_callback): Likewise.
3529 (count_events_callback): Likewise.
3530 (select_event_lwp_callback): Likewise.
3531 (linux_set_resume_request): Likewise.
3532 * server.c (accumulate_file_name_length): Likewise.
3533 (emit_dll_description): Likewise.
3534 (handle_qxfer_threads_worker): Likewise.
3535 (visit_actioned_threads): Likewise.
3536 * thread-db.c (any_thread_of): Likewise.
3537 * tracepoint.c (same_process_p): Likewise.
3538 (match_blocktype): Likewise.
3539 (build_traceframe_info_xml): Likewise.
3540
224c3ddb
SM
35412015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3542
3543 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3544 assignment.
3545 (gdb_unparse_agent_expr): Likewise.
3546 * hostio.c (require_data): Likewise.
3547 (handle_pread): Likewise.
3548 * linux-low.c (disable_regset): Likewise.
3549 (fetch_register): Likewise.
3550 (store_register): Likewise.
3551 (get_dynamic): Likewise.
3552 (linux_qxfer_libraries_svr4): Likewise.
3553 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3554 (set_fast_tracepoint_jump): Likewise.
3555 (uninsert_fast_tracepoint_jumps_at): Likewise.
3556 (reinsert_fast_tracepoint_jumps_at): Likewise.
3557 (validate_inserted_breakpoint): Likewise.
3558 (clone_agent_expr): Likewise.
3559 * regcache.c (init_register_cache): Likewise.
3560 * remote-utils.c (putpkt_binary_1): Likewise.
3561 (decode_M_packet): Likewise.
3562 (decode_X_packet): Likewise.
3563 (look_up_one_symbol): Likewise.
3564 (relocate_instruction): Likewise.
3565 (monitor_output): Likewise.
3566 * server.c (handle_search_memory): Likewise.
3567 (handle_qxfer_exec_file): Likewise.
3568 (handle_qxfer_libraries): Likewise.
3569 (handle_qxfer): Likewise.
3570 (handle_query): Likewise.
3571 (handle_v_cont): Likewise.
3572 (handle_v_run): Likewise.
3573 (captured_main): Likewise.
3574 * target.c (write_inferior_memory): Likewise.
3575 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3576 * tracepoint.c (init_trace_buffer): Likewise.
3577 (add_tracepoint_action): Likewise.
3578 (add_traceframe): Likewise.
3579 (add_traceframe_block): Likewise.
3580 (cmd_qtdpsrc): Likewise.
3581 (cmd_qtdv): Likewise.
3582 (cmd_qtstatus): Likewise.
3583 (response_source): Likewise.
3584 (response_tsv): Likewise.
3585 (cmd_qtnotes): Likewise.
3586 (gdb_collect): Likewise.
3587 (initialize_tracepoint): Likewise.
3588
afbe19f8
PL
35892015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3590
3591 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3592 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3593 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3594 <NOP>: New.
3595 (enum aarch64_condition_codes): New enum.
3596 (w0): New static global.
3597 (fp): Likewise.
3598 (lr): Likewise.
3599 (struct aarch64_memory_operand) <type>: New
3600 MEMORY_OPERAND_POSTINDEX type.
3601 (postindex_memory_operand): New helper function.
3602 (emit_ret): New function.
3603 (emit_load_store_pair): New function, factored out of emit_stp
3604 with support for MEMORY_OPERAND_POSTINDEX.
3605 (emit_stp): Rewrite using emit_load_store_pair.
3606 (emit_ldp): New function.
3607 (emit_load_store): Likewise.
3608 (emit_ldr): Mention post-index instruction in comment.
3609 (emit_ldrh): New function.
3610 (emit_ldrb): New function.
3611 (emit_ldrsw): Mention post-index instruction in comment.
3612 (emit_str): Likewise.
3613 (emit_subs): New function.
3614 (emit_cmp): Likewise.
3615 (emit_and): Likewise.
3616 (emit_orr): Likewise.
3617 (emit_orn): Likewise.
3618 (emit_eor): Likewise.
3619 (emit_mvn): Likewise.
3620 (emit_lslv): Likewise.
3621 (emit_lsrv): Likewise.
3622 (emit_asrv): Likewise.
3623 (emit_mul): Likewise.
3624 (emit_sbfm): Likewise.
3625 (emit_sbfx): Likewise.
3626 (emit_ubfm): Likewise.
3627 (emit_ubfx): Likewise.
3628 (emit_csinc): Likewise.
3629 (emit_cset): Likewise.
3630 (emit_nop): Likewise.
3631 (emit_ops_insns): New helper function.
3632 (emit_pop): Likewise.
3633 (emit_push): Likewise.
3634 (aarch64_emit_prologue): New function.
3635 (aarch64_emit_epilogue): Likewise.
3636 (aarch64_emit_add): Likewise.
3637 (aarch64_emit_sub): Likewise.
3638 (aarch64_emit_mul): Likewise.
3639 (aarch64_emit_lsh): Likewise.
3640 (aarch64_emit_rsh_signed): Likewise.
3641 (aarch64_emit_rsh_unsigned): Likewise.
3642 (aarch64_emit_ext): Likewise.
3643 (aarch64_emit_log_not): Likewise.
3644 (aarch64_emit_bit_and): Likewise.
3645 (aarch64_emit_bit_or): Likewise.
3646 (aarch64_emit_bit_xor): Likewise.
3647 (aarch64_emit_bit_not): Likewise.
3648 (aarch64_emit_equal): Likewise.
3649 (aarch64_emit_less_signed): Likewise.
3650 (aarch64_emit_less_unsigned): Likewise.
3651 (aarch64_emit_ref): Likewise.
3652 (aarch64_emit_if_goto): Likewise.
3653 (aarch64_emit_goto): Likewise.
3654 (aarch64_write_goto_address): Likewise.
3655 (aarch64_emit_const): Likewise.
3656 (aarch64_emit_call): Likewise.
3657 (aarch64_emit_reg): Likewise.
3658 (aarch64_emit_pop): Likewise.
3659 (aarch64_emit_stack_flush): Likewise.
3660 (aarch64_emit_zero_ext): Likewise.
3661 (aarch64_emit_swap): Likewise.
3662 (aarch64_emit_stack_adjust): Likewise.
3663 (aarch64_emit_int_call_1): Likewise.
3664 (aarch64_emit_void_call_2): Likewise.
3665 (aarch64_emit_eq_goto): Likewise.
3666 (aarch64_emit_ne_goto): Likewise.
3667 (aarch64_emit_lt_goto): Likewise.
3668 (aarch64_emit_le_goto): Likewise.
3669 (aarch64_emit_gt_goto): Likewise.
3670 (aarch64_emit_ge_got): Likewise.
3671 (aarch64_emit_ops_impl): New static global variable.
3672 (aarch64_emit_ops): New target function, return
3673 &aarch64_emit_ops_impl.
3674 (struct linux_target_ops): Install it.
3675
bb903df0
PL
36762015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3677
3678 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3679 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3680 aarch64-ipa.o.
3681 * linux-aarch64-ipa.c: New file.
3682 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3683 and endian.h.
3684 (aarch64_get_thread_area): New target method.
3685 (extract_signed_bitfield): New helper function.
3686 (aarch64_decode_ldr_literal): New function.
3687 (enum aarch64_opcodes): New enum.
3688 (struct aarch64_register): New struct.
3689 (struct aarch64_operand): New struct.
3690 (x0): New static global.
3691 (x1): Likewise.
3692 (x2): Likewise.
3693 (x3): Likewise.
3694 (x4): Likewise.
3695 (w2): Likewise.
3696 (ip0): Likewise.
3697 (sp): Likewise.
3698 (xzr): Likewise.
3699 (aarch64_register): New helper function.
3700 (register_operand): Likewise.
3701 (immediate_operand): Likewise.
3702 (struct aarch64_memory_operand): New struct.
3703 (offset_memory_operand): New helper function.
3704 (preindex_memory_operand): Likewise.
3705 (enum aarch64_system_control_registers): New enum.
3706 (ENCODE): New macro.
3707 (emit_insn): New helper function.
3708 (emit_b): New function.
3709 (emit_bcond): Likewise.
3710 (emit_cb): Likewise.
3711 (emit_tb): Likewise.
3712 (emit_blr): Likewise.
3713 (emit_stp): Likewise.
3714 (emit_ldp_q_offset): Likewise.
3715 (emit_stp_q_offset): Likewise.
3716 (emit_load_store): Likewise.
3717 (emit_ldr): Likewise.
3718 (emit_ldrsw): Likewise.
3719 (emit_str): Likewise.
3720 (emit_ldaxr): Likewise.
3721 (emit_stxr): Likewise.
3722 (emit_stlr): Likewise.
3723 (emit_data_processing_reg): Likewise.
3724 (emit_data_processing): Likewise.
3725 (emit_add): Likewise.
3726 (emit_sub): Likewise.
3727 (emit_mov): Likewise.
3728 (emit_movk): Likewise.
3729 (emit_mov_addr): Likewise.
3730 (emit_mrs): Likewise.
3731 (emit_msr): Likewise.
3732 (emit_sevl): Likewise.
3733 (emit_wfe): Likewise.
3734 (append_insns): Likewise.
3735 (can_encode_int32_in): New helper function.
3736 (aarch64_relocate_instruction): New function.
3737 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3738 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3739 (struct linux_target_ops): Install aarch64_get_thread_area,
3740 aarch64_install_fast_tracepoint_jump_pad and
3741 aarch64_get_min_fast_tracepoint_insn_len.
3742
787749ea
PL
37432015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3744
3745 * Makefile.in (aarch64-insn.o): New rule.
3746 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3747
9812b2e6
YQ
37482015-09-21 Yao Qi <yao.qi@linaro.org>
3749
3750 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3751
18fe412b
YQ
37522015-09-21 Yao Qi <yao.qi@linaro.org>
3753
3754 * tracepoint.c (max_jump_pad_size): Remove.
3755
a0cc84cd
YQ
37562015-09-18 Yao Qi <yao.qi@linaro.org>
3757
3758 * linux-aarch64-low.c: Don't include sys/uio.h.
3759 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3760
d78908cf
WW
37612015-09-16 Wei-cheng Wang <cole945@gmail.com>
3762
3763 * tracepoint.c (eval_result_type): Change prototype.
3764 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3765
d57e0d50
PA
37662015-09-15 Pedro Alves <palves@redhat.com>
3767
3768 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3769 Check whether to report exec events instead of checking whether
3770 multiprocess is enabled.
3771
5a676acc
PA
37722015-09-15 Pedro Alves <palves@redhat.com>
3773
3774 PR remote/18965
3775 * remote-utils.c (prepare_resume_reply): Merge
3776 TARGET_WAITKIND_VFORK_DONE switch case with the
3777 TARGET_WAITKIND_FORKED case.
3778
7c5d0fad
YQ
37792015-09-15 Yao Qi <yao.qi@linaro.org>
3780
3781 * server.c (handle_query): Check string comparison using
3782 "else if" instead of "if".
3783
750ce8d1
YQ
37842015-09-15 Yao Qi <yao.qi@linaro.org>
3785
3786 * server.c (vCont_supported): New global variable.
3787 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3788 matches. Append ";vContSupported+" to own_buf.
3789 (handle_v_requests): Append ";s;S" to own_buf if target supports
3790 hardware single step or vCont_supported is false.
3791 (capture_main): Set vCont_supported to zero.
3792
70b90b91
YQ
37932015-09-15 Yao Qi <yao.qi@linaro.org>
3794
3795 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3796 it to ...
3797 (linux_supports_hardware_single_step): ... New function.
3798 (linux_target_ops): Update.
3799 * lynx-low.c (lynx_target_ops): Set field
3800 supports_hardware_single_step to target_can_do_hardware_single_step.
3801 * nto-low.c (nto_target_ops): Likewise.
3802 * spu-low.c (spu_target_ops): Likewise.
3803 * win32-low.c (win32_target_ops): Likewise.
3804 * target.c (target_can_do_hardware_single_step): New function.
3805 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3806 Remove. <supports_hardware_single_step>: New field.
3807 (target_supports_conditional_breakpoints): Remove.
3808 (target_supports_hardware_single_step): New macro.
3809 (target_can_do_hardware_single_step): Declare.
3810 * server.c (handle_query): Use target_supports_hardware_single_step
3811 instead of target_supports_conditional_breakpoints.
3812
ade90bde
YQ
38132015-09-15 Yao Qi <yao.qi@linaro.org>
3814
3815 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3816 function.
3817 (struct linux_target_ops the_low_target): Install
3818 aarch64_linux_siginfo_fixup.
3819
94585166
DB
38202015-09-11 Don Breazeal <donb@codesourcery.com>
3821 Luis Machado <lgustavo@codesourcery.com>
3822
3823 * linux-low.c (linux_mourn): Static declaration.
3824 (linux_arch_setup): Move in front of
3825 handle_extended_wait.
3826 (linux_arch_setup_thread): New function.
3827 (handle_extended_wait): Handle exec events. Call
3828 linux_arch_setup_thread. Make event_lwp argument a
3829 pointer-to-a-pointer.
3830 (check_zombie_leaders): Do not check stopped threads.
3831 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3832 (linux_low_filter_event): Add lwp and thread for exec'ing
3833 non-leader thread if leader thread has been deleted.
3834 Refactor code into linux_arch_setup_thread and call it.
3835 Pass child lwp pointer by reference to handle_extended_wait.
3836 (linux_wait_for_event_filtered): Update comment.
3837 (linux_wait_1): Prevent clobbering exec event status.
3838 (linux_supports_exec_events): New function.
3839 (linux_target_ops) <supports_exec_events>: Initialize new member.
3840 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3841 new member.
3842 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3843 * server.c (report_exec_events): New global variable.
3844 (handle_query): Handle qSupported query for exec-events feature.
3845 (captured_main): Initialize report_exec_events.
3846 * server.h (report_exec_events): Declare new global variable.
3847 * target.h (struct target_ops) <supports_exec_events>: New
3848 member.
3849 (target_supports_exec_events): New macro.
3850 * win32-low.c (win32_target_ops) <supports_exec_events>:
3851 Initialize new member.
3852
0568462b
MM
38532015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3854
3855 * linux-low.c (linux_low_enable_btrace): Remove.
3856 (linux_target_ops): Replace linux_low_enable_btrace with
3857 linux_enable_btrace.
3858
39edd165
YQ
38592015-09-03 Yao Qi <yao.qi@linaro.org>
3860
3861 * linux-aarch64-low.c (aarch64_insert_point): Call
3862 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3863 returns true.
3864
1db33b5a
UW
38652015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3866
3867 * linux-low.c (check_stopped_by_breakpoint): Use
3868 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3869
ab290430
PA
38702015-08-27 Pedro Alves <palves@redhat.com>
3871
3872 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3873
8d749320
SM
38742015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3875
6711b7f8
SM
3876 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3877 the XNEW-family equivalent.
8d749320
SM
3878 (compile_bytecodes): Likewise.
3879 * dll.c (loaded_dll): Likewise.
3880 * event-loop.c (append_callback_event): Likewise.
3881 (create_file_handler): Likewise.
3882 (create_file_event): Likewise.
3883 * hostio.c (handle_open): Likewise.
3884 * inferiors.c (add_thread): Likewise.
3885 (add_process): Likewise.
3886 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3887 * linux-arm-low.c (arm_new_process): Likewise.
3888 (arm_new_thread): Likewise.
3889 * linux-low.c (add_to_pid_list): Likewise.
3890 (linux_add_process): Likewise.
3891 (handle_extended_wait): Likewise.
3892 (add_lwp): Likewise.
3893 (enqueue_one_deferred_signal): Likewise.
3894 (enqueue_pending_signal): Likewise.
3895 (linux_resume_one_lwp_throw): Likewise.
3896 (linux_resume_one_thread): Likewise.
3897 (linux_read_memory): Likewise.
3898 (linux_write_memory): Likewise.
3899 * linux-mips-low.c (mips_linux_new_process): Likewise.
3900 (mips_linux_new_thread): Likewise.
3901 (mips_add_watchpoint): Likewise.
3902 * linux-x86-low.c (initialize_low_arch): Likewise.
3903 * lynx-low.c (lynx_add_process): Likewise.
3904 * mem-break.c (set_raw_breakpoint_at): Likewise.
3905 (set_breakpoint): Likewise.
3906 (add_condition_to_breakpoint): Likewise.
3907 (add_commands_to_breakpoint): Likewise.
3908 (clone_agent_expr): Likewise.
3909 (clone_one_breakpoint): Likewise.
3910 * regcache.c (new_register_cache): Likewise.
3911 * remote-utils.c (look_up_one_symbol): Likewise.
3912 * server.c (queue_stop_reply): Likewise.
3913 (start_inferior): Likewise.
3914 (queue_stop_reply_callback): Likewise.
3915 (handle_target_event): Likewise.
3916 * spu-low.c (fetch_ppc_memory): Likewise.
3917 (store_ppc_memory): Likewise.
3918 * target.c (set_target_ops): Likewise.
3919 * thread-db.c (thread_db_load_search): Likewise.
3920 (try_thread_db_load_1): Likewise.
3921 * tracepoint.c (add_tracepoint): Likewise.
3922 (add_tracepoint_action): Likewise.
3923 (create_trace_state_variable): Likewise.
3924 (cmd_qtdpsrc): Likewise.
3925 (cmd_qtro): Likewise.
3926 (add_while_stepping_state): Likewise.
3927 * win32-low.c (child_add_thread): Likewise.
3928 (get_image_name): Likewise.
3929
ed8b7b42
YQ
39302015-08-25 Yao Qi <yao.qi@linaro.org>
3931
3932 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3933
db3cb7cb
YQ
39342015-08-25 Yao Qi <yao.qi@linaro.org>
3935
3936 * Makefile.in (aarch64-linux.o): New rule.
3937 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3938 srv_tgtobj.
3939 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3940 (aarch64_init_debug_reg_state): Make it extern.
3941 (aarch64_linux_prepare_to_resume): Remove.
3942
f6011a1c
YQ
39432015-08-25 Yao Qi <yao.qi@linaro.org>
3944
3945 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3946 lwp_arch_private_info and ptid_of_lwp.
3947
88e2cf7e
YQ
39482015-08-25 Yao Qi <yao.qi@linaro.org>
3949
3950 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3951 Find proc_info by find_process_pid. All callers updated.
3952
5e35436e
YQ
39532015-08-25 Yao Qi <yao.qi@linaro.org>
3954
3955 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3956 Remove.
3957 (debug_reg_change_callback): Remove.
3958 (aarch64_notify_debug_reg_change): Remove.
3959
4a8a7965
YQ
39602015-08-25 Yao Qi <yao.qi@linaro.org>
3961
3962 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3963 Call current_lwp_ptid.
3964
32a271ee
YQ
39652015-08-25 Yao Qi <yao.qi@linaro.org>
3966
3967 * linux-aarch64-low.c (debug_reg_change_callback): Use
3968 debug_printf.
3969
0d51c8d7
YQ
39702015-08-25 Yao Qi <yao.qi@linaro.org>
3971
3972 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3973
31a43dd5
YQ
39742015-08-25 Yao Qi <yao.qi@linaro.org>
3975
3976 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3977
8ee52567
YQ
39782015-08-25 Yao Qi <yao.qi@linaro.org>
3979
3980 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3981 the code.
3982
ff3f0f45
YQ
39832015-08-25 Yao Qi <yao.qi@linaro.org>
3984
3985 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3986 Remove.
3987 (debug_reg_change_callback): Remove argument entry and add argument
3988 lwp. Remove local variable thread. Don't print thread id in the
3989 debugging output. Don't check whether pid of thread equals to pid.
3990 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3991 iterate_over_lwps instead find_inferior.
3992
3d40fbb5
PA
39932015-08-24 Pedro Alves <palves@redhat.com>
3994
3995 * inferiors.c (get_first_process): New function.
3996 * inferiors.h (get_first_process): New declaration.
3997 * remote-utils.c (read_ptid): Default to the first process in the
3998 list, instead of to the current thread's process.
3999
438e1e42
PA
40002015-08-24 Pedro Alves <palves@redhat.com>
4001
4002 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4003 * event-loop.c: Likewise.
4004 * remote-utils.c: Likewise.
4005 * tracepoint.c: Likewise.
4006
a8c6d4fc
PA
40072015-08-24 Pedro Alves <palves@redhat.com>
4008
4009 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4010 ptid_get_lwp.
4011
99b0bb12
PA
40122015-08-21 Pedro Alves <palves@redhat.com>
4013
4014 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4015 instead of literal 1.
4016
f8904751
PA
40172015-08-21 Pedro Alves <palves@redhat.com>
4018
4019 * tdesc.c (default_description): Explicitly zero-initialize.
4020
465a859e
PA
40212015-08-21 Pedro Alves <palves@redhat.com>
4022
4023 PR gdb/18749
4024 * inferiors.c (remove_thread): Discard any pending stop reply for
4025 this thread.
4026 * server.c (remove_all_on_match_pid): Rename to ...
4027 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4028 instead of a pid.
4029 (discard_queued_stop_replies): Change parameter to a ptid. Now
4030 extern.
4031 (handle_v_kill, kill_inferior_callback, captured_main)
4032 (process_serial_event): Adjust.
4033 * server.h (discard_queued_stop_replies): Declare.
4034
f0db101d
PA
40352015-08-21 Pedro Alves <palves@redhat.com>
4036
4037 * linux-low.c (wait_for_sigstop): Always switch to no thread
4038 selected if the previously current thread dies.
4039 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4040 process instead of the current thread's.
4041 * remote-utils.c (input_interrupt): Don't check if there's no
4042 current thread.
4043 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4044 current thread to the general thread fails, error out.
4045 (handle_qxfer_auxv, handle_qxfer_libraries)
4046 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4047 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4048 (handle_query): Check if there's a thread selected instead of
4049 checking whether there's any thread in the thread list.
4050 (handle_qxfer_threads, handle_qxfer_btrace)
4051 (handle_qxfer_btrace_conf): Don't error out early if there's no
4052 thread in the thread list.
4053 (handle_v_cont, myresume): Don't set the current thread to the
4054 continue thread.
4055 (process_serial_event) <Hg handling>: Also set thread_id if the
4056 previous general thread is still alive.
4057 (process_serial_event) <g/G handling>: If setting the current
4058 thread to the general thread fails, error out.
4059 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4060 thread's lwp instead of the current thread's.
4061 * target.c (set_desired_thread): If the desired thread was not
4062 found, leave the current thread pointing to NULL. Return an int
4063 (boolean) indicating success.
4064 * target.h (set_desired_thread): Change return type to int.
4065
40045d91
MF
40662015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4067
4068 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4069 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4070 #includes.
4071 (ps_get_thread_area): New function.
4072
45face3b
GB
40732015-08-19 Gary Benson <gbenson@redhat.com>
4074
4075 * hostio.c (handle_pread): Do not attempt to read more data
4076 than hostio_reply_with_data can fit in a packet.
4077
16d5f642
JB
40782015-08-18 Joel Brobecker <brobecker@adacore.com>
4079
4080 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4081
a738da3a
MF
40822015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4083
4084 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4085
33ebda9d
PA
40862015-08-06 Pedro Alves <palves@redhat.com>
4087
4088 * tracepoint.c (expr_eval_result): Now an int.
4089
a44892be
PA
40902015-08-06 Pedro Alves <palves@redhat.com>
4091
4092 * gdbthread.h (struct regcache): Forward declare.
4093 (struct thread_info) <regcache_data>: Now a struct regcache
4094 pointer.
4095 * inferiors.c (inferior_regcache_data)
4096 (set_inferior_regcache_data): Now work with struct regcache
4097 pointers.
4098 * inferiors.h (struct regcache): Forward declare.
4099 (inferior_regcache_data, set_inferior_regcache_data): Now work
4100 with struct regcache pointers.
4101 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4102 (free_register_cache_thread): Remove struct regcache pointer
4103 casts.
4104
608a1e46
PA
41052015-08-06 Pedro Alves <palves@redhat.com>
4106
4107 * server.c (captured_main): On error, print the exception message
4108 to stderr, and if run_once is set, throw a quit.
4109
f0ce0d3a
PA
41102015-08-06 Pedro Alves <palves@redhat.com>
4111
4112 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4113 the current thread.
4114
bf47e248
PA
41152015-08-06 Pedro Alves <palves@redhat.com>
4116
4117 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4118 reading beyond the passed in buffer length.
4119
b6b9ffcc
PL
41202015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4121
4122 * tracepoint.c (symbol_list) <required>: Remove.
4123
863d01bd
PA
41242015-08-06 Pedro Alves <palves@redhat.com>
4125
4126 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4127 count if stopping and suspending threads.
4128 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4129 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4130 (linux_detach): Complete an ongoing step-over.
4131 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4132 throughout.
4133 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4134 (linux_wait_1): If passing a signal to the inferior after
4135 finishing a step-over, unsuspend and re-resume all lwps. If we
4136 see a single-step event but the thread should be continuing, don't
4137 pass the trap to gdb.
4138 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4139 internal_error instead of gdb_assert.
4140 (enqueue_pending_signal): New function.
4141 (check_ptrace_stopped_lwp_gone): Add debug output.
4142 (start_step_over): Use internal_error instead of gdb_assert.
4143 (complete_ongoing_step_over): New function.
4144 (linux_resume_one_thread): Don't resume a suspended thread.
4145 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4146 it stepping.
4147
00db26fa
PA
41482015-08-06 Pedro Alves <palves@redhat.com>
4149
4150 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4151 (linux_thread_alive): Use lwp_is_marked_dead.
4152 (extended_event_reported): Delete.
4153 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4154 instead of extended_event_reported.
4155 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4156 as well.
4157 (lwp_is_marked_dead): New function.
4158 (lwp_running): Use lwp_is_marked_dead.
4159 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4160 comment.
4161
ad071a30
PA
41622015-08-06 Pedro Alves <palves@redhat.com>
4163
4164 * linux-low.c (linux_wait_1): Move fork event output out of the
4165 !report_to_gdb check. Pass event_child->waitstatus to
4166 target_waitstatus_to_string instead of ourstatus.
4167
524b57e6
YQ
41682015-08-04 Yao Qi <yao.qi@linaro.org>
4169
4170 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4171 if current_thread is 32 bit.
4172
6085d6f6
YQ
41732015-08-04 Yao Qi <yao.qi@linaro.org>
4174
4175 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4176 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4177 * server.c (extended_protocol): Remove "static".
4178 * server.h (extended_protocol): Declare it.
4179
8a7e4587
YQ
41802015-08-04 Yao Qi <yao.qi@linaro.org>
4181
4182 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4183 both aarch64 and aarch32.
4184 (aarch64_set_pc): Likewise.
4185
3b53ae99
YQ
41862015-08-04 Yao Qi <yao.qi@linaro.org>
4187
4188 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4189 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4190 arm-with-neon.xml to srv_xmlfiles.
4191 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4192 (is_64bit_tdesc): New function.
4193 (aarch64_linux_read_description): New function.
4194 (aarch64_arch_setup): Call aarch64_linux_read_description.
4195 (regs_info): Rename to regs_info_aarch64.
4196 (aarch64_regs_info): Return right regs_info.
4197 (initialize_low_arch): Call initialize_low_arch_aarch32.
4198
bd9e6534
YQ
41992015-08-04 Yao Qi <yao.qi@linaro.org>
4200
4201 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4202 * linux-aarch32-low.c: New file.
4203 * linux-aarch32-low.h: New file.
4204 * linux-arm-low.c (arm_fill_gregset): Move it to
4205 linux-aarch32-low.c.
4206 (arm_store_gregset): Likewise.
4207 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4208 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4209 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4210 (regs_info): Rename to regs_info_arm.
4211 (arm_regs_info): Return regs_info_aarch32 if
4212 have_ptrace_getregset is 1 and target description is
4213 arm_with_neon or arm_with_vfpv3.
4214 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4215 Call initialize_low_arch_aarch32 instead.
4216
ded48a5e
YQ
42172015-08-04 Yao Qi <yao.qi@linaro.org>
4218
4219 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4220 * linux-low.c: ... here.
4221 * linux-low.h (have_ptrace_getregset): Declare it.
4222
96e9210f
PA
42232015-08-04 Pedro Alves <palves@redhat.com>
4224
4225 * thread-db.c (struct thread_db): Use new typedefs.
4226 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4227 CHK calls.
4228 (disable_thread_event_reporting): Cast result of dlsym to
4229 destination function pointer type.
4230 (thread_db_mourn): Use td_ta_delete_ftype.
4231
af60a1ef
SL
42322015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4233
4234 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4235 arch variant.
4236 (CDX_BREAKPOINT): Define for R2.
4237 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4238 (the_low_target): Add comments.
4239
e8b41681
YQ
42402015-07-30 Yao Qi <yao.qi@linaro.org>
4241
4242 * linux-arm-low.c (arm_hwcap): Remove it.
4243 (arm_read_description): New local variable arm_hwcap. Don't
4244 set arm_hwcap to zero.
4245
89abb039
YQ
42462015-07-30 Yao Qi <yao.qi@linaro.org>
4247
4248 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4249 Use regcache->tdesc instead.
4250 (arm_store_wmmxregset): Likewise.
4251 (arm_fill_vfpregset): Likewise.
4252 (arm_store_vfpregset): Likewise.
4253
deca266c
YQ
42542015-07-30 Yao Qi <yao.qi@linaro.org>
4255
4256 * linux-arm-low.c: Include arch/arm.h.
4257 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4258 (arm_store_gregset): Likewise.
4259
aa58a496
SM
42602015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4261
4262 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4263 ptrace's 4th parameter.
4264
50904b25
YQ
42652015-07-27 Yao Qi <yao.qi@linaro.org>
4266
4267 * configure.srv (case aarch64*-*-linux*): Don't set
4268 srv_linux_usrregs.
4269
5826e159
PA
42702015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4271
4272 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4273 sys/ptrace.h.
4274 * linux-arm-low.c: Likewise.
4275 * linux-cris-low.c: Likewise.
4276 * linux-crisv32-low.c: Likewise.
4277 * linux-low.c: Likewise.
4278 * linux-m68k-low.c: Likewise.
4279 * linux-mips-low.c: Likewise.
4280 * linux-nios2-low.c: Likewise.
4281 * linux-s390-low.c: Likewise.
4282 * linux-sparc-low.c: Likewise.
4283 * linux-tic6x-low.c: Likewise.
4284 * linux-tile-low.c: Likewise.
4285 * linux-x86-low.c: Likewise.
4286
54019719
PA
42872015-07-24 Pedro Alves <palves@redhat.com>
4288
4289 * config.in: Regenerate.
4290 * configure: Regenerate.
4291
eb7aa561
PA
42922015-07-24 Pedro Alves <palves@redhat.com>
4293
4294 * acinclude.m4: Include ../ptrace.m4.
4295 * configure.ac: Call GDB_AC_PTRACE.
4296 * config.in, configure: Regenerate.
4297
55d7b841
YQ
42982015-07-24 Yao Qi <yao.qi@linaro.org>
4299
4300 * linux-low.c (linux_create_inferior): Remove setting to
4301 proc->priv->new_inferior.
4302 (linux_attach): Likewise.
4303 (linux_low_filter_event): Likewise.
4304 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4305
c06cbd92
YQ
43062015-07-24 Yao Qi <yao.qi@linaro.org>
4307
4308 * linux-low.c (linux_arch_setup): New function.
4309 (linux_low_filter_event): If proc->tdesc is NULL and
4310 proc->attached is true, call the_low_target.arch_setup.
4311 Otherwise, keep status pending, and return.
4312 (linux_resume_one_lwp_throw): Don't call get_pc if
4313 thread->while_stepping isn't NULL. Don't call
4314 get_thread_regcache if proc->tdesc is NULL.
4315 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4316 (linux_target_ops): Install arch_setup.
4317 * server.c (start_inferior): Call the_target->arch_setup.
4318 * target.h (struct target_ops) <arch_setup>: New field.
4319 (target_arch_setup): New marco.
4320 * lynx-low.c (lynx_target_ops): Update.
4321 * nto-low.c (nto_target_ops): Update.
4322 * spu-low.c (spu_target_ops): Update.
4323 * win32-low.c (win32_target_ops): Update.
4324
5ae3ebba
YQ
43252015-07-24 Yao Qi <yao.qi@linaro.org>
4326
4327 * linux-low.c (linux_add_process): Don't set
4328 proc->priv->new_inferior.
4329 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4330 (linux_attach): Likewise.
4331
eb97750b
YQ
43322015-07-24 Yao Qi <yao.qi@linaro.org>
4333
4334 * server.c (start_inferior): Code refactor.
4335
51aee833
YQ
43362015-07-24 Yao Qi <yao.qi@linaro.org>
4337
4338 * server.c (process_serial_event): Set general_thread.
4339
af1b22f3
YQ
43402015-07-21 Yao Qi <yao.qi@linaro.org>
4341
4342 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4343 aarch64_linux_get_debug_reg_capacity.
4344
554717a3
YQ
43452015-07-17 Yao Qi <yao.qi@linaro.org>
4346
4347 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4348 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4349 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4350 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4351 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4352 (AARCH64_HWP_ALIGNMENT): Likewise.
4353 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4354 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4355 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4356 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4357 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4358 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4359 (struct aarch64_debug_reg_state): Likewise.
4360 (struct arch_lwp_info): Likewise.
4361 (aarch64_align_watchpoint): Likewise.
4362 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4363 (aarch64_watchpoint_length): Likewise.
4364 (aarch64_point_encode_ctrl_reg): Likewise
4365 (aarch64_point_is_aligned): Likewise.
4366 (aarch64_align_watchpoint): Likewise.
4367 (aarch64_linux_set_debug_regs):
4368 (aarch64_dr_state_insert_one_point): Likewise.
4369 (aarch64_dr_state_remove_one_point): Likewise.
4370 (aarch64_handle_breakpoint): Likewise.
4371 (aarch64_handle_aligned_watchpoint): Likewise.
4372 (aarch64_handle_unaligned_watchpoint): Likewise.
4373 (aarch64_handle_watchpoint): Likewise.
4374
c67ca4de
YQ
43752015-07-17 Yao Qi <yao.qi@linaro.org>
4376
4377 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4378 and don't aarch64_get_debug_reg_state. All callers update.
4379 (aarch64_handle_aligned_watchpoint): Likewise.
4380 (aarch64_handle_unaligned_watchpoint): Likewise.
4381 (aarch64_handle_watchpoint): Likewise.
4382 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4383 (aarch64_remove_point): Likewise.
4384
25abf979
YQ
43852015-07-17 Yao Qi <yao.qi@linaro.org>
4386
4387 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4388 debug_printf.
4389 (aarch64_handle_unaligned_watchpoint): Likewise.
4390
db1ff28b
JK
43912015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4392
4393 Revert the previous 3 commits:
4394 Move gdb_regex* to common/
4395 Move linux_find_memory_regions_full & co.
4396 gdbserver build-id attribute generator
4397
700ca40f
JK
43982015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4399 Jan Kratochvil <jan.kratochvil@redhat.com>
4400
4401 gdbserver build-id attribute generator.
4402 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4403 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4404 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4405 (find_phdr): New.
4406 (get_dynamic): Use find_pdhr to traverse program headers.
4407 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4408 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4409 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4410 (get_hex_build_id): New.
4411 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4412 to reply XML document.
4413
9904185c
JK
44142015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4415 Jan Kratochvil <jan.kratochvil@redhat.com>
4416
4417 * target.c: Include target/target-utils.h and fcntl.h.
4418 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4419 (target_fileio_read_stralloc): New functions.
4420
6e5b4429
JK
44212015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4422
4423 * Makefile.in (OBS): Add gdb_regex.o.
4424 (gdb_regex.o): New.
4425 * config.in: Rebuilt.
4426 * configure: Rebuilt.
4427
ddc98fbf
JK
44282015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4429 Jan Kratochvil <jan.kratochvil@redhat.com>
4430
4431 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4432 * Makefile.in (OBS): Add target-utils.o.
4433 (linux-maps.o, target-utils.o): New.
4434 * configure.srv (srv_linux_obj): Add linux-maps.o.
4435
e57bb7a0
PL
44362015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4437
4438 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4439 function, return 1.
4440 (the_low_target): Install it.
4441
586b02a9
PA
44422015-07-14 Pedro Alves <palves@redhat.com>
4443
4444 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4445 Instead, ignore ECHILD, and throw an error for other errnos.
4446
58c1b36c
PA
44472015-07-10 Pedro Alves <palves@redhat.com>
4448
4449 * event-loop.c (struct callback_event) <data>: Change type to
4450 gdb_client_data instance instead of gdb_client_data pointer.
4451 (append_callback_event): Adjust.
4452
421530db
PL
44532015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4454
4455 * linux-aarch64-low.c: Add comments for each linux_target_ops
4456 method. Remove comments already covered in target_ops and
4457 linux_target_ops definitions.
4458 (the_low_target): Add comments for each unimplemented method.
4459
c2d65f38
YQ
44602015-07-09 Yao Qi <yao.qi@linaro.org>
4461
4462 * linux-aarch64-low.c (aarch64_regmap): Remove.
4463 (aarch64_usrregs_info): Remove.
4464 (regs_info): Set field usrregs to NULL.
4465
b20a6524
MM
44662015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4467
4468 * linux-low.c: Include "rsp-low.h"
4469 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4470 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4471 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4472 (handle_btrace_enable_pt): New.
4473 (handle_btrace_general_set): Support "pt".
4474 (handle_btrace_conf_general_set): Support "pt:size".
4475
96c97461
PL
44762015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4477
4478 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4479 Z_PACKET_SW_BP.
4480
37d66942
PL
44812015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4482
4483 * linux-aarch64-low.c: Remove comment about endianness.
4484 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4485 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4486 memcmp.
4487
dc06243f
GB
44882015-06-24 Gary Benson <gbenson@redhat.com>
4489
4490 * linux-i386-ipa.c (stdint.h): Do not include.
4491 * lynx-i386-low.c (stdint.h): Likewise.
4492 * lynx-ppc-low.c (stdint.h): Likewise.
4493 * mem-break.c (stdint.h): Likewise.
4494 * thread-db.c (stdint.h): Likewise.
4495 * tracepoint.c (stdint.h): Likewise.
4496 * win32-low.c (stdint.h): Likewise.
4497
124e13d9
SM
44982015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4499
4500 * server.c (write_qxfer_response): Update call to
4501 remote_escape_output.
4502
909c2cda
JK
45032015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4504 Jan Kratochvil <jan.kratochvil@redhat.com>
4505
4506 Merge multiple hex conversions.
4507 * gdbreplay.c (tohex): Rename to 'fromhex'.
4508 (logchar): Use fromhex.
4509
24c05f46
JK
45102015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4511
4512 * server.c (handle_qxfer_libraries): Set `version' attribute for
4513 <library-list>.
4514
14d2069a
GB
45152015-06-10 Gary Benson <gbenson@redhat.com>
4516
4517 * target.h (struct target_ops) <multifs_open>: New field.
4518 <multifs_unlink>: Likewise.
4519 <multifs_readlink>: Likewise.
4520 * linux-low.c (nat/linux-namespaces.h): New include.
4521 (linux_target_ops): Initialize the_target->multifs_open,
4522 the_target->multifs_unlink and the_target->multifs_readlink.
4523 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4524 * hostio.c (hostio_fs_pid): New static variable.
4525 (hostio_handle_new_gdb_connection): New function.
4526 (handle_setfs): Likewise.
4527 (handle_open): Use the_target->multifs_open as appropriate.
4528 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4529 (handle_readlink): Use the_target->multifs_readlink as
4530 appropriate.
4531 (handle_vFile): Handle vFile:setfs packets.
4532 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4533 after target_handle_new_gdb_connection.
4534
4b8b5e72
GB
45352015-06-10 Gary Benson <gbenson@redhat.com>
4536
4537 * configure.ac (AC_CHECK_FUNCS): Add setns.
4538 * config.in: Regenerate.
4539 * configure: Likewise.
4540 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4541 (linux-namespaces.o): New rule.
4542 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4543
3ac2e371
GB
45442015-06-09 Gary Benson <gbenson@redhat.com>
4545
4546 * hostio.c (handle_open): Process mode argument with
4547 fileio_to_host_mode.
4548
ca9b78ce
YQ
45492015-06-01 Yao Qi <yao.qi@linaro.org>
4550
4551 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4552 * linux-x86-low.c: Likewise.
4553
bfacd19d
DB
45542015-05-28 Don Breazeal <donb@codesourcery.com>
4555
4556 * linux-low.c (handle_extended_wait): Initialize
4557 thread_info.last_resume_kind for new fork children.
4558
452003ef
PA
45592015-05-15 Pedro Alves <palves@redhat.com>
4560
4561 * target.h (target_handle_new_gdb_connection): Rewrite using if
4562 wrapped in do/while.
4563
1041a03c
JB
45642015-05-14 Joel Brobecker <brobecker@adacore.com>
4565
4566 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4567 * configure, config.in: Regenerate.
4568 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4569 Declare typedef.
4570
c269dbdb
DB
45712015-05-12 Don Breazeal <donb@codesourcery.com>
4572
4573 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4574 PTRACE_EVENT_VFORK_DONE.
4575 (linux_low_ptrace_options, extended_event_reported): Add vfork
4576 events.
4577 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4578 and "vforkdone" for RSP 'T' Stop Reply Packet.
4579 * server.h (report_vfork_events): Declare
4580 global variable.
4581
3a8a0396
DB
45822015-05-12 Don Breazeal <donb@codesourcery.com>
4583
4584 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4585 (the_low_target) <new_fork>: Initialize new member.
4586 * linux-arm-low.c (arm_new_fork): New function.
4587 (the_low_target) <new_fork>: Initialize new member.
4588 * linux-low.c (handle_extended_wait): Call new target function
4589 new_fork.
4590 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4591 * linux-mips-low.c (mips_add_watchpoint): New function
4592 extracted from mips_insert_point.
4593 (the_low_target) <new_fork>: Initialize new member.
4594 (mips_linux_new_fork): New function.
4595 (mips_insert_point): Call mips_add_watchpoint.
4596 * linux-x86-low.c (x86_linux_new_fork): New function.
4597 (the_low_target) <new_fork>: Initialize new member.
4598
de0d863e
DB
45992015-05-12 Don Breazeal <donb@codesourcery.com>
4600
4601 * linux-low.c (handle_extended_wait): Implement return value,
4602 rename argument 'event_child' to 'event_lwp', handle
4603 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4604 (linux_low_ptrace_options): New function.
4605 (linux_low_filter_event): Call linux_low_ptrace_options,
4606 use different argument fo linux_enable_event_reporting,
4607 use return value from handle_extended_wait.
4608 (extended_event_reported): New function.
4609 (linux_wait_1): Call extended_event_reported and set
4610 status to report fork events.
4611 (linux_write_memory): Add pid to debug message.
4612 (reset_lwp_ptrace_options_callback): New function.
4613 (linux_handle_new_gdb_connection): New function.
4614 (linux_target_ops): Initialize new structure member.
4615 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4616 * lynx-low.c: Initialize new structure member.
4617 * remote-utils.c (prepare_resume_reply): Implement stop reason
4618 "fork" for "T" stop message.
4619 * server.c (handle_query): Call handle_new_gdb_connection.
4620 * server.h (report_fork_events): Declare global flag.
4621 * target.h (struct target_ops) <handle_new_gdb_connection>:
4622 New member.
4623 (target_handle_new_gdb_connection): New macro.
4624 * win32-low.c: Initialize new structure member.
4625
ddcbc397
DB
46262015-05-12 Don Breazeal <donb@codesourcery.com>
4627
4628 * mem-break.c (APPEND_TO_LIST): Define macro.
4629 (clone_agent_expr): New function.
4630 (clone_one_breakpoint): New function.
4631 (clone_all_breakpoints): New function.
4632 * mem-break.h: Declare new functions.
4633
89245bc0
DB
46342015-05-12 Don Breazeal <donb@codesourcery.com>
4635
4636 * linux-low.c (linux_supports_fork_events): New function.
4637 (linux_supports_vfork_events): New function.
4638 (linux_target_ops): Initialize new structure members.
4639 (initialize_low): Call linux_check_ptrace_features.
4640 * lynx-low.c (lynx_target_ops): Initialize new structure
4641 members.
4642 * server.c (report_fork_events, report_vfork_events):
4643 New global flags.
4644 (handle_query): Add new features to qSupported packet and
4645 response.
4646 (captured_main): Initialize new global variables.
4647 * target.h (struct target_ops) <supports_fork_events>:
4648 New member.
4649 <supports_vfork_events>: New member.
4650 (target_supports_fork_events): New macro.
4651 (target_supports_vfork_events): New macro.
4652 * win32-low.c (win32_target_ops): Initialize new structure
4653 members.
4654
835205d0
GB
46552015-05-12 Gary Benson <gbenson@redhat.com>
4656
4657 * server.c (handle_qxfer_exec_file): Use current process
4658 if annex is empty.
4659
21e94bd9
SL
46602015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4661
4662 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4663 Remove HAVE_PTRACE_GETREGS conditionals.
4664 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4665 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4666
45614f15
YQ
46672015-05-08 Yao Qi <yao.qi@linaro.org>
4668
4669 * linux-low.c (linux_supports_conditional_breakpoints): New
4670 function.
4671 (linux_target_ops): Install new target method.
4672 * lynx-low.c (lynx_target_ops): Install NULL hook for
4673 supports_conditional_breakpoints.
4674 * nto-low.c (nto_target_ops): Likewise.
4675 * spu-low.c (spu_target_ops): Likewise.
4676 * win32-low.c (win32_target_ops): Likewise.
4677 * server.c (handle_query): Check
4678 target_supports_conditional_breakpoints.
4679 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4680 New field.
4681 (target_supports_conditional_breakpoints): New macro.
4682
80ad801e
PA
46832015-05-06 Pedro Alves <palves@redhat.com>
4684
4685 PR server/18081
4686 * server.c (start_inferior): If the process exits, mourn it.
4687
819843c7
GB
46882015-04-21 Gary Benson <gbenson@redhat.com>
4689
4690 * hostio.c (fileio_open_flags_to_host): Factored out to
4691 fileio_to_host_openflags in common/fileio.c. Single use
4692 updated.
4693
a2d5a9d7
MF
46942015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4695
4696 * linux-xtensa-low.c (xtensa_fill_gregset)
4697 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4698 XCHAL_HAVE_LOOP.
4699
deb44829
MF
47002015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4701
4702 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4703 (regs_info): Replace usrregs pointer with NULL.
4704
e57f1de3
GB
47052015-04-17 Gary Benson <gbenson@redhat.com>
4706
4707 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4708 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4709 * server.c (handle_qxfer_exec_file): New function.
4710 (qxfer_packets): Add exec-file entry.
4711 (handle_query): Report qXfer:exec-file:read as supported packet.
4712
62828379
RN
47132015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4714
4715 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4716
b88bb450
GB
47172015-04-09 Gary Benson <gbenson@redhat.com>
4718
4719 * hostio-errno.c (errno_to_fileio_error): Remove function.
4720 Update caller to use remote_fileio_to_fio_error.
4721
c8f4bfdd
YQ
47222015-04-09 Yao Qi <yao.qi@linaro.org>
4723
4724 * linux-low.c (linux_insert_point): Call
4725 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4726 (linux_remove_point): Call remove_memory_breakpoint if type is
4727 raw_bkpt_type_sw.
4728 * linux-x86-low.c (x86_insert_point): Don't call
4729 insert_memory_breakpoint.
4730 (x86_remove_point): Don't call remove_memory_breakpoint.
4731
41f98f02
PA
47322015-04-01 Pedro Alves <palves@redhat.com>
4733 Cleber Rosa <crosa@redhat.com>
4734
4735 * server.c (gdbserver_usage): Reorganize and extend the usage
4736 message.
4737
2bf6fb9d
PA
47382015-03-24 Pedro Alves <palves@redhat.com>
4739
4740 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4741 output. Also dump TRAP_TRACE.
4742 (linux_low_filter_event): In debug output, distinguish a
4743 resume_stop SIGSTOP from a delayed SIGSTOP.
4744
369f6daa
GB
47452015-03-24 Gary Benson <gbenson@redhat.com>
4746
4747 * linux-x86-low.c (x86_linux_new_thread): Moved to
4748 nat/x86-linux.c.
4749 (x86_linux_prepare_to_resume): Likewise.
4750
8e5d4070
GB
47512015-03-24 Gary Benson <gbenson@redhat.com>
4752
4753 * Makefile.in (x86-linux-dregs.o): New rule.
4754 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4755 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4756 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4757 (x86_linux_dr_get): Likewise.
4758 (x86_linux_dr_set): Likewise.
4759 (update_debug_registers_callback): Likewise.
4760 (x86_linux_dr_set_addr): Likewise.
4761 (x86_linux_dr_get_addr): Likewise.
4762 (x86_linux_dr_set_control): Likewise.
4763 (x86_linux_dr_get_control): Likewise.
4764 (x86_linux_dr_get_status): Likewise.
4765 (x86_linux_update_debug_registers): Likewise.
4766
2b95d440
GB
47672015-03-24 Gary Benson <gbenson@redhat.com>
4768
4769 * linux-x86-low.c (x86_linux_update_debug_registers):
4770 New function, factored out from...
4771 (x86_linux_prepare_to_resume): ...this.
4772
14b0bc68
GB
47732015-03-24 Gary Benson <gbenson@redhat.com>
4774
4775 * linux-x86-low.c (x86_linux_dr_get): Update comments.
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_prepare_to_resume): Likewise.
4784
5dfe6ca8
GB
47852015-03-24 Gary Benson <gbenson@redhat.com>
4786
4787 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4788 Use perror_with_name. Pass string through gettext.
4789 (x86_linux_dr_set): Likewise.
4790
d33472ad
GB
47912015-03-24 Gary Benson <gbenson@redhat.com>
4792
4793 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4794 (x86_linux_dr_set_addr): ...this.
4795 (x86_dr_low_get_addr): Rename to...
4796 (x86_linux_dr_get_addr): ...this.
4797 (x86_dr_low_set_control): Rename to...
4798 (x86_linux_dr_set_control): ...this.
4799 (x86_dr_low_get_control): Rename to...
4800 (x86_linux_dr_get_control): ...this.
4801 (x86_dr_low_get_status): Rename to...
4802 (x86_linux_dr_get_status): ...this.
4803 (x86_dr_low): Update with new function names.
4804
4b134ca1
GB
48052015-03-24 Gary Benson <gbenson@redhat.com>
4806
4807 * Makefile.in (x86-linux.o): New rule.
4808 * configure.srv: Add x86-linux.o to relevant targets.
4809 * linux-low.c (lwp_set_arch_private_info): New function.
4810 (lwp_arch_private_info): Likewise.
4811 * linux-x86-low.c: Include nat/x86-linux.h.
4812 (arch_lwp_info): Removed structure.
4813 (update_debug_registers_callback):
4814 Use lwp_set_debug_registers_changed.
4815 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4816 and lwp_set_debug_registers_changed.
4817 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4818
34c703da
GB
48192015-03-24 Gary Benson <gbenson@redhat.com>
4820
4821 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4822 * linux-arm-low.c (arm_new_thread): Likewise.
4823 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4824 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4825 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4826 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4827
cff068da
GB
48282015-03-24 Gary Benson <gbenson@redhat.com>
4829
4830 * linux-low.c (ptid_of_lwp): New function.
4831 (lwp_is_stopped): Likewise.
4832 (lwp_stop_reason): Likewise.
4833 * linux-x86-low.c (update_debug_registers_callback):
4834 Use lwp_is_stopped.
4835 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4836 lwp_stop_reason.
4837
b2f7c7e8
GB
48382015-03-24 Gary Benson <gbenson@redhat.com>
4839
4840 * linux-low.h (linux_stop_lwp): Remove declaration.
4841
6d4ee8c6
GB
48422015-03-24 Gary Benson <gbenson@redhat.com>
4843
4844 * linux-low.h: Include nat/linux-nat.h.
4845 * linux-low.c (iterate_over_lwps_args): New structure.
4846 (iterate_over_lwps_filter): New function.
4847 (iterate_over_lwps): Likewise.
4848 * linux-x86-low.c (update_debug_registers_callback):
4849 Update signature to what iterate_over_lwps expects.
4850 Remove PID check that iterate_over_lwps now performs.
4851 (x86_dr_low_set_addr): Use iterate_over_lwps.
4852 (x86_dr_low_set_control): Likewise.
4853
70a0bb6b
GB
48542015-03-24 Gary Benson <gbenson@redhat.com>
4855
4856 * linux-x86-low.c (x86_debug_reg_state): New function.
4857 (x86_linux_prepare_to_resume): Use the above.
4858
7b669087
GB
48592015-03-24 Gary Benson <gbenson@redhat.com>
4860
4861 * linux-low.c (current_lwp_ptid): New function.
4862 * linux-x86-low.c: Include nat/linux-nat.h.
4863 (x86_dr_low_get_addr): Use current_lwp_ptid.
4864 (x86_dr_low_get_control): Likewise.
4865 (x86_dr_low_get_status): Likewise.
4866
eef49a3d
PA
48672015-03-20 Pedro Alves <palves@redhat.com>
4868
4869 * tracepoint.c (cmd_qtstatus): Make "str" const.
4870
b2333d22
PA
48712015-03-20 Pedro Alves <palves@redhat.com>
4872
4873 * server.c (handle_general_set): Make "req_str" const.
4874
23f238d3
PA
48752015-03-19 Pedro Alves <palves@redhat.com>
4876
4877 * linux-low.c (linux_resume_one_lwp): Rename to ...
4878 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4879 instead call perror_with_name.
4880 (check_ptrace_stopped_lwp_gone): New function.
4881 (linux_resume_one_lwp): Reimplement as wrapper around
4882 linux_resume_one_lwp_throw that swallows errors if the LWP is
4883 gone.
4884
91baf43f
PA
48852015-03-19 Pedro Alves <palves@redhat.com>
4886
4887 * linux-low.c (count_events_callback, select_event_lwp_callback):
4888 No longer check whether the thread has resume_stop as last resume
4889 kind.
4890
8bf3b159
PA
48912015-03-19 Pedro Alves <palves@redhat.com>
4892
4893 * linux-low.c (count_events_callback, select_event_lwp_callback):
4894 Use the lwp's status_pending_p field, not the thread's.
4895
b90fc188
PA
48962015-03-19 Pedro Alves <palves@redhat.com>
4897
4898 * linux-low.c (select_event_lwp_callback): Update comments to
4899 no longer mention SIGTRAP.
4900
464b0089
GB
49012015-03-18 Gary Benson <gbenson@redhat.com>
4902
4903 * server.c (handle_query): Do not report vFile:fstat as supported.
4904
aa9e327f
GB
49052015-03-11 Gary Benson <gbenson@redhat.com>
4906
4907 * hostio.c (sys/types.h): New include.
4908 (sys/stat.h): Likewise.
4909 (common-remote-fileio.h): Likewise.
4910 (handle_fstat): New function.
4911 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 4912
791c0056
GB
49132015-03-11 Gary Benson <gbenson@redhat.com>
4914
4915 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4916 struct stat.st_blocks and struct stat.st_blksize.
4917 * configure: Regenerate.
4918 * config.in: Likewise.
4919 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4920 (OBS): Add common-remote-fileio.o.
4921 (common-remote-fileio.o): New rule.
4922
9a9df970
PA
49232015-03-09 Pedro Alves <palves@redhat.com>
4924
4925 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4926 'struct sockaddr' pointer in 'accept' call.
4927
9eb1356e
PA
49282015-03-09 Pedro Alves <palves@redhat.com>
4929
4930 Revert:
4931 2015-03-07 Pedro Alves <palves@redhat.com>
4932 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4933 or <winsock2.h> here. Instead include "gdb_socket.h".
4934 (remote_open): Use union gdb_sockaddr_u.
4935 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4936 or <winsock2.h> here. Instead include "gdb_socket.h".
4937 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4938 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4939 or <sys/un.h>.
4940 (init_named_socket, gdb_agent_helper_thread): Use union
4941 gdb_sockaddr_u.
4942
aac331e4
PA
49432015-03-07 Pedro Alves <palves@redhat.com>
4944
4945 * configure.ac (build_warnings): Move
4946 -Wdeclaration-after-statement to the C-specific set.
4947 * configure: Regenerate.
4948
366c75fc
PA
49492015-03-07 Pedro Alves <palves@redhat.com>
4950
4951 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4952 or <winsock2.h> here. Instead include "gdb_socket.h".
4953 (remote_open): Use union gdb_sockaddr_u.
4954 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4955 or <winsock2.h> here. Instead include "gdb_socket.h".
4956 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4957 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4958 or <sys/un.h>.
4959 (init_named_socket, gdb_agent_helper_thread): Use union
4960 gdb_sockaddr_u.
4961
492d29ea
PA
49622015-03-07 Pedro Alves <palves@redhat.com>
4963
4964 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4965 instead.
4966
60a191ed
YQ
49672015-03-06 Yao Qi <yao.qi@linaro.org>
4968
4969 * linux-aarch64-low.c (aarch64_insert_point): Use
4970 show_debug_regs as a boolean.
4971 (aarch64_remove_point): Likewise.
4972
f5771b1d
PA
49732015-03-05 Pedro Alves <palves@redhat.com>
4974
4975 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4976 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4977 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4978 * nto-low.c (nto_target_ops): Likewise.
4979 * spu-low.c (spu_target_ops): Likewise.
4980 * win32-low.c (win32_target_ops): Likewise.
4981
3e572f71
PA
49822015-03-04 Pedro Alves <palves@redhat.com>
4983
72f4393d 4984 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
4985 Decide whether a breakpoint triggered based on the SIGTRAP's
4986 siginfo.si_code.
72f4393d
L
4987 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4988 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
4989 (linux_low_filter_event): Check for breakpoints before checking
4990 watchpoints.
4991 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4992 siginfo.si_code.
72f4393d
L
4993 (linux_stopped_by_sw_breakpoint)
4994 (linux_supports_stopped_by_sw_breakpoint)
4995 (linux_stopped_by_hw_breakpoint)
4996 (linux_supports_stopped_by_hw_breakpoint): New functions.
4997 (linux_target_ops): Install new target methods.
3e572f71 4998
1ec68e26
PA
49992015-03-04 Pedro Alves <palves@redhat.com>
5000
5001 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5002 * server.c (swbreak_feature, hwbreak_feature): New globals.
5003 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5004 (captured_main): Clear swbreak_feature and hwbreak_feature.
5005 * server.h (swbreak_feature, hwbreak_feature): Declare.
5006 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5007 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5008 supports_stopped_by_hw_breakpoint>: New fields.
5009 (target_supports_stopped_by_sw_breakpoint)
5010 (target_stopped_by_sw_breakpoint)
5011 (target_supports_stopped_by_hw_breakpoint)
5012 (target_stopped_by_hw_breakpoint): Declare.
5013
15c66dd6
PA
50142015-03-04 Pedro Alves <palves@redhat.com>
5015
5016 enum lwp_stop_reason -> enum target_stop_reason
5017 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5018 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5019 (linux_wait_1, stuck_in_jump_pad_callback)
5020 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5021 (linux_stopped_by_watchpoint):
5022 * linux-low.h (enum lwp_stop_reason): Delete.
5023 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5024 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5025
98fc70d6
YQ
50262015-03-04 Yao Qi <yao.qi@linaro.org>
5027
5028 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5029
dd2ac174
GB
50302015-03-03 Gary Benson <gbenson@redhat.com>
5031
5032 * hostio.c (handle_vFile): Fix prefix lengths.
5033
d68e53f4
MM
50342015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5035
5036 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5037 ptr_bits.
5038
bf2d68ab
AA
50392015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5040
5041 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5042 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5043 (clean): Add "rm -f" for above C files.
5044 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5045 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5046 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5047 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5048 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5049 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5050 (init_registers_s390x_vx_linux64)
5051 (init_registers_s390x_tevx_linux64)
5052 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5053 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5054 declarations.
5055 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5056 (s390_store_vxrs_high): New functions.
5057 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5058 NT_S390_VXRS_HIGH.
5059 (s390_arch_setup): Add logic for selecting one of the new target
5060 descriptions. Activate the new vector regsets if applicable.
5061 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5062 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5063 and init_registers_s390x_tevx_linux64.
5064
c966a859
PA
50652015-03-01 Pedro Alves <palves@redhat.com>
5066
5067 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5068 parameter.
5069
4180215b
PA
50702015-02-27 Pedro Alves <palves@redhat.com>
5071
5072 * linux-x86-low.c (u_debugreg_offset): New function.
5073 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5074
749bab01
PA
50752015-02-27 Pedro Alves <palves@redhat.com>
5076
5077 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5078 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5079 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5080 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5081 (ps_lsetfpregs, ps_getpid)
5082 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5083 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5084 (ps_lsetxregs, ps_plog): Declare.
5085
3c14e5a3
PA
50862015-02-27 Pedro Alves <palves@redhat.com>
5087
5088 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5089 IP_AGENT_EXPORT_FUNC.
5090 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5091 IP_AGENT_EXPORT_FUNC.
5092 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5093 (IP_AGENT_EXPORT): Delete.
5094 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5095 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5096 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5097 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5098 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5099 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5100 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5101 (traceframe_read_count, traceframe_write_count)
5102 (traceframes_created, trace_state_variables, get_raw_reg)
5103 (get_trace_state_variable_value, set_trace_state_variable_value)
5104 (ust_loaded, helper_thread_id, cmd_buf): Use
5105 IPA_SYM_EXPORTED_NAME.
5106 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5107 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5108 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5109 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5110 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5111 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5112 EXTERN_C_PUSH/EXTERN_C_POP.
5113 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5114 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5115 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5116 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5117 (traceframe_write_count, traceframe_read_count)
5118 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5119 (about_to_request_buffer_space, get_trace_state_variable_value)
5120 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5121 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5122 EXTERN_C_PUSH/EXTERN_C_POP.
5123 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5124 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5125 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5126 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5127 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5128 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5129 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5130 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5131 Define.
5132 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5133 (IP_AGENT_EXPORT_VAR_DECL): Define.
5134 (tracing): Declare.
5135 (gdb_agent_get_raw_reg): Declare.
5136
fe978cb0
PA
51372015-02-27 Tom Tromey <tromey@redhat.com>
5138 Pedro Alves <palves@redhat.com>
5139
5140 Rename symbols whose names are reserved C++ keywords throughout.
5141
3bc3d82a
PA
51422015-02-27 Pedro Alves <palves@redhat.com>
5143
5144 * Makefile.in (COMPILER): New, get it from autoconf.
5145 (CXX): Get from autoconf instead.
5146 (COMPILE.pre): Use COMPILER.
5147 (CC-LD): Rename to ...
5148 (CC_LD): ... this. Use COMPILER.
5149 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5150 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5151 * acinclude.m4: Include build-with-cxx.m4.
5152 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5153 Disable -Werror by default if building in C++ mode.
5154 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5155 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5156 the C++ compiler. Save/restore CXXFLAGS too.
5157 * configure: Regenerate.
5158
07697489
PA
51592015-02-27 Pedro Alves <palves@redhat.com>
5160
5161 * acinclude.m4: Include libiberty.m4.
5162 * configure.ac: Call libiberty_INIT.
5163 * config.in, configure: Regenerate.
5164
9beb7c4e
PA
51652015-02-26 Pedro Alves <palves@redhat.com>
5166
5167 * linux-low.c (linux_wait_1): When incrementing the PC past a
5168 program breakpoint always use the_low_target.breakpoint_len as
5169 increment, rather than the maximum between that and
5170 the_low_target.decr_pc_after_break.
5171
8090aef2
PA
51722015-02-23 Pedro Alves <palves@redhat.com>
5173
5174 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5175 thread was doing a step-over; always adjust the PC if
5176 we stepped over a permanent breakpoint.
5177 (linux_wait_1): If we stepped over breakpoint that was on top of a
5178 permanent breakpoint, manually advance the PC past it.
5179
bc9540e8
PA
51802015-02-23 Pedro Alves <palves@redhat.com>
5181
5182 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5183 modes.
5184 (x86_fill_gregset, x86_store_gregset): Use it when handling
5185 $orig_eax.
5186
2db9a427
PA
51872015-02-20 Pedro Alves <palves@redhat.com>
5188
5189 * thread-db.c: Include "nat/linux-procfs.h".
5190 (thread_db_init): Skip listing new threads if the kernel supports
5191 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5192
afa8d396
PA
51932015-02-20 Pedro Alves <palves@redhat.com>
5194
5195 * linux-low.c (status_pending_p_callback): Use ptid_match.
5196
c9587f88
AT
51972015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5198
5199 PR breakpoints/16812
5200 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5201 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5202 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5203
b05ec7a5
AT
52042015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5205
5206 PR breakpoints/15956
5207 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5208
d33501a5
MM
52092015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5210
5211 * linux-low.c (linux_low_btrace_conf): Print size.
5212 * server.c (handle_btrace_conf_general_set): New.
5213 (hanle_general_set): Call handle_btrace_conf_general_set.
5214 (handle_query): Report Qbtrace-conf:bts:size as supported.
5215
f4abbc16
MM
52162015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5217
5218 * linux-low.c (linux_low_enable_btrace): Update parameters.
5219 (linux_low_btrace_conf): New.
5220 (linux_target_ops)<to_btrace_conf>: Initialize.
5221 * server.c (current_btrace_conf): New.
5222 (handle_btrace_enable): Rename to ...
5223 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5224 to target_enable_btrace. Update comment. Update users.
5225 (handle_qxfer_btrace_conf): New.
5226 (qxfer_packets): Add btrace-conf entry.
5227 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5228 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5229 (target_ops)<read_btrace_conf>: New.
5230 (target_enable_btrace): Update parameters.
5231 (target_read_btrace_conf): New.
5232
043c3577
MM
52332015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5234
5235 * server.c (handle_btrace_general_set): Remove call to
5236 target_supports_btrace.
5237 (supported_btrace_packets): New.
5238 (handle_query): Call supported_btrace_packets.
5239 * target.h: include btrace-common.h.
5240 (btrace_target_info): Removed.
5241 (supports_btrace, target_supports_btrace): Update parameters.
5242
734b0e4b
MM
52432015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5244
5245 * Makefile.in (SFILES): Add common/btrace-common.c.
5246 (OBS): Add common/btrace-common.o.
5247 (btrace-common.o): Add build rules.
5248 * linux-low: Include btrace-common.h.
5249 (linux_low_read_btrace): Use struct btrace_data. Call
5250 btrace_data_init and btrace_data_fini.
5251
d6c146e9
PA
52522015-02-06 Pedro Alves <palves@redhat.com>
5253
5254 * thread-db.c (find_new_threads_callback): Add debug output.
5255
20ba1ce6
PA
52562015-02-04 Pedro Alves <palves@redhat.com>
5257
5258 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5259 (resume_stopped_resumed_lwps): New function.
5260 (linux_wait_for_event_filtered): Use it.
5261
8cc73a39
SDJ
52622015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5263
5264 * Makefile.in (SFILES): Add linux-personality.c.
5265 (linux-personality.o): New rule.
5266 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5267 list of objects to be built.
5268 * linux-low.c: Include nat/linux-personality.h.
5269 (linux_create_inferior): Remove code to disable address space
5270 randomization (moved to ../nat/linux-personality.c). Create
5271 cleanup to disable address space randomization.
5272
fb23d554
SDJ
52732015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5274
5275 * Makefile.in (posix-strerror.o): New rule.
5276 (mingw-strerror.o): Likewise.
5277 * configure: Regenerated.
5278 * configure.ac: Source file ../common/common.host. Initialize new
5279 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5280
cdf43629
YQ
52812015-01-14 Yao Qi <yao@codesourcery.com>
5282
5283 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5284 (ppc-linux.o): New rule.
5285 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5286 * configure.ac: AC_CHECK_FUNCS(getauxval).
5287 * config.in: Re-generated.
5288 * configure: Re-generated.
5289 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5290 ppc64_64bit_inferior_p
5291
514c5338
YQ
52922015-01-14 Yao Qi <yao@codesourcery.com>
5293
5294 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5295 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5296 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5297 (PT_ORIG_R3, PT_TRAP): Likewise.
5298 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5299 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5300 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5301
3368c1e5
JB
53022015-01-10 Joel Brobecker <brobecker@adacore.com>
5303
5304 * i387-fp.c (i387_cache_to_xsave): In look over
5305 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5306 zmmh_low_space field by use of zmmh_high_space.
5307
582511be
PA
53082015-01-09 Pedro Alves <palves@redhat.com>
5309
5310 * linux-low.c (step_over_bkpt): Move higher up in the file.
5311 (handle_extended_wait): Don't store the stop_pc here.
5312 (get_stop_pc): Adjust comments and rename to ...
5313 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5314 stopped for a software breakpoint or hardware breakpoint.
5315 (thread_still_has_status_pending_p): New function.
5316 (status_pending_p_callback): Use
5317 thread_still_has_status_pending_p. If the event is no longer
5318 interesting, resume the LWP.
5319 (handle_tracepoints): Add assert.
5320 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5321 (wstatus_maybe_breakpoint): New function.
5322 (cancel_breakpoint): Delete function.
5323 (check_stopped_by_watchpoint): New function, factored out from
5324 linux_low_filter_event.
5325 (lp_status_maybe_breakpoint): Delete function.
5326 (linux_low_filter_event): Remove filter_ptid argument.
5327 Leave thread group exits pending here. Store the LWP's stop PC.
5328 Always leave events pending.
5329 (linux_wait_for_event_filtered): Pull all events out of the
5330 kernel, and leave them all pending.
5331 (count_events_callback, select_event_lwp_callback): Consider all
5332 events.
5333 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5334 (select_event_lwp): Only give preference to the stepping LWP in
5335 all-stop mode. Adjust comments.
5336 (ignore_event): New function.
5337 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5338 references to cancel_breakpoints. Adjust to renames. Also give
5339 equal priority to all LWPs that have had events in non-stop mode.
5340 If reporting a software breakpoint event, unadjust the LWP's PC.
5341 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5342 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5343 Adjust.
5344 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5345 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5346 (linux_stopped_by_watchpoint): Adjust.
5347 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5348 * linux-low.h (enum lwp_stop_reason): New.
5349 (struct lwp_info) <stop_pc>: Adjust comment.
5350 <stopped_by_watchpoint>: Delete field.
5351 <stop_reason>: New field.
5352 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5353 * mem-break.c (software_breakpoint_inserted_here)
5354 (hardware_breakpoint_inserted_here): New function.
5355 * mem-break.h (software_breakpoint_inserted_here)
5356 (hardware_breakpoint_inserted_here): Declare.
5357 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5358 (cancel_breakpoints): Delete.
5359 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5360 (upload_fast_traceframes): Remove references to
5361 cancel_breakpoints.
5362
a33e3959
PA
53632015-01-09 Pedro Alves <palves@redhat.com>
5364
5365 * thread-db.c (find_new_threads_callback): Ignore thread if the
5366 kernel thread ID is -1.
5367
8784d563
PA
53682015-01-09 Pedro Alves <palves@redhat.com>
5369
5370 * linux-low.c (linux_attach_fail_reason_string): Move to
5371 nat/linux-ptrace.c, and rename.
5372 (linux_attach_lwp): Update comment.
5373 (attach_proc_task_lwp_callback): New function.
5374 (linux_attach): Adjust to rename and use
5375 linux_proc_attach_tgid_threads.
5376 (linux_attach_fail_reason_string): Delete declaration.
5377
76f2b779
JB
53782015-01-01 Joel Brobecker <brobecker@adacore.com>
5379
5380 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5381 * server.c (gdbserver_version): Likewise.
5382
fafcc06a
SDJ
53832014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5384
5385 * remote-utils.c: Include ctype.h.
5386 (input_interrupt): Explicitly handle the case when the char
5387 received is the NUL byte. Improve the printing of non-ASCII
5388 characters.
5389
beed38b8
JB
53902014-12-16 Joel Brobecker <brobecker@adacore.com>
5391
5392 * linux-low.c (linux_low_filter_event): Update call to
5393 linux_enable_event_reporting following the addition of
5394 a new parameter to that function.
5395
bf330350
CU
53962014-12-16 Catalin Udma <catalin.udma@freescale.com>
5397
5398 PR server/17457
5399 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5400 (AARCH64_FPCR_REGNO): Likewise.
5401 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5402 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5403 (aarch64_store_fpregset): Likewise.
5404
5227d625
JB
54052014-12-15 Joel Brobecker <brobecker@adacore.com>
5406
5407 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5408 Remove FIXME comment about assumption about N.
5409
f93b65a0
JB
54102014-12-13 Joel Brobecker <brobecker@adacore.com>
5411
5412 * configure.ac: If large-file support is disabled in GDBserver,
5413 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5414 * configure: Regenerate.
5415
e5a9158d
AA
54162014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5417
5418 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5419 warning upon ENODATA from ptrace.
5420 * linux-s390-low.c (s390_store_tdb): New.
5421 (s390_regsets): Add regset for NT_S390_TDB.
5422
feea5f36
AA
54232014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5424
5425 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5426 without a fill_function.
5427 * linux-s390-low.c (s390_fill_last_break): Remove.
5428 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5429 (s390_arch_setup): Use regset's size instead of fill_function for
5430 loop end condition.
5431
098dbe61
AA
54322014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5433
5434 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5435 the regset's store function when ptrace returned an error.
5436 * regcache.c (get_thread_regcache): Invalidate register cache
5437 before fetching inferior's registers.
5438
28eef672
AA
54392014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5440
5441 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5442 while-loop as for-loop.
5443 (regsets_store_inferior_registers): Likewise.
5444
bdca27a2
YQ
54452014-11-28 Yao Qi <yao@codesourcery.com>
5446
5447 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5448 * config.in, configure: Re-generate.
5449 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5450 is defined.
5451
9c232dda
YQ
54522014-11-21 Yao Qi <yao@codesourcery.com>
5453
5454 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5455 (AC_CHECK_HEADERS): Remove malloc.h.
5456 * configure: Re-generated.
5457 * config.in: Re-generated.
5458 * server.h: Don't include alloca.h and malloc.h.
5459 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5460 Don't include malloc.h.
5461
43968415
JB
54622014-11-17 Joel Brobecker <brobecker@adacore.com>
5463
5464 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5465 corresponding ERRNO check in same block.
5466
40e91bc7
PA
54672014-11-12 Pedro Alves <palves@redhat.com>
5468
5469 * server.c (cont_thread): Update comment.
5470 (start_inferior, attach_inferior): No longer clear cont_thread.
5471 (handle_v_cont): No longer set cont_thread.
5472 (captured_main): Clear cont_thread each time a GDB connects.
5473
c2c118cf
PA
54742014-11-12 Pedro Alves <palves@redhat.com>
5475
5476 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5477 thread, and don't resume all threads if the Hc thread has exited.
5478
78708b7c
PA
54792014-11-12 Pedro Alves <palves@redhat.com>
5480
5481 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5482 the process group instead of to a specific LWP.
5483
a2abc7de
PA
54842014-10-15 Pedro Alves <palves@redhat.com>
5485
5486 PR server/17487
5487 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5488 parameter.
5489 (arm_set_thread_context): Delete.
5490 (the_low_target): Adjust.
5491 * win32-i386-low.c (debug_registers_changed)
5492 (debug_registers_used): Delete.
5493 (update_debug_registers_callback): New function.
5494 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5495 needing to update their debug registers.
5496 (win32_get_current_dr): New function.
5497 (x86_dr_low_get_addr, x86_dr_low_get_control)
5498 (x86_dr_low_get_status): Fetch the debug register from the thread
5499 record's context.
5500 (i386_initial_stuff): Adjust.
5501 (i386_get_thread_context): Remove current_event parameter. Don't
5502 clear debug_registers_changed nor copy DR values to
5503 debug_reg_state.
5504 (i386_set_thread_context): Delete.
5505 (i386_prepare_to_resume): New function.
5506 (i386_thread_added): Mark the thread as needing to update irs
5507 debug registers.
5508 (the_low_target): Remove i386_set_thread_context and install
5509 i386_prepare_to_resume.
5510 * win32-low.c (win32_get_thread_context): Adjust.
5511 (win32_set_thread_context): Use SetThreadContext
5512 directly.
5513 (win32_prepare_to_resume): New function.
5514 (win32_require_context): New function, factored out from ...
5515 (thread_rec): ... this.
5516 (continue_one_thread): Call win32_prepare_to_resume on each thread
5517 we're about to continue.
5518 (win32_resume): Call win32_prepare_to_resume on the event thread.
5519 * win32-low.h (struct win32_thread_info)
5520 <debug_registers_changed>: New field.
5521 (struct win32_target_ops): Change prototype of set_thread_context,
5522 delete set_thread_context and add prepare_to_resume.
5523 (win32_require_context): New declaration.
5524
a442d071
GB
55252014-10-08 Gary Benson <gbenson@redhat.com>
5526
5527 * server.h: Do not include common-exceptions.h.
5528
6f1947e8
GB
55292014-10-08 Gary Benson <gbenson@redhat.com>
5530
5531 * server.h: Do not include cleanups.h.
5532
63b434a4
JH
55332014-09-30 James Hogan <james.hogan@imgtec.com>
5534
5535 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5536 mips64-dsp-linux.c.
5537
c4d9ceb6
YQ
55382014-09-23 Yao Qi <yao@codesourcery.com>
5539
5540 * linux-low.c (lp_status_maybe_breakpoint): New function.
5541 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5542 (count_events_callback): Likewise.
5543 (select_event_lwp_callback): Likewise.
5544 (cancel_breakpoints_callback): Likewise.
5545
89a5711c
DB
55462014-09-19 Don Breazeal <donb@codesourcery.com>
5547
5548 * linux-low.c (handle_extended_wait): Call
5549 linux_ptrace_get_extended_event.
5550 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5551 linux_is_extended_waitstatus.
5552
bffc0964
JB
55532014-09-16 Joel Brobecker <brobecker@adacore.com>
5554
5555 * Makefile.in (CPPFLAGS): Define.
5556 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5557 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5558
0bfdf32f
GB
55592014-09-16 Gary Benson <gbenson@redhat.com>
5560
5561 * inferiors.h (current_inferior): Renamed as...
5562 (current_thread): New variable. All uses updated.
5563 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5564 (maybe_move_out_of_jump_pad): Likewise.
5565 (cancel_breakpoint): Likewise.
5566 (linux_low_filter_event): Likewise.
5567 (wait_for_sigstop): Likewise.
5568 (linux_resume_one_lwp): Likewise.
5569 (need_step_over_p): Likewise.
5570 (start_step_over): Likewise.
5571 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5572 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5573 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5574 and save_inferior as saved_thread.
5575 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5576 saved_thread.
5577 (regcache_invalidate_thread): Likewise.
5578 * remote-utils.c (prepare_resume_reply): Likewise.
5579 * thread-db.c (thread_db_get_tls_address): Likewise.
5580 (disable_thread_event_reporting): Likewise.
5581 (remove_thread_event_breakpoints): Likewise.
5582 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5583 as saved_thread.
5584 * target.h (set_desired_inferior): Renamed as...
5585 (set_desired_thread): New declaration. All uses updated.
5586 * server.c (myresume): Updated comment to reference thread instead
5587 of inferior.
5588 (handle_serial_event): Likewise.
5589 (handle_target_event): Likewise.
5590
361c8ade
GB
55912014-09-12 Tom Tromey <tromey@redhat.com>
5592 Gary Benson <gbenson@redhat.com>
5593
5594 * regcache.h: Include common-regcache.h.
5595 (regcache_read_pc): Don't declare.
5596 * regcache.c (get_thread_regcache_for_ptid): New function.
5597
bd9269f7
GB
55982014-09-11 Tom Tromey <tromey@redhat.com>
5599 Gary Benson <gbenson@redhat.com>
5600
5601 * symbol.c: New file.
5602 * Makefile.in (SFILES): Add symbol.c.
5603 (OBS): Add symbol.o.
5604
f8c1d06b
GB
56052014-09-11 Gary Benson <gbenson@redhat.com>
5606
5607 * target.c (target_stop_ptid, target_continue_ptid): New
5608 functions.
5609
721ec300
GB
56102014-09-11 Tom Tromey <tromey@redhat.com>
5611 Gary Benson <gbenson@redhat.com>
5612
5613 * target.h: Include target/target.h.
5614 * target.c (target_read_memory, target_read_uint32)
5615 (target_write_memory): New functions.
5616
c5e92cca
GB
56172014-09-11 Gary Benson <gbenson@redhat.com>
5618
5619 * server.h (debug_hw_points): Don't declare.
5620 * server.c (debug_hw_points): Don't define. Replace all uses
5621 with show_debug_regs.
5622 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5623 all uses with show_debug_regs.
5624
2e4bb98a
EBM
56252014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5626
5627 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5628 endianness into account.
5629 (ppc_supply_ptrace_register): Likewise.
5630
ac740bc7
JH
56312014-09-03 James Hogan <james.hogan@imgtec.com>
5632
5633 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5634 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5635
97ea6506
GB
56362014-09-03 Gary Benson <gbenson@redhat.com>
5637
5638 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5639 ALL_DEBUG_ADDRESS_REGISTERS.
5640
df7e5265
GB
56412014-09-02 Gary Benson <gbenson@redhat.com>
5642
5643 * i386-low.h: Renamed as...
5644 * x86-low.h: New file. All type, function and variable name
5645 prefixes changed from "i386_" to "x86_". All references updated.
5646 * i386-low.c: Renamed as...
5647 * x86-low.c: New file. All type, function and variable name
5648 prefixes changed from "i386_" to "x86_". All references updated.
5649
ed859da7
GB
56502014-09-02 Gary Benson <gbenson@redhat.com>
5651
5652 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5653 (x86_linux_new_thread): Likewise.
5654
860789c7
GB
56552014-08-29 Gary Benson <gbenson@redhat.com>
5656
5657 * server.h (setjmp.h): Do not include.
5658 (toplevel): Do not declare.
5659 (common-exceptions.h): Include.
5660 (cleanups.h): Likewise.
5661 * server.c (toplevel): Do not define.
5662 (exit_code): New static global.
5663 (detach_or_kill_for_exit_cleanup): New function.
5664 (main): New function. Original main renamed to...
5665 (captured_main): New function.
5666 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5667
ff55e1b5
GB
56682014-08-29 Gary Benson <gbenson@redhat.com>
5669
5670 * Makefile.in (SFILES): Add common/common-exceptions.c.
5671 (OBS): Add common-exceptions.o.
5672 (common-exceptions.o): New rule.
5673 * utils.c (prepare_to_throw_exception): New function.
5674
e9bcb658
GB
56752014-08-29 Gary Benson <gbenson@redhat.com>
5676
5677 * config.in: Regenerate.
5678 * configure: Likewise.
5679
e3180625
GB
56802014-08-29 Gary Benson <gbenson@redhat.com>
5681
5682 * Makefile.in (SFILES): Add common/cleanups.c.
5683 (OBS): cleanups.o.
5684 (cleanups.o): New rule.
5685
e3d6ba5d
GB
56862014-08-29 Gary Benson <gbenson@redhat.com>
5687
5688 * utils.c (internal_vwarning): New function.
5689
7096e886
GB
56902014-08-28 Gary Benson <gbenson@redhat.com>
5691
5692 * utils.h (fatal): Remove declaration.
5693 * utils.c (fatal): Remove function.
5694
14ce3192
GB
56952014-08-28 Gary Benson <gbenson@redhat.com>
5696
5697 * tracepoint.c (gdb_agent_init): Replace fatal with
5698 perror_with_name.
5699 (initialize_tracepoint): Likewise.
5700
50278d59
GB
57012014-08-28 Gary Benson <gbenson@redhat.com>
5702
5703 * remote-utils.c (remote_prepare): Replace fatal with error.
5704
aa96c426
GB
57052014-08-28 Gary Benson <gbenson@redhat.com>
5706
5707 * linux-low.c (linux_async): Replace fatal with warning.
5708 Tidy up and return.
5709 (linux_start_non_stop): Return -1 if linux_async failed.
5710
f7160e97
GB
57112014-08-28 Gary Benson <gbenson@redhat.com>
5712
5713 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5714 gdb_assert.
5715 (i386_dr_low_get_addr): Remove vague comment.
5716 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5717 gdb_assert.
5718
38e08fca
GB
57192014-08-28 Gary Benson <gbenson@redhat.com>
5720
5721 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5722 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5723 internal_error.
5724 (linux_resume_one_lwp): Likewise.
5725 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5726 gdb_assert.
5727 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5728 with internal_error.
5729 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5730 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5731 (find_register_by_name): Replace fatal with internal_error.
5732 (find_regno): Likewise.
5733 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5734 * thread-db.c (thread_db_create_event): Likewise.
5735 (thread_db_load_search): Likewise.
5736 (try_thread_db_load_1): Likewise.
5737 * tracepoint.c (get_jump_space_head): Replace fatal with
5738 internal_error.
5739 (claim_trampoline_space): Likewise.
5740 (have_fast_tracepoint_trampoline_buffer): Likewise.
5741 (cmd_qtstart): Likewise.
5742 (stop_tracing): Likewise.
5743 (fast_tracepoint_collecting): Likewise.
5744 (target_malloc): Likewise.
5745 (download_tracepoint): Likewise.
5746 (download_trace_state_variables): Replace check with gdb_assert.
5747 (upload_fast_traceframes): Replace fatal with internal_error.
5748
34abf635
GB
57492014-08-19 Tom Tromey <tromey@redhat.com>
5750 Gary Benson <gbenson@redhat.com>
5751
5752 * Makefile.in (SFILES): Add common/common-debug.c.
5753 (OBS): Add common-debug.o.
5754 (common-debug.o): New rule.
5755 * debug.h (debug_printf): Don't declare.
5756 * debug.c (debug_printf): Renamed and rewritten as...
5757 (debug_vprintf): New function.
5758
f6e94d78
GB
57592014-08-19 Gary Benson <gbenson@redhat.com>
5760
5761 * utils.h: Do not include print-utils.h.
5762
9239eeab
GB
57632014-08-19 Tom Tromey <tromey@redhat.com>
5764 Gary Benson <gbenson@redhat.com>
5765
5766 * server.h: Add static assertion.
5767 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5768
ef87c8bb
GB
57692014-08-19 Tom Tromey <tromey@redhat.com>
5770 Gary Benson <gbenson@redhat.com>
5771
5772 * Makefile.in (SFILES): Add common/errors.c.
5773 (OBS): Add errors.o.
5774 (IPA_OBS): Add errors-ipa.o.
5775 (errors.o): New rule.
5776 (errors-ipa.o): Likewise.
5777 * utils.h (perror_with_name, error, warning): Don't declare.
5778 * utils.c (warning): Renamed and rewritten as...
5779 (vwarning): New function.
5780 (error): Renamed and rewritten as...
5781 (verror): New function.
5782 (internal_error): Renamed and rewritten as...
5783 (internal_verror): New function.
5784
bb974a24
GB
57852014-08-07 Gary Benson <gbenson@redhat.com>
5786
5787 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5788 * configure: Regenerate.
5789 * config.in: Likewise.
5790 * server.h: Do not include errno.h.
5791 * event-loop.c: Likewise.
5792 * hostio-errno.c: Likewise.
5793 * linux-low.c: Likewise.
5794 * remote-utils.c: Likewise.
5795 * spu-low.c: Likewise.
5796 * utils.c: Likewise.
5797 * gdbreplay.c: Unconditionally include errno.h.
5798
6d3d12eb
GB
57992014-08-07 Gary Benson <gbenson@redhat.com>
5800
5801 * server.h: Do not include string.h.
5802 * event-loop.c: Likewise.
5803 * linux-low.c: Likewise.
5804 * regcache.c: Likewise.
5805 * remote-utils.c: Likewise.
5806 * spu-low.c: Likewise.
5807 * utils.c: Likewise.
5808
dccbb609
GB
58092014-08-07 Gary Benson <gbenson@redhat.com>
5810
5811 * server.h: Do not include gdb_assert.h.
5812
e76df0d0
GB
58132014-08-07 Gary Benson <gbenson@redhat.com>
5814
5815 * server.h: Do not include common-utils.h.
5816
4cb9c816
GB
58172014-08-07 Gary Benson <gbenson@redhat.com>
5818
5819 * server.h: Do not include ptid.h.
5820 * notif.h: Likewise.
5821
3995eeee
GB
58222014-08-07 Gary Benson <gbenson@redhat.com>
5823
5824 * server.h: Do not include gdb_locale.h.
5825
cb9f1a9b
GB
58262014-08-07 Gary Benson <gbenson@redhat.com>
5827
5828 * server.h: Do not include gdb/signals.h.
5829 * win32-low.c: Likewise.
5830
a5fceff8
GB
58312014-08-07 Gary Benson <gbenson@redhat.com>
5832
5833 * server.h: Do not include pathmax.h.
5834
b9391142
GB
58352014-08-07 Gary Benson <gbenson@redhat.com>
5836
5837 * server.h: Do not include libiberty.h.
5838 * linux-bfin-low.c: Likewise.
5839
0e443c87
GB
58402014-08-07 Gary Benson <gbenson@redhat.com>
5841
5842 * server.h: Do not include ansidecl.h.
5843
8ebb3f56
GB
58442014-08-07 Gary Benson <gbenson@redhat.com>
5845
5846 * linux-x86-low.c: Do not include stddef.h.
5847 * lynx-ppc-low.c: Likewise.
5848 * tracepoint.c: Likewise.
5849
8980bdf6
GB
58502014-08-07 Gary Benson <gbenson@redhat.com>
5851
5852 * server.h: Do not include stdarg.h.
5853 * nto-low.c: Likewise.
5854
d7096f71
GB
58552014-08-07 Gary Benson <gbenson@redhat.com>
5856
5857 * server.h: Do not include stdlib.h.
5858 * inferiors.c: Likewise.
5859 * linux-low.c: Likewise.
5860 * regcache.c: Likewise.
5861 * spu-low.c: Likewise.
5862 * tracepoint.c: Likewise.
5863 * utils.c: Likewise.
5864
d02f550d
GB
58652014-08-07 Gary Benson <gbenson@redhat.com>
5866
5867 * server.h: Do not include stdio.h.
5868 * linux-low.c: Likewise.
5869 * remote-utils.c: Likewise.
5870 * spu-low.c: Likewise.
5871 * utils.c: Likewise.
5872 * wincecompat.c: Likewise.
5873
87f6c4e3
GB
58742014-08-06 Gary Benson <gbenson@redhat.com>
5875
5876 * regcache.c (init_register_cache): Move conditionals inside if.
5877
7089dca4
GB
58782014-08-06 Gary Benson <gbenson@redhat.com>
5879
5880 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5881
462f517e
GB
58822014-07-31 Gary Benson <gbenson@redhat.com>
5883
5884 * ax.h: Do not include server.h.
5885 * gdbthread.h: Likewise.
5886 * lynx-low.h: Likewise.
5887 * notif.h: Likewise.
5888
976411d6
GB
58892014-07-30 Gary Benson <gbenson@redhat.com>
5890
5891 * server.h: Include common-defs.h.
5892 Do not include config.h or build-gnulib-gdbserver/config.h.
5893
d41f6d8e
GB
58942014-07-30 Gary Benson <gbenson@redhat.com>
5895
5896 * hostio-errno.c: Move server.h to top of includes list.
5897 * inferiors.c: Likewise.
5898 * linux-x86-low.c: Likewise.
5899 * notif.c: Include server.h.
5900
314c6a35
TT
59012014-07-24 Tom Tromey <tromey@redhat.com>
5902 Gary Benson <gbenson@redhat.com>
5903
5904 * server.h (CORE_ADDR): Now unsigned.
5905
69ff6be5
PA
59062014-07-16 Pedro Alves <palves@redhat.com>
5907
5908 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5909
ce9e3fe7
PA
59102014-07-15 Pedro Alves <palves@redhat.com>
5911
5912 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5913 copy.
5914
e76126e8
PA
59152014-07-11 Pedro Alves <palves@redhat.com>
5916
5917 * linux-low.c (kill_wait_lwp): New function, based on
5918 kill_one_lwp_callback, but use my_waitpid directly.
5919 (kill_one_lwp_callback, linux_kill): Use it.
5920
8e9db26e
PA
59212014-06-23 Pedro Alves <palves@redhat.com>
5922
5923 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5924 before setting DR0..DR3.
5925
698b3e08
GB
59262014-06-20 Gary Benson <gbenson@redhat.com>
5927
5928 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5929 * configure: Regenerated.
5930 * config.in: Likewise.
5931
125f8a3d
GB
59322014-06-20 Gary Benson <gbenson@redhat.com>
5933
5934 * Makefile.in (SFILES): Update locations for files moved
5935 from common to nat.
5936 (object file files): Reordered.
5937
42995dbd
GB
59382014-06-20 Gary Benson <gbenson@redhat.com>
5939
5940 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5941 (i386_dr_low_set_addr): Likewise.
5942 (i386_dr_low_get_addr): Likewise.
5943 (i386_dr_low_can_set_control): Likewise.
5944 (i386_dr_low_set_control): Likewise.
5945 (i386_dr_low_get_control): Likewise.
5946 (i386_dr_low_get_status): Likewise.
5947 (i386_get_debug_register_length): Likewise.
5948 * linux-x86-low.c (i386_dr_low_set_addr):
5949 Changed signature. Made static.
5950 (i386_dr_low_get_addr): Likewise.
5951 (i386_dr_low_set_control): Likewise.
5952 (i386_dr_low_get_control): Likewise.
5953 (i386_dr_low_get_status): Likewise.
5954 (i386_dr_low): New global variable.
5955 * win32-i386-low.c (i386_dr_low_set_addr):
5956 Changed signature. Made static.
5957 (i386_dr_low_get_addr): Likewise.
5958 (i386_dr_low_set_control): Likewise.
5959 (i386_dr_low_get_control): Likewise.
5960 (i386_dr_low_get_status): Likewise.
5961 (i386_dr_low): New global variable.
5962
e1d2394b
MS
59632014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5964
5965 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5966 * Makefile.in (AR, AR_FLAGS): Define.
5967 * configure: Regenerate.
5968
3a8ee006
GB
59692014-06-19 Gary Benson <gbenson@redhat.com>
5970
5971 * Makefile.in (i386-dregs.o): New rule.
5972 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5973 * i386-low.c (target.h): Remove include.
5974 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5975 (DR_CONTROL_SHIFT): Likewise.
5976 (DR_CONTROL_SIZE): Likewise.
5977 (DR_RW_EXECUTE): Likewise.
5978 (DR_RW_WRITE): Likewise.
5979 (DR_RW_READ): Likewise.
5980 (DR_RW_IORW): Likewise.
5981 (DR_LEN_1): Likewise.
5982 (DR_LEN_2): Likewise.
5983 (DR_LEN_4): Likewise.
5984 (DR_LEN_8): Likewise.
5985 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5986 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5987 (DR_ENABLE_SIZE): Likewise.
5988 (DR_LOCAL_SLOWDOWN): Likewise.
5989 (DR_GLOBAL_SLOWDOWN): Likewise.
5990 (DR_CONTROL_RESERVED): Likewise.
5991 (I386_DR_CONTROL_MASK): Likewise.
5992 (I386_DR_VACANT): Likewise.
5993 (I386_DR_LOCAL_ENABLE): Likewise.
5994 (I386_DR_GLOBAL_ENABLE): Likewise.
5995 (I386_DR_DISABLE): Likewise.
5996 (I386_DR_SET_RW_LEN): Likewise.
5997 (I386_DR_GET_RW_LEN): Likewise.
5998 (I386_DR_WATCH_HIT): Likewise.
5999 (i386_wp_op_t): Likewise.
6000 (i386_show_dr): Likewise.
6001 (i386_length_and_rw_bits): Likewise.
6002 (i386_insert_aligned_watchpoint): Likewise.
6003 (i386_remove_aligned_watchpoint): Likewise.
6004 (i386_handle_nonaligned_watchpoint): Likewise.
6005 i386_update_inferior_debug_regs(): Likewise.
6006 (i386_dr_insert_watchpoint): Likewise.
6007 (i386_dr_remove_watchpoint): Likewise.
6008 (i386_dr_region_ok_for_watchpoint): Likewise.
6009 (i386_dr_stopped_data_address): Likewise.
6010 (i386_dr_stopped_by_watchpoint): Likewise.
6011
8f26655c
GB
60122014-06-19 Gary Benson <gbenson@redhat.com>
6013
6014 * i386-low.c (i386_dr_show): Renamed to
6015 i386_show_dr and made static. All uses updated.
6016 (i386_dr_length_and_rw_bits): Renamed to
6017 i386_length_and_rw_bits and made static.
6018 All uses updated.
6019 (i386_dr_insert_aligned_watchpoint): Renamed to
6020 i386_insert_aligned_watchpoint and made static.
6021 All uses updated.
6022 (i386_dr_remove_aligned_watchpoint): Renamed to
6023 i386_remove_aligned_watchpoint and made static.
6024 All uses updated.
6025 (i386_dr_update_inferior_debug_regs): Renamed to
6026 i386_update_inferior_debug_regs and made static.
6027 All uses updated.
6028
b9228891
GB
60292014-06-18 Gary Benson <gbenson@redhat.com>
6030
5171def3
GB
6031 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6032 (i386_dr_low_can_set_control): Likewise.
6033 (i386_get_debug_register_length): Likewise.
6034 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6035 (i386_dr_low_can_set_control): Likewise.
6036 (i386_get_debug_register_length): Likewise.
6037
60382014-06-17 Gary Benson <gbenson@redhat.com>
6039
b9228891
GB
6040 * i386-low.h (i386-dregs.h): New include.
6041 (DR_FIRSTADDR): Now in i386-dregs.h.
6042 (DR_LASTADDR): Likewise.
6043 (DR_NADDR): Likewise.
6044 (DR_STATUS): Likewise.
6045 (DR_CONTROL): Likewise.
6046 (i386_debug_reg_state): Likewise.
6047 (i386_dr_insert_watchpoint): Likewise.
6048 (i386_dr_remove_watchpoint): Likewise.
6049 (i386_dr_region_ok_for_watchpoint): Likewise.
6050 (i386_dr_stopped_data_address): Likewise.
6051 (i386_dr_stopped_by_watchpoint): Likewise.
6052 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6053
4be83cc2
GB
60542014-06-18 Gary Benson <gbenson@redhat.com>
6055
6056 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6057 i386_dr_insert_watchpoint.
6058 (i386_low_remove_watchpoint): Renamed to
6059 i386_dr_remove_watchpoint.
6060 (i386_low_region_ok_for_watchpoint): Renamed to
6061 i386_dr_region_ok_for_watchpoint.
6062 (i386_low_stopped_data_address): Renamed to
6063 i386_dr_stopped_data_address.
6064 (i386_low_stopped_by_watchpoint): Renamed to
6065 i386_dr_stopped_by_watchpoint.
6066 * i386-low.c (i386_show_dr): Renamed to
6067 i386_dr_show and made nonstatic. All uses updated.
6068 (i386_length_and_rw_bits): Renamed to
6069 i386_dr_length_and_rw_bits and made nonstatic.
6070 All uses updated.
6071 (i386_insert_aligned_watchpoint): Renamed to
6072 i386_dr_insert_aligned_watchpoint and made nonstatic.
6073 All uses updated.
6074 (i386_remove_aligned_watchpoint): Renamed to
6075 i386_dr_remove_aligned_watchpoint and made nonstatic.
6076 All uses updated.
6077 (i386_update_inferior_debug_regs): Renamed to
6078 i386_dr_update_inferior_debug_regs and made nonstatic.
6079 All uses updated.
6080 (i386_low_insert_watchpoint): Renamed to
6081 i386_dr_insert_watchpoint. All uses updated.
6082 (i386_low_remove_watchpoint): Renamed to
6083 i386_dr_remove_watchpoint. All uses updated.
6084 (i386_low_region_ok_for_watchpoint): Renamed to
6085 i386_dr_region_ok_for_watchpoint. All uses updated.
6086 (i386_low_stopped_data_address): Renamed to
6087 i386_dr_stopped_data_address. All uses updated.
6088 (i386_low_stopped_by_watchpoint): Renamed to
6089 i386_dr_stopped_by_watchpoint. All uses updated.
6090
131aa0d4
GB
60912014-06-18 Gary Benson <gbenson@redhat.com>
6092
6093 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6094 (i386_dr_low_can_set_control): Likewise.
6095 (i386_insert_aligned_watchpoint): New check.
6096
d9305f7f
GB
60972014-06-18 Gary Benson <gbenson@redhat.com>
6098
6099 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6100 Renamed to state.
6101
e927c9fc
GB
61022014-06-18 Gary Benson <gbenson@redhat.com>
6103
6104 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6105 instead of fatal and error.
6106 (i386_handle_nonaligned_watchpoint): Likewise.
6107
1b6d4134
GB
61082014-06-18 Gary Benson <gbenson@redhat.com>
6109
6110 * i386-low.c (i386_get_debug_register_length): New macro.
6111 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6112 (i386_show_dr): Use debug_printf instead of fprintf. Use
6113 phex to format values.
6114
6e62758f
GB
61152014-06-18 Gary Benson <gbenson@redhat.com>
6116
6117 * i386-low.h: Comment changes.
6118 * i386-low.c: Likewise.
6119
fc6e2f03
GB
61202014-06-18 Gary Benson <gbenson@redhat.com>
6121
6122 * i386-low.c: Whitespace changes.
6123
f9d1eeed
TT
61242014-06-12 Tom Tromey <tromey@redhat.com>
6125
6126 * utils.c (freeargv): Remove.
6127
0b04e523
TT
61282014-06-12 Tom Tromey <tromey@redhat.com>
6129
6130 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6131 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6132 (parse_debug_format_options): Likewise.
6133 (gdbserver_usage): Likewise.
6134 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6135 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6136 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6137 against libiberty.
6138 ($(LIBGNU)): Depend on libiberty.
6139 (all-lib): Recurse into all subdirs.
6140 (install-only): Invoke "install" target in subdirs.
6141 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6142 targets.
6143 * configure: Rebuild.
6144 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6145 for vasprintf, vsnprintf, or gettimeofday.
6146 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6147 srv_tgtobj.
6148
270c9937
JB
61492014-06-05 Joel Brobecker <brobecker@adacore.com>
6150
6151 * development.sh: Delete.
6152 * Makefile.in (config.status): Adjust dependency on development.sh.
6153 * configure.ac: Adjust development.sh source call.
6154 * configure: Regenerate.
6155
0a261ed8
PA
61562014-06-02 Pedro Alves <palves@redhat.com>
6157
6158 * ax.c (gdb_free_agent_expr): New function.
6159 * ax.h (gdb_free_agent_expr): New declaration.
6160 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6161 list.
6162 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6163 static.
6164 (clear_breakpoint_conditions_and_commands): New function.
6165 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6166 (clear_breakpoint_conditions_and_commands): New declaration.
6167
e9dae05e
RR
61682014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6169
6170 * linux-aarch64-low.c (asm/ptrace.h): Include.
6171
5876f503
JK
61722014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6173
6174 Fix TLS access for -static -pthread.
6175 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6176 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6177 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6178
802e8e6d
PA
61792014-05-20 Pedro Alves <palves@redhat.com>
6180
6181 * linux-aarch64-low.c (aarch64_insert_point)
6182 (aarch64_remove_point): No longer check whether the type is
6183 supported here. Adjust to new interface.
6184 (the_low_target): Install aarch64_supports_z_point_type as
6185 supports_z_point_type method.
6186 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6187 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6188 instead of a Z packet char. Adjust.
6189 (arm_supports_z_point_type): New function.
6190 (arm_insert_point, arm_remove_point): Adjust to new interface.
6191 (the_low_target): Install arm_supports_z_point_type.
6192 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6193 (cris_insert_point, cris_remove_point): Adjust to new interface.
6194 Don't check whether the type is supported here.
6195 (the_low_target): Install cris_supports_z_point_type.
6196 * linux-low.c (linux_supports_z_point_type): New function.
6197 (linux_insert_point, linux_remove_point): Adjust to new interface.
6198 * linux-low.h (struct linux_target_ops) <insert_point,
6199 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6200 raw_breakpoint pointer parameter.
6201 <supports_z_point_type>: New method.
6202 * linux-mips-low.c (mips_supports_z_point_type): New function.
6203 (mips_insert_point, mips_remove_point): Adjust to new interface.
6204 Use mips_supports_z_point_type.
6205 (the_low_target): Install mips_supports_z_point_type.
6206 * linux-ppc-low.c (the_low_target): Install NULL as
6207 supports_z_point_type method.
6208 * linux-s390-low.c (the_low_target): Install NULL as
6209 supports_z_point_type method.
6210 * linux-sparc-low.c (the_low_target): Install NULL as
6211 supports_z_point_type method.
6212 * linux-x86-low.c (x86_supports_z_point_type): New function.
6213 (x86_insert_point): Adjust to new insert_point interface. Use
6214 insert_memory_breakpoint. Adjust to new
6215 i386_low_insert_watchpoint interface.
6216 (x86_remove_point): Adjust to remove_point interface. Use
6217 remove_memory_breakpoint. Adjust to new
6218 i386_low_remove_watchpoint interface.
6219 (the_low_target): Install x86_supports_z_point_type.
6220 * lynx-low.c (lynx_target_ops): Install NULL as
6221 supports_z_point_type callback.
6222 * nto-low.c (nto_supports_z_point_type): New.
6223 (nto_insert_point, nto_remove_point): Adjust to new interface.
6224 (nto_target_ops): Install nto_supports_z_point_type.
6225 * mem-break.c: Adjust intro comment.
6226 (struct raw_breakpoint) <raw_type, size>: New fields.
6227 <inserted>: Update comment.
6228 <shlib_disabled>: Delete field.
6229 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6230 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6231 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6232 (raw_bkpt_type_to_target_hw_bp_type): New function.
6233 (find_enabled_raw_code_breakpoint_at): New function.
6234 (find_raw_breakpoint_at): New type and size parameters. Use them.
6235 (insert_memory_breakpoint): New function, based off
6236 set_raw_breakpoint_at.
6237 (remove_memory_breakpoint): New function.
6238 (set_raw_breakpoint_at): Reimplement.
6239 (set_breakpoint): New, based on set_breakpoint_at.
6240 (set_breakpoint_at): Reimplement.
6241 (delete_raw_breakpoint): Go through the_target->remove_point
6242 instead of assuming memory breakpoints.
6243 (find_gdb_breakpoint_at): Delete.
6244 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6245 (find_gdb_breakpoint): New function.
6246 (set_gdb_breakpoint_at): Delete.
6247 (z_type_supported): New function.
6248 (set_gdb_breakpoint_1): New function, loosely based off
6249 set_gdb_breakpoint_at.
6250 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6251 (delete_gdb_breakpoint_at): Delete.
6252 (delete_gdb_breakpoint_1): New function, loosely based off
6253 delete_gdb_breakpoint_at.
6254 (delete_gdb_breakpoint): New function.
6255 (clear_gdb_breakpoint_conditions): Rename to ...
6256 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6257 breakpoint.
6258 (add_condition_to_breakpoint): Make static.
6259 (add_breakpoint_condition): Take a struct breakpoint pointer
6260 instead of an address. Adjust.
6261 (gdb_condition_true_at_breakpoint): Rename to ...
6262 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6263 z_type parameter.
6264 (gdb_condition_true_at_breakpoint): Reimplement.
6265 (add_breakpoint_commands): Take a struct breakpoint pointer
6266 instead of an address. Adjust.
6267 (gdb_no_commands_at_breakpoint): Rename to ...
6268 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6269 parameter. Return true if no breakpoint was found. Change debug
6270 output.
6271 (gdb_no_commands_at_breakpoint): Reimplement.
6272 (run_breakpoint_commands): Rename to ...
6273 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6274 and change return type to boolean.
6275 (run_breakpoint_commands): New function.
6276 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6277 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6278 breakpoint. Go through the_target->remove_point instead of
6279 assuming memory breakpoint.
6280 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6281 software and hardware breakpoints.
6282 (reinsert_raw_breakpoint): Go through the_target->insert_point
6283 instead of assuming memory breakpoint.
6284 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6285 software and hardware breakpoints.
6286 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6287 Check both software and hardware breakpoints.
6288 (validate_inserted_breakpoint): Assert the breakpoint is a
6289 software breakpoint. Set the inserted flag to -1 instead of
6290 setting shlib_disabled.
6291 (delete_disabled_breakpoints): Adjust.
6292 (validate_breakpoints): Only validate software breakpoints.
6293 Adjust to inserted flag change.
6294 (check_mem_read, check_mem_write): Skip breakpoint types other
6295 than software breakpoints. Adjust to inserted flag change.
6296 * mem-break.h (enum raw_bkpt_type): New enum.
6297 (raw_breakpoint, struct process_info): Forward declare.
6298 (Z_packet_to_target_hw_bp_type): Delete declaration.
6299 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6300 (set_gdb_breakpoint, delete_gdb_breakpoint)
6301 (clear_breakpoint_conditions): New declarations.
6302 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6303 (breakpoint_inserted_here): Update comment.
6304 (add_breakpoint_condition, add_breakpoint_commands): Replace
6305 address parameter with a breakpoint pointer parameter.
6306 (gdb_breakpoint_here): Update comment.
6307 (delete_gdb_breakpoint_at): Delete.
6308 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6309 * server.c (process_point_options): Take a struct breakpoint
6310 pointer instead of an address. Adjust.
6311 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6312 delete_gdb_breakpoint.
6313 * spu-low.c (spu_target_ops): Install NULL as
6314 supports_z_point_type method.
6315 * target.h: Include mem-break.h.
6316 (struct target_ops) <prepare_to_access_memory>: Update comment.
6317 <supports_z_point_type>: New field.
6318 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6319 instead of a char. Also take a raw breakpoint pointer.
6320 * win32-arm-low.c (the_low_target): Install NULL as
6321 supports_z_point_type.
6322 * win32-i386-low.c (i386_supports_z_point_type): New function.
6323 (i386_insert_point, i386_remove_point): Adjust to new interface.
6324 (the_low_target): Install i386_supports_z_point_type.
6325 * win32-low.c (win32_supports_z_point_type): New function.
6326 (win32_insert_point, win32_remove_point): Adjust to new interface.
6327 (win32_target_ops): Install win32_supports_z_point_type.
6328 * win32-low.h (struct win32_target_ops):
6329 <supports_z_point_type>: New method.
6330 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6331 instead of a char. Also take a raw breakpoint pointer.
6332
932539e3
PA
63332014-05-20 Pedro Alves <palves@redhat.com>
6334
6335 * mem-break.h: Include break-common.h.
6336 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6337 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6338 (Z_packet_to_target_hw_bp_type): New declaration.
6339 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6340 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6341 (Z_PACKET_ACCESS_WP): Delete macros.
6342 (Z_packet_to_hw_type): Delete function.
6343 * i386-low.h: Don't include break-common.h here.
6344 (Z_packet_to_hw_type): Delete declaration.
6345 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6346 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6347 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6348 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6349 * linux-aarch64-low.c: Don't include break-common.h here.
6350 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6351 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6352 (Z_packet_to_target_hw_bp_type): Delete function.
6353 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6354 function.
6355 (mips_insert_point, mips_remove_point): Use
6356 Z_packet_to_target_hw_bp_type.
6357
4ff0d3d8
PA
63582014-05-20 Pedro Alves <palves@redhat.com>
6359
6360 * linux-aarch64-low.c: Include break-common.h.
6361 (enum target_point_type): Delete.
6362 (Z_packet_to_point_type): Rename to ...
6363 (Z_packet_to_target_hw_bp_type): ... this, and return a
6364 target_hw_bp_type instead.
6365 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6366 instead of an enum target_point_type.
6367 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6368 breakpoint type.
6369 (aarch64_dr_state_insert_one_point)
6370 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6371 (aarch64_handle_aligned_watchpoint)
6372 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6373 Take an enum target_hw_bp_type instead of an enum
6374 target_point_type.
6375 (aarch64_supports_z_point_type): New function.
6376 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6377 use Z_packet_to_target_hw_bp_type.
6378
786dc519
JB
63792014-05-20 Joel Brobecker <brobecker@adacore.com>
6380
6381 * configure.ac: Only use -Werror by default when DEVELOPMENT
6382 is true.
6383 * configure: Regenerate.
6384
9e0aa64f
JK
63852014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6386
6387 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6388 * linux-x86-low.c (X86_64_USER_REGS): New.
6389 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6390
2b577b92
YQ
63912014-04-28 Yao Qi <yao@codesourcery.com>
6392
6393 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6394 name.
6395
94611da2
PA
63962014-04-25 Pedro Alves <palves@redhat.com>
6397
6398 PR server/16255
6399 * linux-low.c (linux_attach_fail_reason_string): New function.
6400 (linux_attach_lwp): Delete.
6401 (linux_attach_lwp_1): Rename to ...
6402 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6403 argument. Remove "initial" parameter. Return int instead of
6404 void. Don't error or warn here.
6405 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6406 failure to attach to the tgid. Call warning when failing to
6407 attach to an lwp.
6408 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6409 argument. Remove "initial" parameter. Return int instead of
6410 void. Don't error or warn here.
6411 (linux_attach_fail_reason_string): New declaration.
6412 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6413 interface change. Use linux_attach_fail_reason_string.
6414
01f9f808
MS
64152014-04-24 Michael Sturm <michael.sturm@mintel.com>
6416 Walfred Tedeschi <walfred.tedeschi@intel.com>
6417
6418 * Makefile.in: Added rules to handle new files
6419 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6420 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6421 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6422 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6423 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6424 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6425 x32-avx512-linux.o.
6426 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6427 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6428 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6429 i386/x32-avx512.xml.
6430 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6431 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6432 i386/x32-avx512-linux.xml.
6433 * i387-fp.c (num_avx512_k_registers): New constant for number
6434 of K registers.
6435 (num_avx512_zmmh_low_registers): New constant for number of
6436 lower ZMM registers (0-15).
6437 (num_avx512_zmmh_high_registers): New constant for number of
6438 higher ZMM registers (16-31).
6439 (num_avx512_ymmh_registers): New contant for number of higher
6440 YMM registers (ymm16-31 added by avx521 on x86_64).
6441 (num_avx512_xmm_registers): New constant for number of higher
6442 XMM registers (xmm16-31 added by AVX512 on x86_64).
6443 (struct i387_xsave): Add space for AVX512 registers.
6444 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6445 Add code to handle AVX512 registers.
6446 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6447 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6448 prototypei from generated file.
6449 (tdesc_amd64_avx512_linux): Likewise.
6450 (init_registers_x32_avx512_linux): Likewise.
6451 (tdesc_x32_avx512_linux): Likewise.
6452 (init_registers_i386_avx512_linux): Likewise.
6453 (tdesc_i386_avx512_linux): Likewise.
6454 (x86_64_regmap): Add AVX512 registers.
6455 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6456 mask.
6457 (initialize_low_arch): Add code to initialize AVX512 registers.
6458
51aa91f9
PA
64592014-04-23 Pedro Alves <palves@redhat.com>
6460
6461 * mem-break.c (find_gdb_breakpoint_at): Make static.
6462 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6463
a4165e94
PA
64642014-04-23 Pedro Alves <palves@redhat.com>
6465
6466 * i386-low.c: Don't include break-common.h here.
6467 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6468 prototype to take target_hw_bp_type as argument instead of a Z
6469 packet char.
6470 * i386-low.h: Include break-common.h here.
6471 (Z_packet_to_hw_type): Declare.
6472 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6473 prototypes.
6474 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6475 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6476 (x86_remove_point): Convert the packet number to a
6477 target_hw_bp_type before calling i386_low_remove_watchpoint.
6478 * win32-i386-low.c (i386_insert_point): Convert the packet number
6479 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6480 (i386_remove_point): Convert the packet number to a
6481 target_hw_bp_type before calling i386_low_remove_watchpoint.
6482
b8acf843
PA
64832014-04-23 Pedro Alves <palves@redhat.com>
6484
6485 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6486
d708bcd1
PA
64872014-04-10 Pedro Alves <palves@redhat.com>
6488
6489 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6490 Check if the condition or command is NULL before checking if the
6491 breakpoint is known. On success, return true.
6492 * mem-break.h (add_breakpoint_condition): Document return.
6493 (add_breakpoint_commands): Add describing comment.
6494 * server.c (skip_to_semicolon): New function.
6495 (process_point_options): Use it.
6496
2eec7d5b
PA
64972014-04-09 Pedro Alves <palves@redhat.com>
6498
6499 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6500 to lwpid_of.
6501
fa96cb38
PA
65022014-02-27 Pedro Alves <palves@redhat.com>
6503
6504 PR 12702
6505 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6506 macros.
6507 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6508 output.
6509 (last_thread_of_process_p): Take a PID argument instead of a
6510 thread pointer.
6511 (linux_wait_for_lwp): Delete.
6512 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6513 functions.
6514 (linux_low_filter_event): New function, party factored out from
6515 linux_wait_for_event.
6516 (linux_wait_for_event): Rename to ...
6517 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6518 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6519 sigsuspend. Check for zombie leaders.
6520 (linux_wait_for_event): Reimplement as wrapper around
6521 linux_wait_for_event_filtered.
6522 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6523 a normal or signal exit is seen, it's the whole process exiting.
6524 (wait_for_sigstop): No longer a for_each_inferior callback.
6525 Rewrite on top of linux_wait_for_event_filtered.
6526 (stop_all_lwps): Call wait_for_sigstop directly.
6527 * server.c (resume, handle_target_event): Handle
6528 TARGET_WAITKIND_NO_RESUMED.
6529
d763de10
JB
65302014-02-26 Joel Brobecker <brobecker@adacore.com>
6531
6532 * win32-low.c (psapi_get_dll_name,
6533 * win32_CreateToolhelp32Snapshot): Delete.
6534 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6535 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6536 Delete.
6537 (handle_load_dll): Add function description.
6538 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6539
850a0f76
JB
65402014-02-26 Joel Brobecker <brobecker@adacore.com>
6541
6542 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6543 Add comment.
6544 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6545 base address when calling win32_add_one_solib.
6546 (handle_load_dll): Delete local variable load_addr.
6547 Remove 0x1000 offset applied to DLL base address when calling
6548 win32_add_one_solib.
6549 (handle_unload_dll): Add comment.
6550
f25b3fc3
JB
65512014-02-26 Joel Brobecker <brobecker@adacore.com>
6552
6553 * win32-low.c (win32_add_all_dlls): Renames
6554 win32_ensure_ntdll_loaded. Rewrite function documentation.
6555 Adjust implementation to always load all DLLs.
6556 Add 0x1000 offset to DLL base address when calling
6557 win32_add_one_solib.
6558 (child_initialization_done): New static global.
6559 (do_initial_child_stuff): Set child_initialization_done to
6560 zero during child initialization, and 1 after. Replace call
6561 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6562 Add comment.
6563 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6564 (handle_unload_dll): Add function documentation.
6565 (get_child_debug_event): Ignore load and unload DLL events
6566 during child initialization.
6567
d86d4aaf
DE
65682014-02-20 Doug Evans <dje@google.com>
6569
3bc32da3 6570 Remove global all_lwps.
d86d4aaf
DE
6571 * inferiors.h (ptid_of): Move here from linux-low.h.
6572 (pid_of, lwpid_of): Ditto.
6573 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6574 parameter is a struct thread_info * now.
6575 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6576 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6577 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6578 directly.
6579 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6580 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6581 * linux-arm-low.c (update_registers_callback): Update, "entry"
6582 parameter is a struct thread_info * now.
6583 Fetch lwpid from current_inferior directly.
6584 (arm_insert_point): Pass &all_threads to find_inferior instead of
6585 &all_lwps.
6586 (arm_remove_point): Ditto.
6587 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6588 (arm_prepare_to_resume): Fetch pid from thread.
6589 (arm_read_description): Fetch lwpid from current_inferior directly.
6590 * linux-low.c (all_lwps): Delete.
6591 (delete_lwp): Delete call to remove_inferior.
6592 (handle_extended_wait): Fetch lwpid from thread.
6593 (add_lwp): Don't set lwp->entry.id. Remove call to
6594 add_inferior_to_list.
6595 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6596 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6597 (kill_one_lwp_callback): Ditto.
6598 (linux_kill): Don't dereference NULL pointer.
6599 Fetch ptid,lwpid from thread.
6600 (get_detach_signal): Fetch ptid from thread.
6601 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6602 Simplify call to regcache_invalidate_thread.
6603 (delete_lwp_callback): Update, "entry" parameter is a
6604 struct thread_info * now. Fetch pid from thread.
6605 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6606 (status_pending_p_callback): Update, "entry" parameter is a
6607 struct thread_info * now. Fetch ptid from thread.
6608 (find_lwp_pid): Update, "entry" parameter is a
6609 struct thread_info * now.
6610 (linux_wait_for_lwp): Fetch pid from thread.
6611 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6612 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6613 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6614 (dequeue_one_deferred_signal): Ditto.
6615 (cancel_breakpoint): Fetch ptid from current_inferior.
6616 (linux_wait_for_event): Pass &all_threads to find_inferior,
6617 not &all_lwps. Fetch ptid, lwpid from thread.
6618 (count_events_callback): Update, "entry" parameter is a
6619 struct thread_info * now.
6620 (select_singlestep_lwp_callback): Ditto.
6621 (select_event_lwp_callback): Ditto.
6622 (cancel_breakpoints_callback): Ditto.
6623 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6624 not &all_lwps.
6625 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6626 (unsuspend_one_lwp): Update, "entry" parameter is a
6627 struct thread_info * now.
6628 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6629 not &all_lwps.
6630 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6631 Fetch lwpid from thread, not lwp.
6632 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6633 Pass &all_threads to find_inferior, not &all_lwps.
6634 (send_sigstop): Fetch lwpid from thread, not lwp.
6635 (send_sigstop_callback): Update, "entry" parameter is a
6636 struct thread_info * now.
6637 (suspend_and_send_sigstop_callback): Ditto.
6638 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6639 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6640 struct thread_info * now.
6641 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6642 from thread, lwp.
6643 (lwp_running): Update, "entry" parameter is a
6644 struct thread_info * now.
6645 (stop_all_lwps): Fetch ptid from thread.
6646 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6647 (linux_resume_one_lwp): Fetch lwpid from thread.
6648 (linux_set_resume_request): Update, "entry" parameter is a
6649 struct thread_info * now. Fetch pid, lwpid from thread.
6650 (resume_status_pending_p): Update, "entry" parameter is a
6651 struct thread_info * now.
6652 (need_step_over_p): Ditto. Fetch lwpid from thread.
6653 (start_step_over): Fetch lwpid from thread.
6654 (linux_resume_one_thread): Update, "entry" parameter is a
6655 struct thread_info * now. Fetch lwpid from thread.
6656 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6657 (proceed_one_lwp): Update, "entry" parameter is a
6658 struct thread_info * now. Fetch lwpid from thread.
6659 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6660 struct thread_info * now.
6661 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6662 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6663 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6664 directly.
6665 (regsets_store_inferior_registers): Ditto.
6666 (fetch_register, store_register): Ditto.
6667 (linux_read_memory, linux_write_memory): Ditto.
6668 (linux_request_interrupt): Ditto.
6669 (linux_read_auxv): Ditto.
6670 (linux_xfer_siginfo): Ditto.
6671 (linux_qxfer_spu): Ditto.
6672 (linux_qxfer_libraries_svr4): Ditto.
6673 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6674 moved to inferiors.h.
6675 (get_lwp): Delete.
6676 (get_thread_lwp): Update.
6677 (struct lwp_info): Delete member "entry". Simplify comment for
6678 member "thread".
6679 (all_lwps): Delete.
6680 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6681 current_inferior directly.
6682 (update_watch_registers_callback): Update, "entry" parameter is a
6683 struct thread_info * now. Fetch pid from thread.
6684 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6685 (mips_insert_point): Fetch lwpid from current_inferior.
6686 Pass &all_threads to find_inferior, not &all_lwps.
6687 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6688 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6689 directly.
6690 (mips_stopped_data_address): Ditto.
6691 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6692 directly.
6693 * linux-tile-low.c (tile_arch_setup): Ditto.
6694 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6695 (update_debug_registers_callback): Update, "entry" parameter is a
6696 struct thread_info * now. Fetch pid from thread.
6697 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6698 Pass &all_threads to find_inferior, not &all_lwps.
6699 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6700 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6701 Pass &all_threads to find_inferior, not &all_lwps.
6702 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6703 (i386_dr_low_get_status): Ditto.
6704 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6705 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6706 (x86_linux_read_description): Ditto.
6707 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6708
3b8361aa
DE
67092014-02-20 Doug Evans <dje@google.com>
6710
6711 * inferiors.c (get_first_inferior): Fix buglet.
6712
f7667f0d
DE
67132014-02-19 Doug Evans <dje@google.com>
6714
6715 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6716 * inferiors.c (add_thread): Change result type to struct thread_info *.
6717 All callers updated.
6718 (add_lwp): Call add_thread here instead of in callers.
6719 All callers updated.
6720 * linux-low.h (get_lwp_thread): Rewrite.
6721 (struct lwp_info): New member "thread".
6722
b3312d80
DE
67232014-02-19 Doug Evans <dje@google.com>
6724
6725 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6726 All callers updated.
6727
ecc6f45c
DE
67282014-02-19 Doug Evans <dje@google.com>
6729
6730 * inferiors.c (add_thread): Fix whitespace.
6731
649ebbca
DE
67322014-02-19 Doug Evans <dje@google.com>
6733
6734 * dll.c (clear_dlls): Replace accessing list implemention details
6735 with API function.
6736 * gdbthread.h (get_first_thread): Declare.
6737 * inferiors.c (for_each_inferior_with_data): New function.
6738 (get_first_thread): New function.
6739 (find_thread_ptid): Simplify.
6740 (get_first_inferior): New function.
6741 (clear_list): Delete.
6742 (one_inferior_p): New function.
6743 (clear_inferior_list): New function.
6744 (clear_inferiors): Update.
6745 * inferiors.h (for_each_inferior_with_data): Declare.
6746 (clear_inferior_list): Declare.
6747 (one_inferior_p): Declare.
6748 (get_first_inferior): Declare.
6749 * linux-low.c (linux_wait_for_event): Replace accessing list
6750 implemention details with API function.
6751 * server.c (target_running): Ditto.
6752 (accumulate_file_name_length): New function.
6753 (emit_dll_description): New function.
6754 (handle_qxfer_libraries): Replace accessing list implemention
6755 details with API function.
6756 (handle_qxfer_threads_worker): New function.
6757 (handle_qxfer_threads_proper): Replace accessing list implemention
6758 details with API function.
6759 (handle_query): Ditto.
6760 (visit_actioned_threads_callback_ftype): New typedef.
6761 (visit_actioned_threads_data): New struct.
6762 (visit_actioned_threads): Rewrite to be find_inferior callback.
6763 (resume): Call find_inferior.
6764 (handle_status): Replace accessing list implemention
6765 details with API function.
6766 (process_serial_event): Replace accessing list implemention details
6767 with API function.
6768 * target.c (set_desired_inferior): Replace accessing list implemention
6769 details with API function.
6770 * tracepoint.c (same_process_p): New function.
6771 (gdb_agent_about_to_close): Replace accessing list implemention
6772 details with API function.
6773 * win32-low.c (child_delete_thread): Replace accessing list
6774 implemention details with API function.
6775 (match_dll_by_basename): New function.
6776 (dll_is_loaded_by_basename): New function.
6777 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6778 details call to dll_is_loaded_by_basename.
6779
80894984
DE
67802014-02-19 Doug Evans <dje@google.com>
6781
6782 * dll.h (struct dll_info): Add comment.
6783 * gdbthread.h (struct thread_info): Add comment.
6784 (current_ptid): Simplify.
6785 * inferiors.c (add_process): Update.
6786 (remove_process): Update.
6787 * inferiors.h (struct process_info): Rename member "head" to "entry".
6788 * linux-low.c (delete_lwp): Update.
6789 (add_lwp): Update.
6790 (last_thread_of_process_p): Update.
6791 (kill_one_lwp_callback, linux_kill): Update.
6792 (status_pending_p_callback): Update.
6793 (wait_for_sigstop): Update. Simplify read of ptid.
6794 (start_step_over): Update.
6795 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6796 (get_lwp_thread): Update.
6797 (struct lwp_info): Rename member "head" to "entry".
6798 * regcache.h (inferior_list_entry): Delete.
6799 * server.c (kill_inferior_callback): Update.
6800 (detach_or_kill_inferior_callback): Update.
6801 (print_started_pid): Update.
6802 (print_attached_pid): Update.
6803 (process_serial_event): Simplify read of ptid.
6804 * thread-db.c (thread_db_create_event): Update.
6805 (thread_db_get_tls_address): Update.
6806 * win32-low.c (current_inferior_ptid): Simplify.
6807
46917d26
TT
68082014-02-19 Tom Tromey <tromey@redhat.com>
6809
6810 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6811 argument.
6812 (target_supports_btrace): Update.
6813
0759a81e
YQ
68142014-02-14 Yao Qi <yao@codesourcery.com>
6815
6816 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6817 (rsp-low-ipa.o): New target.
6818
a7191e8b
TT
68192014-02-12 Tom Tromey <tromey@redhat.com>
6820
6821 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6822 convert_ascii_to_int.
6823 * regcache.c (registers_to_string): Likewise.
6824 * remote-utils.c (decode_M_packet): Likewise.
6825 * server.c (process_serial_event): Likewise.
6826
ff0e980e
TT
68272014-02-12 Tom Tromey <tromey@redhat.com>
6828
6829 * server.c (handle_query, handle_v_run): Use hex2bin, not
6830 unhexify.
6831 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6832
e9371aff
TT
68332014-02-12 Tom Tromey <tromey@redhat.com>
6834
6835 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6836 convert_int_to_ascii.
6837 * regcache.c (registers_to_string, collect_register_as_string):
6838 Likewise.
6839 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6840 Likewise.
6841 * server.c (process_serial_event): Likewise.
6842 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6843 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6844
971dc0b8
TT
68452014-02-12 Tom Tromey <tromey@redhat.com>
6846
6847 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6848 bin2hex, not hexify.
6849 * tracepoint.c (cmd_qtstatus): Likewise.
6850
0a822afb
TT
68512014-02-12 Tom Tromey <tromey@redhat.com>
6852
6853 * remote-utils.c (monitor_output): Pass explicit length to
6854 hexify.
6855
9c3d6531
TT
68562014-02-12 Tom Tromey <tromey@redhat.com>
6857
6858 * tracepoint.c: Include rsp-low.h.
6859 * server.c: Include rsp-low.h.
6860 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6861 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6862 declare.
6863 * remote-utils.c: Include rsp-low.h.
6864 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6865 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6866 (convert_int_to_ascii, convert_ascii_to_int): Move to
6867 common/rsp-low.c.
6868 * regcache.c: Include rsp-low.h.
6869 * ax.c: Include rsp-low.h.
6870 * Makefile.in (SFILES): Add common/rsp-low.c.
6871 (OBS): Add rsp-low.o.
6872 (rsp-low.o): New target.
6873
01fd3ea5
TT
68742014-02-12 Tom Tromey <tromey@redhat.com>
6875
6876 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6877 Include print-utils.h.
6878 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6879 (plongest, thirty_two, phex_nz): Remove.
6880 * Makefile.in (SFILES): Add common/print-utils.c.
6881 (OBS): Add print-utils.o.
6882 (print-utils-ipa.o): New target.
6883 (print-utils.o): New target.
6884 (IPA_OBJS): Add print-utils-ipa.o.
6885
e99dc820
TT
68862014-02-06 Tom Tromey <tromey@redhat.com>
6887
6888 * Makefile.in (SFILES): Fix indentation.
6889
ee1e2d4f
DE
68902014-02-05 Doug Evans <dje@google.com>
6891
6892 * linux-low.c (linux_wait_for_event): Improve comment.
6893 (linux_wait_1): Keep current_inferior in sync with event_child.
6894
f5a02773
DE
68952014-01-22 Doug Evans <dje@google.com>
6896
6897 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6898
87ce2a04
DE
68992014-01-22 Doug Evans <dje@google.com>
6900
6901 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6902 * configure: Regenerate.
6903 * config.in: Regenerate.
6904 * Makefile.in (SFILES): Add debug.c.
6905 (OBS): Add debug.o.
6906 * debug.c: New file.
6907 * debug.h: New file.
6908 * linux-aarch64-low.c (*): Update all debugging printfs to use
6909 debug_printf instead of fprintf.
6910 * linux-arm-low.c (*): Ditto.
6911 * linux-cris-low.c (*): Ditto.
6912 * linux-crisv32-low.c (*): Ditto.
6913 * linux-m32r-low.c (*): Ditto.
6914 * linux-sparc-low.c (*): Ditto.
6915 * linux-x86.c (*): Ditto.
6916 * linux-low.c (*): Ditto.
6917 (linux_wait_1): Add calls to debug_enter, debug_exit.
6918 (linux_wait): Remove redundant debugging printf.
6919 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6920 (linux_resume, unstop_all_lwps): Ditto.
6921 * mem-break.c (*): Update all debugging printfs to use
6922 debug_printf instead of fprintf.
6923 * remote-utils.c (*): Ditto.
6924 * thread-db.c (*): Ditto.
6925 * server.c #include <ctype.h>, "gdb_vecs.h".
6926 (debug_threads): Moved to debug.c.
6927 (*): Update all debugging printfs to use debug_printf instead of
6928 fprintf.
6929 (start_inferior): Replace call to fflush with call to debug_flush.
6930 (monitor_show_help): Mention set debug-format.
6931 (parse_debug_format_options): New function.
6932 (handle_monitor_command): Handle "monitor set debug-format".
6933 (gdbserver_usage): Mention --debug-format.
6934 (main): Parse --debug-format.
6935 * server.h (debug_threads): Declaration moved to debug.h.
6936 #include "debug.h".
6937 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6938 trace_debug_1 that uses debug_printf.
6939 (tracepoint_look_up_symbols): Update all debugging printfs to use
6940 debug_printf instead of fprintf.
6941
e671835b
BS
69422014-01-20 Baruch Siach <baruch@tkos.co.il>
6943
6944 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6945 sys/ptrace.h.
6946
b5737fa9
PA
69472014-01-17 Pedro Alves <palves@redhat.com>
6948
ea38d2a9 6949 PR build/16445
c7faa97a
PA
6950 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6951 defined after including gdb_proc_service.h.
b5737fa9 6952
40ed484e
DE
69532014-01-16 Doug Evans <dje@google.com>
6954
6955 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6956 (match_dll): Use it.
6957
969c39fb
MM
69582014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6959
6960 * target.h (target_ops) <read_btrace>: Change parameters and
6961 return type to allow error reporting.
6962 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6963 trace reading errors on.
6964 * linux-low.c (linux_low_read_btrace): Pass trace reading
6965 errors on.
6966 (linux_low_disable_btrace): New.
6967
ab7f45ba
DE
69682014-01-15 Doug Evans <dje@google.com>
6969
6970 * inferiors.c (thread_id_to_gdb_id): Delete.
6971 * inferiors.h (thread_id_to_gdb_id): Delete.
6972
66af0f44
EZ
69732014-01-13 Eli Zaretskii <eliz@gnu.org>
6974
6975 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6976 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6977 versions.
6978
9939e131
PA
69792014-01-08 Pedro Alves <palves@redhat.com>
6980
6981 * server.c (handle_status): Don't discard previous queued stop
6982 replies or thread's pending status here.
6983 (main) <disconnection>: Do it here instead.
6984
b7ea362b
PA
69852014-01-08 Pedro Alves <palves@redhat.com>
6986
6987 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6988 * server.c (visit_actioned_threads, handle_pending_status): New
6989 function.
6990 (handle_v_cont): Factor out parts to ...
6991 (resume): ... this new function. If in all-stop, and a thread
6992 being resumed has a pending status, report it without actually
6993 resuming.
6994 (myresume): Adjust to use the new 'resume' function.
6995 (clear_pending_status_callback, set_pending_status_callback)
6996 (find_status_pending_thread_callback): New functions.
6997 (handle_status): Handle the case of multiple threads having
6998 interesting statuses to report. Report threads' real last signal
6999 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7000 with an interesting thread to report the status for, instead of
7001 always reporting the status of the first thread.
7002
28498c42
JB
70032014-01-01 Joel Brobecker <brobecker@adacore.com>
7004
7005 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7006 * gdbreplay.c (gdbreplay_version): Likewise.
7007
f45c82da
YZ
70082013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7009
7010 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7011 iov.iov_len with the real length in use.
7012
379a5e2d
JB
70132013-12-13 Joel Brobecker <brobecker@adacore.com>
7014
7015 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7016 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7017 for all targets that use win32-low.c.
7018 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7019 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7020
4210d83e
PA
70212013-12-13 Pedro Alves <palves@redhat.com>
7022
7023 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7024 if equal to TARGET_WAITKIND_LOADED.
7025 * win32-low.c (cached_status): New static global.
7026 (win32_wait): Add declaration.
7027 (do_initial_child_stuff): Flush all initial pending debug events
7028 up to the initial breakpoint.
7029 (win32_wait): If CACHED_STATUS was set, return that instead
7030 of doing a real wait. Remove the code resuming the execution
7031 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7032 during the initial phase. Also remove the code changing
7033 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7034 TARGET_WAITKIND_STOPPED.
7035
e7f0d979
YQ
70362013-12-11 Yao Qi <yao@codesourcery.com>
7037
7038 * notif.c (handle_notif_ack): Return 0 if no notification
7039 matches.
7040
ebcf782c
DE
70412013-11-20 Doug Evans <dje@google.com>
7042
7043 * linux-low.c (linux_set_resume_request): Fix comment.
7044
20ad9378
DE
70452013-11-20 Doug Evans <dje@google.com>
7046
7047 * linux-low.c (resume_status_pending_p): Tweak comment.
7048
a196ebeb
WT
70492013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7050
7051 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7052 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7053 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7054 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7055 (srv_amd64_regobj): Add amd64-mpx.o.
7056 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7057 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7058 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7059 * i387-fp.c (num_pl_bnd_register) Added constant.
7060 (num_pl_bnd_cfg_registers) Added constant.
7061 (struct i387_xsave) Added reserved area and MPX fields.
7062 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7063 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7064 function.
7065 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7066 (init_registers_amd64_mpx_linux): Declare new function.
7067 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7068 (x86_64_regmap): Add MPX registers.
7069 (x86_linux_read_description): Add MPX case.
7070 (initialize_low_arch): Initialize MPX targets.
7071
0080a2f6
TT
70722013-11-18 Tom Tromey <tromey@redhat.com>
7073
7074 * configure: Rebuild.
7075 * configure.ac: Don't check for stdlib.h.
7076 * gdbreplay.c: Unconditionally include stdlib.h.
7077
2978b111
TT
70782013-11-18 Tom Tromey <tromey@redhat.com>
7079
7080 * config.in: Rebuild.
7081 * configure: Rebuild.
7082 * configure.ac: Don't use AC_HEADER_DIRENT.
7083
a3d08894
TT
70842013-11-18 Tom Tromey <tromey@redhat.com>
7085
7086 * server.h: Don't check HAVE_STRING_H.
7087 * gdbreplay.c: Don't check HAVE_STRING_H.
7088 * configure: Rebuild.
7089
0a5dd17d
TT
70902013-11-18 Tom Tromey <tromey@redhat.com>
7091
7092 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7093 LIBGNU.
7094
1bd2f0ba
TT
70952013-11-08 Tom Tromey <tromey@redhat.com>
7096
7097 * configure, config.in: Rebuild.
7098 * configure.ac: Remove unused configury.
7099
3266f10b
TT
71002013-11-08 Tom Tromey <tromey@redhat.com>
7101
7102 * acinclude.m4: Include common.m4, codeset.m4.
7103 * configure, config.in: Rebuild.
7104 * configure.ac: Use GDB_AC_COMMON.
7105
6682d959
AA
71062013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7107
7108 * linux-s390-low.c (HWCAP_S390_TE): New define.
7109 (s390_arch_setup): Consider the TE field in the HWCAP for
7110 determining 'have_regset_tdb'.
7111
fd0a4d76
SDJ
71122013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7113
7114 PR gdb/16014
7115 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7116 call to sizeof.
7117
1a3d890b
PA
71182013-10-02 Pedro Alves <palves@redhat.com>
7119
7120 * server.c (process_serial_event): Don't output "GDBserver
7121 exiting" if GDB is connected through stdio.
7122 * target.c (mywait): Likewise, be silent if GDB is connected
7123 through stdio.
7124
97ad4581
JB
71252013-10-01 Joel Brobecker <brobecker@adacore.com>
7126
7127 * lynx-low.c (lynx_add_threads_after_attach): New function.
7128 (lynx_attach): Remove call to add_thread. Add call to
7129 lynx_add_threads_after_attach instead.
7130
5b4e221c
MF
71312013-09-28 Mike Frysinger <vapier@gentoo.org>
7132
7133 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7134 * config.in, configure: Regenerated.
7135
ee47b2f8
YQ
71362013-09-18 Yao Qi <yao@codesourcery.com>
7137
7138 PR server/15959
7139 * server.c (start_inferior): Clear 'resume_info'.
7140
d6707650 71412013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7142
d6707650
JW
7143 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7144 for each register.
7145
9243dd0e 71462013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7147
9243dd0e
JW
7148 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7149 linux-tile-low.o to srv_tgtobj.
7150
c623a6ef
WN
71512013-09-16 Will Newton <will.newton@linaro.org>
7152
7153 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7154 out regs.
7155
fb71d39e
PA
71562013-09-06 Pedro Alves <palves@redhat.com>
7157
7158 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7159 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7160 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7161 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7162 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7163 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7164
8e7e9910
PA
71652013-09-06 Pedro Alves <palves@redhat.com>
7166
7167 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7168 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7169
7c3a12ca
PA
71702013-09-06 Pedro Alves <palves@redhat.com>
7171
7172 * linux-amd64-ipa.c: Include tracepoint.h.
7173 * linux-i386-ipa.c: Include tracepoint.h.
7174
8eb3d7b6
RW
71752013-09-06 Ricard Wanderlof <ricardw@axis.com>
7176
7177 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7178 (ps_get_thread_area): New function.
7179
eddddb9d
RW
71802013-09-06 Ricard Wanderlof <ricardw@axis.com>
7181
7182 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7183 (initialize_low_arch): Call init_registers_crisv32 rather than
7184 init_register_crisv32.
7185
533b0600
PA
71862013-09-05 Pedro Alves <palves@redhat.com>
7187
7188 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7189 to ...
7190 * hostio.h: ... this new file.
7191 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7192 win32-low.c: Include hostio.h.
7193
0ce3d3b5
PA
71942013-09-05 Pedro Alves <palves@redhat.com>
7195
7196 * server.h (gdb_client_data, handler_func, callback_handler_func)
7197 (delete_file_handler, add_file_handler, append_callback_event)
7198 (delete_callback_event, start_event_loop, initialize_event_loop):
7199 Move to event-loop.h and include it.
7200 * event-loop.h: New file.
7201
799cdc37
PA
72022013-09-05 Pedro Alves <palves@redhat.com>
7203
7204 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7205 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7206 (loaded_dll, unloaded_dll): Move to ...
7207 * dll.h: ... this new file.
7208 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7209
6a6bbd9d
PA
72102013-09-05 Pedro Alves <palves@redhat.com>
7211
7212 * server.h (current_process, get_thread_process, all_processes)
7213 (add_inferior_to_list, for_each_inferior, current_inferior)
7214 (remove_inferior, add_process, remove_process, find_process_pid)
7215 (have_started_inferiors_p, have_attached_inferiors_p)
7216 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7217 (clear_inferiors, find_inferior, find_inferior_id)
7218 (inferior_target_data, set_inferior_target_data)
7219 (inferior_regcache_data, set_inferior_regcache_data): Move to
7220 inferiors.h, and include it.
7221 * inferiors.h: New file.
7222
f699aaba
PA
72232013-09-05 Pedro Alves <palves@redhat.com>
7224
7225 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7226 Move ...
72f4393d 7227 * ax.h: ... here.
f699aaba 7228
c144c7a0
PA
72292013-09-05 Pedro Alves <palves@redhat.com>
7230
7231 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7232 tracepoint.h.
7233 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7234 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7235 (handle_tracepoint_general_set, handle_tracepoint_query)
7236 (tracepoint_finished_step, tracepoint_was_hit)
7237 (release_while_stepping_state_list, current_traceframe)
7238 (in_readonly_region, traceframe_read_mem)
7239 (fetch_traceframe_registers, traceframe_read_sdata)
7240 (traceframe_read_info, struct fast_tpoint_collect_status)
7241 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7242 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7243 (supply_fast_tracepoint_registers)
7244 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7245 (ipa_tdesc, claim_trampoline_space)
7246 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7247 (agent_mem_read, agent_get_trace_state_variable_value)
7248 (agent_set_trace_state_variable_value, agent_tsv_read)
7249 (agent_mem_read_string, get_raw_reg_func_addr)
7250 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7251 * tracepoint.h: ... this new file.
7252
ff42e6ab
PA
72532013-09-05 Pedro Alves <palves@redhat.com>
7254
7255 * server.h (perror_with_name, error, fatal, warning, paddress)
7256 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7257 include it.
7258 * utils.h: New file.
7259
541af0f4
PA
72602013-09-05 Pedro Alves <palves@redhat.com>
7261
7262 * server.h (remote_debug, noack_mode, transport_is_reliable)
7263 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7264 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7265 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7266 (write_enn, initialize_async_io, enable_async_io)
7267 (disable_async_io, check_remote_input_interrupt_request)
7268 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7269 (dead_thread_notify, prepare_resume_reply)
7270 (decode_address_to_semicolon, decode_address, decode_m_packet)
7271 (decode_M_packet, decode_X_packet, decode_xfer_write)
7272 (decode_search_memory_packet, unhexify, hexify)
7273 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7274 (look_up_one_symbol, relocate_instruction)
7275 (monitor_output): Move to remote-utils.h, and include it.
7276 * remote-utils.h: New file.
7277
eebdf26b
PA
72782013-09-05 Pedro Alves <palves@redhat.com>
7279
7280 * server.h (_): Delete.
7281
3aafd2ff
PA
72822013-09-02 Pedro Alves <palves@redhat.com>
7283
7284 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7285 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7286 allocated.
7287 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7288
cee83bcb
PM
72892013-09-02 Pierre Muller <muller@sourceware.org>
7290
7291 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7292 or WriteProcessMemory complete successfully and handle
7293 ERROR_PARTIAL_COPY error.
7294
9a13b2fa
PA
72952013-09-02 Pedro Alves <palves@redhat.com>
7296
7297 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7298 error instead of EIO.
7299
602e3198
JK
73002013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7301
7302 PR server/15604
7303 * linux-low.c: Include filestuff.h.
7304 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7305 * lynx-low.c: Include filestuff.h.
7306 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7307 * server.c: Include filestuff.h.
7308 (main): Call notice_open_fds.
7309 * spu-low.c: Include filestuff.h.
7310 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7311
96d7229d
LM
73122013-08-22 Luis Machado <lgustavo@codesourcery.com>
7313
7314 * Makefile.in: Explain why ../target and ../nat are not
7315 listed as include file search paths.
7316 (linux-waitpid.o): New object file rule.
7317 * configure.srv (srv_native_linux_obj): New variable.
7318 Replace all occurrences of linux native object files with
7319 $srv_native_linux_obj.
7320 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7321 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7322 (linux_enable_event_reporting): Remove declaration.
7323 (my_waitpid): Moved to common/linux-waitpid.c.
7324 (linux_wait_for_event): Pass ptid when calling
7325 linux_enable_event_reporting.
7326 (linux_supports_tracefork_flag): Remove.
7327 (linux_enable_event_reporting): Likewise.
7328 (linux_tracefork_grandchild): Remove.
7329 (STACK_SIZE): Moved to common/linux-ptrace.c.
7330 (linux_tracefork_child): Remove.
7331 (linux_test_for_tracefork): Remove.
7332 (linux_look_up_symbols): Call linux_supports_traceclone.
7333 (initialize_low): Remove call to linux_test_for_tracefork.
7334 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7335 common/linux-ptrace.h.
7336 (PTRACE_TYPE_ARG4): Likewise.
7337 Include linux-ptrace.h.
7338
32940073
PA
73392013-08-21 Pedro Alves <palves@redhat.com>
7340
7341 * config.in: Renegerate.
7342
33b60d58 73432013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 7344
33b60d58
LM
7345 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7346 (SFILES): Remove $(srcdir)/common/target-common.c and
7347 add $(srcdir)/target/waitstatus.c.
7348 (OBS): Remove target-common.o and add waitstatus.o.
7349 (server_h): Remove $(srcdir)/../common/target-common.h and
7350 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7351 and $(srcdir)/../target/waitstatus.h.
7352 (target-common.o): Remove.
7353 (waitstatus.o): New target object file.
7354 * target.h: Do not include target-common.h and
7355 include target/resume.h, target/wait.h and
7356 target/waitstatus.h.
7357
b8e1b30e
LM
73582013-08-13 Luis Machado <lgustavo@codesourcery.com>
7359
7360 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7361 to PTRACE_TYPE_ARG3.
7362 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7363 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7364 PTRACE_TYPE_ARG4.
7365 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7366 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7367
7a60ad40
YQ
73682013-07-27 Jie Zhang <jie@codesourcery.com>
7369 Daniel Jacobowitz <dan@codesourcery.com>
7370 Yao Qi <yao@codesourcery.com>
7371
7372 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7373 (mips-linux-watch.o): New rule.
7374 (mips_linux_watch_h): New variable.
7375 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7376 srv_tgtobj.
7377 * linux-mips-low.c: Include mips-linux-watch.h.
7378 (struct arch_process_info, struct arch_lwp_info): New.
7379 (update_watch_registers_callback): New function.
7380 (mips_linux_new_process, mips_linux_new_thread) New functions.
7381 (mips_linux_prepare_to_resume, mips_insert_point): New
7382 functions.
7383 (mips_remove_point, mips_stopped_by_watchpoint): New
7384 functions.
7385 (rsp_bp_type_to_target_hw_bp_type): New function.
7386 (mips_stopped_data_address): New function.
7387 (the_low_target): Add watchpoint support functions.
7388
de6f69ad
YQ
73892013-07-27 Yao Qi <yao@codesourcery.com>
7390
7391 * i386-low.c: Include break-common.h.
7392 (enum target_hw_bp_type): Remove.
7393
3360c0bf
LM
73942013-07-24 Luis Machado <lgustavo@codesourcery.com>
7395
7396 * Makefile.in (SFILES): /common/target-common.c.
7397 (OBS): Add target-common.o.
7398 (server_h): Add $(srcdir)/../common/target-common.h.
7399 (target-common.o): New target.
7400 * server.c (queue_stop_reply_callback): Free
7401 status string after use.
7402 * target.c (target_waitstatus_to_string): Remove.
7403 * target.h: Include target-common.h.
7404 (resume_kind): Likewise.
7405 (target_waitkind): Likewise.
7406 (target_waitstatus): Likewise.
7407 (TARGET_WNOHANG): Likewise.
7408
bd885420
YQ
74092013-07-04 Yao Qi <yao@codesourcery.com>
7410
7411 * Makefile.in (host_alias): Use @host_noncanonical@.
7412 (target_alias): Use @target_noncanonical@.
7413 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7414 ACX_NONCANONICAL_HOST.
7415 * configure: Regenerated.
7416
7417 Revert:
7418 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7419
7420 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7421 * configure: Rebuild.
7422 * Makefile.in (version_host, version_target): Get from configure.
7423 (version.c): Use $(version_host) and $(version_target).
7424
17ef446e
PA
74252013-07-03 Pedro Alves <palves@redhat.com>
7426
7427 * Makefile.in (config.status): Depend on development.sh.
7428 * acinclude.m4: Include libmcheck.m4.
7429 * configure: Regenerate.
7430
7a9a7487
MG
74312013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7432
7433 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7434 attribute inside the parentheses.
7435 (winapi_DebugSetProcessKillOnExit): Ditto.
7436 (winapi_DebugBreakProcess): Ditto.
7437 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 7438
49b64de6
MG
74392013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7440
7441 * notif.h (notif_event): Add a dummy member to avoid compiler
7442 errors.
7443
d5749ee7
PA
74442013-07-01 Pedro Alves <palves@redhat.com>
7445
7446 * hostio.c (HOSTIO_PATH_MAX): Define.
7447 (require_filename, handle_open, handle_unlink, handle_readlink):
7448 Use it.
7449
d8d2a3ee
PA
74502013-07-01 Pedro Alves <palves@redhat.com>
7451
7452 * server.h: Include "pathmax.h".
7453 * linux-low.c: Don't include sys/param.h.
7454 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7455 MAXPATHLEN.
7456 * win32-low.c: Don't include sys/param.h.
7457 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7458
bc7dea8d
PA
74592013-07-01 Pedro Alves <palves@redhat.com>
7460
7461 * event-loop.c: Don't check HAVE_UNISTD_H before including
7462 <unistd.h>.
7463 * gdbreplay.c: Likewise.
7464 * remote-utils.c: Likewise.
7465 * server.c: Likewise.
7466 * configure.ac: Don't check for unistd.h.
7467 * configure: Regenerate.
7468
d6c2da54
TT
74692013-06-28 Tom Tromey <tromey@redhat.com>
7470
7471 * Makefile.in (version.c): Use version.in, not
7472 common/version.in.
7473
257b6bec
MG
74742013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7475
7476 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7477 * configure: Rebuild.
7478 * Makefile.in (version_host, version_target): Get from configure.
7479 (version.c): Use $(version_host) and $(version_target).
7480
86ebe149
DK
74812013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7482
7483 Fix trace-status to output user name without trailing colon.
7484 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7485
f30aa5af
DK
74862013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7487
7488 Fix trace-status to output proper start-time and stop-time.
7489 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7490 output start time and stop time in hex as gdb expects.
7491
28a93511
YQ
74922013-06-26 Pedro Alves <pedro@codesourcery.com>
7493
7494 * tracepoint.c (build_traceframe_info_xml): Output trace state
7495 variables present in the trace buffer.
7496
01208463
TT
74972013-06-24 Tom Tromey <tromey@redhat.com>
7498
7499 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7500 create-version.sh.
7501 (version.o): Remove.
7502 * gdbreplay.c: Include version.h.
7503 (version, host_name): Don't declare.
7504 * server.h: Include version.h.
7505 (version, host_name): Don't declare.
7506
760256f9
PA
75072013-06-12 Pedro Alves <palves@redhat.com>
7508
7509 * linux-x86-low.c (linux_is_elf64): Delete global.
7510 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7511 with local linux_pid_exe_is_elf_64_file use.
7512
030031ee
PA
75132013-06-11 Pedro Alves <palves@redhat.com>
7514
7515 * linux-low.c (regset_disabled, disable_regset): New functions.
7516 (regsets_fetch_inferior_registers)
7517 (regsets_store_inferior_registers): Use them.
7518 (initialize_regsets_info); Don't allocate the disabled_regsets
7519 array here.
7520 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7521 comment.
7522
5da6eb0a
PA
75232013-06-11 Pedro Alves <palves@redhat.com>
7524
7525 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7526 xmalloc.
7527
7e5aaa09
PA
75282013-06-11 Pedro Alves <palves@redhat.com>
7529
7530 * linux-x86-low.c (initialize_low_arch): Call
7531 init_registers_x32_avx_linux.
7532
d878444c
JK
75332013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7534
7535 Fix compatibility with Android Bionic.
7536 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7537 it is not empty.
7538
3aee8918
PA
75392013-06-07 Pedro Alves <palves@redhat.com>
7540
5f2b57b5 7541 PR server/14823
3aee8918
PA
7542 * Makefile.in (OBS): Add tdesc.o.
7543 (IPA_OBJS): Add tdesc-ipa.o.
7544 (tdesc-ipa.o): New rule.
7545 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7546 interface.
7547 * linux-low.c (new_inferior): Delete.
7548 (disabled_regsets, num_regsets): Delete.
7549 (linux_add_process): Adjust to set the new per-process
7550 new_inferior flag.
7551 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7552 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7553 was a stop. When calling arch_setup, switch the current inferior
7554 to the thread that got an event.
7555 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7556 (regsets_fetch_inferior_registers)
7557 (regsets_store_inferior_registers): New regsets_info parameter.
7558 Adjust to use it.
7559 (linux_register_in_regsets): New regs_info parameter. Adjust to
7560 use it.
7561 (register_addr, fetch_register, store_register): New usrregs_info
7562 parameter. Adjust to use it.
7563 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7564 parameter regs_info. Adjust to use it.
7565 (linux_fetch_registers): Get the current inferior's regs_info, and
7566 adjust to use it.
7567 (linux_store_registers): Ditto.
7568 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7569 (initialize_low): Don't initialize the target_regsets here. Call
7570 initialize_low_arch.
7571 * linux-low.h (target_regsets): Delete declaration.
7572 (struct regsets_info): New.
7573 (struct usrregs_info): New.
7574 (struct regs_info): New.
7575 (struct process_info_private) <new_inferior>: New field.
7576 (struct linux_target_ops): Delete the num_regs, regmap, and
7577 regset_bitmap fields. New field regs_info.
7578 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7579 * i387-fp.c (num_xmm_registers): Delete.
7580 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7581 calls to new interface.
7582 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7583 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7584 Infer the number of xmm registers from the regcache's target
7585 description.
7586 * i387-fp.h (num_xmm_registers): Delete.
7587 * inferiors.c (add_thread): Don't install the thread's regcache
7588 here.
7589 * proc-service.c (gregset_info): Fetch the current inferior's
7590 regs_info. Adjust to use it.
7591 * regcache.c: Include tdesc.h.
7592 (register_bytes, reg_defs, num_registers)
7593 (gdbserver_expedite_regs): Delete.
7594 (get_thread_regcache): If the thread doesn't have a regcache yet,
7595 create one, instead of aborting gdbserver.
7596 (regcache_invalidate_one): Rename to ...
7597 (regcache_invalidate_thread): ... this.
7598 (regcache_invalidate_one): New.
7599 (regcache_invalidate): Only invalidate registers of the current
7600 process.
7601 (init_register_cache): Add target_desc parameter, and use it.
7602 (new_register_cache): Ditto. Assert the target description has a
7603 non zero registers_size.
7604 (regcache_cpy): Add assertions. Adjust.
7605 (realloc_register_cache, set_register_cache): Delete.
7606 (registers_to_string, registers_from_string): Adjust.
7607 (find_register_by_name, find_regno, find_register_by_number)
7608 (register_cache_size): Add target_desc parameter, and use it.
7609 (free_register_cache_thread, free_register_cache_thread_one)
7610 (regcache_release, register_cache_size): New.
7611 (register_size): Add target_desc parameter, and use it.
7612 (register_data, supply_register, supply_register_zeroed)
7613 (supply_regblock, supply_register_by_name, collect_register)
7614 (collect_register_as_string, collect_register_by_name): Adjust.
7615 * regcache.h (struct target_desc): Forward declare.
7616 (struct regcache) <tdesc>: New field.
7617 (init_register_cache, new_register_cache): Add target_desc
7618 parameter.
7619 (regcache_invalidate_thread): Declare.
7620 (regcache_invalidate_one): Delete declaration.
7621 (regcache_release): Declare.
7622 (find_register_by_number, register_cache_size, register_size)
7623 (find_regno): Add target_desc parameter.
7624 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7625 declarations.
7626 * remote-utils.c: Include tdesc.h.
7627 (outreg, prepare_resume_reply): Adjust.
7628 * server.c: Include tdesc.h.
7629 (gdbserver_xmltarget): Delete declaration.
7630 (get_features_xml, process_serial_event): Adjust.
7631 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7632 declare.
7633 (struct process_info) <tdesc>: New field.
7634 (ipa_tdesc): Declare.
7635 * tdesc.c: New file.
7636 * tdesc.h: New file.
7637 * tracepoint.c: Include tdesc.h.
7638 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7639 (get_context_regcache): Adjust to pass ipa_tdesc down.
7640 (do_action_at_tracepoint): Adjust to get the register cache size
7641 from the context regcache's description.
7642 (traceframe_walk_blocks): Adjust to get the register cache size
7643 from the current trace frame's description.
7644 (traceframe_get_pc): Adjust to get current trace frame's
7645 description and pass it down.
7646 (gdb_collect): Adjust to get the register cache size from the
7647 IPA's description.
7648 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7649 (gdbserver_xmltarget): Delete.
7650 (initialize_low_tracepoint): Set the ipa's target description.
7651 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7652 (initialize_low_tracepoint): Set the ipa's target description.
7653 * linux-x86-low.c: Include tdesc.h.
7654 [__x86_64__] (is_64bit_tdesc): New.
7655 (ps_get_thread_area, x86_get_thread_area): Use it.
7656 (i386_cannot_store_register): Rename to ...
7657 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7658 (i386_cannot_fetch_register): Rename to ...
7659 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7660 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7661 to new interface.
7662 (target_regsets): Rename to ...
7663 (x86_regsets): ... this.
7664 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7665 interface.
7666 (x86_siginfo_fixup): Use is_64bit_tdesc.
7667 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7668 (tdesc_x32_avx_linux, tdesc_x32_linux)
7669 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7670 Declare.
7671 (x86_linux_update_xmltarget): Delete.
7672 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7673 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7674 (AMD64_LINUX_USER64_CS): New.
7675 (x86_linux_read_description): New, based on
7676 x86_linux_update_xmltarget.
7677 (same_process_callback): New.
7678 (x86_arch_setup_process_callback): New.
7679 (x86_linux_update_xmltarget): New.
7680 (x86_regsets_info): New.
7681 (amd64_linux_regs_info): New.
7682 (i386_linux_usrregs_info): New.
7683 (i386_linux_regs_info): New.
7684 (x86_linux_regs_info): New.
7685 (x86_arch_setup): Reimplement.
7686 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7687 (x86_emit_ops): Ditto.
7688 (the_low_target): Adjust. Install x86_linux_regs_info,
7689 x86_cannot_fetch_register, and x86_cannot_store_register.
7690 (initialize_low_arch): New.
7691 * linux-ia64-low.c (tdesc_ia64): Declare.
7692 (ia64_fetch_register): Adjust.
7693 (ia64_usrregs_info, regs_info): New globals.
7694 (ia64_regs_info): New function.
7695 (the_low_target): Adjust.
7696 (initialize_low_arch): New function.
7697 * linux-sparc-low.c (tdesc_sparc64): Declare.
7698 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7699 Adjust.
7700 (sparc_arch_setup): New function.
7701 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7702 (the_low_target): Adjust.
7703 (initialize_low_arch): New function.
7704 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7705 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7706 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7707 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7708 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7709 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7710 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7711 (tdesc_powerpc_isa205_vsx64l): Declare.
7712 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7713 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7714 (ppc_set_pc, ppc_get_hwcap): Adjust.
7715 (ppc_usrregs_info): Forward declare.
7716 (!__powerpc64__) ppc_regmap_adjusted: New global.
7717 (ppc_arch_setup): Adjust to the current process'es target
7718 description.
7719 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7720 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7721 (ppc_store_evrregset): Adjust.
7722 (target_regsets): Rename to ...
7723 (ppc_regsets): ... this, and make static.
7724 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7725 (ppc_regs_info): New function.
7726 (the_low_target): Adjust.
7727 (initialize_low_arch): New function.
7728 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7729 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7730 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7731 (tdesc_s390x_linux64v2): Declare.
7732 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7733 (s390_fill_gregset, s390_store_last_break): Adjust.
7734 (target_regsets): Rename to ...
7735 (s390_regsets): ... this, and make static.
7736 (s390_get_pc, s390_set_pc): Adjust.
7737 (s390_get_hwcap): New target_desc parameter, and use it.
7738 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7739 (s390_arch_setup): Adjust to set the current process'es target
7740 description. Don't adjust the regmap.
7741 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7742 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7743 (regs_info_3264): New globals.
7744 (s390_regs_info): New function.
7745 (the_low_target): Adjust.
7746 (initialize_low_arch): New function.
7747 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7748 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7749 [__mips64] (init_registers_mips_linux)
7750 (init_registers_mips_dsp_linux): Delete defines.
7751 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7752 (have_dsp): New global.
7753 (mips_read_description): New, based on mips_arch_setup.
7754 (mips_arch_setup): Reimplement.
7755 (get_usrregs_info): New function.
7756 (mips_cannot_fetch_register, mips_cannot_store_register)
7757 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7758 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7759 (target_regsets): Rename to ...
7760 (mips_regsets): ... this, and make static.
7761 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7762 (dsp_regs_info, regs_info): New globals.
7763 (mips_regs_info): New function.
7764 (the_low_target): Adjust.
7765 (initialize_low_arch): New function.
7766 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7767 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7768 Declare.
7769 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7770 (arm_read_description): New, with bits factored from
7771 arm_arch_setup.
7772 (arm_arch_setup): Reimplement.
7773 (target_regsets): Rename to ...
7774 (arm_regsets): ... this, and make static.
7775 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7776 (arm_regs_info): New function.
7777 (the_low_target): Adjust.
7778 (initialize_low_arch): New function.
7779 * linux-m68k-low.c (tdesc_m68k): Declare.
7780 (target_regsets): Rename to ...
7781 (m68k_regsets): ... this, and make static.
7782 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7783 (m68k_regs_info): New function.
7784 (m68k_arch_setup): New function.
7785 (the_low_target): Adjust.
7786 (initialize_low_arch): New function.
7787 * linux-sh-low.c (tdesc_sharch): Declare.
7788 (target_regsets): Rename to ...
7789 (sh_regsets): ... this, and make static.
7790 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7791 (sh_regs_info, sh_arch_setup): New functions.
7792 (the_low_target): Adjust.
7793 (initialize_low_arch): New function.
7794 * linux-bfin-low.c (tdesc_bfin): Declare.
7795 (bfin_arch_setup): New function.
7796 (bfin_usrregs_info, regs_info): New globals.
7797 (bfin_regs_info): New function.
7798 (the_low_target): Adjust.
7799 (initialize_low_arch): New function.
7800 * linux-cris-low.c (tdesc_cris): Declare.
7801 (cris_arch_setup): New function.
7802 (cris_usrregs_info, regs_info): New globals.
7803 (cris_regs_info): New function.
7804 (the_low_target): Adjust.
7805 (initialize_low_arch): New function.
7806 * linux-cris-low.c (tdesc_crisv32): Declare.
7807 (cris_arch_setup): New function.
7808 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7809 (cris_regs_info): New function.
7810 (the_low_target): Adjust.
7811 (initialize_low_arch): New function.
7812 * linux-m32r-low.c (tdesc_m32r): Declare.
7813 (m32r_arch_setup): New function.
7814 (m32r_usrregs_info, regs_info): New globals.
7815 (m32r_regs_info): Adjust.
7816 (initialize_low_arch): New function.
7817 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7818 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7819 (tic6x_usrregs_info): Forward declare.
7820 (tic6x_read_description): New function, based on ...
7821 (tic6x_arch_setup): ... this. Reimplement.
7822 (target_regsets): Rename to ...
7823 (tic6x_regsets): ... this, and make static.
7824 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7825 (tic6x_regs_info): New function.
7826 (the_low_target): Adjust.
7827 (initialize_low_arch): New function.
7828 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7829 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7830 (target_regsets): Rename to ...
7831 (xtensa_regsets): ... this, and make static.
7832 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7833 globals.
7834 (xtensa_arch_setup, xtensa_regs_info): New functions.
7835 (the_low_target): Adjust.
7836 (initialize_low_arch): New function.
7837 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7838 (nios2_arch_setup): Set the current process'es tdesc.
7839 (target_regsets): Rename to ...
7840 (nios2_regsets): ... this.
7841 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7842 (nios2_regs_info): New function.
7843 (the_low_target): Adjust.
7844 (initialize_low_arch): New function.
a261b8f5
PA
7845 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7846 (aarch64_arch_setup): Set the current process'es tdesc.
7847 (target_regsets): Rename to ...
7848 (aarch64_regsets): ... this.
7849 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7850 (aarch64_regs_info): New function.
7851 (the_low_target): Adjust.
7852 (initialize_low_arch): New function.
3aee8918
PA
7853 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7854 globals.
7855 (target_regsets): Rename to ...
7856 (tile_regsets): ... this.
7857 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7858 (tile_regs_info): New function.
7859 (tile_arch_setup): Set the current process'es tdesc.
7860 (the_low_target): Adjust.
7861 (initialize_low_arch): New function.
7862 * spu-low.c (tdesc_spu): Declare.
7863 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7864 * win32-arm-low.c (tdesc_arm): Declare.
7865 (arm_arch_setup): New function.
7866 (the_low_target): Install arm_arch_setup instead of
7867 init_registers_arm.
7868 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7869 (init_windows_x86): Rename to ...
7870 (i386_arch_setup): ... this. Set `win32_tdesc'.
7871 (the_low_target): Adjust.
7872 * win32-low.c (win32_tdesc): New global.
7873 (child_add_thread): Don't create the thread cache here.
7874 (do_initial_child_stuff): Set the new process'es tdesc.
7875 * win32-low.h (struct target_desc): Forward declare.
7876 (win32_tdesc): Declare.
7877 * lynx-i386-low.c (tdesc_i386): Declare global.
7878 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7879 * lynx-low.c (lynx_tdesc): New global.
7880 (lynx_add_process): Set the new process'es tdesc.
7881 * lynx-low.h (struct target_desc): Forward declare.
7882 (lynx_tdesc): Declare global.
7883 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7884 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7885 * nto-low.c (nto_tdesc): New global.
7886 (do_attach): Set the new process'es tdesc.
7887 * nto-low.h (struct target_desc): Forward declare.
7888 (nto_tdesc): Declare.
7889 * nto-x86-low.c (tdesc_i386): Declare.
7890 (nto_x86_arch_setup): Set `nto_tdesc'.
7891
b1fbec62
GB
78922013-06-04 Gary Benson <gbenson@redhat.com>
7893
7894 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7895 to qSupported response when appropriate.
7896 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7897 with nonzero-length annex.
7898 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7899 arguments supplied in annex.
7900
d1ec4ce7
DE
79012013-05-31 Doug Evans <dje@google.com>
7902
ac44adcb 7903 PR server/15594
d1ec4ce7
DE
7904 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7905 64 bits in 64-cross-32 environment.
7906
9b25f2d3
PA
79072013-05-28 Pedro Alves <palves@redhat.com>
7908
7909 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7910 (aarch64-without-fpu.c): Delete rule.
7911 * configure.srv (aarch64*-*-linux*): Remove references to
7912 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7913 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7914 declaration.
7915
6740dc9c
PA
79162013-05-24 Pedro Alves <palves@redhat.com>
7917
7918 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7919 instead of strchr/decode_address. Error if the range isn't split
7920 with a ','. Don't assume there's be a ':' in the action.
7921
c2d6af84
PA
79222013-05-23 Yao Qi <yao@codesourcery.com>
7923 Pedro Alves <palves@redhat.com>
7924
7925 * linux-low.c (lwp_in_step_range): New function.
7926 (linux_wait_1): If the thread was range stepping and stopped
7927 outside the stepping range, report the stop to GDB. Otherwise,
7928 continue stepping. Add range stepping debug output.
7929 (linux_set_resume_request): Copy the step range from the resume
7930 request to the lwp.
7931 (linux_supports_range_stepping): New.
7932 (linux_target_ops) <supports_range_stepping>: Set to
7933 linux_supports_range_stepping.
7934 * linux-low.h (struct linux_target_ops)
7935 <supports_range_stepping>: New field.
7936 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7937 * linux-x86-low.c (x86_supports_range_stepping): New.
7938 (the_low_target) <supports_range_stepping>: Set to
7939 x86_supports_range_stepping.
7940 * server.c (handle_v_cont): Handle 'r' action.
7941 (handle_v_requests): Append ";r" if the target supports range
7942 stepping.
7943 * target.h (struct thread_resume) <step_range_start,
7944 step_range_end>: New fields.
7945 (struct target_ops) <supports_range_stepping>:
7946 New field.
7947 (target_supports_range_stepping): New macro.
7948
58794e1a
JB
79492013-05-17 Joel Brobecker <brobecker@adacore.com>
7950
7951 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7952 confusion in comment.
7953
d631c5a7
JB
79542013-05-17 Joel Brobecker <brobecker@adacore.com>
7955
7956 * lynx-low.c (struct process_info_private): New type.
7957 (lynx_add_process): New function.
7958 (lynx_create_inferior, lynx_attach): Replace calls to
7959 add_process by calls to lynx_add_process.
7960 (lynx_resume): If PTID is null, then try using
7961 current_process()->private->last_wait_event_ptid.
7962 Add comments.
7963 (lynx_clear_inferiors): Delete. The contents of that function
7964 has been inlined in lynx_mourn;
7965 (lynx_wait_1): Save the ptid in the process's private data.
7966 (lynx_mourn): Free the process' private data. Replace call
7967 to lynx_clear_inferiors by call to clear_inferiors.
7968
96f7a20f
YQ
79692013-05-17 Yao Qi <yao@codesourcery.com>
7970
7971 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7972 the right place.
7973
db0dfaa0
LM
79742013-05-16 Luis Machado <lgustavo@codesourcery.com>
7975
7976 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7977 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7978 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7979 PT_TEXT_END_ADDR guards. Update comments.
7980 (linux_target_op) <read_offsets>: Conditionally define to
7981 linux_read_offsets if the target is UCLIBC and if it defines
7982 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7983
68f5f838
SL
79842013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7985 Andrew Jenner <andrew@codesourcery.com>
7986
7987 * Makefile.in (SFILES): Add linux-nios2-low.c.
7988 (clean): Add action to delete nios2-linux.c.
7989 (nios2-linux.c): New rule.
7990 * configure.srv: Add nios2*-*-linux*.
7991 * linux-nios2-low.c: New.
7992
1ebff1fd
HAQ
79932013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7994
7995 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7996
f6150862
HZ
79972013-04-25 Hui Zhu <hui@codesourcery.com>
7998
7999 PR gdb/15186
f6150862
HZ
8000 * ax.c (ax_printf): Add fflush.
8001
614c279d
TT
80022013-04-22 Tom Tromey <tromey@redhat.com>
8003
8004 * Makefile.in (SFILES): Add filestuff.c.
8005 (OBS): Add filestuff.o.
8006 (filestuff.o): New target.
8007 * config.in, configure: Rebuild.
8008 * configure.ac: Check for fdwalk, pipe2.
8009
7d4e5717
PA
80102013-04-17 Pedro Alves <palves@redhat.com>
8011
8012 * configure.ac (USE_THREAD_DB): Delete variable.
8013 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8014 Don't AC_SUBST USE_THREAD_DB.
8015 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8016 * config.in, configure: Regenerate.
8017
d5c93e41
PA
80182013-04-16 Pedro Alves <palves@redhat.com>
8019
8020 * linux-low.h (struct lwp_info) <thread_known>: Move under
8021 the USE_THREAD_DB #ifdef.
8022
04f5fe89
PA
80232013-04-16 Pedro Alves <palves@redhat.com>
8024
8025 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8026 (linux-low.o): Delete rule.
8027 * linux-low.h: Always include "gdb_thread_db.h" instead of
8028 conditionally including thread_db.h.
8029 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8030 HAVE_THREAD_DB_H.
8031
480b27bf
JK
80322013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8033
8034 * Makefile.in (install-only): Fix make install regression.
8035
43662968
JK
80362013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8037
8038 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8039 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8040 installation.
8041 * gdbserver.1: Remove.
8042
3e74e146
PA
80432013-03-22 Pedro Alves <palves@redhat.com>
8044
8045 * linux-low.c (handle_extended_wait): Don't call
8046 linux_enable_event_reporting.
8047
a8347a2a
TT
80482013-03-15 Tony Theodore <tonyt@logyst.com>
8049
8050 PR build/9098:
8051 * Makefile.in (SHELL): Use @SHELL@.
8052
eeb56fa7
SDJ
80532013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8054
8055 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8056 compiler warning.
8057
4fa7e2ff
JB
80582013-03-13 Joel Brobecker <brobecker@adacore.com>
8059
8060 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8061 Remove extraneous NULL element.
8062
8ddb1965
YQ
80632013-03-13 Yao Qi <yao@codesourcery.com>
8064
8065 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8066 'V' block in trace frame.
8067
9accd112
MM
80682013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8069
8070 * target.h (struct target_ops): Add btrace ops.
8071 (target_supports_btrace): New macro.
8072 (target_enable_btrace): New macro.
8073 (target_disable_btrace): New macro.
8074 (target_read_btrace): New macro.
8075 * gdbthread.h (struct thread_info): Add btrace field.
8076 * server.c: Include btrace-common.h.
8077 (handle_btrace_general_set): New function.
8078 (handle_btrace_enable): New function.
8079 (handle_btrace_disable): New function.
8080 (handle_general_set): Call handle_btrace_general_set.
8081 (handle_qxfer_btrace): New function.
8082 (struct qxfer qxfer_packets[]): Add btrace entry.
8083 * inferiors.c (remove_thread): Disable btrace.
8084 * linux-low: Include linux-btrace.h.
8085 (linux_low_enable_btrace): New function.
8086 (linux_low_read_btrace): New function.
8087 (linux_target_ops): Add btrace ops.
8088 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8089 Add srv_linux_btrace=yes.
8090 (x86_64-*-linux*): Add linux-btrace.o.
8091 Add srv_linux_btrace=yes.
8092 * configure.ac: Define HAVE_LINUX_BTRACE.
8093 * config.in: Regenerated.
8094 * configure: Regenerated.
8095
5cc22e4c
MM
80962013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8097
8098 * server.c (handle_qxfer): Preserve error message if -3 is
8099 returned.
8100 (qxfer): Document the -3 return value.
8101
7c97f91e
MM
81022013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8103
8104 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8105 (linux_btrace_h): New variable.
8106 (linux-btrace.o): New rule.
8107
be9a119c 81082013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
8109 Hafiz Abid Qadeer <abidh@codesourcery.com>
8110
8111 * tracepoint.c (trace_buffer_size): New global.
8112 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8113 (init_trace_buffer): Change to one-argument function. Allocate
8114 trace buffer memory.
8115 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8116 handle QTBuffer:size packet.
8117 (cmd_bigqtbuffer_size): New function.
8118 (initialize_tracepoint): Call init_trace_buffer with
8119 DEFAULT_TRACE_BUFFER_SIZE.
8120 * server.c (handle_query): Add QTBuffer:size in the
8121 supported packets.
8122
e64f7499
YQ
81232013-03-07 Yao Qi <yao@codesourcery.com>
8124
8125 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8126 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8127 of -1.
8128 (cmd_qtsp): Adjust condition. Do post increment.
8129 Set cur_action and cur_step_action back to 0.
8130
f0ae6fc3
PA
81312013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8132
8133 PR server/15236
8134 * linux-low.c (linux_write_memory): Return early success if LEN is
8135 zero.
8136
b5b0b0af
CV
81372013-03-05 Corinna Vinschen <vinschen@redhat.de>
8138
334ad4a8 8139 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 8140
589bc927
TT
81412013-02-28 Tom Tromey <tromey@redhat.com>
8142
8143 * configure.ac: Invoke AC_SYS_LARGEFILE.
8144 * configure, config.in: Rebuild.
8145
dfe07582
CV
81462013-02-28 Corinna Vinschen <vinschen@redhat.com>
8147
8148 * win32-low.c: Throughout, fix format strings and casts of
8149 printf-like functions to avoid type related warnings on all
8150 platforms.
8151 (get_child_debug_event): Print dwDebugEventCode as hex since
8152 that's how it's usually documented.
8153
736cd585
YQ
81542013-02-28 Yao Qi <yao@codesourcery.com>
8155
8156 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8157 pulongest.
8158
e1f58301
JW
81592013-02-27 Jiong Wang <jiwang@tilera.com>
8160
8161 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8162 (reg-tilegx32.c): New rule.
8163 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8164 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8165 different register info initializer according to elf class.
8166 (init_registers_tilgx32): New function. The tilegx32 register info
8167 initializer.
8168 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8169 (tile_store_gregset): Likewise.
8170
d171ca78
YQ
81712013-02-27 Yao Qi <yao@codesourcery.com>
8172
8173 * server.c (process_point_options): Print debug message when
8174 debug_threads is true.
8175
282bbdf3
YQ
81762013-02-26 Yao Qi <yao@codesourcery.com>
8177
8178 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8179
aca22551
PA
81802013-02-19 Pedro Alves <palves@redhat.com>
8181 Kai Tietz <ktietz@redhat.com>
8182
8183 PR gdb/15161
8184
8185 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8186 instead of strtoul to extract address from packet.
8187 (process_serial_event) <'z'>: Likewise.
8188
4f3cee1c
YQ
81892013-02-18 Yao Qi <yao@codesourcery.com>
8190
8191 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8192
8e1d55a3
PA
81932013-02-14 Pedro Alves <palves@redhat.com>
8194
8195 Plug memory leak.
8196
8197 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8198 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8199
458820da
PA
82002013-02-14 Pedro Alves <palves@redhat.com>
8201
8202 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8203
baea0dae
PA
82042013-02-14 Pedro Alves <palves@redhat.com>
8205
8206 * tracepoint.c (save_string): Delete.
8207 (add_tracepoint_action): Use savestring instead of save_string.
8208
0b1afbb3
PA
82092013-02-12 Pedro Alves <palves@redhat.com>
8210
8211 * linux-xtensa-low.c: Ditto.
8212 * xtensa-xtregs.c: Ditto.
8213
8a4ac37e
PA
82142013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8215
8216 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8217 thread_db.
8218
148de6bb
MS
82192013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8220
8221 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8222 aarch64_num_wp_regs and aarch64_num_bp_regs to
8223 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8224
55fac6e0
MS
82252013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8226
8227 * linux-aarch64-low.c (ps_get_thread_area): Replace
8228 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8229
176eb98c
MS
82302013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8231 Marcus Shawcroft <marcus.shawcroft@arm.com>
8232 Nigel Stephens <nigel.stephens@arm.com>
8233 Yufeng Zhang <yufeng.zhang@arm.com>
8234
8235 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8236 (aarch64.c, aarch64-without-fpu.c): New targets.
8237 * configure.srv (aarch64*-*-linux*): New.
8238 * linux-aarch64-low.c: New file.
8239
56f7af9c
MS
82402013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8241
43aaf8b6 8242 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
8243 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8244 (dequeue_one_deferred_signal, linux_resume_one_thread)
8245 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8246 (linux_tracefork_grandchild, linux_test_for_tracefork)
8247 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8248 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8249 where the argument is 0.
8250
60f662b0
YQ
82512013-01-25 Yao Qi <yao@codesourcery.com>
8252
8253 * event-loop.c: Include "queue.h".
8254 (gdb_event_p): New typedef.
8255 (struct gdb_event) <next_event>: Remove.
8256 (event_queue): Change to QUEUE(gdb_event_p).
8257 (async_queue_event): Remove.
8258 (gdb_event_xfree): New.
8259 (initialize_event_loop): New.
8260 (process_event): Use API from QUEUE.
8261 (wait_for_event): Likewise.
8262 * server.c (main): Call initialize_event_loop.
8263 * server.h (initialize_event_loop): Declare.
8264
5ae4861a
YQ
82652013-01-18 Yao Qi <yao@codesourcery.com>
8266
8267 * ax.h (struct eval_agent_expr_context): New.
8268 (gdb_eval_agent_expr): Update declaration.
8269 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8270 TFRAME. Add new argument CTX.
8271 * server.h (struct eval_agent_expr_context): Declare.
8272 (agent_mem_read, agent_tsv_read): Update declaration.
8273 (agent_mem_read_string): Likewise.
8274 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8275 (add_traceframe_block): Add new argument TPOINT.
8276 Increase TPOINT->traceframe_usage.
8277 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8278 eval_tracepoint_agent_expr.
8279 (condition_true_at_tracepoint): Likewise.
8280 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8281 (agent_mem_read_string, agent_tsv_read): Likewise.
8282
85e00e85
YQ
82832013-01-16 Yao Qi <yao@codesourcery.com>
8284
8285 * linux-low.c (linux_resume_one_lwp): Don't check
8286 'lwp->bp_reinsert != 0'.
8287
4039cf45
JB
82882013-01-07 Joel Brobecker <brobecker@adacore.com>
8289 Pedro Alves <palves@redhat.com>
8290
8291 * lynx-low.c (ptrace_request_to_str): Define a temporary
8292 macro and use it to simplify this function's implementation.
8293
9044dee2
JB
82942013-01-07 Joel Brobecker <brobecker@adacore.com>
8295
8296 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8297 sets errno.
8298
e6352c8f
JB
82992013-01-07 Joel Brobecker <brobecker@adacore.com>
8300
8301 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8302
50681a27
JB
83032013-01-07 Joel Brobecker <brobecker@adacore.com>
8304
8305 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8306
3f6e77ef
JB
83072013-01-07 Joel Brobecker <brobecker@adacore.com>
8308
8309 * lynx-low.c (lynx_resume): Use the resume_info parameter
8310 to determine the ptid for the lynx_ptrace call, unless
8311 it is equal to minus_one_ptid, in which case we use the
8312 ptid of the current_inferior.
8313 (lynx_wait_1): After having received a thread create/exit
8314 event, resume the inferior's execution using the signaling
8315 thread's ptid, rather than the old ptid.
8316
7fda33ae
JB
83172013-01-07 Joel Brobecker <brobecker@adacore.com>
8318
8319 * lynx-low.c (lynx_resume): Delete variable ret.
8320
b9786c74
JB
83212013-01-01 Joel Brobecker <brobecker@adacore.com>
8322
8323 * gdbreplay.c (gdbreplay_version): Update copyright year.
8324 * server.c (gdbserver_version): Likewise.
8325
8b93d60f
JB
83262012-12-17 Joel Brobecker <brobecker@adacore.com>
8327
8328 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8329 new thread.
8330
037335a7
JB
83312012-12-17 Joel Brobecker <brobecker@adacore.com>
8332
8333 * lynx-low.c (ptrace_request_to_str): Add handling for
8334 PTRACE_GETTRACESIG.
8335
52d4cbd8
JB
83362012-12-17 Joel Brobecker <brobecker@adacore.com>
8337
8338 * lynx-low.c (lynx_attach): Delete variable new_process.
8339
ab8f6ca9
JB
83402012-12-17 Joel Brobecker <brobecker@adacore.com>
8341
8342 * lynx-low.c (lynx_create_inferior): Delete variable
8343 new_process.
8344
78cbc024
JB
83452012-12-17 Joel Brobecker <brobecker@adacore.com>
8346
8347 * lynx-low.c (ptrace_request_to_str): Do not handle
8348 PTRACE_GETTHREADLIST if this macro does not exist.
8349
14a00470
YQ
83502012-12-15 Yao Qi <yao@codesourcery.com>
8351
8352 * Makefile.in (OBS): Add notif.o.
8353 * notif.c, notif.h: New.
8354 * server.c: Include "notif.h".
8355 (struct vstop_notif) <next>: Remove.
8356 <base>: New field.
8357 (queue_stop_reply): Update.
8358 (push_event, send_next_stop_reply): Remove.
8359 (discard_queued_stop_replies): Update.
8360 (notif_stop): New variable.
8361 (handle_v_stopped): Remove.
8362 (handle_v_requests): Don't call handle_v_stopped. Call
8363 handle_ack_notif instead.
8364 (queue_stop_reply_callback): Call notif_event_enque instead
8365 of queue_stop_reply.
8366 (handle_status): Don't call send_next_stop_reply, call
8367 notif_write_event instead.
8368 (kill_inferior_callback): Likewise.
8369 (detach_or_kill_inferior_callback): Likewise.
8370 (main): Call initialize_notif.
8371 (process_serial_event): Call QUEUE_is_empty.
8372 (handle_target_event): Call notif_push instead of push event.
8373 * server.h (push_event): Remove declaration.
8374
61c125b9
TT
83752012-12-10 Tom Tromey <tromey@redhat.com>
8376
8377 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8378 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8379 macros.
8380 (.c.o): Rewrite.
8381 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8382 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8383 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8384 (amd64-linux-ipa.o, ax.o): Rewrite.
8385 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8386 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8387 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8388 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8389 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8390 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8391 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8392 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8393 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8394 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8395 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8396 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8397 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8398 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8399 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8400 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8401 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8402 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8403 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8404 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8405 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8406 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8407 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8408 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8409 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8410 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8411 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8412 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8413 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8414 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8415 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8416 (reg-tilegx.o): Remove.
8417 (all_object_files): New macro.
8418 Include .deps files.
8419 * aclocal.m4, configure: Rebuild.
8420 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8421 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8422 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8423
e90e9ad9
TT
84242012-12-05 Tom Tromey <tromey@redhat.com>
8425
8426 PR gdb/14917:
8427 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8428
02d403bf 84292012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
8430
8431 * configure.ac: Check for linux/perf_event.h.
8432 * config.in: Regenerated.
8433 * configure: Regenerated.
8434
0270a750
PA
84352012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8436
8437 * hostio.c (handle_readlink): Decrease buffer size
8438 parameter passed to readlink by one byte.
8439
8c29b58e
YQ
84402012-11-26 Yao Qi <yao@codesourcery.com>
8441
8442 * configure.ac (build_warnings): Append '-Wempty-body'.
8443 * configure: Regenerated.
8444 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8445 body.
8446
8bdce1ff
PM
84472012-11-15 Pierre Muller <muller@sourceware.org>
8448
8449 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8450 * config.in: Regenerate.
8451 * configure: Regenerate.
8452 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8453 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8454 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8455 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8456 header.
8457 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8458 instead of <sys/wait.h> header.
8459 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8460
02d403bf 84612012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
8462
8463 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8464 (various make rules): Remove -DGDBSERVER
8465
fbd5db48
YQ
84662012-11-09 Yao Qi <yao@codesourcery.com>
8467
8468 * spu-low.c (current_ptid): Move it to ..
8469 * gdbthread.h: ... here. New.
8470 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8471 * server.c (myresume, process_serial_event): Likewise.
8472 * thread-db.c (thread_db_find_new_threads): Likewise.
8473 * tracepoint.c (run_inferior_command): Likewise.
8474
b3dc46ff
AB
84752012-10-01 Andrew Burgess <aburgess@broadcom.com>
8476
8477 * server.c (handle_search_memory_1): Include access length in
8478 warning message.
8479
07c04788
HPN
84802012-09-05 Michael Brandt <michael.brandt@axis.com>
8481
8482 * linux-crisv32-low.c: Fix compile errors.
8483
918d227b
YQ
84842012-09-04 Yao Qi <yao@codesourcery.com>
8485
8486 * tracepoint.c (cmd_qtsv): Adjust debug message.
8487 Don't check CUR_TPOINT.
8488
18c1b81a
YQ
84892012-08-28 Yao Qi <yao@codesourcery.com>
8490
8491 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8492 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8493 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8494 Remove declarations of xmalloc, xreallloc, xstrdup and
8495 freeargv.
8496 * Makefile.in (libiberty_h): New.
8497 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8498 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8499
dc82f37b
YQ
85002012-08-23 Yao Qi <yao@codesourcery.com>
8501
8502 * server.h: Remove declaration of 'xsnprintf'.
8503
406b1477
KS
85042012-08-22 Keith Seitz <keiths@redhat.com>
8505
8506 * server.h: Include build-gnulib-gbserver/config.h.
8507 * gdbreplay.c: Likewise.
8508
e6712ff1
DE
85092012-08-08 Doug Evans <dje@google.com>
8510
8511 * Makefile.in (SFILES): Add gdb_vecs.c.
8512 (OBS): Add gdb_vecs.o.
8513 (gdb_vecs_h, host_defs_h): New variables.
8514 (thread-db.o): Add $(gdb_vecs_h) dependency.
8515 (gdb_vecs.o): New rule.
8516 * thread-db.c: #include "gdb_vecs.h".
8517 (thread_db_load_search): Use a vector to iterate over path elements.
8518 Handle text appearing after "$pdir".
8519
8520 * configure.ac: Add check for strstr.
8521 * config.in: Regenerate.
8522 * configure: Regenerate.
8523
7c3270ae
UW
85242012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8525
8526 * hostio.c (handle_pread): If pread fails, fall back to attempting
8527 lseek/read.
8528 (handle_pwrite): Likewise for pwrite.
8529
b62e2b27
UW
85302012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8531
8532 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8533 between unsupported TYPE and unimplementable ADDR/LEN combination.
8534 (arm_insert_point): Act on new return value.
8535
78a99e91
PA
85362012-07-31 Pedro Alves <palves@redhat.com>
8537
8538 * server.c (process_point_options): Only skip tokens if we find
8539 one that is unrecognized. Don't treat 'X' specially while
8540 skipping unrecognized tokens.
8541
fcf303ab
UW
85422012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8543
8544 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8545 to 4-byte-align HW breakpoint addresses for Thumb.
8546
7255706c
YQ
85472012-07-27 Yao Qi <yao@codesourcery.com>
8548
8549 PR remote/14161.
8550
8551 * server.h: Declare gdb_agent_about_to_close.
8552 * target.c (kill_inferior): Include "agent.h".
8553 New. Send command 'kill'.
8554 * target.h (kill_inferior): Removed macro.
8555 * tracepoint.c (gdb_agent_about_to_close): New.
8556 (gdb_agent_helper_thread): Handle command 'close'.
8557 Wait endlessly until the inferior stops.
8558 Install gdb_agent_remove_socket to atexit hook.
8559 (agent_socket_name): New static variable.
8560 (gdb_agent_socket_init): Replace local variable 'name' with
8561 'agent_socket_name'.
8562 (gdb_agent_remove_socket): New.
8563
5a3f286f
YQ
85642012-07-27 Yao Qi <yao@codesourcery.com>
8565
8566 * server.c (process_point_options): Stop at 'X' when parsing.
8567
961bd387
ME
85682012-07-19 Michael Eager <eager@eagercon.com>
8569
a261b8f5 8570 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
8571 to hw_execute.
8572 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8573 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8574 hardware breakpoint.
8575
aa7c7447
JK
85762012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8577
8578 * gdbserver/linux-low.c (initialize_low): Call
8579 linux_ptrace_init_warnings.
8580
7f216e7c
DE
85812012-07-02 Doug Evans <dje@google.com>
8582
8583 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8584 pointer to int.
8585
d3ce09f5
SS
85862012-07-02 Stan Shebs <stan@codesourcery.com>
8587
8588 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8589 (ax.o): Add it to build rule.
8590 (ax-ipa.o): Ditto.
8591 (OBS): Add format.o.
8592 (IPA_OBS): Add format.o.
8593 * server.c (handle_query): Claim support for breakpoint commands.
8594 (process_point_options): Add command case.
8595 (process_serial_event): Leave running if there are printfs in
8596 effect.
8597 * mem-break.h (any_persistent_commands): Declare.
8598 (add_breakpoint_commands): Declare.
8599 (gdb_no_commands_at_breakpoint): Declare.
8600 (run_breakpoint_commands): Declare.
8601 * mem-break.c (struct point_command_list): New struct.
8602 (struct breakpoint): New field command_list.
8603 (any_persistent_commands): New function.
8604 (add_commands_to_breakpoint): New function.
8605 (add_breakpoint_commands): New function.
8606 (gdb_no_commands_at_breakpoint): New function.
8607 (run_breakpoint_commands): New function.
8608 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8609 locally.
8610 * ax.c: Include format.h.
8611 (ax_printf): New function.
8612 (gdb_eval_agent_expr): Add printf opcode.
8613
2f8f6aed
YQ
86142012-06-13 Yao Qi <yao@codesourcery.com>
8615
8616 * server.c (start_inferior): Remove duplicated writes to fields
8617 'last_resume_kind' and 'last_status' of 'current_inferior'.
8618
0c9070b3
YQ
86192012-06-12 Yao Qi <yao@codesourcery.com>
8620 Pedro Alves <palves@redhat.com>
8621
8622 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8623 comment.
8624 * server.c (handle_v_cont): Extend comment.
8625
c52daf70
YQ
86262012-06-11 Yao Qi <yao@codesourcery.com>
8627
8628 * linux-low.c (linux_attach): Add 'static'.
8629
d38bbb0a
YQ
86302012-06-06 Yao Qi <yao@codesourcery.com>
8631
8632 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8633
89dc0afd
JK
86342012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8635
8636 Fix gcc -flto compilation warning.
8637 * server.c (main): Make variable multi_mode and attach volatile.
8638
75f62ce7
TJB
86392012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8640
8641 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8642 if the platform doesn't know about it.
8643
65f479b6
PA
86442012-05-30 Jeff Kenton <jkenton@tilera.com>
8645
8646 * Makefile.in (SFILES): Add linux-tile-low.c.
8647 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8648 * configure.srv: Handle tilegx-*-linux*.
8649 * linux-tile-low.c: New file.
8650
0c5bf5a9
JK
86512012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8652
8653 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8654
a493e3e2
PA
86552012-05-24 Pedro Alves <palves@redhat.com>
8656
8657 PR gdb/7205
8658
43aaf8b6 8659 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 8660
2ea28649
PA
86612012-05-24 Pedro Alves <palves@redhat.com>
8662
8663 PR gdb/7205
8664
8665 Replace target_signal with gdb_signal throughout.
8666
8d409d16
MR
86672012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8668
8669 * linux-low.c (linux_store_registers): Avoid the copying sequence
8670 when no data has been retrieved by ptrace.
8671
23512c01
MGD
86722012-05-22 Will Deacon <will.deacon@arm.com>
8673
8674 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8675 Include asm/ptrace.h.
8676 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8677 already defined.
8678
4934b29e
MR
86792012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8680
8681 * linux-low.c (linux_store_registers): Don't re-retrieve data
8682 with ptrace that has already been obtained from /proc. Always
8683 copy any data retrieved with ptrace to the buffer supplied.
8684
bde24c0a
PA
86852012-05-11 Yao Qi <yao@codesourcery.com>
8686 Pedro Alves <palves@redhat.com>
8687
8688 * linux-low.c (enum stopping_threads_kind): New.
8689 (stopping_threads): Change type to `enum stopping_threads_kind'.
8690 (handle_extended_wait): If stopping and suspending threads, leave
8691 the new_lwp suspended too.
8692 (linux_wait_for_event): Adjust.
8693 (stop_all_lwps): Set `stopping_threads' to
8694 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8695 whether we're suspending threads or just stopping them. Assert no
8696 recursion happens.
8697
623b6bdf
YQ
86982012-04-29 Yao Qi <yao@codesourcery.com>
8699
8700 * server.h: Move some code to ...
8701 * gdbthread.h: ... here. New.
8702 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8703 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8704 (nto-low.o, win32-low.o): Likewise.
8705 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8706 * regcache.c, remote-utils.c, server.c: Likewise.
8707 * target.c, tracepoint.c, win32-low.c: Likewise.
8708
f15f9948
TJB
87092012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8710
8711 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8712 (PTRACE_ARG4_TYPE): Likewise.
8713 (PTRACE_XFER_TYPE): Likewise.
8714 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8715 ptrace to PTRACE_ARG3_TYPE.
8716 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8717 (PTRACE_ARG4_TYPE): Likewise.
8718 (PTRACE_XFER_TYPE): Likewise.
8719 (linux_detach_one_lwp): Cast fourth argument of
8720 ptrace to long then PTRACE_ARG4_TYPE.
8721 (regsets_fetch_inferior_registers): Cast third argument of
8722 ptrace to long then PTRACE_ARG3_TYPE.
8723 (regsets_store_inferior_registers): Likewise.
8724
38ea300a
PA
87252012-04-20 Pedro Alves <palves@redhat.com>
8726
8727 * configure: Regenerate.
8728
c971b7fa
PA
87292012-04-19 Pedro Alves <palves@redhat.com>
8730
43aaf8b6 8731 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 8732 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
8733 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8734 (all, install-only, uninstall, clean-info, all-lib, clean): No
8735 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8736 (maintainer-clean realclean distclean): Use subdir_do.
8737 (subdir_do): New.
8738 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 8739 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
8740 * acinclude.m4: Include acx_configure_dir.m4.
8741 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8742 calls. Call AC_PROG_RANLIB. Configure gnulib using
8743 ACX_CONFIGURE_DIR.
8744 (GNULIB): New.
8745 (GNULIB_STDINT_H): Adjust.
8746 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8747 * gdbreplay.c: Include build-gnulib/config.h.
8748 * server.h: Likewise.
8749 * aclocal.m4: Regenerate.
8750 * config.in: Regenerate.
8751 * configure: Regenerate.
c971b7fa 8752
809277f8
PA
87532012-04-19 Pedro Alves <palves@redhat.com>
8754
8755 * Makefile.in (LIBGNU, INCGNU): Adjust.
8756 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8757 (all, install-only, uninstall, clean-info, all-lib, clean)
8758 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8759 * configure.ac: Adjust AC_OUTPUT output.
8760 * aclocal.m4: Regenerate.
8761 * configure: Regenerate.
8762
fd9bb8b8
PA
87632012-04-19 Pedro Alves <palves@redhat.com>
8764
8765 * Makefile.in (generated_files): New.
8766 (server_h): Remove the explicit dependency on config.h, and depend
8767 on $generated_files.
8768
1c298c66
PA
87692012-04-19 Pedro Alves <palves@redhat.com>
8770
8771 * Makefile.in (INCGNU): Add -Ignulib.
8772
57c4b50b
PA
87732012-04-19 Pedro Alves <palves@redhat.com>
8774
8775 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8776 (INCGNU): ... this, and spell out -I here.
8777 (GNULIB_LIB): Rename to ...
8778 (LIBGNU): ... this.
8779 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8780
1030e047
PA
87812012-04-19 Pedro Alves <palves@redhat.com>
8782
8783 * config.in: Regenerate.
8784
447d4319
PA
87852012-04-19 Pedro Alves <palves@redhat.com>
8786
8787 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8788 * server.h (memmem): Remove declaration.
8789 * config.in: Regenerate.
8790 * configure: Regenerate.
8791
aad9eab9
YQ
87922012-04-19 Yao Qi <yao@codesourcery.com>
8793
8794 * Makefile.in (SFILES): Add common/vec.c.
8795 (OBS): Add vec.o.
8796 (vec.o): New rule.
8797
3e10640f
YQ
87982012-04-19 Yao Qi <yao@codesourcery.com>
8799
8800 * remote-utils.c (prepare_resume_reply): Replace with macro
8801 target_core_of_thread.
8802 * server.c (handle_qxfer_threads_proper): Likewise.
8803 * target.h (traget_core_of_thread): New macro.
8804
71622373
PA
88052012-04-18 Pedro Alves <palves@redhat.com>
8806
8807 * aclocal.m4: Regenerate.
8808 * configure: Regenerate.
8809
80d26939
YQ
88102012-04-16 Yao Qi <yao@codesourcery.com>
8811
8812 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8813 duplicated on address.
8814
42476b70
YQ
88152012-04-16 Yao Qi <yao@codesourcery.com>
8816
8817 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8818 (struct tracepoint_action_ops) <send>: New field.
8819 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8820 (agent_expr_send, x_tracepoint_action_send): New.
8821 (l_tracepoint_action_send): New.
8822 (cmd_qtdp): Download and install tracepoint
8823 according to `use_agent'.
8824 (run_inferior_command): Add one more parameter `len'.
8825 Update callers.
8826 (tracepoint_send_agent): New.
8827 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8828
7bc83639
YQ
88292012-04-16 Yao Qi <yao@codesourcery.com>
8830
8831 * tracepoint.c (download_tracepoints): Moved to ...
8832 (cmd_qtstart): ... here.
8833
5f18041e
YQ
88342012-04-14 Yao Qi <yao@codesourcery.com>
8835
8836 * tracepoint.c: Include inttypes.h.
8837 (struct collect_memory_action): Use sized types.
8838 (struct tracepoint): Likewise.
8839 (cmd_qtdp, stop_tracing): Update print specifiers.
8840 (cmd_qtp, response_tracepoint): Likewise.
8841 (collect_data_at_tracepoint): Likewise.
8842 (collect_data_at_step): Likewise.
8843
55a8c076
YQ
88442012-04-14 Yao Qi <yao@codesourcery.com>
8845
8846 Import gnulib module inttypes.
8847 * aclocal.m4, config.in, configure: Regenerated.
8848
dc750257
YQ
88492012-04-14 Yao Qi <yao@codesourcery.com>
8850
8851 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8852 Makefile and config.status at last.
8853
0ab5faf9
YQ
88542012-04-13 Yao Qi <yao@codesourcery.com>
8855
8856 * tracepoint.c: Include stdint.h unconditionally.
8857
18f5fd81
TJB
88582012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8859
8860 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8861 on BFD_HAVE_SYS_PROCFS_TYPE.
8862 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8863 * configure: Regenerate.
8864 * config.in: Likewise.
8865
4d47af5c
L
88662012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8867
8868 * Makefile.in (clean): Also remove x32.c x32-linux.c
8869 x32-avx.c x32-avx-linux.c.
8870 (x32.o): New target.
8871 (x32.c): Likewise.
8872 (x32-linux.o): Likewise.
8873 (x32-linux.c): Likewise.
8874 (x32-avx.o): Likewise.
8875 (x32-avx.c): Likewise.
8876 (x32-avx-linux.o): Likewise.
8877 (x32-avx-linux.c): Likewise.
8878
8879 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8880 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8881 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8882 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8883 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8884 i386/x32-avx-linux.xml.
8885
8886 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8887 (init_registers_x32_avx_linux): Likwise.
8888 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8889 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8890
ecedbe58
PA
88912012-04-13 Pedro Alves <palves@redhat.com>
8892
8893 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8894 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8895 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8896 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8897 the sub-make.
8898
c92b5177
L
88992012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8900
8901 * linux-x86-low.c (compat_x32_clock_t): New.
8902 (compat_x32_siginfo_t): Likewise.
8903 (compat_x32_siginfo_from_siginfo): Likewise.
8904 (siginfo_from_compat_x32_siginfo): Likewise.
8905 (linux_is_elf64): Likewise.
8906 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8907 and siginfo_from_compat_x32_siginfo for x32.
8908 (x86_arch_setup): Set linux_is_elf64.
8909
214d508e
L
89102012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8911
8912 PR gdb/13969
8913 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8914 e_machine field.
8915 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8916 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8917 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8918 compatible with process.
8919
c9a1864a
YQ
89202012-04-12 Yao Qi <yao@codesourcery.com>
8921
8922 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8923 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8924 (install-only, install-info, clean): Handle sub dir gnulib.
8925 (all-lib, am--refresh): New targets.
8926 (memmem.o): Remove target.
8927 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8928 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8929 (AC_REPLACE_FUNCS): Remove memmem.
8930 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8931 (AC_OUTPUT): Generate Makefile in gnulib/.
8932 * aclocal.m4, config.in, configure: Regenerated.
8933
367ba2c2
MR
89342012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8935
8936 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8937
9d236627
PA
89382012-04-05 Pedro Alves <palves@redhat.com>
8939
8940 -Werror=strict-aliasing
8941
8942 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8943 pointer.
8944
111217b3
PA
89452012-04-04 Pedro Alves <palves@redhat.com>
8946
8947 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8948 (sparc_store_gregset_from_stack, sparc_store_gregset)
8949 (sparc_breakpoint_at): Fix formatting.
8950
8365dcf5
TJB
89512012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8952
8953 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8954 are available.
8955 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8956 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8957 * config.in: Regenerate.
8958 * configure: Likewise.
8959
689cc2ae
PA
89602012-03-29 Pedro Alves <palves@redhat.com>
8961
8962 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8963 Correct ptrace arguments.
8964
c14dfd32
PA
89652012-03-28 Pedro Alves <palves@redhat.com>
8966
8967 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8968 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8969 (IA64_FR1_REGNUM): New defines.
8970 (ia64_fetch_register): New.
8971 (the_low_target): Install it.
8972 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8973 field.
8974 * linux-low.c (linux_fetch_registers): Try the
8975 the_low_target.fetch_register hook first.
8976
8977 * linux-arm-low.c (the_low_target): Adjust.
8978 * linux-bfin-low.c (the_low_target): Adjust.
8979 * linux-cris-low.c (the_low_target): Adjust.
8980 * linux-crisv32-low.c (the_low_target): Adjust.
8981 * linux-m32r-low.c (the_low_target): Adjust.
8982 * linux-m68k-low.c (the_low_target): Adjust.
8983 * linux-mips-low.c (the_low_target): Adjust.
8984 * linux-ppc-low.c (the_low_target): Adjust.
8985 * linux-s390-low.c (the_low_target): Adjust.
8986 * linux-sh-low.c (the_low_target): Adjust.
8987 * linux-sparc-low.c (the_low_target): Adjust.
8988 * linux-tic6x-low.c (the_low_target): Adjust.
8989 * linux-x86-low.c (the_low_target): Adjust.
8990 * linux-xtensa-low.c (the_low_target): Adjust.
8991
63c88e13
PA
89922012-03-26 Pedro Alves <palves@redhat.com>
8993
8994 * server.c (handle_qxfer_libraries): Don't bail early if
8995 the_target->qxfer_libraries_svr4 is not NULL.
8996
fb723180
PA
89972012-03-26 Pedro Alves <palves@redhat.com>
8998
8999 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9000
0afae3cf
PA
90012012-03-23 Pedro Alves <palves@redhat.com>
9002
9003 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9004 "library-list-svr4" element's start tag when the the DSO list is
9005 empty.
9006
485f1ee4
PA
90072012-03-23 Pedro Alves <palves@redhat.com>
9008
9009 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9010 a variable whose type size is the same as the inferior's pointer
9011 size.
9012
a5362b9a
TS
90132012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9014
9015 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9016 struct siginfo.
9017 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9018 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9019 * linux-low.h: Include <signal.h>.
9020 (struct siginfo): Remove forward declaration.
9021 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9022 struct siginfo.
9023
d226c142
MF
90242012-03-21 Mike Frysinger <vapier@gentoo.org>
9025
9026 * .gitignore: Ignore more files.
9027
122f36ef
PA
90282012-03-19 Pedro Alves <palves@redhat.com>
9029 Jan Kratochvil <jan.kratochvil@redhat.com>
9030
9031 * server.c (cont_thread, general_thread): Add describing comments.
9032 (start_inferior): Clear `cont_thread'.
9033 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9034 of a process.
9035
fc3e5175
YQ
90362012-03-15 Yao Qi <yao@codesourcery.com>
9037
9038 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9039 handling to ...
9040 (cmd_qtdp): ... here.
9041
8d0d92cd
YQ
90422012-03-15 Yao Qi <yao@codesourcery.com>
9043
9044 * tracepoint.c (struct tracepoint_action_ops): New.
9045 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9046 (m_tracepoint_action_download): New.
9047 (r_tracepoint_action_download): New.
9048 (x_tracepoint_action_download): New.
9049 (l_tracepoint_action_download): New.
9050 (add_tracepoint_action): Install `action->ops' according type.
9051 (download_tracepoint_1): Move code `download' function pointer
9052 of various tracepoint_action_ops.
9053
87b0bb13
JK
90542012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9055
9056 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9057 linux_ptrace_attach_warnings.
9058
5f572dec
JK
90592012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9060
9061 * Makefile.in (linux-ptrace.o): New.
9062 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9063 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9064 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9065 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9066 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9067 of these targets.
9068 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9069
f4647387
YQ
90702012-03-08 Yao Qi <yao@codesourcery.com>
9071 Pedro Alves <palves@redhat.com>
9072
9073 Fix PR server/13392.
9074 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9075 offset of JMP insn.
9076 * tracepoint.c (remove_tracepoint): New.
9077 (cmd_qtdp): Call remove_tracepoint when failed to install.
9078
9b224c5e
PA
90792012-03-07 Pedro Alves <palves@redhat.com>
9080
9081 * linux-low.c (get_detach_signal): New.
9082 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9083 Pass on pending signals to PTRACE_DETACH. Check the result of the
9084 ptrace call.
9085 * server.c (program_signals, program_signals_p): New.
9086 (handle_general_set): Handle QProgramSignals.
9087 * server.h (program_signals, program_signals_p): Declare.
9088
e237a7e2
JK
90892012-03-05 Pedro Alves <palves@redhat.com>
9090 Jan Kratochvil <jan.kratochvil@redhat.com>
9091
9092 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9093 New comment why.
9094
5808517f
YQ
90952012-03-03 Yao Qi <yao@codesourcery.com>
9096
9097 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9098 agent_look_up_symbols.
9099
58b4daa5
YQ
91002012-03-03 Yao Qi <yao@codesourcery.com>
9101
9102 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9103 (linux-x86-low.o): Likewise.
9104 * server.h: Remove in_process_agent_loaded.
9105 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9106 common/agent.c.
9107 Update callers.
9108
8ffcbaaf
YQ
91092012-03-03 Yao Qi <yao@codesourcery.com>
9110
9111 * tracepoint.c (gdb_agent_capability): New global.
9112 (in_process_agent_loaded_ust): Renamed to
9113 `in_process_agent_supports_ust'.
9114 Update callers.
9115 (in_process_agent_supports_ust): Call agent_capability_check.
9116 (clear_installed_tracepoints): Assert that agent supports
9117 agent.
9118
d1feda86
YQ
91192012-03-03 Yao Qi <yao@codesourcery.com>
9120
9121 * linux-low.c (linux_supports_agent): New.
9122 (linux_target_ops): Initialize field `supports_agent' with
9123 linux_supports_agent.
9124 * target.h (struct target_ops) <supports_agent>: New.
9125 (target_supports_agent): New macro.
9126 * server.c (handle_general_set): Handle packet 'QAgent'.
9127 (handle_query): Send `QAgent+'.
9128 * Makefile.in (server.o): Depends on agent.h.
9129
2fa291ac
YQ
91302012-03-03 Yao Qi <yao@codesourcery.com>
9131
9132 * Makefile.in (OBS): Add agent.o.
9133 Add new rule for agent.o.
9134 Track dependence of tracepoint.c on agent.h.
9135 * tracepoint.c (run_inferior_command_1):
9136 (run_inferior_command): Call agent_run_command.
9137 (gdb_ust_connect_sync_socket): Deleted. Move it to
9138 common/agent.c.
9139 (resume_thread, stop_thread): Likewise.
9140 (gdb_ust_socket_init): Renamed to ...
9141 (gdb_agent_socket_init): ... New.
9142 (gdb_ust_thread): Renamed to ...
9143 (gdb_agent_helper_thread): ... New.
9144 (gdb_ust_init): Move some code to ...
9145 (gdb_agent_init): ... here. New.
9146 [HAVE_UST]: Call gdb_ust_init.
9147 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9148 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9149 * config.in, configure: Regenerated.
9150
05044653
PA
91512012-03-02 Pedro Alves <palves@redhat.com>
9152
9153 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9154 * linux-low.c (struct simple_pid_list): New.
9155 (stopped_pids): New a struct simple_pid_list pointer.
9156 (add_to_pid_list, pull_pid_from_list): New.
9157 (handle_extended_wait): Don't assume the first signal new children
9158 report is SIGSTOP. Adjust call to pull_pid_from_list.
9159 (linux_wait_for_lwp): Adjust.
9160
8d00225b
YQ
91612012-03-02 Yao Qi <yao@codesourcery.com>
9162
9163 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9164 debug log.
9165
19560ba5
YQ
91662012-03-02 Yao Qi <yao@codesourcery.com>
9167
9168 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9169 `stop_pc' and `tpoint'. Update caller.
9170
1faeff08
MR
91712012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9172
9173 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9174 * linux-low.c (use_linux_regsets): New macro.
9175 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9176 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9177 (linux_register_in_regsets): New function.
9178 (usr_fetch_inferior_registers): Skip registers covered by
9179 regsets.
9180 (usr_store_inferior_registers): Likewise.
9181 (usr_fetch_inferior_registers): New macro.
9182 (usr_store_inferior_registers): Likewise.
9183 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9184 (linux_store_registers): Likewise.
9185 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9186 prototype.
9187 (init_registers_mips64_dsp_linux): Likewise.
9188 (init_registers_mips_linux): New macro.
9189 (init_registers_mips_dsp_linux): Likewise.
9190 (mips_dsp_num_regs): Likewise.
9191 (DSP_BASE, DSP_CONTROL): New fallback macros.
9192 (mips_base_regs): New macro.
9193 (mips_regmap): Use it. Fix the size.
9194 (mips_dsp_regmap): New variable.
9195 (mips_dsp_regset_bitmap): Likewise.
9196 (mips_arch_setup): New function.
9197 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9198 than mips_regmap.
9199 (mips_cannot_store_register): Likewise.
9200 (the_low_target): Update .arch_setup, .num_regs and .regmap
9201 initializers. Add .regset_bitmap initializer.
9202 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9203 initializer.
9204 * linux-bfin-low.c (the_low_target): Likewise.
9205 * linux-cris-low.c (the_low_target): Likewise.
9206 * linux-crisv32-low.c (the_low_target): Likewise.
9207 * linux-ia64-low.c (the_low_target): Likewise.
9208 * linux-m32r-low.c (the_low_target): Likewise.
9209 * linux-m68k-low.c (the_low_target): Likewise.
9210 * linux-ppc-low.c (the_low_target): Likewise.
9211 * linux-s390-low.c (the_low_target): Likewise.
9212 * linux-sh-low.c (the_low_target): Likewise.
9213 * linux-sparc-low.c (the_low_target): Likewise.
9214 * linux-tic6x-low.c (the_low_target): Likewise.
9215 * linux-x86-low.c (the_low_target): Likewise.
9216 * linux-xtensa-low.c (the_low_target): Likewise.
9217 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9218 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9219 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9220 srv_xmlfiles.
9221 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9222 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9223
c03e6ccc
YQ
92242012-02-29 Yao Qi <yao@codesourcery.com>
9225 Pedro Alves <palves@redhat.com>
9226
9227 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9228 `step_over_finished' is true.
9229
644cebc9
PA
92302012-02-27 Pedro Alves <palves@redhat.com>
9231
9232 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9233 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9234
c14d7ab2
PA
92352012-02-27 Pedro Alves <palves@redhat.com>
9236
9237 PR server/9684
9238 * linux-low.c (pid_is_stopped): New.
9239 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9240
412c89dd
LM
92412012-02-25 Luis Machado <lgustavo@codesourcery.com>
9242
9243 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9244 of conditions.
9245
b745defe
MR
92462012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9247
9248 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9249
9f3a5c85
LM
92502012-02-24 Luis Machado <lgustavo@codesourcery>
9251
9252 * server.c (handle_query): Advertise support for target-side
9253 breakpoint condition evaluation.
9254 (process_point_options): New function.
9255 (process_serial_event): When inserting a breakpoint, check for
9256 a target-side condition that should be evaluated.
9257
9258 * mem-break.c: Include regcache.h and ax.h.
9259 (point_cond_list_t): New data structure.
9260 (breakpoint) <cond_list>: New field.
9261 (find_gdb_breakpoint_at): Make non-static.
9262 (delete_gdb_breakpoint_at): Clear any target-side
9263 conditions.
9264 (clear_gdb_breakpoint_conditions): New function.
9265 (add_condition_to_breakpoint): Likewise.
9266 (add_breakpoint_condition): Likewise.
9267 (gdb_condition_true_at_breakpoint): Likewise.
9268 (gdb_breakpoint_here): Return result directly instead
9269 of going through a local variable.
9270
9271 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9272 (clear_gdb_breakpoint_conditions): Likewise.
9273 (add_breakpoint_condition): Likewise.
9274 (gdb_condition_true_at_breakpoint): Likewise.
9275
9276 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9277 (need_step_over_p): Take target-side breakpoint condition into
9278 consideration.
9279
5e1dc496
LM
92802012-02-24 Luis Machado <lgustavo@codesourcery>
9281
9282 * server.h: Include tracepoint.h.
9283 (agent_mem_read, agent_get_trace_state_variable_value,
9284 agent_set_trace_state_variable_value,
9285 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9286 get_set_tsv_func_addr): New prototypes.
9287
9288 * ax.h: New include file.
9289 * ax.c: New source file.
9290
9291 * tracepoint.c: Include ax.h.
9292 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9293 agent_expr, eval_result_type): Move to ax.h.
9294 (parse_agent_expr): Rename to ...
9295 (gdb_parse_agent_expr): ... this, make it non-static and move
9296 to ax.h.
9297 (unparse_agent_expr) Rename to ...
9298 (gdb_unparse_agent_expr): ... this, make it non-static and move
9299 to ax.h.
9300 (eval_agent_expr): Rename to ...
9301 (eval_tracepoint_agent_expr): ... this.
9302 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9303 forward declarations.
9304 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9305 (agent_get_trace_state_variable_value): New function.
9306 (agent_set_trace_state_variable_value): New function.
9307 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9308 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9309 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9310 (condition_true_at_tracepoint): Likewise.
9311 (parse_agent_expr): Rename to ...
9312 (gdb_parse_agent_expr): ... this and move to ax.c.
9313 (unparse_agent_expr): Rename to ...
9314 (gdb_unparse_agent_expr): ... this and move to ax.c.
9315 (gdb_agent_op_name): Move to ax.c.
9316 (eval_agent_expr): Rename to ...
9317 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9318 and move to ax.c.
9319 (eval_tracepoint_agent_expr): New function.
9320 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 9321 non-static.
5e1dc496
LM
9322 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9323 ax.c.
9324 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9325 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9326 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9327 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9328 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9329 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9330 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9331 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9332 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9333 (compile_bytecodes): Remove forward declaration.
9334 (is_goto_target): Move to ax.c.
9335 (compile_bytecodes): Move to ax.c and call
9336 agent_get_trace_state_variable_value (...) and
9337 agent_set_trace_state_variable_value (...).
9338
9339 * Makefile.in: Update ax.c and IPA dependencies.
9340
277e4e52
PA
93412012-02-24 Pedro Alves <palves@redhat.com>
9342
9343 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9344 (cmd_bigqtbuffer_circular): ... this. Only handle
9345 'QTBuffer:circular:'.
9346 (handle_tracepoint_general_set): Adjust.
9347
bf4c19f7
YQ
93482012-02-16 Yao Qi <yao@codesourcery.com>
9349
9350 * inferiors.c: Move code to ...
9351 * dll.c: .... here. New.
9352 * server.h: Declare clear_dlls.
9353 * Makefile.in (SFILES): Add dll.c.
9354 (OBS): Add dll.o
9355 (dll.o): New rule.
9356
d73f2619
YQ
93572012-02-11 Yao Qi <yao@codesourcery.com>
9358
9359 * server.c: (handle_monitor_command): Add a new parameter
9360 `own_buf'.
9361 (handle_query): Update caller.
9362
f8255c2a
JB
93632012-02-09 Joel Brobecker <brobecker@adacore.com>
9364
9365 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9366 * configure, config.in: Regenerate.
9367 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9368 is not defined.
9369
da84f473
PA
93702012-02-02 Pedro Alves <palves@redhat.com>
9371
9372 Try SIGKILL first, then PTRACE_KILL.
9373 * linux-low.c (linux_kill_one_lwp): New.
9374 (linux_kill_one_lwp): Rename to ...
9375 (kill_one_lwp_callback): ... this. Use the new
9376 linux_kill_one_lwp.
9377
e886a173
PA
93782012-02-02 Pedro Alves <palves@redhat.com>
9379
9380 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9381 inferior.
9382
be07f1a2
PA
93832012-01-27 Pedro Alves <palves@redhat.com>
9384
9385 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9386 (elf_64_file_p): Make static.
9387 (linux_pid_exe_is_elf_64_file): New.
9388 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9389 Delete declarations.
9390 (linux_pid_exe_is_elf_64_file): Declare.
9391 * linux-x86-low.c (x86_arch_setup): Use
9392 linux_pid_exe_is_elf_64_file.
9393
d8301ad1
JK
93942012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9395
9396 * linux-low.c (linux_wait_for_event_1): Rename to ...
9397 (linux_wait_for_event): ... here and merge it with former
9398 linux_wait_for_event - new variable wait_ptid, use it.
9399 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9400
01b17894
PA
94012012-01-23 Pedro Alves <palves@redhat.com>
9402
9403 * server.c (main): Avoid yet another case of infinite loop while
9404 detaching/killing after a longjmp.
9405
e825046f
JK
94062012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9407
9408 Code cleanup.
9409 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9410
b9e7b9c3
UW
94112012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9412
9413 * hostio.c (handle_readlink): New function.
9414 (handle_vFile): Call it to handle "vFile:readlink" packets.
9415
901f9912
UW
94162012-01-20 Pedro Alves <palves@redhat.com>
9417 Ulrich Weigand <ulrich.weigand@linaro.org>
9418
9419 * server.c (handle_v_requests): Only support vAttach and vRun to
9420 start multiple processes when in extended protocol mode.
9421
fc1ab1a0
PA
94222012-01-17 Pedro Alves <palves@redhat.com>
9423
9424 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9425 memalign plus mprotect to allocate the scratch buffer.
9426
7d5d4e98
PA
94272012-01-13 Pedro Alves <palves@redhat.com>
9428
9429 * server.c (attach_inferior): Clear `cont_thread'.
9430
f128d5e9
PA
94312012-01-13 Pedro Alves <palves@redhat.com>
9432
9433 * server.c (main): Avoid infinite loop while detaching/killing
9434 after a longjmp.
9435
06db92f0
DE
94362012-01-09 Doug Evans <dje@google.com>
9437
9438 * server.c (start_inferior): Set last_ptid in --wrapper case.
9439
32d92999
YQ
94402012-01-06 Yao Qi <yao@codesourcery.com>
9441
9442 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9443 defined.
9444 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9445
5e0a92a9
YQ
94462012-01-04 Yao Qi <yao@codesourcery.com>
9447
9448 * tracepoint.c (cmd_qtdp): Print debug message
9449 for static tracepoint.
9450
ae639e8c
YQ
94512012-01-04 Yao Qi <yao@codesourcery.com>
9452
9453 * tracepoint.c (trace_vdebug): Differentiate debug message
9454 between gdbserver and IPA.
9455
f72429c5
YQ
94562012-01-03 Yao Qi <yao@codesourcery.com>
9457
9458 * tracepoint.c (tracepoint_was_hit): Don't collect for
9459 static tracepoint.
9460
12c3e59c
JB
94612012-01-02 Joel Brobecker <brobecker@adacore.com>
9462
9463 * terminal.h: Reformat copyright header.
9464
67827812
JB
94652012-01-02 Joel Brobecker <brobecker@adacore.com>
9466
9467 * server.c (gdbserver_version): Update copyright year.
9468 * gdbreplay.c (gdbreplay_version): Likewise.
9469
3e52c33d
JK
94702011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9471
9472 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9473
9474 Revert:
9475 2011-12-18 Hui Zhu <teawater@gmail.com>
9476 * linux-low.c (linux_create_inferior): Save return value to ret.
9477
66f1260e
HZ
94782011-12-18 Hui Zhu <teawater@gmail.com>
9479
9480 * linux-low.c (linux_create_inferior): Save return value to ret.
9481
e77616d7
DE
94822011-12-16 Doug Evans <dje@google.com>
9483
e7b06c57
DE
9484 * linux-low.c (linux_create_inferior): If stdio connection,
9485 redirect stdin from /dev/null, stdout to stderr.
9486 * remote-utils.c (remote_is_stdio): New static global.
9487 (remote_connection_is_stdio): New function.
9488 (remote_prepare): Handle stdio connection.
9489 (remote_open): Ditto.
9490 (remote_close): Don't close stdin for stdio connections.
9491 (read_prim,write_prim): New functions. Replace all calls to
9492 read/write to these.
9493 * server.c (main): Watch for "-" argument. Move call to
9494 remote_prepare before start_inferior.
9495 * server.h (STDIO_CONNECTION_NAME): New macro.
9496 (remote_connection_is_stdio): Declare.
9497
e77616d7
DE
9498 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9499 in debugging output.
9500
82067193
YQ
95012011-12-15 Yao Qi <yao@codesourcery.com>
9502
9503 * tracepoint.c: Include sys/syscall.h.
9504 (gdb_ust_thread): Remove preprocessor conditional.
9505
82bfbe7e
PA
95062011-12-14 Pedro Alves <pedro@codesourcery.com>
9507
9508 * linux-low.c (linux_detach_one_lwp): Call
9509 the_low_target.prepare_to_resume before detaching.
9510
712c6575
YQ
95112011-12-14 Yao Qi <yao@codesourcery.com>
9512
9513 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9514 of write.
9515
d54d1edf
YQ
95162011-12-14 Yao Qi <yao@codesourcery.com>
9517
9518 * i386-low.c (i386_low_stopped_data_address): Initialize local
9519 variable `control'.
9520
6210a125
PA
95212011-12-13 Pedro Alves <pedro@codesourcery.com>
9522
9523 PR remote/13492
9524
9525 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9526 DR_CONTROL unless necessary. Extend comments.
9527 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9528 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9529
2ece8244
YQ
95302011-12-13 Yao Qi <yao@codesourcery.com>
9531
9532 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9533 macros.
9534 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9535
784867a5
JK
95362011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9537
9538 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9539 Print new debug message for such case.
9540
6bf36717
JK
95412011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9542
9543 Fix overlapping memcpy.
9544 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9545 the read_inferior_memory transfer.
9546 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9547 write_inferior_memory transfer.
9548 (set_fast_tracepoint_jump): New variable buf. Use it for the
9549 read_inferior_memory and write_inferior_memory transfers.
9550 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9551 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9552 Use it for the write_inferior_memory transfer.
9553 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9554 buffers.
9555
50275556
MR
95562011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9557
9558 * linux-low.c (fetch_register, store_register): Make code
9559 consistent, fix formatting.
9560
7325beb4
MR
95612011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9562
9563 * linux-low.c (usr_store_inferior_registers): Factor out code
9564 to handle individual registers into...
9565 (store_register): ... this new function.
9566
c642a434
UW
95672011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9568
9569 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9570 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9571 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9572 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9573 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9574 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9575 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9576 (srv_xmlfiles): Add new XML files.
9577
9578 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9579 and <sys/uio.h>.
9580 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9581 (init_registers_s390_linux32v1): Add prototype.
9582 (init_registers_s390_linux32v2): Likewise.
9583 (init_registers_s390_linux64v1): Likewise.
9584 (init_registers_s390_linux64v2): Likewise.
9585 (init_registers_s390x_linux64v1): Likewise.
9586 (init_registers_s390x_linux64v2): Likewise.
9587 (s390_num_regs): Increment to 52.
9588 (s390_regmap): Add orig_r2 register.
9589 (s390_num_regs_3264): Increment to 68.
9590 (s390_regmap_3264): Add orig_r2 register.
9591 (s390_collect_ptrace_register): Handle orig_r2 register.
9592 (s390_supply_ptrace_register): Likewise.
9593 (s390_fill_last_break): New function.
9594 (s390_store_last_break): Likewise.
9595 (s390_fill_system_call): New function.
9596 (s390_store_system_call): Likewise.
9597 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9598 register sets.
9599 (s390_check_regset): New function.
9600 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9601 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9602 Update target_regsets for available register sets.
9603
2268b414
JK
96042011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9605 Jan Kratochvil <jan.kratochvil@redhat.com>
9606
9607 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9608 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9609 New.
9610 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9611 * linux-low.h (struct process_info_private): New member r_debug.
9612 * server.c (handle_qxfer_libraries): Call
9613 the_target->qxfer_libraries_svr4.
9614 (handle_qxfer_libraries_svr4): New function.
9615 (qxfer_packets): New entry "libraries-svr4".
9616 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9617 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9618 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9619 PACKET_qXfer_libraries_svr4.
9620
d6db1fab
UW
96212011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9622
9623 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9624 PSW address/mask between 8-byte and 16-byte formats.
9625 (s390_supply_ptrace_register): Likewise.
9626 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9627 basic addressing mode bit.
9628
242f5f1c
SS
96292011-11-24 Stan Shebs <stan@codesourcery.com>
9630
9631 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9632
f196051f
SS
96332011-11-17 Stan Shebs <stan@codesourcery.com>
9634
9635 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9636 (tracing_start_time): New global.
9637 (tracing_stop_time): New global.
9638 (tracing_user_name): New global.
9639 (tracing_notes): New global.
9640 (tracing_stop_note): New global.
9641 (cmd_qtstart): Set traceframe_usage, start_time.
9642 (stop_tracing): Set stop_time.
9643 (cmd_qtstatus): Report additional status.
9644 (cmd_qtp): New function.
9645 (handle_tracepoint_query): Call it.
9646 (cmd_qtnotes): New function.
9647 (handle_tracepoint_general_set): Call it.
9648 (get_timestamp): Rename from tsv_get_timestamp.
9649
405f8e94
SS
96502011-11-14 Stan Shebs <stan@codesourcery.com>
9651 Kwok Cheung Yeung <kcy@codesourcery.com>
9652
9653 * linux-x86-low.c (small_jump_insn): New.
9654 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9655 trampoline and error message, build a trampoline and issue a small
9656 jump instruction to it.
9657 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9658 trampoline and error message.
9659 (x86_get_min_fast_tracepoint_insn_len): New.
9660 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9661 * linux-low.h (struct linux_target_ops): Add arguments to
9662 install_fast_tracepoint_jump_pad operation, add new operation.
9663 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9664 arguments.
9665 (linux_get_min_fast_tracepoint_insn_len): New function.
9666 (linux_target_op): Add new operation.
9667 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9668 (gdb_trampoline_buffer_end): Ditto.
9669 (gdb_trampoline_buffer_error): Ditto.
9670 (struct ipa_sym_addresses): Add fields for new IPA variables.
9671 (symbol_list): Add entries for new IPA variables.
9672 (struct tracepoint): Add fields to hold the address range of the
9673 trampoline used by the tracepoint.
9674 (trampoline_buffer_head): New static variable.
9675 (trampoline_buffer_tail): Ditto.
9676 (claim_trampoline_space): New function.
9677 (have_fast_tracepoint_trampoline_buffer): New function.
9678 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9679 structure.
9680 (install_fast_tracepoint): Ditto, also add error buffer argument.
9681 (cmd_qtminftpilen): New function.
9682 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9683 (fast_tracepoint_from_trampoline_address): New function.
9684 (fast_tracepoint_collecting): Handle trampoline as part of jump
9685 pad space.
9686 (set_trampoline_buffer_space): New function.
9687 (initialize_tracepoint): Initialize new IPA variables.
9688 * target.h (struct target_ops): Add arguments to
9689 install_fast_tracepoint_jump_pad operation, add new
9690 get_min_fast_tracepoint_insn_len operation.
9691 (target_get_min_fast_tracepoint_insn_len): New.
9692 (install_fast_tracepoint_jump_pad): Add arguments.
9693 * server.h (IPA_BUFSIZ): Define.
9694 * linux-i386-ipa.c: Include extra header files.
9695 (initialize_fast_tracepoint_trampoline_buffer): New function.
9696 (initialize_low_tracepoint): Call it.
9697 * server.h (set_trampoline_buffer_space): Declare.
9698 (claim_trampoline_space): Ditto.
9699 (have_fast_tracepoint_trampoline_buffer): Ditto.
9700
1e4d1764
YQ
97012011-11-14 Yao Qi <yao@codesourcery.com>
9702
9703 * server.c (handle_query): Handle InstallInTrace for qSupported.
9704 * tracepoint.c (add_tracepoint): Sort list.
9705 (install_tracepoint, download_tracepoint): New.
9706 (cmd_qtdp): Call them to install and download tracepoints.
9707 (sort_tracepoints): Removed.
9708 (cmd_qtstart): Update.
9709
5c73ff4e
YQ
97102011-11-14 Yao Qi <yao@codesourcery.com>
9711
9712 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9713 * mem-break.h: Declare.
9714 * tracepoint.c (cmd_qtstart): Move some code to ...
9715 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9716 New.
9717 (download_tracepoints): Move some code to ...
9718 (download_tracepoint_1): ... here. New.
9719
86a30030
YQ
97202011-11-08 Yao Qi <yao@codesourcery.com>
9721
9722 * remote-utils.c (relocate_instruction): A comment fix.
9723
8d26e50c
JB
97242011-11-07 Joel Brobecker <brobecker@adacore.com>
9725
9726 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9727 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9728 dr_status_mirror and dr_control_mirror from debug_reg_state.
9729 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9730 (i386_initial_stuff): Remove use of deleted globals.
9731 (i386_get_thread_context, i386_set_thread_context,
9732 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9733 from debug_reg_state.
9734
a59306a3
YQ
97352011-11-05 Yao Qi <yao@codesourcery.com>
9736
9737 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9738 address as TPOINT's.
9739
3065dfb6
SS
97402011-11-02 Stan Shebs <stan@codesourcery.com>
9741
9742 * tracepoint.c (agent_mem_read_string): New function.
9743 (eval_agent_expr): Call it for tracenz.
9744 * server.c (handle_query): Report support for tracenz.
9745
fd0d8c7c
YQ
97462011-11-02 Yao Qi <yao@codesourcery.com>
9747
9748 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9749
609086b1
YQ
97502011-11-02 Yao Qi <yao@codesourcery.com>
9751
9752 * target.h: Fix a typo in comment.
9753
b9fd1791
PA
97542011-10-31 Pedro Alves <pedro@codesourcery.com>
9755
9756 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9757 clobber the breakpoints' shadows with fast tracepoint jumps.
9758 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9759 * target.c (write_inferior_memory): Also pass MYADDR down to
9760 check_mem_write.
9761
03583c20
UW
97622011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9763
9764 * configure.ac: Check support for personality routine.
9765 * configure: Regenerate.
9766 * config.in: Likewise.
9767 * linux-low.c: Include <sys/personality.h>.
9768 Define ADDR_NO_RANDOMIZE if necessary.
9769 (linux_create_inferior): Disable address space randomization when
9770 forking inferior, if requested.
9771 (linux_supports_disable_randomization): New function.
9772 (linux_target_ops): Install it.
9773 * server.h (disable_randomization): Declare.
9774 * server.c (disable_randomization): New global variable.
9775 (handle_general_set): Handle QDisableRandomization.
9776 (handle_query): Likewise for qSupported.
9777 (main): Support --disable-randomization and --no-disable-randomization
9778 command line arguments.
9779 * target.h (struct target_ops): Add supports_disable_randomization.
9780 (target_supports_disable_randomization): New macro.
9781
723b724b
MF
97822011-09-29 Mike Frysinger <vapier@gentoo.org>
9783
9784 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9785 ifdef check.
9786 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9787 [!PT_GETDSBT] (target_loadmap): New definition.
9788 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9789 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9790 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9791 and PT_GETDSBT to LINUX_LOADMAP.
9792 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9793 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9794
55329a5c 97952011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
9796
9797 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9798 (arm_linux_hwbp_cap): New static variable.
9799 (arm_linux_get_hwbp_cap): Replace by ...
9800 (arm_linux_init_hwbp_cap): ... this new function.
9801 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9802 (arm_linux_get_hw_watchpoint_count): Likewise.
9803 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9804 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9805 (arm_prepare_to_resume): Use perror_with_name instead of error.
9806
55329a5c 98072011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
9808
9809 * linux-arm-low.c: Include <signal.h>.
9810 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9811 (struct arm_linux_hwbp_cap): New data type.
9812 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9813 (struct arm_linux_hw_breakpoint): New data type.
9814 (MAX_BPTS, MAX_WPTS): Define.
9815 (struct arch_process_info, struct arch_lwp_info): New data types.
9816 (arm_linux_get_hwbp_cap): New function.
9817 (arm_linux_get_hw_breakpoint_count): Likewise.
9818 (arm_linux_get_hw_watchpoint_count): Likewise.
9819 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9820 (arm_hwbp_control_initialize): Likewise.
9821 (arm_hwbp_control_is_enabled): Likewise.
9822 (arm_hwbp_control_is_initialized): Likewise.
9823 (arm_hwbp_control_disable): Likewise.
9824 (arm_linux_hw_breakpoint_equal): Likewise.
9825 (arm_linux_hw_point_initialize): Likewise.
9826 (struct update_registers_data): New data structure.
9827 (update_registers_callback: New function.
9828 (arm_insert_point): Likewise.
9829 (arm_remove_point): Likewise.
9830 (arm_stopped_by_watchpoint): Likewise.
9831 (arm_stopped_data_address): Likewise.
9832 (arm_new_process): Likewise.
9833 (arm_new_thread): Likewise.
9834 (arm_prepare_to_resume): Likewise.
9835 (the_low_target): Register arm_insert_point, arm_remove_point,
9836 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9837 arm_new_thread, and arm_prepare_to_resume.
9838
6b9801d4
SS
98392011-09-15 Stan Shebs <stan@codesourcery.com>
9840
9841 * server.h (struct emit_ops): Add compare-goto fields.
9842 * tracepoint.c (gdb_agent_op_sizes): New table.
9843 (emit_eq_goto): New function.
9844 (emit_ne_goto): New function.
9845 (emit_lt_goto): New function.
9846 (emit_le_goto): New function.
9847 (emit_gt_goto): New function.
9848 (emit_ge_goto): New function.
9849 (is_goto_target): New function.
9850 (compile_bytecodes): Recognize special cases of compare-goto
9851 combinations and call specialized emitters for them.
9852 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9853 (amd64_emit_ne_goto): New function.
9854 (amd64_emit_lt_goto): New function.
9855 (amd64_emit_le_goto): New function.
9856 (amd64_emit_gt_goto): New function.
9857 (amd64_emit_ge_goto): New function.
9858 (amd64_emit_ops): Add the new functions.
9859 (i386_emit_eq_goto): New function.
9860 (i386_emit_ne_goto): New function.
9861 (i386_emit_lt_goto): New function.
9862 (i386_emit_le_goto): New function.
9863 (i386_emit_gt_goto): New function.
9864 (i386_emit_ge_goto): New function.
9865 (i386_emit_ops): Add the new functions.
9866
bf15cbda
SS
98672011-09-08 Stan Shebs <stan@codesourcery.com>
9868
9869 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9870 (i386_emit_epilogue): Restore %ebx.
9871
943ca1dd
JZ
98722011-08-31 Jie Zhang <jzhang918@gmail.com>
9873
9874 * server.c (step_thread): Remove definition.
9875 (process_serial_event): Don't handle Hs.
9876 * server.h (step_thread): Remove declaration.
9877 * target.c (set_desired_inferior): Remove use of step_thread.
9878
e3deef73
LM
98792011-08-24 Luis Machado <lgustavo@codesourcery.com>
9880
9881 * linux-low.c: Include linux-procfs.h.
9882 (linux_attach_lwp_1): Update comments.
9883 (linux_attach): Scan for existing threads when attaching to a
9884 process that is the tgid.
9885 * Makefile.in: Update dependencies.
9886
13da1c97
LM
98872011-08-24 Luis Machado <lgustavo@codesourcery.com>
9888
9889 * configure.srv: Add linux-procfs.o dependencies.
9890
881127c9
YQ
98912011-08-14 Yao Qi <yao@codesourcery.com>
9892
9893 * target.h (struct target_ops): Fix indent.
9894 * win32-low.c (win32_target_ops): Fix comment.
9895
58dbd541
YQ
98962011-08-14 Andrew Jenner <andrew@codesourcery.com>
9897 Yao Qi <yao@codesourcery.com>
9898
9899 * Makefile.in (clean): Remove tic6x-*.c files.
9900 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9901 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9902 (tic6x-c64xp-linux.c): Likewise.
9903 * configure.srv: Add support for tic6x-*-uclinux.
9904 * linux-tic6x-low.c: New.
9905 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9906
78d85199
YQ
99072011-08-14 Andrew Stubbs <ams@codesourcery.com>
9908 Yao Qi <yao@codesourcery.com>
9909
9910 * target.h (struct target_ops): Add read_loadmap.
9911 * linux-low.c (struct target_loadseg): New type.
9912 (struct target_loadmap): New type.
9913 (linux_read_loadmap): New function.
9914 (linux_target_ops): Add linux_read_loadmap.
9915 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
9916 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9917 to NULL.
78d85199 9918
a959a88d
EZ
99192011-08-05 Eli Zaretskii <eliz@gnu.org>
9920
9921 * win32-low.c: Include <stdint.h>.
9922
1ced966e
PA
99232011-07-22 Pedro Alves <pedro@codesourcery.com>
9924
9925 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9926 to the inferior here.
9927 (i386_remove_aligned_watchpoint): Ditto.
9928 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9929 fit part of the watchpoint in the debug registers.
9930 (i386_update_inferior_debug_regs): New.
9931 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9932 registers, and only update the inferior on success.
9933 (i386_low_remove_watchpoint): Ditto.
9934
d26e3629
KY
99352011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9936
9937 * linux-low.c (compare_ints, unique, list_threads, show_process,
9938 linux_core_of_thread): Delete.
9939 (linux_target_ops): Change linux_core_of_thread to
9940 linux_common_core_of_thread.
9941 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9942 * utils.c (malloc_failure): Change type of argument.
9943 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9944 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9945 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9946 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9947 (IPA_OBJS): Add common-utils-ipa.o.
9948 (ptid_h, linux_osdata_h): New macros.
9949 (server_h): Add common/common-utils.h, common/xml-utils.h,
9950 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9951 common/ptid.h.
9952 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9953 ptid.o, buffer.o): New rules.
9954 (linux-low.o): Add common/linux-osdata.h as a dependency.
9955 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9956 * configure.ac: Add AC_HEADER_DIRENT check.
9957 * config.in: Regenerate.
9958 * configure: Regenerate.
9959 * remote-utils.c (xml_escape_text): Delete.
9960 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9961 buffer_xml_printf): Move to common/buffer.c.
9962 * server.c (main): Remove call to initialize_inferiors.
9963 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9964 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9965 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9966 internal_error, gdb_assert, gdb_assert_fail): Delete.
9967 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9968 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9969 common/buffer.h.
9970 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9971 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9972 initialize_inferiors): Delete.
9973
2275a1a7
PA
99742011-07-20 Pedro Alves <pedro@codesourcery.com>
9975
9976 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9977 symbol error.
9978
0a5b1e09
PA
99792011-05-31 Pedro Alves <pedro@codesourcery.com>
9980
9981 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9982 assertion.
9983 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9984
6938fd34
YQ
99852011-05-26 Yao Qi <yao@codesourcery.com>
9986
9987 * Makefile.in (thread-db.o): Track dependence to
9988 common/gdb_thread_db.h.
9989 * thread-db.c: include gdb_thread_db.h from right place.
9990
b481f9e0
TT
99912011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9992
9993 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9994 __FILE__ and __LINE__ to internal_error.
9995
98a5dd13
DE
99962011-05-13 Doug Evans <dje@google.com>
9997
9998 * thread-db.c (try_thread_db_load_from_sdir): New function.
9999 (try_thread_db_load_from_dir): New function.
10000 (thread_db_load_search): Handle $sdir, ignore $pdir.
10001 Remove trying of system directories if search of
10002 libthread-db-search-path fails, that is now done via $sdir.
10003
d248b706
KY
100042011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10005
10006 * server.c (handle_query): Add EnableDisableTracepoints to the list
10007 of supported features.
43aaf8b6 10008 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 10009 tracepoints.
43aaf8b6
PA
10010 (cmd_qtenable_disable): New.
10011 (cmd_qtstart): Install tracepoints even if disabled.
10012 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10013 receiving a QTEnable or QTDisable packet.
10014 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10015 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10016 tracepoints.
10017 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 10018
84e578fb
DE
100192011-05-10 Doug Evans <dje@google.com>
10020
10021 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10022
71f55dd8
DE
100232011-05-04 Doug Evans <dje@google.com>
10024
10025 * linux-low.c (linux_join): Skip process lookup.
10026 * spu-low.c (spu_join): Ditto.
10027 * server.c (join_inferiors_callback): Delete.
10028 (process_serial_event): For 'D' packet (detach) call join_inferior
10029 directly.
10030
4d393d60
JM
100312011-05-04 Joseph Myers <joseph@codesourcery.com>
10032
10033 * README: Don't mention xscale*-*-linux*.
10034 * configure.srv (xscale*-*-linux*): Don't handle target.
10035
b00ad6ff
NF
100362011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10037
10038 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10039 casting pointers.
10040 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10041 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10042 (i386_emit_void_call_2): Likewise.
10043
af96c192
YQ
100442011-04-26 Yao Qi <yao@codesourcery.com>
10045
43aaf8b6
PA
10046 * linux-low.c: Move common macros to linux-ptrace.h.
10047 Include linux-ptrace.h.
af96c192
YQ
10048 * Makefile.in (linux_ptrace_h): New.
10049 (linux-low.o): Depends on linux-ptrace.h.
10050
03f2bd59
JK
100512011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10052
10053 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10054 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10055 (remote_prepare): New function with most of the TCP code from ...
10056 (remote_open): ... here. Detect PORT here unconditionally. Move also
10057 setting transport_is_reliable.
10058 * server.c (run_once): New variable.
10059 (gdbserver_usage): Document it.
10060 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10061 the first run if RUN_ONCE.
10062 * server.h (run_once, remote_prepare): New declarations.
10063
7a9dd1b2
TT
100642011-04-19 Tom Tromey <tromey@redhat.com>
10065
10066 * win32-low.c (handle_load_dll): Remove duplicate "the".
10067
81239425
PM
100682011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10069
10070 Remove support for old Cygwin 1.5 versions.
10071 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10072 function to avoid warning.
10073 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10074 warning.
10075
9e0627f1
PM
100762011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10077
10078 * gdbserver/server.h (Macro _): Define it if not available.
10079
588eebee
MS
100802011-03-14 Michael Snyder <msnyder@vmware.com>
10081
348af9f7 10082 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 10083
43f70d4c
JB
100842011-03-10 Joel Brobecker <brobecker@adacore.com>
10085
10086 * Makefile.in (maintainer-clean realclean distclean): Remove
10087 "make ... subdir_do" command.
10088
348af9f7
MS
100892011-03-10 Michael Snyder <msnyder@vmware.com>
10090
10091 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10092
10093 * server.c (handle_v_run): Free alloced buffer on early return.
10094
e637a4f5
YQ
100952011-03-09 Yao Qi <yao@codesourcery.com>
10096
10097 Revert:
10098 2011-03-04 Yao Qi <yao@codesourcery.com>
10099
10100 * Makefile.in: Remove GNU make feature --directory.
10101
10102 2011-03-05 Yao Qi <yao@codesourcery.com>
10103
10104 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10105 (subdir_do): New make target. Copied from gdb/Makefile.
10106 (maintainer-clean, realclean, distclean, clean): Call corresponding
10107 make targets in common/Makefile.
10108
10109 2011-02-11 Yao Qi <yao@codesourcery.com>
10110
10111 * configure.ac: Call AC_PROG_RANLIB.
10112 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10113 * configure: Regenerate.
10114
e6edda56
JK
101152011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10116
10117 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10118
e5141119
JB
101192011-03-06 Yao Qi <yao@codesourcery.com>
10120
10121 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10122
64794aa4
JB
101232011-03-05 Yao Qi <yao@codesourcery.com>
10124
10125 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10126 (subdir_do): New make target. Copied from gdb/Makefile.
10127 (maintainer-clean, realclean, distclean, clean): Call corresponding
10128 make targets in common/Makefile.
10129
7a762829
YQ
101302011-03-04 Yao Qi <yao@codesourcery.com>
10131
10132 * Makefile.in: Remove GNU make feature --directory.
10133
348af9f7
MS
101342011-03-04 Michael Snyder <msnyder@vmware.com>
10135
10136 * server.c (queue_stop_reply): Call xmalloc not malloc.
10137
101382011-03-02 Michael Snyder <msnyder@vmware.com>
10139
10140 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10141
9f72fee2
MS
101422011-02-28 Michael Snyder <msnyder@vmware.com>
10143
588eebee
MS
10144 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10145 (cmd_qtframe): Ditto.
10146 (cmd_qtbuffer): Ditto.
10147 (cmd_bigqtbuffer): Ditto.
10148
9f72fee2
MS
10149 * utils.c (decimal2str): Initialize 'width' to nine, then
10150 don't mess with it.
10151
8040bd49
UW
101522011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10153
10154 * hostio.c (require_data): Free *data, not data.
10155
7e52cbd0
JK
101562011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10157
10158 * hostio.c (require_data): Use free, not xfree.
10159
9130f83e
MS
101602011-02-27 Michael Snyder <msnyder@vmware.com>
10161
4b812f4e
MS
10162 * server.c (handle_query): Discard unused value.
10163
9130f83e
MS
10164 * hostio.c (require_data): Free malloc memory before returning
10165 error.
10166
69d37113
MS
101672011-02-26 Michael Snyder <msnyder@vmware.com>
10168
10169 * linux-low.c (list_threads): Call closedir for dirent.
10170
35f5825a
MS
101712011-02-27 Michael Snyder <msnyder@vmware.com>
10172
2a589cef
MS
10173 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10174 a case statement falls through.
10175
0adea5f7
MS
10176 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10177
35f5825a
MS
10178 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10179 in comparison.
10180
238f1c74
MS
101812011-02-26 Michael Snyder <msnyder@vmware.com>
10182
10183 * utils.c (decimal2str): Eliminate dead code and dead param.
10184 (pulongest): Drop dead param from call to decimal2str.
10185 (plongest): Ditto.
10186
633ff500
JB
101872011-02-24 Joel Brobecker <brobecker@adacore.com>
10188
10189 Revert the following patch (not approved yet):
10190 2011-02-21 Hui Zhu <teawater@gmail.com>
10191 * tracepoint.c (tp_printf): New function.
10192 (eval_agent_expr): Handle gdb_agent_op_printf.
10193
f9c6ff72
HZ
101942011-02-21 Hui Zhu <teawater@gmail.com>
10195
10196 * tracepoint.c (tp_printf): New function.
10197 (eval_agent_expr): Handle gdb_agent_op_printf.
10198
94d5e490
TT
101992011-02-18 Tom Tromey <tromey@redhat.com>
10200
10201 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10202 (tracepoint.o): Likewise.
10203 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10204 (gdb_agent_op_names): Likewise.
10205
c7f96d2b
TT
102062011-02-18 Tom Tromey <tromey@redhat.com>
10207
10208 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10209 gdb_agent_op_rot>: New constants.
10210 (gdb_agent_op_names): Add pick and roll.
10211 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10212 cases.
10213
0feedb2c
JK
102142011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10215
10216 * aclocal.m4: Regenerated with aclocal-1.11.1.
10217
b3b9301e
PA
102182011-02-14 Pedro Alves <pedro@codesourcery.com>
10219
10220 * server.c (handle_qxfer_traceframe_info): New.
10221 (qxfer_packets): Register "traceframe-info".
10222 (handle_query): Report support for qXfer:traceframe-info:read+.
10223 * tracepoint.c (match_blocktype): New.
10224 (traceframe_find_block_type): Rename to ...
10225 (traceframe_walk_blocks): ... this. Add callback filter argument,
10226 and use it.
10227 (traceframe_find_block_type): New, reimplemented on top of
10228 traceframe_walk_blocks.
10229 (build_traceframe_info_xml): New.
10230 (traceframe_read_info): New.
10231 * server.h (traceframe_read_info): Declare.
10232
4f3e6fb7
YQ
102332011-02-11 Yao Qi <yao@codesourcery.com>
10234
10235 * configure.ac: Call AC_PROG_RANLIB.
10236 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10237 * configure: Regenerate.
10238
764880b7
PA
102392011-02-07 Pedro Alves <pedro@codesourcery.com>
10240
10241 * server.c (gdb_read_memory): Change return semantics to allow
10242 partial transfers.
10243 (handle_search_memory_1): Adjust.
10244 (process_serial_event) <'m' packet>: Handle partial transfers.
10245 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10246
1c79eb8a
PA
102472011-01-28 Pedro Alves <pedro@codesourcery.com>
10248
10249 * regcache.c (init_register_cache): Initialize
10250 regcache->register_status.
10251 (free_register_cache): Release regcache->register_status.
10252 (regcache_cpy): Copy register_status.
10253 (registers_to_string): Print 'x's for unavailable registers.
10254 (supply_register): Mark the register's status valid or
10255 unavailable, depending on whether a buffer was passed in or not.
10256 (supply_register_zeroed): New.
10257 (supply_regblock): Mark the registers' status valid or
10258 unavailable, depending on whether a buffer was passed in or not.
10259 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10260 (struct regcache): New `register_status' field.
10261 (supply_register_zeroed): Declare.
10262 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10263 supply_register_zeroed, rather than passing a NULL buffer to
10264 supply_register.
10265 * tracepoint.c (fetch_traceframe_registers): Update comment.
10266
85724a0e
PA
102672011-01-28 Pedro Alves <pedro@codesourcery.com>
10268
10269 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10270 buffer explicit.
10271
d08aafef
PA
102722011-01-25 Pedro Alves <pedro@codesourcery.com>
10273
10274 * server.h (decode_xfer_write): Change prototype.
10275 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10276 and don't extract the annex here.
10277 * server.c (decode_xfer_read): Remove `annex' parameter,
10278 and don't extract the annex here.
10279 (decode_xfer): New.
10280 (struct qxfer): New.
10281 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10282 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10283 (handle_qxfer_statictrace): New functions, abstracted out from
10284 handle_query, and made to use the struct qxfer interface.
10285 (handle_threads_qxfer_proper): Rename to ...
10286 (handle_qxfer_threads_proper): ... this.
10287 (handle_threads_qxfer): Rename to ...
10288 (handle_qxfer_threads): ... this. Adjust.
10289 (qxfer_packets): New array.
10290 (handle_qxfer): New function.
10291 (handle_query): Use handle_qxfer.
10292
493e2a69
MS
102932011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10294
10295 * gdbreplay.c: Shorten lines of >= 80 columns.
10296 * linux-low.c: Ditto.
10297 * linux-ppc-low.c: Ditto.
10298 * linux-s390-low.c: Ditto.
10299 * linux-sparc-low.c: Ditto.
10300 * linux-x86-low.c: Ditto.
10301 * linux-xtensa-low.c: Ditto.
10302 * mem-break.c: Ditto.
10303 * nto-low.c: Ditto.
10304 * regcache.h: Ditto.
10305 * remote-utils.c: Ditto.
10306 * server.c: Ditto.
10307 * server.h: Ditto.
10308 * thread-db.c: Ditto.
10309 * tracepoint.c: Ditto.
10310 * utils.c: Ditto.
10311 * win32-low.h: Ditto.
10312
44944448
JB
103132011-01-05 Joel Brobecker <brobecker@adacore.com>
10314
10315 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10316 update.
10317
71ce852c
JB
103182011-01-01 Joel Brobecker <brobecker@adacore.com>
10319
10320 * server.c (gdbserver_version): Update copyright year in version
10321 output.
10322 * gdbreplay.c (gdbreplay_version): Ditto.
10323
eb826dc6
MF
103242010-12-29 Jie Zhang <jie.zhang@analog.com>
10325
10326 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10327 * linux-bfin-low.c: New file.
10328 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10329 PT_DATA_ADDR for BFIN targets.
10330 * Makefile.in (SFILES): Add linux-bfin-low.c.
10331 (clean): Remove reg-bfin.c.
10332 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10333 * README: Mention supported Blackfin targets.
10334
39ab222a
MF
103352010-12-23 Mike Frysinger <vapier@gentoo.org>
10336
10337 * .gitignore: New file.
10338
a1f2ce7d
MF
103392010-11-16 Mike Frysinger <vapier@gentoo.org>
10340
10341 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10342
f474844c
JZ
103432010-10-22 Jie Zhang <jie@codesourcery.com>
10344
10345 * Makefile.in: Add FLAGS_TO_PASS variable.
10346 (install): Remove dependency of install-only and recursively
10347 invoke make for install-only.
10348
f1048712
DE
103492010-10-04 Doug Evans <dje@google.com>
10350
10351 * Makefile.in (uninstall): Use $(DESTDIR).
10352
b53a1623
PA
103532010-09-24 Pedro Alves <pedro@codesourcery.com>
10354
e6ee044d
PA
10355 PR gdb/11842
10356
b53a1623
PA
10357 * linux-x86-low.c (compat_siginfo_from_siginfo)
10358 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10359 si_code is < 0. Check for si_code == SI_TIMER before checking for
10360 si_code < 0.
10361
fa1bd1e4
JB
103622010-09-13 Joel Brobecker <brobecker@adacore.com>
10363
10364 * lynx-i386-low.c: New file.
10365 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10366
47fac8f8
JB
103672010-09-13 Joel Brobecker <brobecker@adacore.com>
10368
10369 * lynx-low.c (ptrace_request_to_str): Remove handling for
10370 request values that have been removed in LynxOS 5.x.
10371
1adfc54d
JB
103722010-09-13 Joel Brobecker <brobecker@adacore.com>
10373
10374 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10375 <ptrace.h>
10376
c2a66c29
NS
103772010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10378
10379 * configure.ac: Add --enable-inprocess-agent option.
10380 * configure: Rebuilt.
10381
32fcada3
YQ
103822010-09-06 Yao Qi <yao@codesourcery.com>
10383
10384 * linux-low.c (linux_kill): Remove unused variable.
10385 (linux_stabilize_threads): Likewise.
10386 * server.c (start_inferior): Likewise.
10387 (queue_stop_reply_callback): Likewise.
10388 * tracepoint.c (do_action_at_tracepoint): Likewise.
10389
0cccb683
YQ
103902010-09-06 Yao Qi <yao@codesourcery.com>
10391
10392 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10393 on return.
10394
423ec54c
JK
103952010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10396
10397 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10398
12ac6819
PA
103992010-09-06 Pedro Alves <pedro@codesourcery.com>
10400
10401 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10402 "$(IPA_DEPFILES)".
10403
8ed54b31
JB
104042010-09-01 Joel Brobecker <brobecker@adacore.com>
10405
10406 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10407 gdbserver/lynx-ppc-low.c: New files.
10408 * Makefile.in (lynx_low_h): New variable.
10409 (lynx-low.o, lynx-ppc-low.o): New rules.
10410 * configure.ac: On LynxOS, link with -lnetinet.
10411 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10412 * configure: regenerate.
10413
bb0116a4
JB
104142010-09-01 Joel Brobecker <brobecker@adacore.com>
10415
10416 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10417 * configure.ac: Add check for vasprintf and vsnprintf.
10418 * configure, config.in: Regenerate.
10419 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10420
a778ab81 104212010-09-01 Joel Brobecker <brobecker@adacore.com>
10422
10423 * gdbreplay.c: Move include of alloca.h up, next to include of
10424 malloc.h.
10425 * server.h: Add include of malloc.h.
10426 * mem-break.c: Remove include of malloc.h.
10427 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10428
8b034a19 104292010-09-01 Joel Brobecker <brobecker@adacore.com>
10430
10431 * Makefile.in (memmem.o): Build with -Wno-error.
10432
104332010-09-01 Joel Brobecker <brobecker@adacore.com>
10434
10435 * utils.c (xsnprintf): Make non-static.
10436 * server.h: Add xsnprintf declaration.
10437 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10438 replace calls to snprintf by calls to xsnprintf throughout.
10439
104402010-09-01 Joel Brobecker <brobecker@adacore.com>
10441
10442 * configure.ac: Add configure check for alloca.
10443 * configure, config.in: Regenerate.
10444 * server.h: Include alloca.h if it exists.
10445 * gdbreplay.c: Include alloca.h if it exists.
10446
1a981360
PA
104472010-08-28 Pedro Alves <pedro@codesourcery.com>
10448
10449 * linux-low.c (__SIGRTMIN): Define if not already defined.
10450 (linux_create_inferior): Check for __ANDROID__ rather than
10451 __SIGRTMIN.
10452 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10453 are already deferred.
10454 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10455 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10456 stopped and already has a pending signal to report.
10457 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10458 a pending signal to report or is moving out of a jump pad.
10459 (linux_init_signals): Check for __ANDROID__ rather than
10460 __SIGRTMIN.
10461
b4d51a55
PA
104622010-08-28 Pedro Alves <pedro@codesourcery.com>
10463
10464 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10465 debug_threads check. Avoid a linear search when not doing debug
10466 output.
10467
ec48365d
PA
104682010-08-27 Pedro Alves <pedro@codesourcery.com>
10469
10470 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10471 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10472 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10473 (process_event): Change local fd's type to gdb_fildes_t.
10474 (create_file_handler): Adjust prototype.
10475 (delete_file_handler): Adjust prototype.
10476 (handle_file_event): Adjust prototype. Use pfildes.
10477 (create_file_event): Adjsut prototype.
10478 * remote-utils.c (remote_desc, listen_desc): Change type to
10479 gdb_fildes_t.
10480 * server.h: New gdb_fildes_t typedef.
10481 [USE_WIN32API]: Include winsock2.h.
10482 (delete_file_handler, add_file_handler): Adjust prototypes.
10483 (pfildes): Declare.
10484 * utils.c (pfildes): New.
10485
854d88f0
PA
104862010-08-27 Pedro Alves <pedro@codesourcery.com>
10487
10488 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10489 * configure: Regenerate.
10490
0146f85b
PA
104912010-08-27 Pedro Alves <pedro@codesourcery.com>
10492
10493 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10494 (linux_done_accessing_memory): ... this.
10495 (linux_target_ops): Adjust.
10496 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10497 * nto-low.c (nto_target_ops): Adjust comment.
10498 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10499 * spu-low.c (spu_target_ops): Adjust comment.
10500 * target.h (target_ops): Rename unprepare_to_access_memory field
10501 to done_accessing_memory.
10502 (unprepare_to_access_memory): Rename to ...
10503 (done_accessing_memory): ... this.
10504
90d74c30
PA
105052010-08-26 Pedro Alves <pedro@codesourcery.com>
10506
10507 * linux-low.c (linux_prepare_to_access_memory): New.
10508 (linux_unprepare_to_access_memory): New.
10509 (linux_target_ops): Install them.
10510 * server.c (read_memory): Rename to ...
10511 (gdb_read_memory): ... this. Use
10512 prepare_to_access_memory/prepare_to_access_memory.
10513 (write_memory): Rename to ...
10514 (gdb_write_memory): ... this. Use
10515 prepare_to_access_memory/prepare_to_access_memory.
10516 (handle_search_memory_1): Adjust.
10517 (process_serial_event): Adjust.
10518 * target.h (struct target_ops): New fields
10519 prepare_to_access_memory and unprepare_to_access_memory.
10520 (prepare_to_access_memory, unprepare_to_access_memory): New.
10521 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10522 prepare_to_access_memory/prepare_to_access_memory.
10523 * nto-low.c (nto_target_ops): Adjust.
10524 * spu-low.c (spu_target_ops): Adjust.
10525 * win32-low.c (win32_target_ops): Adjust.
10526
fd467969
PA
105272010-08-26 Pedro Alves <pedro@codesourcery.com>
10528
10529 * Makefile.in (WARN_CFLAGS): Get it from configure.
10530 (WERROR_CFLAGS): New.
10531 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10532 * configure.ac: Introduce --enable-werror, which adds -Werror to
10533 the compiler command line. Enabled by default. Disable with
10534 --disable-werror. Add -Wdeclaration-after-statement
10535 Wpointer-arith and -Wformat-nonliteral to warning flags.
10536 * configure: Regenerate.
10537
331e2f5f
PA
105382010-08-26 Pedro Alves <pedro@codesourcery.com>
10539
10540 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10541
e581f2b4
PA
105422010-08-26 Pedro Alves <pedro@codesourcery.com>
10543
10544 * gdbreplay.c (remote_error): New.
10545 (gdbchar): New.
10546 (expect): Use gdbchar. Check for error reading from GDB.
10547 Clarify sync error output.
10548 (play): Check for errors writing to GDB.
10549 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10550 * remote-utils.c (getpkt): Check for errors writing to the remote
10551 descriptor.
10552
3c11dd79
PA
105532010-08-25 Pedro Alves <pedro@codesourcery.com>
10554
10555 * linux-low.c (linux_wait_1): Move non-debugging code out of
10556 `debug_threads' control.
10557
d20a8ad9
PA
105582010-08-25 Pedro Alves <pedro@codesourcery.com>
10559
10560 * linux-low.c (linux_wait_1): Don't set last_status here.
10561 * server.c (push_event, queue_stop_reply_callback): Assert we're
10562 not pushing a TARGET_WAITKIND_IGNORE event.
10563 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10564 (myresume, handle_target_event): Set the thread's last_resume_kind
10565 and last_status from the target returned status.
10566
964e4306
PA
105672010-08-25 Pedro Alves <pedro@codesourcery.com>
10568
10569 PR threads/10729
10570
10571 * linux-x86-low.c (update_debug_registers_callback): New.
10572 (i386_dr_low_set_addr): Use it.
10573 (i386_dr_low_get_addr): New.
10574 (i386_dr_low_set_control): Use update_debug_registers_callback.
10575 (i386_dr_low_get_control): New.
10576 (i386_dr_low_get_status): Adjust.
10577 * linux-low.c (linux_stop_lwp): New.
10578 * linux-low.h (linux_stop_lwp): Declare.
10579
10580 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10581 argument instead of a i386_debug_reg_state.
10582 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10583 a i386_debug_reg_state.
10584 (i386_insert_aligned_watchpoint): Adjust.
10585 (i386_remove_aligned_watchpoint): Adjust.
10586 (i386_low_stopped_data_address): Read the debug registers from the
10587 inferior instead of from the mirrors.
10588 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10589 (i386_dr_low_get_addr): Declare.
10590 (i386_dr_low_get_control): Declare.
10591 (i386_dr_low_get_status): Change prototype.
10592
10593 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10594 (i386_dr_low_get_addr): New.
10595 (i386_dr_low_get_control): New.
10596 (i386_dr_low_get_status): Adjust prototype. Return
10597 dr_status_mirror.
10598 (i386_initial_stuff): Clear dr_status_mirror and
10599 dr_control_mirror.
10600 (i386_get_thread_context): Adjust.
10601 (i386_set_thread_context): Adjust.
10602 (i386_thread_added): Adjust.
10603
5f21a75b
PA
106042010-08-24 Pedro Alves <pedro@codesourcery.com>
10605
10606 * linux-low.h (linux_thread_area): Delete declaration.
10607
3e4c1235
TS
106082010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10609
10610 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10611 after its termination.
10612
1971b033
PA
106132010-08-09 Pedro Alves <pedro@codesourcery.com>
10614
10615 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10616 (gdb_wants_all_stopped): Delete.
10617 (linux_wait_1): Don't call them.
10618 * server.c (handle_v_cont): Tag all threads as want-stopped.
10619 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10620 stopped as "client-wants-stopped".
10621
310444ac
PA
106222010-07-31 Pedro Alves <pedro@codesourcery.com>
10623
10624 * Makefile.in (signals_h): New.
10625 (server_h): Depend on it.
10626 (server.o): Don't depend on $(signals_def).
10627 (signals.o): Depend on $(signals_def).
10628
a19cae16
JK
106292010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10630
10631 * Makefile.in (signals_def): New.
10632 (server_h): Append include/gdb/signals.h and signals_def.
10633 (server.o): Append signals_def.
10634
30d50328
JK
106352010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10636
10637 * server.c (handle_target_event): Use target_signal_to_host for
10638 resume_info.sig initialization.
10639 * target.h (struct thread_resume) <sig>: New comment.
10640
5c3216e2
OS
106412010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10642
c6f46ca0
OS
10643 * server.c (handle_query): strcpy() the returned string from paddress()
10644 instead of sprintf().
5c3216e2
OS
10645 * utils.c (paddress): Return phex_nz().
10646
6bd31874
JB
106472010-07-07 Joel Brobecker <brobecker@adacore.com>
10648
10649 * server.c (handle_v_cont): Call mourn_inferior if process
10650 just exited.
10651 (myresume): Likewise.
10652
0fb4aa4b
PA
106532010-07-01 Pedro Alves <pedro@codesourcery.com>
10654
10655 Static tracepoints, and integration with UST.
10656
10657 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10658 * mem-break.c (uninsert_all_breakpoints)
10659 (reinsert_all_breakpoints): New.
10660 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10661 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10662 (gdb_agent_ust_loaded, helper_thread_id)
10663 (gdb_agent_helper_thread_id): New macros.
10664 (struct ipa_sym_addresses): Add addr_ust_loaded,
10665 addr_helper_thread_id, addr_cmd_buf.
10666 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10667 (in_process_agent_loaded_ust): New.
10668 (write_e_ust_not_loaded): New.
10669 (maybe_write_ipa_ust_not_loaded): New.
10670 (struct collect_static_trace_data_action): New.
10671 (enum tracepoint_type) <static_tracepoint>: New.
10672 (struct tracepoint) <handle>: Mention static tracepoints.
10673 (struct static_tracepoint_ctx): New.
10674 (CMD_BUF_SIZE): New.
10675 (add_tracepoint_action): Handle static tracepoint actions.
10676 (unprobe_marker_at): New.
10677 (clear_installed_tracepoints): Handle static tracepoints.
10678 (cmd_qtdp): Handle static tracepoints.
10679 (probe_marker_at): New.
10680 (cmd_qtstart): Handle static tracepoints.
10681 (response_tracepoint): Handle static tracepoints.
10682 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10683 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10684 (get_context_regcache): Handle static tracepoints.
10685 (do_action_at_tracepoint): Handle static tracepoint actions.
10686 (traceframe_find_block_type): Handle static trace data blocks.
10687 (traceframe_read_sdata): New.
10688 (download_tracepoints): Download static tracepoint actions.
10689 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10690 (GDB_PROBE_NAME): New.
10691 (ust_ops): New.
10692 (GET_UST_SYM): New.
10693 (USTF): New.
10694 (dlsym_ust): New.
10695 (ust_marker_to_static_tracepoint): New.
10696 (gdb_probe): New.
10697 (collect_ust_data_at_tracepoint): New.
10698 (gdb_ust_probe): New.
10699 (UNIX_PATH_MAX, SOCK_DIR): New.
10700 (gdb_ust_connect_sync_socket): New.
10701 (resume_thread, stop_thread): New.
10702 (run_inferior_command): New.
10703 (init_named_socket): New.
10704 (gdb_ust_socket_init): New.
10705 (cstr_to_hexstr): New.
10706 (next_st): New.
10707 (first_marker, next_marker): New.
10708 (response_ust_marker): New.
10709 (cmd_qtfstm, cmd_qtsstm): New.
10710 (unprobe_marker_at, probe_marker_at): New.
10711 (cmd_qtstmat, gdb_ust_thread): New.
10712 (gdb_ust_init): New.
10713 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10714 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10715 (ST_REGENTRY): New.
10716 (x86_64_st_collect_regmap): New.
10717 (X86_64_NUM_ST_COLLECT_GREGS): New.
10718 (AMD64_RIP_REGNUM): New.
10719 (supply_static_tracepoint_registers): New.
10720 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10721 (ST_REGENTRY): New.
10722 (i386_st_collect_regmap): New.
10723 (i386_NUM_ST_COLLECT_GREGS): New.
10724 (supply_static_tracepoint_registers): New.
10725 * server.c (handle_query): Handle qXfer:statictrace:read.
10726 <qSupported>: Report support for StaticTracepoints, and
10727 qXfer:statictrace:read features.
10728 * server.h (traceframe_read_sdata)
10729 (supply_static_tracepoint_registers): Declare.
10730 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10731 (unpack_varlen_hex): Include in IPA build.
10732 * Makefile.in (ustlibs, ustinc): New.
10733 (IPA_OBJS): Add remote-utils-ipa.o.
10734 ($(IPA_LIB)): Link -ldl and -lpthread.
10735 (UST_CFLAGS): New.
10736 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10737 * config.in, configure: Regenerate.
10738
9e4344e5
PA
107392010-06-20 Ian Lance Taylor <iant@google.com>
10740 Pedro Alves <pedro@codesourcery.com>
10741
10742 * linux-x86-low.c (always_true): Delete.
10743 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10744 trying to fool the compiler with always_true.
10745
c6beb2cb
PA
107462010-06-20 Pedro Alves <pedro@codesourcery.com>
10747
10748 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10749 conditions in gdbserver.
10750
d2ed6730
UW
107512010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10752
10753 * spu-low.c (spu_read_memory): Wrap around local store limit.
10754 (spu_write_memory): Likewise.
10755
4e29fb54
PA
107562010-06-15 Pedro Alves <pedro@codesourcery.com>
10757
10758 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10759 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10760 LONGEST uses.
10761 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10762 uses.
10763 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10764 uses with LONGEST uses.
10765
6a271cae
PA
107662010-06-14 Stan Shebs <stan@codesourcery.com>
10767 Pedro Alves <pedro@codesourcery.com>
10768
10769 Bytecode compiler.
10770
10771 * linux-x86-low.c: Include limits.h.
10772 (add_insns): New.
10773 (always_true): New.
10774 (EMIT_ASM): New.
10775 (EMIT_ASM32): New.
10776 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10777 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10778 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10779 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10780 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10781 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10782 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10783 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10784 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10785 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10786 (amd64_emit_void_call_2): New.
10787 (amd64_emit_ops): New.
10788 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10789 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10790 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10791 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10792 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10793 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10794 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10795 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10796 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10797 (i386_emit_stack_adjust, i386_emit_int_call_1)
10798 (i386_emit_void_call_2): New.
10799 (i386_emit_ops): New.
10800 (x86_emit_ops): New.
10801 (the_low_target): Install x86_emit_ops.
10802 * server.h (struct emit_ops): New.
10803 (get_raw_reg_func_addr): Declare.
10804 (current_insn_ptr, emit_error): Declare.
10805 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10806 (set_trace_state_variable_value): New defines.
10807 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10808 addr_get_trace_state_variable_value and
10809 addr_set_trace_state_variable_value.
10810 (symbol_list): New fields for get_raw_reg,
10811 get_trace_state_variable_value and set_trace_state_variable_value.
10812 (condfn): New typedef.
10813 (struct tracepoint): New field `compiled_cond'.
10814 (do_action_at_tracepoint): Clear compiled_cond.
10815 (get_trace_state_variable_value, set_trace_state_variable_value):
10816 Export in the IPA.
10817 (condition_true_at_tracepoint): If there's a compiled condition,
10818 run that.
10819 (current_insn_ptr, emit_error): New globals.
10820 (struct bytecode_address): New.
10821 (get_raw_reg_func_addr): New.
10822 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10823 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10824 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10825 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10826 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10827 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10828 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10829 (compile_tracepoint_condition, compile_bytecodes): New.
10830 * target.h (emit_ops): Forward declare.
10831 (struct target_ops): New field emit_ops.
10832 (target_emit_ops): New.
10833 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10834 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10835 * linux-low.c (linux_emit_ops): New.
10836 (linux_target_ops): Install it.
10837 * linux-low.h (struct linux_target_ops): New field emit_ops.
10838
92b72907
UW
108392010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10840
10841 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10842 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10843
fa593d66
PA
108442010-06-01 Pedro Alves <pedro@codesourcery.com>
10845 Stan Shebs <stan@codesourcery.com>
10846
10847 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10848 (all): Depend on $(extra_libraries).
10849 (install-only): Install the IPA.
10850 (IPA_OBJS, IPA_LIB): New.
10851 (clean): Remove the IPA lib.
10852 (IPAGENT_CFLAGS): New.
10853 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10854 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10855 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10856 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10857 * configure.ac: Check for atomic builtins support in the compiler.
10858 (IPA_DEPFILES, extra_libraries): Define.
10859 * configure.srv (ipa_obj): Add description.
10860 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10861 (i[34567]86-*-linux*): Set ipa_obj.
10862 (x86_64-*-linux*): Set ipa_obj.
10863 * linux-low.c (stabilizing_threads): New.
10864 (supports_fast_tracepoints): New.
10865 (linux_detach): Stabilize threads before detaching.
10866 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10867 the lwp is either not stabilizing, or is moving out of a jump pad.
10868 (linux_fast_tracepoint_collecting): New.
10869 (maybe_move_out_of_jump_pad): New.
10870 (enqueue_one_deferred_signal): New.
10871 (dequeue_one_deferred_signal): New.
10872 (linux_wait_for_event_1): If moving out of a jump pad, defer
10873 pending signals to later.
10874 (linux_stabilize_threads): New.
10875 (linux_wait_1): Check if threads need moving out of jump pads, and
10876 do it if so.
10877 (stuck_in_jump_pad_callback): New.
10878 (move_out_of_jump_pad_callback): New.
10879 (lwp_running): New.
10880 (linux_resume_one_lwp): Handle moving out of jump pads.
10881 (linux_set_resume_request): Dequeue deferred signals.
10882 (need_step_over_p): Also step over fast tracepoint jumps.
10883 (start_step_over): Also uninsert fast tracepoint jumps.
10884 (finish_step_over): Also reinsert fast tracepoint jumps.
10885 (linux_install_fast_tracepoint_jump): New.
10886 (linux_target_ops): Install linux_stabilize_threads and
10887 linux_install_fast_tracepoint_jump_pad.
10888 * linux-low.h (linux_target_ops) <get_thread_area,
10889 install_fast_tracepoint_jump_pad>: New fields.
10890 (struct lwp_info) <collecting_fast_tracepoint,
10891 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10892 (linux_get_thread_area): Declare.
10893 * linux-x86-low.c (jump_insn): New.
10894 (x86_get_thread_area): New.
10895 (append_insns): New.
10896 (push_opcode): New.
10897 (amd64_install_fast_tracepoint_jump_pad): New.
10898 (i386_install_fast_tracepoint_jump_pad): New.
10899 (x86_install_fast_tracepoint_jump_pad): New.
10900 (the_low_target): Install x86_get_thread_area and
10901 x86_install_fast_tracepoint_jump_pad.
10902 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10903 (struct fast_tracepoint_jump): New.
10904 (fast_tracepoint_jump_insn): New.
10905 (fast_tracepoint_jump_shadow): New.
10906 (find_fast_tracepoint_jump_at): New.
10907 (fast_tracepoint_jump_here): New.
10908 (delete_fast_tracepoint_jump): New.
10909 (set_fast_tracepoint_jump): New.
10910 (uninsert_fast_tracepoint_jumps_at): New.
10911 (reinsert_fast_tracepoint_jumps_at): New.
10912 (set_breakpoint_at): Use write_inferior_memory.
10913 (uninsert_raw_breakpoint): Use write_inferior_memory.
10914 (check_mem_read): Mask out fast tracepoint jumps.
10915 (check_mem_write): Mask out fast tracepoint jumps.
10916 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10917 (set_fast_tracepoint_jump): Declare.
10918 (delete_fast_tracepoint_jump)
10919 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10920 (reinsert_fast_tracepoint_jumps_at): Declare.
10921 * regcache.c: Don't compile many functions when building the
10922 in-process agent library.
10923 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10924 the register buffer in the heap.
10925 (free_register_cache): If the register buffer isn't owned by the
10926 regcache, don't free it.
10927 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10928 pre-existing register caches.
10929 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10930 type.
10931 (convert_ascii_to_int): : Constify `from' parameter type.
10932 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10933 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10934 the needed buffer in-place.
10935 (relocate_instruction): New.
10936 * server.c (handle_query) <qSymbols>: If the target supports
10937 tracepoints, give it a chance of looking up symbols. Report
10938 support for fast tracepoints.
10939 (handle_status): Stabilize threads.
10940 (process_serial_event): Adjust.
10941 * server.h (struct fast_tracepoint_jump): Forward declare.
10942 (struct process_info) <fast_tracepoint_jumps>: New field.
10943 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10944 (decode_X_packet, decode_M_packet): Adjust.
10945 (relocate_instruction): Declare.
10946 (in_process_agent_loaded): Declare.
10947 (tracepoint_look_up_symbols): Declare.
10948 (struct fast_tpoint_collect_status): Declare.
10949 (fast_tracepoint_collecting): Declare.
10950 (force_unlock_trace_buffer): Declare.
10951 (handle_tracepoint_bkpts): Declare.
10952 (initialize_low_tracepoint)
10953 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10954 * target.h (struct target_ops) <stabilize_threads,
10955 install_fast_tracepoint_jump_pad>: New fields.
10956 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10957 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10958 [HAVE_STDINT_H]: Include stdint.h.
10959 (trace_debug_1): Rename to ...
10960 (trace_vdebug): ... this.
10961 (trace_debug): Rename to ...
10962 (trace_debug_1): ... this. Add `level' parameter.
10963 (trace_debug): New.
10964 (ATTR_USED, ATTR_NOINLINE): New.
10965 (IP_AGENT_EXPORT): New.
10966 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10967 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10968 (about_to_request_buffer_space, trace_buffer_is_full)
10969 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10970 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10971 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10972 (traceframe_write_count, traceframes_created)
10973 (trace_state_variables)
10974 New renaming defines.
10975 (struct ipa_sym_addresses): New.
10976 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10977 (symbol_list): New.
10978 (ipa_sym_addrs): New.
10979 (all_tracepoint_symbols_looked_up): New.
10980 (in_process_agent_loaded): New.
10981 (write_e_ipa_not_loaded): New.
10982 (maybe_write_ipa_not_loaded): New.
10983 (tracepoint_look_up_symbols): New.
10984 (debug_threads) [IN_PROCESS_AGENT]: New.
10985 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10986 (UNKNOWN_SIDE_EFFECTS): New.
10987 (stop_tracing): New.
10988 (flush_trace_buffer): New.
10989 (stop_tracing_bkpt): New.
10990 (flush_trace_buffer_bkpt): New.
10991 (read_inferior_integer): New.
10992 (read_inferior_uinteger): New.
10993 (read_inferior_data_pointer): New.
10994 (write_inferior_data_pointer): New.
10995 (write_inferior_integer): New.
10996 (write_inferior_uinteger): New.
10997 (struct collect_static_trace_data_action): Delete.
10998 (enum tracepoint_type): New.
10999 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
11000 <actions_str, step_actions, step_actions_str>: Only include in
11001 GDBserver.
fa593d66
PA
11002 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11003 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11004 (tracepoints): Use IP_AGENT_EXPORT.
11005 (last_tracepoint): Don't include in the IPA.
11006 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11007 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11008 (alloced_trace_state_variables): New.
11009 (trace_state_variables): Use IP_AGENT_EXPORT.
11010 (traceframe_t): Delete unused variable.
11011 (circular_trace_buffer): Don't include in the IPA.
11012 (trace_buffer_start): Delete.
11013 (struct trace_buffer_control): New.
11014 (trace_buffer_free): Delete.
11015 (struct ipa_trace_buffer_control): New.
11016 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11017 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11018 New.
11019 (trace_buffer_ctrl): New.
11020 (TRACE_BUFFER_CTRL_CURR): New.
11021 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11022 Reimplement as macros.
11023 (trace_buffer_wrap): Delete.
11024 (traceframe_write_count, traceframe_read_count)
11025 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11026 (struct tracepoint_hit_ctx) <type>: New field.
11027 (struct fast_tracepoint_ctx): New.
11028 (memory_barrier): New.
11029 (cmpxchg): New.
11030 (record_tracepoint_error): Update atomically in the IPA.
11031 (clear_inferior_trace_buffer): New.
11032 (about_to_request_buffer_space): New.
11033 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11034 updating the same buffer.
11035 (add_tracepoint): Default the tracepoint's type to trap
11036 tracepoint, and orig_size to -1.
11037 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11038 internal variables.
11039 (create_trace_state_variable): New parameter `gdb'. Handle it.
11040 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11041 (cmd_qtdp): Handle fast tracepoints.
11042 (cmd_qtdv): Adjust.
11043 (max_jump_pad_size): New.
11044 (gdb_jump_pad_head): New.
11045 (get_jump_space_head): New.
11046 (claim_jump_space): New.
11047 (sort_tracepoints): New.
11048 (MAX_JUMP_SIZE): New.
11049 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11050 IPA.
11051 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11052 support. Upload fast traceframes, and delete internal IPA
11053 breakpoints.
11054 (stop_tracing_handler): New.
11055 (flush_trace_buffer_handler): New.
11056 (cmd_qtstop): Upload fast tracepoints.
11057 (response_tracepoint): Handle fast tracepoints.
11058 (tracepoint_finished_step): Upload fast traceframes. Set the
11059 tracepoint hit context's tracepoint type.
11060 (handle_tracepoint_bkpts): New.
11061 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11062 type. Add comment about fast tracepoints.
11063 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11064 non-existing action_str field.
11065 (get_context_regcache): Handle fast tracepoints.
11066 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11067 to the regcache.
11068 (fast_tracepoint_from_jump_pad_address): New.
11069 (fast_tracepoint_from_ipa_tpoint_address): New.
11070 (collecting_t): New.
11071 (force_unlock_trace_buffer): New.
11072 (fast_tracepoint_collecting): New.
11073 (collecting): New.
11074 (gdb_collect): New.
11075 (write_inferior_data_ptr): New.
11076 (target_tp_heap): New.
11077 (target_malloc): New.
11078 (download_agent_expr): New.
11079 (UALIGN): New.
11080 (download_tracepoints): New.
11081 (download_trace_state_variables): New.
11082 (upload_fast_traceframes): New.
11083 (IPA_FIRST_TRACEFRAME): New.
11084 (IPA_NEXT_TRACEFRAME_1): New.
11085 (IPA_NEXT_TRACEFRAME): New.
11086 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11087 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11088 (gdb_jump_pad_buffer_end): New.
11089 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11090 (initialize_tracepoint): Adjust.
11091 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11092 buffer. Initialize the low module.
11093 * utils.c (PREFIX, TOOLNAME): New.
11094 (malloc_failure): Use PREFIX.
11095 (error): In the IPA, an error causes an exit.
11096 (fatal, warning): Use PREFIX.
11097 (internal_error): Use TOOLNAME.
11098 (NUMCELLS): Increase to 10.
11099 * configure, config.in: Regenerate.
11100
d149dd1d
PA
111012010-06-01 Pedro Alves <pedro@codesourcery.com>
11102
11103 * server.c (handle_query) <qSupported>: Do two passes over the
11104 qSupported string to avoid nesting strtok.
11105
f6528abd
JK
111062010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11107
11108 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11109 (CDEPS): New.
11110 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11111 -Wl,--dynamic-list.
11112 * configure: Regenerate.
11113 * proc-service.list: New.
11114
ca2a87a0
JK
111152010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11116
11117 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11118 New comment.
11119
363a6e9f
OS
111202010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11121
11122 * gdbreplay.c (remote_open): Check error return from socket() call by
11123 its equality to -1 not by it being negative.
11124 * remote-utils.c (remote_open): Likewise.
11125
d23b6cb1
PA
111262010-05-23 Pedro Alves <pedro@codesourcery.com>
11127
11128 * config.h: Regenerate.
11129
28d3cf85
MK
111302010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11131
11132 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11133 doesn't provide PTRACE_GET_THREAD_AREA.
11134
fea36a59
MK
111352010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11136
11137 * linux-m68k-low.c: Include <asm/ptrace.h>
11138 (ps_get_thread_area): Implement.
11139
24b066ba
DE
111402010-05-03 Doug Evans <dje@google.com>
11141
11142 * event-loop.c (struct callback_event): New struct.
11143 (callback_list): New global.
11144 (append_callback_event, delete_callback_event): New functions.
11145 (process_callback): New function.
11146 (start_event_loop): Call it.
11147 * remote-utils.c (NOT_SCHEDULED): Define.
11148 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11149 moved out of readchar.
11150 (readchar): Rewrite. Call reschedule before returning.
11151 (reset_readchar): New function.
11152 (remote_close): Call it.
11153 (process_remaining, reschedule): New functions.
11154 * server.h (callback_handler_func): New typedef.
11155 (append_callback_event, delete_callback_event): Declare.
11156
9836d6ea
PA
111572010-05-03 Pedro Alves <pedro@codesourcery.com>
11158
11159 * proc-service.c (ps_pglobal_lookup): Use
11160 thread_db_look_up_one_symbol.
11161 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11162 parameter. Use it instead of all_symbols_looked_up.
11163 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11164 field.
11165 (all_symbols_looked_up): Don't declare.
11166 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11167 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11168 field.
11169 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11170 Set all_symbols_looked_up here.
11171 (thread_db_look_up_one_symbol): New.
11172 (thread_db_get_tls_address): Adjust.
11173 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11174 thread_db object on the heap, and tentatively set it in the
11175 process structure.
11176 (thread_db_init): Don't set all_symbols_looked_up here.
11177 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11178
7984d532
PA
111792010-05-03 Pedro Alves <pedro@codesourcery.com>
11180
11181 * linux-low.c (linux_kill, linux_detach): Adjust.
11182 (status_pending_p_callback): Remove redundant statement. Check
11183 for !TARGET_WAITIKIND_IGNORE, instead of
11184 TARGET_WAITKIND_STOPPED.
11185 (handle_tracepoints): Make sure LWP is locked. Adjust.
11186 (linux_wait_for_event_1): Adjust.
11187 (linux_cancel_breakpoints): New.
11188 (unsuspend_one_lwp): New.
11189 (unsuspend_all_lwps): New.
11190 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11191 (send_sigstop_callback): Change return type to int, add new
11192 `except' parameter and handle it.
11193 (suspend_and_send_sigstop_callback): New.
11194 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11195 pass them down. If SUSPEND, also increment the lwp's suspend
11196 count.
11197 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11198 (need_step_over_p): Don't consider suspended LWPs.
11199 (start_step_over): Adjust.
11200 (proceed_one_lwp): Change return type to int, add new `except'
11201 parameter and handle it.
11202 (unsuspend_and_proceed_one_lwp): New.
11203 (proceed_all_lwps): Use find_inferior instead of
11204 for_each_inferior.
11205 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11206 also decrement the suspend count of LWPs. Pass `except' down,
11207 instead of hacking its suspend count.
11208 (linux_pause_all): Add `freeze' parameter. Adjust.
11209 (linux_unpause_all): New.
11210 (linux_target_ops): Install linux_unpause_all.
11211 * server.c (handle_status): Adjust.
11212 * target.h (struct target_ops): New fields `unpause_all' and
11213 `cancel_breakpoints'. Add new parameter to `pause_all'.
11214 (pause_all): Add new `freeze' parameter.
11215 (unpause_all): New.
11216 (cancel_breakpoints): New.
11217 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11218 cancel breakpoints.
11219 (cmd_qtstart): Pause threads.
11220 (stop_tracing): Pause threads, and cancel breakpoints.
11221 * win32-low.c (win32_target_ops): Adjust.
11222
e471f25b
PA
112232010-05-03 Pedro Alves <pedro@codesourcery.com>
11224
11225 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11226 the inferior right away from here...
11227 (linux_wait_1): ... to here, and adjust to check the thread's
11228 last_resume_kind instead of the lwp's step or stop_expected flags.
11229
1915ef4f
PA
112302010-05-02 Pedro Alves <pedro@codesourcery.com>
11231
11232 * README: Use consistent `GDB' and `GDBserver' spellings.
11233
f9e39928
PA
112342010-05-02 Pedro Alves <pedro@codesourcery.com>
11235
11236 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11237 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11238 (linux_detach_one_lwp): Assume the lwp is stopped.
11239 (any_thread_of): Delete.
11240 (linux_detach): Stop all lwps here. Don't blindly delete all
11241 breakpoints.
11242 (delete_lwp_callback): New.
11243 (linux_mourn): Delete all lwps of the process that is gone.
11244 (linux_wait_1): Don't delete the last lwp of the process here.
11245 * mem-break.h (mark_breakpoints_out): Declare.
11246 * mem-break.c (mark_breakpoints_out): New.
11247 (free_all_breakpoints): Use it.
11248 * server.c (handle_target_event): If the process is gone, mark
11249 breakpoints out.
11250 * thread-db.c (struct thread_db) <create_bp>: New field.
11251 (thread_db_enable_reporting): Fix prototype. Store a thread event
11252 breakpoint reference in the thread_db struct.
11253 (thread_db_load_search): Clear the thread_db object.
11254 (try_thread_db_load_1): Ditto.
11255 (switch_to_process): New.
11256 (disable_thread_event_reporting): Use it.
11257 (remove_thread_event_breakpoints): New.
11258 (thread_db_detach, thread_db_mourn): Use it.
11259
1e7fc18c
PA
112602010-05-01 Pedro Alves <pedro@codesourcery.com>
11261
11262 * linux-low.c (linux_enable_event_reporting): New.
11263 (linux_wait_for_event_1, handle_extended_wait): Use it.
11264
02fc4de7
PA
112652010-04-30 Pedro Alves <pedro@codesourcery.com>
11266
11267 * linux-low.c (linux_kill_one_lwp, linux_kill)
11268 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11269 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11270 SIGSTOP even if the LWP is stopped.
11271 (send_sigstop_callback): New.
11272 (stop_all_lwps): Use send_sigstop_callback instead.
11273 (linux_resume_one_thread): Adjust.
11274 (proceed_one_lwp): Still proceed an LWP that the client has
11275 requested to stop, if we haven't reported it as stopped yet. Make
11276 sure that LWPs the client want stopped, have a pending SIGSTOP.
11277
bc3b5632
DE
112782010-04-26 Doug Evans <dje@google.com>
11279
ae1ada35
DE
11280 * server.c (handle_general_set): Make static.
11281
bc3b5632
DE
11282 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11283 Print received char after testing for error/eof instead of before.
11284 (input_interrupt): Tweak comment.
11285
65730243
DE
112862010-04-23 Doug Evans <dje@google.com>
11287
11288 * server.c (start_inferior): Print inferior argv if --debug.
11289
a8ae7dc0
AR
112902010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11291
11292 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11293 * nto-x86-low.c: Include server.h
11294
1c07cc19
PM
112952010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11296
11297 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11298 be consistent with other sources of this directory.
11299 (init_registers_amd64): Correct name of source file of this function
11300 in the comment.
11301
e0a61e09
PM
113022010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11303
11304 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11305 64-bit executables.
11306
54709339
PM
113072010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11308
11309 * win32-i386-low.c: Add 64-bit support.
11310 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11311 (init_registers_amd64): Declare.
11312 (mappings): Add 64-bit version of array.
11313 (init_windows_x86): New function.
11314 (the_low_target): Change init_arch field to init_windows_x86.
11315
e8f0053d
PM
113162010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11317
11318 * win32-low.c: Adapt to support also 64-bit architecture.
11319 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11320 (get_image_name): Use SIZE_T type for local variable `done'.
11321 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11322 (toolhelp_get_dll_name): Idem.
11323 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11324 Use uintptr_t typecast to avoid warning.
11325 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11326 (handle_exception): Use phex_nz to avoid warning.
11327 (win32_wait): Remove unused local variable `process'.
11328
c481e77e
PM
113292010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11330
11331 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11332 `amd64-avx.o'.
11333
12ea4b69
PM
113342010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11335
11336 * configure.ac: Use `ws2_32' library for srv_mingw.
11337 * configure: Regenerate.
11338 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11339 * remote-utils.c: Likewise.
11340
f6d1620c
L
113412010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11342
11343 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11344 if __x86_64__ is defined.
11345
8e642873
PM
113462010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11347
11348 * configure: Regenerate.
11349
711e434b
PM
113502010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11351
11352 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11353 * target.h (target_ops): New get_tib_address field.
11354 * win32-low.h (win32_thread_info): Add thread_local_base field.
11355 * win32-low.c (child_add_thread): Add tlb argument.
11356 Set thread_local_base field to TLB.
11357 (get_child_debug_event): Adapt to child_add_thread change.
11358 (win32_get_tib_address): New function.
11359 (win32_target_ops): Set get_tib_address field to
11360 win32_get_tib_address.
11361 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11362
505106cd
PA
113632010-04-12 Pedro Alves <pedro@codesourcery.com>
11364
505106cd
PA
11365 * linux-low.c (linux_mourn): Also remove the process.
11366 * server.c (handle_target_event): Don't remove the process here.
11367 * nto-low.c (nto_mourn): New.
11368 (nto_target_ops): Install it.
11369 * spu-low.c (spu_mourn): New.
11370 (spu_target_ops): Install it.
11371 * win32-low.c (win32_mourn): New.
11372 (win32_target_ops): Install it.
11373
e8470a06
PA
113742010-04-12 Pedro Alves <pedro@codesourcery.com>
11375
11376 * server.h (buffer_xml_printf): Remove redundant `;'.
11377
45ba0d02
PA
113782010-04-12 Pedro Alves <pedro@codesourcery.com>
11379
11380 * regcache.c (set_register_cache): Invalidate regcaches before
11381 changing the register cache layout.
11382 (regcache_invalidate_one): Allow a NULL regcache.
11383 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11384 regcaches before changing the register cache layout or the target
11385 regsets.
11386
59e04013
L
113872010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11388
11389 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11390 variable warning on Linux/x86-64.
11391
8336d594
PA
113922010-04-11 Pedro Alves <pedro@codesourcery.com>
11393
11394 GDBserver disconnected tracing support.
11395
11396 * linux-low.c (linux_remove_process): Delete.
11397 (add_lwp): Don't set last_resume_kind here.
11398 (linux_kill): Use `mourn'.
11399 (linux_detach): Use `thread_db_detach', and `mourn'.
11400 (linux_mourn): New.
11401 (linux_attach_lwp_1): Adjust comment.
11402 (linux_attach): last_resume_kind moved the thread_info; adjust.
11403 (status_pending_p_callback): Adjust.
11404 (linux_wait_for_event_1): Adjust.
11405 (count_events_callback, select_singlestep_lwp_callback)
11406 (select_event_lwp_callback, cancel_breakpoints_callback)
11407 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11408 (proceed_one_lwp): Adjust.
11409 (linux_async): Add debug output.
11410 (linux_thread_stopped): New.
11411 (linux_pause_all): New.
11412 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11413 linux_pause_all.
11414 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11415 (thread_db_free): Delete declaration.
11416 (thread_db_detach, thread_db_mourn): Declare.
11417 * thread-db.c (thread_db_init): Use thread_db_mourn.
11418 (thread_db_free): Delete, split in two.
11419 (disable_thread_event_reporting): New.
11420 (thread_db_detach): New.
11421 (thread_db_mourn): New.
11422
11423 * server.h (struct thread_info) <last_resume_kind>: New field.
11424 <attached>: Add comment.
11425 <gdb_detached>: New field.
11426 (handler_func): Change return type to int.
11427 (handle_serial_event, handle_target_event): Ditto.
11428 (gdb_connected): Declare.
11429 (tracing): Delete.
11430 (disconnected_tracing): Declare.
11431 (stop_tracing): Declare.
11432
11433 * server.c (handle_query) <qSupported>: Report support for
11434 disconnected tracing.
11435 (queue_stop_reply_callback): Account for running threads.
11436 (gdb_wants_thread_stopped): New.
11437 (gdb_wants_all_threads_stopped): New.
11438 (gdb_reattached_process): New.
11439 (handle_status): Clear the `gdb_detached' flag of all processes.
11440 In all-stop, stop all threads.
11441 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11442 (process_serial_event): If the remote connection breaks, or if an
11443 exit was forced with "monitor exit", force an event loop exit.
11444 Handle disconnected tracing on detach.
11445 (handle_serial_event): Adjust.
11446 (handle_target_event): If GDB isn't connected, forward events back
11447 to the inferior, unless the last process exited, in which case,
11448 exit gdbserver. Adjust interface.
11449
11450 * remote-utils.c (remote_open): Don't block in accept. Instead
11451 register an event loop source on the listen socket file
11452 descriptor. Refactor bits into ...
11453 (listen_desc): ... this new global.
11454 (gdb_connected): ... this new function.
11455 (enable_async_notification): ... this new function.
11456 (handle_accept_event): ... this new function.
11457 (remote_close): Clear remote_desc.
11458
11459 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11460
11461 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11462 New fields.
11463 (mourn_inferior): Define.
11464 (target_process_qsupported): Avoid the dangling else problem.
11465 (thread_stopped): Define.
11466 (pause_all): Define.
11467 (target_waitstatus_to_string): Declare.
11468 * target.c (target_waitstatus_to_string): New.
11469
11470 * tracepoint.c (tracing): Make extern.
11471 (disconnected_tracing): New.
11472 (stop_tracing): Make extern. Handle tracing stops due to GDB
11473 disconnecting.
11474 (cmd_qtdisconnected): New.
11475 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11476 (handle_tracepoint_general_set): Handle QTDisconnected.
11477
11478 * event-loop.c (event_handler_func): Change return type to int.
11479 (process_event): Bail out if the event handler wants the event
11480 loop to stop.
11481 (handle_file_event): Ditto.
11482 (start_event_loop): Bail out if the event handler wants the event
11483 loop to stop.
11484
11485 * nto-low.c (nto_target_ops): Adjust.
11486 * spu-low.c (spu_wait): Don't remove the process here.
11487 (spu_target_ops): Adjust.
11488 * win32-low.c (win32_wait): Don't remove the process here.
11489 (win32_target_ops): Adjust.
11490
5d267c4c
PA
114912010-04-11 Pedro Alves <pedro@codesourcery.com>
11492
11493 * regcache.c (realloc_register_cache): Invalidate inferior's
11494 regcache before recreating it.
11495
623ccd72
PA
114962010-04-09 Pedro Alves <pedro@codesourcery.com>
11497
11498 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11499
219f2f23
PA
115002010-04-09 Stan Shebs <stan@codesourcery.com>
11501 Pedro Alves <pedro@codesourcery.com>
11502
11503 * server.h (LONGEST): New.
11504 (struct thread_info) <while_stepping>: New field.
11505 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11506 Declare.
11507 (initialize_tracepoint, handle_tracepoint_general_set)
11508 (handle_tracepoint_query, tracepoint_finished_step)
11509 (tracepoint_was_hit, release_while_stepping_state_list):
11510 (current_traceframe): Declare.
11511 * server.c (handle_general_set): Handle tracepoint packets.
11512 (read_memory): New.
11513 (write_memory): New.
11514 (handle_search_memory_1): Use read_memory.
11515 (handle_query): Report support for conditional tracepoints, trace
11516 state variables, and tracepoint sources. Handle tracepoint
11517 queries.
11518 (main): Initialize the tracepoints module.
11519 (process_serial_event): Handle traceframe reads/writes.
11520
11521 * linux-low.c (handle_tracepoints): New.
11522 (linux_wait_1): Call it.
11523 (linux_resume_one_lwp): Handle while-stepping.
11524 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11525 (linux_target_ops): Install them.
11526 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11527 New field.
11528 * linux-x86-low.c (x86_supports_tracepoints): New.
11529 (the_low_target). Install it.
11530
11531 * mem-break.h (delete_breakpoint): Declare.
11532 * mem-break.c (delete_breakpoint): Make external.
11533
11534 * target.h (struct target_ops): Add `supports_tracepoints',
11535 `read_pc', and `write_pc' fields.
11536 (target_supports_tracepoints): Define.
11537 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11538 (phex_nz): New.
11539
11540 * regcache.h (struct regcache) <registers_owned>: New field.
11541 (init_register_cache, regcache_cpy): Declare.
11542 (regcache_read_pc, regcache_write_pc): Declare.
11543 (register_cache_size): Declare.
11544 (supply_regblock): Declare.
11545 * regcache.c (init_register_cache): New.
11546 (new_register_cache): Use it.
11547 (regcache_cpy): New.
11548 (register_cache_size): New.
11549 (supply_regblock): New.
11550 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 11551
219f2f23
PA
11552 * tracepoint.c: New.
11553
11554 * Makefile.in (OBS): Add tracepoint.o.
11555 (tracepoint.o): New rule.
11556
3a13a53b
L
115572010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11558
11559 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11560 (i386-mmx.o): New.
11561 (i386-mmx.c): Likewise.
11562 (i386-mmx-linux.o): Likewise.
11563 (i386-mmx-linux.c): Likewise.
11564
11565 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11566 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11567 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11568 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11569
11570 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11571 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11572 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11573
1570b33e
L
115742010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11575
11576 * Makefile.in (clean): Updated.
11577 (i386-avx.o): New.
11578 (i386-avx.c): Likewise.
11579 (i386-avx-linux.o): Likewise.
11580 (i386-avx-linux.c): Likewise.
11581 (amd64-avx.o): Likewise.
11582 (amd64-avx.c): Likewise.
11583 (amd64-avx-linux.o): Likewise.
11584 (amd64-avx-linux.c): Likewise.
11585
11586 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11587 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11588 (srv_amd64_regobj): Add amd64-avx.o.
11589 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11590 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11591 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11592 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11593 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11594 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11595 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11596
11597 * i387-fp.c: Include "i386-xstate.h".
11598 (i387_xsave): New.
11599 (i387_cache_to_xsave): Likewise.
11600 (i387_xsave_to_cache): Likewise.
11601 (x86_xcr0): Likewise.
11602
11603 * i387-fp.h (i387_cache_to_xsave): Likewise.
11604 (i387_xsave_to_cache): Likewise.
11605 (x86_xcr0): Likewise.
11606
11607 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11608 * linux-crisv32-low.c (target_regsets): Likewise.
11609 * linux-m68k-low.c (target_regsets): Likewise.
11610 * linux-mips-low.c (target_regsets): Likewise.
11611 * linux-ppc-low.c (target_regsets): Likewise.
11612 * linux-s390-low.c (target_regsets): Likewise.
11613 * linux-sh-low.c (target_regsets): Likewise.
11614 * linux-sparc-low.c (target_regsets): Likewise.
11615 * linux-xtensa-low.c (target_regsets): Likewise.
11616
11617 * linux-low.c: Include <sys/uio.h>.
11618 (regsets_fetch_inferior_registers): Support nt_type.
11619 (regsets_store_inferior_registers): Likewise.
11620 (linux_process_qsupported): New.
11621 (linux_target_ops): Add linux_process_qsupported.
11622
11623 * linux-low.h (regset_info): Add nt_type.
11624 (linux_target_ops): Add process_qsupported.
11625
11626 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11627 and <sys/uio.h>.
11628 (init_registers_i386_avx_linux): New.
11629 (init_registers_amd64_avx_linux): Likewise.
11630 (xmltarget_i386_linux_no_xml): Likewise.
11631 (xmltarget_amd64_linux_no_xml): Likewise.
11632 (PTRACE_GETREGSET): Likewise.
11633 (PTRACE_SETREGSET): Likewise.
11634 (x86_fill_xstateregset): Likewise.
11635 (x86_store_xstateregset): Likewise.
11636 (use_xml): Likewise.
11637 (x86_linux_update_xmltarget): Likewise.
11638 (x86_linux_process_qsupported): Likewise.
11639 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11640 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11641 init_registers_i386_linux here. Call
11642 x86_linux_update_xmltarget.
11643 (the_low_target): Add x86_linux_process_qsupported.
11644
11645 * server.c (handle_query): Call target_process_qsupported.
11646
11647 * target.h (target_ops): Add process_qsupported.
11648 (target_process_qsupported): New.
11649
fc7238bb
PA
116502010-04-03 Pedro Alves <pedro@codesourcery.com>
11651
11652 * inferiors.c (add_thread): Set last_status kind to
11653 TARGET_WAITKIND_IGNORE.
11654 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11655 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11656 (linux_wait_1): Move `thread' local definition to block that uses
11657 it. Don't NULL initialize `event_child'.
11658 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11659 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11660 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11661
bdabb078
PA
116622010-04-01 Pedro Alves <pedro@codesourcery.com>
11663
11664 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11665 an extended waitstatus, or by a watchpoint.
11666 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11667 thread was stepping or has been stopped by a watchpoint.
11668
d3bbe7a0
PA
116692010-04-01 Pedro Alves <pedro@codesourcery.com>
11670
11671 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11672 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11673 of another, then delete the previous, and validate all
11674 breakpoints.
11675 (validate_inserted_breakpoint): New.
11676 (delete_disabled_breakpoints): New.
11677 (validate_breakpoints): New.
11678 (check_mem_read): Validate breakpoints before trusting their
11679 shadow. Delete disabled breakpoints.
11680 (check_mem_write): Validate breakpoints before trusting they
11681 should be inserted. Delete disabled breakpoints.
11682 * mem-break.h (validate_breakpoints):
11683 * server.c (handle_query): Validate breakpoints when we see a
11684 qSymbol query.
11685
8b07ae33
PA
116862010-04-01 Pedro Alves <pedro@codesourcery.com>
11687
11688 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11689 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11690 if we could tell there's a GDB breakpoint at stop_pc.
11691 (need_step_over_p): Don't do a step over if we find a GDB
11692 breakpoint at the resume PC.
11693
11694 * mem-break.c (struct raw_breakpoint): New.
11695 (enum bkpt_type): New type `gdb_breakpoint'.
11696 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11697 fields. New field `raw'.
11698 (find_raw_breakpoint_at): New.
11699 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11700 breakpoint instead.
11701 (set_breakpoint_at): Adjust.
11702 (delete_raw_breakpoint): New.
11703 (release_breakpoint): New.
11704 (delete_breakpoint): Rename to...
11705 (delete_breakpoint_1): ... this. Add proc parameter. Use
11706 release_breakpoint. Return ENOENT.
11707 (delete_breakpoint): Reimplement.
11708 (find_breakpoint_at): Delete.
11709 (find_gdb_breakpoint_at): New.
11710 (delete_breakpoint_at): Delete.
11711 (set_gdb_breakpoint_at): New.
11712 (delete_gdb_breakpoint_at): New.
11713 (gdb_breakpoint_here): New.
11714 (set_reinsert_breakpoint): Use release_breakpoint.
11715 (uninsert_breakpoint): Rename to ...
11716 (uninsert_raw_breakpoint): ... this.
11717 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11718 (reinsert_raw_breakpoint): Change parameter type to
11719 raw_breakpoint.
11720 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11721 instead.
11722 (check_breakpoints): Adjust. Use release_breakpoint.
11723 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11724 (breakpoint_inserted_here): Ditto.
11725 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11726 Don't trust the breakpoint's shadow if it is not inserted.
11727 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11728 (delete_all_breakpoints): Adjust.
11729 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11730 use delete_breakpoint_1.
11731
11732 * mem-break.h (breakpoints_supported): Delete declaration.
11733 (set_gdb_breakpoint_at): Declare.
11734 (gdb_breakpoint_here): Declare.
11735 (delete_breakpoint_at): Delete.
11736 (delete_gdb_breakpoint_at): Declare.
11737
11738 * server.h (struct raw_breakpoint): Forward declare.
11739 (struct process_info): New field `raw_breakpoints'.
11740
11741 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11742 breakpoints.
11743
6bf5e0ba
PA
117442010-03-24 Pedro Alves <pedro@codesourcery.com>
11745
11746 * linux-low.c (status_pending_p_callback): Fix comment.
11747 (linux_wait_for_event_1): Move most of the internal breakpoint
11748 handling from here...
11749 (linux_wait_1): ... to here.
11750 (count_events_callback): New.
11751 (select_singlestep_lwp_callback): New.
11752 (select_event_lwp_callback): New.
11753 (cancel_breakpoints_callback): New.
11754 (select_event_lwp): New.
11755 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11756 priority to all LWPs that have had events that should be reported
11757 to the client. Cancel breakpoints when about to reporting the
11758 event to the client, not while stopping lwps. No longer cancel
11759 finished single-steps here.
11760 (cancel_finished_single_step): Delete.
11761 (cancel_finished_single_steps): Delete.
11762
414a389f
PA
117632010-03-24 Pedro Alves <pedro@codesourcery.com>
11764
11765 * mem-break.c (enum bkpt_type): New.
11766 (struct breakpoint): New field `type'.
11767 (set_breakpoint_at): Change return type to struct breakpoint
11768 pointer. Set type to `other_breakpoint' by default.
11769 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11770 in the breakpoint list.
11771 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11772 (reinsert_breakpoint): Rename to ...
11773 (reinsert_raw_breakpoint): ... this.
11774 (reinsert_breakpoints_at): Adjust.
11775 * mem-break.h (struct breakpoint): Declare.
11776 (set_breakpoint_at): Change return type to struct breakpoint
11777 pointer.
11778
2280c721
PA
117792010-03-24 Pedro Alves <pedro@codesourcery.com>
11780
11781 * server.c (handle_query): Assign, not compare.
11782
d50171e4
PA
117832010-03-24 Pedro Alves <pedro@codesourcery.com>
11784
11785 Teach linux gdbserver to step-over-breakpoints.
11786
11787 * linux-low.c (can_hardware_single_step): New.
11788 (supports_breakpoints): New.
11789 (handle_extended_wait): If stopping threads, read the stop pc of
11790 the new cloned LWP.
11791 (get_pc): New.
11792 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11793 low target doesn't support retrieving the PC.
11794 (add_lwp): Set last_resume_kind to resume_continue.
11795 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11796 (linux_attach): Don't clear stop_expected. Set the lwp's
11797 last_resume_kind to resume_stop.
11798 (linux_detach_one_lwp): Don't check for removed breakpoints.
11799 (check_removed_breakpoint): Delete.
11800 (status_pending_p): Rename to ...
11801 (status_pending_p_callback): ... this. Don't check for removed
11802 breakpoints. Don't consider threads that are stopped from GDB's
11803 perspective.
11804 (linux_wait_for_lwp): Always read the stop_pc here.
11805 (cancel_breakpoint): New.
11806 (step_over_bkpt): New global.
11807 (linux_wait_for_event_1): Implement stepping over breakpoints.
11808 (gdb_wants_lwp_stopped): New.
11809 (gdb_wants_all_stopped): New.
11810 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11811 single-step traps here. Store the thread's last reported target
11812 wait status.
11813 (send_sigstop): Don't clear stop_expected. Always set it,
11814 instead.
11815 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11816 (cancel_finished_single_step): New.
11817 (cancel_finished_single_steps): New.
11818 (wait_for_sigstop): Don't cancel finished single-step traps here.
11819 (linux_resume_one_lwp): Don't check for removed breakpoints.
11820 Don't set `step' on non-hardware step archs.
11821 (linux_set_resume_request): Ignore resume_stop requests if already
11822 stopping or stopped. Set the lwp's last_resume_kind.
11823 (resume_status_pending_p): Don't check for removed breakpoints.
11824 (need_step_over_p): New.
11825 (start_step_over): New.
11826 (finish_step_over): New.
11827 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11828 requests. Clear the thread's last reported target waitstatus.
11829 Don't use the `suspended' flag. Don't consider pending breakpoints.
11830 (linux_resume): Start a step-over if necessary.
11831 (proceed_one_lwp): New.
11832 (proceed_all_lwps): New.
11833 (unstop_all_lwps): New.
11834 * linux-low.h (struct lwp_info): Rewrite comment for the
11835 `suspended' flag. Add the `stop_pc' field. Delete the
11836 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11837 Add `'last_resume_kind' and `need_step_over' fields.
11838 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11839 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11840 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11841 (set_raw_breakpoint_at): New.
11842 (set_breakpoint_at): Rewrite to use it.
11843 (reinsert_breakpoint_handler): Delete.
11844 (set_reinsert_breakpoint): New.
11845 (reinsert_breakpoint_by_bp): Delete.
11846 (delete_reinsert_breakpoints): New.
11847 (uninsert_breakpoint): Rewrite.
11848 (uninsert_breakpoints_at): New.
11849 (reinsert_breakpoint): Rewrite.
11850 (reinsert_breakpoints_at): New.
11851 (check_breakpoints): Rewrite.
11852 (breakpoint_here): New.
11853 (breakpoint_inserted_here): New.
11854 (check_mem_read): Adjust.
11855 * mem-break.h (breakpoints_supported, breakpoint_here)
11856 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11857 (reinsert_breakpoint_by_bp): Delete declaration.
11858 (delete_reinsert_breakpoints): Declare.
11859 (reinsert_breakpoint): Delete declaration.
11860 (reinsert_breakpoints_at): Declare.
11861 (uninsert_breakpoint): Delete declaration.
11862 (uninsert_breakpoints_at): Declare.
11863 (check_breakpoints): Adjust prototype.
11864 * server.h: Adjust include order.
11865 (struct thread_info): Declare here. Add a `last_status' field.
11866
30ba68cb
MS
118672010-03-23 Michael Snyder <msnyder@vmware.com>
11868
11869 * server.c (crc32): New function.
11870 (handle_query): Add handling for 'qCRC:' request.
11871
b9a881c2
PA
118722010-03-23 Pedro Alves <pedro@codesourcery.com>
11873
11874 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11875 lwp had been stopped by a watchpoint.
11876
e92d13d5
PA
118772010-03-16 Pedro Alves <pedro@codesourcery.com>
11878
11879 * server.h (internal_error): Declare.
11880 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11881 * utils.c (internal_error): New function.
11882
64daa791
AS
118832010-03-15 Andreas Schwab <schwab@redhat.com>
11884
11885 * configure.srv: Fix typo setting srv_regobj.
11886
f52cd8cd
PA
118872010-03-15 Pedro Alves <pedro@codesourcery.com>
11888
11889 * linux-low.c (fetch_register): Avoid passing a non string literal
11890 format to `error'.
11891 (usr_store_inferior_registers): Ditto.
11892
93ae6fdc
PA
118932010-03-14 Pedro Alves <pedro@codesourcery.com>
11894
11895 * linux-low.c (linux_write_memory): Bail out early if peeking
11896 memory failed.
11897
c3adc08c
PA
118982010-03-14 Pedro Alves <pedro@codesourcery.com>
11899
11900 * linux-low.h (struct lwp_info): New fields
11901 `stopped_by_watchpoint' and `stopped_data_address'.
11902 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11903 here, and cache them in the lwp object.
11904 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11905 directly.
11906 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11907 field.
11908 (linux_stopped_by_watchpoint): Rewrite.
11909 (linux_stopped_data_address): Rewrite.
11910
bce522a2
PA
119112010-03-06 Simo Melenius <simo.melenius@iki.fi>
11912
11913 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11914 switching the current inferior, not before.
11915
90884b2b
L
119162010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11917
11918 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11919 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11920 i386-linux.c and amd64-linux.c.
11921 (reg-i386.o): Removed.
11922 (reg-i386.c): Likewise.
11923 (reg-i386-linux.o): Likewise.
11924 (reg-i386-linux.c): Likewise.
11925 (reg-x86-64.o): Likewise.
11926 (reg-x86-64.c): Likewise.
11927 (reg-x86-64-linux.o): Likewise.
11928 (reg-x86-64-linux.c): Likewise.
11929 (i386.o): New.
11930 (i386.c): Likewise.
11931 (i386-linux.o): Likewise.
11932 (i386-linux.c): Likewise.
11933 (amd64.o): Likewise.
11934 (amd64.c): Likewise.
11935 (amd64-linux.o): Likewise.
11936 (amd64-linux.c): Likewise.
11937
11938 * configure.srv (srv_i386_regobj): New.
11939 (srv_i386_linux_regobj): Likewise.
11940 (srv_amd64_regobj): Likewise.
11941 (srv_amd64_linux_regobj): Likewise.
11942 (srv_i386_32bit_xmlfiles): Likewise.
11943 (srv_i386_64bit_xmlfiles): Likewise.
11944 (srv_i386_xmlfiles): Likewise.
11945 (srv_amd64_xmlfiles): Likewise.
11946 (srv_i386_linux_xmlfiles): Likewise.
11947 (srv_amd64_linux_xmlfiles): Likewise.
11948 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11949 srv_xmlfiles to $srv_i386_xmlfiles.
11950 (i[34567]86-*-mingw32ce*): Likewise.
11951 (i[34567]86-*-mingw*): Likewise.
11952 (i[34567]86-*-nto*): Likewise.
11953 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11954 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11955 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11956 (x86_64-*-linux*): Likewise.
11957
11958 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11959 (init_registers_amd64_linux): New.
11960 (x86_arch_setup): Replace init_registers_x86_64_linux with
11961 init_registers_amd64_linux.
11962
193f13e6
MK
119632010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11964
11965 * configure.ac: Check for libdl. If it is not available link against
11966 static libthread_db.
11967 * configure: Regenerate.
11968
85d721b8
PA
119692010-02-22 Pedro Alves <pedro@codesourcery.com>
11970
11971 PR9605
11972
11973 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11974 handing a read watchpoint.
11975 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11976
6076632b
DE
119772010-02-12 Doug Evans <dje@google.com>
11978
11979 * linux-low.c (linux_supports_tracefork_flag): Document.
11980 (linux_look_up_symbols): Add comment.
11981
3327ccf7
L
119822010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11983
11984 * regcache.c (supply_register): Clear regcache if buf is NULL.
11985
0718675c 119862010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 11987 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
11988
11989 * inferiors.c (find_inferior): Add function documentation.
11990 (unloaded_dll): Handle the case where the unloaded dll has not
11991 been previously registered in the dll list.
11992
177321bd
DJ
119932010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11994
11995 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11996 (thumb2_breakpoint): New.
11997 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11998
2b009048
DJ
119992010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12000
12001 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12002 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12003 breakpoints.
12004
3be029c7
PA
120052010-01-21 Pedro Alves <pedro@codesourcery.com>
12006
12007 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12008
18f5de3b
JK
120092010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12010
12011 * linux-s390-low.c (s390_collect_ptrace_register)
12012 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12013
3743bb4f
DE
120142010-01-21 Doug Evans <dje@google.com>
12015
14ce3065
DE
12016 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12017 (PTRACE_ARG4_TYPE): New macro.
12018 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12019 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12020 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12021 (usr_store_inferior_registers): Ditto.
12022 (linux_read_memory, linux_write_memory): Ditto.
12023 (linux_test_for_tracefork): Ditto.
12024
3743bb4f
DE
12025 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12026 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12027
8b315be5
PA
120282010-01-21 Pedro Alves <pedro@codesourcery.com>
12029
12030 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12031 target.
12032
85492558
PA
120332010-01-21 Pedro Alves <pedro@codesourcery.com>
12034
12035 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12036 prototype to take a regcache. Adjust.
12037
442ea881
PA
120382010-01-20 Pedro Alves <pedro@codesourcery.com>
12039
12040 * regcache.h (struct thread_info): Forward declare.
12041 (struct regcache): New.
12042 (new_register_cache): Adjust prototype.
12043 (get_thread_regcache): Declare.
12044 (free_register_cache): Adjust prototype.
12045 (registers_to_string, registers_from_string): Ditto.
12046 (supply_register, supply_register_by_name, collect_register)
12047 (collect_register_as_string, collect_register_by_name): Ditto.
12048 * regcache.c (struct inferior_regcache_data): Delete.
12049 (get_regcache): Rename to ...
12050 (get_thread_regcache): ... this. Adjust. Switch inferior before
12051 fetching registers.
12052 (regcache_invalidate_one): Adjust.
12053 (regcache_invalidate): Fix prototype.
12054 (new_register_cache): Return the new register cache.
12055 (free_register_cache): Change prototype.
12056 (realloc_register_cache): Adjust.
12057 (registers_to_string): Change prototype to take a regcache. Adjust.
12058 (registers_from_string): Ditto.
12059 (register_data): Ditto.
12060 (supply_register): Ditto.
12061 (supply_register_by_name): Ditto.
12062 (collect_register): Ditto.
12063 (collect_register_as_string): Ditto.
12064 (collect_register_by_name): Ditto.
12065 * server.c (process_serial_event): Adjust.
12066 * linux-low.h (regset_fill_func, regset_store_func): Change
12067 prototype.
12068 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12069 Change prototype.
12070 * linux-low.c (get_stop_pc): Adjust.
12071 (check_removed_breakpoint): Adjust.
12072 (linux_wait_for_event): Adjust.
12073 (linux_resume_one_lwp): Adjust.
12074 (fetch_register): Add regcache parameter. Adjust.
12075 (usr_store_inferior_registers): Ditto.
12076 (regsets_fetch_inferior_registers): Ditto.
12077 (regsets_store_inferior_registers): Ditto.
12078 (linux_fetch_registers, linux_store_registers): Ditto.
12079 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12080 regcache. Adjust.
43aaf8b6
PA
12081 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12082 Ditto.
442ea881
PA
12083 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12084 prototype to take a regcache.
12085 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12086 * remote-utils.c (convert_ascii_to_int, outreg)
12087 (prepare_resume_reply): Change prototype to take a regcache.
12088 Adjust.
12089 * target.h (struct target_ops) <fetch_registers, store_registers>:
12090 Change prototype to take a regcache.
12091 (fetch_inferior_registers, store_inferior_registers): Change
12092 prototype to take a regcache. Adjust.
12093 * proc-service.c (ps_lgetregs): Adjust.
12094 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12095 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12096 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12097 take a regcache. Adjust.
12098 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12099 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12100 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12101 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12102 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12103 (cris_cannot_fetch_register):
12104 (cris_breakpoint_at): Change prototype to take a regcache.
12105 Adjust.
12106 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12107 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12108 to take a regcache. Adjust.
12109 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12110 Adjust.
12111 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12112 take a regcache. Adjust.
12113 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12114 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12115 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12116 * linux-mips-low.c (mips_get_pc):
12117 (mips_set_pc): Change prototype to take a regcache. Adjust.
12118 (mips_reinsert_addr): Adjust.
12119 (mips_collect_register): Change prototype to take a regcache.
12120 Adjust.
12121 (mips_supply_register):
12122 (mips_collect_register_32bit, mips_supply_register_32bit)
12123 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12124 (mips_store_fpregset): Ditto.
43aaf8b6
PA
12125 * linux-ppc-low.c (ppc_supply_ptrace_register)
12126 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
12127 (parse_spufs_run): Adjust.
12128 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12129 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12130 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12131 take a regcache. Adjust.
12132 * linux-s390-low.c (s390_collect_ptrace_register)
12133 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12134 (s390_set_pc): Change prototype to take a regcache. Adjust.
12135 (s390_arch_setup): Adjust.
12136 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12137 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12138 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12139 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12140 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12141 regcache. Adjust.
12142 (sparc_breakpoint_at): Adjust.
12143 * linux-xtensa-low.c (xtensa_fill_gregset):
12144 (xtensa_store_gregset):
12145 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12146 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12147 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12148 prototype to take a regcache. Adjust.
12149 * win32-arm-low.c (arm_fetch_inferior_register)
12150 (arm_store_inferior_register): Change prototype to take a
12151 regcache. Adjust.
12152 * win32-i386-low.c (i386_fetch_inferior_register)
12153 (i386_store_inferior_register): Change prototype to take a
12154 regcache. Adjust.
12155 * win32-low.c (child_fetch_inferior_registers)
12156 (child_store_inferior_registers): Change prototype to take a
12157 regcache. Adjust.
12158 (win32_wait): Adjust.
12159 (win32_fetch_inferior_registers): Change prototype to take a
12160 regcache. Adjust.
12161 (win32_store_inferior_registers): Adjust.
12162 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12163 store_inferior_register>: Change prototype to take a regcache.
12164
60c3d7b0
DE
121652010-01-20 Doug Evans <dje@google.com>
12166
12167 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12168 #ifdef.
12169 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 12170 (W_STOPCODE): Provide definition if missing.
60c3d7b0 12171
dc146f7c
VP
121722010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12173
12174 * linux-low.c (linux_core_of_thread): New.
12175 (compare_ints, show_process, list_threads): New.
12176 (linux_qxfer_osdata): Report threads and cores.
12177 (linux_target_op): Register linux_core_of_thread.
12178 * remote-utils.c (prepare_resume_reply): Report the core.
12179 (buffer_xml_printf): Support %d specifier.
12180 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12181 New.
12182 (handle_query): Handle qXfer:threads. Announce availability
12183 thereof.
12184 * target.h (struct target_ops): New field core_of_thread.
12185
7803799a
UW
121862010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12187
12188 * Makefile.in (clean): Remove new generated files.
12189 (reg-s390.o, reg-s390.c): Remove rules.
12190 (reg-s390x.o, reg-s390x.c): Likewise.
12191 (s390-linux32.o, s390-linux32.c): Add rules.
12192 (s390-linux64.o, s390-linux64.c): Likewise.
12193 (s390x-linux64.o, s390x-linux64.c): Likewise.
12194 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12195 * linux-s390-low.c: Include <elf.h>.
12196 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12197 (init_registers_s390): Remove prototype.
12198 (init_registers_s390x): Likewise.
12199 (init_registers_s390_linux32): Add prototype.
12200 (init_registers_s390_linux64): Likewise.
12201 (init_registers_s390x_linux64): Likewise.
12202 (s390_num_regs_3264): New define.
12203 (s390_regmap_3264): New global variable.
12204 (s390_cannot_fetch_register): Remove obsolete check.
12205 (s390_cannot_store_register): Likewise.
12206 (s390_collect_ptrace_register): Handle upper/lower register halves.
12207 (s390_supply_ptrace_register): Likewise.
12208 (s390_fill_gregset): Update to register number changes.
12209 (s390_get_hwcap): New routine.
12210 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12211 Install appropriate regmap and register set.
12212
6e7ffa39
JB
122132010-01-01 Joel Brobecker <brobecker@adacore.com>
12214
12215 * server.c (gdbserver_version): Update copyright year to 2010.
12216 * gdbreplay.c (gdbreplay_version): Likewise.
12217
957f3f49
DE
122182009-12-28 Doug Evans <dje@google.com>
12219
12220 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12221 elf/external.h. Include <elf.h> instead but only if necessary.
12222
ca5c370d
PA
122232009-12-28 Pedro Alves <pedro@codesourcery.com>
12224
12225 * linux-low.c (linux_remove_process): Remove `detaching'
12226 parameter. Don't release/detach from thread_db here.
12227 (linux_kill): Release/detach from thread_db here, ...
12228 (linux_detach): ... and here, before actually detaching.
12229 (linux_wait_1): ... and here, when a process exits.
12230 * thread-db.c (any_thread_of): New.
12231 (thread_db_free): Switch the current inferior to a thread of the
12232 passed in process.
12233
4ee62156
DE
122342009-12-21 Doug Evans <dje@google.com>
12235
d90e6a88
DE
12236 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12237
c5f62d5f
DE
12238 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12239 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12240 warning ifndef __NR_tkill. Move setting of errno there too.
12241 Delete unnecessary resetting of errno after syscall.
12242 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12243
10e86dd7
DE
12244 * configure.ac: Check for dladdr.
12245 * config.in: Regenerate.
12246 * configure: Regenerate.
12247 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12248 (try_thread_db_load): Update.
12249
4ee62156
DE
12250 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12251
00f515da
DE
122522009-12-18 Doug Evans <dje@google.com>
12253
e9464885
DE
12254 * event-loop.c: Include unistd.h if it exists.
12255
07d4f67e
DE
12256 * linux-low.c (my_waitpid): Move definition away from being in
12257 between linux_tracefork_child/linux_test_for_tracefork.
12258
00f515da
DE
12259 * gdb_proc_service.h (psaddr_t): Fix type.
12260 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12261 signature to match glibc.
12262
1de1badb
DE
122632009-12-16 Doug Evans <dje@google.com>
12264
12265 * linux-low.c (linux_read_memory): Fix argument to read.
12266
aeeb81d1
PA
122672009-11-26 Pedro Alves <pedro@codesourcery.com>
12268
12269 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12270 events, don't leave current_inferior pointing at null.
12271
10357975
PA
122722009-11-26 Pedro Alves <pedro@codesourcery.com>
12273
12274 * win32-low.c (LOG): Delete.
12275 (OUTMSG): Output to stderr.
12276 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12277 on compile time LOG macro.
12278 (win32_wait): Fix debug output.
12279
cf6e3471
PA
122802009-11-26 Pedro Alves <pedro@codesourcery.com>
12281
12282 * win32-low.c (win32_add_one_solib): If the dll name is
12283 "ntdll.dll", prepend the system directory to the dll path.
12284
0c85e18e
MK
122852009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12286
12287 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12288
9ac544ce 122892009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 12290 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
12291
12292 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12293 * configure.ac: Check for __mcoldfire__ and set
12294 gdb_cv_m68k_is_coldfire.
12295 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12296 reg-cf.o and reg-m68k.o.
12297 * configure: Regenerated.
12298
fd7dd3e6
PA
122992009-11-16 Pedro Alves <pedro@codesourcery.com>
12300
12301 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12302 Pass it to thread_db_free.
12303 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12304 proper `detaching' argument to linux_remove_process.
12305 * linux-low.h (thread_db_free): Add `detaching' parameter.
12306 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12307 to thread_db_free.
12308 (thread_db_free): Add `detaching' parameter. Only
12309 call td_ta_clear_event if detaching from process.
12310
75aa492e
MK
123112009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12312
12313 * thread-db.c (thread_db_free): Fix typo.
12314
21e1bee4
PP
123152009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12316
12317 PR gdb/10838
12318 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12319
8838b45e
NS
123202009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12321
12322 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12323 with an i686 compiler.
12324 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12325 needed.
12326 * configure: Rebuilt.
12327
8a35fb51
SL
123282009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12329
12330 PR gdb/10783
12331
12332 * server.c (handle_search_memory_1): Correct read_addr initialization
12333 in loop for searching subsequent chunks.
12334
96f15937
PP
123352009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12336
12337 * configure.ac: New --with-libthread-db option.
12338 * thread-db.c: Allow direct dependence on libthread_db.
12339 (thread_db_free): Adjust.
12340 * config.in: Regenerate.
12341 * configure: Likewise.
889bf7c5 12342
5f7d1694
PP
123432009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12344
12345 PR gdb/10757
12346 * thread-db.c (attach_thread): New function.
12347 (maybe_attach_thread): Return success/failure.
12348 (find_new_threads_callback): Adjust.
889bf7c5
PA
12349 (thread_db_find_new_threads): Loop until no new threads.
12350
88e3b899
PA
123512009-10-13 Pedro Alves <pedro@codesourcery.com>
12352
12353 * proc-service.c (ps_lgetregs): Formatting.
12354
cdbfd419
PP
123552009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12356
12357 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12358 * configure.ac: Adjust.
12359 * linux-low.h (struct process_info_private): Move members to struct
12360 thread_db.
12361 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12362 * linux-low.c (linux_remove_process): Adjust.
12363 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12364 * server.c (handle_query): Move code ...
12365 (handle_monitor_command): ... here. New function.
12366 * target.h (struct target_ops): New member.
12367 * thread-db.c (struct thread_db): New.
12368 (libthread_db_search_path): New variable.
12369 (thread_db_create_event, thread_db_enable_reporting)
12370 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12371 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12372 (try_thread_db_load_1, dladdr_to_soname): New functions.
12373 (try_thread_db_load, thread_db_load_search): New functions.
12374 (thread_db_init): Search for libthread_db.
12375 (thread_db_free): New function.
12376 (thread_db_handle_monitor_command): Likewise.
12377 * config.in: Regenerate.
12378 * configure: Regenerate.
889bf7c5 12379
4168d2d6
UW
123802009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12381
12382 * spu-low.c (spu_kill): Wait for inferior to terminate.
12383 Call clear_inferiors.
12384 (spu_detach): Call clear_inferiors.
12385
81ecdfbb
RW
123862009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12387
12388 * aclocal.m4: Regenerate.
12389 * config.in: Likewise.
12390 * configure: Likewise.
12391
0b9ff2c0
UW
123922009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12393
12394 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12395 (parse_spufs_run): New function.
12396 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12397 (ppc_breakpoint_at): Handle SPU breakpoints.
12398
efcbbd14
UW
123992009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12400
12401 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12402 (SPUFS_MAGIC): Define.
12403 (spu_enumerate_spu_ids): New function.
12404 (linux_qxfer_spu): New function.
12405 (linux_target_ops): Install linux_qxfer_spu.
12406
f4d9bade
UW
124072009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12408
12409 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12410 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12411 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12412 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12413 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12414 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12415 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12416 (init_registers_powerpc_cell32l): Add prototype.
12417 (init_registers_powerpc_cell64l): Likewise.
12418 (ppc_arch_setup): Detect Cell/B.E. architecture.
12419
96e946ca
RW
124202009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12421
12422 * Makefile.in (datarootdir): New variable.
12423
58d6951d
DJ
124242009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12425
12426 * linux-low.c (linux_write_memory): Update debugging output.
12427 * Makefile.in (clean): Add new descriptions.
12428 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12429 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12430 * configure.srv: Add new files for arm*-*-linux*.
12431 * linux-arm-low.c: Add new declarations.
12432 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12433 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12434 (HWCAP_VFPv3D16): New.
12435 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12436 instead of __IWMMXT__.
12437 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12438 (arm_arch_setup): New.
12439 (target_regsets): Remove #ifdef. Add VFP regset.
12440 (the_low_target): Use arm_arch_setup.
12441
12b42a12
DJ
124422009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12443
12444 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12445 the main thread again.
12446
ac8c974e
AR
124472009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12448
12449 Adding Neutrino gdbserver.
12450 * configure: Regenerated.
12451 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12452 * configure.srv (i[34567]86-*-nto*): New target.
12453 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12454 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12455 (nto_comctrl) [__QNX__]: New function.
12456 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12457
4424e0c3 124582009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
12459
12460 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12461 srv_tgtobj.
12462
912cf4ba
PA
124632009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12464 Pedro Alves <pedro@codesourcery.com>
12465
12466 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12467 don't support CONTEXT_EXTENDED_REGISTERS.
12468 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12469 (the_low_target): Install them.
12470 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12471 failing with ERROR_PIPE_NOT_CONNECTED.
12472
aa5ca48f
DE
124732009-06-30 Doug Evans <dje@google.com>
12474 Pierre Muller <muller@ics.u-strasbg.fr>
12475
12476 Add h/w watchpoint support to x86-linux, win32-i386.
12477 * Makefile.in (SFILES): Add i386-low.c
12478 (i386_low_h): Define.
12479 (i386-low.o): Add dependencies.
12480 (linux-x86-low.o): Add i386-low.h dependency.
12481 (win32-i386-low.o): Ditto.
12482 * i386-low.c: New file.
12483 * i386-low.h: New file.
12484 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12485 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12486 * linux-low.c (linux_add_process): Initialize arch_private.
12487 (linux_remove_process): Free arch_private.
12488 (add_lwp): Initialize arch_private.
12489 (delete_lwp): Free arch_private.
12490 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12491 provided.
12492 * linux-low.h (process_info_private): New member arch_private.
12493 (lwp_info): New member arch_private.
12494 (linux_target_ops): New members new_process, new_thread,
12495 prepare_to_resume.
12496 (ptid_of): New macro.
12497 * linux-x86-low.c: Include stddef.h, i386-low.h.
12498 (arch_process_info): New struct.
12499 (arch_lwp_info): New struct.
12500 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12501 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12502 (i386_dr_low_get_status): New function.
12503 (x86_insert_point, x86_remove_point): New functions.
12504 (x86_stopped_by_watchpoint): New function.
12505 (x86_stopped_data_address): New function.
12506 (x86_linux_new_process, x86_linux_new_thread): New functions.
12507 (x86_linux_prepare_to_resume): New function.
12508 (the_low_target): Add entries for insert_point, remove_point,
12509 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12510 prepare_to_resume.
12511 * server.c (debug_hw_points): New global.
12512 (monitor_show_help): Document set debug-hw-points.
12513 (handle_query): Process "set debug-hw-points".
12514 * server.h (debug_hw_points): Declare.
12515 (paddress): Declare.
12516 * utils.c (NUMCELLS, CELLSIZE): New macros.
12517 (get_sell, xsnprintf, paddress): New functions.
12518 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12519 remove_point, stopped_by_watchpoint, stopped_data_address.
12520 * win32-i386-low.c: Include i386-low.h.
12521 (debug_reg_state): Replaces dr.
12522 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12523 (i386_dr_low_get_status): New function.
12524 (i386_insert_point, i386_remove_point): New functions.
12525 (i386_stopped_by_watchpoint): New function.
12526 (i386_stopped_data_address): New function.
12527 (i386_initial_stuff): Update.
12528 (get_thread_context,set_thread_context,i386_thread_added): Update.
12529 (the_low_target): Add entries for insert_point,
12530 remove_point, stopped_by_watchpoint, stopped_data_address.
12531 * win32-low.c (win32_insert_watchpoint): New function.
12532 (win32_remove_watchpoint): New function.
12533 (win32_stopped_by_watchpoint): New function.
12534 (win32_stopped_data_address): New function.
12535 (win32_target_ops): Add entries for insert_watchpoint,
12536 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12537 * win32-low.h (win32_target_ops): New members insert_point,
12538 remove_point, stopped_by_watchpoint, stopped_data_address.
12539
d993e290
PA
125402009-06-25 Pedro Alves <pedro@codesourcery.com>
12541
12542 * server.c (process_serial_event): Re-return unsupported, not
12543 error, if the type isn't recognized. Re-allow supporting only
12544 insert or remove packets. Also call require_running for
12545 breakpoints. Add missing break statement to default case. Tidy.
12546 * target.h (struct target_ops): Rename insert_watchpoint to
12547 insert_point, and remove_watchpoint to remove_point.
12548
12549 * linux-low.h (struct linux_target_ops): Likewise.
12550 * linux-low.c (linux_insert_watchpoint): Rename to ...
12551 (linux_insert_point): ... this. Adjust.
12552 (linux_remove_watchpoint): Rename to ...
12553 (linux_remove_point): ... this. Adjust.
12554 (linux_target_ops): Adjust.
12555 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12556 (cris_insert_point): ... this.
12557 (cris_remove_watchpoint): Rename to ...
12558 (cris_remove_point): ... this.
12559 (the_low_target): Adjust.
12560
0f54c268
PM
125612009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12562
12563 * server.c (handle_v_kill): Pass signal_pid to
12564 kill_inferior if multi_process is zero.
12565
c6314022
AR
125662009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12567
12568 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12569 * target.h (target_ops): Comment for *_watchpoint to make it clear
12570 the functions can get types '0' and '1'.
12571
4463ce24
AR
125722009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12573
12574 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12575 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12576 * regcache.c (get_regcache): Likewise.
12577 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12578 * win32-low.c (child_fetch_inferior_registers): Remove check for
12579 regno 0.
12580
cf8fd78b
PA
125812009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12582 Pedro Alves <pedro@codesourcery.com>
12583
12584 * target.h (struct target_ops) <supports_multi_process>: New
12585 callback.
12586 (target_supports_multi_process): New.
12587 * server.c (handle_query): Even if GDB reports support, only
12588 enable multi-process if the target also supports it. Report
12589 multi-process support only if the target backend supports it.
12590 * linux-low.c (linux_supports_multi_process): New function.
12591 (linux_target_ops): Install it as target_supports_multi_process
12592 callback.
12593
47c0c975
DE
125942009-05-24 Doug Evans <dje@google.com>
12595
e09875d4
DE
12596 Global renaming of find_thread_pid to find_thread_ptid.
12597 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12598 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12599 All callers updated.
12600
e27d73f6
DE
12601 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12602 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12603 directly.
12604
47c0c975
DE
12605 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12606 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12607 (linux_resume_one_lwp): Ditto.
12608
2acc282a
DE
126092009-05-23 Doug Evans <dje@google.com>
12610
12611 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12612 from struct inferior_list_entry * to struct lwp_info *.
12613 All callers updated.
12614
9f1036c1
DE
126152009-05-13 Doug Evans <dje@google.com>
12616
12617 * linux-x86-low.c: Don't include assert.h.
12618 (x86_siginfo_fixup): Use fatal, not assert.
12619 (x86_arch_setup): Fix comment.
12620
d0722149
DE
126212009-05-12 Doug Evans <dje@google.com>
12622
12623 Biarch support for i386/amd64 gdbserver.
12624 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12625 Add linux-x86-low.c.
12626 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12627 (linux-x86-low.o): Add.
12628 * linux-x86-64-low.c: Delete.
12629 * linux-i386-low.c: Delete.
12630 * linux-x86-low.c: New file.
12631 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12632 linux-x86-low.o.
12633 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12634 linux-x86-low.o.
12635 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12636 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12637 (linux_child_pid_to_exec_file): New function.
12638 (elf_64_header_p, elf_64_file_p): New functions.
12639 (siginfo_fixup): New function.
12640 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12641 give target a chance to convert layout.
12642 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12643 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12644
fdeb2a12
DE
126452009-05-07 Doug Evans <dje@google.com>
12646
12647 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12648 (regsets_store_inferior_registers): Ditto.
12649
a6dbe5df
PA
126502009-05-06 Pedro Alves <pedro@codesourcery.com>
12651
12652 PR server/10048
12653
12654 * linux-low.c (must_set_ptrace_flags): Delete.
12655 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12656 of the global.
12657 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12658 `lwp->must_set_ptrace_flags' instead.
ba42693b 12659 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
12660 (linux_wait_1): ... not here.
12661
5091eb23
DE
126622009-04-30 Doug Evans <dje@google.com>
12663
9f767825
DE
12664 * inferiors.c (started_inferior_callback): New function.
12665 (attached_inferior_callback): New function.
12666 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12667 * server.c (print_started_pid, print_attached_pid): New functions.
12668 (detach_or_kill_for_exit): New function.
12669 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12670 * server.h (have_started_inferiors_p): Declare.
12671 (have_attached_inferiors_p): Declare.
12672
5091eb23
DE
12673 * inferiors.c (remove_process): Fix memory leak, free process.
12674 * linux-low.c (linux_remove_process): New function.
12675 (linux_kill): Call it instead of remove_process.
12676 (linux_detach, linux_wait_1): Ditto.
12677
155c8968
PA
126782009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12679
12680 * configure.srv: Add x86 Windows CE target.
12681
7fe519cb
UW
126822009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12683
12684 * inferiors.c (get_thread_process): Make global.
12685 * server.h (get_thread_process): Add prototype.
12686 * thread-db.c (find_one_thread): Use get_thread_process
12687 instead of current_process.
12688 (thread_db_get_tls_address): Do not crash if called when
12689 thread layer is not yet initialized.
12690
5472f405
UW
126912009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12692
12693 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12694 * spu-low.c (current_tid): Rename to ...
12695 (current_ptid): ... this.
12696 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12697 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12698 ptid_get_lwp (current_ptid) instead of current_tid.
12699 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12700 instead of current_tid. Use find_process_pid to verify pid
12701 argument is valid. Pass proper argument to remove_process.
12702 (spu_thread_alive): Compare current_ptid instead of current_tid.
12703 (spu_resume): Likewise.
12704
55ac2b99
PA
127052009-04-02 Pedro Alves <pedro@codesourcery.com>
12706
12707 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12708 variable.
12709
95954743
PA
127102009-04-01 Pedro Alves <pedro@codesourcery.com>
12711
12712 Implement the multiprocess extensions, and add linux multiprocess
12713 support.
12714
12715 * server.h (ULONGEST): Declare.
12716 (struct ptid, ptid_t): New.
12717 (minus_one_ptid, null_ptid): Declare.
12718 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12719 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12720 (struct inferior_list_entry): Change `id' type from unsigned from
12721 to ptid_t.
12722 (struct sym_cache, struct breakpoint, struct
12723 process_info_private): Forward declare.
12724 (struct process_info): Declare.
12725 (current_process): Declare.
12726 (all_processes): Declare.
12727 (initialize_inferiors): Declare.
12728 (add_thread): Adjust to use ptid_t.
12729 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12730 (add_process, remove_process, find_thread_pid): Declare.
12731 (find_inferior_id): Adjust to use ptid_t.
12732 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12733 (multi_process): Declare.
12734 (push_event): Adjust to use ptid_t.
12735 (read_ptid, write_ptid): Declare.
12736 (prepare_resume_reply): Adjust to use ptid_t.
12737 (clear_symbol_cache): Declare.
12738 * inferiors.c (all_processes): New.
12739 (null_ptid, minus_one_ptid): New.
12740 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12741 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12742 (add_thread): Change unsigned long to ptid. Remove gdb_id
12743 parameter. Adjust.
12744 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12745 (gdb_id_to_thread): Rename to ...
12746 (find_thread_pid): ... this. Change unsigned long to ptid.
12747 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12748 (loaded_dll, pull_pid_from_list): Adjust.
12749 (add_process, remove_process, find_process_pid)
12750 (get_thread_process, current_process, initialize_inferiors): New.
12751 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12752 (struct target_waitstatus) <related_pid>: Ditto.
12753 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12754 return type to int.
12755 (struct target_ops) <join>: Add `pid' argument.
12756 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12757 (struct target_ops) <wait>: Add `ptid' field. Change return type
12758 to ptid.
12759 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12760 (mywait): Add `ptid' argument. Change return type to ptid_t.
12761 (target_pid_to_str): Declare.
12762 * target.c (set_desired_inferior): Adjust to use ptids.
12763 (mywait): Add new `ptid' argument. Adjust.
12764 (target_pid_to_str): New.
12765 * mem-break.h (free_all_breakpoints): Declare.
12766 * mem-break.c (breakpoints): Delelete.
12767 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12768 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12769 to use per-process breakpoint list.
12770 (free_all_breakpoints): New.
12771 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12772 (symbol_cache, all_symbols_looked_up): Delete.
12773 (hexchars): New.
12774 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12775 read_ptid): New.
12776 (prepare_resume_reply): Change ptid argument's type from unsigned
12777 long to ptid_t. Adjust. Implement W;process and X;process.
12778 (free_sym_cache, clear_symbol_cache): New.
12779 (look_up_one_symbol): Adjust to per-process symbol cache. *
12780 * server.c (cont_thread, general_thread, step_thread): Change type
12781 to ptid_t.
12782 (attached): Delete.
12783 (multi_process): New.
12784 (last_ptid): Change type to ptid_t.
12785 (struct vstop_notif) <ptid>: Change type to ptid_t.
12786 (queue_stop_reply, push_event): Change `ptid' argument's type to
12787 ptid_t.
12788 (discard_queued_stop_replies): Add `pid' argument.
12789 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12790 changes. Don't reference the `attached' global.
12791 (attach_inferior): Adjust to mywait interface changes.
12792 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12793 features. Handle and report "multiprocess+". Handle
12794 "qAttached:PID".
12795 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12796 changes.
12797 (handle_v_kill): New.
12798 (handle_v_stopped): Adjust to use target_pid_to_str.
12799 (handle_v_requests): Allow multiple attaches and runs when
12800 multiprocess extensions are in effect. Handle "vKill".
12801 (myresume): Adjust to use ptids.
12802 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12803 (handle_status): Adjust to discard_queued_stop_replies interface
12804 change.
12805 (first_thread_of, kill_inferior_callback)
12806 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12807 (main): Call initialize_inferiors. Adjust to use ptids, killing
12808 and detaching from all inferiors. Handle multiprocess packet
12809 variants.
12810 * linux-low.h: Include gdb_proc_service.h.
12811 (struct process_info_private): New.
12812 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12813 <lwpid_of>: Use ptid_get_lwp.
12814 (get_lwp_thread): Adjust.
12815 (struct lwp_info): Add `dead' member.
12816 (find_lwp_pid): Declare.
12817 * linux-low.c (thread_db_active): Delete.
12818 (new_inferior): Adjust comment.
12819 (inferior_pid): Delete.
12820 (linux_add_process): New.
12821 (handle_extended_wait): Adjust.
12822 (add_lwp): Change unsigned long to ptid.
12823 (linux_create_inferior): Add process to processes table. Adjust
12824 to use ptids. Don't set new_inferior here.
12825 (linux_attach_lwp): Rename to ...
12826 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12827 it. Adjust to use ptids.
12828 (linux_attach_lwp): New.
12829 (linux_attach): Add process to processes table. Don't set
12830 new_inferior here.
12831 (struct counter): New.
12832 (second_thread_of_pid_p, last_thread_of_process_p): New.
12833 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12834 multiple processes.
12835 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12836 processes. Remove process from process table.
12837 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12838 to multiple processes.
12839 (any_thread_of): New.
12840 (linux_detach): Add `pid' argument, and handle it. Remove process
12841 from processes table.
12842 (linux_join): Add `pid' argument. Handle it.
12843 (linux_thread_alive): Change unsighed long argument to ptid_t.
12844 Consider dead lwps as not being alive.
12845 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12846 threads we're not interested in.
12847 (same_lwp, find_lwp_pid): New.
12848 (linux_wait_for_lwp): Change `pid' argument's type from int to
12849 ptid_t. Adjust.
12850 (linux_wait_for_event): Rename to ...
12851 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12852 from int to ptid_t. Adjust.
12853 (linux_wait_for_event): New.
12854 (linux_wait_1): Add `ptid' argument. Change return type to
12855 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12856 that exit from the process table.
12857 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12858 Adjust.
12859 (mark_lwp_dead): New.
12860 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12861 stopping all threads, mark its main lwp as dead.
12862 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12863 ptids.
12864 (fetch_register, usr_store_inferior_registers)
12865 (regsets_fetch_inferior_registers)
12866 (regsets_store_inferior_registers, linux_read_memory)
12867 (linux_write_memory): Inline `inferior_pid'.
12868 (linux_look_up_symbols): Adjust to use per-process
12869 `thread_db_active'.
12870 (linux_request_interrupt): Adjust to use ptids.
12871 (linux_read_auxv): Inline `inferior_pid'.
12872 (initialize_low): Don't reference thread_db_active.
12873 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12874 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12875 (ps_getpid): Return the pid of the current inferior.
12876 * thread-db.c (proc_handle, thread_agent): Delete.
12877 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12878 per-process data.
12879 (find_one_thread): Change argument type to ptid_t. Adjust to
12880 per-process data.
12881 (maybe_attach_thread): Adjust to per-process data and ptids.
12882 (thread_db_find_new_threads): Ditto.
12883 (thread_db_init): Ditto.
12884 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12885 processes table. Adjust to use ptids.
12886 (spu_kill, spu_detach): Adjust interface. Remove process from
12887 processes table.
12888 (spu_join, spu_thread_alive): Adjust interface.
12889 (spu_wait): Adjust interface. Remove process from processes
12890 table. Adjust to use ptids.
12891 * win32-low.c (current_inferior_tid): Delete.
12892 (current_inferior_ptid): New.
12893 (debug_event_ptid): New.
12894 (thread_rec): Take a ptid. Adjust.
12895 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12896 (child_delete_thread): Ditto.
12897 (do_initial_child_stuff): Add `attached' argument. Add process to
12898 processes table.
12899 (child_fetch_inferior_registers, child_store_inferior_registers):
12900 Adjust.
12901 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12902 (win32_attach): Pass 1 to do_initial_child_stuff.
12903 (win32_kill): Adjust interface. Remove process from processes
12904 table.
12905 (win32_detach): Ditto.
12906 (win32_join): Adjust interface.
12907 (win32_thread_alive): Take a ptid.
12908 (win32_resume): Adjust to use ptids.
12909 (get_child_debug_event): Ditto.
12910 (win32_wait): Adjust interface. Remove exiting process from
12911 processes table.
12912
bd99dc85
PA
129132009-04-01 Pedro Alves <pedro@codesourcery.com>
12914
12915 Non-stop mode support.
12916
12917 * server.h (non_stop): Declare.
12918 (gdb_client_data, handler_func): Declare.
12919 (delete_file_handler, add_file_handler, start_event_loop):
12920 Declare.
12921 (handle_serial_event, handle_target_event, push_event)
12922 (putpkt_notif): Declare.
12923 * target.h (enum resume_kind): New.
12924 (struct thread_resume): Replace `step' field by `kind' field.
12925 (TARGET_WNOHANG): Define.
12926 (struct target_ops) <wait>: Add `options' argument.
12927 <supports_non_stop, async, start_non_stop>: New fields.
12928 (target_supports_non_stop, target_async): New.
12929 (start_non_stop): Declare.
12930 (mywait): Add `options' argument.
12931 * target.c (mywait): Add `options' argument. Print child exit
12932 notifications here.
12933 (start_non_stop): New.
12934 * server.c (non_stop, own_buf, mem_buf): New globals.
12935 (struct vstop_notif): New.
12936 (notif_queue): New global.
12937 (queue_stop_reply, push_event, discard_queued_stop_replies)
12938 (send_next_stop_reply): New.
12939 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12940 interface changes.
12941 (attach_inferior): In non-stop mode, don't wait for the target
12942 here.
12943 (handle_general_set): Handle QNonStop.
12944 (handle_query): When handling qC, return the current general
12945 thread, instead of the first thread of the list.
12946 (handle_query): If the backend supports non-stop mode, include
12947 QNonStop+ in the qSupported query response.
12948 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12949 and non-stop mode.
12950 (handle_v_attach, handle_v_run): Handle non-stop mode.
12951 (handle_v_stopped): New.
12952 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12953 (myresume): Adjust to use resume_kind. Handle non-stop.
12954 (queue_stop_reply_callback): New.
12955 (handle_status): Handle non-stop mode.
12956 (main): Clear non_stop flag on reconnection. Use the event-loop.
12957 Refactor serial protocol handling from here ...
12958 (process_serial_event): ... to this new function. When GDB
12959 selects any thread, select one here. In non-stop mode, wait until
12960 GDB acks all pending events before exiting.
12961 (handle_serial_event, handle_target_event): New.
12962 * remote-utils.c (remote_open): Install remote_desc in the event
12963 loop.
12964 (remote_close): Remove remote_desc from the event loop.
12965 (putpkt_binary): Rename to...
12966 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12967 (putpkt_binary): New as wrapper around putpkt_binary_1.
12968 (putpkt_notif): New.
12969 (prepare_resume_reply): In non-stop mode, don't change the
12970 general_thread.
12971 * event-loop.c: New.
12972 * Makefile.in (OBJ): Add event-loop.o.
12973 (event-loop.o): New rule.
12974
12975 * linux-low.h (pid_of): Moved here.
12976 (lwpid_of): New.
12977 (get_lwp_thread): Use lwpid_of.
12978 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12979 * linux-low.c (pid_of): Delete.
12980 (inferior_pid): Use lwpid_of.
12981 (linux_event_pipe): New.
12982 (target_is_async_p): New.
12983 (delete_lwp): New.
12984 (handle_extended_wait): Use lwpid_of.
12985 (add_lwp): Don't set lwpid field.
12986 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12987 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12988 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12989 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12990 first. Adjust to linux_wait_for_event interface changes. Use
12991 lwpid_of.
12992 (linux_detach): Don't delete the main lwp here.
12993 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12994 (status_pending_p): Don't consider explicitly suspended lwps.
12995 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12996 pointer. Add OPTIONS argument. Change return type to int. Use
12997 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12998 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12999 pointer. Add status pointer argument. Return a pid instead of a
13000 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13001 changes. In non-stop mode, don't switch to a random thread.
13002 (linux_wait): Rename to...
13003 (linux_wait_1): ... this. Add target_options argument, and handle
13004 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13005 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13006 clean exit and signal exit code. Don't stop all threads in
13007 non-stop mode. In all-stop mode, only stop all threads when
13008 reporting a stop to GDB. Handle explicit thread stop requests.
13009 (async_file_flush, async_file_mark): New.
13010 (linux_wait): New.
13011 (send_sigstop): Use lwpid_of.
13012 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13013 interface changes. In non-stop mode, don't switch to a random
13014 thread.
13015 (linux_resume_one_lwp): Use lwpid_of.
13016 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13017 (linux_resume_one_thread): ... this. Handle resume_stop. In
13018 non-stop mode, don't look for pending flag in all threads.
13019 (resume_status_pending_p): Don't consider explicitly suspended
13020 threads.
13021 (my_waitpid): Reimplement. Emulate __WALL.
13022 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13023 Use lwpid_of.
13024 (sigchld_handler, linux_supports_non_stop, linux_async)
13025 (linux_start_non_stop): New.
13026 (linux_target_ops): Register linux_supports_non_stop, linux_async
13027 and linux_start_non_stop.
13028 (initialize_low): Install SIGCHLD handler.
13029 * thread-db.c (thread_db_create_event, find_one_thread)
13030 (thread_db_get_tls_address): Use lwpid_of.
13031 * win32-low.c (win32_detach): Adjust to use resume_kind.
13032 (win32_wait): Add `options' argument.
13033 * spu-low.c (spu_resume): Adjust to use resume_kind.
13034 (spu_wait): Add `options' argument.
13035
5b1c542e
PA
130362009-04-01 Pedro Alves <pedro@codesourcery.com>
13037
13038 Decouple target code from remote protocol.
13039
13040 * target.h (enum target_waitkind): New.
13041 (struct target_waitstatus): New.
13042 (struct target_ops) <wait>: Return an unsigned long. Take a
13043 target_waitstatus pointer instead of a char pointer.
13044 (mywait): Likewise.
13045 * target.c (mywait): Change prototype to return an unsigned long.
13046 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13047 * server.h (thread_from_wait, old_thread_from_wait): Delete
13048 declarations.
13049 (prepare_resume_reply): Change prototype to take a
13050 target_waitstatus.
13051 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13052 (last_status, last_ptid): New.
13053 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13054 pid instead of a signal.
13055 (attach_inferior): Remove "status" and "signal" parameters.
13056 Adjust.
13057 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13058 not as an address.
13059 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13060 (handle_v_requests, myresume): Remove "status" and "signal"
13061 parameters. Adjust.
13062 (handle_status): New.
13063 (main): Delete local `status'. Adjust.
13064 * remote-utils.c: Include target.h.
13065 (prepare_resume_reply): Change prototype to take a
13066 target_waitstatus. Adjust.
13067
13068 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13069 interface.
13070 * spu-low.c (spu_wait): Adjust.
13071 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13072 Delete.
13073 (win32_wait): Adjust.
13074
2bd7c093
PA
130752009-04-01 Pedro Alves <pedro@codesourcery.com>
13076
13077 * target.h (struct thread_resume): Delete leave_stopped member.
13078 (struct target_ops): Add a `n' argument to the `resume' callback.
13079 * server.c (start_inferior): Adjust.
13080 (handle_v_cont, myresume): Adjust.
13081 * linux-low.c (check_removed_breakpoint): Adjust to resume
13082 interface change, and to removed leave_stopped field.
13083 (resume_ptr): Delete.
13084 (struct thread_resume_array): New.
13085 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13086 resume interface change.
13087 (linux_continue_one_thread, linux_queue_one_thread)
13088 (resume_status_pending_p): Check if the resume field is NULL
13089 instead of checking the leave_stopped member.
13090 (linux_resume): Adjust to the target resume interface change.
13091 * spu-low.c (spu_resume): Adjust to the target resume interface
13092 change.
13093 * win32-low.c (win32_detach, win32_resume): Ditto.
13094
c35fafde
PA
130952009-04-01 Pedro Alves <pedro@codesourcery.com>
13096
13097 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13098 flag.
13099 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13100 pending.
13101 (linux_continue_one_thread): Only preserve the stepping flag if
13102 there's a pending breakpoint.
13103
0a59d50b
PA
131042009-03-31 Pedro Alves <pedro@codesourcery.com>
13105
13106 * server.c (main): After the inferior having exited, call
13107 remote_close before exiting gdbserver.
13108
f04c6d38
TJB
131092009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13110
13111 Fix size of FPSCR in Power 7 processors.
13112 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13113 (PPC_FEATURE_HAS_DFP): New #define.
13114 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13115 size of the FPSCR.
13116
78e5cee6
PA
131172009-03-23 Pedro Alves <pedro@codesourcery.com>
13118
13119 * server.c (handle_query) Whitespace and formatting.
13120
1b3f6016
PA
131212009-03-22 Pedro Alves <pedro@codesourcery.com>
13122
13123 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13124 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13125 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13126 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13127 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13128 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13129 Makefile.in, configure.ac: Fix whitespace throughout.
13130 * configure: Regenerate.
13131
a07b2135
PA
131322009-03-22 Pedro Alves <pedro@codesourcery.com>
13133
13134 * inferiors.c (find_inferior): Make it safe for the callback
13135 function to delete the currently iterated inferior.
13136
67cc2626
PA
131372009-03-22 Pedro Alves <pedro@codesourcery.com>
13138
13139 * Makefile.in (linuw_low_h): Move higher.
13140 (thread-db.o): Depend on $(linux_low_h).
13141
54a0b537
PA
131422009-03-17 Pedro Alves <pedro@codesourcery.com>
13143
13144 Rename "process" to "lwp" throughout.
13145
13146 * linux-low.c (all_processes): Rename to...
13147 (all_lwps): ... this.
13148 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13149 (add_process): Rename to ...
13150 (add_lwp): ... this. Adjust.
13151 (linux_create_inferior): Adjust.
13152 (linux_attach_lwp): Adjust.
13153 (linux_attach): Adjust.
13154 (linux_kill_one_process): Rename to ...
13155 (linux_kill_one_lwp): ... this. Adjust.
13156 (linux_kill): Adjust.
13157 (linux_detach_one_process): Rename to ...
13158 (linux_detach_one_lwp): ... this. Adjust.
13159 (linux_detach): Adjust.
13160 (check_removed_breakpoint): Adjust.
13161 (status_pending_p): Adjust.
13162 (linux_wait_for_process): Rename to ...
13163 (linux_wait_for_lwp): ... this. Adjust.
13164 (linux_wait_for_event): Adjust.
13165 (send_sigstop): Adjust.
13166 (wait_for_sigstop): Adjust.
13167 (stop_all_processes): Rename to ...
13168 (stop_all_lwps): ... this.
13169 (linux_resume_one_process): Rename to ...
13170 (linux_resume_one_lwp): ... this. Adjust.
13171 (linux_set_resume_request, linux_continue_one_thread)
13172 (linux_queue_one_thread, resume_status_pending_p)
13173 (usr_store_inferior_registers, regsets_store_inferior_registers)
13174 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13175 Adjust.
13176 * linux-low.h (get_process): Rename to ...
13177 (get_lwp): ... this. Adjust.
13178 (get_thread_process): Rename to ...
13179 (get_thread_lwp): ... this. Adjust.
13180 (get_process_thread): Rename to ...
13181 (get_lwp_thread): ... this. Adjust.
13182 (struct process_info): Rename to ...
13183 (struct lwp_info): ... this.
13184 (all_processes): Rename to ...
13185 (all_lwps): ... this.
13186 * proc-service.c (ps_lgetregs): Adjust.
13187 * thread-db.c (thread_db_create_event, find_one_thread)
13188 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13189
0b16c5cf
PA
131902009-03-14 Pedro Alves <pedro@codesourcery.com>
13191
13192 * server.c (handle_query): Handle "qAttached".
13193
32de4b9d
NS
131942009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13195
13196 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13197 GPLv3, update license URL.
13198
2aecd87f
DE
131992009-03-01 Doug Evans <dje@google.com>
13200
93efd302 13201 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
13202 (server_h): Add gdb_signals.h.
13203 (signals.o): Update.
13204 * server.h (target_signal_from_host,target_signal_to_host_p)
13205 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13206
86b1f9c5
PM
132072009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13208
13209 * remote-utils.c (getpkt): Also generate remote-debug
13210 information if noack_mode is set.
13211
4aa995e1
PA
132122009-02-06 Pedro Alves <pedro@codesourcery.com>
13213
13214 * server.c (handle_query): Report qXfer:siginfo:read and
13215 qXfer:siginfo:write as supported and handle them.
13216 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13217 * linux-low.c (linux_xfer_siginfo): New.
13218 (linux_target_ops): Set it.
13219
62709adf
PA
132202009-01-26 Pedro Alves <pedro@codesourcery.com>
13221
13222 * server.c (gdbserver_usage): Mention --remote-debug.
13223 (main): Accept '--remote-debug' switch.
13224
aef93bd7
DE
132252009-01-18 Doug Evans <dje@google.com>
13226
13227 * regcache.c (new_register_cache): No need to check result of xcalloc.
13228 * server.c (handle_search_memory): Back out calls to xmalloc,
13229 result is checked and error is returned to user upon failure.
13230 (handle_query): Ditto. Add more checks for result of malloc.
13231 (handle_v_cont): Check result of malloc, report error back to
13232 user upon failure.
13233 (handle_v_run): Ditto. Call freeargv.
13234 * server.h (freeargv): Declare.
13235 * utils.c (freeargv): New fn.
13236
54363045
DE
132372009-01-15 Doug Evans <dje@google.com>
13238
f626972c
DE
13239 * gdbreplay.c (perror_with_name): Make arg const char *.
13240 * server.h (target_signal_to_name): Make return type const char *.
0842e787 13241 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 13242 * utils.c (perror_with_name): Make arg const char *.
54363045 13243
18aae699
PA
132442009-01-14 Pedro Alves <pedro@codesourcery.com>
13245
13246 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13247 when handling a EXIT_PROCESS_DEBUG_EVENT.
13248
ff703abe
JB
132492009-01-06 Joel Brobecker <brobecker@adacore.com>
13250
13251 * gdbreplay.c (gdbreplay_version): Update copyright year.
13252 * server.c (gdbserver_version): Likewise.
13253
f21cc1a2 132542009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
13255
13256 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 13257 (handle_extended_wait): Improve comment.
0e21c1ec 13258
bca929d3
DE
132592008-12-13 Doug Evans <dje@google.com>
13260
13261 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13262 * server.h (ATTR_MALLOC): New macro.
13263 (xmalloc,xcalloc,xstrdup): Declare.
13264 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13265 * inferiors.c: Ditto.
13266 * linux-low.c: Ditto.
13267 * mem-break.c: Ditto.
13268 * regcache.c: Ditto.
13269 * remote-utils.c: Ditto.
13270 * server.c: Ditto.
13271 * target.c: Ditto.
13272 * win32-low.c: Ditto.
13273
97438e3f
DE
132742008-12-12 Doug Evans <dje@google.com>
13275
896c7fbb
DE
13276 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13277 in debugging printf.
13278
97438e3f
DE
13279 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13280
e3b886f8
DE
132812008-12-09 Doug Evans <dje@google.com>
13282
13283 * linux-low.h (struct process_info): Delete member tid, unused.
13284 * thread-db.c (find_one_thread): Update.
13285 (maybe_attach_thread): Update.
13286
07e059b5
VP
132872008-12-02 Pedro Alves <pedro@codesourcery.com>
13288
889bf7c5
PA
13289 * target.h (struct target_ops): Add qxfer_osdata member.
13290 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13291 and dirent.h.
13292 (linux_qxfer_osdata): New functions.
13293 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13294 callback.
13295 * server.c (handle_query): Handle "qXfer:osdata:read:".
13296 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13297 (buffer_xml_printf): New functions.
13298 * server.h (struct buffer): New.
13299 (buffer_grow_str, buffer_grow_str0): New macros.
13300 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13301 (buffer_xml_printf): Declare.
07e059b5 13302
4cab47ab
DE
133032008-11-24 Doug Evans <dje@google.com>
13304
13305 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13306
f142445f
DJ
133072008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13308
13309 * server.c (handle_v_run): Always use the supplied argument list.
13310
d0107bb6 133112008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 13312
d0107bb6
BW
13313 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13314 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 13315
2c4ad781
TJB
133162008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13317
13318 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13319 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13320 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13321 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13322 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13323 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13324 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13325 XML target descriptions.
13326 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13327 when inferior is running on an ISA 2.05 or later processor. Add
13328 special case to return offset for full 64-bit slot of FPSCR when
13329 in 32-bits.
13330
dfb64f85
DJ
133312008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13332
13333 * Makefile.in (SFILES, clean): Added sparc64 files.
13334 (reg-sparc64.o, reg-sparc64.c): New.
13335 * configure.srv (sparc*-*-linux*): New configuration.
13336 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13337 syscall arguments for SPARC.
13338 (regsets_store_inferior_registers): Likewise.
13339 * linux-sparc-low.c: New file.
13340
66b6e1dd
DE
133412008-10-21 Doug Evans <dje@google.com>
13342
13343 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13344 (READLINE_DIR,READLINE_DEP): Delete.
13345 (INTERNAL_CFLAGS): Update.
13346 (LINTFLAGS): Update.
13347
9b710a42
PA
133482008-10-10 Pedro Alves <pedro@codesourcery.com>
13349
13350 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13351 whole argv from the last run, not just argv[0].
13352
5822d809
PA
133532008-09-08 Pedro Alves <pedro@codesourcery.com>
13354
13355 * regcache.c (new_register_cache): Return NULL if the register
13356 cache size isn't known yet.
13357 (free_register_cache): Avoid dereferencing a NULL regcache.
13358
74aac56f
DJ
133592008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13360
13361 * configure.srv: Merge MIPS and MIPS64.
13362
400b20f5
MR
133632008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13364
13365 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13366
677c5bb1
LM
133672008-08-18 Luis Machado <luisgpm@br.ibm.com>
13368
13369 * Makefile.in: Add required vsx dependencies.
13370
13371 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13372 Declare init_registers_powerpc_vsx32l.
13373 Declare init_registers_powerpc_vsx64l.
13374 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13375 (ppc_arch_setup): Check for VSX in hwcap.
13376 (ppc_fill_vsxregset): New function.
13377 (ppc_store_vsxregset): New function.
13378 Add new VSX entry in regset_info target_regsets.
13379
13380 * configure.srv: Add new VSX dependencies.
13381
a6f3e723
SL
133822008-08-12 Pedro Alves <pedro@codesourcery.com>
13383
13384 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13385 (remote_open): Set or clear transport_is_reliable.
13386 (putpkt_binary): Don't expect acks in noack mode.
13387 (getpkt): Don't send ack/nac in noack mode.
13388 * server.c (handle_general_set): Handle QStartNoAckMode.
13389 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13390 qSupported.
13391 (main): Reset noack_mode on every connection.
13392 * server.h (noack_mode): Declare.
13393
a417dc56
RW
133942008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13395
13396 * Makefile.in (GDBREPLAY_OBS): New variable.
13397 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13398
3221518c
UW
133992008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13400 Daniel Jacobowitz <dan@codesourcery.com>
13401
13402 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13403 (usr_store_inferior_registers): Likewise.
13404 (regsets_store_inferior_registers): Likewise.
13405
ec56be1b
PA
134062008-07-31 Rolf Jansen <rj@surtec.com>
13407 Pedro Alves <pedro@codesourcery.com>
13408
13409 * configure.ac: Check for memmem declaration.
13410 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13411 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13412 (disable_packet_qfThreadInfo): Unconditionally compile.
13413 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13414 * configure, config.in: Regenerate.
13415
2fe5e3ff
DE
134162008-07-28 Doug Kwan <dougkwan@google.com>
13417
13418 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13419 (linux_write_memory): Remove declaration of errno.
13420
836acd6d
UW
134212008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13422
13423 * linux-low.c (handle_extended_wait): Do not use "status"
13424 variable uninitialized.
13425
aeba519e
PA
134262008-07-07 Pedro Alves <pedro@codesourcery.com>
13427
13428 * server.c (handle_v_attach): Inhibit reporting dll changes.
13429
db42f210
PA
134302008-06-27 Pedro Alves <pedro@codesourcery.com>
13431
13432 * remote-utils.c (prepare_resume_reply): If requested, don't
13433 output "thread:TID" in the T stop reply.
13434
13435 * server.c (disable_packet_vCont, disable_packet_Tthread)
13436 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13437 (handle_query): If requested, disable support for qC, qfThreadInfo
13438 and qsThreadInfo.
13439 (handle_v_requests): If requested, disable support for vCont.
13440 (gdbserver_show_disableable): New.
13441 (main): Handle --disable-packet and --disable-packet=LIST.
13442
13443 * server.h (disable_packet_vCont, disable_packet_Tthread)
13444 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13445
8e4c5421
CD
134462008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13447
13448 * server.c (gdbserver_usage): Mention --version.
13449
6e23a804
DJ
134502008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13451
13452 * Makefile.in (gdbreplay.o): New rule.
13453
90aa6a40
JM
134542008-06-06 Joseph Myers <joseph@codesourcery.com>
13455
13456 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13457 message, not gdbserver.
13458
c16158bc 134592008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
13460 Nathan Sidwell <nathan@codesourcery.com>
13461 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
13462
13463 * acinclude.m4: Include ../../config/acx.m4.
13464 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13465 * configure, config.in: Regenerate.
13466 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13467 * server.c (gdbserver_version): Print PKGVERSION.
13468 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13469 (main): Adjust gdbserver_usage calls.
13470 * gdbreplay.c (version, host_name): Add declarations.
13471 (gdbreplay_version, gdbreplay_usage): New.
13472 (main): Accept --version and --help options.
13473
aeb75bf5
DJ
134742008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13475
13476 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13477 (arm_breakpoint_at): Handle Thumb.
13478 (the_low_target): Add comment.
13479
76b233dd
UW
134802008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13481
13482 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13483
08388c79
DE
134842008-05-09 Doug Evans <dje@google.com>
13485
a3c83fae
DE
13486 * server.h (decode_search_memory_packet): Declare.
13487 * remote-utils.c (decode_search_memory_packet): New fn.
13488 * server.c (handle_search_memory_1): New fn.
08388c79
DE
13489 (handle_search_memory): New fn.
13490 (handle_query): Process qSearch:memory packets.
13491
bb9c3d36
UW
134922008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13493
13494 * regcache.c (registers_length): Remove.
13495 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13496 full register packet.
13497 * regcache.h (registers_length): Remove prototype.
13498 * server.h (PBUFSIZ): Define to 16384.
13499
7284e1be
UW
135002008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13501
13502 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13503 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13504 powerpc-64l.o, and powerpc-altivec64l.o.
13505 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13506 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13507 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13508 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13509 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13510 to srv_xmlfiles.
13511
13512 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13513 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13514 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13515 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13516 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13517 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13518 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13519 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13520 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13521 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13522 (clean): Update.
13523
13524 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13525 (init_registers_powerpc_32l): ... this new prototype.
13526 (init_registers_powerpc_32): Remove, replace by ...
13527 (init_registers_powerpc_altivec32l): ... this new prototype.
13528 (init_registers_powerpc_e500): Remove, replace by ...
13529 (init_registers_powerpc_e500l): ... this new prototype.
13530 (init_registers_ppc64): Remove, replace by ...
13531 (init_registers_powerpc_64l): ... this new prototype.
13532 (init_registers_powerpc_64): Remove, replace by ...
13533 (init_registers_powerpc_altivec64l): ... this new prototype.
13534 (ppc_num_regs): Set to 73.
13535 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13536 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13537 (ppc_cannot_store_register): Handle orig_r3 and trap.
13538 (ppc_arch_setup): Update init_registers_... calls.
13539 (ppc_fill_gregset): Handle orig_r3 and trap.
13540
13541 * inferiors.c (clear_inferiors): Reset current_inferior.
13542
fdc59709
PB
135432008-04-23 Paolo Bonzini <bonzini@gnu.org>
13544
889bf7c5
PA
13545 * acinclude.m4: Add override.m4.
13546 * configure: Regenerate.
fdc59709 13547
c9b2f845
UW
135482008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13549
13550 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13551 initial call to init_register_ppc64.
13552
550512b8
UW
135532008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13554
43aaf8b6
PA
13555 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13556 single powerpc*-*-linux* case.
550512b8
UW
13557 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13558
b6430ec3
UW
135592008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13560
13561 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 13562 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
13563 from reg_xmlfiles.
13564 * linux-ppc-low.c: Include <elf.h>.
13565 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13566 (ppc_hwcap): New global variable.
13567 (ppc_regmap): Remove __SPE__ #ifdef sections.
13568 (ppc_regmap_e500): New global variable.
13569 (ppc_cannot_store_register): Update __SPE__ special case.
13570 (ppc_get_hwcap): New function.
13571 (ppc_arch_setup): Use it to determine whether inferior supports
13572 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13573 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13574 Do not access registers if target does not support AltiVec.
13575 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13576 Do not access registers if target does not support SPE.
13577 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13578
52fa2412
UW
135792008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13580
13581 * linux-low.c (disabled_regsets, num_regsets): New.
13582 (use_regsets_p): Delete.
13583 (linux_wait_for_process): Clear disabled_regsets.
13584 (regsets_fetch_inferior_registers): Check and set it.
13585 (regsets_store_inferior_registers): Likewise.
13586 (linux_fetch_registers, linux_store_registers): Do not use
13587 use_regsets_p.
13588 (initialize_low): Allocate disabled_regsets.
13589
e28b3332
DJ
135902008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13591
13592 * Makefile.in (LIBOBJS): New.
13593 (OBS): Use LIBOBJS.
13594 (memmem.o): New rule.
13595 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13596 * configure: Regenerated.
13597
4536995d
UW
135982008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13599
13600 * server.c (handle_query): Never return "unsupported" for
13601 qXfer:features:read queries.
13602
221c031f
UW
136032008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13604
13605 * server.c (get_features_xml): Fix inverted condition.
13606 (handle_query): Always support qXfer:feature:read.
13607
ccd213ac
DJ
136082008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13609
13610 * server.c (wrapper_argv): New.
13611 (start_inferior): Handle wrapper_argv. If set, expect an extra
13612 trap.
13613 (gdbserver_usage): Document --wrapper.
13614 (main): Parse --wrapper.
13615
6fe305f7
UW
136162008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13617
13618 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13619 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13620 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13621 (ppc_set_pc): Likewise.
13622 (ppc_arch_setup): New function.
13623 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13624 of collect_register.
889bf7c5 13625 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 13626
5b0a002e
UW
136272008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13628
13629 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13630 instead of linux-ppc64-low.o.
13631 * linux-ppc64-low.c: Remove file.
13632 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13633 (linux-ppc64-low.o): Remove rule.
13634
13635 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13636 (init_registers_powerpc_64): Likewise.
13637 (ppc_regmap): Conditionally define depending on __powerpc64__.
13638 (ppc_cannot_store_register): Do not special-case "fpscr" when
13639 compiled on __powerpc64__.
13640 (ppc_collect_ptrace_register): New function.
13641 (ppc_supply_ptrace_register): New function.
13642 (ppc_breakpoint): Change type to "unsigned int".
13643 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13644 (the_low_target): Conditionally provide initializers for the
889bf7c5 13645 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
13646 collect_ptrace_register and supply_ptrace_register members.
13647
9b4b61c8
UW
136482008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13649
13650 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13651 * server.c (gdbserver_xmltarget): Define.
13652 (get_features_xml): Use it to replace "target.xml" and arch_string.
13653
13654 * configure.srv: Remove srv_xmltarget. Add XML files that were
13655 mentioned there to srv_xmlfiles instead. Remove conditional tests
13656 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13657 srv_xmlfiles and srv_regobj to include all possible choices.
13658 * configure.ac (srv_xmltarget): Remove.
13659 (srv_xmlfiles): Do not add "target.xml".
13660 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13661 checks for supplementary target information.
13662 * configure: Regenerate.
13663 * Makefile.in (XML_TARGET): Remove.
13664 (target.xml): Remove rule.
13665 (clean): Do not clean up target.xml.
13666 (.PRECIOUS): Do not mention target.xml.
13667
13668 * target.h (struct target_ops): Remove arch_string member.
13669 * linux-low.c (linux_arch_string): Remove.
13670 (linux_target_ops): Remove arch_string initializer.
13671 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13672 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13673 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13674 * spu-low.c (spu_arch_string): Remove.
13675 (spu_target_ops): Remove arch_string initializer.
13676 * win32-low.c (win32_arch_string): Remove.
13677 (win32_target_ops): Remove arch_string initializer.
13678 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13679 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13680 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13681
ee1a7ae4
UW
136822008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13683
13684 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13685 by collect_ptrace_register and supply_ptrace_register hooks.
13686 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13687 instead of checking for the_low_target.left_pad_xfer.
13688 (usr_store_inferior_registers): Use collect_ptrace_register callback
13689 instead of checking for the_low_target.left_pad_xfer.
13690
13691 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13692 (s390_supply_ptrace_register): Likewise.
13693 (s390_fill_gregset): Call s390_collect_ptrace_register.
13694 (the_low_target): Update.
13695
13696 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13697 (ppc_supply_ptrace_register): Likewise.
13698 (the_low_target): Update.
13699
13700 * linux-i386-low.c (the_low_target): Update.
13701 * linux-x86-64-low.c (the_low_target): Update.
13702
d61ddec4
UW
137032008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13704
13705 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13706 reg-s390.o and reg-s390x.o.
13707
13708 * linux-low.c (new_inferior): New global variable.
13709 (linux_create_inferior, linux_attach): Set it.
13710 (linux_wait_for_process): Call the_low_target.arch_setup after the
13711 target has stopped for the first time.
13712 (initialize_low): Do not call the_low_target.arch_setup.
13713
13714 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13715 (s390_set_pc): Likewise.
13716 (s390_arch_setup): New function.
13717 (the_low_target): Use s390_arch_setup as arch_setup routine.
13718
13719 * regcache.c (realloc_register_cache): New function.
13720 (set_register_cache): Call it for each existing regcache.
13721
d05b4ac3
UW
137222008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13723
13724 * server.h (init_registers): Remove prototype.
13725
13726 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13727 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13728 instead of init_registers ().
13729 * linux-arm-low.c (init_registers_arm): Add prototype.
13730 (init_registers_arm_with_iwmmxt): Likewise.
13731 (the_low_target): Add initializer for arch_setup field.
13732 * linux-cris-low.c (init_registers_cris): Add prototype.
13733 (the_low_target): Add initializer for arch_setup field.
13734 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13735 (the_low_target): Add initializer for arch_setup field.
13736 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13737 (the_low_target): Add initializer for arch_setup field.
13738 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13739 (the_low_target): Add initializer for arch_setup field.
13740 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13741 (the_low_target): Add initializer for arch_setup field.
13742 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13743 (the_low_target): Add initializer for arch_setup field.
13744 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13745 (init_registers_mips64_linux): Likewise.
13746 (the_low_target): Add initializer for arch_setup field.
13747 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13748 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13749 (the_low_target): Add initializer for arch_setup field.
13750 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13751 (init_registers_powerpc_64): Likewise.
13752 (the_low_target): Add initializer for arch_setup field.
13753 * linux-s390-low.c (init_registers_s390): Add prototype.
13754 (init_registers_s390x): Likewise.
13755 (the_low_target): Add initializer for arch_setup field.
13756 * linux-sh-low.c (init_registers_sh): Add prototype.
13757 (the_low_target): Add initializer for arch_setup field.
13758 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13759 (the_low_target): Add initializer for arch_setup field.
13760 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13761 (the_low_target): Add initializer for arch_setup field.
13762
13763 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13764 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13765 instead of init_registers ().
13766 * win32-arm-low.c (init_registers_arm): Add prototype.
13767 (the_low_target): Add initializer for arch_setup field.
13768 * win32-i386-low.c (init_registers_i386): Add prototype.
13769 (the_low_target): Add initializer for arch_setup field.
13770
13771 * spu-low.c (init_registers_spu): Add prototype.
13772 (initialize_low): Call initialie_registers_spu () instead of
13773 initialize_registers ().
13774
fd96d250
PA
137752008-02-19 Pedro Alves <pedro@codesourcery.com>
13776
13777 * server.c (handle_v_requests): When handling the vRun and vAttach
13778 packets, if already debugging a process, don't kill it. Return an
13779 error instead.
13780
d41b6bb4
DJ
137812008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13782
13783 * server.c (handle_query): Correct length check.
13784
5ac588cf
PA
137852008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13786
13787 * win32-low.c (do_initial_child_stuff): Add process handle
13788 parameter. Set current_process_handle and current_process_id from the
13789 parameters. Clear globals.
13790 (win32_create_inferior): Don't set current_process_handle and
13791 current_process_id here. Instead pass them on the call to
13792 do_initial_child_stuff.
13793 (win32_attach): Likewise.
13794 (win32_clear_inferiors): New.
13795 (win32_kill): Don't close the current process handle or the
13796 current thread handle here. Instead call win32_clear_inferiors.
13797 (win32_detach): Don't open a new handle to the process. Call
13798 win32_clear_inferiors.
13799 (win32_join): Don't rely on current_process_handle; open a new
13800 handle using the process id.
13801 (win32_wait): Call win32_clear_inferiors when the inferior process
13802 has exited.
13803
ecd7ecbc
DJ
138042008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13805
13806 * server.c (monitor_show_help): Add "exit".
13807
1525d545
MG
138082008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13809
ecd7ecbc 13810 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
13811 (clean): Add reg-xtensa.c.
13812 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
13813 * configure.srv (xtensa*-*-linux*) New target.
13814 * linux-xtensa-low.c: New.
13815 * xtensa-xtregs.c: New.
1525d545 13816
59a016f0
PA
138172008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13818
13819 * hostio.c: Don't include errno.h.
13820 (errno_to_fileio_errno): Move to hostio-errno.
13821 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13822 error number outputting to the target->hostio_last_error callback.
13823 (hostio_packet_error): Use FILEIO_EINVAL directly.
13824 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13825 calls to hostio_error.
13826 * hostio-errno.c: New.
13827 * server.h (hostio_last_error_from_errno): Declare.
13828 * target.h (target_ops): Add hostio_last_error member.
13829 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13830 as hostio_last_error handler.
889bf7c5 13831 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
13832 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13833 (wince_hostio_last_error): New functions.
13834 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13835 as hostio_last_error handler.
13836 (win32_target_ops) [!_WIN32_WCE]: Register
13837 hostio_last_error_from_errno as hostio_last_error handler.
13838 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13839 (hostio-errno.o): New rule.
13840 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13841 * configure.srv (srv_hostio_err_objs): New variable. Default to
13842 hostio-errno.o.
13843 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13844 * configure: Regenerate.
13845
2d717e4f
DJ
138462008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13847
13848 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13849 (linux_kill, linux_detach): Clean up the process list.
13850 * remote-utils.c (remote_open): Improve port number parsing.
13851 (putpkt_binary, input_interrupt): Only send interrupts if the target
13852 is running.
13853 * server.c (extended_protocol): Make static.
13854 (attached): Define earlier.
13855 (exit_requested, response_needed, program_argv): New variables.
13856 (target_running): New.
13857 (start_inferior): Clear attached here.
13858 (attach_inferior): Set attached here.
13859 (require_running): Define.
13860 (handle_query): Use require_running and target_running. Implement
13861 "monitor exit".
13862 (handle_v_attach, handle_v_run): New.
13863 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13864 (gdbserver_usage): Update.
13865 (main): Redo argument parsing. Handle --debug and --multi. Handle
13866 --attach along with other options or after the port. Save
13867 program_argv. Support no initial program. Resynchronize
13868 communication with GDB after an error. Handle "monitor exit".
13869 Use require_running and target_running. Always allow the extended
13870 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13871 restart in extended mode.
13872 * README: Refer to the GDB manual. Update --attach usage.
13873
7407e2de
AS
138742007-12-20 Andreas Schwab <schwab@suse.de>
13875
13876 * linux-low.c (STACK_SIZE): Define.
13877 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13878 (linux_test_for_tracefork): Likewise.
13879
b65d95c5
DJ
138802007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13881
13882 * linux-low.c (linux_wait_for_event): Update messages. Do not
13883 reinsert auto-delete breakpoints.
13884 * mem-break.c (struct breakpoint): Change return type of handler to
13885 int.
13886 (set_breakpoint_at): Update handler type.
13887 (reinsert_breakpoint_handler): Return 1 instead of calling
13888 delete_breakpoint.
13889 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13890 setting a new one.
13891 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13892 * mem-break.h (set_breakpoint_at): Update handler type.
13893 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13894 * win32-low.c (auto_delete_breakpoint): New.
13895 (get_child_debug_event): Use it.
13896
4e799345
DJ
138972007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13898
13899 * configure.ac: Check for pread and pwrite.
13900 * hostio.c (handle_pread): Fall back to lseek and read.
13901 (handle_pwrite): Fall back to lseek and write.
13902 * config.in, configure: Regenerated.
13903
27524b67
DJ
139042007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13905
13906 * server.c (myresume): Add own_buf argument.
13907 (main): Update calls.
13908
a20d5e98
DJ
139092007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13910
13911 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13912 * remote-utils.c (remote_open): Do not call disable_async_io.
13913 (block_async_io): Delete.
13914 (unblock_async_io): Make static.
13915 (initialize_async_io): New.
13916 * server.c (handle_v_cont): Handle async I/O here.
13917 (myresume): Likewise. Move other common resume tasks here...
13918 (main): ... from here. Call initialize_async_io. Disable async
13919 I/O before the main loop.
13920 * server.h (initialize_async_io): Declare.
13921 (block_async_io, unblock_async_io): Delete prototypes.
13922 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13923
b79d787e
DJ
139242007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13925
13926 * remote-utils.c (readchar): Allow binary data in received messages.
13927
d97903b2
PA
139282007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13929
13930 * win32-low.c (attaching): New global.
13931 (win32_create_inferior): Clear the `attaching' global.
13932 (win32_attach): Set the `attaching' global.
13933 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13934 attaching. Only set a breakpoint at the entry point if not
13935 attaching.
13936
311de423
PA
139372007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13938
13939 * server.c (main): Don't report dll events on the initial
13940 connection on attaches.
13941
6c2d16d2
PA
139422007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13943
13944 * server.c (main): Relax numerical bases supported for the pid of
13945 the --attach command line argument.
13946
5ca906e6
PA
139472007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13948
13949 * win32-low.c (win32_attach): Call OpenProcess before
13950 DebugActiveProcess, not after. Add last error output to error
13951 call.
13952
9c6c8194
PA
139532007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13954
13955 * win32-low.c (win32_get_thread_context)
13956 (win32_set_thread_context): New functions.
13957 (thread_rec): Use win32_get_thread_context.
13958 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13959 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13960 field.
13961
4d5d1aaa
PA
139622007-12-03 Leo Zayas
13963 Pedro Alves <pedro_alves@portugalmail.pt>
13964
13965 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13966 global variables.
13967 (child_add_thread): Minor cleanup.
13968 (child_continue): Resume artificially suspended threads before
13969 calling ContinueDebugEvent.
13970 (suspend_one_thread): New.
13971 (fake_breakpoint_event): New.
13972 (get_child_debug_event): Change return type to int. Check here if
13973 gdb sent an interrupt request. If a soft interrupt was requested,
13974 fake a breakpoint event. Return 0 if there is no event to handle,
13975 and 1 otherwise.
13976 (win32_wait): Don't check here if gdb sent an interrupt request.
13977 Ensure there is a valid event to handle.
13978 (win32_request_interrupt): Add soft interruption method as last
13979 resort.
13980
c436e841
PA
139812007-12-03 Leo Zayas
13982 Pedro Alves <pedro_alves@portugalmail.pt>
13983
13984 * win32-low.h (win32_thread_info): Add descriptions to the
13985 structure members. Replace `suspend_count' counter by a
13986 `suspended' flag.
13987 * win32-low.c (thread_rec): Update condition of when to get the
13988 context from the inferior. Rely on ContextFlags being set if it
13989 has already been retrieved. Only suspend the inferior thread if
13990 we haven't already. Warn if that fails.
13991 (continue_one_thread): s/suspend_count/suspended/. Only call
13992 ResumeThread once. Warn if that fails.
13993
e7b5fa67
PA
139942007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13995
13996 * win32-low.c (win32_wait): Don't read from the inferior when it
13997 has already exited.
13998
a385171d
PA
139992007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14000
14001 * Makefile.in (win32_low_h): New variable.
14002 (win32-low.o): Add dependency on $(win32_low_h).
14003 (win32-arm-low.o, win32-i386-low.o): New rules.
14004
f80c84b3
DJ
140052007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14006
14007 * hostio.c: Correct copyright year.
14008
a6b151f1
DJ
140092007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14010
14011 * Makefile.in (OBS): Add hostio.o.
14012 (hostio.o): New rule.
14013 * server.h (handle_vFile): Declare.
14014 * hostio.c: New file.
14015 * server.c (handle_v_requests): Take packet_len and new_packet_len
14016 for binary packets. Call handle_vFile.
14017 (main): Update call to handle_v_requests.
14018
f9387fc3
DJ
140192007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14020
14021 * linux-low.c: Include <sched.h>.
14022
51c2684e
DJ
140232007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14024
14025 * linux-low.c (linux_tracefork_grandchild): New.
14026 (linux_tracefork_child): Use clone.
14027 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14028
75f83163
JB
140292007-10-31 Joel Brobecker <brobecker@adacore.com>
14030
14031 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14032
da5898ce
DJ
140332007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14034
14035 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14036
24a09b5f
DJ
140372007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14038
14039 * inferiors.c (change_inferior_id): Delete.
14040 (add_pid_to_list, pull_pid_from_list): New.
14041 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14042 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14043 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14044 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14045 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14046 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14047 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14048 (using_threads): Always set to 1.
14049 (handle_extended_wait): New.
14050 (add_process): Do not set TID.
14051 (linux_create_inferior): Set must_set_ptrace_flags.
14052 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14053 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14054 (linux_thread_alive): Rename TID argument to LWPID.
14055 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14056 (linux_wait_for_event): Do not use TID or check using_threads. Update
14057 call to dead_thread_notify. Call handle_extended_wait.
14058 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14059 (send_sigstop): Delete sigstop_sent.
14060 (wait_for_sigstop): Avoid TID.
14061 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14062 (linux_test_for_tracefork): New.
14063 (linux_lookup_signals): Use thread_db_active and
14064 linux_supports_tracefork_flag.
14065 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14066 * linux-low.h (get_process_thread): Avoid TID.
14067 (struct process_ifo): Move thread_known and tid to the end. Remove
14068 sigstop_sent.
14069 (linux_attach_lwp, thread_db_init): Update prototypes.
14070 * server.h (change_inferior_id): Delete prototype.
14071 (add_pid_to_list, pull_pid_from_list): New prototypes.
14072 * thread-db.c (thread_db_use_events): New.
14073 (find_first_thread): Rename to...
14074 (find_one_thread): ...this. Update callers and messages. Do not
14075 call fatal. Check thread_db_use_events. Do not call
14076 change_inferior_id or new_thread_notify.
14077 (maybe_attach_thread): Update. Do not call new_thread_notify.
14078 (thread_db_init): Set thread_db_use_events. Check use_events.
14079 * utils.c (fatal, warning): Correct message prefix.
14080
30ed0a8f
DJ
140812007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14082
14083 * Makefile.in (clean): Remove new files.
14084 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14085 (powerpc-64.o, powerpc-64.c): New rules.
14086 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14087 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14088 with SPE.
14089 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14090 SPE targets.
14091 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14092 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14093 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14094 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14095 (target_regsets): Add AltiVec and SPE register sets.
14096 * configure.ac: Check for AltiVec and SPE.
14097 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14098 (ppc_fill_vrregset, ppc_store_vrregset): New.
14099 (target_regsets): Add AltiVec register set.
14100 * configure: Regenerated.
14101
fd462a61
DJ
141022007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14103
14104 * linux-low.c (O_LARGEFILE): Define.
14105 (linux_read_memory): Use /proc/PID/mem.
14106 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14107 * configure, config.in: Regenerated.
14108
69f223ed
DJ
141092007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14110
14111 * linux-low.c (linux_wait_for_event): Do not pass signals while
14112 single-stepping.
14113
aec18585
PA
141142007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14115
14116 * win32-low.c (create_process): New.
14117 (win32_create_inferior): Use create_process instead of
14118 CreateProcess. If create_process failed retry appending an ".exe"
14119 suffix. Store the GetLastError result immediatelly after
14120 create_process calls and use it on the call to error.
14121
34d86ddd
PA
141222007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14123
14124 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14125
5a0e3bd0
JB
141262007-08-23 Joel Brobecker <brobecker@adacore.com>
14127
14128 * configure.ac: Switch license to GPLv3.
14129
f88c79e6
MS
141302007-08-01 Michael Snyder <msnyder@access-company.com>
14131
14132 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14133
6b3d9b83
PA
141342007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14135
14136 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14137 typedef.
14138 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14139 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14140 CloseToolhelp32Snapshot.
14141 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14142 CloseToolhelp32Snapshot.
14143
c588c53c
MS
141442007-07-27 Michael Snyder <michael.snyder@access-company.com>
14145
14146 * server.c (main): Check for inferior exit before main loop.
14147
aa0403d9
PA
141482007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14149
14150 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14151 instead of on tmp_desc.
14152
255e7678
DJ
141532007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14154 Daniel Jacobowitz <dan@codesourcery.com>
14155
14156 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14157 (add_thread): Minor cleanups.
14158 (clear_inferiors): Move lower in the file. Clear the DLL
14159 list.
14160 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14161 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14162 (xml_escape_text): New.
14163 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14164 for qSupported.
14165 (handle_v_cont): Report errors.
14166 (gdbserver_version): Update.
14167 (main): Correct size of own_buf. Do not report initial DLL events.
14168 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14169 (unloaded_dll, xml_escape_text): New.
14170 * win32-low.c (enum target_waitkind): Update comments.
14171 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14172 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14173 (win32_EnumProcessModules, win32_GetModuleInformation)
14174 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14175 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14176 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14177 (win32_Module32First, win32_Module32Next, load_toolhelp)
14178 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14179 (get_child_debug_event): Handle DLL events.
14180 (win32_wait): Likewise.
14181
0d37add9
DJ
141822007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14183
14184 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14185 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14186
45e2715e
PA
141872007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14188
14189 * win32-low.c (handle_output_debug_string): Ignore event if not
14190 waiting.
14191
c5674cf1
PA
141922007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14193
14194 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14195
2bbe3cc1
DJ
141962007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14197
14198 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14199
ae13219e
DJ
142002007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14201
14202 * inferiors.c (change_inferior_id): Add comment.
14203 * linux-low.c (check_removed_breakpoint): Add an early
14204 prototype. Improve debug output.
14205 (linux_attach): Doc update.
14206 (linux_detach_one_process, linux_detach): Clean up before releasing
14207 each process.
14208 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14209 * linux-low.h (struct process_info): Doc improvement.
14210 * mem-break.c (delete_all_breakpoints): New.
14211 * mem-break.h (delete_all_breakpoints): New prototype.
14212 * thread-db.c (find_first_thread): New.
14213 (thread_db_create_event): Call it instead of
14214 thread_db_find_new_threads. Clean up unused variables.
14215 (maybe_attach_thread): Remove first thread handling.
14216 (thread_db_find_new_threads): Use find_first_thread.
14217 (thread_db_get_tls_address): Likewise.
14218
4105de34
DJ
142192007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14220
14221 * thread-db.c (thread_db_find_new_threads): Add prototype.
14222 (thread_db_create_event): Check for the main thread before adding
14223 a new thread.
14224 (maybe_attach_thread): Only enable event reporting if TID == 0.
14225 (thread_db_get_tls_address): Check for new threads.
14226
2b876972
DJ
142272007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14228
14229 * linux-low.c (linux_create_inferior): Try execv before execvp.
14230 * spu-low.c (spu_create_inferior): Likewise.
14231
7a245884
DJ
142322007-06-13 Mike Frysinger <vapier@gentoo.org>
14233
14234 * linux-low.c (linux_create_inferior): Change execv to execvp.
14235 * spu-low.c (spu_create_inferior): Likewies.
14236
117ce543
DJ
142372007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14238
14239 * Makefile.in (clean): Clean new files instead of deleted ones.
14240 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14241 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14242 rules.
14243 * configure.srv: Specify XML files and new regformats for MIPS and
14244 MIPS64 GNU/Linux.
14245 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14246 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14247 an entry for the restart register.
14248 (mips_cannot_fetch_register, mips_cannot_store_register)
14249 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14250 register names to match the XML descriptions.
14251 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14252 restart register instead of $0.
14253
0e7f50da
UW
142542007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14255 Markus Deuling <deuling@de.ibm.com>
14256
14257 * remote-utils.c (decode_xfer_write): New function.
14258 * server.h (decode_xfer_write): Add prototype.
14259 * server.c (handle_query): Add PACKET_LEN argument. Support
14260 qXfer:spu:read and qXfer:spu:write packets.
14261 (main): Pass packet_len to handle_query.
14262 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14263 * target.h (target_ops): Add qxfer_spu.
14264
374c1d38
UW
142652007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14266
14267 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14268 accessing non-seekable spufs files.
14269
bb63802a
UW
142702007-05-16 Markus Deuling <deuling@de.ibm.com>
14271
889bf7c5 14272 * server.c (handle_query): Add reply for qC packet.
bb63802a 14273
7390519e
PA
142742007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14275 Leo Zayas <lerele@champenstudios@com>
14276
14277 * server.h (check_remote_input_interrupt_request): New function.
14278 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14279 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14280 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14281 (check_remote_input_interrupt_request): New function.
14282 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 14283 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
14284 winapi_GenerateConsoleCtrlEvent): New typedefs.
14285 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14286 to 250 ms.
14287 (win32_wait): Check for remote interrupt request
14288 with check_remote_input_interrupt_request.
14289 (win32_request_interrupt): New function.
14290 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14291
34b34921
PA
142922007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14293
14294 * win32-low.c (debug_registers_changed,
14295 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14296 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14297 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14298 (thread_rec): Get context using the low target.
14299 (child_add_thread): Call thread_added on the low target,
14300 which does the same thing.
14301 (regptr): Delete.
14302 (do_initial_child_stuff): Remove debug registers references.
14303 Set context using the low target. Resume threads after
14304 setting the contexts.
14305 (child_continue): Remove dead variable. Remove debug
14306 registers references.
14307 (child_fetch_inferior_registers): Go through the low target.
14308 (do_child_store_inferior_registers): Remove.
14309 (child_store_inferior_registers): Go through the low target.
14310 (win32_resume): Remove debug registers references.
14311 Set context using the low target.
14312 (handle_exception): Change return type to void. Don't record
14313 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14314 first chance exception.
889bf7c5 14315 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
14316 goto loop. Always return after waiting for debug event.
14317 (win32_wait): Convert to switch statement. Handle spurious
14318 events.
14319
14320 * win32-i386-low.c (debug_registers_changed,
14321 debug_registers_used): New.
14322 (initial_stuff): Rename to ...
14323 (i386_initial_stuff): ... this. Clear debug registers
14324 state variables.
14325 (store_debug_registers): Delete.
14326 (i386_get_thread_context): New.
14327 (load_debug_registers): Delete.
14328 (i386_set_thread_context): New.
14329 (i386_thread_added): New.
14330 (single_step): Rename to ...
14331 (i386_single_step): ... this.
14332 (do_fetch_inferior_registers): Rename to ...
14333 (i386_fetch_inferior_register): ... this.
14334 (i386_store_inferior_register): New.
14335 (the_low_target): Adapt to new interface.
14336
14337 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14338 (arm_get_thread_context): New.
14339 (arm_set_thread_context): New.
14340 (regptr): New.
14341 (do_fetch_inferior_registers): Rename to ...
14342 (arm_fetch_inferior_register): ... this.
14343 (arm_store_inferior_register): New.
14344 (arm_wince_breakpoint): Reimplement as unsigned long.
14345 (arm_wince_breakpoint_len): Define.
14346 (the_low_target): Adapt to new interface.
14347
14348 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14349 load_debug_registers. Add get_thread_context, set_thread_context,
14350 thread_added and store_inferior_register. Rename
14351 fetch_inferior_registers to fetch_inferior_register.
14352 (regptr): Remove declaration.
14353
dd6953e1
PA
143542007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14355
14356 * linux-low.c (linux_detach): Change return type to int. Return 0.
14357 * spu-low.c (spu_detach): Likewise.
14358
444d6139
PA
143592007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14360
14361 * target.h (target_ops): Change return type of detach to int.
14362 Add join.
14363 (join_inferior): New.
14364 * server.c (main): Don't skip detach support on mingw32.
14365 If the inferior doesn't support detaching return error.
14366 Call join_inferior instead of using waitpid.
14367 * linux-low.c (linux_join): New.
14368 (linux_target_op): Add linux_join.
14369 * spu-low.c (spu_join): New.
14370 (spu_target_ops): Add spu_join.
14371 * win32-low.c (win32_detach): Adapt to new interface.
14372 Reopen current_process_handle before detaching. Issue a child
14373 resume before detaching.
14374 (win32_join): New.
14375 (win32_target_op): Add win32_join.
14376
1d5315fe
PA
143772007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14378
14379 * win32-low.c (win32-attach): Fix return value.
14380 * target.h (target_ops): Describe ATTACH return values.
14381
bf914831
PA
143822007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14383
14384 * win32-low.c (GETPROCADDRESS): Define.
14385 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14386 (winapi_DebugSetProcessKillOnExit): Likewise.
14387 (win32_create_inferior): Force usage of ansi CreateProcessA.
14388 (win32_attach): Use GETPROCADDRESS.
14389 (win32_detach): Likewise.
14390
f72f3e60
PA
143912007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14392
14393 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14394
ed50f18f
PA
143952007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14396
14397 * win32-low.c: Commit leftover changes from 2007-03-29.
14398
0c2ead7e
DJ
143992007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14400
14401 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14402 fields short instead of int. Add explicit padding.
14403 (i387_cache_to_fsave): Remove unnecessary casts.
14404 (i387_fsave_to_cache): Doc fix.
14405 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14406
73725ff3
DJ
144072007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14408
14409 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14410 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14411
d99f33d8
PA
144122007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14413
14414 * configure.srv (arm*-*-mingw32ce*): Move near the other
14415 arm targets.
14416
68070c10
PA
144172007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14418
2482afc6 14419 * configure.ac: Add errno checking.
68070c10
PA
14420 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14421 sys/file.h and malloc.h.
14422 (AC_CHECK_DECLS): Add perror.
14423 (srv_mingwce): Handle.
2482afc6 14424 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
14425 win32-i386-low.o to srv_tgtobj.
14426 (i[34567]86-*-mingw*): Likewise.
14427 (arm*-*-mingw32ce*): Add case.
14428 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14429 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14430 [__MINGW32CE__] (strerror): New function.
14431 [__MINGW32CE__] (errno): Define to GetLastError.
14432 [__MINGW32CE__] (COUNTOF): New macro.
14433 (remote_open): Remove extra close call.
14434 * mem-break.c (delete_breakpoint_at): New function.
14435 * mem-break.h (delete_breakpoint_at): Declare.
14436 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14437 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14438 [USE_WIN32API] (read, write): Add char* casts.
14439 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14440 * server.h: Include wincecompat.h on Windows CE.
14441 [HAVE_ERRNO_H]: Check.
14442 (perror): Declare if not declared.
14443 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14444 (perror_with_name): Remove errno declaration.
14445 * wincecompat.h: New.
14446 * wincecompat.c: New.
14447 * win32-low.h: New.
14448 * win32-arm-low.c: New.
14449 * win32-i386-low.c: New.
14450 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14451 (OUTMSG2): Make it safe.
14452 (_T): New macro.
14453 (COUNTOF): New macro.
14454 (NUM_REGS): Get it from the low target.
14455 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14456 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14457 (thread_rec): Let low target handle debug registers.
14458 (child_add_thread): Likewise.
14459 (child_init_thread_list): Likewise.
14460 (continue_one_thread): Likewise.
14461 (regptr): New.
14462 (do_child_fetch_inferior_registers): Move to ...
14463 * win32-i386-low.c: ... here, and rename to ...
14464 (do_fetch_inferior_registers): ... this.
889bf7c5 14465 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
14466 Go through the low target.
14467 (do_child_store_inferior_registers): Use regptr.
14468 (strwinerror): New function.
14469 (win32_create_inferior): Handle Windows CE.
14470 Use strwinerror instead of strerror on Windows error
14471 codes. Add program to the error output.
14472 Don't close the main thread handle on Windows CE.
14473 (win32_attach): Use coredll.dll on Windows CE.
14474 (win32_kill): Close current process and current
14475 thread handles.
14476 (win32_detach): Use coredll.dll on Windows CE.
14477 (win32_resume): Let low target handle debug registers, and
14478 step request.
14479 (handle_exception): Add/Remove initial breakpoint. Avoid
14480 non-existant WSTOPSIG on Windows CE.
14481 (win32_read_inferior_memory): Cast to remove warning.
14482 (win32_arch_string): Go through the low target.
14483 (initialize_low): Call set_breakpoint_data with the low
14484 target's breakpoint.
14485 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14486 FOP_REGNUM, mappings): Move to ...
14487 * win32-i386-low.c: ... here.
14488 * win32-low.c (win32_thread_info): Move to ...
14489 * win32-low.h: ... here.
14490 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14491 win32-arm-low.c and wincecompat.c.
14492 (all:): Add $EXEEXT.
14493 (install-only:): Likewise.
14494 (gdbserver:): Likewise.
14495 (gdbreplay:): Likewise.
14496 * config.in: Regenerate.
14497 * configure: Regenerate.
14498
41093d81
PA
144992007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14500
14501 * win32-low.c: Rename typedef thread_info to
14502 win32_thread_info throughout.
14503
544afa54
PA
145042007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14505
14506 * win32-i386-low.c: Rename to ...
14507 * win32-low.c: ... this.
14508 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14509 * Makefile.in: Likewise.
14510
bce7165d
PA
145112007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14512
14513 * remote-utils.c (monitor_output): Constify msg parameter.
14514 * server.h (monitor_output): Likewise.
14515 * win32-i386-low.c (handle_output_debug_string): New.
14516 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14517 handle_output_debug_string.
14518 (get_child_debug_event): Likewise.
14519
506c7aa0
DJ
145202007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14521
14522 * server.c (main): Correct strtoul check.
14523
42c81e2a
DJ
145242007-03-27 Jon Ringle <jon@ringle.org>
14525
14526 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14527
9453113a
DJ
145282007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14529
14530 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14531
64a69107
DJ
145322007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14533
14534 * terminal.h: Check HAVE_SGTTY_H.
14535
145362007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
14537
14538 * remote-utils.c (remote_open): Print out the assigned port number.
14539
c74d0ad8
DJ
145402007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14541
14542 * remote-utils.c (monitor_output): New function.
14543 * server.c (debug_threads): Define here.
14544 (monitor_show_help): New function.
14545 (handle_query): Handle qRcmd.
14546 (main): Do not handle 'd' packet.
14547 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14548 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14549 of debug_threads.
14550
de7c3b4a
PA
145512007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14552
14553 * Makefile.in (EXEEXT): New.
14554 (clean): Use $(EXEEXT).
14555
ef57601b
PA
145562007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14557
14558 * target.h (target_ops): Rename send_signal to request_interrupt,
14559 and remove enum target_signal parameter.
14560 * linux-low.c (linux_request_interrupt): Rename from
14561 linux_send_signal, and always send SIGINT.
14562 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14563 and always send SIGINT.
14564 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14565 of send_signal.
14566 (input_interrupt): Likewise.
14567
820f2bda
PA
145682007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14569
14570 * server.c (get_features_xml): Check if target implemented
14571 arch_string.
14572 * win32-i386-low.c (win32_arch_string): New.
14573 (win32_target_ops): Add win32_arch_string as arch_string member.
14574
ab39bf24
UW
145752007-02-22 Markus Deuling <deuling@de.ibm.com>
14576
14577 * spu-low.c (spu_arch_string): New.
14578 (spu_target_ops): Add spu_arch_string.
14579
61ff6e04
DJ
145802007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14581
14582 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14583 * configure.ac: Do not check for terminal.h.
14584 * configure, config.in: Regenerated.
14585
fb1e4ffc
DJ
145862007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14587
14588 * Makefile.in (OBS): Add $(XML_BUILTIN).
14589 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14590 (clean): Update.
14591 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14592 (arm-with-iwmmxt.c): New.
14593 * config.in, configure: Regenerate.
14594 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14595 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14596 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14597 (arm*-*-linux*): Add iWMMXt and regset support.
14598 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14599 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14600 (arm_store_wmmxregset, target_regsets): New.
14601 * server.c (get_features_xml): Take annex argument. Check builtin
14602 XML documents.
14603 (handle_query): Handle multiple annexes.
14604
0f48aa01
DJ
146052007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14606
14607 * remote-utils.c [USE_WIN32API] (read, write): Define.
14608 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14609 write.
14610
23181151
DJ
146112007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14612
14613 * linux-i386-low.c (the_low_target): Set arch_string.
14614 * linux-x86-64-low.c (the_low_target): Likewise.
14615 * linux-low.c (linux_arch_string): New.
14616 (linux_target_ops): Add it.
14617 * linux-low.h (struct linux_target_ops): Add arch_string.
14618 * server.c (write_qxfer_response): Use const void * for DATA.
14619 (get_features_xml): New.
14620 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14621 * target.h (struct target_ops): Add arch_string method.
14622
9d606399
DJ
146232007-01-03 Denis Pilat <denis.pilat@st.com>
14624 Daniel Jacobowitz <dan@codesourcery.com>
14625
14626 * linux-low.c (linux_kill): Handle being called with no threads.
14627 * win32-i386-low.c (win32_kill): Likewise.
14628 (get_child_debug_event): Clear current_process_handle.
14629
146302006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
14631 Daniel Jacobowitz <dan@codesourcery.com>
14632
14633 * remote-utils.c (remote_open): Check the type of specified
14634 serial port devices before opening them.
14635 * server.c (main): Kill the inferior if an error occurs during
14636 the first remote_open.
14637
a5e13d24
DJ
146382006-12-05 Markus Deuling <deuling@de.ibm.com>
14639
14640 * README: Update supported targets.
14641
186947f7
DJ
146422006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14643
14644 * Makefile.in (clean): Remove reg-mips64.c.
14645 (reg-mips64.c, reg-mips64.o): New rules.
14646 * configure.srv: Handle mips64. Include regset support for mips.
14647 * linux-mips-low.c (union mips_register): New.
14648 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14649 (mips_breakpoint, mips_breakpoint_at): Use int.
14650 (mips_collect_register, mips_supply_register)
14651 (mips_collect_register_32bit, mips_supply_register_32bit)
14652 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14653 (mips_store_fpregset, target_regsets): New.
14654 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14655
a13e2c95
UW
146562006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14657
14658 * configure.srv: Add target "spu*-*-*".
14659 * Makefile.in (clean): Remove reg-spu.c.
14660 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14661 * spu-low.c: New file.
14662
cb7283db
DJ
146632006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14664
14665 * configure.ac: Correct td_thr_tls_get_addr test.
14666 * configure: Regenerated.
14667
89be2091
DJ
146682006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14669
14670 * linux-low.c (linux_wait_for_event): Reformat. Use the
14671 pass_signals array.
14672 * remote-utils.c (decode_address_to_semicolon): New.
14673 * server.c (pass_signals, handle_general_set): New.
14674 (handle_query): Mention QPassSignals for qSupported.
14675 (main): Call handle_general_set.
14676 * server.h (pass_signals, decode_address_to_semicolon): New.
14677
000ef4f0
DJ
146782006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14679
14680 * server.c (handle_query): Correct error handling for read_auxv.
14681
b7149293
UW
146822005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14683
14684 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14685 and srv_linux_thread_db to yes.
14686 * linux-s390-low.c (s390_fill_gregset): New function.
14687 (target_regsets): Define data structure.
14688
dae5f5cf
DJ
146892006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14690
14691 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14692 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14693 * config.in, configure: Regenerated.
14694 * inferiors.c (gdb_id_to_thread): New function.
14695 (gdb_id_to_thread_id): Use it.
14696 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14697 * linux-low.h (struct process_info): Add th member.
14698 (thread_db_get_tls_address): New prototype.
14699 * remote-utils.c (decode_address): Make non-static.
14700 * server.c (handle_query): Handle qGetTLSAddr.
14701 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14702 * target.h (struct target_ops): Add get_tls_address.
14703 * thread-db.c (maybe_attach_thread): Save the thread handle.
14704 (thread_db_get_tls_address): New.
14705
32ca6d61
DJ
147062006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14707
14708 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14709 (linux_resume_one_process): Take a siginfo_t *. Update all
14710 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14711 (struct pending_signals): Add a siginfo_t.
14712 (linux_wait_for_process): Always set last_status.
14713 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14714 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14715 * linux-low.h (struct process_info): Add last_status.
14716
5ffff7c1
DJ
147172006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14718
14719 * remote-utils.c (try_rle): New function.
14720 (putpkt_binary): Use it.
14721
8695c747
DJ
147222006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14723
14724 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14725 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14726 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14727 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14728 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14729 point registers.
14730
290fadea
RS
147312006-08-08 Richard Sandiford <richard@codesourcery.com>
14732
14733 * server.c (terminal_fd): New variable.
14734 (old_foreground_pgrp): Likewise.
14735 (restore_old_foreground_pgrp): New function.
14736 (start_inferior): Record the terminal file descriptor in terminal_fd
14737 and its original foreground group in old_foreground_pgrp. Register
14738 restore_old_foreground_pgrp with atexit().
14739
9f2e1e63
DJ
147402006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14741
14742 * server.c (handle_query): Correct qPart to qXfer.
14743
b80864fb
DJ
147442006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14745
14746 * configure.ac: Check for more headers which are missing on
14747 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14748 * configure.srv: Add Cygwin and mingw32.
14749 * remote-utils.c: Don't include headers unconditionally which
14750 are missing on mingw32. Include <winsock.h> for mingw32.
14751 (remote_open): Adjust for mingw32 support. Flush
14752 standard error after writing to it.
14753 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14754 (unblock_async_io, enable_async_io, disable_async_io)
14755 (readchar, getpkt): Update for Winsock support.
14756 (prepare_resume_reply): Expect a protocol signal number.
14757 * server.c: Disable <sys/wait.h> on mingw32.
14758 (start_inferior): Adjust for mingw32 support. Flush
14759 standard error after writing to it.
14760 (attach_inferior): Likewise. Use protocol signal
14761 numbers.
14762 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14763 and names.
14764 * win32-i386-low.c: New file.
14765 * Makefile.in (XM_CLIBS): Set.
14766 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14767 (win32-i386-low.o): New dependency rule.
14768 * linux-low.c (linux_wait): Use target signal numbers.
14769 * target.h (struct target_ops): Doc fix.
14770 * server.h (target_signal_to_name): New prototype.
14771 * gdbreplay.c: Don't include headers unconditionally which
14772 are missing on mingw32. Include <winsock.h> for mingw32.
14773 (remote_close, remote_open): Adjust for Winsock support.
14774 * configure, config.in: Regenerated.
14775
0876f84a
DJ
147762006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14777
14778 * server.c (decode_xfer_read, write_qxfer_response): New.
14779 (handle_query): Take a packet length argument. Handle
14780 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14781 the qSupported response.
14782 (main): Update call to handle_query.
14783
01f9e8fa
DJ
147842006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14785
14786 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14787 (putpkt_binary): Renamed from putpkt and adjusted for binary
14788 data.
14789 (putpkt): New wrapper for putpkt_binary.
14790 (readchar): Don't mask off the high bit.
14791 (decode_X_packet): New function.
14792 * server.c (main): Call putpkt_binary if a handler sets the packet
14793 length. Save the length of the incoming packet. Handle 'X'.
14794 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14795
be2a5f71
DJ
147962006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14797
14798 * server.c (handle_query): Handle qSupported.
14799
ea025f5f
DJ
148002006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14801
14802 * remote-utils.c (all_symbols_looked_up): New variable.
14803 (look_up_one_symbol): Check it.
14804 * server.h (look_up_one_symbol): New declaration.
14805 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14806
9308fc88
DJ
148072006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14808
14809 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 14810 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
14811 (PTRACE_GET_THREAD_AREA): Define.
14812 (ps_get_thread_area): New function.
14813
52fb6437
NS
148142006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14815
14816 * configure.srv (m68k*-*-uclinux*): New target.
14817 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14818 (linux_resume_one_process): Remove extraneous cast.
14819 (linux_read_offsets): New.
14820 (linux_target_op): Add linux_read_offsets on mmuless systems.
14821 * server.c (handle_query): Add qOffsets logic.
14822 * target.h (struct target_ops): Add read_offsets.
14823
21b0f40c
DJ
148242006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14825
14826 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14827 (PTRACE_GET_THREAD_AREA): Define.
14828 (ps_get_thread_area): New function.
14829 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14830 (linux-x86-64-low.o): Update.
14831
0050a760
DJ
148322006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14833
14834 * configure.ac: Remove checks for prfpregset_t.
14835 * gdb_proc_service.h: New file.
14836 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14837 new "gdb_proc_service.h".
14838 * proc-service.c: Likewise.
14839 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14840 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14841 * Makefile.in (gdb_proc_service_h): Updated.
14842 * configure, config.in: Regenerated.
14843
b92a518e
DJ
148442006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14845
14846 * remote-utils.c (prepare_resume_reply): Move declaration
14847 of gdb_id_from_wait to the top of the block.
14848
545587ee
DJ
148492006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14850
14851 * linux-low.c (regsets_store_inferior_registers): Read the regset
14852 from the target before filling it.
14853
9db87ebd
DJ
148542006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14855
14856 * server.c (attach_inferior): Return SIGTRAP for a successful
14857 attach.
14858
dd24457d
DJ
148592006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14860
14861 * Makefile.in (OBS): Add version.o.
14862 (STAGESTUFF): Delete.
14863 (version.o): Add dependencies.
14864 (version.c): Replace rule.
14865 (clean): Remove version.c.
14866 * server.c (gdbserver_version): New.
14867 (gdbserver_usage): Use printf.
14868 (main): Handle --version and --help.
14869 * server.h (version, host_name): Add declarations.
14870
6f0f660e
EZ
148712005-12-23 Eli Zaretskii <eliz@gnu.org>
14872
889bf7c5
PA
14873 * linux-arm-low.c:
14874 * linux-arm-low.c:
14875 * inferiors.c:
14876 * i387-fp.h:
14877 * i387-fp.c:
14878 * gdbreplay.c:
14879 * regcache.c:
14880 * proc-service.c:
14881 * mem-break.h:
14882 * mem-break.c:
14883 * linux-x86-64-low.c:
14884 * linux-sh-low.c:
14885 * linux-s390-low.c:
14886 * linux-ppc64-low.c:
14887 * linux-ppc-low.c:
14888 * linux-mips-low.c:
14889 * linux-m68k-low.c:
14890 * linux-m32r-low.c:
14891 * linux-low.h:
14892 * linux-low.c:
14893 * linux-ia64-low.c:
14894 * linux-i386-low.c:
14895 * linux-crisv32-low.c:
14896 * thread-db.c:
14897 * terminal.h:
14898 * target.h:
14899 * target.c:
14900 * server.h:
14901 * server.c:
14902 * remote-utils.c:
14903 * regcache.h:
14904 * utils.c:
14905 * Makefile.in:
14906 * configure.ac:
6f0f660e
EZ
14907 * gdbserver.1: Add (C) after Copyright. Update the FSF
14908 address.
14909
9d1fb177
DJ
149102005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14911
14912 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14913 (arm_breakpoint_at): Recognize both breakpoints.
14914 (the_low_target): Use the correct breakpoint instruction.
14915
011a70c2
DJ
149162005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14917
14918 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14919 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14920 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14921 (the_low_target): Update.
14922
7fb85e41
AS
149232005-10-25 Andreas Schwab <schwab@suse.de>
14924
14925 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14926
14927 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14928 (ia64_num_regs): Reduce to 462.
14929
3db0444b
DJ
149302005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14931
14932 * acinclude.m4: Correct quoting.
14933 * aclocal.m4: Regenerated.
14934
14935 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14936 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14937 (thread_db_init): Call thread_db_err_str.
14938 * configure.ac: Check for TD_VERSION.
14939 * config.in, configure: Regenerated.
14940
bee0189a
DJ
149412005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14942
14943 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14944
e9d25b98
DJ
149452005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14946
14947 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14948 is not available. Define HAVE_PTRACE_GETREGS if it is.
14949 * config.in, configure: Regenerated.
14950 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14951 * linux-i386-low.c, linux-m68k-low.c: Update to use
14952 HAVE_PTRACE_GETREGS.
14953 * linux-low.c (regsets_fetch_inferior_registers)
14954 (regsets_store_inferior_registers): Only return 0 if we processed
14955 GENERAL_REGS.
14956 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14957 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14958
a06660f7
DJ
149592005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14960
14961 * inferiors.c (struct thread_info): Add gdb_id.
14962 (add_thread): Add gdb_id argument.
14963 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14964 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14965 calls to add_thread.
14966 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14967 * server.c (handle_query): Use thread_to_gdb_id.
14968 (handle_v_cont, main): Use gdb_id_to_thread_id.
14969 * server.h (add_thread): Update prototype.
14970 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14971 prototypes.
14972
5a1f5858
DJ
149732005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14974
14975 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14976 left-padded registers.
14977 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14978 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14979
e122f1f5
SE
149802005-07-01 Steve Ellcey <sje@cup.hp.com>
14981
14982 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14983 * configure: Regenerate.
14984 * config.in: Regenerate.
14985 * server.h (NEED_DECLARATION_STRERROR):
14986 Replace with !HAVE_DECL_STRERROR.
14987
d592fa2f
DJ
149882005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14989
14990 * linux-low.c (linux_wait, linux_send_signal): Don't test
14991 an unsigned long variable for > 0 if it could be MAX_ULONG.
14992 * server.c (myresume): Likewise.
14993 * target.c (set_desired_inferior): Likewise.
14994
ccbd4912
MK
149952005-06-13 Mark Kettenis <kettenis@gnu.org>
14996
14997 * configure.ac: Simplify and improve check for socklen_t.
14998 * configure, config.in: Regenerate.
14999
f450004a
DJ
150002005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15001
15002 * acconfig.h: Remove.
15003 * configure.ac: Add a test for socklen_t. Use three-argument
15004 AC_DEFINE throughout.
15005 * config.in: Regenerated using autoheader 2.59.
15006 * configure: Regenerated.
15007
15008 * gdbreplay.c (socklen_t): Provide a default.
15009 (remote_open): Use socklen_t.
15010 * remote-utils.c (socklen_t): Provide a default.
15011 (remote_open): Use socklen_t.
15012 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15013 unsigned char.
15014
15015 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15016 char for buffers.
15017 * linux-low.c (linux_read_memory, linux_write_memory)
15018 (linux_read_auxv): Likewise.
15019 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15020 (check_mem_write): Likewise.
15021 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15022 Likewise.
15023 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15024 (registers_from_string, register_data): Likewise.
15025 * server.c (handle_query, main): Likewise.
15026 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15027 (decode_M_packet): Likewise.
15028 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15029 * target.h (struct target_ops): Update read_memory, write_memory,
15030 and read_auxv.
15031 (read_inferior_memory, write_inferior_memory): Update.
15032 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15033 to unsigned char *.
15034 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15035 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15036 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15037 linux-s390-low.c, linux-sh-low.c: Update for changes in
15038 read_inferior_memory and the_low_target->breakpoint.
15039
eee84df1
DJ
150402005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15041
15042 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15043 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15044 * configure.srv: Add powerpc64-*-linux*.
15045 * linux-ppc64-low.c: New file.
15046
45b134e5
OF
150472005-05-23 Orjan Friberg <orjanf@axis.com>
15048
15049 * linux-cris-low.c: New file with support for CRIS.
15050 * linux-crisv32-low.c: Ditto for CRISv32.
15051 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15052 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 15053 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
15054 reg-crisv32.o, and reg-crisv32.c to make rules.
15055 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15056 recognized targets.
15057
48d93c75
UW
150582005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15059
15060 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15061 of sizeof (PTRACE_XFER_TYPE).
15062 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15063
e013ee27
OF
150642005-05-12 Orjan Friberg <orjanf@axis.com>
15065
889bf7c5 15066 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
15067 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15068 pointers for hardware watchpoint support.
15069 * linux-low.h (struct linux_target_ops): Ditto.
15070 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15071 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15072 to linux_target_ops.
15073 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15074 reply packet.
15075 * server.c (main): Recognize 'Z' and 'z' packets.
15076
b0ded00b
UW
150772005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15078
15079 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15080 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15081 (the_low_target): Add new members.
15082
8643e2ad
DJ
150832005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15084
15085 * proc-service.c (ps_lgetregs): Search all_processes instead of
15086 all_threads.
15087
fc620387
DJ
150882005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15089
15090 * server.c (start_inferior): Change return type to int.
15091 (attach_inferior): Change sigptr to int *.
15092 (handle_v_cont, handle_v_requests): Change signal to int *.
15093 (main): Change signal to int.
15094
150952005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
15096
15097 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15098 * configure.srv: Add m32r*-*-linux*.
15099 * linux-m32r-low.c: New file.
15100
e0e76420
DJ
151012005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15102
15103 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15104
a1928bad
DJ
151052005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15106
15107 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15108 Take unsigned long arguments for PIDs.
15109 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15110 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15111 (wait_for_sigstop, linux_resume_one_process)
15112 (regsets_fetch_inferior_registers, linux_send_signal)
15113 (linux_read_auxv): Likewise. Update the types of variables holding
15114 PIDs. Update format string specifiers.
15115 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15116 * remote-utils.c (prepare_resume_reply): Likewise.
15117 * server.c (cont_thread, general_thread, step_thread)
15118 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15119 unsigned long.
15120 (handle_query): Update format specifiers.
15121 (handle_v_cont, main): Use strtoul for thread IDs.
15122 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15123 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15124 (general_thread, step_thread, thread_from_wait)
15125 (old_thread_from_wait): Update.
15126 * target.h (struct thread_resume): Use unsigned long for THREAD.
15127 (struct target_ops): Use unsigned long for arguments to attach and
15128 thread_alive.
15129
dcdb98d2
DJ
151302005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15131
15132 * acinclude.m4: Include bfd/bfd.m4 directly.
15133 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15134 <agriffis@toolchain.org>.
15135 * aclocal.m4, configure: Regenerated.
15136
bec39cab
AC
151372005-01-07 Andrew Cagney <cagney@gnu.org>
15138
15139 * configure.ac: Rename configure.in, require autoconf 2.59.
15140 * configure: Re-generate.
15141
434c4c77
DJ
151422004-12-08 Daniel Jacobowitz <dan@debian.org>
15143
15144 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15145 LIBS when finished.
15146 * aclocal.m4: Regenerated.
15147 * configure: Regenerated.
15148
db1d3e1b
AS
151492004-11-21 Andreas Schwab <schwab@suse.de>
15150
15151 * linux-m68k-low.c (m68k_num_gregs): Define.
15152 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15153 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15154 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15155 (m68k_breakpoint_at): New. Add to the_low_target.
15156
15157 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15158 srv_linux_thread_db to yes.
15159
43360365
JB
151602004-10-20 Joel Brobecker <brobecker@gnat.com>
15161
15162 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15163 (ARCH_SET_FS): Likewise.
15164 (ARCH_GET_FS): Likewise.
15165 (ARCH_GET_GS): Likewise.
15166
fd500816
DJ
151672004-10-16 Daniel Jacobowitz <dan@debian.org>
15168
15169 * linux-i386-low.c (ps_get_thread_area): New.
15170 * linux-x86-64-low.c (ps_get_thread_area): New.
15171 * linux-low.c: Include <sys/syscall.h>.
15172 (linux_kill_one_process): Don't kill the first thread here.
15173 (linux_kill): Kill the first thread here.
15174 (kill_lwp): New function.
15175 (send_sigstop, linux_send_signal): Use it.
15176 * proc-service.c: Clean up #ifdefs.
15177 (fpregset_info): Delete.
15178 (ps_lgetregs): Update and enable implementation.
15179 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15180 implementations.
15181 * remote-utils.c (struct sym_cache, symbol_cache): New.
15182 (input_interrupt): Print a clearer message.
15183 (async_io_enabled): New variable.
15184 (enable_async_io, disable_async_io): Use it. Update comments.
15185 (look_up_one_symbol): Use the symbol cache.
15186 * thread-db.c (thread_db_look_up_symbols): New function.
15187 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15188
f6de3c42
DJ
151892004-10-16 Daniel Jacobowitz <dan@debian.org>
15190
15191 * configure.in: Test for -rdynamic.
15192 * configure: Regenerated.
15193 * Makefile (INTERNAL_LDFLAGS): New.
15194 (gdbserver, gdbreplay): Use it.
15195
2c0fc042
AC
151962004-09-02 Andrew Cagney <cagney@gnu.org>
15197
15198 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15199
075b3282
DJ
152002004-03-23 Daniel Jacobowitz <drow@mvista.com>
15201
15202 * linux-low.c (linux_wait): Clear all_processes list also.
15203
fa6a77dc
DJ
152042004-03-12 Daniel Jacobowitz <drow@mvista.com>
15205
15206 * linux-low.c: Include <errno.h>. Remove extern declaration of
15207 errno.
15208
6d782a97
DJ
152092004-03-12 Daniel Jacobowitz <drow@mvista.com>
15210
15211 * gdbreplay.c, server.h, utils.c: Update copyright years.
15212
3a7fb99b
DJ
152132004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15214
15215 * server.c (main): Print child status or termination signal from
15216 variable 'signal', not 'sig'.
15217
c3e735a6
DJ
152182004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15219
15220 * linux-low.c (linux_read_memory): Change return type to
15221 int. Check for and return error from ptrace().
15222 * target.c (read_inferior_memory): Change return type to int. Pass
15223 back return status from the_target->read_memory().
15224 * target.h (struct target_ops): Adapt *read_memory() prototype.
15225 Update comment.
15226 (read_inferior_memory): Adapt prototype.
15227 * server.c (main): Return an error packet if
15228 read_inferior_memory() returns an error.
15229
a59d1c82
DJ
152302004-03-04 Daniel Jacobowitz <drow@mvista.com>
15231
15232 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15233 Unify with other clean targets.
15234
dc3f8883
DJ
152352004-02-29 Daniel Jacobowitz <drow@mvista.com>
15236
15237 * server.c (handle_v_cont): Call set_desired_inferior.
15238
89a208da
DJ
152392004-02-29 Daniel Jacobowitz <drow@mvista.com>
15240
15241 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15242
62ea82f5
DJ
152432004-02-29 Daniel Jacobowitz <drow@mvista.com>
15244
15245 * linux-low.c (linux_wait): Unblock async I/O.
15246 (linux_resume): Block and enable async I/O.
15247 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15248 * server.h (block_async_io, unblock_async_io): Add prototypes.
15249
6910d122
DJ
152502004-02-29 Daniel Jacobowitz <drow@mvista.com>
15251
15252 * remote-utils.c (remote_open): Print a status notice after
15253 opening a TCP port.
15254 * server.c (attach_inferior): Print a status notice after
15255 attaching.
15256
152572004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
15258
15259 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15260
c89dc5d4
DJ
152612004-02-26 Daniel Jacobowitz <drow@mvista.com>
15262
15263 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15264 error packet.
15265 * server.c, target.h: Update copyright years.
15266
4b8dad4a
RM
152672004-02-25 Roland McGrath <roland@redhat.com>
15268
15269 * target.h (struct target_ops): New member `read_auxv'.
15270 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15271 * linux-low.c (linux_read_auxv): New function.
15272 (linux_target_ops): Initialize `read_auxv' member to that.
15273
d7446758
JB
152742004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15275
15276 Committed by Jim Blandy <jimb@redhat.com>.
15277
15278 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 15279 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
15280 instead of GPR_SIZE to distiguish s390 and s390x targets.
15281
5544ad89
DJ
152822004-01-31 Daniel Jacobowitz <drow@mvista.com>
15283
15284 * linux-low.c: Update copyright year.
15285 (check_removed_breakpoint): Clear pending_is_breakpoint.
15286 (linux_set_resume_request, linux_queue_one_thread)
15287 (resume_status_pending_p): New functions.
15288 (linux_continue_one_thread): Use process->resume.
15289 (linux_resume): Only resume threads if there are no pending events.
15290 * linux-low.h (struct process_info): Add resume request
15291 pointer.
15292
2a68b70e
DJ
152932004-01-30 Daniel Jacobowitz <drow@mvista.com>
15294
15295 * regcache.c (new_register_cache): Clear the allocated register
15296 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15297
64386c31
DJ
152982003-10-13 Daniel Jacobowitz <drow@mvista.com>
15299
15300 * linux-low.c (linux_resume): Take a struct thread_resume *
15301 argument.
15302 (linux_wait): Update call.
15303 (resume_ptr): New static variable.
15304 (linux_continue_one_thread): Renamed from
15305 linux_continue_one_process. Use resume_ptr.
15306 (linux_resume): Use linux_continue_one_thread.
15307 * server.c (handle_v_cont, handle_v_requests): New functions.
15308 (myresume): New function.
15309 (main): Handle 'v' case.
15310 * target.h (struct thread_resume): New type.
15311 (struct target_ops): Change argument of "resume" to struct
15312 thread_resume *.
15313 (myresume): Delete macro.
15314
c938e9b0
L
153152003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15316
15317 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15318 (uninstall): Support DESTDIR.
15319
7f313d07
BC
15320Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15321
15322 * configure.srv: Add xscale*linux copy of arm*linux entry.
15323
3b2fc2ea
DJ
153242003-07-24 Daniel Jacobowitz <drow@mvista.com>
15325
15326 * linux-arm-low.c (arm_reinsert_addr): New function.
15327 (the_low_target): Add arm_reinsert_addr.
15328
1c0a559e
MK
153292003-07-08 Mark Kettenis <kettenis@gnu.org>
15330
15331 * mem-break.c: Remove whitespace at end of file.
15332
43d5792c
DJ
153332003-06-28 Daniel Jacobowitz <drow@mvista.com>
15334
15335 * configure.in: Check whether we need to prototype strerror.
15336 * server.h: Optionally prototype strerror.
15337 * gdbreplay.c (perror_with_name): Use strerror.
15338 * linux-low.c (linux_attach_lwp): Use strerror.
15339 * utils.c (perror_with_name): Use strerror.
15340 * config.in, configure: Regenerated.
15341
c8a86edf
DJ
153422003-06-28 Daniel Jacobowitz <drow@mvista.com>
15343
15344 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15345 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15346
73d37363
DJ
153472003-06-20 Daniel Jacobowitz <drow@mvista.com>
15348
15349 * Makefile.in (SFILES): Update.
15350 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15351 low-sun3.c: Remove files.
15352
6ad8ae5c
DJ
153532003-06-17 Daniel Jacobowitz <drow@mvista.com>
15354
15355 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15356 (linux_detach_one_process, linux_detach): New functions.
15357 (linux_target_ops): Add linux_detach.
15358 * server.c (main): Handle 'D' packet.
15359 * target.h (struct target_ops): Add "detach" member.
15360 (detach_inferior): Define.
15361
1581182a
MK
153622003-06-13 Mark Kettenis <kettenis@gnu.org>
15363
15364 From Kelley Cook <kelleycook@wideopenwest.com>:
15365 * configure.srv: Accept i[34567]86 variants.
15366
e5379b03
DJ
153672003-06-05 Daniel Jacobowitz <drow@mvista.com>
15368
15369 * linux-low.c (linux_wait_for_event): Correct comment typos.
15370 (linux_resume_one_process): Call check_removed_breakpoint.
15371 (linux_send_signal): New function.
15372 (linux_target_ops): Add linux_send_signal.
15373 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15374 of kill.
15375 * target.h (struct target_ops): Add send_signal.
15376
2ff29de4
JB
153772003-05-29 Jim Blandy <jimb@redhat.com>
15378
15379 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15380 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15381 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15382 away part of the register's value.
15383
254787d4
DJ
153842003-03-26 Daniel Jacobowitz <drow@mvista.com>
15385
15386 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15387 (linux_wait_for_event, linux_init_signals): Likewise.
15388
94e10508
DJ
153892003-03-17 Daniel Jacobowitz <drow@mvista.com>
15390
15391 * configure.in: Check for stdlib.h.
15392 * configure: Regenerated.
15393 * config.in: Regenerated.
15394
4c0711e0
DJ
153952003-01-04 Andreas Schwab <schwab@suse.de>
15396
15397 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15398
ef66e766
AC
153992003-01-02 Andrew Cagney <ac131313@redhat.com>
15400
15401 * Makefile.in: Remove obsolete code.
15402
a1358604
DJ
154032002-11-20 Daniel Jacobowitz <drow@mvista.com>
15404
15405 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15406 defined(PT_FPR0_HI).
15407
23ce3b1c
DJ
154082002-11-17 Stuart Hughes <seh@zee2.com>
15409
15410 * linux-arm-low.c (arm_num_regs): Increase.
15411 (arm_regmap): Include status register.
15412
154132002-11-17 Daniel Jacobowitz <drow@mvista.com>
15414
15415 * linux-low.c (register_addr): Remove incorrect -1 check.
15416
a9fa9f7d
DJ
154172002-08-29 Daniel Jacobowitz <drow@mvista.com>
15418
15419 * linux-low.c (linux_create_inferior): Call setpgid. Return
15420 the new PID.
15421 (unstopped_p, linux_signal_pid): Remove.
15422 (linux_target_ops): Remove linux_signal_pid.
15423 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15424 global instead of target method.
15425 * target.h (struct target_ops): Remove signal_pid. Update comment
15426 for create_inferior.
15427 * server.c (signal_pid): New variable.
15428 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 15429 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
15430 (attach_inferior): Set signal_pid.
15431
17574093
DJ
154322002-08-23 Daniel Jacobowitz <drow@mvista.com>
15433
15434 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15435
154362002-08-20 Jim Blandy <jimb@redhat.com>
15437
15438 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15439 default for this.
15440
154412002-08-01 Andrew Cagney <cagney@redhat.com>
15442
15443 * Makefile.in: Make chill references obsolete.
15444
154452002-07-24 Kevin Buettner <kevinb@redhat.com>
15446
15447 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15448 * configure: Regenerate.
15449 * config.in: Regenerate.
15450
154512002-07-09 David O'Brien <obrien@FreeBSD.org>
15452
15453 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15454 (perror_with_name, remote_close, remote_open, expect, play): Static.
15455
154562002-07-04 Michal Ludvig <mludvig@suse.cz>
15457
4b8dad4a 15458 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
15459 byte offsets instead of an array of indexes.
15460 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15461
154622002-06-13 Daniel Jacobowitz <drow@mvista.com>
15463
15464 * regcache.c: Add comment.
15465
154662002-06-11 Daniel Jacobowitz <drow@mvista.com>
15467
15468 * thread-db.c: New file.
15469 * proc-service.c: New file.
15470 * acinclude.m4: New file.
15471 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15472 proc-service.o, and thread-db.o.
15473 (linux-low.o): Add USE_THREAD_DB.
15474 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15475 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15476 * aclocal.m4: Regenerated.
15477 * config.in: Regenerated.
15478 * configure: Regenerated.
15479 * configure.in: Check for proc_service.h, sys/procfs.h,
15480 thread_db.h, and linux/elf.h headrs.
15481 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15482 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15483 Check for -lthread_db and thread support.
15484 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15485 PowerPC, and SuperH.
15486 * i387-fp.c: Constify arguments.
15487 * i387-fp.h: Likewise.
15488 * inferiors.c: (struct thread_info): Renamed from
15489 `struct inferior_info'. Remove PID member. Use generic inferior
15490 list header. All uses updated.
15491 (inferiors, signal_pid): Removed.
15492 (all_threads): New variable.
15493 (get_thread): Define.
15494 (add_inferior_to_list): New function.
15495 (for_each_inferior): New function.
15496 (change_inferior_id): New function.
15497 (add_inferior): Removed.
15498 (remove_inferior): New function.
15499 (add_thread): New function.
15500 (free_one_thread): New function.
15501 (remove_thread): New function.
15502 (clear_inferiors): Use for_each_inferior and free_one_thread.
15503 (find_inferior): New function.
15504 (find_inferior_id): New function.
15505 (inferior_target_data): Update argument type.
15506 (set_inferior_target_data): Likewise.
15507 (inferior_regcache_data): Likewise.
15508 (set_inferior_regcache_data): Likewise.
15509 * linux-low.c (linux_bp_reinsert): Remove.
15510 (all_processes, stopping_threads, using_thrads)
15511 (struct pending_signals, debug_threads, pid_of): New.
15512 (inferior_pid): Replace with macro.
15513 (struct inferior_linux_data): Remove.
15514 (get_stop_pc, add_process): New functions.
15515 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15516 Use add_process and add_thread.
15517 (linux_attach_lwp): New function, based on old linux_attach. Use
15518 add_process and add_thread. Set stop_expected for new threads.
15519 (linux_attach): New function.
15520 (linux_kill_one_process): New function.
15521 (linux_kill): Kill all LWPs.
15522 (linux_thread_alive): Use find_inferior_id.
15523 (check_removed_breakpoints, status_pending_p): New functions.
15524 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15525 Update. Use WNOHANG. Wait for cloned processes also. Update process
15526 struct for the found process.
15527 (linux_wait_for_event): New function.
15528 (linux_wait): Use it. Support LWPs.
15529 (send_sigstop, wait_for_sigstop, stop_all_processes)
15530 (linux_resume_one_process, linux_continue_one_process): New functions.
15531 (linux_resume): Support LWPs.
15532 (REGISTER_RAW_SIZE): Remove.
15533 (fetch_register): Use register_size instead. Call supply_register.
15534 (usr_store_inferior_registers): Likewise. Call collect_register.
15535 Fix recursive case.
15536 (regsets_fetch_inferior_registers): Improve error message.
15537 (regsets_store_inferior_registers): Add debugging.
15538 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15539 (unstopped_p, linux_signal_pid): New functions.
15540 (linux_target_ops): Add linux_signal_pid.
15541 (linux_init_signals): New function.
15542 (initialize_low): Call it. Initialize using_threads.
15543 * regcache.c (inferior_regcache_data): Add valid
15544 flag.
15545 (get_regcache): Fetch registers lazily. Add fetch argument
15546 and update all callers.
15547 (regcache_invalidate_one, regcache_invalidate): New
15548 functions.
15549 (new_register_cache): Renamed from create_register_cache.
15550 Return the new regcache.
15551 (free_register_cache): Change argument to a void *.
15552 (registers_to_string, registers_from_string): Call get_regcache
15553 with fetch flag set.
15554 (register_data): Make static. Pass fetch flag to get_regcache.
15555 (supply_register): Call get_regcache with fetch flag clear.
15556 (collect_register): Call get_regcache with fetch flag set.
15557 (collect_register_as_string): New function.
15558 * regcache.h: Update.
15559 * remote-utils.c (putpkt): Flush after debug output and use
15560 stderr.
15561 Handle input interrupts while waiting for an ACK.
15562 (input_interrupt): Use signal_pid method.
15563 (getpkt): Flush after debug output and use stderr.
15564 (outreg): Use collect_register_as_string.
15565 (new_thread_notify, dead_thread_notify): New functions.
15566 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15567 and general_thread.
15568 (look_up_one_symbol): Flush after debug output.
15569 * server.c (step_thread, server_waiting): New variables.
15570 (start_inferior): Don't use signal_pid. Update call to mywait.
15571 (attach_inferior): Update call to mywait.
15572 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15573 (main): Don't fetch/store registers explicitly. Use
15574 set_desired_inferior. Support proposed ``Hs'' packet. Update
15575 calls to mywait.
15576 * server.h: Update.
15577 (struct inferior_list, struct_inferior_list_entry): New.
15578 * target.c (set_desired_inferior): New.
15579 (write_inferior_memory): Constify.
15580 (mywait): New function.
15581 * target.h: Update.
15582 (struct target_ops): New signal_pid method.
15583 (mywait): Removed macro, added prototype.
15584
15585 * linux-low.h (regset_func): Removed.
15586 (regset_fill_func, regset_store_func): New.
15587 (enum regset_type): New.
15588 (struct regset_info): Add type field. Use new operation types.
15589 (struct linux_target_ops): stop_pc renamed to get_pc.
15590 Add decr_pc_after_break and breakpoint_at.
15591 (get_process, get_thread_proess, get_process_thread)
15592 (strut process_info, all_processes, linux_attach_lwp)
15593 (thread_db_init): New.
15594
15595 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15596 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15597 (the_low_target): Add new members.
15598 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15599 (i386_store_fpxregset): Constify.
15600 (target_regsets): Add new kind identifier.
15601 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15602 (i386_set_pc): Add debugging.
15603 (i386_breakpoint_at): New function.
15604 (the_low_target): Add new members.
15605 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15606 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15607 (mips_breakpoint_at): New.
15608 (the_low_target): Add new members.
15609 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15610 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15611 (the_low_target): Add new members.
15612 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15613 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15614 (the_low_target): Add new members.
15615 * linux-x86-64-low.c (target_regsets): Add new kind
15616 identifier.
15617
156182002-05-15 Daniel Jacobowitz <drow@mvista.com>
15619
15620 From Martin Pool <mbp@samba.org>:
15621 * server.c (gdbserver_usage): New function.
15622 (main): Call it.
15623
156242002-05-14 Daniel Jacobowitz <drow@mvista.com>
15625
15626 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15627 stop_at -> stop_pc.
15628
156292002-05-04 Andrew Cagney <ac131313@redhat.com>
15630
15631 * Makefile.in: Remove obsolete code.
15632
156332002-04-24 Michal Ludvig <mludvig@suse.cz>
15634
15635 * linux-low.c (regsets_fetch_inferior_registers),
15636 (regsets_store_inferior_registers): Removed cast to int from
15637 ptrace() calls.
15638 * regcache.h: Added declaration of struct inferior_info.
15639
156402002-04-20 Daniel Jacobowitz <drow@mvista.com>
15641
15642 * inferiors.c (struct inferior_info): Add regcache_data.
15643 (add_inferior): Call create_register_cache.
15644 (clear_inferiors): Call free_register_cache.
15645 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15646 * regcache.c (struct inferior_regcache_data): New.
15647 (registers): Remove.
15648 (get_regcache): New function.
15649 (create_register_cache, free_register_cache): New functions.
15650 (set_register_cache): Don't initialize the register cache here.
15651 (registers_to_string, registers_from_string, register_data): Call
15652 get_regcache.
15653 * regcache.h: Add prototypes.
15654 * server.h: Likewise.
15655
156562002-04-20 Daniel Jacobowitz <drow@mvista.com>
15657
15658 * mem-break.c: New file.
15659 * mem-break.h: New file.
15660 * Makefile.in: Add mem-break.o rule; update server.h
15661 dependencies.
15662 * inferiors.c (struct inferior_info): Add target_data
15663 member.
15664 (clear_inferiors): Free target_data member if set.
15665 (inferior_target_data, set_inferior_target_data): New functions.
15666 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15667 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15668 * linux-low.c (linux_bp_reinsert): New variable.
15669 (struct inferior_linux_data): New.
15670 (linux_create_inferior): Use set_inferior_target_data.
15671 (linux_attach): Likewise. Call add_inferior.
15672 (linux_wait_for_one_inferior): New function.
15673 (linux_wait): Call it.
15674 (linux_write_memory): Add const.
15675 (initialize_low): Call set_breakpoint_data.
15676 * linux-low.h (struct linux_target_ops): Add breakpoint
15677 handling members.
15678 * server.c (attach_inferior): Remove extra add_inferior
15679 call.
15680 * server.h: Include mem-break.h. Update inferior.c
15681 prototypes.
15682 * target.c (read_inferior_memory)
15683 (write_inferior_memory): New functions.
15684 * target.h (read_inferior_memory)
15685 (write_inferior_memory): Change macros to prototypes.
15686 (struct target_ops): Update comments. Add const to write_memory
15687 definition.
15688
156892002-04-11 Daniel Jacobowitz <drow@mvista.com>
15690
15691 * linux-low.c (usr_store_inferior_registers): Support
15692 registers which are allowed to fail to store.
15693 * linux-low.h (linux_target_ops): Likewise.
15694 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15695 (ppc_cannot_store_register): FPSCR may not be storable.
15696
156972002-04-09 Daniel Jacobowitz <drow@mvista.com>
15698
15699 * server.h: Include <string.h> if HAVE_STRING_H.
15700 * ChangeLog: Correct paths in last ChangeLog entry.
15701
157022002-04-09 Daniel Jacobowitz <drow@mvista.com>
15703
15704 * linux-low.h: Remove obsolete prototypes.
15705 (struct linux_target_ops): New.
15706 (extern the_low_target): New.
15707 * linux-low.c (num_regs, regmap): Remove declarations.
15708 (register_addr): Use the_low_target explicitly.
15709 (fetch_register): Likewise.
15710 (usr_fetch_inferior_registers): Likewise.
15711 (usr_store_inferior_registers): Likewise.
15712 * linux-arm-low.c (num_regs): Remove.
15713 (arm_num_regs): Define.
15714 (arm_regmap): Renamed from regmap, made static.
15715 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15716 made static.
15717 (arm_cannot_store_register): Renamed from cannot_store_register,
15718 made static.
15719 (the_low_target): New.
15720 * linux-i386-low.c (num_regs): Remove.
15721 (i386_num_regs): Define.
15722 (i386_regmap): Renamed from regmap, made static.
15723 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15724 made static.
15725 (i386_cannot_store_register): Renamed from cannot_store_register,
15726 made static.
15727 (the_low_target): New.
15728 * linux-ia64-low.c (num_regs): Remove.
15729 (ia64_num_regs): Define.
15730 (ia64_regmap): Renamed from regmap, made static.
15731 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15732 made static.
15733 (ia64_cannot_store_register): Renamed from cannot_store_register,
15734 made static.
15735 (the_low_target): New.
15736 * linux-m68k-low.c (num_regs): Remove.
15737 (m68k_num_regs): Define.
15738 (m68k_regmap): Renamed from regmap, made static.
15739 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15740 made static.
15741 (m68k_cannot_store_register): Renamed from cannot_store_register,
15742 made static.
15743 (the_low_target): New.
15744 * linux-mips-low.c (num_regs): Remove.
15745 (mips_num_regs): Define.
15746 (mips_regmap): Renamed from regmap, made static.
15747 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15748 made static.
15749 (mips_cannot_store_register): Renamed from cannot_store_register,
15750 made static.
15751 (the_low_target): New.
15752 * linux-ppc-low.c (num_regs): Remove.
15753 (ppc_num_regs): Define.
15754 (ppc_regmap): Renamed from regmap, made static.
15755 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15756 made static.
15757 (ppc_cannot_store_register): Renamed from cannot_store_register,
15758 made static.
15759 (the_low_target): New.
15760 * linux-s390-low.c (num_regs): Remove.
15761 (s390_num_regs): Define.
15762 (s390_regmap): Renamed from regmap, made static.
15763 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15764 made static.
15765 (s390_cannot_store_register): Renamed from cannot_store_register,
15766 made static.
15767 (the_low_target): New.
15768 * linux-sh-low.c (num_regs): Remove.
15769 (sh_num_regs): Define.
15770 (sh_regmap): Renamed from regmap, made static.
15771 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15772 made static.
15773 (sh_cannot_store_register): Renamed from cannot_store_register,
15774 made static.
15775 (the_low_target): New.
15776 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15777 (the_low_target): New.
15778
157792002-04-09 Daniel Jacobowitz <drow@mvista.com>
15780
15781 * Makefile.in: Add stamp-h target.
15782 * configure.in: Create stamp-h.
15783 * configure: Regenerated.
15784
157852002-04-09 Daniel Jacobowitz <drow@mvista.com>
15786
15787 * inferiors.c: New file.
15788 * target.c: New file.
15789 * target.h: New file.
15790 * Makefile.in: Add target.o and inferiors.o. Update
15791 dependencies.
15792 * linux-low.c (inferior_pid): New static variable,
15793 moved from server.c.
15794 (linux_create_inferior): Renamed from create_inferior.
15795 Call add_inferior. Return 0 on success instead of a PID.
15796 (linux_attach): Renamed from myattach.
15797 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15798 (linux_thread_alive): Renamed from mythread_alive.
15799 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15800 child dies.
15801 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15802 (regsets_store_inferior_registers): Correct error message.
15803 Add missing ``return 0''.
15804 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15805 (linux_store_registers): Renamed from store_inferior_registers.
15806 (linux_read_memory): Renamed from read_inferior_memory.
15807 (linux_write_memory): Renamed from write_inferior_memory.
15808 (linux_target_ops): New structure.
15809 (initialize_low): Call set_target_ops ().
15810 * remote-utils.c (unhexify): New function.
15811 (hexify): New function.
15812 (input_interrupt): Send signals to ``signal_pid''.
15813 * server.c (inferior_pid): Remove.
15814 (start_inferior): Update create_inferior call.
15815 (attach_inferior): Call add_inferior.
15816 (handle_query): New function.
15817 (main): Call handle_query for `q' packets.
15818 * server.h: Include "target.h". Remove obsolete prototypes.
15819 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15820
158212002-04-09 Daniel Jacobowitz <drow@mvista.com>
15822
15823 * Makefile.in: Add WARN_CFLAGS. Update configury
15824 dependencies.
15825 * configure.in: Check for <string.h>
15826 * configure: Regenerate.
15827 * config.in: Regenerate.
15828 * gdbreplay.c: Include needed system headers.
15829 (remote_open): Remove strchr prototype.
15830 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15831 * regcache.c (supply_register): Change buf argument to const void *.
15832 (supply_register_by_name): Likewise.
15833 (collect_register): Change buf argument to void *.
15834 (collect_register_by_name): Likewise.
15835 * regcache.h: Add missing prototypes.
15836 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15837 * server.c (handle_query): New function.
15838 (attached): New static variable, moved out of main.
15839 (main): Quiet longjmp clobber warnings.
15840 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15841 * utils.c (error): Remove NORETURN.
15842 (fatal): Likewise.
This page took 2.110238 seconds and 4 git commands to generate.