Remove usage of find_inferior in resume
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
eaddb425
SM
12017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2
3 * server.c (struct visit_actioned_threads_data): Remove.
4 (visit_actioned_threads): Change prototype to take arguments
5 directly.
6 (resume): Use find_thread instead of find_inferior.
7
99078d34
SM
82017-10-27 Simon Marchi <simon.marchi@ericsson.com>
9
10 * server.c (queue_stop_reply_callback): Change prototype, return
11 void.
12 (find_status_pending_thread_callback): Remove.
13 (handle_status): Replace find_inferior with find_thread and
14 for_each_thread.
15
cc628f3d
AH
162017-10-25 Alan Hayward <alan.hayward@arm.com>
17
18 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
19 with REGNO.
20 (aarch64_store_gregset): Likewise.
21 (aarch64_fill_fpregset): Likewise.
22 (aarch64_store_fpregset): Likewise.
23
4d3bb80e
SM
242017-10-21 Simon Marchi <simon.marchi@ericsson.com>
25
26 * gdbthread.h (find_thread, for_each_thread): New functions.
27 * inferiors.c (thread_of_pid): Remove.
28 (find_any_thread_of_pid): Use find_thread.
29 * linux-low.c (num_lwps): Use for_each_thread.
30
7a7cdfa0
YQ
312017-10-17 Yao Qi <yao.qi@linaro.org>
32
33 * Makefile.in: Remove one rule.
34 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
35
e675d170
YQ
362017-10-17 Yao Qi <yao.qi@linaro.org>
37
38 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
39 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
40
7eb4e0f9
YQ
412017-10-17 Yao Qi <yao.qi@linaro.org>
42
43 * configure.srv: Rename arm.o with arch/arm.o.
44
60d6cfc9
YQ
452017-10-17 Yao Qi <yao.qi@linaro.org>
46
47 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
48 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
49 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
50 (arch-i386.o, arch-amd64.o): Remove rules.
51 (arch/%.o): New rule.
52 Update POSTCOMPILE and COMPILE.pre.
53 * configure.ac: Invoke AC_CONFIG_COMMANDS.
54 * configure: Re-generated.
55 * configure.srv: Replace arch-i386.o with arch/i386.o.
56 Replace arch-amd64.o with arch/amd64.o.
57
5bfda255
YQ
582017-10-16 Yao Qi <yao.qi@linaro.org>
59
60 * configure: Regenerated.
61
9c80ecd6
SM
622017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
63
64 * inferiors.h: (struct inferior_list): Remove.
65 (struct inferior_list_entry); Remove.
66 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
67 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
68 get_first_inferior): Remove.
69 (for_each_inferior, for_each_inferior_with_data, find_inferior,
70 find_inferior_id, find_inferior_in_random): Change signature.
71 * inferiors.c (all_threads): Change type to
72 std::list<thread_info *>.
73 (get_thread): Remove macro.
74 (find_inferior, find_inferior_id): Change signature, implement
75 using find_thread.
76 (find_inferior_in_random): Change signature, implement using
77 find_thread_in_random.
78 (for_each_inferior, for_each_inferior_with_data): Change
79 signature, implement using for_each_thread.
80 (add_inferior_to_list, remove_inferior): Remove.
81 (add_thread, get_first_thread, thread_of_pid,
82 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
83 (get_first_inferior, one_inferior_p, clear_inferior_list):
84 Remove.
85 (clear_inferiors, get_thread_process): Update.
86 * gdbthread.h: Include <list>.
87 (struct thread_info) <entry>: Remove field.
88 <id>: New field.
89 (all_threads): Change type to std::list<thread_info *>.
90 (get_first_inferior): Add doc.
91 (find_thread, for_each_thread, find_thread_in_random): New
92 functions.
93 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
94 * linux-arm-low.c (update_registers_callback): Update.
95 * linux-low.c (second_thread_of_pid_p): Update.
96 (kill_one_lwp_callback, linux_detach_lwp_callback,
97 delete_lwp_callback, status_pending_p_callback, same_lwp,
98 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
99 iterate_over_lwps, not_stopped_callback,
100 resume_stopped_resumed_lwps, count_events_callback,
101 select_singlestep_lwp_callback, select_event_lwp_callback,
102 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
103 suspend_and_send_sigstop_callback, wait_for_sigstop,
104 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
105 lwp_running, linux_set_resume_request, resume_status_pending_p,
106 need_step_over_p, start_step_over, linux_resume_one_thread,
107 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
108 reset_lwp_ptrace_options_callback): Update.
109 * linux-mips-low.c (update_watch_registers_callback): Update.
110 * regcache.c (regcache_invalidate_one, regcache_invalidate):
111 Update.
112 (free_register_cache_thread_one): Remove.
113 (regcache_release): Update.
114 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
115 handle_qxfer_threads_worker): Update.
116 (handle_query): Update, use list iterator.
117 (visit_actioned_threads, handle_pending_status,
118 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
119 clear_pending_status_callback, set_pending_status_callback,
120 find_status_pending_thread_callback, handle_status,
121 process_serial_event): Update.
122 * target.c (thread_search_callback): Update.
123 * thread-db.c (thread_db_get_tls_address): Update.
124 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
125 Update.
126 * win32-i386-low.c (update_debug_registers_callback): Update.
127 * win32-low.c (delete_thread_info, child_delete_thread,
128 continue_one_thread, suspend_one_thread,
129 get_child_debug_event): Adjust.
130
9179355e
SM
1312017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
132
133 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
134 * inferiors.h: Include <list>.
135 (struct process_info) <entry>: Remove field.
136 <pid>: New field.
137 (pid_of): Change macro to function.
138 (ptid_of, lwpid_of): Remove macro.
139 (all_processes): Change type to std::list<process_info *>.
140 (ALL_PROCESSES): Remove macro.
141 (for_each_process, find_process): New function.
142 * inferiors.c (all_processes): Change type to
143 std::list<process_info *>.
144 (find_thread_process): Adjust.
145 (add_process): Likewise.
146 (remove_process): Likewise.
147 (find_process_pid): Likewise.
148 (get_first_process): Likewise.
149 (started_inferior_callback): Remove.
150 (have_started_inferiors_p): Adjust.
151 (attached_inferior_callback): Remove.
152 (have_attached_inferiors_p): Adjust.
153 * linux-low.c (check_zombie_leaders): Likewise.
154 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
155 (x86_linux_update_xmltarget): Adjust.
156 * server.c (handle_query): Likewise.
157 (gdb_reattached_process): Remove.
158 (handle_status): Adjust.
159 (kill_inferior_callback): Likewise.
160 (detach_or_kill_inferior): Remove.
161 (print_started_pid): Likewise.
162 (print_attached_pid): Likewise.
163 (detach_or_kill_for_exit): Update.
164 (process_serial_event): Likewise.
165 * linux-arm-low.c (arm_new_fork): Likewise.
166
c9cb8905
SM
1672017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
168
169 * dll.h: Include <list>.
170 (struct dll_info): Add constructor.
171 <entry>: Remove field.
172 (all_dlls): Change type to std::list<dll_info>.
173 * dll.c: Include <algorithm>.
174 (get_dll): Remove macro.
175 (all_dlls): Change type to std::list<dll_info *>.
176 (free_one_dll): Remove.
177 (match_dll): Likewise.
178 (loaded_dll): Adjust.
179 (unloaded_dll): Adjust to all_dlls type change, use
180 std::find_if. Inline code from match_dll.
181 (clear_dlls): Adjust to all_dlls type change.
182 * server.c (emit_dll_description): Remove.
183 (handle_qxfer_libraries): Adjust to all_dlls type change,
184 integrate emit_dll_description's functionality.
185
04ec7890
SM
1862017-10-12 Simon Marchi <simon.marchi@ericsson.com>
187
188 * linux-low.h (struct linux_target_ops) <delete_process>: New
189 field.
190 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
191 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
192 (struct linux_target_ops): Add delete_process callback.
193 * linux-arm-low.c (arm_delete_process): New.
194 (struct linux_target_ops): Add delete_process callback.
195 * linux-bfin-low.c (struct linux_target_ops): Likewise.
196 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
197 * linux-m32r-low.c (struct linux_target_ops): Likewise.
198 * linux-mips-low.c (mips_linux_delete_process): New.
199 (struct linux_target_ops): Add delete_process callback.
200 * linux-ppc-low.c (struct linux_target_ops): Likewise.
201 * linux-s390-low.c (struct linux_target_ops): Likewise.
202 * linux-sh-low.c (struct linux_target_ops): Likewise.
203 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
204 * linux-tile-low.c (struct linux_target_ops): Likewise.
205 * linux-x86-low.c (x86_linux_delete_process): New.
206 (struct linux_target_ops): Add delete_process callback.
207 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
208
466eecee
SM
2092017-10-12 Simon Marchi <simon.marchi@ericsson.com>
210
211 * linux-aarch64-low.c (the_low_target): Add thread delete
212 callback.
213 * linux-arm-low.c (arm_delete_thread): New function.
214 (the_low_target): Add thread delete callback.
215 * linux-bfin-low.c (the_low_target): Likewise.
216 * linux-crisv32-low.c (the_low_target): Likewise.
217 * linux-low.c (delete_lwp): Invoke delete_thread callback if
218 set.
219 * linux-low.h (struct linux_target_ops) <delete_thread>: New
220 field.
221 * linux-m32r-low.c (the_low_target): Add thread delete callback.
222 * linux-mips-low.c (mips_linux_delete_thread): New function.
223 (the_low_target): Add thread delete callback.
224 * linux-ppc-low.c (the_low_target): Likewise.
225 * linux-s390-low.c (the_low_target): Likewise.
226 * linux-sh-low.c (the_low_target): Likewise.
227 * linux-tic6x-low.c (the_low_target): Likewise.
228 * linux-tile-low.c (the_low_target): Likewise.
229 * linux-x86-low.c (the_low_target): Likewise.
230 * linux-xtensa-low.c (the_low_target): Likewise.
231
b79f7801
YZ
2322017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
233
234 * win32-low.c: Include "common-inferior.h".
235
bc3b087d
SDJ
2362017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
237
238 * inferiors.c (set_inferior_cwd): New function.
239 * server.c (handle_general_set): Handle QSetWorkingDir packet.
240 (handle_query): Inform that QSetWorkingDir is supported.
241 * win32-low.c (create_process): Pass the inferior's cwd to
242 CreateProcess.
243
d092c5a2
SDJ
2442017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
245
246 * inferiors.c (current_inferior_cwd): New global variable.
247 (get_inferior_cwd): New function.
248 * inferiors.h (struct process_info) <cwd>: New field.
249
7da0a886
SDJ
2502017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
251
252 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
253 (OBS): Add gdb_tilde_expand.o.
254
289a6840
SM
2552017-10-02 Simon Marchi <simon.marchi@ericsson.com>
256
257 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
258 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
259
256642e8
PA
2602017-09-29 Pedro Alves <palves@redhat.com>
261
262 * ax.c (gdb_parse_agent_expr): Constify.
263 * ax.h (gdb_parse_agent_expr): Constify.
264 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
265 Constify.
266 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
267 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
268 * remote-utils.h (read_ptid): Constify.
269 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
270 (process_point_options, process_serial_event): Constify.
271 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
272 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
273 (cmd_qtbuffer): Constify.
274
5b9ca4d4
PA
2752017-09-29 Pedro Alves <palves@redhat.com>
276
277 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
278 fails.
279
94c207e0
PA
2802017-09-29 Pedro Alves <palves@redhat.com>
281
282 * linux-low.c (handle_extended_wait): Pass parent thread instead
283 of process to thread_db_notice_clone.
284 * linux-low.h (thread_db_notice_clone): Replace parent process
285 parameter with parent thread parameter.
286 * thread-db.c (find_one_thread): Add comment.
287 (thread_db_notice_clone): Replace parent process parameter with
288 parent thread parameter. Temporarily switch to the parent thread.
289
75352e28
SDJ
2902017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
291
292 * gdbthread.h: Include "common-gdbthread.h".
293 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
294 "if" when validating the ptid.
295 * remote-utils.c: Include "gdbthread.h".
296 (prepare_resume_reply): Use "switch_to_thread".
297 * target.c (done_accessing_memory): Likewise.
298
ad339634
AA
2992017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
300
301 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
302 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
303 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
304 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
305 s390x-gs-linux64-ipa.o to ipa_obj.
306 * linux-s390-low.c (HWCAP_S390_GS): New define.
307 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
308 New functions.
309 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
310 (s390_arch_setup): Check for guarded-storage support and choose
311 appropriate tdesc.
312 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
313 init_registers_s390x_gs_linux64.
314 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
315 enum value.
316 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
317 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
318
cc4d742f
SM
3192017-09-22 Simon Marchi <simon.marchi@ericsson.com>
320
321 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
322
f6327dcb
KB
3232017-09-21 Kevin Buettner <kevinb@redhat.com>
324
325 * linux-low.h (struct lwp_info): Add new field, thread_handle.
326 (thread_db_thread_handle): Declare.
327 * linux-low.c (linux_target_ops): Initialize thread_handle.
328 * server.c (handle_qxfer_threads_worker): Add support for
329 "handle" attribute.
330 * target.h (struct target_ops): Add new function pointer,
331 thread_handle.
332 (target_thread_handle): Define.
333 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
334 field in lwp.
335 (thread_db_thread_handle): New function.
336
86299109
KB
3372017-09-21 Kevin Buettner <kevinb@redhat.com>
338
339 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
340 * linux-low.h (thread_db_notice_clone): Declare.
341 * thread-db.c (thread_db_notice_clone): New function.
342
f557a88a
PA
3432017-09-21 Pedro Alves <palves@redhat.com>
344
345 * server.c (gdb_read_memory, handle_status, process_serial_event)
346 (handle_serial_event, handle_target_event): Adjust to
347 set_desired_thread prototype change.
348 * target.c (set_desired_thread): Remove 'use_general' parameter
349 and adjust.
350 * target.h (set_desired_thread): Remove 'use_general' parameter.
351
223ffa71
TT
3522017-09-20 Tom Tromey <tom@tromey.com>
353
354 * target.c (target_terminal::terminal_state): Define.
355 (target_terminal::init): Rename from target_terminal_init.
356 (target_terminal::inferior): Rename from
357 target_terminal_inferior.
358 (target_terminal::ours): Rename from target_terminal_ours.
359 (target_terminal::ours_for_output, target_terminal::info): New.
360
04fd3ba9
SM
3612017-09-16 Simon Marchi <simon.marchi@ericsson.com>
362
363 * server.c (accumulate_file_name_length): Remove.
364 (emit_dll_description): Adjust to std::string change.
365 (handle_qxfer_libraries): Use std::string to hold document.
366
5e187554
SM
3672017-09-16 Simon Marchi <simon.marchi@ericsson.com>
368
369 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
370 return type of xml_escape_text.
371 * server.c (emit_dll_description): Likewise.
372
1526853e
SM
3732017-09-16 Simon Marchi <simon.marchi@ericsson.com>
374
375 * server.c (captured_main): Accept argument for --selftest.
376 Update run_tests call.
377 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
378 when registering selftests.
379
c4dfafab
SDJ
3802017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
381
382 * regcache.c (get_thread_regcache): Update code to use "std::vector"
383 instead of "VEC" for "target_desc.reg_defs".
384 (regcache_cpy): Likewise.
385 (registers_to_string): Likewise.
386 (registers_from_string): Likewise.
387 (find_regno): Likewise.
388 (supply_regblock): Likewise.
389 (regcache_raw_read_unsigned): Likewise.
390 * tdesc.c (init_target_desc): Likewise.
391 (tdesc_create_reg): Likewise.
392 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
393 (struct target_desc) <reg_defs>: Convert to "std::vector".
394 (target_desc): Do not initialize "reg_defs".
395 (~target_desc): Update code to use "std::vector" instead of "VEC"
396 for "target_desc.reg_defs".
397 (operator==): Likewise.
398
124aceb4
SM
3992017-09-15 Simon Marchi <simon.marchi@ericsson.com>
400
401 * inferiors.h (thread_to_gdb_id): Remove.
402 * inferiors.c (thread_to_gdb_id): Remove.
403 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
404 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
405 lynx_store_registers, lynx_read_memory, lynx_write_memory):
406 Likewise.
407 * nto-low.c (nto_fetch_registers, nto_store_registers,
408 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
409
96cde54f
SM
4102017-09-15 Simon Marchi <simon.marchi@ericsson.com>
411
412 * inferiors.h (gdb_id_to_thread_id): Remove.
413 * inferiors.c (gdb_id_to_thread_id): Remove.
414 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
415 removal. Move pid declaration closer to where it's used.
416
e8ca139e
SM
4172017-09-15 Simon Marchi <simon.marchi@ericsson.com>
418
419 * server.c (handle_detach): New function.
420 (process_serial_event): Move code out, call handle_detach.
421
f8a4e119
SM
4222017-09-15 Simon Marchi <simon.marchi@ericsson.com>
423
424 * server.c (require_running): Rename to ...
425 (require_running_or_return): ... this ...
426 (require_running_or_break): ... and this.
427 (handle_query, process_serial_event): Adjust.
428
0eb0a407
SM
4292017-09-15 Simon Marchi <simon.marchi@ericsson.com>
430
431 * linux-low.c (linux_set_resume_request): Remove unused
432 variables.
433
785922a5
SM
4342017-09-15 Simon Marchi <simon.marchi@ericsson.com>
435
436 * server.c (first_thread_of): Remove.
437 (process_serial_event): Replace usage of first_thread_of with
438 find_any_thread_of_pid.
439 * tracepoint.c (same_process_p): Remove.
440 (gdb_agent_about_to_close): Replace usage of same_process_p with
441 find_any_thread_of_pid.
442 * linux-x86-low.c (same_process_callback): Remove.
443 (x86_arch_setup_process_callback): Replace usage of
444 same_process_callback with find_any_thread_of_pid.
445 * thread-db.c (any_thread_of): Remove.
446 (switch_to_process): Replace usage of any_thread_of with
447 find_any_thread_of_pid.
448 * inferiors.c (thread_pid_matches_callback): Remove.
449 (find_thread_process): Adjust to use find_any_thread_of_pid.
450
a059f00c
SDJ
4512017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
452
453 * regcache.c (get_thread_regcache): Guard calls to "memset"
454 with "!VEC_empty".
455
cc397f3a
SDJ
4562017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
457
458 * linux-low.c (handle_extended_wait): Use
459 "allocate_target_description" instead of "XNEW".
460 * linux-x86-low.c (initialize_low_arch): Likewise.
461
22916b07
YQ
4622017-09-05 Yao Qi <yao.qi@linaro.org>
463
464 * configure.srv (srv_i386_regobj): Remove.
465 (srv_amd64_regobj): Remove.
466 (srv_regobj): Set it to "" for x86 non-linux targets.
467 * linux-x86-tdesc.c (i386_linux_read_description):
468 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
469 (init_registers_i386): Remove the declaration.
470 (tdesc_i386): Remove the declaration.
471 (lynx_i386_arch_setup): Call i386_create_target_description.
472 * nto-x86-low.c: Likewise.
473 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
474 [!__x86_64__]: include arch/i386.h.
475 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
476
38602d55
YQ
4772017-09-05 Yao Qi <yao.qi@linaro.org>
478
479 * configure.srv (srv_amd64_linux_xmlfiles): Remove
480 i386/amd64-XXX-linux from it.
481
44b886ff
YQ
4822017-09-05 Yao Qi <yao.qi@linaro.org>
483
484 * configure.srv: Empty srv_amd64_linux_regobj if $development is
485 false.
486 (ipa_amd64_linux_regobj): Remove.
487 (ipa_x32_linux_regobj): Remove.
488
b4570e4b
YQ
4892017-09-05 Yao Qi <yao.qi@linaro.org>
490
491 * Makefile.in (arch-amd64.o): New rule.
492 * configure.srv: Append arch-amd64.o.
493 * linux-amd64-ipa.c: Include common/x86-xstate.h.
494 (get_ipa_tdesc): Call amd64_linux_read_description.
495 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
496 and init_registers_amd64_XXX.
497 * linux-x86-low.c (x86_linux_read_description): Call
498 amd64_linux_read_description.
499 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
500 (initialize_low_arch): Don't call init_registers_x32_XXX and
501 init_registers_amd64_XXX.
502 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
503 and tdesc_amd64_XXX.
504 [__x86_64__] (amd64_tdesc_test): New function.
505 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
506 and init_registers_amd64_XXX.
507 * linux-x86-tdesc.c: Include arch/amd64.h.
508 (xcr0_to_tdesc_idx): New function.
509 (i386_linux_read_description): New function.
510 (amd64_get_ipa_tdesc_idx): New function.
511 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
512 (amd64_get_ipa_tdesc): Declare.
513
d1f28ea2
YQ
5142017-09-05 Yao Qi <yao.qi@linaro.org>
515
516 * configure.srv (srv_i386_linux_xmlfiles): Remove
517 i386/i386-XXX-linux.xml from it.
518
25a93583
YQ
5192017-09-05 Yao Qi <yao.qi@linaro.org>
520
521 * configure.srv: Set srv_i386_linux_regobj empty if $development
522 is false.
523 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
524 initialize_low_tdesc.
525 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
526 with #if initialize_low_tdesc.
527 * linux-x86-tdesc-selftest.c: New file.
528 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
529
5f035c07
YQ
5302017-09-05 Yao Qi <yao.qi@linaro.org>
531
532 * Makefile.in (arch-i386.o): New rule.
533 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
534 (x86_64-*-linux*): Likewise.
535 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
536 include arch/i386.h.
537 (i386_linux_read_description): Remove code and call
538 i386_create_target_description.
539 * tdesc.c (allocate_target_description): New function.
540 * tdesc.h (set_tdesc_architecture): Remove declaration.
541 (set_tdesc_osabi): Likewise.
542
0abe8a89
YQ
5432017-09-05 Yao Qi <yao.qi@linaro.org>
544
545 * linux-x86-tdesc.c: Don't include <inttypes.h>.
546 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
547 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
548 .xmltarget.
549 * server.c (get_features_xml): Call tdesc_get_features_xml.
550 * tdesc.c (set_tdesc_architecture): New function.
551 (set_tdesc_osabi): New function.
552 (tdesc_get_features_xml): New function.
553 (tdesc_create_feature): Add an argument.
554 * tdesc.h (struct target_desc) <features>: New field.
555 <arch, osabi>: New field.
556 (~target_desc): xfree features, arch, and osabi.
557 (target_desc::oerator==): Don't compare .xmltarget.
558 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
559 (set_tdesc_osabi): Likewise.
560 (tdesc_get_features_xml): Likewise.
561
0a188386
YQ
5622017-09-05 Yao Qi <yao.qi@linaro.org>
563
564 * linux-x86-tdesc.c: Include selftest.h.
565 (i386_tdesc_test): New function.
566 (initialize_low_tdesc): Call selftests::register_test.
567 * tdesc.h: Include regdef.h.
568 (target_desc): Override operator == and !=.
569
f49ff000
YQ
5702017-09-05 Yao Qi <yao.qi@linaro.org>
571
572 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
573 (ipa_obj): Likewise.
574 * linux-i386-ipa.c: Include common/x86-xstate.h
575 (get_ipa_tdesc): Call i386_linux_read_description.
576 (initialize_low_tracepoint): Don't call init_registers_XXX
577 functions, call initialize_low_tdesc instead.
578 * linux-x86-low.c (x86_linux_read_description): Call
579 i386_linux_read_description.
580 (initialize_low_arch): Don't call init_registers_i386_XXX
581 functions, call initialize_low_tdesc.
582 * linux-x86-tdesc.c: New file.
583 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
584 (i386_get_ipa_tdesc_idx): Declare.
585 (i386_get_ipa_tdesc): Declare.
586 (initialize_low_tdesc): Declare.
587
2b68ef2f
YQ
5882017-09-05 Yao Qi <yao.qi@linaro.org>
589
590 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
591 instead of 0.
592
f7000548
YQ
5932017-09-05 Yao Qi <yao.qi@linaro.org>
594
595 * Makefile.in (IPA_OBJS): Add vec-ipa.o
596 * regcache.c (get_thread_regcache): Use VEC_length.
597 (init_register_cache): Likewise.
598 (regcache_cpy): Likewise.
599 (registers_to_string): Iterate reg_defs via VEC_iterate.
600 (find_regno): Likewise.
601 (find_register_by_number): Use VEC_index.
602 (register_size): Call find_register_by_number.
603 (register_data): Call find_register_by_number.
604 (supply_regblock): Use VEC_length.
605 (regcache_raw_read_unsigned): Likewise.
606 * tdesc.c (init_target_desc): Iterate reg_defs via
607 VEC_iterate.
608 (default_description): Update initializer.
609 (copy_target_description): Don't update field num_registers.
610 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
611 <num_registers>: Remove.
612
50a421ac
SM
6132017-09-04 Simon Marchi <simon.marchi@ericsson.com>
614
615 * Makefile.in (.SECONDARY): Define target.
616
23fdd69e
SM
6172017-09-03 Simon Marchi <simon.marchi@ericsson.com>
618
619 * linux-low.c (linux_wait_1): Adjust.
620 * server.c (queue_stop_reply_callback): Adjust.
621
0a2dde4a
SDJ
6222017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
623
624 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
625 QEnvironmentUnset and QEnvironmentReset packets.
626 (handle_query): Inform remote that QEnvironmentHexEncoded,
627 QEnvironmentUnset and QEnvironmentReset are supported.
628
6afd337d
SM
6292017-08-25 Simon Marchi <simon.marchi@ericsson.com>
630
631 * inferiors.h (inferior_target_data): Rename to ...
632 (thread_target_data): ... this.
633 (inferior_regcache_data): Rename to ...
634 (thread_regcache_data): ... this.
635 (set_inferior_regcache_data): Rename to ...
636 (set_thread_regcache_data): ... this.
637 * inferiors.c (inferior_target_data): Rename to ...
638 (thread_target_data): ... this.
639 (inferior_regcache_data): Rename to ...
640 (thread_regcache_data): ... this.
641 (set_inferior_regcache_data): Rename to ...
642 (set_thread_regcache_data): ... this.
643 (free_one_thread): Update.
644 * linux-low.h (get_thread_lwp): Update.
645 * regcache.c (get_thread_regcache): Update.
646 (regcache_invalidate_thread): Update.
647 (free_register_cache_thread): Update.
648 * win32-i386-low.c (update_debug_registers_callback): Update.
649 (win32_get_current_dr): Update.
650 * win32-low.c (thread_rec): Update.
651 (delete_thread_info): Update.
652 (continue_one_thread): Update.
653 (suspend_one_thread): Update.
654
a160cc46
SM
6552017-08-24 Simon Marchi <simon.marchi@ericsson.com>
656
657 * inferiors.c (set_inferior_target_data): Remove.
658 * inferiors.h (set_inferior_target_data): Remove.
659
6d580b63
YQ
6602017-08-18 Yao Qi <yao.qi@linaro.org>
661
662 * Makefile.in (OBS): Add selftest.o.
663 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
664 * configure, config.in: Re-generated.
665 * server.c: Include common/sefltest.h.
666 (captured_main): Handle option --selftest.
667
f5a29eb0
YQ
6682017-08-09 Yao Qi <yao.qi@linaro.org>
669
670 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
671 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
672 i386-avx-mpx.o and i386-mmx.o.
673 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
674 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
675 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
676 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
677 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
678 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
679 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
680 i386/amd64-avx-mpx.xml.
681
57757c2f
YQ
6822017-08-09 Yao Qi <yao.qi@linaro.org>
683
684 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
685 and x32-avx-avx512.o.
686 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
687 i386/x32-avx-avx512.xml.
688
229d26fc
SM
6892017-07-26 Simon Marchi <simon.marchi@ericsson.com>
690
691 * tracepoint.h (enum class fast_tpoint_collect_result): New
692 enumeration.
693 (fast_tracepoint_collecting): Change return type to
694 fast_tpoint_collect_result.
695 * tracepoint.c (fast_tracepoint_collecting): Likewise.
696 * linux-low.h: Include tracepoint.h.
697 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
698 fast_tpoint_collect_result.
699 * linux-low.c (handle_tracepoints): Adjust.
700 (linux_fast_tracepoint_collecting): Change return type to
701 fast_tpoint_collect_result.
702 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
703 linux_wait_1, stuck_in_jump_pad_callback,
704 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
705 proceed_one_lwp): Adjust to type change.
706
2e1e43e1
YQ
7072017-07-10 Yao Qi <yao.qi@linaro.org>
708
709 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
710
adc764e7
YQ
7112017-06-29 Yao Qi <yao.qi@linaro.org>
712
713 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
714 Remove.
715 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
716
a206891a
SM
7172017-06-20 Simon Marchi <simon.marchi@ericsson.com>
718
719 * Makefile.in (IPA_OBJS): Sort and format one item per line.
720
9a6c7d9c
SDJ
7212017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
722
723 * linux-low.c (linux_create_inferior): Adjust code to access the
724 environment information via 'gdb_environ' class.
725 * lynx-low.c (lynx_create_inferior): Likewise.
726 * server.c (our_environ): Make it an instance of 'gdb_environ'.
727 (get_environ): Return a pointer to 'our_environ'.
728 (captured_main): Initialize 'our_environ'.
729 * server.h (get_environ): Adjust prototype.
730 * spu-low.c (spu_create_inferior): Adjust code to access the
731 environment information via 'gdb_environ' class.
732
ae3e2ccf
SM
7332017-06-17 Simon Marchi <simon.marchi@ericsson.com>
734
735 * linux-low.c (linux_read_memory, linux_write_memory): Remove
736 usage of "register" keyword.
737
3e019bdc
SM
7382017-06-17 Simon Marchi <simon.marchi@ericsson.com>
739
740 * configure: Re-generate.
741
8465943a
SM
7422017-06-17 Simon Marchi <simon.marchi@ericsson.com>
743
744 * configure: Re-generate.
745
cf0dd6f0
SM
7462017-06-17 Simon Marchi <simon.marchi@ericsson.com>
747
748 * Makefile.in (COMPILE.pre): Add "-x c++".
749
9845682b
SDJ
7502017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
751
752 * fork-child.c: Conditionally include <signal.h>.
753
aefd8b33
SDJ
7542017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
755
756 * server.c (handle_general_set): Handle new packet
757 "QStartupWithShell".
758 (handle_query): Add "QStartupWithShell" to the list of supported
759 packets.
760 (gdbserver_usage): Add help text explaining the
761 new "--startup-with-shell" and "--no-startup-with-shell" CLI
762 options.
763 (captured_main): Recognize and act upon the presence of the new
764 CLI options.
765
2090129c
SDJ
7662017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
767 Pedro Alves <palves@redhat.com>
768
769 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
770 * configure: Regenerate.
771 * configure.srv (srv_linux_obj): Add "fork-child.o" and
772 "fork-inferior.o".
773 (i[34567]86-*-lynxos*): Likewise.
774 (spu*-*-*): Likewise.
775 * fork-child.c: New file.
776 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
777 and "environ.h".
778 (linux_ptrace_fun): New function.
779 (linux_create_inferior): Adjust function prototype to reflect
780 change on "target.h". Adjust function code to use
781 "fork_inferior".
782 (linux_request_interrupt): Delete "signal_pid".
783 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
784 (lynx_ptrace_fun): New function.
785 (lynx_create_inferior): Adjust function prototype to reflect
786 change on "target.h". Adjust function code to use
787 "fork_inferior".
788 * nto-low.c (nto_create_inferior): Adjust function prototype and
789 code to reflect change on "target.h". Update comments.
790 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
791 "common-terminal.h" and "environ.h".
792 (terminal_fd): Moved to fork-child.c.
793 (old_foreground_pgrp): Likewise.
794 (restore_old_foreground_pgrp): Likewise.
795 (last_status): Make it global.
796 (last_ptid): Likewise.
797 (our_environ): New variable.
798 (startup_with_shell): Likewise.
799 (program_name): Likewise.
800 (program_argv): Rename to...
801 (program_args): ...this.
802 (wrapper_argv): New variable.
803 (start_inferior): Delete function.
804 (get_exec_wrapper): New function.
805 (get_exec_file): Likewise.
806 (get_environ): Likewise.
807 (prefork_hook): Likewise.
808 (post_fork_inferior): Likewise.
809 (postfork_hook): Likewise.
810 (postfork_child_hook): Likewise.
811 (handle_v_run): Update code to deal with arguments coming from the
812 remote host. Update calls from "start_inferior" to
813 "create_inferior".
814 (captured_main): Likewise. Initialize environment variable. Call
815 "have_job_control".
816 * server.h (post_fork_inferior): New prototype.
817 (get_environ): Likewise.
818 (last_status): Declare.
819 (last_ptid): Likewise.
820 (signal_pid): Likewise.
821 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
822 (spu_ptrace_fun): New function.
823 (spu_create_inferior): Adjust function prototype to reflect change
824 on "target.h". Adjust function code to use "fork_inferior".
825 * target.c (target_terminal_init): New function.
826 (target_terminal_inferior): Likewise.
827 (target_terminal_ours): Likewise.
828 * target.h: Include <vector>.
829 (struct target_ops) <create_inferior>: Update prototype.
830 (create_inferior): Update macro.
831 * utils.c (gdb_flush_out_err): New function.
832 * win32-low.c (win32_create_inferior): Adjust function prototype
833 and code to reflect change on "target.h".
834
043a4934
SDJ
8352017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
836
837 * inferiors.c (switch_to_thread): New function.
838
15652511
SDJ
8392017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
840
841 * Makefile.in (SFILE): Add "common/job-control.c".
842 (OBS): Add "job-control.o".
843
21ea5acd
SDJ
8442017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
845
846 * Makefile: Remove "@host_makefile_frag@".
847
e13cb306
PA
8482017-05-05 Pedro Alves <palves@redhat.com>
849
850 * configure: Regenerate.
851
c94fee56
SDJ
8522017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
853
854 * configure: Regenerate.
855
a0ff9e1a
SM
8562017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
857
858 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
859 software_single_step change of return type to
860 std::vector<CORE_ADDR>.
861 * linux-low.c (install_software_single_step_breakpoints):
862 Likewise.
863 * linux-low.h (install_software_single_step_breakpoints):
864 Likewise.
865
be628ab8
SDJ
8662017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
867
868 * remote-utils.c: Include "gdb_termios.h" instead of
869 "terminal.h".
870 * terminal.h: Delete file.
871
7c5ded6a
SDJ
8722017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
873
874 * server.c: Include <vector>.
875 <program_argv, wrapper_argv>: Convert to std::vector.
876 (start_inferior): Rewrite function to use C++.
877 (handle_v_run): Likewise. Update code that calculates the argv
878 based on the vRun packet; use C++.
879 (captured_main): Likewise.
880
436252de
SM
8812017-04-06 Simon Marchi <simon.marchi@ericsson.com>
882
883 * server.c (handle_v_cont): Initialize thread_resume::thread
884 with null_ptid.
885
9bf2a700
PA
8862017-04-05 Pedro Alves <palves@redhat.com>
887
888 * configure: Regenerate.
889
a121b7c1
PA
8902017-04-05 Pedro Alves <palves@redhat.com>
891
892 * gdbreplay.c (sync_error): Constify.
893 * linux-x86-low.c (push_opcode): Constify.
894
21c8a587
PA
8952017-04-05 Pedro Alves <palves@redhat.com>
896
897 * win32-low.c (get_child_debug_event)
898 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
899 Report TARGET_WAITKIND_SPURIOUS instead.
900
fb32b4f7
PA
9012017-04-05 Pedro Alves <palves@redhat.com>
902
903 * remote-utils.c (remote_prepare, remote_open): Constify.
904 * remote-utils.h (remote_prepare, remote_open): Constify.
905 * server.c (captured_main): Constify 'port' handling.
906
65dd1e59
SM
9072017-04-04 Simon Marchi <simon.marchi@ericsson.com>
908
909 * Makefile.in (clean): Clear .deps.
910
8fa5b777
SM
9112017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
912
913 * .gitignore: Remove generated files, replace with wildcard.
914 * (clean): Replace removal of generated files with wildcard.
915 (version.c): Replace with...
916 (version-generated.c): ...this.
917 (xml-builtin.c): Replace with...
918 (xml-builtin-generated.c): ...this.
919 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
920 (%.c: *regformats*): Replace with...
921 (%-generated.c: *regformats*): ...this.
922
a12e714b
MF
9232017-03-27 Max Filippov <jcmvbkbc@gmail.com>
924
925 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
926 (xtensa_fill_gregset): Call collect_register_by_name for
927 threadptr register.
928 (xtensa_store_gregset): Call supply_register_by_name for
929 threadptr register.
930
1a09b50a
MF
9312017-03-27 Max Filippov <jcmvbkbc@gmail.com>
932
933 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
934 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
935 (xtensa_store_gregset): Call supply_register for all registers in
936 a0_regnum..a0_regnum + C0_NREGS range.
937
1a01e7c6
SM
9382017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
939
940 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
941 (ax-ipa.o: ax.c): Remove.
942 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
943 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
944 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
945 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
946 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
947
36bc18a8
SM
9482017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
949
950 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
951 (print-utils-ipa.o: ../common/print-utils.c): Remove.
952 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
953 (errors-ipa.o: ../common/errors.c): Remove.
954 (format-ipa.o: ../common/format.c): Remove.
955 (common-utils-ipa.o: ../common/common-utils.c): Remove.
956
a8ebe3d5
SM
9572017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
958
959 * Makefile.in (%-ipa.o: %.c): New rule.
960 (tracepoint-ipa.o: tracepoint.c): Remove.
961 (utils-ipa.o: utils.c): Remove.
962 (remote-utils-ipa.o: remote-utils.c): Remove.
963 (regcache-ipa.o: regcache.c): Remove.
964 (i386-linux-ipa.o: i386-linux.c): Remove.
965 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
966 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
967 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
968 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
969 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
970 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
971 (amd64-linux-ipa.o: amd64-linux.c): Remove.
972 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
973 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
974 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
975 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
976 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
977 (aarch64-ipa.o: aarch64.c): Remove.
978 (s390-linux32-ipa.o: s390-linux32.c): Remove.
979 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
980 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
981 (s390-linux64-ipa.o: s390-linux64.c): Remove.
982 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
983 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
984 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
985 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
986 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
987 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
988 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
989 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
990 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
991 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
992 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
993 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
994 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
995 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
996 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
997 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
998 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
999 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1000 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1001 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1002 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1003 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1004 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1005 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1006 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1007 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1008 (tdesc-ipa.o: tdesc.c): Remove.
1009 (x32-linux-ipa.o: x32-linux.c): Remove.
1010 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1011 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1012
50cfacb7
SM
10132017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1014
1015 * Makefile.in (%.o: ../arch/%.c): New rule.
1016 (arm.o: ../arch/arm.c): Remove.
1017 (arm-linux.o: ../arch/arm-linux.c): Remove.
1018 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1019 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1020
c5a22423
SM
10212017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1022
1023 * Makefile.in (%.o: ../nat/%.c): New rule.
1024 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1025 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1026 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1027 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1028 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1029 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1030 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1031 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1032 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1033 (linux-personality.o: ../nat/linux-personality.c): Remove.
1034 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1035 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1036 (x86-linux.o: ../nat/x86-linux.c): Remove.
1037 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1038 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1039
6bda016b
SM
10402017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1041
1042 * Makefile.in (%.o: ../common/%.c): New rule.
1043 (signals.o: ../common/signals.c): Remove.
1044 (print-utils.o: ../common/print-utils.c): Remove.
1045 (rsp-low.o: ../common/rsp-low.c): Remove.
1046 (common-utils.o: ../common/common-utils.c): Remove.
1047 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1048 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1049 (vec.o: ../common/vec.c): Remove.
1050 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1051 (xml-utils.o: ../common/xml-utils.c): Remove.
1052 (ptid.o: ../common/ptid.c): Remove.
1053 (buffer.o: ../common/buffer.c): Remove.
1054 (format.o: ../common/format.c): Remove.
1055 (filestuff.o: ../common/filestuff.c): Remove.
1056 (agent.o: ../common/agent.c): Remove.
1057 (errors.o: ../common/errors.c): Remove.
1058 (environ.o: ../common/environ.c): Remove.
1059 (common-debug.o: ../common/common-debug.c): Remove.
1060 (cleanups.o: ../common/cleanups.c): Remove.
1061 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1062 (fileio.o: ../common/fileio.c): Remove.
1063 (common-regcache.o: ../common/common-regcache.c): Remove.
1064 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1065 (new-op.o: ../common/new-op.c): Remove.
1066 (btrace-common.o: ../common/btrace-common.c): Remove.
1067
21122961
SM
10682017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1069
1070 * Makefile.in (%.o: ../target/%.c): New rule.
1071 (waitstatus.o: ../target/waitstatus.c): Remove.
1072
c362e621
SM
10732017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1074
1075 * Makefile.in
1076 (%.c: ../regformats/%.dat,
1077 (%.c: ../regformats/arm/%.dat,
1078 (%.c: ../regformats/i386/%.dat,
1079 (%.c: ../regformats/rs6000/%.dat): New rules.
1080 (aarch64.c): Remove.
1081 (reg-arm.c): Remove.
1082 (arm-with-iwmmxt.c): Remove.
1083 (arm-with-vfpv2.c): Remove.
1084 (arm-with-vfpv3.c): Remove.
1085 (arm-with-neon.c): Remove.
1086 (reg-bfin.c): Remove.
1087 (reg-cris.c): Remove.
1088 (reg-crisv32.c): Remove.
1089 (i386.c): Remove.
1090 (i386-linux.c): Remove.
1091 (i386-avx.c): Remove.
1092 (i386-avx-linux.c): Remove.
1093 (i386-avx-avx512.c): Remove.
1094 (i386-avx-avx512-linux.c): Remove.
1095 (i386-mpx.c): Remove.
1096 (i386-mpx-linux.c): Remove.
1097 (i386-avx-mpx-avx512-pku.c): Remove.
1098 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1099 (i386-avx-mpx.c): Remove.
1100 (i386-avx-mpx-linux.c): Remove.
1101 (i386-mmx.c): Remove.
1102 (i386-mmx-linux.c): Remove.
1103 (reg-ia64.c): Remove.
1104 (reg-m32r.c): Remove.
1105 (reg-m68k.c): Remove.
1106 (reg-cf.c): Remove.
1107 (mips-linux.c): Remove.
1108 (mips-dsp-linux.c): Remove.
1109 (mips64-linux.c): Remove.
1110 (mips64-dsp-linux.c): Remove.
1111 (nios2-linux.c): Remove.
1112 (powerpc-32.c): Remove.
1113 (powerpc-32l.c): Remove.
1114 (powerpc-altivec32l.c): Remove.
1115 (powerpc-cell32l.c): Remove.
1116 (powerpc-vsx32l.c): Remove.
1117 (powerpc-isa205-32l.c): Remove.
1118 (powerpc-isa205-altivec32l.c): Remove.
1119 (powerpc-isa205-vsx32l.c): Remove.
1120 (powerpc-e500l.c): Remove.
1121 (powerpc-64l.c): Remove.
1122 (powerpc-altivec64l.c): Remove.
1123 (powerpc-cell64l.c): Remove.
1124 (powerpc-vsx64l.c): Remove.
1125 (powerpc-isa205-64l.c): Remove.
1126 (powerpc-isa205-altivec64l.c): Remove.
1127 (powerpc-isa205-vsx64l.c): Remove.
1128 (s390-linux32.c): Remove.
1129 (s390-linux32v1.c): Remove.
1130 (s390-linux32v2.c): Remove.
1131 (s390-linux64.c): Remove.
1132 (s390-linux64v1.c): Remove.
1133 (s390-linux64v2.c): Remove.
1134 (s390-te-linux64.c): Remove.
1135 (s390-vx-linux64.c): Remove.
1136 (s390-tevx-linux64.c): Remove.
1137 (s390x-linux64.c): Remove.
1138 (s390x-linux64v1.c): Remove.
1139 (s390x-linux64v2.c): Remove.
1140 (s390x-te-linux64.c): Remove.
1141 (s390x-vx-linux64.c): Remove.
1142 (s390x-tevx-linux64.c): Remove.
1143 (tic6x-c64xp-linux.c): Remove.
1144 (tic6x-c64x-linux.c): Remove.
1145 (tic6x-c62x-linux.c): Remove.
1146 (reg-sh.c): Remove.
1147 (reg-sparc64.c): Remove.
1148 (reg-spu.c): Remove.
1149 (amd64.c): Remove.
1150 (amd64-linux.c): Remove.
1151 (amd64-avx.c): Remove.
1152 (amd64-avx-linux.c): Remove.
1153 (amd64-avx-avx512.c): Remove.
1154 (amd64-avx-avx512-linux.c): Remove.
1155 (amd64-mpx.c): Remove.
1156 (amd64-mpx-linux.c): Remove.
1157 (amd64-avx-mpx-avx512-pku.c): Remove.
1158 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1159 (amd64-avx-mpx.c): Remove.
1160 (amd64-avx-mpx-linux.c): Remove.
1161 (x32.c): Remove.
1162 (x32-linux.c): Remove.
1163 (x32-avx.c): Remove.
1164 (x32-avx-linux.c): Remove.
1165 (x32-avx-avx512.c): Remove.
1166 (x32-avx-avx512-linux.c): Remove.
1167 (reg-xtensa.c): Remove.
1168 (reg-tilegx.c): Remove.
1169 (reg-tilegx32.c): Remove.
1170
1672e0d9
SDJ
11712017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1172
1173 * Makefile.in (SFILES): Add "common/environ.c".
1174 (OBJS): Add "common/environ.h".
1175
239b6d10
WT
11762017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1177
1178 * configure.ac: Check if the fs_base and gs_base members of
1179 `struct user_regs_struct' exist.
1180 * config.in: Regenerated.
1181 * configure: Likewise.
1182
694b382c
AT
11832017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1184
1185 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1186 target_read_memory.
1187 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1188 (get_next_pcs_syscall_next_pc): Likewise.
1189
7dc53023
LM
11902016-12-23 Luis Machado <lgustavo@codesourcery.com>
1191
1192 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1193 * nto-x86-low.c: Likewise.
1194
ad02e4fe
SM
11952016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1196
1197 * Makefile.in: Include disable-implicit-rules.mk.
1198
dcb07cfa
PA
11992016-11-23 Pedro Alves <palves@redhat.com>
1200
1201 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1202 (debug_vprintf): Use std::chrono::steady_clock instead of
1203 gettimeofday. Use '.' instead of ':'.
1204 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1205 (get_timestamp): Use std::chrono::steady_clock instead of
1206 gettimeofday.
1207
8629c02c
SM
12082016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1209
1210 * Makefile.in: Fix whitespace formatting.
1211
b593ecca
SM
12122016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1213
1214 * Makefile.in (SFILES, OBS): Flatten list and order
1215 alphabetically.
1216
9986ba08
PA
12172016-11-23 Pedro Alves <palves@redhat.com>
1218
1219 * event-loop.c (handle_file_event): Use warning.
1220 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1221 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1222 Use warning.
1223
4eefa7bc
PA
12242016-11-23 Pedro Alves <palves@redhat.com>
1225
1226 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1227 output.
1228 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1229 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1230 debug_printf and debug_flush for debug output.
1231 * server.c (handle_general_set): Likewise.
1232 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1233 output.
1234
5443506e
SM
12352016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1236
1237 * Makefile.in (.c.o): Replace rule with ...
1238 (%.o: %.c): ... this one.
1239
3b165252
SM
12402016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1241
1242 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1243 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1244 make.
1245 * configure.ac: Remove checks for the make program.
1246 * configure: Re-generate.
1247
0bcda685
PA
12482016-10-28 Pedro Alves <palves@redhat.com>
1249
1250 * Makefile.in (CXX_DIALECT): Get from configure.
1251 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1252 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1253 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1254 * config.in: Regenerate.
1255 * configure: Regenerate.
1256
c3805894
YQ
12572016-10-27 Yao Qi <yao.qi@linaro.org>
1258
1259 * linux-low.c (linux_supports_range_stepping): Return true if
1260 can_software_single_step return true.
1261
89342618
YQ
12622016-10-27 Yao Qi <yao.qi@linaro.org>
1263
1264 * inferiors.c (find_inferior_in_random): New function.
1265 * inferiors.h (find_inferior_in_random): Declare.
1266 * linux-low.c (linux_wait_for_event_filtered): Call
1267 find_inferior_in_random instead of find_inferior.
1268
e3652c84
YQ
12692016-10-27 Yao Qi <yao.qi@linaro.org>
1270
1271 * linux-low.c (linux_wait_1): If single-step breakpoints are
1272 inserted, remove them.
1273
5a04c4cf
PA
12742016-10-26 Pedro Alves <palves@redhat.com>
1275
1276 * linux-low.c (handle_extended_wait): Link parent/child fork
1277 threads.
1278 (linux_wait_1): Unlink them.
1279 (linux_set_resume_request): Ignore resume requests for
1280 already-resumed and unhandled fork child threads.
1281 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1282 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1283 New functions.
1284 (handle_v_requests) <vCont>: Don't call require_running.
1285 * server.h (in_queued_stop_replies): New declaration.
1286
cb93dc7f
YQ
12872016-10-24 Yao Qi <yao.qi@linaro.org>
1288
1289 PR server/20733
1290 * linux-aarch64-low.c (append_insns): Cast the return value to
1291 'uint32_t *'.
1292
a1078bea
YQ
12932016-10-10 Yao Qi <yao.qi@linaro.org>
1294
1295 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1296
1fb77080
SDJ
12972016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1298
1299 * target.c (target_supports_multi_process): New function, moved
1300 from...
1301 * target.h (target_supports_multi_process): ... here. Remove
1302 macro.
1303
39b5a3b9
TT
13042016-10-05 Tom Tromey <tom@tromey.com>
1305
1306 PR remote/20655:
1307 * tracepoint.c (handle_tracepoint_bkpts): Check
1308 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1309
c1d0b70a
YQ
13102016-10-05 Yao Qi <yao.qi@linaro.org>
1311
1312 * configure.srv: Update the path of arm-*.xml files.
1313
0a69eedb
YQ
13142016-10-05 Terry Guo <terry.guo@arm.com>
1315 Yao Qi <yao.qi@linaro.org>
1316
1317 * Makefile.in: Adjust the path of rules.
1318 * configure.srv: Update the path of xml files.
1319 * regformats/arm-with-iwmmxt.dat: Regenerated.
1320 * regformats/arm-with-neon.dat: Likewise.
1321 * regformats/arm-with-vfpv2.dat: Likewise.
1322 * regformats/arm-with-vfpv3.dat Likewise.
1323
17e16485
YQ
13242016-09-30 Yao Qi <yao.qi@linaro.org>
1325
1326 PR gdbserver/20627
1327 * target.c (target_stop_and_wait): Don't call
1328 target_continue_no_signal, use resume_stop instead.
1329
edeeb602
YQ
13302016-09-26 Yao Qi <yao.qi@linaro.org>
1331
1332 * linux-low.c (linux_wait_1): Call debug_exit.
1333
503b1c39
PA
13342016-09-23 Pedro Alves <palves@redhat.com>
1335
1336 * Makefile.in (SFILES): Add common/new-op.c.
1337 (OBS): Add common/new-op.o.
1338 (new-op.o): New rule.
1339
74172ecf
SM
13402016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1341
1342 * .gitinore: Ignore more files.
1343
fc6cda2e
YQ
13442016-09-21 Yao Qi <yao.qi@linaro.org>
1345
1346 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1347 23.
1348
bc1e6c81
SDJ
13492016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1350
1351 * server.c (start_inferior): Call target_mourn_inferior instead of
1352 mourn_inferior; pass ptid_t argument to it.
1353 (resume): Likewise.
1354 (handle_target_event): Likewise.
1355 * target.c (target_mourn_inferior): New function.
1356 * target.h (mourn_inferior): Delete macro.
1357
0e00e962
AA
13582016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1359
1360 * linux-low.c (lwp_is_stepping): New function.
1361
1d8cb77d
CL
13622016-09-06 Carl Love <cel@us.ibm.com>
1363
1364 * server.c (start_inferior): Fixed comment, requested comment change
1365 didn't get updated correctly. Removed reference to ptrace () call as
1366 it is only true on Linux systems.
1367
7313bced
CL
13682016-09-06 Carl Love <cel@us.ibm.com>
1369
1370 * server.c (start_inferior): Do not call
1371 function target_post_create_inferior () if the
1372 inferior process has already exited.
1373
cf6de44d
PA
13742016-09-05 Pedro Alves <palves@redhat.com>
1375
1376 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1377 (COMPILE.pre, CC_LD): Use CXX directly.
1378 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1379 * acinclude.m4: Don't include build-with-cxx.m4.
1380 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1381 * configure: Regenerate.
1382
c1da6748
AT
13832016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1384
1385 PR gdb/19495
1386 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1387 call writing data to own_buf.
1388
f2b9e3df
SDJ
13892016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1390
1391 * target.c (mywait): Call target_wait instead of
1392 the_target->wait.
1393 (target_wait): New function.
1394
049a8570
SDJ
13952016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1396
1397 * server.c (start_inferior): New variable 'ptid'. Replace calls
1398 to the_target->resume by target_continue{,_no_signal}, depending
1399 on the case.
1400 * target.c (target_stop_and_wait): Call target_continue_no_signal
1401 instead of the_target->resume.
1402 (target_continue): New function.
1403
3aa5cfa0
AT
14042016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1405
1406 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1407
754653a7
AZ
14082016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1409
1410 PR server/20491
1411 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1412 ps_prochandle.
1413 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1414 * linux-arm-low.c (ps_get_thread_area): Likewise.
1415 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1416 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1417 * linux-mips-low.c (ps_get_thread_area): Likewise.
1418 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1419 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1420 * linux-x86-low.c (ps_get_thread_area): Likewise.
1421 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1422
ed036b40
PA
14232016-08-19 Pedro Alves <palves@redhat.com>
1424
1425 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1426
c8ef42ee
PA
14272016-08-19 Pedro Alves <palves@redhat.com>
1428
1429 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1430 comment. Use memcpy instead of casting through unsigned long.
1431
9c235a72
PA
14322016-08-19 Pedro Alves <palves@redhat.com>
1433
1434 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1435 allocating around 0x80000000.
1436
201506da
PA
14372016-08-19 Pedro Alves <palves@redhat.com>
1438
1439 PR gdb/20415
1440 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1441 (x32-avx512-linux-ipa.o): New rules.
1442 * configure.ac (x86_64-*-linux*): New x32 check.
1443 * configure.srv (ipa_x32_linux_regobj): New.
1444 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1445 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1446 descriptions.
1447 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1448 descriptions.
1449 * configure: Regenerate.
1450
f348d89a
PA
14512016-08-09 Pedro Alves <palves@redhat.com>
1452
1453 PR gdb/18653
1454 * Makefile.in (OBS): Add signals-state-save-restore.o.
1455 (signals-state-save-restore.o): New rule.
1456 * config.in: Regenerate.
1457 * configure: Regenerate.
1458 * linux-low.c: Include "signals-state-save-restore.h".
1459 (linux_create_inferior): Call
1460 restore_original_signals_state.
1461 * server.c: Include "dispositions-save-restore.h".
1462 (captured_main): Call save_original_signals_state.
1463
1baf5149
PA
14642016-08-05 Pedro Alves <palves@redhat.com>
1465
1466 * configure: Regenerate.
1467
fcd4a73d
YQ
14682016-08-04 Yao Qi <yao.qi@linaro.org>
1469
1470 * linux-low.c (regsets_fetch_inferior_registers): Check
1471 errno is ESRCH or not.
1472
979659d0
YQ
14732016-08-02 Yao Qi <yao.qi@linaro.org>
1474
1475 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1476 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1477 (thread_db_load_search): Update.
1478 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1479 td_ta_set_event and td_ta_event_getmsg.
1480
6598661d
PA
14812016-07-26 Pedro Alves <palves@redhat.com>
1482
1483 PR server/20414
1484 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1485 of unsigned long for 64-bit registers and use uint32_t instead of
1486 unsigned int for 32-bit registers.
1487
9cf12d57
PA
14882016-07-26 Pedro Alves <palves@redhat.com>
1489
1490 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1491 to 'ptrace'.
1492
305450ed
TT
14932016-07-21 Tom Tromey <tom@tromey.com>
1494
1495 * configure: Rebuild.
1496
2583da7c
YQ
14972016-07-21 Yao Qi <yao.qi@linaro.org>
1498
1499 * mem-break.c (find_gdb_breakpoint): Cast bp to
1500 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1501
21536b36
YQ
15022016-07-21 Yao Qi <yao.qi@linaro.org>
1503
1504 * server.c (handle_v_requests): Support s and S actions
1505 if target_supports_software_single_step return true.
1506
8901d193
YQ
15072016-07-21 Yao Qi <yao.qi@linaro.org>
1508
1509 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1510 is resume_step, call maybe_hw_step.
1511 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1512 and unstop them.
1513 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1514 breakpoints or not.
1515 (proceed_one_lwp): If resume request is resume_step, install
1516 reinsert breakpoints and call maybe_hw_step.
1517
0e9a339e
YQ
15182016-07-21 Yao Qi <yao.qi@linaro.org>
1519
1520 * linux-low.c (proceed_one_lwp): Declare.
1521 (linux_resume_one_thread): Remove local variable 'step'.
1522 Lift code enqueue signal. Call proceed_one_lwp instead of
1523 linux_resume_one_lwp.
1524
4281b351
YQ
15252016-07-21 Yao Qi <yao.qi@linaro.org>
1526
1527 * linux-low.c (linux_resume_one_thread): Call
1528 enqueue_pending_signal.
1529
984a2c04
YQ
15302016-07-21 Yao Qi <yao.qi@linaro.org>
1531
1532 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1533 * inferiors.c (do_restore_current_thread_cleanup): New function.
1534 (make_cleanup_restore_current_thread): Likewise.
1535 * linux-low.c (install_software_single_step_breakpoints): Call
1536 make_cleanup_restore_current_thread. Switch current_thread to
1537 thread.
1538
bec903c9
YQ
15392016-07-21 Yao Qi <yao.qi@linaro.org>
1540
1541 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1542 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1543 (clone_one_breakpoint): Likewise.
1544 (delete_reinsert_breakpoints): Change parameter to thread.
1545 Callers updated.
1546 (has_reinsert_breakpoints): Likewise.
1547 (uninsert_reinsert_breakpoints): Likewise.
1548 (reinsert_reinsert_breakpoints): Likewise.
1549 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1550 (delete_reinsert_breakpoints): Likewise.
1551 (reinsert_reinsert_breakpoints): Likewise.
1552 (uninsert_reinsert_breakpoints): Likewise.
1553 (has_reinsert_breakpoints): Likewise.
1554
63c40ec7
YQ
15552016-07-21 Yao Qi <yao.qi@linaro.org>
1556
1557 * inferiors.c (get_thread_process): Make parameter const.
1558 * inferiors.h (get_thread_process): Update declaration.
1559 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1560 Add new parameters child_thread and parent_thread. Callers
1561 updated.
1562 * mem-break.h (clone_all_breakpoints): Update declaration.
1563
9aa76cd0
YQ
15642016-07-21 Yao Qi <yao.qi@linaro.org>
1565
1566 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1567 <command_list, handler>: Remove.
1568 (struct gdb_breakpoint): New.
1569 (struct other_breakpoint): New.
1570 (struct reinsert_breakpoint): New.
1571 (is_gdb_breakpoint): New function.
1572 (any_persistent_commands): Update command_list if
1573 is_gdb_breakpoint returns true.
1574 (set_breakpoint): Create breakpoints according to their types.
1575 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1576 (set_gdb_breakpoint_1): Likewise.
1577 (set_gdb_breakpoint): Likewise.
1578 (clear_breakpoint_conditions): Change parameter type to
1579 'struct gdb_breakpoint *'.
1580 (clear_breakpoint_commands): Likewise.
1581 (clear_breakpoint_conditions_and_commands): Likewise.
1582 (add_condition_to_breakpoint): Likewise.
1583 (add_breakpoint_condition): Likewise.
1584 (add_commands_to_breakpoint): Likewise.
1585 (check_breakpoints): Check other_breakpoint.
1586 (clone_one_breakpoint): Clone breakpopint according to its type.
1587 * mem-break.h (struct gdb_breakpoint): Declare.
1588 (set_gdb_breakpoint): Update declaration.
1589 (clear_breakpoint_conditions_and_commands): Likewise.
1590 (add_breakpoint_condition): Likewise.
1591 (add_breakpoint_commands): Likewise.
1592 * server.c (process_point_options): Change parameter type to
1593 'struct gdb_breakpoint *'.
1594
811f8301
YQ
15952016-07-21 Yao Qi <yao.qi@linaro.org>
1596
1597 * mem-break.c (set_breakpoint_at): Rename it to ...
1598 (set_breakpoint_type_at): ... it.
1599 (set_breakpoint_at): Call set_breakpoint_type_at.
1600 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1601 * mem-break.h (set_breakpoint_at): Update comments.
1602
b1c51e36
CLT
16032016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1604
1605 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1606 to buf parameter.
1607 (nios2_store_gregset): Likewise.
1608
ced2dffb
PA
16092016-07-01 Pedro Alves <palves@redhat.com>
1610 Antoine Tremblay <antoine.tremblay@ericsson.com>
1611
1612 * linux-low.c: Change interface to take the target lwp_info
1613 pointer directly and return void. Handle detaching from a zombie
1614 thread.
1615 (linux_detach_lwp_callback): New function.
1616 (linux_detach): Detach from the leader thread after detaching from
1617 the clone threads.
1618
2ac09a5b
YQ
16192016-06-28 Yao Qi <yao.qi@linaro.org>
1620
1621 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1622 for variable new_offset.
1623 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1624 (aarch64_ftrace_insn_reloc_cb): Likewise.
1625 (aarch64_ftrace_insn_reloc_tb): Likewise.
1626 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1627 PRIx64 instead of PRIx32.
1628
79e7fd4f
YQ
16292016-06-28 Yao Qi <yao.qi@linaro.org>
1630
1631 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1632 (the_low_target): Install arm_get_syscall_trapinfo.
1633
061fc021
YQ
16342016-06-28 Yao Qi <yao.qi@linaro.org>
1635
1636 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1637 function.
1638 (the_low_target): Install aarch64_get_syscall_trapinfo.
1639
4cc32bec
YQ
16402016-06-28 Yao Qi <yao.qi@linaro.org>
1641
1642 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1643 Callers updated.
1644 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1645 Remove parameter sysno.
1646 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1647 sysret.
1648
782c1122
AA
16492016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1650
1651 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1652 (s390_emit_ne_goto): Likewise.
1653 (s390_emit_lt_goto): Likewise.
1654 (s390_emit_le_goto): Likewise.
1655 (s390_emit_gt_goto): Likewise.
1656 (s390_emit_ge_goto): Likewise.
1657 (s390x_emit_eq_goto): Likewise.
1658 (s390x_emit_ne_goto): Likewise.
1659 (s390x_emit_lt_goto): Likewise.
1660 (s390x_emit_le_goto): Likewise.
1661 (s390x_emit_gt_goto): Likewise.
1662 (s390x_emit_ge_goto): Likewise.
1663 (s390_emit_ops_impl): Mark variable static.
1664 (s390x_emit_ops): Likewise.
1665
2e7b624b
YQ
16662016-06-17 Yao Qi <yao.qi@linaro.org>
1667
1668 * linux-low.c (handle_extended_wait): Call
1669 uninsert_reinsert_breakpoints for the parent process. Remove
1670 reinsert breakpoints from the child process. Reinsert them to
1671 the parent process when vfork is done.
1672 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1673 (reinsert_reinsert_breakpoints): New function.
1674 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1675 (reinsert_reinsert_breakpoints): Declare.
1676
8a81c5d7
YQ
16772016-06-17 Yao Qi <yao.qi@linaro.org>
1678
1679 * linux-low.c (handle_extended_wait): If the parent is doing
1680 step-over, remove the reinsert breakpoints from the forked child.
1681
f50bf8e5
YQ
16822016-06-17 Yao Qi <yao.qi@linaro.org>
1683
1684 * linux-low.c (unsuspend_all_lwps): Declare.
1685 (linux_low_filter_event): If thread exited, call finish_step_over.
1686 If step-over is finished, unsuspend other threads.
1687
8376a3cb
YQ
16882016-06-17 Yao Qi <yao.qi@linaro.org>
1689
1690 * linux-low.c (linux_resume_one_lwp_throw): Assert
1691 has_reinsert_breakpoints returns false.
1692 * mem-break.c (delete_disabled_breakpoints): Assert
1693 bp type isn't reinsert_breakpoint.
1694
f79b145d
YQ
16952016-06-17 Yao Qi <yao.qi@linaro.org>
1696
1697 * linux-low.c (maybe_hw_step): New function.
1698 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1699 (finish_step_over): Switch current_thread to lwp temporarily,
1700 and assert has_reinsert_breakpoints returns true.
1701 (proceed_one_lwp): Call maybe_hw_step.
1702 * mem-break.c (has_reinsert_breakpoints): New function.
1703 * mem-break.h (has_reinsert_breakpoints): Declare.
1704
0ae534d2
JT
17052016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1706
1707 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1708
fcdad592
YQ
17092016-05-17 Yao Qi <yao.qi@linaro.org>
1710
1711 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1712 instead of find_inferior.
1713
9e784964
YQ
17142016-05-05 Yao Qi <yao.qi@linaro.org>
1715
1716 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1717 Initialize res to zero.
1718
cf2ebb6e
YQ
17192016-05-05 Yao Qi <yao.qi@linaro.org>
1720
1721 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1722 to uint32_t.
1723
c1aebf87
UW
17242016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1725
1726 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1727 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1728 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1729
35fd2deb 17302016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 1731 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
1732
1733 * tracepoint.c (write_inferior_int8): New function.
1734 (cmd_qtenable_disable): Write enable flag using
1735 write_inferior_int8.
1736
484b3c32
YQ
17372016-04-25 Yao Qi <yao.qi@linaro.org>
1738
1739 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1740 (need_step_over_p): Return zero if the LWP has pending signals
1741 can be delivered on software single step target.
1742
85ba7d86
YQ
17432016-04-25 Yao Qi <yao.qi@linaro.org>
1744
1745 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1746 return instead of error.
1747
3539aa13
YQ
17482016-04-22 Yao Qi <yao.qi@linaro.org>
1749
1750 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1751 to 23.
1752
5b061e98
YQ
17532016-04-22 Yao Qi <yao.qi@linaro.org>
1754
1755 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1756 signal when stepping over breakpoint with software single
1757 step.
1758
3451269c
PA
17592016-04-21 Pedro Alves <palves@redhat.com>
1760
1761 * linux-s390-low.c (s390_collect_ptrace_register)
1762 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1763 add casts.
1764 (s390_check_regset): Use void * instead of gdb_byte *.
1765
a2358508
PA
17662016-04-20 Pedro Alves <palves@redhat.com>
1767
1768 * configure: Renegerate.
1769
6885166d
YQ
17702016-04-20 Yao Qi <yao.qi@linaro.org>
1771
1772 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1773 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1774 number 16.
1775 (arm_store_gregset): Likewise.
1776
2b863f51
WT
17772016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1778
1779 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1780 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1781 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1782 (amd64-avx-mpx-linux.c): New rules.
1783 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1784 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1785 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1786 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1787 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1788 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1789 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1790 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1791 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1792 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1793 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1794 * linux-x86-low.c (x86_linux_read_description): Add case for
1795 X86_XSTATE_AVX_MPX_MASK.
1796 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1797 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1798 init_registers_i386_avx_mpx_linux.
1799 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1800 (initialize_low_tracepoint): Call
1801 init_registers_i386_avx_mpx_linux.
1802 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1803 (initialize_low_tracepoint): Call
1804 init_registers_amd64_avx_mpx_linux.
1805 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1806 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1807 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1808 declarations.
1809
9b30624b
PA
18102016-04-18 Pedro Alves <palves@redhat.com>
1811
1812 * configure: Regenerate.
1813
45e3745e
AT
18142016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1815
1816 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1817 (aarch64_emit_sub): Likewise.
1818
2afc13ff
PA
18192016-04-12 Pedro Alves <palves@redhat.com>
1820
1821 * utils.c (prepare_to_throw_exception): Delete.
1822
6e774b13
SM
18232016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1824
1825 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1826
4dca19f8
MK
18272016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1828
1829 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1830
d0a9981f
MK
18312016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1832
1833 * linux-aarch64-ipa.c: Add <elf.h> include.
1834 * linux-ppc-ipa.c: Add <elf.h> include.
1835 * linux-s390-ipa.c: Add <elf.h> include.
1836
252db07e
MK
18372016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1838
1839 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1840 (get_raw_reg_ptr): Likewise.
1841 (get_trace_state_variable_value_ptr): Likewise.
1842 (set_trace_state_variable_value_ptr): Likewise.
1843 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1844 char *.
1845
14e2b6d9
MK
18462016-03-31 Wei-cheng Wang <cole945@gmail.com>
1847 Marcin Kościelnicki <koriakin@0x04.net>
1848
1849 PR/17221
1850 * linux-ppc-low.c (emit_insns): New function.
1851 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1852 (ppc_emit_prologue): New function.
1853 (ppc_emit_epilogue): New function.
1854 (ppc_emit_add): New function.
1855 (ppc_emit_sub): New function.
1856 (ppc_emit_mul): New function.
1857 (ppc_emit_lsh): New function.
1858 (ppc_emit_rsh_signed): New function.
1859 (ppc_emit_rsh_unsigned): New function.
1860 (ppc_emit_ext): New function.
1861 (ppc_emit_zero_ext): New function.
1862 (ppc_emit_log_not): New function.
1863 (ppc_emit_bit_and): New function.
1864 (ppc_emit_bit_or): New function.
1865 (ppc_emit_bit_xor): New function.
1866 (ppc_emit_bit_not): New function.
1867 (ppc_emit_equal): New function.
1868 (ppc_emit_less_signed): New function.
1869 (ppc_emit_less_unsigned): New function.
1870 (ppc_emit_ref): New function.
1871 (ppc_emit_const): New function.
1872 (ppc_emit_reg): New function.
1873 (ppc_emit_pop): New function.
1874 (ppc_emit_stack_flush): New function.
1875 (ppc_emit_swap): New function.
1876 (ppc_emit_stack_adjust): New function.
1877 (ppc_emit_call): New function.
1878 (ppc_emit_int_call_1): New function.
1879 (ppc_emit_void_call_2): New function.
1880 (ppc_emit_if_goto): New function.
1881 (ppc_emit_goto): New function.
1882 (ppc_emit_eq_goto): New function.
1883 (ppc_emit_ne_goto): New function.
1884 (ppc_emit_lt_goto): New function.
1885 (ppc_emit_le_goto): New function.
1886 (ppc_emit_gt_goto): New function.
1887 (ppc_emit_ge_goto): New function.
1888 (ppc_write_goto_address): New function.
1889 (ppc_emit_ops_impl): New static variable.
1890 (ppc64v1_emit_prologue): New function.
1891 (ppc64v2_emit_prologue): New function.
1892 (ppc64_emit_epilogue): New function.
1893 (ppc64_emit_add): New function.
1894 (ppc64_emit_sub): New function.
1895 (ppc64_emit_mul): New function.
1896 (ppc64_emit_lsh): New function.
1897 (ppc64_emit_rsh_signed): New function.
1898 (ppc64_emit_rsh_unsigned): New function.
1899 (ppc64_emit_ext): New function.
1900 (ppc64_emit_zero_ext): New function.
1901 (ppc64_emit_log_not): New function.
1902 (ppc64_emit_bit_and): New function.
1903 (ppc64_emit_bit_or): New function.
1904 (ppc64_emit_bit_xor): New function.
1905 (ppc64_emit_bit_not): New function.
1906 (ppc64_emit_equal): New function.
1907 (ppc64_emit_less_signed): New function.
1908 (ppc64_emit_less_unsigned): New function.
1909 (ppc64_emit_ref): New function.
1910 (ppc64_emit_const): New function.
1911 (ppc64v1_emit_reg): New function.
1912 (ppc64v2_emit_reg): New function.
1913 (ppc64_emit_pop): New function.
1914 (ppc64_emit_stack_flush): New function.
1915 (ppc64_emit_swap): New function.
1916 (ppc64v1_emit_call): New function.
1917 (ppc64v2_emit_call): New function.
1918 (ppc64v1_emit_int_call_1): New function.
1919 (ppc64v2_emit_int_call_1): New function.
1920 (ppc64v1_emit_void_call_2): New function.
1921 (ppc64v2_emit_void_call_2): New function.
1922 (ppc64_emit_if_goto): New function.
1923 (ppc64_emit_eq_goto): New function.
1924 (ppc64_emit_ne_goto): New function.
1925 (ppc64_emit_lt_goto): New function.
1926 (ppc64_emit_le_goto): New function.
1927 (ppc64_emit_gt_goto): New function.
1928 (ppc64_emit_ge_goto): New function.
1929 (ppc64v1_emit_ops_impl): New static variable.
1930 (ppc64v2_emit_ops_impl): New static variable.
1931 (ppc_emit_ops): New function.
1932 (linux_low_target): Wire in ppc_emit_ops.
1933
a2174ba4
MK
19342016-03-31 Wei-cheng Wang <cole945@gmail.com>
1935 Marcin Kościelnicki <koriakin@0x04.net>
1936
1937 PR/17221
1938 * Makefile.in: Add powerpc-*-ipa.o
1939 * configure.srv: Add ipa_obj for powerpc*-linux.
1940 * linux-ppc-ipa.c: New file.
1941 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1942 includes.
1943 (PPC_FIELD): New macro.
1944 (PPC_SEXT): New macro.
1945 (PPC_OP6): New macro.
1946 (PPC_BO): New macro.
1947 (PPC_LI): New macro.
1948 (PPC_BD): New macro.
1949 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1950 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1951 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1952 (ppc_get_thread_area): New function.
1953 (is_elfv2_inferior): New function.
1954 (gen_ds_form): New function.
1955 (GEN_STD): New macro.
1956 (GEN_STDU): New macro.
1957 (GEN_LD): New macro.
1958 (GEN_LDU): New macro.
1959 (gen_d_form): New function.
1960 (GEN_ADDI): New macro.
1961 (GEN_ADDIS): New macro.
1962 (GEN_LI): New macro.
1963 (GEN_LIS): New macro.
1964 (GEN_ORI): New macro.
1965 (GEN_ORIS): New macro.
1966 (GEN_LWZ): New macro.
1967 (GEN_STW): New macro.
1968 (GEN_STWU): New macro.
1969 (gen_xfx_form): New function.
1970 (GEN_MFSPR): New macro.
1971 (GEN_MTSPR): New macro.
1972 (GEN_MFCR): New macro.
1973 (GEN_MTCR): New macro.
1974 (GEN_SYNC): New macro.
1975 (GEN_LWSYNC): New macro.
1976 (gen_x_form): New function.
1977 (GEN_OR): New macro.
1978 (GEN_MR): New macro.
1979 (GEN_LWARX): New macro.
1980 (GEN_STWCX): New macro.
1981 (GEN_CMPW): New macro.
1982 (gen_md_form): New function.
1983 (GEN_RLDICL): New macro.
1984 (GEN_RLDICR): New macro.
1985 (gen_i_form): New function.
1986 (GEN_B): New macro.
1987 (GEN_BL): New macro.
1988 (gen_b_form): New function.
1989 (GEN_BNE): New macro.
1990 (GEN_LOAD): New macro.
1991 (GEN_STORE): New macro.
1992 (gen_limm): New function.
1993 (gen_atomic_xchg): New function.
1994 (gen_call): New function.
1995 (ppc_relocate_instruction): New function.
1996 (ppc_install_fast_tracepoint_jump_pad): New function.
1997 (ppc_get_min_fast_tracepoint_insn_len): New function.
1998 (ppc_get_ipa_tdesc_idx): New function.
1999 (the_low_target): Wire in the new functions.
2000 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2001 tdescs.
2002 * linux-ppc-tdesc.h: New file.
2003
a13c4696
MK
20042016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2005
2006 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2007 (alloc_jump_pad_buffer): New function.
2008 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2009 (alloc_jump_pad_buffer): New function.
2010 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2011 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2012 (alloc_jump_pad_buffer): New function.
2013 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2014 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2015 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2016 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2017
1cda1512
MK
20182016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2019
2020 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2021 * linux-amd64-ipa.c: Likewise.
2022 * linux-i386-ipa.c: Likewise.
2023 * linux-s390-ipa.c: Likewise.
2024 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2025 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2026 set_trace_state_variable_value_ptr.
2027 (struct ipa_sym_addresses): Likewise.
2028 (symbol_list): Likewise.
2029 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2030 accessing gdb_collect directly.
2031 (gdb_collect_ptr_type): New typedef.
2032 (get_raw_reg_ptr_type): New typedef.
2033 (get_trace_state_variable_value_ptr_type): New typedef.
2034 (set_trace_state_variable_value_ptr_type): New typedef.
2035 (gdb_collect_ptr): New global.
2036 (get_raw_reg_ptr): New global.
2037 (get_trace_state_variable_value_ptr): New global.
2038 (set_trace_state_variable_value_ptr): New global.
2039 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2040 accessing get_raw_reg directly.
2041 (get_get_tsv_func_addr): Likewise for
2042 get_trace_state_variable_value_ptr.
2043 (get_set_tsv_func_addr): Likewise for
2044 set_trace_state_variable_value_ptr.
2045 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2046
72fb5488
SM
20472016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2048
2049 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2050
28170b88
MK
20512016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2052
2053 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2054 packets.
2055 (relocate_instruction): Remove own_buf.
2056 * server.c (own_buf): Make global.
2057 (handle_v_requests): Make global.
2058 * server.h (own_buf): New declaration.
2059 (handle_v_requests): New prototype.
2060
f39e8743
MK
20612016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2062
2063 PR 18377
2064 * linux-s390-low.c (add_insns): New function.
2065 (s390_emit_prologue): New function.
2066 (s390_emit_epilogue): New function.
2067 (s390_emit_add): New function.
2068 (s390_emit_sub): New function.
2069 (s390_emit_mul): New function.
2070 (s390_emit_lsh): New function.
2071 (s390_emit_rsh_signed): New function.
2072 (s390_emit_rsh_unsigned): New function.
2073 (s390_emit_ext): New function.
2074 (s390_emit_log_not): New function.
2075 (s390_emit_bit_and): New function.
2076 (s390_emit_bit_or): New function.
2077 (s390_emit_bit_xor): New function.
2078 (s390_emit_bit_not): New function.
2079 (s390_emit_equal): New function.
2080 (s390_emit_less_signed): New function.
2081 (s390_emit_less_unsigned): New function.
2082 (s390_emit_ref): New function.
2083 (s390_emit_if_goto): New function.
2084 (s390_emit_goto): New function.
2085 (s390_write_goto_address): New function.
2086 (s390_emit_litpool): New function.
2087 (s390_emit_const): New function.
2088 (s390_emit_call): New function.
2089 (s390_emit_reg): New function.
2090 (s390_emit_pop): New function.
2091 (s390_emit_stack_flush): New function.
2092 (s390_emit_zero_ext): New function.
2093 (s390_emit_swap): New function.
2094 (s390_emit_stack_adjust): New function.
2095 (s390_emit_set_r2): New function.
2096 (s390_emit_int_call_1): New function.
2097 (s390_emit_void_call_2): New function.
2098 (s390_emit_eq_goto): New function.
2099 (s390_emit_ne_goto): New function.
2100 (s390_emit_lt_goto): New function.
2101 (s390_emit_le_goto): New function.
2102 (s390_emit_gt_goto): New function.
2103 (s390_emit_ge_goto): New function.
2104 (s390x_emit_prologue): New function.
2105 (s390x_emit_epilogue): New function.
2106 (s390x_emit_add): New function.
2107 (s390x_emit_sub): New function.
2108 (s390x_emit_mul): New function.
2109 (s390x_emit_lsh): New function.
2110 (s390x_emit_rsh_signed): New function.
2111 (s390x_emit_rsh_unsigned): New function.
2112 (s390x_emit_ext): New function.
2113 (s390x_emit_log_not): New function.
2114 (s390x_emit_bit_and): New function.
2115 (s390x_emit_bit_or): New function.
2116 (s390x_emit_bit_xor): New function.
2117 (s390x_emit_bit_not): New function.
2118 (s390x_emit_equal): New function.
2119 (s390x_emit_less_signed): New function.
2120 (s390x_emit_less_unsigned): New function.
2121 (s390x_emit_ref): New function.
2122 (s390x_emit_if_goto): New function.
2123 (s390x_emit_const): New function.
2124 (s390x_emit_call): New function.
2125 (s390x_emit_reg): New function.
2126 (s390x_emit_pop): New function.
2127 (s390x_emit_stack_flush): New function.
2128 (s390x_emit_zero_ext): New function.
2129 (s390x_emit_swap): New function.
2130 (s390x_emit_stack_adjust): New function.
2131 (s390x_emit_int_call_1): New function.
2132 (s390x_emit_void_call_2): New function.
2133 (s390x_emit_eq_goto): New function.
2134 (s390x_emit_ne_goto): New function.
2135 (s390x_emit_lt_goto): New function.
2136 (s390x_emit_le_goto): New function.
2137 (s390x_emit_gt_goto): New function.
2138 (s390x_emit_ge_goto): New function.
2139 (s390_emit_ops): New function.
2140 (struct linux_target_ops): Fill in emit_ops hook.
2141
abd9baf9
MK
21422016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2143
2144 PR 18377
2145 * Makefile.in: Add s390 IPA files.
2146 * configure.srv: Build IPA for s390.
2147 * linux-s390-ipa.c: New file.
2148 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2149 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2150 (tdesc_s390_linux32): Likewise.
2151 (init_registers_s390_linux32v1): Likewise.
2152 (tdesc_s390_linux32v1): Likewise.
2153 (init_registers_s390_linux32v2): Likewise.
2154 (tdesc_s390_linux32v2): Likewise.
2155 (init_registers_s390_linux64): Likewise.
2156 (tdesc_s390_linux64): Likewise.
2157 (init_registers_s390_linux64v1): Likewise.
2158 (tdesc_s390_linux64v1): Likewise.
2159 (init_registers_s390_linux64v2): Likewise.
2160 (tdesc_s390_linux64v2): Likewise.
2161 (init_registers_s390_te_linux64): Likewise.
2162 (tdesc_s390_te_linux64): Likewise.
2163 (init_registers_s390_vx_linux64): Likewise.
2164 (tdesc_s390_vx_linux64): Likewise.
2165 (init_registers_s390_tevx_linux64): Likewise.
2166 (tdesc_s390_tevx_linux64): Likewise.
2167 (init_registers_s390x_linux64): Likewise.
2168 (tdesc_s390x_linux64): Likewise.
2169 (init_registers_s390x_linux64v1): Likewise.
2170 (tdesc_s390x_linux64v1): Likewise.
2171 (init_registers_s390x_linux64v2): Likewise.
2172 (tdesc_s390x_linux64v2): Likewise.
2173 (init_registers_s390x_te_linux64): Likewise.
2174 (tdesc_s390x_te_linux64): Likewise.
2175 (init_registers_s390x_vx_linux64): Likewise.
2176 (tdesc_s390x_vx_linux64): Likewise.
2177 (init_registers_s390x_tevx_linux64): Likewise.
2178 (tdesc_s390x_tevx_linux64): Likewise.
2179 (have_hwcap_s390_vx): New static variable.
2180 (s390_arch_setup): Fill have_hwcap_s390_vx.
2181 (s390_get_thread_area): New function.
2182 (s390_ft_entry_gpr_esa): New const.
2183 (s390_ft_entry_gpr_zarch): New const.
2184 (s390_ft_entry_misc): New const.
2185 (s390_ft_entry_fr): New const.
2186 (s390_ft_entry_vr): New const.
2187 (s390_ft_main_31): New const.
2188 (s390_ft_main_64): New const.
2189 (s390_ft_exit_fr): New const.
2190 (s390_ft_exit_vr): New const.
2191 (s390_ft_exit_misc): New const.
2192 (s390_ft_exit_gpr_esa): New const.
2193 (s390_ft_exit_gpr_zarch): New const.
2194 (append_insns): New function.
2195 (s390_relocate_instruction): New function.
2196 (s390_install_fast_tracepoint_jump_pad): New function.
2197 (s390_get_min_fast_tracepoint_insn_len): New function.
2198 (s390_get_ipa_tdesc_idx): New function.
2199 (struct linux_target_ops): Wire in the above functions.
2200 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2201 * linux-s390-tdesc.h: New file.
2202
a4105d04
MK
22032016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2204
2205 * linux-s390-low.c (s390_supports_tracepoints): New function.
2206 (struct linux_target_ops): Fill supports_tracepoints hook.
2207
35ac8b3e
YQ
22082016-03-18 Yao Qi <yao.qi@linaro.org>
2209
2210 * linux-low.c (lwp_signal_can_be_delivered): New function.
2211 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2212
94610ec4
YQ
22132016-03-18 Yao Qi <yao.qi@linaro.org>
2214
2215 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2216 0 if signal is enqueued. Remove 'signal' from one debugging
2217 message. Move one debugging message to some lines below.
2218 Remove code setting 'signal' to 0.
2219
80aea927
YQ
22202016-03-18 Yao Qi <yao.qi@linaro.org>
2221
2222 * linux-low.c (linux_low_filter_event): Remove redundant
2223 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2224
b04fd3be
MK
22252016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2226
2227 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2228 (struct linux_target_ops): Wire in the above.
2229
c40c8d4b
YQ
22302016-03-03 Yao Qi <yao.qi@linaro.org>
2231
2232 * linux-low.c: Update comments to start_step_over.
2233
0f8288ae
YQ
22342016-03-03 Yao Qi <yao.qi@linaro.org>
2235
2236 PR server/19736
2237 * linux-low.c (handle_extended_wait): Set child suspended
2238 if event_lwp->bp_reinsert isn't zero.
2239
fdbd04a8
YQ
22402016-03-02 Yao Qi <yao.qi@linaro.org>
2241
2242 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2243 enqueue_pending_signal.
2244
6896a8fa
MK
22452016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2246
2247 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2248 is actually loaded.
2249
ab503087
MK
22502016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2251
2252 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2253 (s390_regmap_3264) [!__s390x__]: New global.
2254 (s390_collect_ptrace_register): Skip map entries containing -1.
2255 (s390_supply_ptrace_register): Ditto.
2256 (s390_fill_gprs_high): New function.
2257 (s390_store_gprs_high): New function.
2258 (s390_regsets): Add NT_S390_HIGH_GPRS.
2259 (s390_get_hwcap): Enable on 31-bit.
2260 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2261 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2262 Detect NT_S390_HIGH_GPRS.
2263 (s390_usrregs_info_3264): Enable on 31-bit.
2264 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2265 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2266
ae91f625
MK
22672016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2268
2269 PR gdb/13808
2270 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2271 * configure.srv: Ditto.
2272 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2273 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2274 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2275 (init_registers_amd64_linux): Remove prototype.
2276 (tdesc_amd64_linux): Remove declaration.
2277 (get_ipa_tdesc): New function.
2278 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2279 initialize remaining tdescs.
2280 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2281 (init_registers_i386_linux): Remove prototype.
2282 (tdesc_i386_linux): Remove declaration.
2283 (get_ipa_tdesc): New function.
2284 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2285 initialize remaining tdescs.
2286 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2287 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2288 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2289 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2290 (x86_get_ipa_tdesc_idx): New function.
2291 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2292 * linux-x86-tdesc.h: New file.
2293 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2294 (target_get_ipa_tdesc_idx): New macro.
2295 * tracepoint.c (ipa_tdesc_idx): New macro.
2296 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2297 (symbol_list): Add ipa_tdesc_idx.
2298 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2299 (ipa_tdesc): Remove.
2300 (ipa_tdesc_idx): New variable.
2301 (get_context_regcache): Use get_ipa_tdesc.
2302 (gdb_collect): Ditto.
2303 (gdb_probe): Ditto.
2304 * tracepoint.h (get_ipa_tdesc): New prototype.
2305 (ipa_tdesc): Remove.
2306
e7ad2f14
PA
23072016-02-24 Pedro Alves <palves@redhat.com>
2308
2309 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2310 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2311 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2312 Factor out common code between the USE_SIGTRAP_SIGINFO and
2313 !USE_SIGTRAP_SIGINFO blocks.
2314 (linux_low_filter_event): Call save_stop_reason instead of
2315 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2316 Update comments.
2317 (linux_wait_1): Update comments.
2318
657f9cde
WW
23192016-02-24 Wei-cheng Wang <cole945@gmail.com>
2320
2321 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2322 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2323 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2324 ppc_insert_point, ppc_remove_point.
2325
b00b61e1
MK
23262016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2327
2328 * linux-s390-low.c (s390_supports_z_point_type): New function.
2329 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2330
553cb527
YQ
23312016-02-16 Yao Qi <yao.qi@linaro.org>
2332
2333 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2334 PC. Get pc from regcache_read_pc.
2335
a5652c21
YQ
23362016-02-12 Yao Qi <yao.qi@linaro.org>
2337
2338 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2339 or linux_get_pc_32bit.
2340 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2341
ed443b61
YQ
23422016-02-12 Yao Qi <yao.qi@linaro.org>
2343
2344 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2345 arm_linux_get_next_pcs_fixup.
2346
020ecd38
MK
23472016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2348
2349 * tracepoint.c (x_tracepoint_action_download): Change
2350 write_inferior_data_ptr to write_inferior_data_pointer.
2351 (cmd_qtstart): Likewise.
2352 (write_inferior_data_ptr): Remove.
2353 (download_agent_expr): Change write_inferior_data_ptr to
2354 write_inferior_data_pointer.
2355 (download_tracepoint_1): Likewise.
2356 (download_tracepoint): Likewise.
2357 (download_trace_state_variables): Likewise.
2358
7cae9051
WW
23592016-02-11 Wei-cheng Wang <cole945@gmail.com>
2360 Marcin Kościelnicki <koriakin@0x04.net>
2361
2362 * tracepoint.c (struct tracepoint_action_ops): Remove.
2363 (struct tracepoint_action): Remove ops.
2364 (m_tracepoint_action_download, r_tracepoint_action_download)
2365 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2366 size and offset accordingly.
2367 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2368 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2369 (tracepoint_action_send, tracepoint_action_download): New functions.
2370 Helpers for trace action handlers.
2371 (add_tracepoint_action): Remove setup actions ops.
2372 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2373
9f6a71b4
YQ
23742016-02-10 Yao Qi <yao.qi@linaro.org>
2375
2376 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2377
1e94266c
SM
23782016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2379
2380 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2381 to AC_OUTPUT.
2382 * configure: Regenerate.
2383
8adce034
SM
23842016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2385
2386 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2387 void * to gdb_byte *.
2388 * linux-low.c (siginfo_fixup): Likewise.
2389 (linux_xfer_siginfo): Likewise.
2390 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2391 Likewise.
2392 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2393
93813b37
WT
23942016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2395
2396 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2397 to srv_tgtobj.
2398 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2399 to srv_tgtobj.
2400 * linux-x86-low.c [__x86_64__]: Include
2401 "nat/amd64-linux-siginfo.h".
2402 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2403 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2404 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2405 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2406 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2407 (cpt_si_fd, si_timerid, si_overrun): Move from
2408 nat/amd64-linux-siginfo.c.
2409 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2410
8424cc97
SM
24112016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2412
2413 * server.c (skip_to_semicolon): Remove.
2414 (process_point_options): Use strchrnul instead of
2415 skip_to_semicolon.
2416
4d18591b
YQ
24172016-01-26 Yao Qi <yao.qi@linaro.org>
2418
2419 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2420 * linux-low.c (install_software_single_step_breakpoints): Don't
2421 call regcache_read_pc.
2422 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2423 argument pc.
2424
d8020970
YQ
24252016-01-26 Yao Qi <yao.qi@linaro.org>
2426
2427 * linux-low.c (install_software_single_step_breakpoints): Call
2428 regcache_read_pc instead of get_pc.
2429
8b207339
YQ
24302016-01-26 Yao Qi <yao.qi@linaro.org>
2431
2432 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2433 (unblock_async_io): Rename to ...
2434 (block_unblock_async_io): ... it. New function.
2435 (enable_async_io): Don't install SIGIO handler. Unblock it
2436 instead.
2437 (disable_async_io): Don't ignore SIGIO. Block it instead.
2438 (initialize_async_io): Install SIGIO handler. Don't call
2439 unblock_async_io.
2440
18879fef
YQ
24412016-01-26 Yao Qi <yao.qi@linaro.org>
2442
2443 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2444 first character is '\003', call *the_target->request_interrupt.
2445
a0f8e08a
YQ
24462016-01-25 Yao Qi <yao.qi@linaro.org>
2447
2448 * remote-utils.c (new_thread_notify): Remove.
2449 (dead_thread_notify): Likewise.
2450 * remote-utils.h (new_thread_notify): Remove declaration.
2451 (dead_thread_notify): Likewise.
2452
cc5fd9ab
MK
24532016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2454
2455 * gdb.trace/pending.exp: Fix expected message on continue.
2456
99e8eb11
MK
24572016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2458
2459 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2460 it works properly on big-endian machines where sizeof (CORE_ADDR)
2461 != sizeof (void *).
2462
a994041d
PA
24632016-01-21 Pedro Alves <palves@redhat.com>
2464
2465 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2466 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2467 * configure: Regenerate.
2468
f7a6a40d
YQ
24692016-01-21 Yao Qi <yao.qi@linaro.org>
2470
2471 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2472 is_thumb and set it according to CPSR saved on the stack.
2473 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2474 arm_sigreturn_next_pc.
2475
6f69e520
YQ
24762016-01-18 Yao Qi <yao.qi@linaro.org>
2477
2478 * linux-low.c (linux_set_pc_64bit): New function.
2479 (linux_get_pc_64bit): New function.
2480 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2481 Declare.
2482 * linux-sparc-low.c (debug_threads): Remove declaration.
2483 (sparc_get_pc): Remove.
2484 (the_low_target): Use linux_get_pc_64bit instead of
2485 sparc_get_pc.
2486 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2487 (the_low_target): Use linux_get_pc_64bit and
2488 linux_set_pc_64bit.
2489
276d4552
YQ
24902016-01-18 Yao Qi <yao.qi@linaro.org>
2491
2492 * linux-arm-low.c (debug_threads): Remove declaration.
2493 (arm_get_pc, arm_set_pc): Remove.
2494 (the_low_target): Use linux_get_pc_32bit and
2495 linux_set_pc_32bit.
2496 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2497 (the_low_target): Use linux_get_pc_32bit and
2498 linux_set_pc_32bit.
2499 * linux-cris-low.c (debug_threads): Remove declaration.
2500 (cris_get_pc, cris_set_pc,): Remove.
2501 (the_low_target): Use linux_get_pc_32bit and
2502 linux_set_pc_32bit.
2503 * linux-crisv32-low.c (debug_threads): Remove declaration.
2504 (cris_get_pc, cris_set_pc): Remove.
2505 (the_low_target): Use linux_get_pc_32bit and
2506 linux_set_pc_32bit.
2507 * linux-low.c: Include inttypes.h.
2508 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2509 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2510 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2511 (the_low_target): Use linux_get_pc_32bit and
2512 linux_set_pc_32bit.
2513 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2514 (the_low_target): Use linux_get_pc_32bit and
2515 linux_set_pc_32bit.
2516 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2517 (the_low_target): Use linux_get_pc_32bit and
2518 linux_set_pc_32bit.
2519 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2520 (the_low_target): Use linux_get_pc_32bit and
2521 linux_set_pc_32bit.
2522 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2523 (the_low_target): Use linux_get_pc_32bit and
2524 linux_set_pc_32bit.
2525
eb0edac8
GB
25262016-01-18 Gary Benson <gbenson@redhat.com>
2527
2528 * configure.ac (AC_FUNC_FORK): New check.
2529 * config.in: Regenerate.
2530 * configure: Likewise.
2531
1b451dda
YQ
25322016-01-14 Yao Qi <yao.qi@linaro.org>
2533
2534 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2535 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2536 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2537 arm_get_next_pcs_ctor.
2538
82075af2
JS
25392016-01-12 Josh Stone <jistone@redhat.com>
2540 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2541
2542 * inferiors.h: Include "gdb_vecs.h".
2543 (struct process_info): Add syscalls_to_catch.
2544 * inferiors.c (remove_process): Free syscalls_to_catch.
2545 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2546 syscall_return stops.
2547 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2548 * server.c (handle_general_set): Handle QCatchSyscalls.
2549 (handle_query): Report support for QCatchSyscalls.
2550 * target.h (struct target_ops): Add supports_catch_syscall.
2551 (target_supports_catch_syscall): New macro.
2552 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2553 (struct lwp_info): Add syscall_state.
2554 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2555 Maintain syscall_state and syscalls_to_catch across exec.
2556 (get_syscall_trapinfo): New function, proxy to the_low_target.
2557 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2558 (linux_low_filter_event): Toggle syscall_state entry/return for
2559 syscall traps, and set it ignored for all others.
2560 (gdb_catching_syscalls_p): New function.
2561 (gdb_catch_this_syscall_p): New function.
2562 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2563 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2564 (linux_supports_catch_syscall): New function.
2565 (linux_target_ops): Install it.
2566 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2567 (the_low_target): Install it.
2568
8f13a3ce
MF
25692016-01-12 Mike Frysinger <vapier@gentoo.org>
2570
2571 * acinclude.m4: Include new ../warning.m4 file.
2572 * configure: Regenerated.
2573 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2574
5b3da067
MF
25752016-01-12 Mike Frysinger <vapier@gentoo.org>
2576
2577 * ax.c (is_goto_target): Mark static.
2578 * linux-low.c (register_addr): Likewise.
2579 (linux_fetch_registers, linux_store_registers): Likewise.
2580 * mem-break.c (any_persistent_commands): Fix old prototype.
2581 (add_commands_to_breakpoint): Mark static.
2582 * regcache.c (find_register_by_name): Delete unused func.
2583 * remote-utils.c (hex_or_minus_one): Mark static.
2584 * server.c (monitor_show_help): Mark static.
2585 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2586 handle_v_requests): Likewise.
2587
bc504a31
PA
25882016-01-12 Pedro Alves <palves@redhat.com>
2589
2590 Remove use of the registered trademark symbol throughout.
2591
5a0dd67a
YQ
25922016-01-08 Yao Qi <yao.qi@linaro.org>
2593
2594 * remote-utils.c (getpkt): If c is '\003', call target hook
2595 request_interrupt.
2596
b2ca446f
YQ
25972016-01-06 Yao Qi <yao.qi@linaro.org>
2598
2599 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2600 linux-aarch32-low.c.
2601 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2602 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2603 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2604 (thumb2_breakpoint): Declare.
2605 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2606 linux-aarch32-low.h.
2607 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2608 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2609 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2610
edd88788
JB
26112016-01-01 Joel Brobecker <brobecker@adacore.com>
2612
2613 * gdbreplay.c (gdbreplay_version): Change copyright year in
2614 version message.
2615 * server.c (gdbserver_version): Likewise.
2616
65da7f14
PP
26172015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2618
2619 * server.c (crc32_table): Delete.
2620 (crc32): Use libiberty's xcrc32 function.
2621
4abd5ed2
JB
26222015-12-22 Joel Brobecker <brobecker@adacore.com>
2623
2624 * lynx-low.c (lynx_delete_thread_callback): New function.
2625 (lynx_mourn): Properly delete our process and all of its
2626 threads. Remove call to clear_inferiors.
2627
0e50fe5c
JB
26282015-12-22 Joel Brobecker <brobecker@adacore.com>
2629
2630 * target.c (thread_search_callback): Add check that
2631 the thread_stopped target callback is not NULL before
2632 calling it.
2633
35adc03f
YQ
26342015-12-21 Yao Qi <yao.qi@linaro.org>
2635
2636 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2637 arm breakpoint.
2638
bd2b2909
AT
26392015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2640
2641 * server.c (handle_query): Call target_supports_software_single_step.
2642
7fe5e27e
AT
26432015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2644
2645 * linux-low.c (single_step): New function.
2646 (linux_resume_one_lwp_throw): Call single_step.
2647 (start_step_over): Likewise.
2648
d9311bfa
AT
26492015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2650
2651 * Makefile.in (SFILES): Append arch/arm-linux.c,
2652 arch/arm-get-next-pcs.c.
2653 (arm-linux.o): New rule.
2654 (arm-get-next-pcs.o): New rule.
2655 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2656 arm-linux.o.
2657 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2658 to linux-aarch32-low.c.
2659 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2660 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2661 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2662 (thumb2_breakpoint_len): Likewise.
2663 (arm_is_thumb_mode): Make non-static.
2664 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2665 from linux-aarch32-low.c.
2666 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2667 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2668 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2669 (thumb2_breakpoint_len): Likewise.
2670 (arm_is_thumb_mode): New declaration.
2671 * linux-arm-low.c: Include arch/arm-linux.h
2672 aarch/arm-get-next-pcs.h, sys/syscall.h.
2673 (get_next_pcs_ops): New struct.
2674 (get_next_pcs_addr_bits_remove): New function.
2675 (get_next_pcs_is_thumb): New function.
2676 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2677 (arm_sigreturn_next_pc): Likewise.
2678 (get_next_pcs_syscall_next_pc): Likewise.
2679 (arm_gdbserver_get_next_pcs): Likewise.
2680 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2681 Initialize.
2682 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2683 * server.h: Include gdb_vecs.h.
2684
68ce2059
AT
26852015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2686
2687 * Makefile.in (SFILES): Append common/common-regcache.c.
2688 (OBS): Append common-regcache.o.
2689 (common-regcache.o): New rule.
2690 * regcache.c (init_register_cache): Initialize cache to
2691 REG_UNAVAILABLE.
2692 (regcache_raw_read_unsigned): New function.
2693 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2694 register_status enum.
2695
fa5308bd
AT
26962015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2697
2698 * linux-aarch64-low.c (the_low_targets): Rename
2699 breakpoint_reinsert_addr to get_next_pcs.
2700 * linux-arm-low.c (the_low_targets): Likewise.
2701 * linux-bfin-low.c (the_low_targets): Likewise.
2702 * linux-cris-low.c (the_low_targets): Likewise.
2703 * linux-crisv32-low.c (the_low_targets): Likewise.
2704 * linux-low.c (can_software_single_step): Likewise.
2705 (install_software_single_step_breakpoints): New function.
2706 (start_step_over): Use install_software_single_step_breakpoints.
2707 * linux-low.h: New CORE_ADDR vector.
2708 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2709 get_next_pcs.
2710 * linux-mips-low.c (the_low_targets): Likewise.
2711 * linux-nios2-low.c (the_low_targets): Likewise.
2712 * linux-sparc-low.c (the_low_targets): Likewise.
2713
4a6ed09b
PA
27142015-12-17 Pedro Alves <palves@redhat.com>
2715
2716 * linux-low.c (linux_kill_one_lwp): Remove references to
2717 LinuxThreads.
2718 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2719 to 'kill'.
2720 (linux_init_signals): Delete.
2721 (initialize_low): Adjust.
2722 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2723
7544db95
PA
27242015-12-16 Pedro Alves <palves@redhat.com>
2725
2726 * configure.ac (compiler warning flags): When testing a
2727 -Wno-foo option, check whether -Wfoo works instead.
2728 * configure: Regenerate.
2729
8020350c
DB
27302015-12-11 Don Breazeal <donb@codesourcery.com>
2731
2732 * server.c (process_serial_event): Don't exit from gdbserver
2733 in remote mode if there are still active inferiors.
2734
db91f502
YQ
27352015-12-11 Yao Qi <yao.qi@linaro.org>
2736
2737 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2738 arm_breakpoint_at if the process is 32-bit.
2739
b37a6290
YQ
27402015-12-11 Yao Qi <yao.qi@linaro.org>
2741
2742 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2743 arm breakpoint.
2744
17b1509a
YQ
27452015-12-07 Yao Qi <yao.qi@linaro.org>
2746
2747 * configure.srv: Append arm.o to srv_tgtobj for
2748 aarch64*-*-linux* target.
2749 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2750 from linux-arm-low.c.
2751 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2752 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2753 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2754 (thumb2_breakpoint_len): Likewise.
2755 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2756 (arm_breakpoint_kinds): Likewise.
2757 (arm_breakpoint_kind_from_pc): Likewise.
2758 (arm_sw_breakpoint_from_kind): Likewise.
2759 (arm_breakpoint_kind_from_current_state): Likewise.
2760 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2761 (arm_sw_breakpoint_from_kind): Declare.
2762 (arm_breakpoint_kind_from_current_state): Declare.
2763 (arm_breakpoint_at): Declare.
2764 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2765 arm_sw_breakpoint_from_kind if process is 32-bit.
2766 (aarch64_breakpoint_kind_from_pc): New function.
2767 (aarch64_breakpoint_kind_from_current_state): New function.
2768 (the_low_target): Initialize fields breakpoint_kind_from_pc
2769 and breakpoint_kind_from_current_state.
2770 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2771 linux-aarch32-low.c.
2772 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2773 (arm_breakpoint, arm_breakpoint_len): Likewise.
2774 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2775 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2776 (arm_is_thumb_mode): Likewise.
2777 (arm_breakpoint_at): Likewise.
2778 (arm_breakpoint_kind_from_pc): Likewise.
2779 (arm_sw_breakpoint_from_kind): Likewise.
2780 (arm_breakpoint_kind_from_current_state): Likewise.
2781
2782 Revert:
2783 2015-08-04 Yao Qi <yao.qi@linaro.org>
2784
2785 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2786 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2787 * server.c (extended_protocol): Remove "static".
2788 * server.h (extended_protocol): Declare it.
2789
ece66d65
JS
27902015-12-04 Josh Stone <jistone@redhat.com>
2791
2792 * target.h (struct target_ops) <arch_setup>: Rename to ...
2793 (struct target_ops) <post_create_inferior>: ... this.
2794 (target_arch_setup): Rename to ...
2795 (target_post_create_inferior): ... this, calling post_create_inferior.
2796 * server.c (start_inferior): Update target_arch_setup calls to
2797 target_post_create_inferior.
2798 * linux-low.c (linux_low_ptrace_options): Forward declare.
2799 (linux_arch_setup): Update its comment for general use.
2800 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2801 (struct linux_target_ops): Use linux_post_create_inferior.
2802 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2803 to post_create_inferior.
2804 * nto-low.c (struct nto_target_ops): Likewise.
2805 * spu-low.c (struct spu_target_ops): Likewise.
2806 * win32-low.c (struct win32_target_ops): Likewise.
2807
e58c48b4
AT
28082015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2809
2810 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2811
fbec8956
AT
28122015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2813
2814 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2815 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2816 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2817 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2818 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2819 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2820 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2821 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2822 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2823 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2824 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2825 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2826
9b4c5f87
AT
28272015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2828
2829 * linux-low.c (linux_look_up_symbols): Don't call
2830 linux_supports_traceclone.
2831 * linux-low.h (thread_db_init): Remove use_events argument.
2832 * thread-db.c (thread_db_use_event): Remove global variable.
2833 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2834 (struct thread_db) <td_create_bp>: Remove field.
2835 (thread_db_create_event): Remove function.
2836 (thread_db_enable_reporting): Likewise.
2837 (find_one_thread): Don't check for thread_db_use_events.
2838 (attach_thread): Likewise.
2839 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2840 (try_thread_db_load_1): Don't check for thread_db_use_events.
2841 (thread_db_init): Remove use_events argument and thread events
2842 handling.
2843 (remove_thread_event_breakpoints): Remove function.
2844 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2845
7d00775e
AT
28462015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2847
2848 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2849 New function.
2850 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2851 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2852 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2853 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2854 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2855 Initialize.
2856 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2857 New function.
2858 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2859 * linux-low.c (can_hardware_single_step): Use
2860 supports_hardware_single_step.
2861 (can_software_single_step): New function.
2862 (start_step_over): Call can_software_single_step.
2863 (linux_supports_hardware_single_step): New function.
2864 (struct target_ops) <supports_software_single_step>: Initialize.
2865 * linux-low.h (struct linux_target_ops)
2866 <supports_hardware_single_step>: Initialize.
2867 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2868 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2869 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2870 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2871 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2872 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2873 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2874 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2875 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2876 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2877 Initialize.
2878 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2879 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2880 Initialize.
2881 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2882 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2883 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2884 New function.
2885 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2886 * target.h (struct target_ops): <supports_software_single_step>:
2887 New field.
2888 (target_supports_software_single_step): New macro.
2889
2d97cd35
AT
28902015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2891
2892 * linux-low.c (linux_wait_1): Fix pc advance condition.
2893 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2894 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2895
769ef81f
AT
28962015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2897
2898 * linux-arm-low.c (arm_is_thumb_mode): New function.
2899 (arm_breakpoint_at): Use arm_is_thumb_mode.
2900 (arm_breakpoint_kind_from_current_state): New function.
2901 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2902 Initialize.
2903 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2904 (linux_breakpoint_kind_from_current_state): New function.
2905 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2906 * linux-low.h (struct linux_target_ops)
2907 <breakpoint_kind_from_current_state>: New field.
2908 * target.h (struct target_ops): Likewise.
2909 (target_breakpoint_kind_from_current_state): New macro.
2910
1bebeeca
PA
29112015-11-30 Pedro Alves <palves@redhat.com>
2912
2913 * linux-low.c (linux_resume): Wake up the event loop before
2914 returning.
2915
a67a9fae
PA
29162015-11-30 Pedro Alves <palves@redhat.com>
2917
2918 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2919 check.
2920 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2921 to -1.
2922 * target.c (struct thread_search): New structure.
2923 (thread_search_callback): New function.
2924 (prev_general_thread): New global.
2925 (prepare_to_access_memory, done_accessing_memory): New functions.
2926 * target.h (prepare_to_access_memory, done_accessing_memory):
2927 Replace macros with function declarations.
2928
f2faf941
PA
29292015-11-30 Pedro Alves <palves@redhat.com>
2930
2931 PR 14618
2932 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2933 report TARGET_WAITKIND_NO_RESUMED.
2934 * remote-utils.c (prepare_resume_reply): Handle
2935 TARGET_WAITKIND_NO_RESUMED.
2936 * server.c (report_no_resumed): New global.
2937 (handle_query) <qSupported>: Handle "no-resumed+". Report
2938 "no-resumed+" support.
2939 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2940 return error if the client doesn't support no-resumed events.
2941 (push_stop_notification): New function.
2942 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2943 events if the client supports them.
2944
a681f9c9
PA
29452015-11-30 Pedro Alves <palves@redhat.com>
2946
2947 * linux-low.c (thread_still_has_status_pending_p): Don't check
2948 vCont;t here.
2949 (lwp_resumed): New function.
2950 (status_pending_p_callback): Return early if the LWP is not
2951 supposed to be resumed.
2952
65706a29
PA
29532015-11-30 Pedro Alves <palves@redhat.com>
2954
2955 * linux-low.c (handle_extended_wait): Assert that the LWP's
2956 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2957 thread create events, leave the new child's status pending.
2958 (linux_low_filter_event): If GDB wants to hear about thread exit
2959 events, leave the LWP marked dead and don't delete it.
2960 (linux_wait_for_event_filtered): Don't check for thread exit.
2961 (filter_exit_event): New function.
2962 (linux_wait_1): Use it, when returning an exit event.
2963 (linux_resume_one_lwp_throw): Assert that the LWP's
2964 waitstatus is TARGET_WAITKIND_IGNORE.
2965 * remote-utils.c (prepare_resume_reply): Handle
2966 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2967 * server.c (report_thread_events): New global.
2968 (handle_general_set): Handle QThreadEvents.
2969 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2970 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2971 TARGET_WAITKIND_THREAD_EXITED.
2972 * server.h (report_thread_events): Declare.
2973
56cf4bed
PA
29742015-11-30 Pedro Alves <palves@redhat.com>
2975
2976 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2977 the thread's last_resume_kind was resume_stop.
2978
500c1d85
PA
29792015-11-30 Pedro Alves <palves@redhat.com>
2980
2981 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2982 before returning.
2983
de979965
PA
29842015-11-30 Pedro Alves <palves@redhat.com>
2985
2986 * server.c (handle_v_requests): Handle vCtrlC.
2987
34c65914
PA
29882015-11-30 Pedro Alves <palves@redhat.com>
2989
2990 * gdbthread.h (find_any_thread_of_pid): Declare.
2991 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2992 functions.
2993 * server.c (handle_query): If current_thread is NULL, look for
2994 another thread of the selected process.
2995
79efa585 29962015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 2997 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
2998
2999 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3000 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3001 name in reply.
3002 * target.h (struct target_ops) <thread_name>: New field.
3003 (target_thread_name): New macro.
3004
80d82c19
JB
30052015-11-23 Joel Brobecker <brobecker@adacore.com>
3006
3007 * regcache.h (regcache_invalidate_pid): Add declaration.
3008 * regcache.c (regcache_invalidate_pid): New function, extracted
3009 from regcache_invalidate.
3010 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3011 Add trivial documentation comment.
3012 * lynx-low.c: Use regcache_invalidate_pid instead of
3013 regcache_invalidate.
3014
64da5dd5
JB
30152015-11-23 Joel Brobecker <brobecker@adacore.com>
3016
3017 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3018 and Elf64_auxv_t if the target is Android.
3019
37ce4055
DE
30202015-11-22 Doug Evans <xdje42@gmail.com>
3021
3022 * target.h: #include <sys/types.h>.
3023
06e03fff
PA
30242015-11-19 Pedro Alves <palves@redhat.com>
3025
3026 * linux-low.c (linux_process_qsupported): Change prototype.
3027 Adjust.
3028 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3029 Change prototype.
3030 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3031 and adjust to loop over all features.
3032 * server.c (handle_query) <qSupported>: Adjust to call
3033 target_process_qsupported once, passing it a vector of unprocessed
3034 features.
3035 * target.h (struct target_ops) <process_qsupported>: Change
3036 prototype.
3037 (target_process_qsupported): Adjust.
3038
9a084706
PA
30392015-11-19 Pedro Alves <palves@redhat.com>
3040
3041 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3042 mode.
3043 * configure: Regenerate.
3044
dad44a1f
PA
30452015-11-19 Pedro Alves <palves@redhat.com>
3046
3047 * configure: Regenerate.
3048
231c0592
YQ
30492015-11-19 Yao Qi <yao.qi@linaro.org>
3050
3051 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3052 type to uint32_t.
3053
6c1c9a8b
YQ
30542015-11-19 Yao Qi <yao.qi@linaro.org>
3055
3056 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3057 (struct aarch64_operand): Move enum out.
3058
9caa3311
YQ
30592015-11-19 Yao Qi <yao.qi@linaro.org>
3060
3061 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3062 struct user_fpsimd_state *.
3063 (aarch64_store_fpregset): Likewise.
3064
6a69a054
YQ
30652015-11-19 Yao Qi <yao.qi@linaro.org>
3066
3067 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3068 struct user_pt_regs *.
3069 (aarch64_store_gregset): Likewise.
3070
1798301e
PA
30712015-11-18 Pedro Alves <palves@redhat.com>
3072
3073 * Makefile.in (all_object_files): Add $IPA_OBJS.
3074
ce7715e2
PA
30752015-11-17 Pedro Alves <palves@redhat.com>
3076
3077 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3078 GDB_SIGNAL_0 and gdb_signal_to_string.
3079
c0879059
PA
30802015-11-17 Pedro Alves <palves@redhat.com>
3081
3082 * win32-low.c (handle_output_debug_string): Remove parameter.
3083 (win32_kill): Remove our_status local and adjust call to
3084 handle_output_debug_string.
3085 (get_child_debug_event): Adjust call to
3086 handle_output_debug_string.
3087
1996e237
SM
30882015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3089
3090 * linux-mips-low.c (mips_fill_gregset): Add cast.
3091 (mips_store_gregset): Likewise.
3092 (mips_fill_fpregset): Likewise.
3093 (mips_store_fpregset): Likewise.
3094
cbec665b
SM
30952015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3096
3097 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3098 priv.
3099
eb3e3c67
SM
31002015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3101
3102 * linux-mips-low.c (mips_linux_new_thread): Change type of
3103 watch_type to enum target_hw_bp_type.
3104
171de4b8
SM
31052015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3106
3107 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3108 Change return type to arm_hwbp_type.
3109
04248ead
SM
31102015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3111
3112 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3113 (arm_store_gregset): Likewise.
3114 * linux-arm-low.c (arm_get_hwcap): Likewise.
3115 (arm_read_description): Likewise.
3116
04b3479c
SM
31172015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3118
3119 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3120
2bc84e8a
SM
31212015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3122
3123 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3124 (ppc_fill_vsxregset): Likewise.
3125 (ppc_store_vsxregset): Likewise.
3126 (ppc_fill_vrregset): Likewise.
3127 (ppc_store_vrregset): Likewise.
3128 (ppc_fill_evrregset): Likewise.
3129 (ppc_store_evrregset): Likewise.
3130
e6c5bb05
SM
31312015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3132
3133 * linux-ppc-low.c (ppc_usrregs_info): Remove
3134 forward-declaration.
3135 (ppc_arch_setup): Move lower in file.
3136
7ea45d72
SM
31372015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3138
3139 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3140 (ps_pdwrite): Likewise.
3141
69291610
HW
31422015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3143
3144 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3145 to after assert checks.
3146
b42945fd
SM
31472015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3148
3149 * proc-service.c (ps_pdread): Add/adjust casts.
3150 (ps_pdwrite): Add/adjust casts.
3151
d6f85c84
SM
31522015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3153
3154 * server.c (handle_search_memory_1): Cast return value of
3155 memmem.
3156
f98cd059
SM
31572015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3158
3159 * server.c (write_qxfer_response): Change type of data to
3160 gdb_byte *.
3161
d2412fa5
PA
31622015-10-29 Pedro Alves <palves@redhat.com>
3163
3164 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3165
c17414a2
PA
31662015-10-29 Pedro Alves <palves@redhat.com>
3167
3168 * tracepoint.c (clear_installed_tracepoints): Add casts.
3169
e053fbc4
PA
31702015-10-29 Pedro Alves <palves@redhat.com>
3171
3172 * server.c (handle_v_cont, process_serial_event): Add enum
3173 gdb_signal casts to signal parsing code.
3174
add67df8
PA
31752015-10-29 Pedro Alves <palves@redhat.com>
3176
3177 * linux-low.h (NULL_REGSET): Define.
3178 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3179 * linux-arm-low.c (arm_regsets): Likewise.
3180 * linux-crisv32-low.c (cris_regsets): Likewise.
3181 * linux-m68k-low.c (m68k_regsets): Likewise.
3182 * linux-mips-low.c (mips_regsets): Likewise.
3183 * linux-nios2-low.c (nios2_regsets): Likewise.
3184 * linux-ppc-low.c (ppc_regsets): Likewise.
3185 * linux-s390-low.c (s390_regsets): Likewise.
3186 * linux-sh-low.c (sh_regsets): Likewise.
3187 * linux-sparc-low.c (sparc_regsets): Likewise.
3188 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3189 * linux-tile-low.c (tile_regsets): Likewise.
3190 * linux-x86-low.c (x86_regsets): Likewise.
3191 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3192
50bc912a
PA
31932015-10-29 Pedro Alves <palves@redhat.com>
3194
3195 * linux-low.h (NULL_REGSET): Define.
3196 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3197 * linux-arm-low.c (arm_regsets): Likewise.
3198 * linux-crisv32-low.c (cris_regsets): Likewise.
3199 * linux-m68k-low.c (m68k_regsets): Likewise.
3200 * linux-mips-low.c (mips_regsets): Likewise.
3201 * linux-nios2-low.c (nios2_regsets): Likewise.
3202 * linux-ppc-low.c (ppc_regsets): Likewise.
3203 * linux-s390-low.c (s390_regsets): Likewise.
3204 * linux-sh-low.c (sh_regsets): Likewise.
3205 * linux-sparc-low.c (sparc_regsets): Likewise.
3206 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3207 * linux-tile-low.c (tile_regsets): Likewise.
3208 * linux-x86-low.c (x86_regsets): Likewise.
3209 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3210
682b2546
DE
32112015-10-26 Doug Evans <dje@google.com>
3212
3213 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3214
963843d4
DE
32152015-10-26 Doug Evans <dje@google.com>
3216
3217 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3218
d41401ac
DE
32192015-10-26 Doug Evans <dje@google.com>
3220
3221 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3222 for debug_printf.
3223 (attach_thread, find_new_threads_callback): Ditto.
3224
3db28855
AT
32252015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3226
3227 * mem-break.h (set_breakpoint_data): Remove.
3228
fb78e89c
AT
32292015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3230
3231 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3232 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3233 (initialize_low): Remove set_breakpoint_data call.
3234 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3235 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3236 (initialize_low): Remove set_breakpoint_data call.
3237 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3238 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3239 (initialize_low): Remove set_breakpoint_data call.
3240
2e6ee069
AT
32412015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3242
3243 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3244 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3245 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3246 * target.h (target_breakpoint_kind_from_pc): New macro.
3247
1652a986
AT
32482015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3249
3250 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3251 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3252 the default breakpoint kind.
3253
abeead09
AT
32542015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3255
3256 * linux-arm-low.c (arm_supports_z_point_type): Add software
3257 breakpoint support.
3258
b0b4b501
AT
32592015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3260
3261 * linux-arm-low.c: Refactor breakpoint definitions.
3262 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3263 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3264
8689682c
AT
32652015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3266
3267 * Makefile.in: Add arm.c/o.
3268 * configure.srv: Likewise.
3269 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3270 (arm_breakpoint_kind_from_pc): New function.
3271 (arm_sw_breakpoint_from_kind): Return proper kind.
3272 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3273
27165294
AT
32742015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3275
3276 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3277 removal.
3278 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3279 (struct raw_breakpoint) <size>: Remove.
3280 (struct raw_breakpoint) <kind>: Add.
3281 (bp_size): New function.
3282 (bp_opcode): Likewise.
3283 (find_raw_breakpoint_at): Adjust for kind.
3284 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3285 (remove_memory_breakpoint): Adjust for kind call bp_size.
3286 (set_raw_breakpoint_at): Adjust for kind.
3287 (set_breakpoint): Likewise.
3288 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3289 (delete_raw_breakpoint): Adjust for kind.
3290 (delete_breakpoint): Likewise.
3291 (find_gdb_breakpoint): Likewise.
3292 (set_gdb_breakpoint_1): Likewise.
3293 (set_gdb_breakpoint): Likewise.
3294 (delete_gdb_breakpoint_1): Likewise.
3295 (delete_gdb_breakpoint): Likewise.
3296 (uninsert_raw_breakpoint): Likewise.
3297 (reinsert_raw_breakpoint): Likewise.
3298 (set_breakpoint_data): Remove.
3299 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3300 (check_mem_read): Adjust for kind call bp_size.
3301 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3302 (clone_one_breakpoint): Adjust for kind.
3303 * mem-break.h (set_gdb_breakpoint): Likewise.
3304 (delete_gdb_breakpoint): Likewise.
3305 * server.c (process_serial_event): Likewise.
3306
dd373349
AT
33072015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3308
3309 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3310 (struct linux_target_ops) <breakpoint>: Remove.
3311 (struct linux_target_ops) <breakpoint_len>: Remove.
3312 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3313 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3314 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3315 (arm_sw_breakpoint_from_kind): New function.
3316 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3317 (struct linux_target_ops) <breakpoint>: Remove.
3318 (struct linux_target_ops) <breakpoint_len>: Remove.
3319 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3320 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3321 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3322 (struct linux_target_ops) <breakpoint>: Remove.
3323 (struct linux_target_ops) <breakpoint_len>: Remove.
3324 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3325 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3326 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3327 (struct linux_target_ops) <breakpoint>: Remove.
3328 (struct linux_target_ops) <breakpoint_len>: Remove.
3329 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3330 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3331 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3332 and sw_breakpoint_from_kind to increment the pc.
3333 (linux_breakpoint_kind_from_pc): New function.
3334 (linux_sw_breakpoint_from_kind): New function.
3335 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3336 (initialize_low): Call breakpoint_kind_from_pc and
3337 sw_breakpoint_from_kind to replace breakpoint_data/len.
3338 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3339 New field.
3340 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3341 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3342 (struct linux_target_ops) <breakpoint>: Remove.
3343 (struct linux_target_ops) <breakpoint_len>: Remove.
3344 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3345 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3346 * linux-m68k-low.c (m68k_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-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3352 (struct linux_target_ops) <breakpoint>: Remove.
3353 (struct linux_target_ops) <breakpoint_len>: Remove.
3354 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3355 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3356 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3357 (struct linux_target_ops) <breakpoint>: Remove.
3358 (struct linux_target_ops) <breakpoint_len>: Remove.
3359 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3360 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3361 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3362 (struct linux_target_ops) <breakpoint>: Remove.
3363 (struct linux_target_ops) <breakpoint_len>: Remove.
3364 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3365 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3366 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3367 (struct linux_target_ops) <breakpoint>: Remove.
3368 (struct linux_target_ops) <breakpoint_len>: Remove.
3369 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3370 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3371 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3372 (struct linux_target_ops) <breakpoint>: Remove.
3373 (struct linux_target_ops) <breakpoint_len>: Remove.
3374 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3375 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3376 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3377 (struct linux_target_ops) <breakpoint>: Remove.
3378 (struct linux_target_ops) <breakpoint_len>: Remove.
3379 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3380 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3381 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3382 (struct linux_target_ops) <breakpoint>: Remove.
3383 (struct linux_target_ops) <breakpoint_len>: Remove.
3384 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3385 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3386 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3387 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3388 (struct linux_target_ops) <breakpoint>: Remove.
3389 (struct linux_target_ops) <breakpoint_len>: Remove.
3390 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3391 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3392 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3393 (struct linux_target_ops) <breakpoint>: Remove.
3394 (struct linux_target_ops) <breakpoint_len>: Remove.
3395 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3396 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3397
4cd98a19
AT
33982015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3399
3400 * linux-cris-low.c (cris_get_pc): Remove void arg.
3401
774ee6d2
AR
34022015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3403
3404 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3405 variable name.
3406
833dcd29
AR
34072015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3408
3409 * inferiors.c (thread_pid_matches_callback): New function.
3410 (find_thread_process): New function.
3411 (remove_thread): Reset current_thread.
3412 (remove_process): Assert threads have been removed first.
3413
8d689ee5
YQ
34142015-10-15 Yao Qi <yao.qi@linaro.org>
3415
3416 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3417 if it is 3.
3418 (aarch64_remove_point): Likewise.
3419 * regcache.c (regcache_register_size): New function.
3420
1c2e1515
YQ
34212015-10-12 Yao Qi <yao.qi@linaro.org>
3422
3423 * linux-aarch64-low.c: Update all callers as emit_load_store
3424 is renamed to aarch64_emit_load_store.
3425
e1c587c3
YQ
34262015-10-12 Yao Qi <yao.qi@linaro.org>
3427
3428 * linux-aarch64-low.c: Update all callers of function renaming
3429 from emit_insn to aarch64_emit_insn.
3430
b6542f81
YQ
34312015-10-12 Yao Qi <yao.qi@linaro.org>
3432
3433 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3434 arch/aarch64-insn.h.
3435 (struct aarch64_memory_operand): Likewise.
3436 (ENCODE): Likewise.
3437 (emit_insn): Move to arch/aarch64-insn.c.
3438 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3439 (emit_load_store): Move to arch/aarch64-insn.c.
3440 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3441 (can_encode_int32): Remove.
3442
246994ce
YQ
34432015-10-12 Yao Qi <yao.qi@linaro.org>
3444
3445 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3446 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3447 (aarch64_relocate_instruction): Likewise.
3448 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3449 (struct aarch64_insn_visitor): Likewise.
3450
0badd99f
YQ
34512015-10-12 Yao Qi <yao.qi@linaro.org>
3452
3453 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3454 (struct aarch64_insn_visitor): New.
3455 (struct aarch64_insn_relocation_data): New.
3456 (aarch64_ftrace_insn_reloc_b): New function.
3457 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3458 (aarch64_ftrace_insn_reloc_cb): Likewise.
3459 (aarch64_ftrace_insn_reloc_tb): Likewise.
3460 (aarch64_ftrace_insn_reloc_adr): Likewise.
3461 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3462 (aarch64_ftrace_insn_reloc_others): Likewise.
3463 (visitor): New.
3464 (aarch64_relocate_instruction): Use visitor.
3465
dfaffe9d
YQ
34662015-10-12 Yao Qi <yao.qi@linaro.org>
3467
3468 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3469 int. Add argument buf.
3470 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3471 aarch64_relocate_instruction.
3472
70b439f0
YQ
34732015-10-12 Yao Qi <yao.qi@linaro.org>
3474
3475 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3476 argument insn. Remove local variable insn. Don't call
3477 target_read_uint32.
3478 (aarch64_install_fast_tracepoint_jump_pad): Call
3479 target_read_uint32.
3480
7781c06f
YQ
34812015-09-30 Yao Qi <yao.qi@linaro.org>
3482
3483 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3484 (emit_load_store_pair): Likewise.
3485
9a3c8263
SM
34862015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3487
3488 * dll.c (match_dll): Add cast(s).
3489 (unloaded_dll): Likewise.
3490 * linux-low.c (second_thread_of_pid_p): Likewise.
3491 (delete_lwp_callback): Likewise.
3492 (count_events_callback): Likewise.
3493 (select_event_lwp_callback): Likewise.
3494 (linux_set_resume_request): Likewise.
3495 * server.c (accumulate_file_name_length): Likewise.
3496 (emit_dll_description): Likewise.
3497 (handle_qxfer_threads_worker): Likewise.
3498 (visit_actioned_threads): Likewise.
3499 * thread-db.c (any_thread_of): Likewise.
3500 * tracepoint.c (same_process_p): Likewise.
3501 (match_blocktype): Likewise.
3502 (build_traceframe_info_xml): Likewise.
3503
224c3ddb
SM
35042015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3505
3506 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3507 assignment.
3508 (gdb_unparse_agent_expr): Likewise.
3509 * hostio.c (require_data): Likewise.
3510 (handle_pread): Likewise.
3511 * linux-low.c (disable_regset): Likewise.
3512 (fetch_register): Likewise.
3513 (store_register): Likewise.
3514 (get_dynamic): Likewise.
3515 (linux_qxfer_libraries_svr4): Likewise.
3516 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3517 (set_fast_tracepoint_jump): Likewise.
3518 (uninsert_fast_tracepoint_jumps_at): Likewise.
3519 (reinsert_fast_tracepoint_jumps_at): Likewise.
3520 (validate_inserted_breakpoint): Likewise.
3521 (clone_agent_expr): Likewise.
3522 * regcache.c (init_register_cache): Likewise.
3523 * remote-utils.c (putpkt_binary_1): Likewise.
3524 (decode_M_packet): Likewise.
3525 (decode_X_packet): Likewise.
3526 (look_up_one_symbol): Likewise.
3527 (relocate_instruction): Likewise.
3528 (monitor_output): Likewise.
3529 * server.c (handle_search_memory): Likewise.
3530 (handle_qxfer_exec_file): Likewise.
3531 (handle_qxfer_libraries): Likewise.
3532 (handle_qxfer): Likewise.
3533 (handle_query): Likewise.
3534 (handle_v_cont): Likewise.
3535 (handle_v_run): Likewise.
3536 (captured_main): Likewise.
3537 * target.c (write_inferior_memory): Likewise.
3538 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3539 * tracepoint.c (init_trace_buffer): Likewise.
3540 (add_tracepoint_action): Likewise.
3541 (add_traceframe): Likewise.
3542 (add_traceframe_block): Likewise.
3543 (cmd_qtdpsrc): Likewise.
3544 (cmd_qtdv): Likewise.
3545 (cmd_qtstatus): Likewise.
3546 (response_source): Likewise.
3547 (response_tsv): Likewise.
3548 (cmd_qtnotes): Likewise.
3549 (gdb_collect): Likewise.
3550 (initialize_tracepoint): Likewise.
3551
afbe19f8
PL
35522015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3553
3554 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3555 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3556 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3557 <NOP>: New.
3558 (enum aarch64_condition_codes): New enum.
3559 (w0): New static global.
3560 (fp): Likewise.
3561 (lr): Likewise.
3562 (struct aarch64_memory_operand) <type>: New
3563 MEMORY_OPERAND_POSTINDEX type.
3564 (postindex_memory_operand): New helper function.
3565 (emit_ret): New function.
3566 (emit_load_store_pair): New function, factored out of emit_stp
3567 with support for MEMORY_OPERAND_POSTINDEX.
3568 (emit_stp): Rewrite using emit_load_store_pair.
3569 (emit_ldp): New function.
3570 (emit_load_store): Likewise.
3571 (emit_ldr): Mention post-index instruction in comment.
3572 (emit_ldrh): New function.
3573 (emit_ldrb): New function.
3574 (emit_ldrsw): Mention post-index instruction in comment.
3575 (emit_str): Likewise.
3576 (emit_subs): New function.
3577 (emit_cmp): Likewise.
3578 (emit_and): Likewise.
3579 (emit_orr): Likewise.
3580 (emit_orn): Likewise.
3581 (emit_eor): Likewise.
3582 (emit_mvn): Likewise.
3583 (emit_lslv): Likewise.
3584 (emit_lsrv): Likewise.
3585 (emit_asrv): Likewise.
3586 (emit_mul): Likewise.
3587 (emit_sbfm): Likewise.
3588 (emit_sbfx): Likewise.
3589 (emit_ubfm): Likewise.
3590 (emit_ubfx): Likewise.
3591 (emit_csinc): Likewise.
3592 (emit_cset): Likewise.
3593 (emit_nop): Likewise.
3594 (emit_ops_insns): New helper function.
3595 (emit_pop): Likewise.
3596 (emit_push): Likewise.
3597 (aarch64_emit_prologue): New function.
3598 (aarch64_emit_epilogue): Likewise.
3599 (aarch64_emit_add): Likewise.
3600 (aarch64_emit_sub): Likewise.
3601 (aarch64_emit_mul): Likewise.
3602 (aarch64_emit_lsh): Likewise.
3603 (aarch64_emit_rsh_signed): Likewise.
3604 (aarch64_emit_rsh_unsigned): Likewise.
3605 (aarch64_emit_ext): Likewise.
3606 (aarch64_emit_log_not): Likewise.
3607 (aarch64_emit_bit_and): Likewise.
3608 (aarch64_emit_bit_or): Likewise.
3609 (aarch64_emit_bit_xor): Likewise.
3610 (aarch64_emit_bit_not): Likewise.
3611 (aarch64_emit_equal): Likewise.
3612 (aarch64_emit_less_signed): Likewise.
3613 (aarch64_emit_less_unsigned): Likewise.
3614 (aarch64_emit_ref): Likewise.
3615 (aarch64_emit_if_goto): Likewise.
3616 (aarch64_emit_goto): Likewise.
3617 (aarch64_write_goto_address): Likewise.
3618 (aarch64_emit_const): Likewise.
3619 (aarch64_emit_call): Likewise.
3620 (aarch64_emit_reg): Likewise.
3621 (aarch64_emit_pop): Likewise.
3622 (aarch64_emit_stack_flush): Likewise.
3623 (aarch64_emit_zero_ext): Likewise.
3624 (aarch64_emit_swap): Likewise.
3625 (aarch64_emit_stack_adjust): Likewise.
3626 (aarch64_emit_int_call_1): Likewise.
3627 (aarch64_emit_void_call_2): Likewise.
3628 (aarch64_emit_eq_goto): Likewise.
3629 (aarch64_emit_ne_goto): Likewise.
3630 (aarch64_emit_lt_goto): Likewise.
3631 (aarch64_emit_le_goto): Likewise.
3632 (aarch64_emit_gt_goto): Likewise.
3633 (aarch64_emit_ge_got): Likewise.
3634 (aarch64_emit_ops_impl): New static global variable.
3635 (aarch64_emit_ops): New target function, return
3636 &aarch64_emit_ops_impl.
3637 (struct linux_target_ops): Install it.
3638
bb903df0
PL
36392015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3640
3641 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3642 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3643 aarch64-ipa.o.
3644 * linux-aarch64-ipa.c: New file.
3645 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3646 and endian.h.
3647 (aarch64_get_thread_area): New target method.
3648 (extract_signed_bitfield): New helper function.
3649 (aarch64_decode_ldr_literal): New function.
3650 (enum aarch64_opcodes): New enum.
3651 (struct aarch64_register): New struct.
3652 (struct aarch64_operand): New struct.
3653 (x0): New static global.
3654 (x1): Likewise.
3655 (x2): Likewise.
3656 (x3): Likewise.
3657 (x4): Likewise.
3658 (w2): Likewise.
3659 (ip0): Likewise.
3660 (sp): Likewise.
3661 (xzr): Likewise.
3662 (aarch64_register): New helper function.
3663 (register_operand): Likewise.
3664 (immediate_operand): Likewise.
3665 (struct aarch64_memory_operand): New struct.
3666 (offset_memory_operand): New helper function.
3667 (preindex_memory_operand): Likewise.
3668 (enum aarch64_system_control_registers): New enum.
3669 (ENCODE): New macro.
3670 (emit_insn): New helper function.
3671 (emit_b): New function.
3672 (emit_bcond): Likewise.
3673 (emit_cb): Likewise.
3674 (emit_tb): Likewise.
3675 (emit_blr): Likewise.
3676 (emit_stp): Likewise.
3677 (emit_ldp_q_offset): Likewise.
3678 (emit_stp_q_offset): Likewise.
3679 (emit_load_store): Likewise.
3680 (emit_ldr): Likewise.
3681 (emit_ldrsw): Likewise.
3682 (emit_str): Likewise.
3683 (emit_ldaxr): Likewise.
3684 (emit_stxr): Likewise.
3685 (emit_stlr): Likewise.
3686 (emit_data_processing_reg): Likewise.
3687 (emit_data_processing): Likewise.
3688 (emit_add): Likewise.
3689 (emit_sub): Likewise.
3690 (emit_mov): Likewise.
3691 (emit_movk): Likewise.
3692 (emit_mov_addr): Likewise.
3693 (emit_mrs): Likewise.
3694 (emit_msr): Likewise.
3695 (emit_sevl): Likewise.
3696 (emit_wfe): Likewise.
3697 (append_insns): Likewise.
3698 (can_encode_int32_in): New helper function.
3699 (aarch64_relocate_instruction): New function.
3700 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3701 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3702 (struct linux_target_ops): Install aarch64_get_thread_area,
3703 aarch64_install_fast_tracepoint_jump_pad and
3704 aarch64_get_min_fast_tracepoint_insn_len.
3705
787749ea
PL
37062015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3707
3708 * Makefile.in (aarch64-insn.o): New rule.
3709 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3710
9812b2e6
YQ
37112015-09-21 Yao Qi <yao.qi@linaro.org>
3712
3713 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3714
18fe412b
YQ
37152015-09-21 Yao Qi <yao.qi@linaro.org>
3716
3717 * tracepoint.c (max_jump_pad_size): Remove.
3718
a0cc84cd
YQ
37192015-09-18 Yao Qi <yao.qi@linaro.org>
3720
3721 * linux-aarch64-low.c: Don't include sys/uio.h.
3722 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3723
d78908cf
WW
37242015-09-16 Wei-cheng Wang <cole945@gmail.com>
3725
3726 * tracepoint.c (eval_result_type): Change prototype.
3727 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3728
d57e0d50
PA
37292015-09-15 Pedro Alves <palves@redhat.com>
3730
3731 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3732 Check whether to report exec events instead of checking whether
3733 multiprocess is enabled.
3734
5a676acc
PA
37352015-09-15 Pedro Alves <palves@redhat.com>
3736
3737 PR remote/18965
3738 * remote-utils.c (prepare_resume_reply): Merge
3739 TARGET_WAITKIND_VFORK_DONE switch case with the
3740 TARGET_WAITKIND_FORKED case.
3741
7c5d0fad
YQ
37422015-09-15 Yao Qi <yao.qi@linaro.org>
3743
3744 * server.c (handle_query): Check string comparison using
3745 "else if" instead of "if".
3746
750ce8d1
YQ
37472015-09-15 Yao Qi <yao.qi@linaro.org>
3748
3749 * server.c (vCont_supported): New global variable.
3750 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3751 matches. Append ";vContSupported+" to own_buf.
3752 (handle_v_requests): Append ";s;S" to own_buf if target supports
3753 hardware single step or vCont_supported is false.
3754 (capture_main): Set vCont_supported to zero.
3755
70b90b91
YQ
37562015-09-15 Yao Qi <yao.qi@linaro.org>
3757
3758 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3759 it to ...
3760 (linux_supports_hardware_single_step): ... New function.
3761 (linux_target_ops): Update.
3762 * lynx-low.c (lynx_target_ops): Set field
3763 supports_hardware_single_step to target_can_do_hardware_single_step.
3764 * nto-low.c (nto_target_ops): Likewise.
3765 * spu-low.c (spu_target_ops): Likewise.
3766 * win32-low.c (win32_target_ops): Likewise.
3767 * target.c (target_can_do_hardware_single_step): New function.
3768 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3769 Remove. <supports_hardware_single_step>: New field.
3770 (target_supports_conditional_breakpoints): Remove.
3771 (target_supports_hardware_single_step): New macro.
3772 (target_can_do_hardware_single_step): Declare.
3773 * server.c (handle_query): Use target_supports_hardware_single_step
3774 instead of target_supports_conditional_breakpoints.
3775
ade90bde
YQ
37762015-09-15 Yao Qi <yao.qi@linaro.org>
3777
3778 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3779 function.
3780 (struct linux_target_ops the_low_target): Install
3781 aarch64_linux_siginfo_fixup.
3782
94585166
DB
37832015-09-11 Don Breazeal <donb@codesourcery.com>
3784 Luis Machado <lgustavo@codesourcery.com>
3785
3786 * linux-low.c (linux_mourn): Static declaration.
3787 (linux_arch_setup): Move in front of
3788 handle_extended_wait.
3789 (linux_arch_setup_thread): New function.
3790 (handle_extended_wait): Handle exec events. Call
3791 linux_arch_setup_thread. Make event_lwp argument a
3792 pointer-to-a-pointer.
3793 (check_zombie_leaders): Do not check stopped threads.
3794 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3795 (linux_low_filter_event): Add lwp and thread for exec'ing
3796 non-leader thread if leader thread has been deleted.
3797 Refactor code into linux_arch_setup_thread and call it.
3798 Pass child lwp pointer by reference to handle_extended_wait.
3799 (linux_wait_for_event_filtered): Update comment.
3800 (linux_wait_1): Prevent clobbering exec event status.
3801 (linux_supports_exec_events): New function.
3802 (linux_target_ops) <supports_exec_events>: Initialize new member.
3803 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3804 new member.
3805 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3806 * server.c (report_exec_events): New global variable.
3807 (handle_query): Handle qSupported query for exec-events feature.
3808 (captured_main): Initialize report_exec_events.
3809 * server.h (report_exec_events): Declare new global variable.
3810 * target.h (struct target_ops) <supports_exec_events>: New
3811 member.
3812 (target_supports_exec_events): New macro.
3813 * win32-low.c (win32_target_ops) <supports_exec_events>:
3814 Initialize new member.
3815
0568462b
MM
38162015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3817
3818 * linux-low.c (linux_low_enable_btrace): Remove.
3819 (linux_target_ops): Replace linux_low_enable_btrace with
3820 linux_enable_btrace.
3821
39edd165
YQ
38222015-09-03 Yao Qi <yao.qi@linaro.org>
3823
3824 * linux-aarch64-low.c (aarch64_insert_point): Call
3825 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3826 returns true.
3827
1db33b5a
UW
38282015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3829
3830 * linux-low.c (check_stopped_by_breakpoint): Use
3831 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3832
ab290430
PA
38332015-08-27 Pedro Alves <palves@redhat.com>
3834
3835 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3836
8d749320
SM
38372015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3838
6711b7f8
SM
3839 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3840 the XNEW-family equivalent.
8d749320
SM
3841 (compile_bytecodes): Likewise.
3842 * dll.c (loaded_dll): Likewise.
3843 * event-loop.c (append_callback_event): Likewise.
3844 (create_file_handler): Likewise.
3845 (create_file_event): Likewise.
3846 * hostio.c (handle_open): Likewise.
3847 * inferiors.c (add_thread): Likewise.
3848 (add_process): Likewise.
3849 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3850 * linux-arm-low.c (arm_new_process): Likewise.
3851 (arm_new_thread): Likewise.
3852 * linux-low.c (add_to_pid_list): Likewise.
3853 (linux_add_process): Likewise.
3854 (handle_extended_wait): Likewise.
3855 (add_lwp): Likewise.
3856 (enqueue_one_deferred_signal): Likewise.
3857 (enqueue_pending_signal): Likewise.
3858 (linux_resume_one_lwp_throw): Likewise.
3859 (linux_resume_one_thread): Likewise.
3860 (linux_read_memory): Likewise.
3861 (linux_write_memory): Likewise.
3862 * linux-mips-low.c (mips_linux_new_process): Likewise.
3863 (mips_linux_new_thread): Likewise.
3864 (mips_add_watchpoint): Likewise.
3865 * linux-x86-low.c (initialize_low_arch): Likewise.
3866 * lynx-low.c (lynx_add_process): Likewise.
3867 * mem-break.c (set_raw_breakpoint_at): Likewise.
3868 (set_breakpoint): Likewise.
3869 (add_condition_to_breakpoint): Likewise.
3870 (add_commands_to_breakpoint): Likewise.
3871 (clone_agent_expr): Likewise.
3872 (clone_one_breakpoint): Likewise.
3873 * regcache.c (new_register_cache): Likewise.
3874 * remote-utils.c (look_up_one_symbol): Likewise.
3875 * server.c (queue_stop_reply): Likewise.
3876 (start_inferior): Likewise.
3877 (queue_stop_reply_callback): Likewise.
3878 (handle_target_event): Likewise.
3879 * spu-low.c (fetch_ppc_memory): Likewise.
3880 (store_ppc_memory): Likewise.
3881 * target.c (set_target_ops): Likewise.
3882 * thread-db.c (thread_db_load_search): Likewise.
3883 (try_thread_db_load_1): Likewise.
3884 * tracepoint.c (add_tracepoint): Likewise.
3885 (add_tracepoint_action): Likewise.
3886 (create_trace_state_variable): Likewise.
3887 (cmd_qtdpsrc): Likewise.
3888 (cmd_qtro): Likewise.
3889 (add_while_stepping_state): Likewise.
3890 * win32-low.c (child_add_thread): Likewise.
3891 (get_image_name): Likewise.
3892
ed8b7b42
YQ
38932015-08-25 Yao Qi <yao.qi@linaro.org>
3894
3895 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3896
db3cb7cb
YQ
38972015-08-25 Yao Qi <yao.qi@linaro.org>
3898
3899 * Makefile.in (aarch64-linux.o): New rule.
3900 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3901 srv_tgtobj.
3902 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3903 (aarch64_init_debug_reg_state): Make it extern.
3904 (aarch64_linux_prepare_to_resume): Remove.
3905
f6011a1c
YQ
39062015-08-25 Yao Qi <yao.qi@linaro.org>
3907
3908 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3909 lwp_arch_private_info and ptid_of_lwp.
3910
88e2cf7e
YQ
39112015-08-25 Yao Qi <yao.qi@linaro.org>
3912
3913 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3914 Find proc_info by find_process_pid. All callers updated.
3915
5e35436e
YQ
39162015-08-25 Yao Qi <yao.qi@linaro.org>
3917
3918 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3919 Remove.
3920 (debug_reg_change_callback): Remove.
3921 (aarch64_notify_debug_reg_change): Remove.
3922
4a8a7965
YQ
39232015-08-25 Yao Qi <yao.qi@linaro.org>
3924
3925 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3926 Call current_lwp_ptid.
3927
32a271ee
YQ
39282015-08-25 Yao Qi <yao.qi@linaro.org>
3929
3930 * linux-aarch64-low.c (debug_reg_change_callback): Use
3931 debug_printf.
3932
0d51c8d7
YQ
39332015-08-25 Yao Qi <yao.qi@linaro.org>
3934
3935 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3936
31a43dd5
YQ
39372015-08-25 Yao Qi <yao.qi@linaro.org>
3938
3939 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3940
8ee52567
YQ
39412015-08-25 Yao Qi <yao.qi@linaro.org>
3942
3943 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3944 the code.
3945
ff3f0f45
YQ
39462015-08-25 Yao Qi <yao.qi@linaro.org>
3947
3948 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3949 Remove.
3950 (debug_reg_change_callback): Remove argument entry and add argument
3951 lwp. Remove local variable thread. Don't print thread id in the
3952 debugging output. Don't check whether pid of thread equals to pid.
3953 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3954 iterate_over_lwps instead find_inferior.
3955
3d40fbb5
PA
39562015-08-24 Pedro Alves <palves@redhat.com>
3957
3958 * inferiors.c (get_first_process): New function.
3959 * inferiors.h (get_first_process): New declaration.
3960 * remote-utils.c (read_ptid): Default to the first process in the
3961 list, instead of to the current thread's process.
3962
438e1e42
PA
39632015-08-24 Pedro Alves <palves@redhat.com>
3964
3965 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3966 * event-loop.c: Likewise.
3967 * remote-utils.c: Likewise.
3968 * tracepoint.c: Likewise.
3969
a8c6d4fc
PA
39702015-08-24 Pedro Alves <palves@redhat.com>
3971
3972 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3973 ptid_get_lwp.
3974
99b0bb12
PA
39752015-08-21 Pedro Alves <palves@redhat.com>
3976
3977 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3978 instead of literal 1.
3979
f8904751
PA
39802015-08-21 Pedro Alves <palves@redhat.com>
3981
3982 * tdesc.c (default_description): Explicitly zero-initialize.
3983
465a859e
PA
39842015-08-21 Pedro Alves <palves@redhat.com>
3985
3986 PR gdb/18749
3987 * inferiors.c (remove_thread): Discard any pending stop reply for
3988 this thread.
3989 * server.c (remove_all_on_match_pid): Rename to ...
3990 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3991 instead of a pid.
3992 (discard_queued_stop_replies): Change parameter to a ptid. Now
3993 extern.
3994 (handle_v_kill, kill_inferior_callback, captured_main)
3995 (process_serial_event): Adjust.
3996 * server.h (discard_queued_stop_replies): Declare.
3997
f0db101d
PA
39982015-08-21 Pedro Alves <palves@redhat.com>
3999
4000 * linux-low.c (wait_for_sigstop): Always switch to no thread
4001 selected if the previously current thread dies.
4002 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4003 process instead of the current thread's.
4004 * remote-utils.c (input_interrupt): Don't check if there's no
4005 current thread.
4006 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4007 current thread to the general thread fails, error out.
4008 (handle_qxfer_auxv, handle_qxfer_libraries)
4009 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4010 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4011 (handle_query): Check if there's a thread selected instead of
4012 checking whether there's any thread in the thread list.
4013 (handle_qxfer_threads, handle_qxfer_btrace)
4014 (handle_qxfer_btrace_conf): Don't error out early if there's no
4015 thread in the thread list.
4016 (handle_v_cont, myresume): Don't set the current thread to the
4017 continue thread.
4018 (process_serial_event) <Hg handling>: Also set thread_id if the
4019 previous general thread is still alive.
4020 (process_serial_event) <g/G handling>: If setting the current
4021 thread to the general thread fails, error out.
4022 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4023 thread's lwp instead of the current thread's.
4024 * target.c (set_desired_thread): If the desired thread was not
4025 found, leave the current thread pointing to NULL. Return an int
4026 (boolean) indicating success.
4027 * target.h (set_desired_thread): Change return type to int.
4028
40045d91
MF
40292015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4030
4031 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4032 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4033 #includes.
4034 (ps_get_thread_area): New function.
4035
45face3b
GB
40362015-08-19 Gary Benson <gbenson@redhat.com>
4037
4038 * hostio.c (handle_pread): Do not attempt to read more data
4039 than hostio_reply_with_data can fit in a packet.
4040
16d5f642
JB
40412015-08-18 Joel Brobecker <brobecker@adacore.com>
4042
4043 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4044
a738da3a
MF
40452015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4046
4047 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4048
33ebda9d
PA
40492015-08-06 Pedro Alves <palves@redhat.com>
4050
4051 * tracepoint.c (expr_eval_result): Now an int.
4052
a44892be
PA
40532015-08-06 Pedro Alves <palves@redhat.com>
4054
4055 * gdbthread.h (struct regcache): Forward declare.
4056 (struct thread_info) <regcache_data>: Now a struct regcache
4057 pointer.
4058 * inferiors.c (inferior_regcache_data)
4059 (set_inferior_regcache_data): Now work with struct regcache
4060 pointers.
4061 * inferiors.h (struct regcache): Forward declare.
4062 (inferior_regcache_data, set_inferior_regcache_data): Now work
4063 with struct regcache pointers.
4064 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4065 (free_register_cache_thread): Remove struct regcache pointer
4066 casts.
4067
608a1e46
PA
40682015-08-06 Pedro Alves <palves@redhat.com>
4069
4070 * server.c (captured_main): On error, print the exception message
4071 to stderr, and if run_once is set, throw a quit.
4072
f0ce0d3a
PA
40732015-08-06 Pedro Alves <palves@redhat.com>
4074
4075 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4076 the current thread.
4077
bf47e248
PA
40782015-08-06 Pedro Alves <palves@redhat.com>
4079
4080 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4081 reading beyond the passed in buffer length.
4082
b6b9ffcc
PL
40832015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4084
4085 * tracepoint.c (symbol_list) <required>: Remove.
4086
863d01bd
PA
40872015-08-06 Pedro Alves <palves@redhat.com>
4088
4089 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4090 count if stopping and suspending threads.
4091 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4092 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4093 (linux_detach): Complete an ongoing step-over.
4094 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4095 throughout.
4096 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4097 (linux_wait_1): If passing a signal to the inferior after
4098 finishing a step-over, unsuspend and re-resume all lwps. If we
4099 see a single-step event but the thread should be continuing, don't
4100 pass the trap to gdb.
4101 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4102 internal_error instead of gdb_assert.
4103 (enqueue_pending_signal): New function.
4104 (check_ptrace_stopped_lwp_gone): Add debug output.
4105 (start_step_over): Use internal_error instead of gdb_assert.
4106 (complete_ongoing_step_over): New function.
4107 (linux_resume_one_thread): Don't resume a suspended thread.
4108 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4109 it stepping.
4110
00db26fa
PA
41112015-08-06 Pedro Alves <palves@redhat.com>
4112
4113 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4114 (linux_thread_alive): Use lwp_is_marked_dead.
4115 (extended_event_reported): Delete.
4116 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4117 instead of extended_event_reported.
4118 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4119 as well.
4120 (lwp_is_marked_dead): New function.
4121 (lwp_running): Use lwp_is_marked_dead.
4122 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4123 comment.
4124
ad071a30
PA
41252015-08-06 Pedro Alves <palves@redhat.com>
4126
4127 * linux-low.c (linux_wait_1): Move fork event output out of the
4128 !report_to_gdb check. Pass event_child->waitstatus to
4129 target_waitstatus_to_string instead of ourstatus.
4130
524b57e6
YQ
41312015-08-04 Yao Qi <yao.qi@linaro.org>
4132
4133 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4134 if current_thread is 32 bit.
4135
6085d6f6
YQ
41362015-08-04 Yao Qi <yao.qi@linaro.org>
4137
4138 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4139 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4140 * server.c (extended_protocol): Remove "static".
4141 * server.h (extended_protocol): Declare it.
4142
8a7e4587
YQ
41432015-08-04 Yao Qi <yao.qi@linaro.org>
4144
4145 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4146 both aarch64 and aarch32.
4147 (aarch64_set_pc): Likewise.
4148
3b53ae99
YQ
41492015-08-04 Yao Qi <yao.qi@linaro.org>
4150
4151 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4152 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4153 arm-with-neon.xml to srv_xmlfiles.
4154 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4155 (is_64bit_tdesc): New function.
4156 (aarch64_linux_read_description): New function.
4157 (aarch64_arch_setup): Call aarch64_linux_read_description.
4158 (regs_info): Rename to regs_info_aarch64.
4159 (aarch64_regs_info): Return right regs_info.
4160 (initialize_low_arch): Call initialize_low_arch_aarch32.
4161
bd9e6534
YQ
41622015-08-04 Yao Qi <yao.qi@linaro.org>
4163
4164 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4165 * linux-aarch32-low.c: New file.
4166 * linux-aarch32-low.h: New file.
4167 * linux-arm-low.c (arm_fill_gregset): Move it to
4168 linux-aarch32-low.c.
4169 (arm_store_gregset): Likewise.
4170 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4171 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4172 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4173 (regs_info): Rename to regs_info_arm.
4174 (arm_regs_info): Return regs_info_aarch32 if
4175 have_ptrace_getregset is 1 and target description is
4176 arm_with_neon or arm_with_vfpv3.
4177 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4178 Call initialize_low_arch_aarch32 instead.
4179
ded48a5e
YQ
41802015-08-04 Yao Qi <yao.qi@linaro.org>
4181
4182 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4183 * linux-low.c: ... here.
4184 * linux-low.h (have_ptrace_getregset): Declare it.
4185
96e9210f
PA
41862015-08-04 Pedro Alves <palves@redhat.com>
4187
4188 * thread-db.c (struct thread_db): Use new typedefs.
4189 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4190 CHK calls.
4191 (disable_thread_event_reporting): Cast result of dlsym to
4192 destination function pointer type.
4193 (thread_db_mourn): Use td_ta_delete_ftype.
4194
af60a1ef
SL
41952015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4196
4197 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4198 arch variant.
4199 (CDX_BREAKPOINT): Define for R2.
4200 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4201 (the_low_target): Add comments.
4202
e8b41681
YQ
42032015-07-30 Yao Qi <yao.qi@linaro.org>
4204
4205 * linux-arm-low.c (arm_hwcap): Remove it.
4206 (arm_read_description): New local variable arm_hwcap. Don't
4207 set arm_hwcap to zero.
4208
89abb039
YQ
42092015-07-30 Yao Qi <yao.qi@linaro.org>
4210
4211 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4212 Use regcache->tdesc instead.
4213 (arm_store_wmmxregset): Likewise.
4214 (arm_fill_vfpregset): Likewise.
4215 (arm_store_vfpregset): Likewise.
4216
deca266c
YQ
42172015-07-30 Yao Qi <yao.qi@linaro.org>
4218
4219 * linux-arm-low.c: Include arch/arm.h.
4220 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4221 (arm_store_gregset): Likewise.
4222
aa58a496
SM
42232015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4224
4225 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4226 ptrace's 4th parameter.
4227
50904b25
YQ
42282015-07-27 Yao Qi <yao.qi@linaro.org>
4229
4230 * configure.srv (case aarch64*-*-linux*): Don't set
4231 srv_linux_usrregs.
4232
5826e159
PA
42332015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4234
4235 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4236 sys/ptrace.h.
4237 * linux-arm-low.c: Likewise.
4238 * linux-cris-low.c: Likewise.
4239 * linux-crisv32-low.c: Likewise.
4240 * linux-low.c: Likewise.
4241 * linux-m68k-low.c: Likewise.
4242 * linux-mips-low.c: Likewise.
4243 * linux-nios2-low.c: Likewise.
4244 * linux-s390-low.c: Likewise.
4245 * linux-sparc-low.c: Likewise.
4246 * linux-tic6x-low.c: Likewise.
4247 * linux-tile-low.c: Likewise.
4248 * linux-x86-low.c: Likewise.
4249
54019719
PA
42502015-07-24 Pedro Alves <palves@redhat.com>
4251
4252 * config.in: Regenerate.
4253 * configure: Regenerate.
4254
eb7aa561
PA
42552015-07-24 Pedro Alves <palves@redhat.com>
4256
4257 * acinclude.m4: Include ../ptrace.m4.
4258 * configure.ac: Call GDB_AC_PTRACE.
4259 * config.in, configure: Regenerate.
4260
55d7b841
YQ
42612015-07-24 Yao Qi <yao.qi@linaro.org>
4262
4263 * linux-low.c (linux_create_inferior): Remove setting to
4264 proc->priv->new_inferior.
4265 (linux_attach): Likewise.
4266 (linux_low_filter_event): Likewise.
4267 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4268
c06cbd92
YQ
42692015-07-24 Yao Qi <yao.qi@linaro.org>
4270
4271 * linux-low.c (linux_arch_setup): New function.
4272 (linux_low_filter_event): If proc->tdesc is NULL and
4273 proc->attached is true, call the_low_target.arch_setup.
4274 Otherwise, keep status pending, and return.
4275 (linux_resume_one_lwp_throw): Don't call get_pc if
4276 thread->while_stepping isn't NULL. Don't call
4277 get_thread_regcache if proc->tdesc is NULL.
4278 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4279 (linux_target_ops): Install arch_setup.
4280 * server.c (start_inferior): Call the_target->arch_setup.
4281 * target.h (struct target_ops) <arch_setup>: New field.
4282 (target_arch_setup): New marco.
4283 * lynx-low.c (lynx_target_ops): Update.
4284 * nto-low.c (nto_target_ops): Update.
4285 * spu-low.c (spu_target_ops): Update.
4286 * win32-low.c (win32_target_ops): Update.
4287
5ae3ebba
YQ
42882015-07-24 Yao Qi <yao.qi@linaro.org>
4289
4290 * linux-low.c (linux_add_process): Don't set
4291 proc->priv->new_inferior.
4292 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4293 (linux_attach): Likewise.
4294
eb97750b
YQ
42952015-07-24 Yao Qi <yao.qi@linaro.org>
4296
4297 * server.c (start_inferior): Code refactor.
4298
51aee833
YQ
42992015-07-24 Yao Qi <yao.qi@linaro.org>
4300
4301 * server.c (process_serial_event): Set general_thread.
4302
af1b22f3
YQ
43032015-07-21 Yao Qi <yao.qi@linaro.org>
4304
4305 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4306 aarch64_linux_get_debug_reg_capacity.
4307
554717a3
YQ
43082015-07-17 Yao Qi <yao.qi@linaro.org>
4309
4310 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4311 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4312 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4313 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4314 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4315 (AARCH64_HWP_ALIGNMENT): Likewise.
4316 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4317 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4318 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4319 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4320 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4321 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4322 (struct aarch64_debug_reg_state): Likewise.
4323 (struct arch_lwp_info): Likewise.
4324 (aarch64_align_watchpoint): Likewise.
4325 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4326 (aarch64_watchpoint_length): Likewise.
4327 (aarch64_point_encode_ctrl_reg): Likewise
4328 (aarch64_point_is_aligned): Likewise.
4329 (aarch64_align_watchpoint): Likewise.
4330 (aarch64_linux_set_debug_regs):
4331 (aarch64_dr_state_insert_one_point): Likewise.
4332 (aarch64_dr_state_remove_one_point): Likewise.
4333 (aarch64_handle_breakpoint): Likewise.
4334 (aarch64_handle_aligned_watchpoint): Likewise.
4335 (aarch64_handle_unaligned_watchpoint): Likewise.
4336 (aarch64_handle_watchpoint): Likewise.
4337
c67ca4de
YQ
43382015-07-17 Yao Qi <yao.qi@linaro.org>
4339
4340 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4341 and don't aarch64_get_debug_reg_state. All callers update.
4342 (aarch64_handle_aligned_watchpoint): Likewise.
4343 (aarch64_handle_unaligned_watchpoint): Likewise.
4344 (aarch64_handle_watchpoint): Likewise.
4345 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4346 (aarch64_remove_point): Likewise.
4347
25abf979
YQ
43482015-07-17 Yao Qi <yao.qi@linaro.org>
4349
4350 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4351 debug_printf.
4352 (aarch64_handle_unaligned_watchpoint): Likewise.
4353
db1ff28b
JK
43542015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4355
4356 Revert the previous 3 commits:
4357 Move gdb_regex* to common/
4358 Move linux_find_memory_regions_full & co.
4359 gdbserver build-id attribute generator
4360
700ca40f
JK
43612015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4362 Jan Kratochvil <jan.kratochvil@redhat.com>
4363
4364 gdbserver build-id attribute generator.
4365 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4366 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4367 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4368 (find_phdr): New.
4369 (get_dynamic): Use find_pdhr to traverse program headers.
4370 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4371 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4372 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4373 (get_hex_build_id): New.
4374 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4375 to reply XML document.
4376
9904185c
JK
43772015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4378 Jan Kratochvil <jan.kratochvil@redhat.com>
4379
4380 * target.c: Include target/target-utils.h and fcntl.h.
4381 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4382 (target_fileio_read_stralloc): New functions.
4383
6e5b4429
JK
43842015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4385
4386 * Makefile.in (OBS): Add gdb_regex.o.
4387 (gdb_regex.o): New.
4388 * config.in: Rebuilt.
4389 * configure: Rebuilt.
4390
ddc98fbf
JK
43912015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4392 Jan Kratochvil <jan.kratochvil@redhat.com>
4393
4394 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4395 * Makefile.in (OBS): Add target-utils.o.
4396 (linux-maps.o, target-utils.o): New.
4397 * configure.srv (srv_linux_obj): Add linux-maps.o.
4398
e57bb7a0
PL
43992015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4400
4401 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4402 function, return 1.
4403 (the_low_target): Install it.
4404
586b02a9
PA
44052015-07-14 Pedro Alves <palves@redhat.com>
4406
4407 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4408 Instead, ignore ECHILD, and throw an error for other errnos.
4409
58c1b36c
PA
44102015-07-10 Pedro Alves <palves@redhat.com>
4411
4412 * event-loop.c (struct callback_event) <data>: Change type to
4413 gdb_client_data instance instead of gdb_client_data pointer.
4414 (append_callback_event): Adjust.
4415
421530db
PL
44162015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4417
4418 * linux-aarch64-low.c: Add comments for each linux_target_ops
4419 method. Remove comments already covered in target_ops and
4420 linux_target_ops definitions.
4421 (the_low_target): Add comments for each unimplemented method.
4422
c2d65f38
YQ
44232015-07-09 Yao Qi <yao.qi@linaro.org>
4424
4425 * linux-aarch64-low.c (aarch64_regmap): Remove.
4426 (aarch64_usrregs_info): Remove.
4427 (regs_info): Set field usrregs to NULL.
4428
b20a6524
MM
44292015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4430
4431 * linux-low.c: Include "rsp-low.h"
4432 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4433 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4434 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4435 (handle_btrace_enable_pt): New.
4436 (handle_btrace_general_set): Support "pt".
4437 (handle_btrace_conf_general_set): Support "pt:size".
4438
96c97461
PL
44392015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4440
4441 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4442 Z_PACKET_SW_BP.
4443
37d66942
PL
44442015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4445
4446 * linux-aarch64-low.c: Remove comment about endianness.
4447 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4448 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4449 memcmp.
4450
dc06243f
GB
44512015-06-24 Gary Benson <gbenson@redhat.com>
4452
4453 * linux-i386-ipa.c (stdint.h): Do not include.
4454 * lynx-i386-low.c (stdint.h): Likewise.
4455 * lynx-ppc-low.c (stdint.h): Likewise.
4456 * mem-break.c (stdint.h): Likewise.
4457 * thread-db.c (stdint.h): Likewise.
4458 * tracepoint.c (stdint.h): Likewise.
4459 * win32-low.c (stdint.h): Likewise.
4460
124e13d9
SM
44612015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4462
4463 * server.c (write_qxfer_response): Update call to
4464 remote_escape_output.
4465
909c2cda
JK
44662015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4467 Jan Kratochvil <jan.kratochvil@redhat.com>
4468
4469 Merge multiple hex conversions.
4470 * gdbreplay.c (tohex): Rename to 'fromhex'.
4471 (logchar): Use fromhex.
4472
24c05f46
JK
44732015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4474
4475 * server.c (handle_qxfer_libraries): Set `version' attribute for
4476 <library-list>.
4477
14d2069a
GB
44782015-06-10 Gary Benson <gbenson@redhat.com>
4479
4480 * target.h (struct target_ops) <multifs_open>: New field.
4481 <multifs_unlink>: Likewise.
4482 <multifs_readlink>: Likewise.
4483 * linux-low.c (nat/linux-namespaces.h): New include.
4484 (linux_target_ops): Initialize the_target->multifs_open,
4485 the_target->multifs_unlink and the_target->multifs_readlink.
4486 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4487 * hostio.c (hostio_fs_pid): New static variable.
4488 (hostio_handle_new_gdb_connection): New function.
4489 (handle_setfs): Likewise.
4490 (handle_open): Use the_target->multifs_open as appropriate.
4491 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4492 (handle_readlink): Use the_target->multifs_readlink as
4493 appropriate.
4494 (handle_vFile): Handle vFile:setfs packets.
4495 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4496 after target_handle_new_gdb_connection.
4497
4b8b5e72
GB
44982015-06-10 Gary Benson <gbenson@redhat.com>
4499
4500 * configure.ac (AC_CHECK_FUNCS): Add setns.
4501 * config.in: Regenerate.
4502 * configure: Likewise.
4503 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4504 (linux-namespaces.o): New rule.
4505 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4506
3ac2e371
GB
45072015-06-09 Gary Benson <gbenson@redhat.com>
4508
4509 * hostio.c (handle_open): Process mode argument with
4510 fileio_to_host_mode.
4511
ca9b78ce
YQ
45122015-06-01 Yao Qi <yao.qi@linaro.org>
4513
4514 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4515 * linux-x86-low.c: Likewise.
4516
bfacd19d
DB
45172015-05-28 Don Breazeal <donb@codesourcery.com>
4518
4519 * linux-low.c (handle_extended_wait): Initialize
4520 thread_info.last_resume_kind for new fork children.
4521
452003ef
PA
45222015-05-15 Pedro Alves <palves@redhat.com>
4523
4524 * target.h (target_handle_new_gdb_connection): Rewrite using if
4525 wrapped in do/while.
4526
1041a03c
JB
45272015-05-14 Joel Brobecker <brobecker@adacore.com>
4528
4529 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4530 * configure, config.in: Regenerate.
4531 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4532 Declare typedef.
4533
c269dbdb
DB
45342015-05-12 Don Breazeal <donb@codesourcery.com>
4535
4536 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4537 PTRACE_EVENT_VFORK_DONE.
4538 (linux_low_ptrace_options, extended_event_reported): Add vfork
4539 events.
4540 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4541 and "vforkdone" for RSP 'T' Stop Reply Packet.
4542 * server.h (report_vfork_events): Declare
4543 global variable.
4544
3a8a0396
DB
45452015-05-12 Don Breazeal <donb@codesourcery.com>
4546
4547 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4548 (the_low_target) <new_fork>: Initialize new member.
4549 * linux-arm-low.c (arm_new_fork): New function.
4550 (the_low_target) <new_fork>: Initialize new member.
4551 * linux-low.c (handle_extended_wait): Call new target function
4552 new_fork.
4553 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4554 * linux-mips-low.c (mips_add_watchpoint): New function
4555 extracted from mips_insert_point.
4556 (the_low_target) <new_fork>: Initialize new member.
4557 (mips_linux_new_fork): New function.
4558 (mips_insert_point): Call mips_add_watchpoint.
4559 * linux-x86-low.c (x86_linux_new_fork): New function.
4560 (the_low_target) <new_fork>: Initialize new member.
4561
de0d863e
DB
45622015-05-12 Don Breazeal <donb@codesourcery.com>
4563
4564 * linux-low.c (handle_extended_wait): Implement return value,
4565 rename argument 'event_child' to 'event_lwp', handle
4566 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4567 (linux_low_ptrace_options): New function.
4568 (linux_low_filter_event): Call linux_low_ptrace_options,
4569 use different argument fo linux_enable_event_reporting,
4570 use return value from handle_extended_wait.
4571 (extended_event_reported): New function.
4572 (linux_wait_1): Call extended_event_reported and set
4573 status to report fork events.
4574 (linux_write_memory): Add pid to debug message.
4575 (reset_lwp_ptrace_options_callback): New function.
4576 (linux_handle_new_gdb_connection): New function.
4577 (linux_target_ops): Initialize new structure member.
4578 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4579 * lynx-low.c: Initialize new structure member.
4580 * remote-utils.c (prepare_resume_reply): Implement stop reason
4581 "fork" for "T" stop message.
4582 * server.c (handle_query): Call handle_new_gdb_connection.
4583 * server.h (report_fork_events): Declare global flag.
4584 * target.h (struct target_ops) <handle_new_gdb_connection>:
4585 New member.
4586 (target_handle_new_gdb_connection): New macro.
4587 * win32-low.c: Initialize new structure member.
4588
ddcbc397
DB
45892015-05-12 Don Breazeal <donb@codesourcery.com>
4590
4591 * mem-break.c (APPEND_TO_LIST): Define macro.
4592 (clone_agent_expr): New function.
4593 (clone_one_breakpoint): New function.
4594 (clone_all_breakpoints): New function.
4595 * mem-break.h: Declare new functions.
4596
89245bc0
DB
45972015-05-12 Don Breazeal <donb@codesourcery.com>
4598
4599 * linux-low.c (linux_supports_fork_events): New function.
4600 (linux_supports_vfork_events): New function.
4601 (linux_target_ops): Initialize new structure members.
4602 (initialize_low): Call linux_check_ptrace_features.
4603 * lynx-low.c (lynx_target_ops): Initialize new structure
4604 members.
4605 * server.c (report_fork_events, report_vfork_events):
4606 New global flags.
4607 (handle_query): Add new features to qSupported packet and
4608 response.
4609 (captured_main): Initialize new global variables.
4610 * target.h (struct target_ops) <supports_fork_events>:
4611 New member.
4612 <supports_vfork_events>: New member.
4613 (target_supports_fork_events): New macro.
4614 (target_supports_vfork_events): New macro.
4615 * win32-low.c (win32_target_ops): Initialize new structure
4616 members.
4617
835205d0
GB
46182015-05-12 Gary Benson <gbenson@redhat.com>
4619
4620 * server.c (handle_qxfer_exec_file): Use current process
4621 if annex is empty.
4622
21e94bd9
SL
46232015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4624
4625 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4626 Remove HAVE_PTRACE_GETREGS conditionals.
4627 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4628 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4629
45614f15
YQ
46302015-05-08 Yao Qi <yao.qi@linaro.org>
4631
4632 * linux-low.c (linux_supports_conditional_breakpoints): New
4633 function.
4634 (linux_target_ops): Install new target method.
4635 * lynx-low.c (lynx_target_ops): Install NULL hook for
4636 supports_conditional_breakpoints.
4637 * nto-low.c (nto_target_ops): Likewise.
4638 * spu-low.c (spu_target_ops): Likewise.
4639 * win32-low.c (win32_target_ops): Likewise.
4640 * server.c (handle_query): Check
4641 target_supports_conditional_breakpoints.
4642 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4643 New field.
4644 (target_supports_conditional_breakpoints): New macro.
4645
80ad801e
PA
46462015-05-06 Pedro Alves <palves@redhat.com>
4647
4648 PR server/18081
4649 * server.c (start_inferior): If the process exits, mourn it.
4650
819843c7
GB
46512015-04-21 Gary Benson <gbenson@redhat.com>
4652
4653 * hostio.c (fileio_open_flags_to_host): Factored out to
4654 fileio_to_host_openflags in common/fileio.c. Single use
4655 updated.
4656
a2d5a9d7
MF
46572015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4658
4659 * linux-xtensa-low.c (xtensa_fill_gregset)
4660 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4661 XCHAL_HAVE_LOOP.
4662
deb44829
MF
46632015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4664
4665 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4666 (regs_info): Replace usrregs pointer with NULL.
4667
e57f1de3
GB
46682015-04-17 Gary Benson <gbenson@redhat.com>
4669
4670 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4671 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4672 * server.c (handle_qxfer_exec_file): New function.
4673 (qxfer_packets): Add exec-file entry.
4674 (handle_query): Report qXfer:exec-file:read as supported packet.
4675
62828379
RN
46762015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4677
4678 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4679
b88bb450
GB
46802015-04-09 Gary Benson <gbenson@redhat.com>
4681
4682 * hostio-errno.c (errno_to_fileio_error): Remove function.
4683 Update caller to use remote_fileio_to_fio_error.
4684
c8f4bfdd
YQ
46852015-04-09 Yao Qi <yao.qi@linaro.org>
4686
4687 * linux-low.c (linux_insert_point): Call
4688 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4689 (linux_remove_point): Call remove_memory_breakpoint if type is
4690 raw_bkpt_type_sw.
4691 * linux-x86-low.c (x86_insert_point): Don't call
4692 insert_memory_breakpoint.
4693 (x86_remove_point): Don't call remove_memory_breakpoint.
4694
41f98f02
PA
46952015-04-01 Pedro Alves <palves@redhat.com>
4696 Cleber Rosa <crosa@redhat.com>
4697
4698 * server.c (gdbserver_usage): Reorganize and extend the usage
4699 message.
4700
2bf6fb9d
PA
47012015-03-24 Pedro Alves <palves@redhat.com>
4702
4703 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4704 output. Also dump TRAP_TRACE.
4705 (linux_low_filter_event): In debug output, distinguish a
4706 resume_stop SIGSTOP from a delayed SIGSTOP.
4707
369f6daa
GB
47082015-03-24 Gary Benson <gbenson@redhat.com>
4709
4710 * linux-x86-low.c (x86_linux_new_thread): Moved to
4711 nat/x86-linux.c.
4712 (x86_linux_prepare_to_resume): Likewise.
4713
8e5d4070
GB
47142015-03-24 Gary Benson <gbenson@redhat.com>
4715
4716 * Makefile.in (x86-linux-dregs.o): New rule.
4717 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4718 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4719 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4720 (x86_linux_dr_get): Likewise.
4721 (x86_linux_dr_set): Likewise.
4722 (update_debug_registers_callback): Likewise.
4723 (x86_linux_dr_set_addr): Likewise.
4724 (x86_linux_dr_get_addr): Likewise.
4725 (x86_linux_dr_set_control): Likewise.
4726 (x86_linux_dr_get_control): Likewise.
4727 (x86_linux_dr_get_status): Likewise.
4728 (x86_linux_update_debug_registers): Likewise.
4729
2b95d440
GB
47302015-03-24 Gary Benson <gbenson@redhat.com>
4731
4732 * linux-x86-low.c (x86_linux_update_debug_registers):
4733 New function, factored out from...
4734 (x86_linux_prepare_to_resume): ...this.
4735
14b0bc68
GB
47362015-03-24 Gary Benson <gbenson@redhat.com>
4737
4738 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4739 (x86_linux_dr_set): Likewise.
4740 (update_debug_registers_callback): Likewise.
4741 (x86_linux_dr_set_addr): Likewise.
4742 (x86_linux_dr_get_addr): Likewise.
4743 (x86_linux_dr_set_control): Likewise.
4744 (x86_linux_dr_get_control): Likewise.
4745 (x86_linux_dr_get_status): Likewise.
4746 (x86_linux_prepare_to_resume): Likewise.
4747
5dfe6ca8
GB
47482015-03-24 Gary Benson <gbenson@redhat.com>
4749
4750 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4751 Use perror_with_name. Pass string through gettext.
4752 (x86_linux_dr_set): Likewise.
4753
d33472ad
GB
47542015-03-24 Gary Benson <gbenson@redhat.com>
4755
4756 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4757 (x86_linux_dr_set_addr): ...this.
4758 (x86_dr_low_get_addr): Rename to...
4759 (x86_linux_dr_get_addr): ...this.
4760 (x86_dr_low_set_control): Rename to...
4761 (x86_linux_dr_set_control): ...this.
4762 (x86_dr_low_get_control): Rename to...
4763 (x86_linux_dr_get_control): ...this.
4764 (x86_dr_low_get_status): Rename to...
4765 (x86_linux_dr_get_status): ...this.
4766 (x86_dr_low): Update with new function names.
4767
4b134ca1
GB
47682015-03-24 Gary Benson <gbenson@redhat.com>
4769
4770 * Makefile.in (x86-linux.o): New rule.
4771 * configure.srv: Add x86-linux.o to relevant targets.
4772 * linux-low.c (lwp_set_arch_private_info): New function.
4773 (lwp_arch_private_info): Likewise.
4774 * linux-x86-low.c: Include nat/x86-linux.h.
4775 (arch_lwp_info): Removed structure.
4776 (update_debug_registers_callback):
4777 Use lwp_set_debug_registers_changed.
4778 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4779 and lwp_set_debug_registers_changed.
4780 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4781
34c703da
GB
47822015-03-24 Gary Benson <gbenson@redhat.com>
4783
4784 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4785 * linux-arm-low.c (arm_new_thread): Likewise.
4786 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4787 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4788 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4789 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4790
cff068da
GB
47912015-03-24 Gary Benson <gbenson@redhat.com>
4792
4793 * linux-low.c (ptid_of_lwp): New function.
4794 (lwp_is_stopped): Likewise.
4795 (lwp_stop_reason): Likewise.
4796 * linux-x86-low.c (update_debug_registers_callback):
4797 Use lwp_is_stopped.
4798 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4799 lwp_stop_reason.
4800
b2f7c7e8
GB
48012015-03-24 Gary Benson <gbenson@redhat.com>
4802
4803 * linux-low.h (linux_stop_lwp): Remove declaration.
4804
6d4ee8c6
GB
48052015-03-24 Gary Benson <gbenson@redhat.com>
4806
4807 * linux-low.h: Include nat/linux-nat.h.
4808 * linux-low.c (iterate_over_lwps_args): New structure.
4809 (iterate_over_lwps_filter): New function.
4810 (iterate_over_lwps): Likewise.
4811 * linux-x86-low.c (update_debug_registers_callback):
4812 Update signature to what iterate_over_lwps expects.
4813 Remove PID check that iterate_over_lwps now performs.
4814 (x86_dr_low_set_addr): Use iterate_over_lwps.
4815 (x86_dr_low_set_control): Likewise.
4816
70a0bb6b
GB
48172015-03-24 Gary Benson <gbenson@redhat.com>
4818
4819 * linux-x86-low.c (x86_debug_reg_state): New function.
4820 (x86_linux_prepare_to_resume): Use the above.
4821
7b669087
GB
48222015-03-24 Gary Benson <gbenson@redhat.com>
4823
4824 * linux-low.c (current_lwp_ptid): New function.
4825 * linux-x86-low.c: Include nat/linux-nat.h.
4826 (x86_dr_low_get_addr): Use current_lwp_ptid.
4827 (x86_dr_low_get_control): Likewise.
4828 (x86_dr_low_get_status): Likewise.
4829
eef49a3d
PA
48302015-03-20 Pedro Alves <palves@redhat.com>
4831
4832 * tracepoint.c (cmd_qtstatus): Make "str" const.
4833
b2333d22
PA
48342015-03-20 Pedro Alves <palves@redhat.com>
4835
4836 * server.c (handle_general_set): Make "req_str" const.
4837
23f238d3
PA
48382015-03-19 Pedro Alves <palves@redhat.com>
4839
4840 * linux-low.c (linux_resume_one_lwp): Rename to ...
4841 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4842 instead call perror_with_name.
4843 (check_ptrace_stopped_lwp_gone): New function.
4844 (linux_resume_one_lwp): Reimplement as wrapper around
4845 linux_resume_one_lwp_throw that swallows errors if the LWP is
4846 gone.
4847
91baf43f
PA
48482015-03-19 Pedro Alves <palves@redhat.com>
4849
4850 * linux-low.c (count_events_callback, select_event_lwp_callback):
4851 No longer check whether the thread has resume_stop as last resume
4852 kind.
4853
8bf3b159
PA
48542015-03-19 Pedro Alves <palves@redhat.com>
4855
4856 * linux-low.c (count_events_callback, select_event_lwp_callback):
4857 Use the lwp's status_pending_p field, not the thread's.
4858
b90fc188
PA
48592015-03-19 Pedro Alves <palves@redhat.com>
4860
4861 * linux-low.c (select_event_lwp_callback): Update comments to
4862 no longer mention SIGTRAP.
4863
464b0089
GB
48642015-03-18 Gary Benson <gbenson@redhat.com>
4865
4866 * server.c (handle_query): Do not report vFile:fstat as supported.
4867
aa9e327f
GB
48682015-03-11 Gary Benson <gbenson@redhat.com>
4869
4870 * hostio.c (sys/types.h): New include.
4871 (sys/stat.h): Likewise.
4872 (common-remote-fileio.h): Likewise.
4873 (handle_fstat): New function.
4874 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 4875
791c0056
GB
48762015-03-11 Gary Benson <gbenson@redhat.com>
4877
4878 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4879 struct stat.st_blocks and struct stat.st_blksize.
4880 * configure: Regenerate.
4881 * config.in: Likewise.
4882 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4883 (OBS): Add common-remote-fileio.o.
4884 (common-remote-fileio.o): New rule.
4885
9a9df970
PA
48862015-03-09 Pedro Alves <palves@redhat.com>
4887
4888 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4889 'struct sockaddr' pointer in 'accept' call.
4890
9eb1356e
PA
48912015-03-09 Pedro Alves <palves@redhat.com>
4892
4893 Revert:
4894 2015-03-07 Pedro Alves <palves@redhat.com>
4895 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4896 or <winsock2.h> here. Instead include "gdb_socket.h".
4897 (remote_open): Use union gdb_sockaddr_u.
4898 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4899 or <winsock2.h> here. Instead include "gdb_socket.h".
4900 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4901 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4902 or <sys/un.h>.
4903 (init_named_socket, gdb_agent_helper_thread): Use union
4904 gdb_sockaddr_u.
4905
aac331e4
PA
49062015-03-07 Pedro Alves <palves@redhat.com>
4907
4908 * configure.ac (build_warnings): Move
4909 -Wdeclaration-after-statement to the C-specific set.
4910 * configure: Regenerate.
4911
366c75fc
PA
49122015-03-07 Pedro Alves <palves@redhat.com>
4913
4914 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4915 or <winsock2.h> here. Instead include "gdb_socket.h".
4916 (remote_open): Use union gdb_sockaddr_u.
4917 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4918 or <winsock2.h> here. Instead include "gdb_socket.h".
4919 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4920 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4921 or <sys/un.h>.
4922 (init_named_socket, gdb_agent_helper_thread): Use union
4923 gdb_sockaddr_u.
4924
492d29ea
PA
49252015-03-07 Pedro Alves <palves@redhat.com>
4926
4927 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4928 instead.
4929
60a191ed
YQ
49302015-03-06 Yao Qi <yao.qi@linaro.org>
4931
4932 * linux-aarch64-low.c (aarch64_insert_point): Use
4933 show_debug_regs as a boolean.
4934 (aarch64_remove_point): Likewise.
4935
f5771b1d
PA
49362015-03-05 Pedro Alves <palves@redhat.com>
4937
4938 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4939 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4940 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4941 * nto-low.c (nto_target_ops): Likewise.
4942 * spu-low.c (spu_target_ops): Likewise.
4943 * win32-low.c (win32_target_ops): Likewise.
4944
3e572f71
PA
49452015-03-04 Pedro Alves <palves@redhat.com>
4946
72f4393d 4947 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
4948 Decide whether a breakpoint triggered based on the SIGTRAP's
4949 siginfo.si_code.
72f4393d
L
4950 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4951 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
4952 (linux_low_filter_event): Check for breakpoints before checking
4953 watchpoints.
4954 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4955 siginfo.si_code.
72f4393d
L
4956 (linux_stopped_by_sw_breakpoint)
4957 (linux_supports_stopped_by_sw_breakpoint)
4958 (linux_stopped_by_hw_breakpoint)
4959 (linux_supports_stopped_by_hw_breakpoint): New functions.
4960 (linux_target_ops): Install new target methods.
3e572f71 4961
1ec68e26
PA
49622015-03-04 Pedro Alves <palves@redhat.com>
4963
4964 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4965 * server.c (swbreak_feature, hwbreak_feature): New globals.
4966 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4967 (captured_main): Clear swbreak_feature and hwbreak_feature.
4968 * server.h (swbreak_feature, hwbreak_feature): Declare.
4969 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4970 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4971 supports_stopped_by_hw_breakpoint>: New fields.
4972 (target_supports_stopped_by_sw_breakpoint)
4973 (target_stopped_by_sw_breakpoint)
4974 (target_supports_stopped_by_hw_breakpoint)
4975 (target_stopped_by_hw_breakpoint): Declare.
4976
15c66dd6
PA
49772015-03-04 Pedro Alves <palves@redhat.com>
4978
4979 enum lwp_stop_reason -> enum target_stop_reason
4980 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4981 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4982 (linux_wait_1, stuck_in_jump_pad_callback)
4983 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4984 (linux_stopped_by_watchpoint):
4985 * linux-low.h (enum lwp_stop_reason): Delete.
4986 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4987 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4988
98fc70d6
YQ
49892015-03-04 Yao Qi <yao.qi@linaro.org>
4990
4991 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4992
dd2ac174
GB
49932015-03-03 Gary Benson <gbenson@redhat.com>
4994
4995 * hostio.c (handle_vFile): Fix prefix lengths.
4996
d68e53f4
MM
49972015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4998
4999 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5000 ptr_bits.
5001
bf2d68ab
AA
50022015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5003
5004 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5005 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5006 (clean): Add "rm -f" for above C files.
5007 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5008 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5009 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5010 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5011 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5012 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5013 (init_registers_s390x_vx_linux64)
5014 (init_registers_s390x_tevx_linux64)
5015 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5016 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5017 declarations.
5018 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5019 (s390_store_vxrs_high): New functions.
5020 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5021 NT_S390_VXRS_HIGH.
5022 (s390_arch_setup): Add logic for selecting one of the new target
5023 descriptions. Activate the new vector regsets if applicable.
5024 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5025 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5026 and init_registers_s390x_tevx_linux64.
5027
c966a859
PA
50282015-03-01 Pedro Alves <palves@redhat.com>
5029
5030 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5031 parameter.
5032
4180215b
PA
50332015-02-27 Pedro Alves <palves@redhat.com>
5034
5035 * linux-x86-low.c (u_debugreg_offset): New function.
5036 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5037
749bab01
PA
50382015-02-27 Pedro Alves <palves@redhat.com>
5039
5040 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5041 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5042 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5043 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5044 (ps_lsetfpregs, ps_getpid)
5045 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5046 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5047 (ps_lsetxregs, ps_plog): Declare.
5048
3c14e5a3
PA
50492015-02-27 Pedro Alves <palves@redhat.com>
5050
5051 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5052 IP_AGENT_EXPORT_FUNC.
5053 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5054 IP_AGENT_EXPORT_FUNC.
5055 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5056 (IP_AGENT_EXPORT): Delete.
5057 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5058 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5059 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5060 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5061 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5062 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5063 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5064 (traceframe_read_count, traceframe_write_count)
5065 (traceframes_created, trace_state_variables, get_raw_reg)
5066 (get_trace_state_variable_value, set_trace_state_variable_value)
5067 (ust_loaded, helper_thread_id, cmd_buf): Use
5068 IPA_SYM_EXPORTED_NAME.
5069 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5070 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5071 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5072 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5073 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5074 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5075 EXTERN_C_PUSH/EXTERN_C_POP.
5076 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5077 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5078 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5079 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5080 (traceframe_write_count, traceframe_read_count)
5081 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5082 (about_to_request_buffer_space, get_trace_state_variable_value)
5083 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5084 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5085 EXTERN_C_PUSH/EXTERN_C_POP.
5086 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5087 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5088 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5089 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5090 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5091 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5092 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5093 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5094 Define.
5095 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5096 (IP_AGENT_EXPORT_VAR_DECL): Define.
5097 (tracing): Declare.
5098 (gdb_agent_get_raw_reg): Declare.
5099
fe978cb0
PA
51002015-02-27 Tom Tromey <tromey@redhat.com>
5101 Pedro Alves <palves@redhat.com>
5102
5103 Rename symbols whose names are reserved C++ keywords throughout.
5104
3bc3d82a
PA
51052015-02-27 Pedro Alves <palves@redhat.com>
5106
5107 * Makefile.in (COMPILER): New, get it from autoconf.
5108 (CXX): Get from autoconf instead.
5109 (COMPILE.pre): Use COMPILER.
5110 (CC-LD): Rename to ...
5111 (CC_LD): ... this. Use COMPILER.
5112 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5113 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5114 * acinclude.m4: Include build-with-cxx.m4.
5115 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5116 Disable -Werror by default if building in C++ mode.
5117 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5118 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5119 the C++ compiler. Save/restore CXXFLAGS too.
5120 * configure: Regenerate.
5121
07697489
PA
51222015-02-27 Pedro Alves <palves@redhat.com>
5123
5124 * acinclude.m4: Include libiberty.m4.
5125 * configure.ac: Call libiberty_INIT.
5126 * config.in, configure: Regenerate.
5127
9beb7c4e
PA
51282015-02-26 Pedro Alves <palves@redhat.com>
5129
5130 * linux-low.c (linux_wait_1): When incrementing the PC past a
5131 program breakpoint always use the_low_target.breakpoint_len as
5132 increment, rather than the maximum between that and
5133 the_low_target.decr_pc_after_break.
5134
8090aef2
PA
51352015-02-23 Pedro Alves <palves@redhat.com>
5136
5137 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5138 thread was doing a step-over; always adjust the PC if
5139 we stepped over a permanent breakpoint.
5140 (linux_wait_1): If we stepped over breakpoint that was on top of a
5141 permanent breakpoint, manually advance the PC past it.
5142
bc9540e8
PA
51432015-02-23 Pedro Alves <palves@redhat.com>
5144
5145 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5146 modes.
5147 (x86_fill_gregset, x86_store_gregset): Use it when handling
5148 $orig_eax.
5149
2db9a427
PA
51502015-02-20 Pedro Alves <palves@redhat.com>
5151
5152 * thread-db.c: Include "nat/linux-procfs.h".
5153 (thread_db_init): Skip listing new threads if the kernel supports
5154 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5155
afa8d396
PA
51562015-02-20 Pedro Alves <palves@redhat.com>
5157
5158 * linux-low.c (status_pending_p_callback): Use ptid_match.
5159
c9587f88
AT
51602015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5161
5162 PR breakpoints/16812
5163 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5164 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5165 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5166
b05ec7a5
AT
51672015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5168
5169 PR breakpoints/15956
5170 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5171
d33501a5
MM
51722015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5173
5174 * linux-low.c (linux_low_btrace_conf): Print size.
5175 * server.c (handle_btrace_conf_general_set): New.
5176 (hanle_general_set): Call handle_btrace_conf_general_set.
5177 (handle_query): Report Qbtrace-conf:bts:size as supported.
5178
f4abbc16
MM
51792015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5180
5181 * linux-low.c (linux_low_enable_btrace): Update parameters.
5182 (linux_low_btrace_conf): New.
5183 (linux_target_ops)<to_btrace_conf>: Initialize.
5184 * server.c (current_btrace_conf): New.
5185 (handle_btrace_enable): Rename to ...
5186 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5187 to target_enable_btrace. Update comment. Update users.
5188 (handle_qxfer_btrace_conf): New.
5189 (qxfer_packets): Add btrace-conf entry.
5190 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5191 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5192 (target_ops)<read_btrace_conf>: New.
5193 (target_enable_btrace): Update parameters.
5194 (target_read_btrace_conf): New.
5195
043c3577
MM
51962015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5197
5198 * server.c (handle_btrace_general_set): Remove call to
5199 target_supports_btrace.
5200 (supported_btrace_packets): New.
5201 (handle_query): Call supported_btrace_packets.
5202 * target.h: include btrace-common.h.
5203 (btrace_target_info): Removed.
5204 (supports_btrace, target_supports_btrace): Update parameters.
5205
734b0e4b
MM
52062015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5207
5208 * Makefile.in (SFILES): Add common/btrace-common.c.
5209 (OBS): Add common/btrace-common.o.
5210 (btrace-common.o): Add build rules.
5211 * linux-low: Include btrace-common.h.
5212 (linux_low_read_btrace): Use struct btrace_data. Call
5213 btrace_data_init and btrace_data_fini.
5214
d6c146e9
PA
52152015-02-06 Pedro Alves <palves@redhat.com>
5216
5217 * thread-db.c (find_new_threads_callback): Add debug output.
5218
20ba1ce6
PA
52192015-02-04 Pedro Alves <palves@redhat.com>
5220
5221 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5222 (resume_stopped_resumed_lwps): New function.
5223 (linux_wait_for_event_filtered): Use it.
5224
8cc73a39
SDJ
52252015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5226
5227 * Makefile.in (SFILES): Add linux-personality.c.
5228 (linux-personality.o): New rule.
5229 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5230 list of objects to be built.
5231 * linux-low.c: Include nat/linux-personality.h.
5232 (linux_create_inferior): Remove code to disable address space
5233 randomization (moved to ../nat/linux-personality.c). Create
5234 cleanup to disable address space randomization.
5235
fb23d554
SDJ
52362015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5237
5238 * Makefile.in (posix-strerror.o): New rule.
5239 (mingw-strerror.o): Likewise.
5240 * configure: Regenerated.
5241 * configure.ac: Source file ../common/common.host. Initialize new
5242 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5243
cdf43629
YQ
52442015-01-14 Yao Qi <yao@codesourcery.com>
5245
5246 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5247 (ppc-linux.o): New rule.
5248 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5249 * configure.ac: AC_CHECK_FUNCS(getauxval).
5250 * config.in: Re-generated.
5251 * configure: Re-generated.
5252 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5253 ppc64_64bit_inferior_p
5254
514c5338
YQ
52552015-01-14 Yao Qi <yao@codesourcery.com>
5256
5257 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5258 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5259 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5260 (PT_ORIG_R3, PT_TRAP): Likewise.
5261 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5262 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5263 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5264
3368c1e5
JB
52652015-01-10 Joel Brobecker <brobecker@adacore.com>
5266
5267 * i387-fp.c (i387_cache_to_xsave): In look over
5268 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5269 zmmh_low_space field by use of zmmh_high_space.
5270
582511be
PA
52712015-01-09 Pedro Alves <palves@redhat.com>
5272
5273 * linux-low.c (step_over_bkpt): Move higher up in the file.
5274 (handle_extended_wait): Don't store the stop_pc here.
5275 (get_stop_pc): Adjust comments and rename to ...
5276 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5277 stopped for a software breakpoint or hardware breakpoint.
5278 (thread_still_has_status_pending_p): New function.
5279 (status_pending_p_callback): Use
5280 thread_still_has_status_pending_p. If the event is no longer
5281 interesting, resume the LWP.
5282 (handle_tracepoints): Add assert.
5283 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5284 (wstatus_maybe_breakpoint): New function.
5285 (cancel_breakpoint): Delete function.
5286 (check_stopped_by_watchpoint): New function, factored out from
5287 linux_low_filter_event.
5288 (lp_status_maybe_breakpoint): Delete function.
5289 (linux_low_filter_event): Remove filter_ptid argument.
5290 Leave thread group exits pending here. Store the LWP's stop PC.
5291 Always leave events pending.
5292 (linux_wait_for_event_filtered): Pull all events out of the
5293 kernel, and leave them all pending.
5294 (count_events_callback, select_event_lwp_callback): Consider all
5295 events.
5296 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5297 (select_event_lwp): Only give preference to the stepping LWP in
5298 all-stop mode. Adjust comments.
5299 (ignore_event): New function.
5300 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5301 references to cancel_breakpoints. Adjust to renames. Also give
5302 equal priority to all LWPs that have had events in non-stop mode.
5303 If reporting a software breakpoint event, unadjust the LWP's PC.
5304 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5305 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5306 Adjust.
5307 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5308 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5309 (linux_stopped_by_watchpoint): Adjust.
5310 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5311 * linux-low.h (enum lwp_stop_reason): New.
5312 (struct lwp_info) <stop_pc>: Adjust comment.
5313 <stopped_by_watchpoint>: Delete field.
5314 <stop_reason>: New field.
5315 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5316 * mem-break.c (software_breakpoint_inserted_here)
5317 (hardware_breakpoint_inserted_here): New function.
5318 * mem-break.h (software_breakpoint_inserted_here)
5319 (hardware_breakpoint_inserted_here): Declare.
5320 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5321 (cancel_breakpoints): Delete.
5322 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5323 (upload_fast_traceframes): Remove references to
5324 cancel_breakpoints.
5325
a33e3959
PA
53262015-01-09 Pedro Alves <palves@redhat.com>
5327
5328 * thread-db.c (find_new_threads_callback): Ignore thread if the
5329 kernel thread ID is -1.
5330
8784d563
PA
53312015-01-09 Pedro Alves <palves@redhat.com>
5332
5333 * linux-low.c (linux_attach_fail_reason_string): Move to
5334 nat/linux-ptrace.c, and rename.
5335 (linux_attach_lwp): Update comment.
5336 (attach_proc_task_lwp_callback): New function.
5337 (linux_attach): Adjust to rename and use
5338 linux_proc_attach_tgid_threads.
5339 (linux_attach_fail_reason_string): Delete declaration.
5340
76f2b779
JB
53412015-01-01 Joel Brobecker <brobecker@adacore.com>
5342
5343 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5344 * server.c (gdbserver_version): Likewise.
5345
fafcc06a
SDJ
53462014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5347
5348 * remote-utils.c: Include ctype.h.
5349 (input_interrupt): Explicitly handle the case when the char
5350 received is the NUL byte. Improve the printing of non-ASCII
5351 characters.
5352
beed38b8
JB
53532014-12-16 Joel Brobecker <brobecker@adacore.com>
5354
5355 * linux-low.c (linux_low_filter_event): Update call to
5356 linux_enable_event_reporting following the addition of
5357 a new parameter to that function.
5358
bf330350
CU
53592014-12-16 Catalin Udma <catalin.udma@freescale.com>
5360
5361 PR server/17457
5362 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5363 (AARCH64_FPCR_REGNO): Likewise.
5364 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5365 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5366 (aarch64_store_fpregset): Likewise.
5367
5227d625
JB
53682014-12-15 Joel Brobecker <brobecker@adacore.com>
5369
5370 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5371 Remove FIXME comment about assumption about N.
5372
f93b65a0
JB
53732014-12-13 Joel Brobecker <brobecker@adacore.com>
5374
5375 * configure.ac: If large-file support is disabled in GDBserver,
5376 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5377 * configure: Regenerate.
5378
e5a9158d
AA
53792014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5380
5381 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5382 warning upon ENODATA from ptrace.
5383 * linux-s390-low.c (s390_store_tdb): New.
5384 (s390_regsets): Add regset for NT_S390_TDB.
5385
feea5f36
AA
53862014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5387
5388 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5389 without a fill_function.
5390 * linux-s390-low.c (s390_fill_last_break): Remove.
5391 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5392 (s390_arch_setup): Use regset's size instead of fill_function for
5393 loop end condition.
5394
098dbe61
AA
53952014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5396
5397 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5398 the regset's store function when ptrace returned an error.
5399 * regcache.c (get_thread_regcache): Invalidate register cache
5400 before fetching inferior's registers.
5401
28eef672
AA
54022014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5403
5404 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5405 while-loop as for-loop.
5406 (regsets_store_inferior_registers): Likewise.
5407
bdca27a2
YQ
54082014-11-28 Yao Qi <yao@codesourcery.com>
5409
5410 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5411 * config.in, configure: Re-generate.
5412 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5413 is defined.
5414
9c232dda
YQ
54152014-11-21 Yao Qi <yao@codesourcery.com>
5416
5417 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5418 (AC_CHECK_HEADERS): Remove malloc.h.
5419 * configure: Re-generated.
5420 * config.in: Re-generated.
5421 * server.h: Don't include alloca.h and malloc.h.
5422 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5423 Don't include malloc.h.
5424
43968415
JB
54252014-11-17 Joel Brobecker <brobecker@adacore.com>
5426
5427 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5428 corresponding ERRNO check in same block.
5429
40e91bc7
PA
54302014-11-12 Pedro Alves <palves@redhat.com>
5431
5432 * server.c (cont_thread): Update comment.
5433 (start_inferior, attach_inferior): No longer clear cont_thread.
5434 (handle_v_cont): No longer set cont_thread.
5435 (captured_main): Clear cont_thread each time a GDB connects.
5436
c2c118cf
PA
54372014-11-12 Pedro Alves <palves@redhat.com>
5438
5439 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5440 thread, and don't resume all threads if the Hc thread has exited.
5441
78708b7c
PA
54422014-11-12 Pedro Alves <palves@redhat.com>
5443
5444 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5445 the process group instead of to a specific LWP.
5446
a2abc7de
PA
54472014-10-15 Pedro Alves <palves@redhat.com>
5448
5449 PR server/17487
5450 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5451 parameter.
5452 (arm_set_thread_context): Delete.
5453 (the_low_target): Adjust.
5454 * win32-i386-low.c (debug_registers_changed)
5455 (debug_registers_used): Delete.
5456 (update_debug_registers_callback): New function.
5457 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5458 needing to update their debug registers.
5459 (win32_get_current_dr): New function.
5460 (x86_dr_low_get_addr, x86_dr_low_get_control)
5461 (x86_dr_low_get_status): Fetch the debug register from the thread
5462 record's context.
5463 (i386_initial_stuff): Adjust.
5464 (i386_get_thread_context): Remove current_event parameter. Don't
5465 clear debug_registers_changed nor copy DR values to
5466 debug_reg_state.
5467 (i386_set_thread_context): Delete.
5468 (i386_prepare_to_resume): New function.
5469 (i386_thread_added): Mark the thread as needing to update irs
5470 debug registers.
5471 (the_low_target): Remove i386_set_thread_context and install
5472 i386_prepare_to_resume.
5473 * win32-low.c (win32_get_thread_context): Adjust.
5474 (win32_set_thread_context): Use SetThreadContext
5475 directly.
5476 (win32_prepare_to_resume): New function.
5477 (win32_require_context): New function, factored out from ...
5478 (thread_rec): ... this.
5479 (continue_one_thread): Call win32_prepare_to_resume on each thread
5480 we're about to continue.
5481 (win32_resume): Call win32_prepare_to_resume on the event thread.
5482 * win32-low.h (struct win32_thread_info)
5483 <debug_registers_changed>: New field.
5484 (struct win32_target_ops): Change prototype of set_thread_context,
5485 delete set_thread_context and add prepare_to_resume.
5486 (win32_require_context): New declaration.
5487
a442d071
GB
54882014-10-08 Gary Benson <gbenson@redhat.com>
5489
5490 * server.h: Do not include common-exceptions.h.
5491
6f1947e8
GB
54922014-10-08 Gary Benson <gbenson@redhat.com>
5493
5494 * server.h: Do not include cleanups.h.
5495
63b434a4
JH
54962014-09-30 James Hogan <james.hogan@imgtec.com>
5497
5498 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5499 mips64-dsp-linux.c.
5500
c4d9ceb6
YQ
55012014-09-23 Yao Qi <yao@codesourcery.com>
5502
5503 * linux-low.c (lp_status_maybe_breakpoint): New function.
5504 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5505 (count_events_callback): Likewise.
5506 (select_event_lwp_callback): Likewise.
5507 (cancel_breakpoints_callback): Likewise.
5508
89a5711c
DB
55092014-09-19 Don Breazeal <donb@codesourcery.com>
5510
5511 * linux-low.c (handle_extended_wait): Call
5512 linux_ptrace_get_extended_event.
5513 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5514 linux_is_extended_waitstatus.
5515
bffc0964
JB
55162014-09-16 Joel Brobecker <brobecker@adacore.com>
5517
5518 * Makefile.in (CPPFLAGS): Define.
5519 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5520 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5521
0bfdf32f
GB
55222014-09-16 Gary Benson <gbenson@redhat.com>
5523
5524 * inferiors.h (current_inferior): Renamed as...
5525 (current_thread): New variable. All uses updated.
5526 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5527 (maybe_move_out_of_jump_pad): Likewise.
5528 (cancel_breakpoint): Likewise.
5529 (linux_low_filter_event): Likewise.
5530 (wait_for_sigstop): Likewise.
5531 (linux_resume_one_lwp): Likewise.
5532 (need_step_over_p): Likewise.
5533 (start_step_over): Likewise.
5534 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5535 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5536 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5537 and save_inferior as saved_thread.
5538 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5539 saved_thread.
5540 (regcache_invalidate_thread): Likewise.
5541 * remote-utils.c (prepare_resume_reply): Likewise.
5542 * thread-db.c (thread_db_get_tls_address): Likewise.
5543 (disable_thread_event_reporting): Likewise.
5544 (remove_thread_event_breakpoints): Likewise.
5545 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5546 as saved_thread.
5547 * target.h (set_desired_inferior): Renamed as...
5548 (set_desired_thread): New declaration. All uses updated.
5549 * server.c (myresume): Updated comment to reference thread instead
5550 of inferior.
5551 (handle_serial_event): Likewise.
5552 (handle_target_event): Likewise.
5553
361c8ade
GB
55542014-09-12 Tom Tromey <tromey@redhat.com>
5555 Gary Benson <gbenson@redhat.com>
5556
5557 * regcache.h: Include common-regcache.h.
5558 (regcache_read_pc): Don't declare.
5559 * regcache.c (get_thread_regcache_for_ptid): New function.
5560
bd9269f7
GB
55612014-09-11 Tom Tromey <tromey@redhat.com>
5562 Gary Benson <gbenson@redhat.com>
5563
5564 * symbol.c: New file.
5565 * Makefile.in (SFILES): Add symbol.c.
5566 (OBS): Add symbol.o.
5567
f8c1d06b
GB
55682014-09-11 Gary Benson <gbenson@redhat.com>
5569
5570 * target.c (target_stop_ptid, target_continue_ptid): New
5571 functions.
5572
721ec300
GB
55732014-09-11 Tom Tromey <tromey@redhat.com>
5574 Gary Benson <gbenson@redhat.com>
5575
5576 * target.h: Include target/target.h.
5577 * target.c (target_read_memory, target_read_uint32)
5578 (target_write_memory): New functions.
5579
c5e92cca
GB
55802014-09-11 Gary Benson <gbenson@redhat.com>
5581
5582 * server.h (debug_hw_points): Don't declare.
5583 * server.c (debug_hw_points): Don't define. Replace all uses
5584 with show_debug_regs.
5585 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5586 all uses with show_debug_regs.
5587
2e4bb98a
EBM
55882014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5589
5590 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5591 endianness into account.
5592 (ppc_supply_ptrace_register): Likewise.
5593
ac740bc7
JH
55942014-09-03 James Hogan <james.hogan@imgtec.com>
5595
5596 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5597 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5598
97ea6506
GB
55992014-09-03 Gary Benson <gbenson@redhat.com>
5600
5601 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5602 ALL_DEBUG_ADDRESS_REGISTERS.
5603
df7e5265
GB
56042014-09-02 Gary Benson <gbenson@redhat.com>
5605
5606 * i386-low.h: Renamed as...
5607 * x86-low.h: New file. All type, function and variable name
5608 prefixes changed from "i386_" to "x86_". All references updated.
5609 * i386-low.c: Renamed as...
5610 * x86-low.c: New file. All type, function and variable name
5611 prefixes changed from "i386_" to "x86_". All references updated.
5612
ed859da7
GB
56132014-09-02 Gary Benson <gbenson@redhat.com>
5614
5615 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5616 (x86_linux_new_thread): Likewise.
5617
860789c7
GB
56182014-08-29 Gary Benson <gbenson@redhat.com>
5619
5620 * server.h (setjmp.h): Do not include.
5621 (toplevel): Do not declare.
5622 (common-exceptions.h): Include.
5623 (cleanups.h): Likewise.
5624 * server.c (toplevel): Do not define.
5625 (exit_code): New static global.
5626 (detach_or_kill_for_exit_cleanup): New function.
5627 (main): New function. Original main renamed to...
5628 (captured_main): New function.
5629 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5630
ff55e1b5
GB
56312014-08-29 Gary Benson <gbenson@redhat.com>
5632
5633 * Makefile.in (SFILES): Add common/common-exceptions.c.
5634 (OBS): Add common-exceptions.o.
5635 (common-exceptions.o): New rule.
5636 * utils.c (prepare_to_throw_exception): New function.
5637
e9bcb658
GB
56382014-08-29 Gary Benson <gbenson@redhat.com>
5639
5640 * config.in: Regenerate.
5641 * configure: Likewise.
5642
e3180625
GB
56432014-08-29 Gary Benson <gbenson@redhat.com>
5644
5645 * Makefile.in (SFILES): Add common/cleanups.c.
5646 (OBS): cleanups.o.
5647 (cleanups.o): New rule.
5648
e3d6ba5d
GB
56492014-08-29 Gary Benson <gbenson@redhat.com>
5650
5651 * utils.c (internal_vwarning): New function.
5652
7096e886
GB
56532014-08-28 Gary Benson <gbenson@redhat.com>
5654
5655 * utils.h (fatal): Remove declaration.
5656 * utils.c (fatal): Remove function.
5657
14ce3192
GB
56582014-08-28 Gary Benson <gbenson@redhat.com>
5659
5660 * tracepoint.c (gdb_agent_init): Replace fatal with
5661 perror_with_name.
5662 (initialize_tracepoint): Likewise.
5663
50278d59
GB
56642014-08-28 Gary Benson <gbenson@redhat.com>
5665
5666 * remote-utils.c (remote_prepare): Replace fatal with error.
5667
aa96c426
GB
56682014-08-28 Gary Benson <gbenson@redhat.com>
5669
5670 * linux-low.c (linux_async): Replace fatal with warning.
5671 Tidy up and return.
5672 (linux_start_non_stop): Return -1 if linux_async failed.
5673
f7160e97
GB
56742014-08-28 Gary Benson <gbenson@redhat.com>
5675
5676 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5677 gdb_assert.
5678 (i386_dr_low_get_addr): Remove vague comment.
5679 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5680 gdb_assert.
5681
38e08fca
GB
56822014-08-28 Gary Benson <gbenson@redhat.com>
5683
5684 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5685 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5686 internal_error.
5687 (linux_resume_one_lwp): Likewise.
5688 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5689 gdb_assert.
5690 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5691 with internal_error.
5692 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5693 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5694 (find_register_by_name): Replace fatal with internal_error.
5695 (find_regno): Likewise.
5696 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5697 * thread-db.c (thread_db_create_event): Likewise.
5698 (thread_db_load_search): Likewise.
5699 (try_thread_db_load_1): Likewise.
5700 * tracepoint.c (get_jump_space_head): Replace fatal with
5701 internal_error.
5702 (claim_trampoline_space): Likewise.
5703 (have_fast_tracepoint_trampoline_buffer): Likewise.
5704 (cmd_qtstart): Likewise.
5705 (stop_tracing): Likewise.
5706 (fast_tracepoint_collecting): Likewise.
5707 (target_malloc): Likewise.
5708 (download_tracepoint): Likewise.
5709 (download_trace_state_variables): Replace check with gdb_assert.
5710 (upload_fast_traceframes): Replace fatal with internal_error.
5711
34abf635
GB
57122014-08-19 Tom Tromey <tromey@redhat.com>
5713 Gary Benson <gbenson@redhat.com>
5714
5715 * Makefile.in (SFILES): Add common/common-debug.c.
5716 (OBS): Add common-debug.o.
5717 (common-debug.o): New rule.
5718 * debug.h (debug_printf): Don't declare.
5719 * debug.c (debug_printf): Renamed and rewritten as...
5720 (debug_vprintf): New function.
5721
f6e94d78
GB
57222014-08-19 Gary Benson <gbenson@redhat.com>
5723
5724 * utils.h: Do not include print-utils.h.
5725
9239eeab
GB
57262014-08-19 Tom Tromey <tromey@redhat.com>
5727 Gary Benson <gbenson@redhat.com>
5728
5729 * server.h: Add static assertion.
5730 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5731
ef87c8bb
GB
57322014-08-19 Tom Tromey <tromey@redhat.com>
5733 Gary Benson <gbenson@redhat.com>
5734
5735 * Makefile.in (SFILES): Add common/errors.c.
5736 (OBS): Add errors.o.
5737 (IPA_OBS): Add errors-ipa.o.
5738 (errors.o): New rule.
5739 (errors-ipa.o): Likewise.
5740 * utils.h (perror_with_name, error, warning): Don't declare.
5741 * utils.c (warning): Renamed and rewritten as...
5742 (vwarning): New function.
5743 (error): Renamed and rewritten as...
5744 (verror): New function.
5745 (internal_error): Renamed and rewritten as...
5746 (internal_verror): New function.
5747
bb974a24
GB
57482014-08-07 Gary Benson <gbenson@redhat.com>
5749
5750 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5751 * configure: Regenerate.
5752 * config.in: Likewise.
5753 * server.h: Do not include errno.h.
5754 * event-loop.c: Likewise.
5755 * hostio-errno.c: Likewise.
5756 * linux-low.c: Likewise.
5757 * remote-utils.c: Likewise.
5758 * spu-low.c: Likewise.
5759 * utils.c: Likewise.
5760 * gdbreplay.c: Unconditionally include errno.h.
5761
6d3d12eb
GB
57622014-08-07 Gary Benson <gbenson@redhat.com>
5763
5764 * server.h: Do not include string.h.
5765 * event-loop.c: Likewise.
5766 * linux-low.c: Likewise.
5767 * regcache.c: Likewise.
5768 * remote-utils.c: Likewise.
5769 * spu-low.c: Likewise.
5770 * utils.c: Likewise.
5771
dccbb609
GB
57722014-08-07 Gary Benson <gbenson@redhat.com>
5773
5774 * server.h: Do not include gdb_assert.h.
5775
e76df0d0
GB
57762014-08-07 Gary Benson <gbenson@redhat.com>
5777
5778 * server.h: Do not include common-utils.h.
5779
4cb9c816
GB
57802014-08-07 Gary Benson <gbenson@redhat.com>
5781
5782 * server.h: Do not include ptid.h.
5783 * notif.h: Likewise.
5784
3995eeee
GB
57852014-08-07 Gary Benson <gbenson@redhat.com>
5786
5787 * server.h: Do not include gdb_locale.h.
5788
cb9f1a9b
GB
57892014-08-07 Gary Benson <gbenson@redhat.com>
5790
5791 * server.h: Do not include gdb/signals.h.
5792 * win32-low.c: Likewise.
5793
a5fceff8
GB
57942014-08-07 Gary Benson <gbenson@redhat.com>
5795
5796 * server.h: Do not include pathmax.h.
5797
b9391142
GB
57982014-08-07 Gary Benson <gbenson@redhat.com>
5799
5800 * server.h: Do not include libiberty.h.
5801 * linux-bfin-low.c: Likewise.
5802
0e443c87
GB
58032014-08-07 Gary Benson <gbenson@redhat.com>
5804
5805 * server.h: Do not include ansidecl.h.
5806
8ebb3f56
GB
58072014-08-07 Gary Benson <gbenson@redhat.com>
5808
5809 * linux-x86-low.c: Do not include stddef.h.
5810 * lynx-ppc-low.c: Likewise.
5811 * tracepoint.c: Likewise.
5812
8980bdf6
GB
58132014-08-07 Gary Benson <gbenson@redhat.com>
5814
5815 * server.h: Do not include stdarg.h.
5816 * nto-low.c: Likewise.
5817
d7096f71
GB
58182014-08-07 Gary Benson <gbenson@redhat.com>
5819
5820 * server.h: Do not include stdlib.h.
5821 * inferiors.c: Likewise.
5822 * linux-low.c: Likewise.
5823 * regcache.c: Likewise.
5824 * spu-low.c: Likewise.
5825 * tracepoint.c: Likewise.
5826 * utils.c: Likewise.
5827
d02f550d
GB
58282014-08-07 Gary Benson <gbenson@redhat.com>
5829
5830 * server.h: Do not include stdio.h.
5831 * linux-low.c: Likewise.
5832 * remote-utils.c: Likewise.
5833 * spu-low.c: Likewise.
5834 * utils.c: Likewise.
5835 * wincecompat.c: Likewise.
5836
87f6c4e3
GB
58372014-08-06 Gary Benson <gbenson@redhat.com>
5838
5839 * regcache.c (init_register_cache): Move conditionals inside if.
5840
7089dca4
GB
58412014-08-06 Gary Benson <gbenson@redhat.com>
5842
5843 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5844
462f517e
GB
58452014-07-31 Gary Benson <gbenson@redhat.com>
5846
5847 * ax.h: Do not include server.h.
5848 * gdbthread.h: Likewise.
5849 * lynx-low.h: Likewise.
5850 * notif.h: Likewise.
5851
976411d6
GB
58522014-07-30 Gary Benson <gbenson@redhat.com>
5853
5854 * server.h: Include common-defs.h.
5855 Do not include config.h or build-gnulib-gdbserver/config.h.
5856
d41f6d8e
GB
58572014-07-30 Gary Benson <gbenson@redhat.com>
5858
5859 * hostio-errno.c: Move server.h to top of includes list.
5860 * inferiors.c: Likewise.
5861 * linux-x86-low.c: Likewise.
5862 * notif.c: Include server.h.
5863
314c6a35
TT
58642014-07-24 Tom Tromey <tromey@redhat.com>
5865 Gary Benson <gbenson@redhat.com>
5866
5867 * server.h (CORE_ADDR): Now unsigned.
5868
69ff6be5
PA
58692014-07-16 Pedro Alves <palves@redhat.com>
5870
5871 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5872
ce9e3fe7
PA
58732014-07-15 Pedro Alves <palves@redhat.com>
5874
5875 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5876 copy.
5877
e76126e8
PA
58782014-07-11 Pedro Alves <palves@redhat.com>
5879
5880 * linux-low.c (kill_wait_lwp): New function, based on
5881 kill_one_lwp_callback, but use my_waitpid directly.
5882 (kill_one_lwp_callback, linux_kill): Use it.
5883
8e9db26e
PA
58842014-06-23 Pedro Alves <palves@redhat.com>
5885
5886 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5887 before setting DR0..DR3.
5888
698b3e08
GB
58892014-06-20 Gary Benson <gbenson@redhat.com>
5890
5891 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5892 * configure: Regenerated.
5893 * config.in: Likewise.
5894
125f8a3d
GB
58952014-06-20 Gary Benson <gbenson@redhat.com>
5896
5897 * Makefile.in (SFILES): Update locations for files moved
5898 from common to nat.
5899 (object file files): Reordered.
5900
42995dbd
GB
59012014-06-20 Gary Benson <gbenson@redhat.com>
5902
5903 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5904 (i386_dr_low_set_addr): Likewise.
5905 (i386_dr_low_get_addr): Likewise.
5906 (i386_dr_low_can_set_control): Likewise.
5907 (i386_dr_low_set_control): Likewise.
5908 (i386_dr_low_get_control): Likewise.
5909 (i386_dr_low_get_status): Likewise.
5910 (i386_get_debug_register_length): Likewise.
5911 * linux-x86-low.c (i386_dr_low_set_addr):
5912 Changed signature. Made static.
5913 (i386_dr_low_get_addr): Likewise.
5914 (i386_dr_low_set_control): Likewise.
5915 (i386_dr_low_get_control): Likewise.
5916 (i386_dr_low_get_status): Likewise.
5917 (i386_dr_low): New global variable.
5918 * win32-i386-low.c (i386_dr_low_set_addr):
5919 Changed signature. Made static.
5920 (i386_dr_low_get_addr): Likewise.
5921 (i386_dr_low_set_control): Likewise.
5922 (i386_dr_low_get_control): Likewise.
5923 (i386_dr_low_get_status): Likewise.
5924 (i386_dr_low): New global variable.
5925
e1d2394b
MS
59262014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5927
5928 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5929 * Makefile.in (AR, AR_FLAGS): Define.
5930 * configure: Regenerate.
5931
3a8ee006
GB
59322014-06-19 Gary Benson <gbenson@redhat.com>
5933
5934 * Makefile.in (i386-dregs.o): New rule.
5935 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5936 * i386-low.c (target.h): Remove include.
5937 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5938 (DR_CONTROL_SHIFT): Likewise.
5939 (DR_CONTROL_SIZE): Likewise.
5940 (DR_RW_EXECUTE): Likewise.
5941 (DR_RW_WRITE): Likewise.
5942 (DR_RW_READ): Likewise.
5943 (DR_RW_IORW): Likewise.
5944 (DR_LEN_1): Likewise.
5945 (DR_LEN_2): Likewise.
5946 (DR_LEN_4): Likewise.
5947 (DR_LEN_8): Likewise.
5948 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5949 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5950 (DR_ENABLE_SIZE): Likewise.
5951 (DR_LOCAL_SLOWDOWN): Likewise.
5952 (DR_GLOBAL_SLOWDOWN): Likewise.
5953 (DR_CONTROL_RESERVED): Likewise.
5954 (I386_DR_CONTROL_MASK): Likewise.
5955 (I386_DR_VACANT): Likewise.
5956 (I386_DR_LOCAL_ENABLE): Likewise.
5957 (I386_DR_GLOBAL_ENABLE): Likewise.
5958 (I386_DR_DISABLE): Likewise.
5959 (I386_DR_SET_RW_LEN): Likewise.
5960 (I386_DR_GET_RW_LEN): Likewise.
5961 (I386_DR_WATCH_HIT): Likewise.
5962 (i386_wp_op_t): Likewise.
5963 (i386_show_dr): Likewise.
5964 (i386_length_and_rw_bits): Likewise.
5965 (i386_insert_aligned_watchpoint): Likewise.
5966 (i386_remove_aligned_watchpoint): Likewise.
5967 (i386_handle_nonaligned_watchpoint): Likewise.
5968 i386_update_inferior_debug_regs(): Likewise.
5969 (i386_dr_insert_watchpoint): Likewise.
5970 (i386_dr_remove_watchpoint): Likewise.
5971 (i386_dr_region_ok_for_watchpoint): Likewise.
5972 (i386_dr_stopped_data_address): Likewise.
5973 (i386_dr_stopped_by_watchpoint): Likewise.
5974
8f26655c
GB
59752014-06-19 Gary Benson <gbenson@redhat.com>
5976
5977 * i386-low.c (i386_dr_show): Renamed to
5978 i386_show_dr and made static. All uses updated.
5979 (i386_dr_length_and_rw_bits): Renamed to
5980 i386_length_and_rw_bits and made static.
5981 All uses updated.
5982 (i386_dr_insert_aligned_watchpoint): Renamed to
5983 i386_insert_aligned_watchpoint and made static.
5984 All uses updated.
5985 (i386_dr_remove_aligned_watchpoint): Renamed to
5986 i386_remove_aligned_watchpoint and made static.
5987 All uses updated.
5988 (i386_dr_update_inferior_debug_regs): Renamed to
5989 i386_update_inferior_debug_regs and made static.
5990 All uses updated.
5991
b9228891
GB
59922014-06-18 Gary Benson <gbenson@redhat.com>
5993
5171def3
GB
5994 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5995 (i386_dr_low_can_set_control): Likewise.
5996 (i386_get_debug_register_length): Likewise.
5997 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5998 (i386_dr_low_can_set_control): Likewise.
5999 (i386_get_debug_register_length): Likewise.
6000
60012014-06-17 Gary Benson <gbenson@redhat.com>
6002
b9228891
GB
6003 * i386-low.h (i386-dregs.h): New include.
6004 (DR_FIRSTADDR): Now in i386-dregs.h.
6005 (DR_LASTADDR): Likewise.
6006 (DR_NADDR): Likewise.
6007 (DR_STATUS): Likewise.
6008 (DR_CONTROL): Likewise.
6009 (i386_debug_reg_state): Likewise.
6010 (i386_dr_insert_watchpoint): Likewise.
6011 (i386_dr_remove_watchpoint): Likewise.
6012 (i386_dr_region_ok_for_watchpoint): Likewise.
6013 (i386_dr_stopped_data_address): Likewise.
6014 (i386_dr_stopped_by_watchpoint): Likewise.
6015 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6016
4be83cc2
GB
60172014-06-18 Gary Benson <gbenson@redhat.com>
6018
6019 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6020 i386_dr_insert_watchpoint.
6021 (i386_low_remove_watchpoint): Renamed to
6022 i386_dr_remove_watchpoint.
6023 (i386_low_region_ok_for_watchpoint): Renamed to
6024 i386_dr_region_ok_for_watchpoint.
6025 (i386_low_stopped_data_address): Renamed to
6026 i386_dr_stopped_data_address.
6027 (i386_low_stopped_by_watchpoint): Renamed to
6028 i386_dr_stopped_by_watchpoint.
6029 * i386-low.c (i386_show_dr): Renamed to
6030 i386_dr_show and made nonstatic. All uses updated.
6031 (i386_length_and_rw_bits): Renamed to
6032 i386_dr_length_and_rw_bits and made nonstatic.
6033 All uses updated.
6034 (i386_insert_aligned_watchpoint): Renamed to
6035 i386_dr_insert_aligned_watchpoint and made nonstatic.
6036 All uses updated.
6037 (i386_remove_aligned_watchpoint): Renamed to
6038 i386_dr_remove_aligned_watchpoint and made nonstatic.
6039 All uses updated.
6040 (i386_update_inferior_debug_regs): Renamed to
6041 i386_dr_update_inferior_debug_regs and made nonstatic.
6042 All uses updated.
6043 (i386_low_insert_watchpoint): Renamed to
6044 i386_dr_insert_watchpoint. All uses updated.
6045 (i386_low_remove_watchpoint): Renamed to
6046 i386_dr_remove_watchpoint. All uses updated.
6047 (i386_low_region_ok_for_watchpoint): Renamed to
6048 i386_dr_region_ok_for_watchpoint. All uses updated.
6049 (i386_low_stopped_data_address): Renamed to
6050 i386_dr_stopped_data_address. All uses updated.
6051 (i386_low_stopped_by_watchpoint): Renamed to
6052 i386_dr_stopped_by_watchpoint. All uses updated.
6053
131aa0d4
GB
60542014-06-18 Gary Benson <gbenson@redhat.com>
6055
6056 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6057 (i386_dr_low_can_set_control): Likewise.
6058 (i386_insert_aligned_watchpoint): New check.
6059
d9305f7f
GB
60602014-06-18 Gary Benson <gbenson@redhat.com>
6061
6062 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6063 Renamed to state.
6064
e927c9fc
GB
60652014-06-18 Gary Benson <gbenson@redhat.com>
6066
6067 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6068 instead of fatal and error.
6069 (i386_handle_nonaligned_watchpoint): Likewise.
6070
1b6d4134
GB
60712014-06-18 Gary Benson <gbenson@redhat.com>
6072
6073 * i386-low.c (i386_get_debug_register_length): New macro.
6074 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6075 (i386_show_dr): Use debug_printf instead of fprintf. Use
6076 phex to format values.
6077
6e62758f
GB
60782014-06-18 Gary Benson <gbenson@redhat.com>
6079
6080 * i386-low.h: Comment changes.
6081 * i386-low.c: Likewise.
6082
fc6e2f03
GB
60832014-06-18 Gary Benson <gbenson@redhat.com>
6084
6085 * i386-low.c: Whitespace changes.
6086
f9d1eeed
TT
60872014-06-12 Tom Tromey <tromey@redhat.com>
6088
6089 * utils.c (freeargv): Remove.
6090
0b04e523
TT
60912014-06-12 Tom Tromey <tromey@redhat.com>
6092
6093 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6094 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6095 (parse_debug_format_options): Likewise.
6096 (gdbserver_usage): Likewise.
6097 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6098 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6099 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6100 against libiberty.
6101 ($(LIBGNU)): Depend on libiberty.
6102 (all-lib): Recurse into all subdirs.
6103 (install-only): Invoke "install" target in subdirs.
6104 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6105 targets.
6106 * configure: Rebuild.
6107 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6108 for vasprintf, vsnprintf, or gettimeofday.
6109 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6110 srv_tgtobj.
6111
270c9937
JB
61122014-06-05 Joel Brobecker <brobecker@adacore.com>
6113
6114 * development.sh: Delete.
6115 * Makefile.in (config.status): Adjust dependency on development.sh.
6116 * configure.ac: Adjust development.sh source call.
6117 * configure: Regenerate.
6118
0a261ed8
PA
61192014-06-02 Pedro Alves <palves@redhat.com>
6120
6121 * ax.c (gdb_free_agent_expr): New function.
6122 * ax.h (gdb_free_agent_expr): New declaration.
6123 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6124 list.
6125 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6126 static.
6127 (clear_breakpoint_conditions_and_commands): New function.
6128 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6129 (clear_breakpoint_conditions_and_commands): New declaration.
6130
e9dae05e
RR
61312014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6132
6133 * linux-aarch64-low.c (asm/ptrace.h): Include.
6134
5876f503
JK
61352014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6136
6137 Fix TLS access for -static -pthread.
6138 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6139 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6140 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6141
802e8e6d
PA
61422014-05-20 Pedro Alves <palves@redhat.com>
6143
6144 * linux-aarch64-low.c (aarch64_insert_point)
6145 (aarch64_remove_point): No longer check whether the type is
6146 supported here. Adjust to new interface.
6147 (the_low_target): Install aarch64_supports_z_point_type as
6148 supports_z_point_type method.
6149 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6150 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6151 instead of a Z packet char. Adjust.
6152 (arm_supports_z_point_type): New function.
6153 (arm_insert_point, arm_remove_point): Adjust to new interface.
6154 (the_low_target): Install arm_supports_z_point_type.
6155 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6156 (cris_insert_point, cris_remove_point): Adjust to new interface.
6157 Don't check whether the type is supported here.
6158 (the_low_target): Install cris_supports_z_point_type.
6159 * linux-low.c (linux_supports_z_point_type): New function.
6160 (linux_insert_point, linux_remove_point): Adjust to new interface.
6161 * linux-low.h (struct linux_target_ops) <insert_point,
6162 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6163 raw_breakpoint pointer parameter.
6164 <supports_z_point_type>: New method.
6165 * linux-mips-low.c (mips_supports_z_point_type): New function.
6166 (mips_insert_point, mips_remove_point): Adjust to new interface.
6167 Use mips_supports_z_point_type.
6168 (the_low_target): Install mips_supports_z_point_type.
6169 * linux-ppc-low.c (the_low_target): Install NULL as
6170 supports_z_point_type method.
6171 * linux-s390-low.c (the_low_target): Install NULL as
6172 supports_z_point_type method.
6173 * linux-sparc-low.c (the_low_target): Install NULL as
6174 supports_z_point_type method.
6175 * linux-x86-low.c (x86_supports_z_point_type): New function.
6176 (x86_insert_point): Adjust to new insert_point interface. Use
6177 insert_memory_breakpoint. Adjust to new
6178 i386_low_insert_watchpoint interface.
6179 (x86_remove_point): Adjust to remove_point interface. Use
6180 remove_memory_breakpoint. Adjust to new
6181 i386_low_remove_watchpoint interface.
6182 (the_low_target): Install x86_supports_z_point_type.
6183 * lynx-low.c (lynx_target_ops): Install NULL as
6184 supports_z_point_type callback.
6185 * nto-low.c (nto_supports_z_point_type): New.
6186 (nto_insert_point, nto_remove_point): Adjust to new interface.
6187 (nto_target_ops): Install nto_supports_z_point_type.
6188 * mem-break.c: Adjust intro comment.
6189 (struct raw_breakpoint) <raw_type, size>: New fields.
6190 <inserted>: Update comment.
6191 <shlib_disabled>: Delete field.
6192 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6193 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6194 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6195 (raw_bkpt_type_to_target_hw_bp_type): New function.
6196 (find_enabled_raw_code_breakpoint_at): New function.
6197 (find_raw_breakpoint_at): New type and size parameters. Use them.
6198 (insert_memory_breakpoint): New function, based off
6199 set_raw_breakpoint_at.
6200 (remove_memory_breakpoint): New function.
6201 (set_raw_breakpoint_at): Reimplement.
6202 (set_breakpoint): New, based on set_breakpoint_at.
6203 (set_breakpoint_at): Reimplement.
6204 (delete_raw_breakpoint): Go through the_target->remove_point
6205 instead of assuming memory breakpoints.
6206 (find_gdb_breakpoint_at): Delete.
6207 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6208 (find_gdb_breakpoint): New function.
6209 (set_gdb_breakpoint_at): Delete.
6210 (z_type_supported): New function.
6211 (set_gdb_breakpoint_1): New function, loosely based off
6212 set_gdb_breakpoint_at.
6213 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6214 (delete_gdb_breakpoint_at): Delete.
6215 (delete_gdb_breakpoint_1): New function, loosely based off
6216 delete_gdb_breakpoint_at.
6217 (delete_gdb_breakpoint): New function.
6218 (clear_gdb_breakpoint_conditions): Rename to ...
6219 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6220 breakpoint.
6221 (add_condition_to_breakpoint): Make static.
6222 (add_breakpoint_condition): Take a struct breakpoint pointer
6223 instead of an address. Adjust.
6224 (gdb_condition_true_at_breakpoint): Rename to ...
6225 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6226 z_type parameter.
6227 (gdb_condition_true_at_breakpoint): Reimplement.
6228 (add_breakpoint_commands): Take a struct breakpoint pointer
6229 instead of an address. Adjust.
6230 (gdb_no_commands_at_breakpoint): Rename to ...
6231 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6232 parameter. Return true if no breakpoint was found. Change debug
6233 output.
6234 (gdb_no_commands_at_breakpoint): Reimplement.
6235 (run_breakpoint_commands): Rename to ...
6236 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6237 and change return type to boolean.
6238 (run_breakpoint_commands): New function.
6239 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6240 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6241 breakpoint. Go through the_target->remove_point instead of
6242 assuming memory breakpoint.
6243 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6244 software and hardware breakpoints.
6245 (reinsert_raw_breakpoint): Go through the_target->insert_point
6246 instead of assuming memory breakpoint.
6247 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6248 software and hardware breakpoints.
6249 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6250 Check both software and hardware breakpoints.
6251 (validate_inserted_breakpoint): Assert the breakpoint is a
6252 software breakpoint. Set the inserted flag to -1 instead of
6253 setting shlib_disabled.
6254 (delete_disabled_breakpoints): Adjust.
6255 (validate_breakpoints): Only validate software breakpoints.
6256 Adjust to inserted flag change.
6257 (check_mem_read, check_mem_write): Skip breakpoint types other
6258 than software breakpoints. Adjust to inserted flag change.
6259 * mem-break.h (enum raw_bkpt_type): New enum.
6260 (raw_breakpoint, struct process_info): Forward declare.
6261 (Z_packet_to_target_hw_bp_type): Delete declaration.
6262 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6263 (set_gdb_breakpoint, delete_gdb_breakpoint)
6264 (clear_breakpoint_conditions): New declarations.
6265 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6266 (breakpoint_inserted_here): Update comment.
6267 (add_breakpoint_condition, add_breakpoint_commands): Replace
6268 address parameter with a breakpoint pointer parameter.
6269 (gdb_breakpoint_here): Update comment.
6270 (delete_gdb_breakpoint_at): Delete.
6271 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6272 * server.c (process_point_options): Take a struct breakpoint
6273 pointer instead of an address. Adjust.
6274 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6275 delete_gdb_breakpoint.
6276 * spu-low.c (spu_target_ops): Install NULL as
6277 supports_z_point_type method.
6278 * target.h: Include mem-break.h.
6279 (struct target_ops) <prepare_to_access_memory>: Update comment.
6280 <supports_z_point_type>: New field.
6281 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6282 instead of a char. Also take a raw breakpoint pointer.
6283 * win32-arm-low.c (the_low_target): Install NULL as
6284 supports_z_point_type.
6285 * win32-i386-low.c (i386_supports_z_point_type): New function.
6286 (i386_insert_point, i386_remove_point): Adjust to new interface.
6287 (the_low_target): Install i386_supports_z_point_type.
6288 * win32-low.c (win32_supports_z_point_type): New function.
6289 (win32_insert_point, win32_remove_point): Adjust to new interface.
6290 (win32_target_ops): Install win32_supports_z_point_type.
6291 * win32-low.h (struct win32_target_ops):
6292 <supports_z_point_type>: New method.
6293 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6294 instead of a char. Also take a raw breakpoint pointer.
6295
932539e3
PA
62962014-05-20 Pedro Alves <palves@redhat.com>
6297
6298 * mem-break.h: Include break-common.h.
6299 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6300 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6301 (Z_packet_to_target_hw_bp_type): New declaration.
6302 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6303 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6304 (Z_PACKET_ACCESS_WP): Delete macros.
6305 (Z_packet_to_hw_type): Delete function.
6306 * i386-low.h: Don't include break-common.h here.
6307 (Z_packet_to_hw_type): Delete declaration.
6308 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6309 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6310 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6311 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6312 * linux-aarch64-low.c: Don't include break-common.h here.
6313 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6314 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6315 (Z_packet_to_target_hw_bp_type): Delete function.
6316 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6317 function.
6318 (mips_insert_point, mips_remove_point): Use
6319 Z_packet_to_target_hw_bp_type.
6320
4ff0d3d8
PA
63212014-05-20 Pedro Alves <palves@redhat.com>
6322
6323 * linux-aarch64-low.c: Include break-common.h.
6324 (enum target_point_type): Delete.
6325 (Z_packet_to_point_type): Rename to ...
6326 (Z_packet_to_target_hw_bp_type): ... this, and return a
6327 target_hw_bp_type instead.
6328 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6329 instead of an enum target_point_type.
6330 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6331 breakpoint type.
6332 (aarch64_dr_state_insert_one_point)
6333 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6334 (aarch64_handle_aligned_watchpoint)
6335 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6336 Take an enum target_hw_bp_type instead of an enum
6337 target_point_type.
6338 (aarch64_supports_z_point_type): New function.
6339 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6340 use Z_packet_to_target_hw_bp_type.
6341
786dc519
JB
63422014-05-20 Joel Brobecker <brobecker@adacore.com>
6343
6344 * configure.ac: Only use -Werror by default when DEVELOPMENT
6345 is true.
6346 * configure: Regenerate.
6347
9e0aa64f
JK
63482014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6349
6350 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6351 * linux-x86-low.c (X86_64_USER_REGS): New.
6352 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6353
2b577b92
YQ
63542014-04-28 Yao Qi <yao@codesourcery.com>
6355
6356 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6357 name.
6358
94611da2
PA
63592014-04-25 Pedro Alves <palves@redhat.com>
6360
6361 PR server/16255
6362 * linux-low.c (linux_attach_fail_reason_string): New function.
6363 (linux_attach_lwp): Delete.
6364 (linux_attach_lwp_1): Rename to ...
6365 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6366 argument. Remove "initial" parameter. Return int instead of
6367 void. Don't error or warn here.
6368 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6369 failure to attach to the tgid. Call warning when failing to
6370 attach to an lwp.
6371 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6372 argument. Remove "initial" parameter. Return int instead of
6373 void. Don't error or warn here.
6374 (linux_attach_fail_reason_string): New declaration.
6375 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6376 interface change. Use linux_attach_fail_reason_string.
6377
01f9f808
MS
63782014-04-24 Michael Sturm <michael.sturm@mintel.com>
6379 Walfred Tedeschi <walfred.tedeschi@intel.com>
6380
6381 * Makefile.in: Added rules to handle new files
6382 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6383 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6384 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6385 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6386 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6387 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6388 x32-avx512-linux.o.
6389 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6390 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6391 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6392 i386/x32-avx512.xml.
6393 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6394 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6395 i386/x32-avx512-linux.xml.
6396 * i387-fp.c (num_avx512_k_registers): New constant for number
6397 of K registers.
6398 (num_avx512_zmmh_low_registers): New constant for number of
6399 lower ZMM registers (0-15).
6400 (num_avx512_zmmh_high_registers): New constant for number of
6401 higher ZMM registers (16-31).
6402 (num_avx512_ymmh_registers): New contant for number of higher
6403 YMM registers (ymm16-31 added by avx521 on x86_64).
6404 (num_avx512_xmm_registers): New constant for number of higher
6405 XMM registers (xmm16-31 added by AVX512 on x86_64).
6406 (struct i387_xsave): Add space for AVX512 registers.
6407 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6408 Add code to handle AVX512 registers.
6409 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6410 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6411 prototypei from generated file.
6412 (tdesc_amd64_avx512_linux): Likewise.
6413 (init_registers_x32_avx512_linux): Likewise.
6414 (tdesc_x32_avx512_linux): Likewise.
6415 (init_registers_i386_avx512_linux): Likewise.
6416 (tdesc_i386_avx512_linux): Likewise.
6417 (x86_64_regmap): Add AVX512 registers.
6418 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6419 mask.
6420 (initialize_low_arch): Add code to initialize AVX512 registers.
6421
51aa91f9
PA
64222014-04-23 Pedro Alves <palves@redhat.com>
6423
6424 * mem-break.c (find_gdb_breakpoint_at): Make static.
6425 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6426
a4165e94
PA
64272014-04-23 Pedro Alves <palves@redhat.com>
6428
6429 * i386-low.c: Don't include break-common.h here.
6430 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6431 prototype to take target_hw_bp_type as argument instead of a Z
6432 packet char.
6433 * i386-low.h: Include break-common.h here.
6434 (Z_packet_to_hw_type): Declare.
6435 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6436 prototypes.
6437 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6438 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6439 (x86_remove_point): Convert the packet number to a
6440 target_hw_bp_type before calling i386_low_remove_watchpoint.
6441 * win32-i386-low.c (i386_insert_point): Convert the packet number
6442 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6443 (i386_remove_point): Convert the packet number to a
6444 target_hw_bp_type before calling i386_low_remove_watchpoint.
6445
b8acf843
PA
64462014-04-23 Pedro Alves <palves@redhat.com>
6447
6448 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6449
d708bcd1
PA
64502014-04-10 Pedro Alves <palves@redhat.com>
6451
6452 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6453 Check if the condition or command is NULL before checking if the
6454 breakpoint is known. On success, return true.
6455 * mem-break.h (add_breakpoint_condition): Document return.
6456 (add_breakpoint_commands): Add describing comment.
6457 * server.c (skip_to_semicolon): New function.
6458 (process_point_options): Use it.
6459
2eec7d5b
PA
64602014-04-09 Pedro Alves <palves@redhat.com>
6461
6462 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6463 to lwpid_of.
6464
fa96cb38
PA
64652014-02-27 Pedro Alves <palves@redhat.com>
6466
6467 PR 12702
6468 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6469 macros.
6470 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6471 output.
6472 (last_thread_of_process_p): Take a PID argument instead of a
6473 thread pointer.
6474 (linux_wait_for_lwp): Delete.
6475 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6476 functions.
6477 (linux_low_filter_event): New function, party factored out from
6478 linux_wait_for_event.
6479 (linux_wait_for_event): Rename to ...
6480 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6481 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6482 sigsuspend. Check for zombie leaders.
6483 (linux_wait_for_event): Reimplement as wrapper around
6484 linux_wait_for_event_filtered.
6485 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6486 a normal or signal exit is seen, it's the whole process exiting.
6487 (wait_for_sigstop): No longer a for_each_inferior callback.
6488 Rewrite on top of linux_wait_for_event_filtered.
6489 (stop_all_lwps): Call wait_for_sigstop directly.
6490 * server.c (resume, handle_target_event): Handle
6491 TARGET_WAITKIND_NO_RESUMED.
6492
d763de10
JB
64932014-02-26 Joel Brobecker <brobecker@adacore.com>
6494
6495 * win32-low.c (psapi_get_dll_name,
6496 * win32_CreateToolhelp32Snapshot): Delete.
6497 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6498 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6499 Delete.
6500 (handle_load_dll): Add function description.
6501 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6502
850a0f76
JB
65032014-02-26 Joel Brobecker <brobecker@adacore.com>
6504
6505 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6506 Add comment.
6507 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6508 base address when calling win32_add_one_solib.
6509 (handle_load_dll): Delete local variable load_addr.
6510 Remove 0x1000 offset applied to DLL base address when calling
6511 win32_add_one_solib.
6512 (handle_unload_dll): Add comment.
6513
f25b3fc3
JB
65142014-02-26 Joel Brobecker <brobecker@adacore.com>
6515
6516 * win32-low.c (win32_add_all_dlls): Renames
6517 win32_ensure_ntdll_loaded. Rewrite function documentation.
6518 Adjust implementation to always load all DLLs.
6519 Add 0x1000 offset to DLL base address when calling
6520 win32_add_one_solib.
6521 (child_initialization_done): New static global.
6522 (do_initial_child_stuff): Set child_initialization_done to
6523 zero during child initialization, and 1 after. Replace call
6524 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6525 Add comment.
6526 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6527 (handle_unload_dll): Add function documentation.
6528 (get_child_debug_event): Ignore load and unload DLL events
6529 during child initialization.
6530
d86d4aaf
DE
65312014-02-20 Doug Evans <dje@google.com>
6532
3bc32da3 6533 Remove global all_lwps.
d86d4aaf
DE
6534 * inferiors.h (ptid_of): Move here from linux-low.h.
6535 (pid_of, lwpid_of): Ditto.
6536 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6537 parameter is a struct thread_info * now.
6538 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6539 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6540 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6541 directly.
6542 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6543 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6544 * linux-arm-low.c (update_registers_callback): Update, "entry"
6545 parameter is a struct thread_info * now.
6546 Fetch lwpid from current_inferior directly.
6547 (arm_insert_point): Pass &all_threads to find_inferior instead of
6548 &all_lwps.
6549 (arm_remove_point): Ditto.
6550 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6551 (arm_prepare_to_resume): Fetch pid from thread.
6552 (arm_read_description): Fetch lwpid from current_inferior directly.
6553 * linux-low.c (all_lwps): Delete.
6554 (delete_lwp): Delete call to remove_inferior.
6555 (handle_extended_wait): Fetch lwpid from thread.
6556 (add_lwp): Don't set lwp->entry.id. Remove call to
6557 add_inferior_to_list.
6558 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6559 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6560 (kill_one_lwp_callback): Ditto.
6561 (linux_kill): Don't dereference NULL pointer.
6562 Fetch ptid,lwpid from thread.
6563 (get_detach_signal): Fetch ptid from thread.
6564 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6565 Simplify call to regcache_invalidate_thread.
6566 (delete_lwp_callback): Update, "entry" parameter is a
6567 struct thread_info * now. Fetch pid from thread.
6568 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6569 (status_pending_p_callback): Update, "entry" parameter is a
6570 struct thread_info * now. Fetch ptid from thread.
6571 (find_lwp_pid): Update, "entry" parameter is a
6572 struct thread_info * now.
6573 (linux_wait_for_lwp): Fetch pid from thread.
6574 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6575 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6576 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6577 (dequeue_one_deferred_signal): Ditto.
6578 (cancel_breakpoint): Fetch ptid from current_inferior.
6579 (linux_wait_for_event): Pass &all_threads to find_inferior,
6580 not &all_lwps. Fetch ptid, lwpid from thread.
6581 (count_events_callback): Update, "entry" parameter is a
6582 struct thread_info * now.
6583 (select_singlestep_lwp_callback): Ditto.
6584 (select_event_lwp_callback): Ditto.
6585 (cancel_breakpoints_callback): Ditto.
6586 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6587 not &all_lwps.
6588 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6589 (unsuspend_one_lwp): Update, "entry" parameter is a
6590 struct thread_info * now.
6591 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6592 not &all_lwps.
6593 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6594 Fetch lwpid from thread, not lwp.
6595 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6596 Pass &all_threads to find_inferior, not &all_lwps.
6597 (send_sigstop): Fetch lwpid from thread, not lwp.
6598 (send_sigstop_callback): Update, "entry" parameter is a
6599 struct thread_info * now.
6600 (suspend_and_send_sigstop_callback): Ditto.
6601 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6602 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6603 struct thread_info * now.
6604 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6605 from thread, lwp.
6606 (lwp_running): Update, "entry" parameter is a
6607 struct thread_info * now.
6608 (stop_all_lwps): Fetch ptid from thread.
6609 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6610 (linux_resume_one_lwp): Fetch lwpid from thread.
6611 (linux_set_resume_request): Update, "entry" parameter is a
6612 struct thread_info * now. Fetch pid, lwpid from thread.
6613 (resume_status_pending_p): Update, "entry" parameter is a
6614 struct thread_info * now.
6615 (need_step_over_p): Ditto. Fetch lwpid from thread.
6616 (start_step_over): Fetch lwpid from thread.
6617 (linux_resume_one_thread): Update, "entry" parameter is a
6618 struct thread_info * now. Fetch lwpid from thread.
6619 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6620 (proceed_one_lwp): Update, "entry" parameter is a
6621 struct thread_info * now. Fetch lwpid from thread.
6622 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6623 struct thread_info * now.
6624 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6625 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6626 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6627 directly.
6628 (regsets_store_inferior_registers): Ditto.
6629 (fetch_register, store_register): Ditto.
6630 (linux_read_memory, linux_write_memory): Ditto.
6631 (linux_request_interrupt): Ditto.
6632 (linux_read_auxv): Ditto.
6633 (linux_xfer_siginfo): Ditto.
6634 (linux_qxfer_spu): Ditto.
6635 (linux_qxfer_libraries_svr4): Ditto.
6636 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6637 moved to inferiors.h.
6638 (get_lwp): Delete.
6639 (get_thread_lwp): Update.
6640 (struct lwp_info): Delete member "entry". Simplify comment for
6641 member "thread".
6642 (all_lwps): Delete.
6643 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6644 current_inferior directly.
6645 (update_watch_registers_callback): Update, "entry" parameter is a
6646 struct thread_info * now. Fetch pid from thread.
6647 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6648 (mips_insert_point): Fetch lwpid from current_inferior.
6649 Pass &all_threads to find_inferior, not &all_lwps.
6650 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6651 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6652 directly.
6653 (mips_stopped_data_address): Ditto.
6654 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6655 directly.
6656 * linux-tile-low.c (tile_arch_setup): Ditto.
6657 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6658 (update_debug_registers_callback): Update, "entry" parameter is a
6659 struct thread_info * now. Fetch pid from thread.
6660 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6661 Pass &all_threads to find_inferior, not &all_lwps.
6662 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6663 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6664 Pass &all_threads to find_inferior, not &all_lwps.
6665 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6666 (i386_dr_low_get_status): Ditto.
6667 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6668 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6669 (x86_linux_read_description): Ditto.
6670 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6671
3b8361aa
DE
66722014-02-20 Doug Evans <dje@google.com>
6673
6674 * inferiors.c (get_first_inferior): Fix buglet.
6675
f7667f0d
DE
66762014-02-19 Doug Evans <dje@google.com>
6677
6678 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6679 * inferiors.c (add_thread): Change result type to struct thread_info *.
6680 All callers updated.
6681 (add_lwp): Call add_thread here instead of in callers.
6682 All callers updated.
6683 * linux-low.h (get_lwp_thread): Rewrite.
6684 (struct lwp_info): New member "thread".
6685
b3312d80
DE
66862014-02-19 Doug Evans <dje@google.com>
6687
6688 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6689 All callers updated.
6690
ecc6f45c
DE
66912014-02-19 Doug Evans <dje@google.com>
6692
6693 * inferiors.c (add_thread): Fix whitespace.
6694
649ebbca
DE
66952014-02-19 Doug Evans <dje@google.com>
6696
6697 * dll.c (clear_dlls): Replace accessing list implemention details
6698 with API function.
6699 * gdbthread.h (get_first_thread): Declare.
6700 * inferiors.c (for_each_inferior_with_data): New function.
6701 (get_first_thread): New function.
6702 (find_thread_ptid): Simplify.
6703 (get_first_inferior): New function.
6704 (clear_list): Delete.
6705 (one_inferior_p): New function.
6706 (clear_inferior_list): New function.
6707 (clear_inferiors): Update.
6708 * inferiors.h (for_each_inferior_with_data): Declare.
6709 (clear_inferior_list): Declare.
6710 (one_inferior_p): Declare.
6711 (get_first_inferior): Declare.
6712 * linux-low.c (linux_wait_for_event): Replace accessing list
6713 implemention details with API function.
6714 * server.c (target_running): Ditto.
6715 (accumulate_file_name_length): New function.
6716 (emit_dll_description): New function.
6717 (handle_qxfer_libraries): Replace accessing list implemention
6718 details with API function.
6719 (handle_qxfer_threads_worker): New function.
6720 (handle_qxfer_threads_proper): Replace accessing list implemention
6721 details with API function.
6722 (handle_query): Ditto.
6723 (visit_actioned_threads_callback_ftype): New typedef.
6724 (visit_actioned_threads_data): New struct.
6725 (visit_actioned_threads): Rewrite to be find_inferior callback.
6726 (resume): Call find_inferior.
6727 (handle_status): Replace accessing list implemention
6728 details with API function.
6729 (process_serial_event): Replace accessing list implemention details
6730 with API function.
6731 * target.c (set_desired_inferior): Replace accessing list implemention
6732 details with API function.
6733 * tracepoint.c (same_process_p): New function.
6734 (gdb_agent_about_to_close): Replace accessing list implemention
6735 details with API function.
6736 * win32-low.c (child_delete_thread): Replace accessing list
6737 implemention details with API function.
6738 (match_dll_by_basename): New function.
6739 (dll_is_loaded_by_basename): New function.
6740 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6741 details call to dll_is_loaded_by_basename.
6742
80894984
DE
67432014-02-19 Doug Evans <dje@google.com>
6744
6745 * dll.h (struct dll_info): Add comment.
6746 * gdbthread.h (struct thread_info): Add comment.
6747 (current_ptid): Simplify.
6748 * inferiors.c (add_process): Update.
6749 (remove_process): Update.
6750 * inferiors.h (struct process_info): Rename member "head" to "entry".
6751 * linux-low.c (delete_lwp): Update.
6752 (add_lwp): Update.
6753 (last_thread_of_process_p): Update.
6754 (kill_one_lwp_callback, linux_kill): Update.
6755 (status_pending_p_callback): Update.
6756 (wait_for_sigstop): Update. Simplify read of ptid.
6757 (start_step_over): Update.
6758 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6759 (get_lwp_thread): Update.
6760 (struct lwp_info): Rename member "head" to "entry".
6761 * regcache.h (inferior_list_entry): Delete.
6762 * server.c (kill_inferior_callback): Update.
6763 (detach_or_kill_inferior_callback): Update.
6764 (print_started_pid): Update.
6765 (print_attached_pid): Update.
6766 (process_serial_event): Simplify read of ptid.
6767 * thread-db.c (thread_db_create_event): Update.
6768 (thread_db_get_tls_address): Update.
6769 * win32-low.c (current_inferior_ptid): Simplify.
6770
46917d26
TT
67712014-02-19 Tom Tromey <tromey@redhat.com>
6772
6773 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6774 argument.
6775 (target_supports_btrace): Update.
6776
0759a81e
YQ
67772014-02-14 Yao Qi <yao@codesourcery.com>
6778
6779 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6780 (rsp-low-ipa.o): New target.
6781
a7191e8b
TT
67822014-02-12 Tom Tromey <tromey@redhat.com>
6783
6784 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6785 convert_ascii_to_int.
6786 * regcache.c (registers_to_string): Likewise.
6787 * remote-utils.c (decode_M_packet): Likewise.
6788 * server.c (process_serial_event): Likewise.
6789
ff0e980e
TT
67902014-02-12 Tom Tromey <tromey@redhat.com>
6791
6792 * server.c (handle_query, handle_v_run): Use hex2bin, not
6793 unhexify.
6794 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6795
e9371aff
TT
67962014-02-12 Tom Tromey <tromey@redhat.com>
6797
6798 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6799 convert_int_to_ascii.
6800 * regcache.c (registers_to_string, collect_register_as_string):
6801 Likewise.
6802 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6803 Likewise.
6804 * server.c (process_serial_event): Likewise.
6805 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6806 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6807
971dc0b8
TT
68082014-02-12 Tom Tromey <tromey@redhat.com>
6809
6810 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6811 bin2hex, not hexify.
6812 * tracepoint.c (cmd_qtstatus): Likewise.
6813
0a822afb
TT
68142014-02-12 Tom Tromey <tromey@redhat.com>
6815
6816 * remote-utils.c (monitor_output): Pass explicit length to
6817 hexify.
6818
9c3d6531
TT
68192014-02-12 Tom Tromey <tromey@redhat.com>
6820
6821 * tracepoint.c: Include rsp-low.h.
6822 * server.c: Include rsp-low.h.
6823 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6824 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6825 declare.
6826 * remote-utils.c: Include rsp-low.h.
6827 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6828 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6829 (convert_int_to_ascii, convert_ascii_to_int): Move to
6830 common/rsp-low.c.
6831 * regcache.c: Include rsp-low.h.
6832 * ax.c: Include rsp-low.h.
6833 * Makefile.in (SFILES): Add common/rsp-low.c.
6834 (OBS): Add rsp-low.o.
6835 (rsp-low.o): New target.
6836
01fd3ea5
TT
68372014-02-12 Tom Tromey <tromey@redhat.com>
6838
6839 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6840 Include print-utils.h.
6841 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6842 (plongest, thirty_two, phex_nz): Remove.
6843 * Makefile.in (SFILES): Add common/print-utils.c.
6844 (OBS): Add print-utils.o.
6845 (print-utils-ipa.o): New target.
6846 (print-utils.o): New target.
6847 (IPA_OBJS): Add print-utils-ipa.o.
6848
e99dc820
TT
68492014-02-06 Tom Tromey <tromey@redhat.com>
6850
6851 * Makefile.in (SFILES): Fix indentation.
6852
ee1e2d4f
DE
68532014-02-05 Doug Evans <dje@google.com>
6854
6855 * linux-low.c (linux_wait_for_event): Improve comment.
6856 (linux_wait_1): Keep current_inferior in sync with event_child.
6857
f5a02773
DE
68582014-01-22 Doug Evans <dje@google.com>
6859
6860 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6861
87ce2a04
DE
68622014-01-22 Doug Evans <dje@google.com>
6863
6864 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6865 * configure: Regenerate.
6866 * config.in: Regenerate.
6867 * Makefile.in (SFILES): Add debug.c.
6868 (OBS): Add debug.o.
6869 * debug.c: New file.
6870 * debug.h: New file.
6871 * linux-aarch64-low.c (*): Update all debugging printfs to use
6872 debug_printf instead of fprintf.
6873 * linux-arm-low.c (*): Ditto.
6874 * linux-cris-low.c (*): Ditto.
6875 * linux-crisv32-low.c (*): Ditto.
6876 * linux-m32r-low.c (*): Ditto.
6877 * linux-sparc-low.c (*): Ditto.
6878 * linux-x86.c (*): Ditto.
6879 * linux-low.c (*): Ditto.
6880 (linux_wait_1): Add calls to debug_enter, debug_exit.
6881 (linux_wait): Remove redundant debugging printf.
6882 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6883 (linux_resume, unstop_all_lwps): Ditto.
6884 * mem-break.c (*): Update all debugging printfs to use
6885 debug_printf instead of fprintf.
6886 * remote-utils.c (*): Ditto.
6887 * thread-db.c (*): Ditto.
6888 * server.c #include <ctype.h>, "gdb_vecs.h".
6889 (debug_threads): Moved to debug.c.
6890 (*): Update all debugging printfs to use debug_printf instead of
6891 fprintf.
6892 (start_inferior): Replace call to fflush with call to debug_flush.
6893 (monitor_show_help): Mention set debug-format.
6894 (parse_debug_format_options): New function.
6895 (handle_monitor_command): Handle "monitor set debug-format".
6896 (gdbserver_usage): Mention --debug-format.
6897 (main): Parse --debug-format.
6898 * server.h (debug_threads): Declaration moved to debug.h.
6899 #include "debug.h".
6900 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6901 trace_debug_1 that uses debug_printf.
6902 (tracepoint_look_up_symbols): Update all debugging printfs to use
6903 debug_printf instead of fprintf.
6904
e671835b
BS
69052014-01-20 Baruch Siach <baruch@tkos.co.il>
6906
6907 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6908 sys/ptrace.h.
6909
b5737fa9
PA
69102014-01-17 Pedro Alves <palves@redhat.com>
6911
ea38d2a9 6912 PR build/16445
c7faa97a
PA
6913 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6914 defined after including gdb_proc_service.h.
b5737fa9 6915
40ed484e
DE
69162014-01-16 Doug Evans <dje@google.com>
6917
6918 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6919 (match_dll): Use it.
6920
969c39fb
MM
69212014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6922
6923 * target.h (target_ops) <read_btrace>: Change parameters and
6924 return type to allow error reporting.
6925 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6926 trace reading errors on.
6927 * linux-low.c (linux_low_read_btrace): Pass trace reading
6928 errors on.
6929 (linux_low_disable_btrace): New.
6930
ab7f45ba
DE
69312014-01-15 Doug Evans <dje@google.com>
6932
6933 * inferiors.c (thread_id_to_gdb_id): Delete.
6934 * inferiors.h (thread_id_to_gdb_id): Delete.
6935
66af0f44
EZ
69362014-01-13 Eli Zaretskii <eliz@gnu.org>
6937
6938 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6939 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6940 versions.
6941
9939e131
PA
69422014-01-08 Pedro Alves <palves@redhat.com>
6943
6944 * server.c (handle_status): Don't discard previous queued stop
6945 replies or thread's pending status here.
6946 (main) <disconnection>: Do it here instead.
6947
b7ea362b
PA
69482014-01-08 Pedro Alves <palves@redhat.com>
6949
6950 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6951 * server.c (visit_actioned_threads, handle_pending_status): New
6952 function.
6953 (handle_v_cont): Factor out parts to ...
6954 (resume): ... this new function. If in all-stop, and a thread
6955 being resumed has a pending status, report it without actually
6956 resuming.
6957 (myresume): Adjust to use the new 'resume' function.
6958 (clear_pending_status_callback, set_pending_status_callback)
6959 (find_status_pending_thread_callback): New functions.
6960 (handle_status): Handle the case of multiple threads having
6961 interesting statuses to report. Report threads' real last signal
6962 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6963 with an interesting thread to report the status for, instead of
6964 always reporting the status of the first thread.
6965
28498c42
JB
69662014-01-01 Joel Brobecker <brobecker@adacore.com>
6967
6968 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6969 * gdbreplay.c (gdbreplay_version): Likewise.
6970
f45c82da
YZ
69712013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6972
6973 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6974 iov.iov_len with the real length in use.
6975
379a5e2d
JB
69762013-12-13 Joel Brobecker <brobecker@adacore.com>
6977
6978 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6979 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6980 for all targets that use win32-low.c.
6981 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6982 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6983
4210d83e
PA
69842013-12-13 Pedro Alves <palves@redhat.com>
6985
6986 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6987 if equal to TARGET_WAITKIND_LOADED.
6988 * win32-low.c (cached_status): New static global.
6989 (win32_wait): Add declaration.
6990 (do_initial_child_stuff): Flush all initial pending debug events
6991 up to the initial breakpoint.
6992 (win32_wait): If CACHED_STATUS was set, return that instead
6993 of doing a real wait. Remove the code resuming the execution
6994 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6995 during the initial phase. Also remove the code changing
6996 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6997 TARGET_WAITKIND_STOPPED.
6998
e7f0d979
YQ
69992013-12-11 Yao Qi <yao@codesourcery.com>
7000
7001 * notif.c (handle_notif_ack): Return 0 if no notification
7002 matches.
7003
ebcf782c
DE
70042013-11-20 Doug Evans <dje@google.com>
7005
7006 * linux-low.c (linux_set_resume_request): Fix comment.
7007
20ad9378
DE
70082013-11-20 Doug Evans <dje@google.com>
7009
7010 * linux-low.c (resume_status_pending_p): Tweak comment.
7011
a196ebeb
WT
70122013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7013
7014 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7015 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7016 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7017 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7018 (srv_amd64_regobj): Add amd64-mpx.o.
7019 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7020 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7021 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7022 * i387-fp.c (num_pl_bnd_register) Added constant.
7023 (num_pl_bnd_cfg_registers) Added constant.
7024 (struct i387_xsave) Added reserved area and MPX fields.
7025 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7026 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7027 function.
7028 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7029 (init_registers_amd64_mpx_linux): Declare new function.
7030 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7031 (x86_64_regmap): Add MPX registers.
7032 (x86_linux_read_description): Add MPX case.
7033 (initialize_low_arch): Initialize MPX targets.
7034
0080a2f6
TT
70352013-11-18 Tom Tromey <tromey@redhat.com>
7036
7037 * configure: Rebuild.
7038 * configure.ac: Don't check for stdlib.h.
7039 * gdbreplay.c: Unconditionally include stdlib.h.
7040
2978b111
TT
70412013-11-18 Tom Tromey <tromey@redhat.com>
7042
7043 * config.in: Rebuild.
7044 * configure: Rebuild.
7045 * configure.ac: Don't use AC_HEADER_DIRENT.
7046
a3d08894
TT
70472013-11-18 Tom Tromey <tromey@redhat.com>
7048
7049 * server.h: Don't check HAVE_STRING_H.
7050 * gdbreplay.c: Don't check HAVE_STRING_H.
7051 * configure: Rebuild.
7052
0a5dd17d
TT
70532013-11-18 Tom Tromey <tromey@redhat.com>
7054
7055 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7056 LIBGNU.
7057
1bd2f0ba
TT
70582013-11-08 Tom Tromey <tromey@redhat.com>
7059
7060 * configure, config.in: Rebuild.
7061 * configure.ac: Remove unused configury.
7062
3266f10b
TT
70632013-11-08 Tom Tromey <tromey@redhat.com>
7064
7065 * acinclude.m4: Include common.m4, codeset.m4.
7066 * configure, config.in: Rebuild.
7067 * configure.ac: Use GDB_AC_COMMON.
7068
6682d959
AA
70692013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7070
7071 * linux-s390-low.c (HWCAP_S390_TE): New define.
7072 (s390_arch_setup): Consider the TE field in the HWCAP for
7073 determining 'have_regset_tdb'.
7074
fd0a4d76
SDJ
70752013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7076
7077 PR gdb/16014
7078 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7079 call to sizeof.
7080
1a3d890b
PA
70812013-10-02 Pedro Alves <palves@redhat.com>
7082
7083 * server.c (process_serial_event): Don't output "GDBserver
7084 exiting" if GDB is connected through stdio.
7085 * target.c (mywait): Likewise, be silent if GDB is connected
7086 through stdio.
7087
97ad4581
JB
70882013-10-01 Joel Brobecker <brobecker@adacore.com>
7089
7090 * lynx-low.c (lynx_add_threads_after_attach): New function.
7091 (lynx_attach): Remove call to add_thread. Add call to
7092 lynx_add_threads_after_attach instead.
7093
5b4e221c
MF
70942013-09-28 Mike Frysinger <vapier@gentoo.org>
7095
7096 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7097 * config.in, configure: Regenerated.
7098
ee47b2f8
YQ
70992013-09-18 Yao Qi <yao@codesourcery.com>
7100
7101 PR server/15959
7102 * server.c (start_inferior): Clear 'resume_info'.
7103
d6707650 71042013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7105
d6707650
JW
7106 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7107 for each register.
7108
9243dd0e 71092013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7110
9243dd0e
JW
7111 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7112 linux-tile-low.o to srv_tgtobj.
7113
c623a6ef
WN
71142013-09-16 Will Newton <will.newton@linaro.org>
7115
7116 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7117 out regs.
7118
fb71d39e
PA
71192013-09-06 Pedro Alves <palves@redhat.com>
7120
7121 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7122 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7123 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7124 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7125 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7126 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7127
8e7e9910
PA
71282013-09-06 Pedro Alves <palves@redhat.com>
7129
7130 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7131 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7132
7c3a12ca
PA
71332013-09-06 Pedro Alves <palves@redhat.com>
7134
7135 * linux-amd64-ipa.c: Include tracepoint.h.
7136 * linux-i386-ipa.c: Include tracepoint.h.
7137
8eb3d7b6
RW
71382013-09-06 Ricard Wanderlof <ricardw@axis.com>
7139
7140 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7141 (ps_get_thread_area): New function.
7142
eddddb9d
RW
71432013-09-06 Ricard Wanderlof <ricardw@axis.com>
7144
7145 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7146 (initialize_low_arch): Call init_registers_crisv32 rather than
7147 init_register_crisv32.
7148
533b0600
PA
71492013-09-05 Pedro Alves <palves@redhat.com>
7150
7151 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7152 to ...
7153 * hostio.h: ... this new file.
7154 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7155 win32-low.c: Include hostio.h.
7156
0ce3d3b5
PA
71572013-09-05 Pedro Alves <palves@redhat.com>
7158
7159 * server.h (gdb_client_data, handler_func, callback_handler_func)
7160 (delete_file_handler, add_file_handler, append_callback_event)
7161 (delete_callback_event, start_event_loop, initialize_event_loop):
7162 Move to event-loop.h and include it.
7163 * event-loop.h: New file.
7164
799cdc37
PA
71652013-09-05 Pedro Alves <palves@redhat.com>
7166
7167 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7168 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7169 (loaded_dll, unloaded_dll): Move to ...
7170 * dll.h: ... this new file.
7171 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7172
6a6bbd9d
PA
71732013-09-05 Pedro Alves <palves@redhat.com>
7174
7175 * server.h (current_process, get_thread_process, all_processes)
7176 (add_inferior_to_list, for_each_inferior, current_inferior)
7177 (remove_inferior, add_process, remove_process, find_process_pid)
7178 (have_started_inferiors_p, have_attached_inferiors_p)
7179 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7180 (clear_inferiors, find_inferior, find_inferior_id)
7181 (inferior_target_data, set_inferior_target_data)
7182 (inferior_regcache_data, set_inferior_regcache_data): Move to
7183 inferiors.h, and include it.
7184 * inferiors.h: New file.
7185
f699aaba
PA
71862013-09-05 Pedro Alves <palves@redhat.com>
7187
7188 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7189 Move ...
72f4393d 7190 * ax.h: ... here.
f699aaba 7191
c144c7a0
PA
71922013-09-05 Pedro Alves <palves@redhat.com>
7193
7194 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7195 tracepoint.h.
7196 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7197 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7198 (handle_tracepoint_general_set, handle_tracepoint_query)
7199 (tracepoint_finished_step, tracepoint_was_hit)
7200 (release_while_stepping_state_list, current_traceframe)
7201 (in_readonly_region, traceframe_read_mem)
7202 (fetch_traceframe_registers, traceframe_read_sdata)
7203 (traceframe_read_info, struct fast_tpoint_collect_status)
7204 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7205 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7206 (supply_fast_tracepoint_registers)
7207 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7208 (ipa_tdesc, claim_trampoline_space)
7209 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7210 (agent_mem_read, agent_get_trace_state_variable_value)
7211 (agent_set_trace_state_variable_value, agent_tsv_read)
7212 (agent_mem_read_string, get_raw_reg_func_addr)
7213 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7214 * tracepoint.h: ... this new file.
7215
ff42e6ab
PA
72162013-09-05 Pedro Alves <palves@redhat.com>
7217
7218 * server.h (perror_with_name, error, fatal, warning, paddress)
7219 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7220 include it.
7221 * utils.h: New file.
7222
541af0f4
PA
72232013-09-05 Pedro Alves <palves@redhat.com>
7224
7225 * server.h (remote_debug, noack_mode, transport_is_reliable)
7226 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7227 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7228 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7229 (write_enn, initialize_async_io, enable_async_io)
7230 (disable_async_io, check_remote_input_interrupt_request)
7231 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7232 (dead_thread_notify, prepare_resume_reply)
7233 (decode_address_to_semicolon, decode_address, decode_m_packet)
7234 (decode_M_packet, decode_X_packet, decode_xfer_write)
7235 (decode_search_memory_packet, unhexify, hexify)
7236 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7237 (look_up_one_symbol, relocate_instruction)
7238 (monitor_output): Move to remote-utils.h, and include it.
7239 * remote-utils.h: New file.
7240
eebdf26b
PA
72412013-09-05 Pedro Alves <palves@redhat.com>
7242
7243 * server.h (_): Delete.
7244
3aafd2ff
PA
72452013-09-02 Pedro Alves <palves@redhat.com>
7246
7247 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7248 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7249 allocated.
7250 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7251
cee83bcb
PM
72522013-09-02 Pierre Muller <muller@sourceware.org>
7253
7254 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7255 or WriteProcessMemory complete successfully and handle
7256 ERROR_PARTIAL_COPY error.
7257
9a13b2fa
PA
72582013-09-02 Pedro Alves <palves@redhat.com>
7259
7260 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7261 error instead of EIO.
7262
602e3198
JK
72632013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7264
7265 PR server/15604
7266 * linux-low.c: Include filestuff.h.
7267 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7268 * lynx-low.c: Include filestuff.h.
7269 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7270 * server.c: Include filestuff.h.
7271 (main): Call notice_open_fds.
7272 * spu-low.c: Include filestuff.h.
7273 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7274
96d7229d
LM
72752013-08-22 Luis Machado <lgustavo@codesourcery.com>
7276
7277 * Makefile.in: Explain why ../target and ../nat are not
7278 listed as include file search paths.
7279 (linux-waitpid.o): New object file rule.
7280 * configure.srv (srv_native_linux_obj): New variable.
7281 Replace all occurrences of linux native object files with
7282 $srv_native_linux_obj.
7283 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7284 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7285 (linux_enable_event_reporting): Remove declaration.
7286 (my_waitpid): Moved to common/linux-waitpid.c.
7287 (linux_wait_for_event): Pass ptid when calling
7288 linux_enable_event_reporting.
7289 (linux_supports_tracefork_flag): Remove.
7290 (linux_enable_event_reporting): Likewise.
7291 (linux_tracefork_grandchild): Remove.
7292 (STACK_SIZE): Moved to common/linux-ptrace.c.
7293 (linux_tracefork_child): Remove.
7294 (linux_test_for_tracefork): Remove.
7295 (linux_look_up_symbols): Call linux_supports_traceclone.
7296 (initialize_low): Remove call to linux_test_for_tracefork.
7297 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7298 common/linux-ptrace.h.
7299 (PTRACE_TYPE_ARG4): Likewise.
7300 Include linux-ptrace.h.
7301
32940073
PA
73022013-08-21 Pedro Alves <palves@redhat.com>
7303
7304 * config.in: Renegerate.
7305
33b60d58 73062013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 7307
33b60d58
LM
7308 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7309 (SFILES): Remove $(srcdir)/common/target-common.c and
7310 add $(srcdir)/target/waitstatus.c.
7311 (OBS): Remove target-common.o and add waitstatus.o.
7312 (server_h): Remove $(srcdir)/../common/target-common.h and
7313 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7314 and $(srcdir)/../target/waitstatus.h.
7315 (target-common.o): Remove.
7316 (waitstatus.o): New target object file.
7317 * target.h: Do not include target-common.h and
7318 include target/resume.h, target/wait.h and
7319 target/waitstatus.h.
7320
b8e1b30e
LM
73212013-08-13 Luis Machado <lgustavo@codesourcery.com>
7322
7323 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7324 to PTRACE_TYPE_ARG3.
7325 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7326 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7327 PTRACE_TYPE_ARG4.
7328 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7329 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7330
7a60ad40
YQ
73312013-07-27 Jie Zhang <jie@codesourcery.com>
7332 Daniel Jacobowitz <dan@codesourcery.com>
7333 Yao Qi <yao@codesourcery.com>
7334
7335 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7336 (mips-linux-watch.o): New rule.
7337 (mips_linux_watch_h): New variable.
7338 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7339 srv_tgtobj.
7340 * linux-mips-low.c: Include mips-linux-watch.h.
7341 (struct arch_process_info, struct arch_lwp_info): New.
7342 (update_watch_registers_callback): New function.
7343 (mips_linux_new_process, mips_linux_new_thread) New functions.
7344 (mips_linux_prepare_to_resume, mips_insert_point): New
7345 functions.
7346 (mips_remove_point, mips_stopped_by_watchpoint): New
7347 functions.
7348 (rsp_bp_type_to_target_hw_bp_type): New function.
7349 (mips_stopped_data_address): New function.
7350 (the_low_target): Add watchpoint support functions.
7351
de6f69ad
YQ
73522013-07-27 Yao Qi <yao@codesourcery.com>
7353
7354 * i386-low.c: Include break-common.h.
7355 (enum target_hw_bp_type): Remove.
7356
3360c0bf
LM
73572013-07-24 Luis Machado <lgustavo@codesourcery.com>
7358
7359 * Makefile.in (SFILES): /common/target-common.c.
7360 (OBS): Add target-common.o.
7361 (server_h): Add $(srcdir)/../common/target-common.h.
7362 (target-common.o): New target.
7363 * server.c (queue_stop_reply_callback): Free
7364 status string after use.
7365 * target.c (target_waitstatus_to_string): Remove.
7366 * target.h: Include target-common.h.
7367 (resume_kind): Likewise.
7368 (target_waitkind): Likewise.
7369 (target_waitstatus): Likewise.
7370 (TARGET_WNOHANG): Likewise.
7371
bd885420
YQ
73722013-07-04 Yao Qi <yao@codesourcery.com>
7373
7374 * Makefile.in (host_alias): Use @host_noncanonical@.
7375 (target_alias): Use @target_noncanonical@.
7376 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7377 ACX_NONCANONICAL_HOST.
7378 * configure: Regenerated.
7379
7380 Revert:
7381 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7382
7383 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7384 * configure: Rebuild.
7385 * Makefile.in (version_host, version_target): Get from configure.
7386 (version.c): Use $(version_host) and $(version_target).
7387
17ef446e
PA
73882013-07-03 Pedro Alves <palves@redhat.com>
7389
7390 * Makefile.in (config.status): Depend on development.sh.
7391 * acinclude.m4: Include libmcheck.m4.
7392 * configure: Regenerate.
7393
7a9a7487
MG
73942013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7395
7396 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7397 attribute inside the parentheses.
7398 (winapi_DebugSetProcessKillOnExit): Ditto.
7399 (winapi_DebugBreakProcess): Ditto.
7400 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 7401
49b64de6
MG
74022013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7403
7404 * notif.h (notif_event): Add a dummy member to avoid compiler
7405 errors.
7406
d5749ee7
PA
74072013-07-01 Pedro Alves <palves@redhat.com>
7408
7409 * hostio.c (HOSTIO_PATH_MAX): Define.
7410 (require_filename, handle_open, handle_unlink, handle_readlink):
7411 Use it.
7412
d8d2a3ee
PA
74132013-07-01 Pedro Alves <palves@redhat.com>
7414
7415 * server.h: Include "pathmax.h".
7416 * linux-low.c: Don't include sys/param.h.
7417 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7418 MAXPATHLEN.
7419 * win32-low.c: Don't include sys/param.h.
7420 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7421
bc7dea8d
PA
74222013-07-01 Pedro Alves <palves@redhat.com>
7423
7424 * event-loop.c: Don't check HAVE_UNISTD_H before including
7425 <unistd.h>.
7426 * gdbreplay.c: Likewise.
7427 * remote-utils.c: Likewise.
7428 * server.c: Likewise.
7429 * configure.ac: Don't check for unistd.h.
7430 * configure: Regenerate.
7431
d6c2da54
TT
74322013-06-28 Tom Tromey <tromey@redhat.com>
7433
7434 * Makefile.in (version.c): Use version.in, not
7435 common/version.in.
7436
257b6bec
MG
74372013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7438
7439 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7440 * configure: Rebuild.
7441 * Makefile.in (version_host, version_target): Get from configure.
7442 (version.c): Use $(version_host) and $(version_target).
7443
86ebe149
DK
74442013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7445
7446 Fix trace-status to output user name without trailing colon.
7447 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7448
f30aa5af
DK
74492013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7450
7451 Fix trace-status to output proper start-time and stop-time.
7452 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7453 output start time and stop time in hex as gdb expects.
7454
28a93511
YQ
74552013-06-26 Pedro Alves <pedro@codesourcery.com>
7456
7457 * tracepoint.c (build_traceframe_info_xml): Output trace state
7458 variables present in the trace buffer.
7459
01208463
TT
74602013-06-24 Tom Tromey <tromey@redhat.com>
7461
7462 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7463 create-version.sh.
7464 (version.o): Remove.
7465 * gdbreplay.c: Include version.h.
7466 (version, host_name): Don't declare.
7467 * server.h: Include version.h.
7468 (version, host_name): Don't declare.
7469
760256f9
PA
74702013-06-12 Pedro Alves <palves@redhat.com>
7471
7472 * linux-x86-low.c (linux_is_elf64): Delete global.
7473 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7474 with local linux_pid_exe_is_elf_64_file use.
7475
030031ee
PA
74762013-06-11 Pedro Alves <palves@redhat.com>
7477
7478 * linux-low.c (regset_disabled, disable_regset): New functions.
7479 (regsets_fetch_inferior_registers)
7480 (regsets_store_inferior_registers): Use them.
7481 (initialize_regsets_info); Don't allocate the disabled_regsets
7482 array here.
7483 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7484 comment.
7485
5da6eb0a
PA
74862013-06-11 Pedro Alves <palves@redhat.com>
7487
7488 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7489 xmalloc.
7490
7e5aaa09
PA
74912013-06-11 Pedro Alves <palves@redhat.com>
7492
7493 * linux-x86-low.c (initialize_low_arch): Call
7494 init_registers_x32_avx_linux.
7495
d878444c
JK
74962013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7497
7498 Fix compatibility with Android Bionic.
7499 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7500 it is not empty.
7501
3aee8918
PA
75022013-06-07 Pedro Alves <palves@redhat.com>
7503
5f2b57b5 7504 PR server/14823
3aee8918
PA
7505 * Makefile.in (OBS): Add tdesc.o.
7506 (IPA_OBJS): Add tdesc-ipa.o.
7507 (tdesc-ipa.o): New rule.
7508 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7509 interface.
7510 * linux-low.c (new_inferior): Delete.
7511 (disabled_regsets, num_regsets): Delete.
7512 (linux_add_process): Adjust to set the new per-process
7513 new_inferior flag.
7514 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7515 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7516 was a stop. When calling arch_setup, switch the current inferior
7517 to the thread that got an event.
7518 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7519 (regsets_fetch_inferior_registers)
7520 (regsets_store_inferior_registers): New regsets_info parameter.
7521 Adjust to use it.
7522 (linux_register_in_regsets): New regs_info parameter. Adjust to
7523 use it.
7524 (register_addr, fetch_register, store_register): New usrregs_info
7525 parameter. Adjust to use it.
7526 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7527 parameter regs_info. Adjust to use it.
7528 (linux_fetch_registers): Get the current inferior's regs_info, and
7529 adjust to use it.
7530 (linux_store_registers): Ditto.
7531 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7532 (initialize_low): Don't initialize the target_regsets here. Call
7533 initialize_low_arch.
7534 * linux-low.h (target_regsets): Delete declaration.
7535 (struct regsets_info): New.
7536 (struct usrregs_info): New.
7537 (struct regs_info): New.
7538 (struct process_info_private) <new_inferior>: New field.
7539 (struct linux_target_ops): Delete the num_regs, regmap, and
7540 regset_bitmap fields. New field regs_info.
7541 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7542 * i387-fp.c (num_xmm_registers): Delete.
7543 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7544 calls to new interface.
7545 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7546 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7547 Infer the number of xmm registers from the regcache's target
7548 description.
7549 * i387-fp.h (num_xmm_registers): Delete.
7550 * inferiors.c (add_thread): Don't install the thread's regcache
7551 here.
7552 * proc-service.c (gregset_info): Fetch the current inferior's
7553 regs_info. Adjust to use it.
7554 * regcache.c: Include tdesc.h.
7555 (register_bytes, reg_defs, num_registers)
7556 (gdbserver_expedite_regs): Delete.
7557 (get_thread_regcache): If the thread doesn't have a regcache yet,
7558 create one, instead of aborting gdbserver.
7559 (regcache_invalidate_one): Rename to ...
7560 (regcache_invalidate_thread): ... this.
7561 (regcache_invalidate_one): New.
7562 (regcache_invalidate): Only invalidate registers of the current
7563 process.
7564 (init_register_cache): Add target_desc parameter, and use it.
7565 (new_register_cache): Ditto. Assert the target description has a
7566 non zero registers_size.
7567 (regcache_cpy): Add assertions. Adjust.
7568 (realloc_register_cache, set_register_cache): Delete.
7569 (registers_to_string, registers_from_string): Adjust.
7570 (find_register_by_name, find_regno, find_register_by_number)
7571 (register_cache_size): Add target_desc parameter, and use it.
7572 (free_register_cache_thread, free_register_cache_thread_one)
7573 (regcache_release, register_cache_size): New.
7574 (register_size): Add target_desc parameter, and use it.
7575 (register_data, supply_register, supply_register_zeroed)
7576 (supply_regblock, supply_register_by_name, collect_register)
7577 (collect_register_as_string, collect_register_by_name): Adjust.
7578 * regcache.h (struct target_desc): Forward declare.
7579 (struct regcache) <tdesc>: New field.
7580 (init_register_cache, new_register_cache): Add target_desc
7581 parameter.
7582 (regcache_invalidate_thread): Declare.
7583 (regcache_invalidate_one): Delete declaration.
7584 (regcache_release): Declare.
7585 (find_register_by_number, register_cache_size, register_size)
7586 (find_regno): Add target_desc parameter.
7587 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7588 declarations.
7589 * remote-utils.c: Include tdesc.h.
7590 (outreg, prepare_resume_reply): Adjust.
7591 * server.c: Include tdesc.h.
7592 (gdbserver_xmltarget): Delete declaration.
7593 (get_features_xml, process_serial_event): Adjust.
7594 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7595 declare.
7596 (struct process_info) <tdesc>: New field.
7597 (ipa_tdesc): Declare.
7598 * tdesc.c: New file.
7599 * tdesc.h: New file.
7600 * tracepoint.c: Include tdesc.h.
7601 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7602 (get_context_regcache): Adjust to pass ipa_tdesc down.
7603 (do_action_at_tracepoint): Adjust to get the register cache size
7604 from the context regcache's description.
7605 (traceframe_walk_blocks): Adjust to get the register cache size
7606 from the current trace frame's description.
7607 (traceframe_get_pc): Adjust to get current trace frame's
7608 description and pass it down.
7609 (gdb_collect): Adjust to get the register cache size from the
7610 IPA's description.
7611 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7612 (gdbserver_xmltarget): Delete.
7613 (initialize_low_tracepoint): Set the ipa's target description.
7614 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7615 (initialize_low_tracepoint): Set the ipa's target description.
7616 * linux-x86-low.c: Include tdesc.h.
7617 [__x86_64__] (is_64bit_tdesc): New.
7618 (ps_get_thread_area, x86_get_thread_area): Use it.
7619 (i386_cannot_store_register): Rename to ...
7620 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7621 (i386_cannot_fetch_register): Rename to ...
7622 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7623 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7624 to new interface.
7625 (target_regsets): Rename to ...
7626 (x86_regsets): ... this.
7627 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7628 interface.
7629 (x86_siginfo_fixup): Use is_64bit_tdesc.
7630 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7631 (tdesc_x32_avx_linux, tdesc_x32_linux)
7632 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7633 Declare.
7634 (x86_linux_update_xmltarget): Delete.
7635 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7636 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7637 (AMD64_LINUX_USER64_CS): New.
7638 (x86_linux_read_description): New, based on
7639 x86_linux_update_xmltarget.
7640 (same_process_callback): New.
7641 (x86_arch_setup_process_callback): New.
7642 (x86_linux_update_xmltarget): New.
7643 (x86_regsets_info): New.
7644 (amd64_linux_regs_info): New.
7645 (i386_linux_usrregs_info): New.
7646 (i386_linux_regs_info): New.
7647 (x86_linux_regs_info): New.
7648 (x86_arch_setup): Reimplement.
7649 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7650 (x86_emit_ops): Ditto.
7651 (the_low_target): Adjust. Install x86_linux_regs_info,
7652 x86_cannot_fetch_register, and x86_cannot_store_register.
7653 (initialize_low_arch): New.
7654 * linux-ia64-low.c (tdesc_ia64): Declare.
7655 (ia64_fetch_register): Adjust.
7656 (ia64_usrregs_info, regs_info): New globals.
7657 (ia64_regs_info): New function.
7658 (the_low_target): Adjust.
7659 (initialize_low_arch): New function.
7660 * linux-sparc-low.c (tdesc_sparc64): Declare.
7661 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7662 Adjust.
7663 (sparc_arch_setup): New function.
7664 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7665 (the_low_target): Adjust.
7666 (initialize_low_arch): New function.
7667 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7668 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7669 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7670 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7671 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7672 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7673 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7674 (tdesc_powerpc_isa205_vsx64l): Declare.
7675 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7676 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7677 (ppc_set_pc, ppc_get_hwcap): Adjust.
7678 (ppc_usrregs_info): Forward declare.
7679 (!__powerpc64__) ppc_regmap_adjusted: New global.
7680 (ppc_arch_setup): Adjust to the current process'es target
7681 description.
7682 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7683 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7684 (ppc_store_evrregset): Adjust.
7685 (target_regsets): Rename to ...
7686 (ppc_regsets): ... this, and make static.
7687 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7688 (ppc_regs_info): New function.
7689 (the_low_target): Adjust.
7690 (initialize_low_arch): New function.
7691 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7692 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7693 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7694 (tdesc_s390x_linux64v2): Declare.
7695 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7696 (s390_fill_gregset, s390_store_last_break): Adjust.
7697 (target_regsets): Rename to ...
7698 (s390_regsets): ... this, and make static.
7699 (s390_get_pc, s390_set_pc): Adjust.
7700 (s390_get_hwcap): New target_desc parameter, and use it.
7701 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7702 (s390_arch_setup): Adjust to set the current process'es target
7703 description. Don't adjust the regmap.
7704 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7705 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7706 (regs_info_3264): New globals.
7707 (s390_regs_info): New function.
7708 (the_low_target): Adjust.
7709 (initialize_low_arch): New function.
7710 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7711 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7712 [__mips64] (init_registers_mips_linux)
7713 (init_registers_mips_dsp_linux): Delete defines.
7714 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7715 (have_dsp): New global.
7716 (mips_read_description): New, based on mips_arch_setup.
7717 (mips_arch_setup): Reimplement.
7718 (get_usrregs_info): New function.
7719 (mips_cannot_fetch_register, mips_cannot_store_register)
7720 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7721 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7722 (target_regsets): Rename to ...
7723 (mips_regsets): ... this, and make static.
7724 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7725 (dsp_regs_info, regs_info): New globals.
7726 (mips_regs_info): New function.
7727 (the_low_target): Adjust.
7728 (initialize_low_arch): New function.
7729 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7730 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7731 Declare.
7732 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7733 (arm_read_description): New, with bits factored from
7734 arm_arch_setup.
7735 (arm_arch_setup): Reimplement.
7736 (target_regsets): Rename to ...
7737 (arm_regsets): ... this, and make static.
7738 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7739 (arm_regs_info): New function.
7740 (the_low_target): Adjust.
7741 (initialize_low_arch): New function.
7742 * linux-m68k-low.c (tdesc_m68k): Declare.
7743 (target_regsets): Rename to ...
7744 (m68k_regsets): ... this, and make static.
7745 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7746 (m68k_regs_info): New function.
7747 (m68k_arch_setup): New function.
7748 (the_low_target): Adjust.
7749 (initialize_low_arch): New function.
7750 * linux-sh-low.c (tdesc_sharch): Declare.
7751 (target_regsets): Rename to ...
7752 (sh_regsets): ... this, and make static.
7753 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7754 (sh_regs_info, sh_arch_setup): New functions.
7755 (the_low_target): Adjust.
7756 (initialize_low_arch): New function.
7757 * linux-bfin-low.c (tdesc_bfin): Declare.
7758 (bfin_arch_setup): New function.
7759 (bfin_usrregs_info, regs_info): New globals.
7760 (bfin_regs_info): New function.
7761 (the_low_target): Adjust.
7762 (initialize_low_arch): New function.
7763 * linux-cris-low.c (tdesc_cris): Declare.
7764 (cris_arch_setup): New function.
7765 (cris_usrregs_info, regs_info): New globals.
7766 (cris_regs_info): New function.
7767 (the_low_target): Adjust.
7768 (initialize_low_arch): New function.
7769 * linux-cris-low.c (tdesc_crisv32): Declare.
7770 (cris_arch_setup): New function.
7771 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7772 (cris_regs_info): New function.
7773 (the_low_target): Adjust.
7774 (initialize_low_arch): New function.
7775 * linux-m32r-low.c (tdesc_m32r): Declare.
7776 (m32r_arch_setup): New function.
7777 (m32r_usrregs_info, regs_info): New globals.
7778 (m32r_regs_info): Adjust.
7779 (initialize_low_arch): New function.
7780 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7781 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7782 (tic6x_usrregs_info): Forward declare.
7783 (tic6x_read_description): New function, based on ...
7784 (tic6x_arch_setup): ... this. Reimplement.
7785 (target_regsets): Rename to ...
7786 (tic6x_regsets): ... this, and make static.
7787 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7788 (tic6x_regs_info): New function.
7789 (the_low_target): Adjust.
7790 (initialize_low_arch): New function.
7791 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7792 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7793 (target_regsets): Rename to ...
7794 (xtensa_regsets): ... this, and make static.
7795 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7796 globals.
7797 (xtensa_arch_setup, xtensa_regs_info): New functions.
7798 (the_low_target): Adjust.
7799 (initialize_low_arch): New function.
7800 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7801 (nios2_arch_setup): Set the current process'es tdesc.
7802 (target_regsets): Rename to ...
7803 (nios2_regsets): ... this.
7804 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7805 (nios2_regs_info): New function.
7806 (the_low_target): Adjust.
7807 (initialize_low_arch): New function.
a261b8f5
PA
7808 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7809 (aarch64_arch_setup): Set the current process'es tdesc.
7810 (target_regsets): Rename to ...
7811 (aarch64_regsets): ... this.
7812 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7813 (aarch64_regs_info): New function.
7814 (the_low_target): Adjust.
7815 (initialize_low_arch): New function.
3aee8918
PA
7816 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7817 globals.
7818 (target_regsets): Rename to ...
7819 (tile_regsets): ... this.
7820 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7821 (tile_regs_info): New function.
7822 (tile_arch_setup): Set the current process'es tdesc.
7823 (the_low_target): Adjust.
7824 (initialize_low_arch): New function.
7825 * spu-low.c (tdesc_spu): Declare.
7826 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7827 * win32-arm-low.c (tdesc_arm): Declare.
7828 (arm_arch_setup): New function.
7829 (the_low_target): Install arm_arch_setup instead of
7830 init_registers_arm.
7831 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7832 (init_windows_x86): Rename to ...
7833 (i386_arch_setup): ... this. Set `win32_tdesc'.
7834 (the_low_target): Adjust.
7835 * win32-low.c (win32_tdesc): New global.
7836 (child_add_thread): Don't create the thread cache here.
7837 (do_initial_child_stuff): Set the new process'es tdesc.
7838 * win32-low.h (struct target_desc): Forward declare.
7839 (win32_tdesc): Declare.
7840 * lynx-i386-low.c (tdesc_i386): Declare global.
7841 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7842 * lynx-low.c (lynx_tdesc): New global.
7843 (lynx_add_process): Set the new process'es tdesc.
7844 * lynx-low.h (struct target_desc): Forward declare.
7845 (lynx_tdesc): Declare global.
7846 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7847 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7848 * nto-low.c (nto_tdesc): New global.
7849 (do_attach): Set the new process'es tdesc.
7850 * nto-low.h (struct target_desc): Forward declare.
7851 (nto_tdesc): Declare.
7852 * nto-x86-low.c (tdesc_i386): Declare.
7853 (nto_x86_arch_setup): Set `nto_tdesc'.
7854
b1fbec62
GB
78552013-06-04 Gary Benson <gbenson@redhat.com>
7856
7857 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7858 to qSupported response when appropriate.
7859 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7860 with nonzero-length annex.
7861 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7862 arguments supplied in annex.
7863
d1ec4ce7
DE
78642013-05-31 Doug Evans <dje@google.com>
7865
ac44adcb 7866 PR server/15594
d1ec4ce7
DE
7867 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7868 64 bits in 64-cross-32 environment.
7869
9b25f2d3
PA
78702013-05-28 Pedro Alves <palves@redhat.com>
7871
7872 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7873 (aarch64-without-fpu.c): Delete rule.
7874 * configure.srv (aarch64*-*-linux*): Remove references to
7875 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7876 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7877 declaration.
7878
6740dc9c
PA
78792013-05-24 Pedro Alves <palves@redhat.com>
7880
7881 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7882 instead of strchr/decode_address. Error if the range isn't split
7883 with a ','. Don't assume there's be a ':' in the action.
7884
c2d6af84
PA
78852013-05-23 Yao Qi <yao@codesourcery.com>
7886 Pedro Alves <palves@redhat.com>
7887
7888 * linux-low.c (lwp_in_step_range): New function.
7889 (linux_wait_1): If the thread was range stepping and stopped
7890 outside the stepping range, report the stop to GDB. Otherwise,
7891 continue stepping. Add range stepping debug output.
7892 (linux_set_resume_request): Copy the step range from the resume
7893 request to the lwp.
7894 (linux_supports_range_stepping): New.
7895 (linux_target_ops) <supports_range_stepping>: Set to
7896 linux_supports_range_stepping.
7897 * linux-low.h (struct linux_target_ops)
7898 <supports_range_stepping>: New field.
7899 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7900 * linux-x86-low.c (x86_supports_range_stepping): New.
7901 (the_low_target) <supports_range_stepping>: Set to
7902 x86_supports_range_stepping.
7903 * server.c (handle_v_cont): Handle 'r' action.
7904 (handle_v_requests): Append ";r" if the target supports range
7905 stepping.
7906 * target.h (struct thread_resume) <step_range_start,
7907 step_range_end>: New fields.
7908 (struct target_ops) <supports_range_stepping>:
7909 New field.
7910 (target_supports_range_stepping): New macro.
7911
58794e1a
JB
79122013-05-17 Joel Brobecker <brobecker@adacore.com>
7913
7914 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7915 confusion in comment.
7916
d631c5a7
JB
79172013-05-17 Joel Brobecker <brobecker@adacore.com>
7918
7919 * lynx-low.c (struct process_info_private): New type.
7920 (lynx_add_process): New function.
7921 (lynx_create_inferior, lynx_attach): Replace calls to
7922 add_process by calls to lynx_add_process.
7923 (lynx_resume): If PTID is null, then try using
7924 current_process()->private->last_wait_event_ptid.
7925 Add comments.
7926 (lynx_clear_inferiors): Delete. The contents of that function
7927 has been inlined in lynx_mourn;
7928 (lynx_wait_1): Save the ptid in the process's private data.
7929 (lynx_mourn): Free the process' private data. Replace call
7930 to lynx_clear_inferiors by call to clear_inferiors.
7931
96f7a20f
YQ
79322013-05-17 Yao Qi <yao@codesourcery.com>
7933
7934 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7935 the right place.
7936
db0dfaa0
LM
79372013-05-16 Luis Machado <lgustavo@codesourcery.com>
7938
7939 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7940 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7941 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7942 PT_TEXT_END_ADDR guards. Update comments.
7943 (linux_target_op) <read_offsets>: Conditionally define to
7944 linux_read_offsets if the target is UCLIBC and if it defines
7945 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7946
68f5f838
SL
79472013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7948 Andrew Jenner <andrew@codesourcery.com>
7949
7950 * Makefile.in (SFILES): Add linux-nios2-low.c.
7951 (clean): Add action to delete nios2-linux.c.
7952 (nios2-linux.c): New rule.
7953 * configure.srv: Add nios2*-*-linux*.
7954 * linux-nios2-low.c: New.
7955
1ebff1fd
HAQ
79562013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7957
7958 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7959
f6150862
HZ
79602013-04-25 Hui Zhu <hui@codesourcery.com>
7961
7962 PR gdb/15186
f6150862
HZ
7963 * ax.c (ax_printf): Add fflush.
7964
614c279d
TT
79652013-04-22 Tom Tromey <tromey@redhat.com>
7966
7967 * Makefile.in (SFILES): Add filestuff.c.
7968 (OBS): Add filestuff.o.
7969 (filestuff.o): New target.
7970 * config.in, configure: Rebuild.
7971 * configure.ac: Check for fdwalk, pipe2.
7972
7d4e5717
PA
79732013-04-17 Pedro Alves <palves@redhat.com>
7974
7975 * configure.ac (USE_THREAD_DB): Delete variable.
7976 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7977 Don't AC_SUBST USE_THREAD_DB.
7978 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7979 * config.in, configure: Regenerate.
7980
d5c93e41
PA
79812013-04-16 Pedro Alves <palves@redhat.com>
7982
7983 * linux-low.h (struct lwp_info) <thread_known>: Move under
7984 the USE_THREAD_DB #ifdef.
7985
04f5fe89
PA
79862013-04-16 Pedro Alves <palves@redhat.com>
7987
7988 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7989 (linux-low.o): Delete rule.
7990 * linux-low.h: Always include "gdb_thread_db.h" instead of
7991 conditionally including thread_db.h.
7992 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7993 HAVE_THREAD_DB_H.
7994
480b27bf
JK
79952013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7996
7997 * Makefile.in (install-only): Fix make install regression.
7998
43662968
JK
79992013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8000
8001 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8002 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8003 installation.
8004 * gdbserver.1: Remove.
8005
3e74e146
PA
80062013-03-22 Pedro Alves <palves@redhat.com>
8007
8008 * linux-low.c (handle_extended_wait): Don't call
8009 linux_enable_event_reporting.
8010
a8347a2a
TT
80112013-03-15 Tony Theodore <tonyt@logyst.com>
8012
8013 PR build/9098:
8014 * Makefile.in (SHELL): Use @SHELL@.
8015
eeb56fa7
SDJ
80162013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8017
8018 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8019 compiler warning.
8020
4fa7e2ff
JB
80212013-03-13 Joel Brobecker <brobecker@adacore.com>
8022
8023 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8024 Remove extraneous NULL element.
8025
8ddb1965
YQ
80262013-03-13 Yao Qi <yao@codesourcery.com>
8027
8028 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8029 'V' block in trace frame.
8030
9accd112
MM
80312013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8032
8033 * target.h (struct target_ops): Add btrace ops.
8034 (target_supports_btrace): New macro.
8035 (target_enable_btrace): New macro.
8036 (target_disable_btrace): New macro.
8037 (target_read_btrace): New macro.
8038 * gdbthread.h (struct thread_info): Add btrace field.
8039 * server.c: Include btrace-common.h.
8040 (handle_btrace_general_set): New function.
8041 (handle_btrace_enable): New function.
8042 (handle_btrace_disable): New function.
8043 (handle_general_set): Call handle_btrace_general_set.
8044 (handle_qxfer_btrace): New function.
8045 (struct qxfer qxfer_packets[]): Add btrace entry.
8046 * inferiors.c (remove_thread): Disable btrace.
8047 * linux-low: Include linux-btrace.h.
8048 (linux_low_enable_btrace): New function.
8049 (linux_low_read_btrace): New function.
8050 (linux_target_ops): Add btrace ops.
8051 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8052 Add srv_linux_btrace=yes.
8053 (x86_64-*-linux*): Add linux-btrace.o.
8054 Add srv_linux_btrace=yes.
8055 * configure.ac: Define HAVE_LINUX_BTRACE.
8056 * config.in: Regenerated.
8057 * configure: Regenerated.
8058
5cc22e4c
MM
80592013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8060
8061 * server.c (handle_qxfer): Preserve error message if -3 is
8062 returned.
8063 (qxfer): Document the -3 return value.
8064
7c97f91e
MM
80652013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8066
8067 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8068 (linux_btrace_h): New variable.
8069 (linux-btrace.o): New rule.
8070
be9a119c 80712013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
8072 Hafiz Abid Qadeer <abidh@codesourcery.com>
8073
8074 * tracepoint.c (trace_buffer_size): New global.
8075 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8076 (init_trace_buffer): Change to one-argument function. Allocate
8077 trace buffer memory.
8078 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8079 handle QTBuffer:size packet.
8080 (cmd_bigqtbuffer_size): New function.
8081 (initialize_tracepoint): Call init_trace_buffer with
8082 DEFAULT_TRACE_BUFFER_SIZE.
8083 * server.c (handle_query): Add QTBuffer:size in the
8084 supported packets.
8085
e64f7499
YQ
80862013-03-07 Yao Qi <yao@codesourcery.com>
8087
8088 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8089 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8090 of -1.
8091 (cmd_qtsp): Adjust condition. Do post increment.
8092 Set cur_action and cur_step_action back to 0.
8093
f0ae6fc3
PA
80942013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8095
8096 PR server/15236
8097 * linux-low.c (linux_write_memory): Return early success if LEN is
8098 zero.
8099
b5b0b0af
CV
81002013-03-05 Corinna Vinschen <vinschen@redhat.de>
8101
334ad4a8 8102 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 8103
589bc927
TT
81042013-02-28 Tom Tromey <tromey@redhat.com>
8105
8106 * configure.ac: Invoke AC_SYS_LARGEFILE.
8107 * configure, config.in: Rebuild.
8108
dfe07582
CV
81092013-02-28 Corinna Vinschen <vinschen@redhat.com>
8110
8111 * win32-low.c: Throughout, fix format strings and casts of
8112 printf-like functions to avoid type related warnings on all
8113 platforms.
8114 (get_child_debug_event): Print dwDebugEventCode as hex since
8115 that's how it's usually documented.
8116
736cd585
YQ
81172013-02-28 Yao Qi <yao@codesourcery.com>
8118
8119 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8120 pulongest.
8121
e1f58301
JW
81222013-02-27 Jiong Wang <jiwang@tilera.com>
8123
8124 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8125 (reg-tilegx32.c): New rule.
8126 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8127 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8128 different register info initializer according to elf class.
8129 (init_registers_tilgx32): New function. The tilegx32 register info
8130 initializer.
8131 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8132 (tile_store_gregset): Likewise.
8133
d171ca78
YQ
81342013-02-27 Yao Qi <yao@codesourcery.com>
8135
8136 * server.c (process_point_options): Print debug message when
8137 debug_threads is true.
8138
282bbdf3
YQ
81392013-02-26 Yao Qi <yao@codesourcery.com>
8140
8141 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8142
aca22551
PA
81432013-02-19 Pedro Alves <palves@redhat.com>
8144 Kai Tietz <ktietz@redhat.com>
8145
8146 PR gdb/15161
8147
8148 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8149 instead of strtoul to extract address from packet.
8150 (process_serial_event) <'z'>: Likewise.
8151
4f3cee1c
YQ
81522013-02-18 Yao Qi <yao@codesourcery.com>
8153
8154 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8155
8e1d55a3
PA
81562013-02-14 Pedro Alves <palves@redhat.com>
8157
8158 Plug memory leak.
8159
8160 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8161 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8162
458820da
PA
81632013-02-14 Pedro Alves <palves@redhat.com>
8164
8165 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8166
baea0dae
PA
81672013-02-14 Pedro Alves <palves@redhat.com>
8168
8169 * tracepoint.c (save_string): Delete.
8170 (add_tracepoint_action): Use savestring instead of save_string.
8171
0b1afbb3
PA
81722013-02-12 Pedro Alves <palves@redhat.com>
8173
8174 * linux-xtensa-low.c: Ditto.
8175 * xtensa-xtregs.c: Ditto.
8176
8a4ac37e
PA
81772013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8178
8179 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8180 thread_db.
8181
148de6bb
MS
81822013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8183
8184 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8185 aarch64_num_wp_regs and aarch64_num_bp_regs to
8186 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8187
55fac6e0
MS
81882013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8189
8190 * linux-aarch64-low.c (ps_get_thread_area): Replace
8191 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8192
176eb98c
MS
81932013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8194 Marcus Shawcroft <marcus.shawcroft@arm.com>
8195 Nigel Stephens <nigel.stephens@arm.com>
8196 Yufeng Zhang <yufeng.zhang@arm.com>
8197
8198 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8199 (aarch64.c, aarch64-without-fpu.c): New targets.
8200 * configure.srv (aarch64*-*-linux*): New.
8201 * linux-aarch64-low.c: New file.
8202
56f7af9c
MS
82032013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8204
43aaf8b6 8205 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
8206 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8207 (dequeue_one_deferred_signal, linux_resume_one_thread)
8208 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8209 (linux_tracefork_grandchild, linux_test_for_tracefork)
8210 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8211 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8212 where the argument is 0.
8213
60f662b0
YQ
82142013-01-25 Yao Qi <yao@codesourcery.com>
8215
8216 * event-loop.c: Include "queue.h".
8217 (gdb_event_p): New typedef.
8218 (struct gdb_event) <next_event>: Remove.
8219 (event_queue): Change to QUEUE(gdb_event_p).
8220 (async_queue_event): Remove.
8221 (gdb_event_xfree): New.
8222 (initialize_event_loop): New.
8223 (process_event): Use API from QUEUE.
8224 (wait_for_event): Likewise.
8225 * server.c (main): Call initialize_event_loop.
8226 * server.h (initialize_event_loop): Declare.
8227
5ae4861a
YQ
82282013-01-18 Yao Qi <yao@codesourcery.com>
8229
8230 * ax.h (struct eval_agent_expr_context): New.
8231 (gdb_eval_agent_expr): Update declaration.
8232 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8233 TFRAME. Add new argument CTX.
8234 * server.h (struct eval_agent_expr_context): Declare.
8235 (agent_mem_read, agent_tsv_read): Update declaration.
8236 (agent_mem_read_string): Likewise.
8237 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8238 (add_traceframe_block): Add new argument TPOINT.
8239 Increase TPOINT->traceframe_usage.
8240 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8241 eval_tracepoint_agent_expr.
8242 (condition_true_at_tracepoint): Likewise.
8243 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8244 (agent_mem_read_string, agent_tsv_read): Likewise.
8245
85e00e85
YQ
82462013-01-16 Yao Qi <yao@codesourcery.com>
8247
8248 * linux-low.c (linux_resume_one_lwp): Don't check
8249 'lwp->bp_reinsert != 0'.
8250
4039cf45
JB
82512013-01-07 Joel Brobecker <brobecker@adacore.com>
8252 Pedro Alves <palves@redhat.com>
8253
8254 * lynx-low.c (ptrace_request_to_str): Define a temporary
8255 macro and use it to simplify this function's implementation.
8256
9044dee2
JB
82572013-01-07 Joel Brobecker <brobecker@adacore.com>
8258
8259 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8260 sets errno.
8261
e6352c8f
JB
82622013-01-07 Joel Brobecker <brobecker@adacore.com>
8263
8264 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8265
50681a27
JB
82662013-01-07 Joel Brobecker <brobecker@adacore.com>
8267
8268 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8269
3f6e77ef
JB
82702013-01-07 Joel Brobecker <brobecker@adacore.com>
8271
8272 * lynx-low.c (lynx_resume): Use the resume_info parameter
8273 to determine the ptid for the lynx_ptrace call, unless
8274 it is equal to minus_one_ptid, in which case we use the
8275 ptid of the current_inferior.
8276 (lynx_wait_1): After having received a thread create/exit
8277 event, resume the inferior's execution using the signaling
8278 thread's ptid, rather than the old ptid.
8279
7fda33ae
JB
82802013-01-07 Joel Brobecker <brobecker@adacore.com>
8281
8282 * lynx-low.c (lynx_resume): Delete variable ret.
8283
b9786c74
JB
82842013-01-01 Joel Brobecker <brobecker@adacore.com>
8285
8286 * gdbreplay.c (gdbreplay_version): Update copyright year.
8287 * server.c (gdbserver_version): Likewise.
8288
8b93d60f
JB
82892012-12-17 Joel Brobecker <brobecker@adacore.com>
8290
8291 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8292 new thread.
8293
037335a7
JB
82942012-12-17 Joel Brobecker <brobecker@adacore.com>
8295
8296 * lynx-low.c (ptrace_request_to_str): Add handling for
8297 PTRACE_GETTRACESIG.
8298
52d4cbd8
JB
82992012-12-17 Joel Brobecker <brobecker@adacore.com>
8300
8301 * lynx-low.c (lynx_attach): Delete variable new_process.
8302
ab8f6ca9
JB
83032012-12-17 Joel Brobecker <brobecker@adacore.com>
8304
8305 * lynx-low.c (lynx_create_inferior): Delete variable
8306 new_process.
8307
78cbc024
JB
83082012-12-17 Joel Brobecker <brobecker@adacore.com>
8309
8310 * lynx-low.c (ptrace_request_to_str): Do not handle
8311 PTRACE_GETTHREADLIST if this macro does not exist.
8312
14a00470
YQ
83132012-12-15 Yao Qi <yao@codesourcery.com>
8314
8315 * Makefile.in (OBS): Add notif.o.
8316 * notif.c, notif.h: New.
8317 * server.c: Include "notif.h".
8318 (struct vstop_notif) <next>: Remove.
8319 <base>: New field.
8320 (queue_stop_reply): Update.
8321 (push_event, send_next_stop_reply): Remove.
8322 (discard_queued_stop_replies): Update.
8323 (notif_stop): New variable.
8324 (handle_v_stopped): Remove.
8325 (handle_v_requests): Don't call handle_v_stopped. Call
8326 handle_ack_notif instead.
8327 (queue_stop_reply_callback): Call notif_event_enque instead
8328 of queue_stop_reply.
8329 (handle_status): Don't call send_next_stop_reply, call
8330 notif_write_event instead.
8331 (kill_inferior_callback): Likewise.
8332 (detach_or_kill_inferior_callback): Likewise.
8333 (main): Call initialize_notif.
8334 (process_serial_event): Call QUEUE_is_empty.
8335 (handle_target_event): Call notif_push instead of push event.
8336 * server.h (push_event): Remove declaration.
8337
61c125b9
TT
83382012-12-10 Tom Tromey <tromey@redhat.com>
8339
8340 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8341 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8342 macros.
8343 (.c.o): Rewrite.
8344 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8345 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8346 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8347 (amd64-linux-ipa.o, ax.o): Rewrite.
8348 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8349 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8350 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8351 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8352 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8353 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8354 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8355 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8356 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8357 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8358 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8359 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8360 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8361 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8362 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8363 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8364 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8365 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8366 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8367 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8368 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8369 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8370 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8371 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8372 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8373 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8374 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8375 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8376 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8377 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8378 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8379 (reg-tilegx.o): Remove.
8380 (all_object_files): New macro.
8381 Include .deps files.
8382 * aclocal.m4, configure: Rebuild.
8383 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8384 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8385 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8386
e90e9ad9
TT
83872012-12-05 Tom Tromey <tromey@redhat.com>
8388
8389 PR gdb/14917:
8390 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8391
02d403bf 83922012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
8393
8394 * configure.ac: Check for linux/perf_event.h.
8395 * config.in: Regenerated.
8396 * configure: Regenerated.
8397
0270a750
PA
83982012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8399
8400 * hostio.c (handle_readlink): Decrease buffer size
8401 parameter passed to readlink by one byte.
8402
8c29b58e
YQ
84032012-11-26 Yao Qi <yao@codesourcery.com>
8404
8405 * configure.ac (build_warnings): Append '-Wempty-body'.
8406 * configure: Regenerated.
8407 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8408 body.
8409
8bdce1ff
PM
84102012-11-15 Pierre Muller <muller@sourceware.org>
8411
8412 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8413 * config.in: Regenerate.
8414 * configure: Regenerate.
8415 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8416 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8417 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8418 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8419 header.
8420 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8421 instead of <sys/wait.h> header.
8422 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8423
02d403bf 84242012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
8425
8426 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8427 (various make rules): Remove -DGDBSERVER
8428
fbd5db48
YQ
84292012-11-09 Yao Qi <yao@codesourcery.com>
8430
8431 * spu-low.c (current_ptid): Move it to ..
8432 * gdbthread.h: ... here. New.
8433 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8434 * server.c (myresume, process_serial_event): Likewise.
8435 * thread-db.c (thread_db_find_new_threads): Likewise.
8436 * tracepoint.c (run_inferior_command): Likewise.
8437
b3dc46ff
AB
84382012-10-01 Andrew Burgess <aburgess@broadcom.com>
8439
8440 * server.c (handle_search_memory_1): Include access length in
8441 warning message.
8442
07c04788
HPN
84432012-09-05 Michael Brandt <michael.brandt@axis.com>
8444
8445 * linux-crisv32-low.c: Fix compile errors.
8446
918d227b
YQ
84472012-09-04 Yao Qi <yao@codesourcery.com>
8448
8449 * tracepoint.c (cmd_qtsv): Adjust debug message.
8450 Don't check CUR_TPOINT.
8451
18c1b81a
YQ
84522012-08-28 Yao Qi <yao@codesourcery.com>
8453
8454 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8455 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8456 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8457 Remove declarations of xmalloc, xreallloc, xstrdup and
8458 freeargv.
8459 * Makefile.in (libiberty_h): New.
8460 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8461 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8462
dc82f37b
YQ
84632012-08-23 Yao Qi <yao@codesourcery.com>
8464
8465 * server.h: Remove declaration of 'xsnprintf'.
8466
406b1477
KS
84672012-08-22 Keith Seitz <keiths@redhat.com>
8468
8469 * server.h: Include build-gnulib-gbserver/config.h.
8470 * gdbreplay.c: Likewise.
8471
e6712ff1
DE
84722012-08-08 Doug Evans <dje@google.com>
8473
8474 * Makefile.in (SFILES): Add gdb_vecs.c.
8475 (OBS): Add gdb_vecs.o.
8476 (gdb_vecs_h, host_defs_h): New variables.
8477 (thread-db.o): Add $(gdb_vecs_h) dependency.
8478 (gdb_vecs.o): New rule.
8479 * thread-db.c: #include "gdb_vecs.h".
8480 (thread_db_load_search): Use a vector to iterate over path elements.
8481 Handle text appearing after "$pdir".
8482
8483 * configure.ac: Add check for strstr.
8484 * config.in: Regenerate.
8485 * configure: Regenerate.
8486
7c3270ae
UW
84872012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8488
8489 * hostio.c (handle_pread): If pread fails, fall back to attempting
8490 lseek/read.
8491 (handle_pwrite): Likewise for pwrite.
8492
b62e2b27
UW
84932012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8494
8495 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8496 between unsupported TYPE and unimplementable ADDR/LEN combination.
8497 (arm_insert_point): Act on new return value.
8498
78a99e91
PA
84992012-07-31 Pedro Alves <palves@redhat.com>
8500
8501 * server.c (process_point_options): Only skip tokens if we find
8502 one that is unrecognized. Don't treat 'X' specially while
8503 skipping unrecognized tokens.
8504
fcf303ab
UW
85052012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8506
8507 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8508 to 4-byte-align HW breakpoint addresses for Thumb.
8509
7255706c
YQ
85102012-07-27 Yao Qi <yao@codesourcery.com>
8511
8512 PR remote/14161.
8513
8514 * server.h: Declare gdb_agent_about_to_close.
8515 * target.c (kill_inferior): Include "agent.h".
8516 New. Send command 'kill'.
8517 * target.h (kill_inferior): Removed macro.
8518 * tracepoint.c (gdb_agent_about_to_close): New.
8519 (gdb_agent_helper_thread): Handle command 'close'.
8520 Wait endlessly until the inferior stops.
8521 Install gdb_agent_remove_socket to atexit hook.
8522 (agent_socket_name): New static variable.
8523 (gdb_agent_socket_init): Replace local variable 'name' with
8524 'agent_socket_name'.
8525 (gdb_agent_remove_socket): New.
8526
5a3f286f
YQ
85272012-07-27 Yao Qi <yao@codesourcery.com>
8528
8529 * server.c (process_point_options): Stop at 'X' when parsing.
8530
961bd387
ME
85312012-07-19 Michael Eager <eager@eagercon.com>
8532
a261b8f5 8533 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
8534 to hw_execute.
8535 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8536 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8537 hardware breakpoint.
8538
aa7c7447
JK
85392012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8540
8541 * gdbserver/linux-low.c (initialize_low): Call
8542 linux_ptrace_init_warnings.
8543
7f216e7c
DE
85442012-07-02 Doug Evans <dje@google.com>
8545
8546 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8547 pointer to int.
8548
d3ce09f5
SS
85492012-07-02 Stan Shebs <stan@codesourcery.com>
8550
8551 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8552 (ax.o): Add it to build rule.
8553 (ax-ipa.o): Ditto.
8554 (OBS): Add format.o.
8555 (IPA_OBS): Add format.o.
8556 * server.c (handle_query): Claim support for breakpoint commands.
8557 (process_point_options): Add command case.
8558 (process_serial_event): Leave running if there are printfs in
8559 effect.
8560 * mem-break.h (any_persistent_commands): Declare.
8561 (add_breakpoint_commands): Declare.
8562 (gdb_no_commands_at_breakpoint): Declare.
8563 (run_breakpoint_commands): Declare.
8564 * mem-break.c (struct point_command_list): New struct.
8565 (struct breakpoint): New field command_list.
8566 (any_persistent_commands): New function.
8567 (add_commands_to_breakpoint): New function.
8568 (add_breakpoint_commands): New function.
8569 (gdb_no_commands_at_breakpoint): New function.
8570 (run_breakpoint_commands): New function.
8571 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8572 locally.
8573 * ax.c: Include format.h.
8574 (ax_printf): New function.
8575 (gdb_eval_agent_expr): Add printf opcode.
8576
2f8f6aed
YQ
85772012-06-13 Yao Qi <yao@codesourcery.com>
8578
8579 * server.c (start_inferior): Remove duplicated writes to fields
8580 'last_resume_kind' and 'last_status' of 'current_inferior'.
8581
0c9070b3
YQ
85822012-06-12 Yao Qi <yao@codesourcery.com>
8583 Pedro Alves <palves@redhat.com>
8584
8585 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8586 comment.
8587 * server.c (handle_v_cont): Extend comment.
8588
c52daf70
YQ
85892012-06-11 Yao Qi <yao@codesourcery.com>
8590
8591 * linux-low.c (linux_attach): Add 'static'.
8592
d38bbb0a
YQ
85932012-06-06 Yao Qi <yao@codesourcery.com>
8594
8595 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8596
89dc0afd
JK
85972012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8598
8599 Fix gcc -flto compilation warning.
8600 * server.c (main): Make variable multi_mode and attach volatile.
8601
75f62ce7
TJB
86022012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8603
8604 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8605 if the platform doesn't know about it.
8606
65f479b6
PA
86072012-05-30 Jeff Kenton <jkenton@tilera.com>
8608
8609 * Makefile.in (SFILES): Add linux-tile-low.c.
8610 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8611 * configure.srv: Handle tilegx-*-linux*.
8612 * linux-tile-low.c: New file.
8613
0c5bf5a9
JK
86142012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8615
8616 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8617
a493e3e2
PA
86182012-05-24 Pedro Alves <palves@redhat.com>
8619
8620 PR gdb/7205
8621
43aaf8b6 8622 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 8623
2ea28649
PA
86242012-05-24 Pedro Alves <palves@redhat.com>
8625
8626 PR gdb/7205
8627
8628 Replace target_signal with gdb_signal throughout.
8629
8d409d16
MR
86302012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8631
8632 * linux-low.c (linux_store_registers): Avoid the copying sequence
8633 when no data has been retrieved by ptrace.
8634
23512c01
MGD
86352012-05-22 Will Deacon <will.deacon@arm.com>
8636
8637 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8638 Include asm/ptrace.h.
8639 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8640 already defined.
8641
4934b29e
MR
86422012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8643
8644 * linux-low.c (linux_store_registers): Don't re-retrieve data
8645 with ptrace that has already been obtained from /proc. Always
8646 copy any data retrieved with ptrace to the buffer supplied.
8647
bde24c0a
PA
86482012-05-11 Yao Qi <yao@codesourcery.com>
8649 Pedro Alves <palves@redhat.com>
8650
8651 * linux-low.c (enum stopping_threads_kind): New.
8652 (stopping_threads): Change type to `enum stopping_threads_kind'.
8653 (handle_extended_wait): If stopping and suspending threads, leave
8654 the new_lwp suspended too.
8655 (linux_wait_for_event): Adjust.
8656 (stop_all_lwps): Set `stopping_threads' to
8657 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8658 whether we're suspending threads or just stopping them. Assert no
8659 recursion happens.
8660
623b6bdf
YQ
86612012-04-29 Yao Qi <yao@codesourcery.com>
8662
8663 * server.h: Move some code to ...
8664 * gdbthread.h: ... here. New.
8665 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8666 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8667 (nto-low.o, win32-low.o): Likewise.
8668 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8669 * regcache.c, remote-utils.c, server.c: Likewise.
8670 * target.c, tracepoint.c, win32-low.c: Likewise.
8671
f15f9948
TJB
86722012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8673
8674 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8675 (PTRACE_ARG4_TYPE): Likewise.
8676 (PTRACE_XFER_TYPE): Likewise.
8677 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8678 ptrace to PTRACE_ARG3_TYPE.
8679 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8680 (PTRACE_ARG4_TYPE): Likewise.
8681 (PTRACE_XFER_TYPE): Likewise.
8682 (linux_detach_one_lwp): Cast fourth argument of
8683 ptrace to long then PTRACE_ARG4_TYPE.
8684 (regsets_fetch_inferior_registers): Cast third argument of
8685 ptrace to long then PTRACE_ARG3_TYPE.
8686 (regsets_store_inferior_registers): Likewise.
8687
38ea300a
PA
86882012-04-20 Pedro Alves <palves@redhat.com>
8689
8690 * configure: Regenerate.
8691
c971b7fa
PA
86922012-04-19 Pedro Alves <palves@redhat.com>
8693
43aaf8b6 8694 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 8695 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
8696 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8697 (all, install-only, uninstall, clean-info, all-lib, clean): No
8698 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8699 (maintainer-clean realclean distclean): Use subdir_do.
8700 (subdir_do): New.
8701 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 8702 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
8703 * acinclude.m4: Include acx_configure_dir.m4.
8704 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8705 calls. Call AC_PROG_RANLIB. Configure gnulib using
8706 ACX_CONFIGURE_DIR.
8707 (GNULIB): New.
8708 (GNULIB_STDINT_H): Adjust.
8709 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8710 * gdbreplay.c: Include build-gnulib/config.h.
8711 * server.h: Likewise.
8712 * aclocal.m4: Regenerate.
8713 * config.in: Regenerate.
8714 * configure: Regenerate.
c971b7fa 8715
809277f8
PA
87162012-04-19 Pedro Alves <palves@redhat.com>
8717
8718 * Makefile.in (LIBGNU, INCGNU): Adjust.
8719 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8720 (all, install-only, uninstall, clean-info, all-lib, clean)
8721 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8722 * configure.ac: Adjust AC_OUTPUT output.
8723 * aclocal.m4: Regenerate.
8724 * configure: Regenerate.
8725
fd9bb8b8
PA
87262012-04-19 Pedro Alves <palves@redhat.com>
8727
8728 * Makefile.in (generated_files): New.
8729 (server_h): Remove the explicit dependency on config.h, and depend
8730 on $generated_files.
8731
1c298c66
PA
87322012-04-19 Pedro Alves <palves@redhat.com>
8733
8734 * Makefile.in (INCGNU): Add -Ignulib.
8735
57c4b50b
PA
87362012-04-19 Pedro Alves <palves@redhat.com>
8737
8738 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8739 (INCGNU): ... this, and spell out -I here.
8740 (GNULIB_LIB): Rename to ...
8741 (LIBGNU): ... this.
8742 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8743
1030e047
PA
87442012-04-19 Pedro Alves <palves@redhat.com>
8745
8746 * config.in: Regenerate.
8747
447d4319
PA
87482012-04-19 Pedro Alves <palves@redhat.com>
8749
8750 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8751 * server.h (memmem): Remove declaration.
8752 * config.in: Regenerate.
8753 * configure: Regenerate.
8754
aad9eab9
YQ
87552012-04-19 Yao Qi <yao@codesourcery.com>
8756
8757 * Makefile.in (SFILES): Add common/vec.c.
8758 (OBS): Add vec.o.
8759 (vec.o): New rule.
8760
3e10640f
YQ
87612012-04-19 Yao Qi <yao@codesourcery.com>
8762
8763 * remote-utils.c (prepare_resume_reply): Replace with macro
8764 target_core_of_thread.
8765 * server.c (handle_qxfer_threads_proper): Likewise.
8766 * target.h (traget_core_of_thread): New macro.
8767
71622373
PA
87682012-04-18 Pedro Alves <palves@redhat.com>
8769
8770 * aclocal.m4: Regenerate.
8771 * configure: Regenerate.
8772
80d26939
YQ
87732012-04-16 Yao Qi <yao@codesourcery.com>
8774
8775 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8776 duplicated on address.
8777
42476b70
YQ
87782012-04-16 Yao Qi <yao@codesourcery.com>
8779
8780 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8781 (struct tracepoint_action_ops) <send>: New field.
8782 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8783 (agent_expr_send, x_tracepoint_action_send): New.
8784 (l_tracepoint_action_send): New.
8785 (cmd_qtdp): Download and install tracepoint
8786 according to `use_agent'.
8787 (run_inferior_command): Add one more parameter `len'.
8788 Update callers.
8789 (tracepoint_send_agent): New.
8790 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8791
7bc83639
YQ
87922012-04-16 Yao Qi <yao@codesourcery.com>
8793
8794 * tracepoint.c (download_tracepoints): Moved to ...
8795 (cmd_qtstart): ... here.
8796
5f18041e
YQ
87972012-04-14 Yao Qi <yao@codesourcery.com>
8798
8799 * tracepoint.c: Include inttypes.h.
8800 (struct collect_memory_action): Use sized types.
8801 (struct tracepoint): Likewise.
8802 (cmd_qtdp, stop_tracing): Update print specifiers.
8803 (cmd_qtp, response_tracepoint): Likewise.
8804 (collect_data_at_tracepoint): Likewise.
8805 (collect_data_at_step): Likewise.
8806
55a8c076
YQ
88072012-04-14 Yao Qi <yao@codesourcery.com>
8808
8809 Import gnulib module inttypes.
8810 * aclocal.m4, config.in, configure: Regenerated.
8811
dc750257
YQ
88122012-04-14 Yao Qi <yao@codesourcery.com>
8813
8814 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8815 Makefile and config.status at last.
8816
0ab5faf9
YQ
88172012-04-13 Yao Qi <yao@codesourcery.com>
8818
8819 * tracepoint.c: Include stdint.h unconditionally.
8820
18f5fd81
TJB
88212012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8822
8823 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8824 on BFD_HAVE_SYS_PROCFS_TYPE.
8825 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8826 * configure: Regenerate.
8827 * config.in: Likewise.
8828
4d47af5c
L
88292012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8830
8831 * Makefile.in (clean): Also remove x32.c x32-linux.c
8832 x32-avx.c x32-avx-linux.c.
8833 (x32.o): New target.
8834 (x32.c): Likewise.
8835 (x32-linux.o): Likewise.
8836 (x32-linux.c): Likewise.
8837 (x32-avx.o): Likewise.
8838 (x32-avx.c): Likewise.
8839 (x32-avx-linux.o): Likewise.
8840 (x32-avx-linux.c): Likewise.
8841
8842 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8843 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8844 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8845 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8846 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8847 i386/x32-avx-linux.xml.
8848
8849 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8850 (init_registers_x32_avx_linux): Likwise.
8851 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8852 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8853
ecedbe58
PA
88542012-04-13 Pedro Alves <palves@redhat.com>
8855
8856 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8857 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8858 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8859 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8860 the sub-make.
8861
c92b5177
L
88622012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8863
8864 * linux-x86-low.c (compat_x32_clock_t): New.
8865 (compat_x32_siginfo_t): Likewise.
8866 (compat_x32_siginfo_from_siginfo): Likewise.
8867 (siginfo_from_compat_x32_siginfo): Likewise.
8868 (linux_is_elf64): Likewise.
8869 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8870 and siginfo_from_compat_x32_siginfo for x32.
8871 (x86_arch_setup): Set linux_is_elf64.
8872
214d508e
L
88732012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8874
8875 PR gdb/13969
8876 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8877 e_machine field.
8878 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8879 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8880 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8881 compatible with process.
8882
c9a1864a
YQ
88832012-04-12 Yao Qi <yao@codesourcery.com>
8884
8885 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8886 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8887 (install-only, install-info, clean): Handle sub dir gnulib.
8888 (all-lib, am--refresh): New targets.
8889 (memmem.o): Remove target.
8890 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8891 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8892 (AC_REPLACE_FUNCS): Remove memmem.
8893 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8894 (AC_OUTPUT): Generate Makefile in gnulib/.
8895 * aclocal.m4, config.in, configure: Regenerated.
8896
367ba2c2
MR
88972012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8898
8899 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8900
9d236627
PA
89012012-04-05 Pedro Alves <palves@redhat.com>
8902
8903 -Werror=strict-aliasing
8904
8905 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8906 pointer.
8907
111217b3
PA
89082012-04-04 Pedro Alves <palves@redhat.com>
8909
8910 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8911 (sparc_store_gregset_from_stack, sparc_store_gregset)
8912 (sparc_breakpoint_at): Fix formatting.
8913
8365dcf5
TJB
89142012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8915
8916 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8917 are available.
8918 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8919 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8920 * config.in: Regenerate.
8921 * configure: Likewise.
8922
689cc2ae
PA
89232012-03-29 Pedro Alves <palves@redhat.com>
8924
8925 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8926 Correct ptrace arguments.
8927
c14dfd32
PA
89282012-03-28 Pedro Alves <palves@redhat.com>
8929
8930 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8931 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8932 (IA64_FR1_REGNUM): New defines.
8933 (ia64_fetch_register): New.
8934 (the_low_target): Install it.
8935 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8936 field.
8937 * linux-low.c (linux_fetch_registers): Try the
8938 the_low_target.fetch_register hook first.
8939
8940 * linux-arm-low.c (the_low_target): Adjust.
8941 * linux-bfin-low.c (the_low_target): Adjust.
8942 * linux-cris-low.c (the_low_target): Adjust.
8943 * linux-crisv32-low.c (the_low_target): Adjust.
8944 * linux-m32r-low.c (the_low_target): Adjust.
8945 * linux-m68k-low.c (the_low_target): Adjust.
8946 * linux-mips-low.c (the_low_target): Adjust.
8947 * linux-ppc-low.c (the_low_target): Adjust.
8948 * linux-s390-low.c (the_low_target): Adjust.
8949 * linux-sh-low.c (the_low_target): Adjust.
8950 * linux-sparc-low.c (the_low_target): Adjust.
8951 * linux-tic6x-low.c (the_low_target): Adjust.
8952 * linux-x86-low.c (the_low_target): Adjust.
8953 * linux-xtensa-low.c (the_low_target): Adjust.
8954
63c88e13
PA
89552012-03-26 Pedro Alves <palves@redhat.com>
8956
8957 * server.c (handle_qxfer_libraries): Don't bail early if
8958 the_target->qxfer_libraries_svr4 is not NULL.
8959
fb723180
PA
89602012-03-26 Pedro Alves <palves@redhat.com>
8961
8962 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8963
0afae3cf
PA
89642012-03-23 Pedro Alves <palves@redhat.com>
8965
8966 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8967 "library-list-svr4" element's start tag when the the DSO list is
8968 empty.
8969
485f1ee4
PA
89702012-03-23 Pedro Alves <palves@redhat.com>
8971
8972 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8973 a variable whose type size is the same as the inferior's pointer
8974 size.
8975
a5362b9a
TS
89762012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8977
8978 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8979 struct siginfo.
8980 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8981 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8982 * linux-low.h: Include <signal.h>.
8983 (struct siginfo): Remove forward declaration.
8984 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8985 struct siginfo.
8986
d226c142
MF
89872012-03-21 Mike Frysinger <vapier@gentoo.org>
8988
8989 * .gitignore: Ignore more files.
8990
122f36ef
PA
89912012-03-19 Pedro Alves <palves@redhat.com>
8992 Jan Kratochvil <jan.kratochvil@redhat.com>
8993
8994 * server.c (cont_thread, general_thread): Add describing comments.
8995 (start_inferior): Clear `cont_thread'.
8996 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8997 of a process.
8998
fc3e5175
YQ
89992012-03-15 Yao Qi <yao@codesourcery.com>
9000
9001 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9002 handling to ...
9003 (cmd_qtdp): ... here.
9004
8d0d92cd
YQ
90052012-03-15 Yao Qi <yao@codesourcery.com>
9006
9007 * tracepoint.c (struct tracepoint_action_ops): New.
9008 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9009 (m_tracepoint_action_download): New.
9010 (r_tracepoint_action_download): New.
9011 (x_tracepoint_action_download): New.
9012 (l_tracepoint_action_download): New.
9013 (add_tracepoint_action): Install `action->ops' according type.
9014 (download_tracepoint_1): Move code `download' function pointer
9015 of various tracepoint_action_ops.
9016
87b0bb13
JK
90172012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9018
9019 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9020 linux_ptrace_attach_warnings.
9021
5f572dec
JK
90222012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9023
9024 * Makefile.in (linux-ptrace.o): New.
9025 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9026 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9027 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9028 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9029 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9030 of these targets.
9031 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9032
f4647387
YQ
90332012-03-08 Yao Qi <yao@codesourcery.com>
9034 Pedro Alves <palves@redhat.com>
9035
9036 Fix PR server/13392.
9037 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9038 offset of JMP insn.
9039 * tracepoint.c (remove_tracepoint): New.
9040 (cmd_qtdp): Call remove_tracepoint when failed to install.
9041
9b224c5e
PA
90422012-03-07 Pedro Alves <palves@redhat.com>
9043
9044 * linux-low.c (get_detach_signal): New.
9045 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9046 Pass on pending signals to PTRACE_DETACH. Check the result of the
9047 ptrace call.
9048 * server.c (program_signals, program_signals_p): New.
9049 (handle_general_set): Handle QProgramSignals.
9050 * server.h (program_signals, program_signals_p): Declare.
9051
e237a7e2
JK
90522012-03-05 Pedro Alves <palves@redhat.com>
9053 Jan Kratochvil <jan.kratochvil@redhat.com>
9054
9055 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9056 New comment why.
9057
5808517f
YQ
90582012-03-03 Yao Qi <yao@codesourcery.com>
9059
9060 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9061 agent_look_up_symbols.
9062
58b4daa5
YQ
90632012-03-03 Yao Qi <yao@codesourcery.com>
9064
9065 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9066 (linux-x86-low.o): Likewise.
9067 * server.h: Remove in_process_agent_loaded.
9068 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9069 common/agent.c.
9070 Update callers.
9071
8ffcbaaf
YQ
90722012-03-03 Yao Qi <yao@codesourcery.com>
9073
9074 * tracepoint.c (gdb_agent_capability): New global.
9075 (in_process_agent_loaded_ust): Renamed to
9076 `in_process_agent_supports_ust'.
9077 Update callers.
9078 (in_process_agent_supports_ust): Call agent_capability_check.
9079 (clear_installed_tracepoints): Assert that agent supports
9080 agent.
9081
d1feda86
YQ
90822012-03-03 Yao Qi <yao@codesourcery.com>
9083
9084 * linux-low.c (linux_supports_agent): New.
9085 (linux_target_ops): Initialize field `supports_agent' with
9086 linux_supports_agent.
9087 * target.h (struct target_ops) <supports_agent>: New.
9088 (target_supports_agent): New macro.
9089 * server.c (handle_general_set): Handle packet 'QAgent'.
9090 (handle_query): Send `QAgent+'.
9091 * Makefile.in (server.o): Depends on agent.h.
9092
2fa291ac
YQ
90932012-03-03 Yao Qi <yao@codesourcery.com>
9094
9095 * Makefile.in (OBS): Add agent.o.
9096 Add new rule for agent.o.
9097 Track dependence of tracepoint.c on agent.h.
9098 * tracepoint.c (run_inferior_command_1):
9099 (run_inferior_command): Call agent_run_command.
9100 (gdb_ust_connect_sync_socket): Deleted. Move it to
9101 common/agent.c.
9102 (resume_thread, stop_thread): Likewise.
9103 (gdb_ust_socket_init): Renamed to ...
9104 (gdb_agent_socket_init): ... New.
9105 (gdb_ust_thread): Renamed to ...
9106 (gdb_agent_helper_thread): ... New.
9107 (gdb_ust_init): Move some code to ...
9108 (gdb_agent_init): ... here. New.
9109 [HAVE_UST]: Call gdb_ust_init.
9110 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9111 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9112 * config.in, configure: Regenerated.
9113
05044653
PA
91142012-03-02 Pedro Alves <palves@redhat.com>
9115
9116 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9117 * linux-low.c (struct simple_pid_list): New.
9118 (stopped_pids): New a struct simple_pid_list pointer.
9119 (add_to_pid_list, pull_pid_from_list): New.
9120 (handle_extended_wait): Don't assume the first signal new children
9121 report is SIGSTOP. Adjust call to pull_pid_from_list.
9122 (linux_wait_for_lwp): Adjust.
9123
8d00225b
YQ
91242012-03-02 Yao Qi <yao@codesourcery.com>
9125
9126 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9127 debug log.
9128
19560ba5
YQ
91292012-03-02 Yao Qi <yao@codesourcery.com>
9130
9131 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9132 `stop_pc' and `tpoint'. Update caller.
9133
1faeff08
MR
91342012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9135
9136 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9137 * linux-low.c (use_linux_regsets): New macro.
9138 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9139 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9140 (linux_register_in_regsets): New function.
9141 (usr_fetch_inferior_registers): Skip registers covered by
9142 regsets.
9143 (usr_store_inferior_registers): Likewise.
9144 (usr_fetch_inferior_registers): New macro.
9145 (usr_store_inferior_registers): Likewise.
9146 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9147 (linux_store_registers): Likewise.
9148 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9149 prototype.
9150 (init_registers_mips64_dsp_linux): Likewise.
9151 (init_registers_mips_linux): New macro.
9152 (init_registers_mips_dsp_linux): Likewise.
9153 (mips_dsp_num_regs): Likewise.
9154 (DSP_BASE, DSP_CONTROL): New fallback macros.
9155 (mips_base_regs): New macro.
9156 (mips_regmap): Use it. Fix the size.
9157 (mips_dsp_regmap): New variable.
9158 (mips_dsp_regset_bitmap): Likewise.
9159 (mips_arch_setup): New function.
9160 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9161 than mips_regmap.
9162 (mips_cannot_store_register): Likewise.
9163 (the_low_target): Update .arch_setup, .num_regs and .regmap
9164 initializers. Add .regset_bitmap initializer.
9165 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9166 initializer.
9167 * linux-bfin-low.c (the_low_target): Likewise.
9168 * linux-cris-low.c (the_low_target): Likewise.
9169 * linux-crisv32-low.c (the_low_target): Likewise.
9170 * linux-ia64-low.c (the_low_target): Likewise.
9171 * linux-m32r-low.c (the_low_target): Likewise.
9172 * linux-m68k-low.c (the_low_target): Likewise.
9173 * linux-ppc-low.c (the_low_target): Likewise.
9174 * linux-s390-low.c (the_low_target): Likewise.
9175 * linux-sh-low.c (the_low_target): Likewise.
9176 * linux-sparc-low.c (the_low_target): Likewise.
9177 * linux-tic6x-low.c (the_low_target): Likewise.
9178 * linux-x86-low.c (the_low_target): Likewise.
9179 * linux-xtensa-low.c (the_low_target): Likewise.
9180 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9181 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9182 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9183 srv_xmlfiles.
9184 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9185 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9186
c03e6ccc
YQ
91872012-02-29 Yao Qi <yao@codesourcery.com>
9188 Pedro Alves <palves@redhat.com>
9189
9190 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9191 `step_over_finished' is true.
9192
644cebc9
PA
91932012-02-27 Pedro Alves <palves@redhat.com>
9194
9195 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9196 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9197
c14d7ab2
PA
91982012-02-27 Pedro Alves <palves@redhat.com>
9199
9200 PR server/9684
9201 * linux-low.c (pid_is_stopped): New.
9202 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9203
412c89dd
LM
92042012-02-25 Luis Machado <lgustavo@codesourcery.com>
9205
9206 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9207 of conditions.
9208
b745defe
MR
92092012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9210
9211 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9212
9f3a5c85
LM
92132012-02-24 Luis Machado <lgustavo@codesourcery>
9214
9215 * server.c (handle_query): Advertise support for target-side
9216 breakpoint condition evaluation.
9217 (process_point_options): New function.
9218 (process_serial_event): When inserting a breakpoint, check for
9219 a target-side condition that should be evaluated.
9220
9221 * mem-break.c: Include regcache.h and ax.h.
9222 (point_cond_list_t): New data structure.
9223 (breakpoint) <cond_list>: New field.
9224 (find_gdb_breakpoint_at): Make non-static.
9225 (delete_gdb_breakpoint_at): Clear any target-side
9226 conditions.
9227 (clear_gdb_breakpoint_conditions): New function.
9228 (add_condition_to_breakpoint): Likewise.
9229 (add_breakpoint_condition): Likewise.
9230 (gdb_condition_true_at_breakpoint): Likewise.
9231 (gdb_breakpoint_here): Return result directly instead
9232 of going through a local variable.
9233
9234 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9235 (clear_gdb_breakpoint_conditions): Likewise.
9236 (add_breakpoint_condition): Likewise.
9237 (gdb_condition_true_at_breakpoint): Likewise.
9238
9239 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9240 (need_step_over_p): Take target-side breakpoint condition into
9241 consideration.
9242
5e1dc496
LM
92432012-02-24 Luis Machado <lgustavo@codesourcery>
9244
9245 * server.h: Include tracepoint.h.
9246 (agent_mem_read, agent_get_trace_state_variable_value,
9247 agent_set_trace_state_variable_value,
9248 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9249 get_set_tsv_func_addr): New prototypes.
9250
9251 * ax.h: New include file.
9252 * ax.c: New source file.
9253
9254 * tracepoint.c: Include ax.h.
9255 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9256 agent_expr, eval_result_type): Move to ax.h.
9257 (parse_agent_expr): Rename to ...
9258 (gdb_parse_agent_expr): ... this, make it non-static and move
9259 to ax.h.
9260 (unparse_agent_expr) Rename to ...
9261 (gdb_unparse_agent_expr): ... this, make it non-static and move
9262 to ax.h.
9263 (eval_agent_expr): Rename to ...
9264 (eval_tracepoint_agent_expr): ... this.
9265 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9266 forward declarations.
9267 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9268 (agent_get_trace_state_variable_value): New function.
9269 (agent_set_trace_state_variable_value): New function.
9270 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9271 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9272 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9273 (condition_true_at_tracepoint): Likewise.
9274 (parse_agent_expr): Rename to ...
9275 (gdb_parse_agent_expr): ... this and move to ax.c.
9276 (unparse_agent_expr): Rename to ...
9277 (gdb_unparse_agent_expr): ... this and move to ax.c.
9278 (gdb_agent_op_name): Move to ax.c.
9279 (eval_agent_expr): Rename to ...
9280 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9281 and move to ax.c.
9282 (eval_tracepoint_agent_expr): New function.
9283 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 9284 non-static.
5e1dc496
LM
9285 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9286 ax.c.
9287 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9288 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9289 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9290 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9291 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9292 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9293 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9294 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9295 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9296 (compile_bytecodes): Remove forward declaration.
9297 (is_goto_target): Move to ax.c.
9298 (compile_bytecodes): Move to ax.c and call
9299 agent_get_trace_state_variable_value (...) and
9300 agent_set_trace_state_variable_value (...).
9301
9302 * Makefile.in: Update ax.c and IPA dependencies.
9303
277e4e52
PA
93042012-02-24 Pedro Alves <palves@redhat.com>
9305
9306 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9307 (cmd_bigqtbuffer_circular): ... this. Only handle
9308 'QTBuffer:circular:'.
9309 (handle_tracepoint_general_set): Adjust.
9310
bf4c19f7
YQ
93112012-02-16 Yao Qi <yao@codesourcery.com>
9312
9313 * inferiors.c: Move code to ...
9314 * dll.c: .... here. New.
9315 * server.h: Declare clear_dlls.
9316 * Makefile.in (SFILES): Add dll.c.
9317 (OBS): Add dll.o
9318 (dll.o): New rule.
9319
d73f2619
YQ
93202012-02-11 Yao Qi <yao@codesourcery.com>
9321
9322 * server.c: (handle_monitor_command): Add a new parameter
9323 `own_buf'.
9324 (handle_query): Update caller.
9325
f8255c2a
JB
93262012-02-09 Joel Brobecker <brobecker@adacore.com>
9327
9328 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9329 * configure, config.in: Regenerate.
9330 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9331 is not defined.
9332
da84f473
PA
93332012-02-02 Pedro Alves <palves@redhat.com>
9334
9335 Try SIGKILL first, then PTRACE_KILL.
9336 * linux-low.c (linux_kill_one_lwp): New.
9337 (linux_kill_one_lwp): Rename to ...
9338 (kill_one_lwp_callback): ... this. Use the new
9339 linux_kill_one_lwp.
9340
e886a173
PA
93412012-02-02 Pedro Alves <palves@redhat.com>
9342
9343 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9344 inferior.
9345
be07f1a2
PA
93462012-01-27 Pedro Alves <palves@redhat.com>
9347
9348 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9349 (elf_64_file_p): Make static.
9350 (linux_pid_exe_is_elf_64_file): New.
9351 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9352 Delete declarations.
9353 (linux_pid_exe_is_elf_64_file): Declare.
9354 * linux-x86-low.c (x86_arch_setup): Use
9355 linux_pid_exe_is_elf_64_file.
9356
d8301ad1
JK
93572012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9358
9359 * linux-low.c (linux_wait_for_event_1): Rename to ...
9360 (linux_wait_for_event): ... here and merge it with former
9361 linux_wait_for_event - new variable wait_ptid, use it.
9362 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9363
01b17894
PA
93642012-01-23 Pedro Alves <palves@redhat.com>
9365
9366 * server.c (main): Avoid yet another case of infinite loop while
9367 detaching/killing after a longjmp.
9368
e825046f
JK
93692012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9370
9371 Code cleanup.
9372 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9373
b9e7b9c3
UW
93742012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9375
9376 * hostio.c (handle_readlink): New function.
9377 (handle_vFile): Call it to handle "vFile:readlink" packets.
9378
901f9912
UW
93792012-01-20 Pedro Alves <palves@redhat.com>
9380 Ulrich Weigand <ulrich.weigand@linaro.org>
9381
9382 * server.c (handle_v_requests): Only support vAttach and vRun to
9383 start multiple processes when in extended protocol mode.
9384
fc1ab1a0
PA
93852012-01-17 Pedro Alves <palves@redhat.com>
9386
9387 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9388 memalign plus mprotect to allocate the scratch buffer.
9389
7d5d4e98
PA
93902012-01-13 Pedro Alves <palves@redhat.com>
9391
9392 * server.c (attach_inferior): Clear `cont_thread'.
9393
f128d5e9
PA
93942012-01-13 Pedro Alves <palves@redhat.com>
9395
9396 * server.c (main): Avoid infinite loop while detaching/killing
9397 after a longjmp.
9398
06db92f0
DE
93992012-01-09 Doug Evans <dje@google.com>
9400
9401 * server.c (start_inferior): Set last_ptid in --wrapper case.
9402
32d92999
YQ
94032012-01-06 Yao Qi <yao@codesourcery.com>
9404
9405 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9406 defined.
9407 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9408
5e0a92a9
YQ
94092012-01-04 Yao Qi <yao@codesourcery.com>
9410
9411 * tracepoint.c (cmd_qtdp): Print debug message
9412 for static tracepoint.
9413
ae639e8c
YQ
94142012-01-04 Yao Qi <yao@codesourcery.com>
9415
9416 * tracepoint.c (trace_vdebug): Differentiate debug message
9417 between gdbserver and IPA.
9418
f72429c5
YQ
94192012-01-03 Yao Qi <yao@codesourcery.com>
9420
9421 * tracepoint.c (tracepoint_was_hit): Don't collect for
9422 static tracepoint.
9423
12c3e59c
JB
94242012-01-02 Joel Brobecker <brobecker@adacore.com>
9425
9426 * terminal.h: Reformat copyright header.
9427
67827812
JB
94282012-01-02 Joel Brobecker <brobecker@adacore.com>
9429
9430 * server.c (gdbserver_version): Update copyright year.
9431 * gdbreplay.c (gdbreplay_version): Likewise.
9432
3e52c33d
JK
94332011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9434
9435 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9436
9437 Revert:
9438 2011-12-18 Hui Zhu <teawater@gmail.com>
9439 * linux-low.c (linux_create_inferior): Save return value to ret.
9440
66f1260e
HZ
94412011-12-18 Hui Zhu <teawater@gmail.com>
9442
9443 * linux-low.c (linux_create_inferior): Save return value to ret.
9444
e77616d7
DE
94452011-12-16 Doug Evans <dje@google.com>
9446
e7b06c57
DE
9447 * linux-low.c (linux_create_inferior): If stdio connection,
9448 redirect stdin from /dev/null, stdout to stderr.
9449 * remote-utils.c (remote_is_stdio): New static global.
9450 (remote_connection_is_stdio): New function.
9451 (remote_prepare): Handle stdio connection.
9452 (remote_open): Ditto.
9453 (remote_close): Don't close stdin for stdio connections.
9454 (read_prim,write_prim): New functions. Replace all calls to
9455 read/write to these.
9456 * server.c (main): Watch for "-" argument. Move call to
9457 remote_prepare before start_inferior.
9458 * server.h (STDIO_CONNECTION_NAME): New macro.
9459 (remote_connection_is_stdio): Declare.
9460
e77616d7
DE
9461 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9462 in debugging output.
9463
82067193
YQ
94642011-12-15 Yao Qi <yao@codesourcery.com>
9465
9466 * tracepoint.c: Include sys/syscall.h.
9467 (gdb_ust_thread): Remove preprocessor conditional.
9468
82bfbe7e
PA
94692011-12-14 Pedro Alves <pedro@codesourcery.com>
9470
9471 * linux-low.c (linux_detach_one_lwp): Call
9472 the_low_target.prepare_to_resume before detaching.
9473
712c6575
YQ
94742011-12-14 Yao Qi <yao@codesourcery.com>
9475
9476 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9477 of write.
9478
d54d1edf
YQ
94792011-12-14 Yao Qi <yao@codesourcery.com>
9480
9481 * i386-low.c (i386_low_stopped_data_address): Initialize local
9482 variable `control'.
9483
6210a125
PA
94842011-12-13 Pedro Alves <pedro@codesourcery.com>
9485
9486 PR remote/13492
9487
9488 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9489 DR_CONTROL unless necessary. Extend comments.
9490 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9491 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9492
2ece8244
YQ
94932011-12-13 Yao Qi <yao@codesourcery.com>
9494
9495 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9496 macros.
9497 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9498
784867a5
JK
94992011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9500
9501 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9502 Print new debug message for such case.
9503
6bf36717
JK
95042011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9505
9506 Fix overlapping memcpy.
9507 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9508 the read_inferior_memory transfer.
9509 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9510 write_inferior_memory transfer.
9511 (set_fast_tracepoint_jump): New variable buf. Use it for the
9512 read_inferior_memory and write_inferior_memory transfers.
9513 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9514 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9515 Use it for the write_inferior_memory transfer.
9516 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9517 buffers.
9518
50275556
MR
95192011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9520
9521 * linux-low.c (fetch_register, store_register): Make code
9522 consistent, fix formatting.
9523
7325beb4
MR
95242011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9525
9526 * linux-low.c (usr_store_inferior_registers): Factor out code
9527 to handle individual registers into...
9528 (store_register): ... this new function.
9529
c642a434
UW
95302011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9531
9532 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9533 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9534 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9535 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9536 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9537 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9538 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9539 (srv_xmlfiles): Add new XML files.
9540
9541 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9542 and <sys/uio.h>.
9543 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9544 (init_registers_s390_linux32v1): Add prototype.
9545 (init_registers_s390_linux32v2): Likewise.
9546 (init_registers_s390_linux64v1): Likewise.
9547 (init_registers_s390_linux64v2): Likewise.
9548 (init_registers_s390x_linux64v1): Likewise.
9549 (init_registers_s390x_linux64v2): Likewise.
9550 (s390_num_regs): Increment to 52.
9551 (s390_regmap): Add orig_r2 register.
9552 (s390_num_regs_3264): Increment to 68.
9553 (s390_regmap_3264): Add orig_r2 register.
9554 (s390_collect_ptrace_register): Handle orig_r2 register.
9555 (s390_supply_ptrace_register): Likewise.
9556 (s390_fill_last_break): New function.
9557 (s390_store_last_break): Likewise.
9558 (s390_fill_system_call): New function.
9559 (s390_store_system_call): Likewise.
9560 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9561 register sets.
9562 (s390_check_regset): New function.
9563 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9564 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9565 Update target_regsets for available register sets.
9566
2268b414
JK
95672011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9568 Jan Kratochvil <jan.kratochvil@redhat.com>
9569
9570 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9571 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9572 New.
9573 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9574 * linux-low.h (struct process_info_private): New member r_debug.
9575 * server.c (handle_qxfer_libraries): Call
9576 the_target->qxfer_libraries_svr4.
9577 (handle_qxfer_libraries_svr4): New function.
9578 (qxfer_packets): New entry "libraries-svr4".
9579 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9580 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9581 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9582 PACKET_qXfer_libraries_svr4.
9583
d6db1fab
UW
95842011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9585
9586 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9587 PSW address/mask between 8-byte and 16-byte formats.
9588 (s390_supply_ptrace_register): Likewise.
9589 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9590 basic addressing mode bit.
9591
242f5f1c
SS
95922011-11-24 Stan Shebs <stan@codesourcery.com>
9593
9594 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9595
f196051f
SS
95962011-11-17 Stan Shebs <stan@codesourcery.com>
9597
9598 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9599 (tracing_start_time): New global.
9600 (tracing_stop_time): New global.
9601 (tracing_user_name): New global.
9602 (tracing_notes): New global.
9603 (tracing_stop_note): New global.
9604 (cmd_qtstart): Set traceframe_usage, start_time.
9605 (stop_tracing): Set stop_time.
9606 (cmd_qtstatus): Report additional status.
9607 (cmd_qtp): New function.
9608 (handle_tracepoint_query): Call it.
9609 (cmd_qtnotes): New function.
9610 (handle_tracepoint_general_set): Call it.
9611 (get_timestamp): Rename from tsv_get_timestamp.
9612
405f8e94
SS
96132011-11-14 Stan Shebs <stan@codesourcery.com>
9614 Kwok Cheung Yeung <kcy@codesourcery.com>
9615
9616 * linux-x86-low.c (small_jump_insn): New.
9617 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9618 trampoline and error message, build a trampoline and issue a small
9619 jump instruction to it.
9620 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9621 trampoline and error message.
9622 (x86_get_min_fast_tracepoint_insn_len): New.
9623 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9624 * linux-low.h (struct linux_target_ops): Add arguments to
9625 install_fast_tracepoint_jump_pad operation, add new operation.
9626 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9627 arguments.
9628 (linux_get_min_fast_tracepoint_insn_len): New function.
9629 (linux_target_op): Add new operation.
9630 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9631 (gdb_trampoline_buffer_end): Ditto.
9632 (gdb_trampoline_buffer_error): Ditto.
9633 (struct ipa_sym_addresses): Add fields for new IPA variables.
9634 (symbol_list): Add entries for new IPA variables.
9635 (struct tracepoint): Add fields to hold the address range of the
9636 trampoline used by the tracepoint.
9637 (trampoline_buffer_head): New static variable.
9638 (trampoline_buffer_tail): Ditto.
9639 (claim_trampoline_space): New function.
9640 (have_fast_tracepoint_trampoline_buffer): New function.
9641 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9642 structure.
9643 (install_fast_tracepoint): Ditto, also add error buffer argument.
9644 (cmd_qtminftpilen): New function.
9645 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9646 (fast_tracepoint_from_trampoline_address): New function.
9647 (fast_tracepoint_collecting): Handle trampoline as part of jump
9648 pad space.
9649 (set_trampoline_buffer_space): New function.
9650 (initialize_tracepoint): Initialize new IPA variables.
9651 * target.h (struct target_ops): Add arguments to
9652 install_fast_tracepoint_jump_pad operation, add new
9653 get_min_fast_tracepoint_insn_len operation.
9654 (target_get_min_fast_tracepoint_insn_len): New.
9655 (install_fast_tracepoint_jump_pad): Add arguments.
9656 * server.h (IPA_BUFSIZ): Define.
9657 * linux-i386-ipa.c: Include extra header files.
9658 (initialize_fast_tracepoint_trampoline_buffer): New function.
9659 (initialize_low_tracepoint): Call it.
9660 * server.h (set_trampoline_buffer_space): Declare.
9661 (claim_trampoline_space): Ditto.
9662 (have_fast_tracepoint_trampoline_buffer): Ditto.
9663
1e4d1764
YQ
96642011-11-14 Yao Qi <yao@codesourcery.com>
9665
9666 * server.c (handle_query): Handle InstallInTrace for qSupported.
9667 * tracepoint.c (add_tracepoint): Sort list.
9668 (install_tracepoint, download_tracepoint): New.
9669 (cmd_qtdp): Call them to install and download tracepoints.
9670 (sort_tracepoints): Removed.
9671 (cmd_qtstart): Update.
9672
5c73ff4e
YQ
96732011-11-14 Yao Qi <yao@codesourcery.com>
9674
9675 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9676 * mem-break.h: Declare.
9677 * tracepoint.c (cmd_qtstart): Move some code to ...
9678 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9679 New.
9680 (download_tracepoints): Move some code to ...
9681 (download_tracepoint_1): ... here. New.
9682
86a30030
YQ
96832011-11-08 Yao Qi <yao@codesourcery.com>
9684
9685 * remote-utils.c (relocate_instruction): A comment fix.
9686
8d26e50c
JB
96872011-11-07 Joel Brobecker <brobecker@adacore.com>
9688
9689 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9690 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9691 dr_status_mirror and dr_control_mirror from debug_reg_state.
9692 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9693 (i386_initial_stuff): Remove use of deleted globals.
9694 (i386_get_thread_context, i386_set_thread_context,
9695 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9696 from debug_reg_state.
9697
a59306a3
YQ
96982011-11-05 Yao Qi <yao@codesourcery.com>
9699
9700 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9701 address as TPOINT's.
9702
3065dfb6
SS
97032011-11-02 Stan Shebs <stan@codesourcery.com>
9704
9705 * tracepoint.c (agent_mem_read_string): New function.
9706 (eval_agent_expr): Call it for tracenz.
9707 * server.c (handle_query): Report support for tracenz.
9708
fd0d8c7c
YQ
97092011-11-02 Yao Qi <yao@codesourcery.com>
9710
9711 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9712
609086b1
YQ
97132011-11-02 Yao Qi <yao@codesourcery.com>
9714
9715 * target.h: Fix a typo in comment.
9716
b9fd1791
PA
97172011-10-31 Pedro Alves <pedro@codesourcery.com>
9718
9719 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9720 clobber the breakpoints' shadows with fast tracepoint jumps.
9721 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9722 * target.c (write_inferior_memory): Also pass MYADDR down to
9723 check_mem_write.
9724
03583c20
UW
97252011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9726
9727 * configure.ac: Check support for personality routine.
9728 * configure: Regenerate.
9729 * config.in: Likewise.
9730 * linux-low.c: Include <sys/personality.h>.
9731 Define ADDR_NO_RANDOMIZE if necessary.
9732 (linux_create_inferior): Disable address space randomization when
9733 forking inferior, if requested.
9734 (linux_supports_disable_randomization): New function.
9735 (linux_target_ops): Install it.
9736 * server.h (disable_randomization): Declare.
9737 * server.c (disable_randomization): New global variable.
9738 (handle_general_set): Handle QDisableRandomization.
9739 (handle_query): Likewise for qSupported.
9740 (main): Support --disable-randomization and --no-disable-randomization
9741 command line arguments.
9742 * target.h (struct target_ops): Add supports_disable_randomization.
9743 (target_supports_disable_randomization): New macro.
9744
723b724b
MF
97452011-09-29 Mike Frysinger <vapier@gentoo.org>
9746
9747 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9748 ifdef check.
9749 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9750 [!PT_GETDSBT] (target_loadmap): New definition.
9751 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9752 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9753 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9754 and PT_GETDSBT to LINUX_LOADMAP.
9755 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9756 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9757
55329a5c 97582011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
9759
9760 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9761 (arm_linux_hwbp_cap): New static variable.
9762 (arm_linux_get_hwbp_cap): Replace by ...
9763 (arm_linux_init_hwbp_cap): ... this new function.
9764 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9765 (arm_linux_get_hw_watchpoint_count): Likewise.
9766 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9767 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9768 (arm_prepare_to_resume): Use perror_with_name instead of error.
9769
55329a5c 97702011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
9771
9772 * linux-arm-low.c: Include <signal.h>.
9773 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9774 (struct arm_linux_hwbp_cap): New data type.
9775 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9776 (struct arm_linux_hw_breakpoint): New data type.
9777 (MAX_BPTS, MAX_WPTS): Define.
9778 (struct arch_process_info, struct arch_lwp_info): New data types.
9779 (arm_linux_get_hwbp_cap): New function.
9780 (arm_linux_get_hw_breakpoint_count): Likewise.
9781 (arm_linux_get_hw_watchpoint_count): Likewise.
9782 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9783 (arm_hwbp_control_initialize): Likewise.
9784 (arm_hwbp_control_is_enabled): Likewise.
9785 (arm_hwbp_control_is_initialized): Likewise.
9786 (arm_hwbp_control_disable): Likewise.
9787 (arm_linux_hw_breakpoint_equal): Likewise.
9788 (arm_linux_hw_point_initialize): Likewise.
9789 (struct update_registers_data): New data structure.
9790 (update_registers_callback: New function.
9791 (arm_insert_point): Likewise.
9792 (arm_remove_point): Likewise.
9793 (arm_stopped_by_watchpoint): Likewise.
9794 (arm_stopped_data_address): Likewise.
9795 (arm_new_process): Likewise.
9796 (arm_new_thread): Likewise.
9797 (arm_prepare_to_resume): Likewise.
9798 (the_low_target): Register arm_insert_point, arm_remove_point,
9799 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9800 arm_new_thread, and arm_prepare_to_resume.
9801
6b9801d4
SS
98022011-09-15 Stan Shebs <stan@codesourcery.com>
9803
9804 * server.h (struct emit_ops): Add compare-goto fields.
9805 * tracepoint.c (gdb_agent_op_sizes): New table.
9806 (emit_eq_goto): New function.
9807 (emit_ne_goto): New function.
9808 (emit_lt_goto): New function.
9809 (emit_le_goto): New function.
9810 (emit_gt_goto): New function.
9811 (emit_ge_goto): New function.
9812 (is_goto_target): New function.
9813 (compile_bytecodes): Recognize special cases of compare-goto
9814 combinations and call specialized emitters for them.
9815 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9816 (amd64_emit_ne_goto): New function.
9817 (amd64_emit_lt_goto): New function.
9818 (amd64_emit_le_goto): New function.
9819 (amd64_emit_gt_goto): New function.
9820 (amd64_emit_ge_goto): New function.
9821 (amd64_emit_ops): Add the new functions.
9822 (i386_emit_eq_goto): New function.
9823 (i386_emit_ne_goto): New function.
9824 (i386_emit_lt_goto): New function.
9825 (i386_emit_le_goto): New function.
9826 (i386_emit_gt_goto): New function.
9827 (i386_emit_ge_goto): New function.
9828 (i386_emit_ops): Add the new functions.
9829
bf15cbda
SS
98302011-09-08 Stan Shebs <stan@codesourcery.com>
9831
9832 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9833 (i386_emit_epilogue): Restore %ebx.
9834
943ca1dd
JZ
98352011-08-31 Jie Zhang <jzhang918@gmail.com>
9836
9837 * server.c (step_thread): Remove definition.
9838 (process_serial_event): Don't handle Hs.
9839 * server.h (step_thread): Remove declaration.
9840 * target.c (set_desired_inferior): Remove use of step_thread.
9841
e3deef73
LM
98422011-08-24 Luis Machado <lgustavo@codesourcery.com>
9843
9844 * linux-low.c: Include linux-procfs.h.
9845 (linux_attach_lwp_1): Update comments.
9846 (linux_attach): Scan for existing threads when attaching to a
9847 process that is the tgid.
9848 * Makefile.in: Update dependencies.
9849
13da1c97
LM
98502011-08-24 Luis Machado <lgustavo@codesourcery.com>
9851
9852 * configure.srv: Add linux-procfs.o dependencies.
9853
881127c9
YQ
98542011-08-14 Yao Qi <yao@codesourcery.com>
9855
9856 * target.h (struct target_ops): Fix indent.
9857 * win32-low.c (win32_target_ops): Fix comment.
9858
58dbd541
YQ
98592011-08-14 Andrew Jenner <andrew@codesourcery.com>
9860 Yao Qi <yao@codesourcery.com>
9861
9862 * Makefile.in (clean): Remove tic6x-*.c files.
9863 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9864 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9865 (tic6x-c64xp-linux.c): Likewise.
9866 * configure.srv: Add support for tic6x-*-uclinux.
9867 * linux-tic6x-low.c: New.
9868 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9869
78d85199
YQ
98702011-08-14 Andrew Stubbs <ams@codesourcery.com>
9871 Yao Qi <yao@codesourcery.com>
9872
9873 * target.h (struct target_ops): Add read_loadmap.
9874 * linux-low.c (struct target_loadseg): New type.
9875 (struct target_loadmap): New type.
9876 (linux_read_loadmap): New function.
9877 (linux_target_ops): Add linux_read_loadmap.
9878 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
9879 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9880 to NULL.
78d85199 9881
a959a88d
EZ
98822011-08-05 Eli Zaretskii <eliz@gnu.org>
9883
9884 * win32-low.c: Include <stdint.h>.
9885
1ced966e
PA
98862011-07-22 Pedro Alves <pedro@codesourcery.com>
9887
9888 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9889 to the inferior here.
9890 (i386_remove_aligned_watchpoint): Ditto.
9891 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9892 fit part of the watchpoint in the debug registers.
9893 (i386_update_inferior_debug_regs): New.
9894 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9895 registers, and only update the inferior on success.
9896 (i386_low_remove_watchpoint): Ditto.
9897
d26e3629
KY
98982011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9899
9900 * linux-low.c (compare_ints, unique, list_threads, show_process,
9901 linux_core_of_thread): Delete.
9902 (linux_target_ops): Change linux_core_of_thread to
9903 linux_common_core_of_thread.
9904 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9905 * utils.c (malloc_failure): Change type of argument.
9906 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9907 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9908 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9909 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9910 (IPA_OBJS): Add common-utils-ipa.o.
9911 (ptid_h, linux_osdata_h): New macros.
9912 (server_h): Add common/common-utils.h, common/xml-utils.h,
9913 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9914 common/ptid.h.
9915 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9916 ptid.o, buffer.o): New rules.
9917 (linux-low.o): Add common/linux-osdata.h as a dependency.
9918 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9919 * configure.ac: Add AC_HEADER_DIRENT check.
9920 * config.in: Regenerate.
9921 * configure: Regenerate.
9922 * remote-utils.c (xml_escape_text): Delete.
9923 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9924 buffer_xml_printf): Move to common/buffer.c.
9925 * server.c (main): Remove call to initialize_inferiors.
9926 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9927 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9928 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9929 internal_error, gdb_assert, gdb_assert_fail): Delete.
9930 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9931 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9932 common/buffer.h.
9933 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9934 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9935 initialize_inferiors): Delete.
9936
2275a1a7
PA
99372011-07-20 Pedro Alves <pedro@codesourcery.com>
9938
9939 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9940 symbol error.
9941
0a5b1e09
PA
99422011-05-31 Pedro Alves <pedro@codesourcery.com>
9943
9944 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9945 assertion.
9946 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9947
6938fd34
YQ
99482011-05-26 Yao Qi <yao@codesourcery.com>
9949
9950 * Makefile.in (thread-db.o): Track dependence to
9951 common/gdb_thread_db.h.
9952 * thread-db.c: include gdb_thread_db.h from right place.
9953
b481f9e0
TT
99542011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9955
9956 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9957 __FILE__ and __LINE__ to internal_error.
9958
98a5dd13
DE
99592011-05-13 Doug Evans <dje@google.com>
9960
9961 * thread-db.c (try_thread_db_load_from_sdir): New function.
9962 (try_thread_db_load_from_dir): New function.
9963 (thread_db_load_search): Handle $sdir, ignore $pdir.
9964 Remove trying of system directories if search of
9965 libthread-db-search-path fails, that is now done via $sdir.
9966
d248b706
KY
99672011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9968
9969 * server.c (handle_query): Add EnableDisableTracepoints to the list
9970 of supported features.
43aaf8b6 9971 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 9972 tracepoints.
43aaf8b6
PA
9973 (cmd_qtenable_disable): New.
9974 (cmd_qtstart): Install tracepoints even if disabled.
9975 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9976 receiving a QTEnable or QTDisable packet.
9977 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9978 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9979 tracepoints.
9980 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 9981
84e578fb
DE
99822011-05-10 Doug Evans <dje@google.com>
9983
9984 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9985
71f55dd8
DE
99862011-05-04 Doug Evans <dje@google.com>
9987
9988 * linux-low.c (linux_join): Skip process lookup.
9989 * spu-low.c (spu_join): Ditto.
9990 * server.c (join_inferiors_callback): Delete.
9991 (process_serial_event): For 'D' packet (detach) call join_inferior
9992 directly.
9993
4d393d60
JM
99942011-05-04 Joseph Myers <joseph@codesourcery.com>
9995
9996 * README: Don't mention xscale*-*-linux*.
9997 * configure.srv (xscale*-*-linux*): Don't handle target.
9998
b00ad6ff
NF
99992011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10000
10001 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10002 casting pointers.
10003 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10004 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10005 (i386_emit_void_call_2): Likewise.
10006
af96c192
YQ
100072011-04-26 Yao Qi <yao@codesourcery.com>
10008
43aaf8b6
PA
10009 * linux-low.c: Move common macros to linux-ptrace.h.
10010 Include linux-ptrace.h.
af96c192
YQ
10011 * Makefile.in (linux_ptrace_h): New.
10012 (linux-low.o): Depends on linux-ptrace.h.
10013
03f2bd59
JK
100142011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10015
10016 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10017 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10018 (remote_prepare): New function with most of the TCP code from ...
10019 (remote_open): ... here. Detect PORT here unconditionally. Move also
10020 setting transport_is_reliable.
10021 * server.c (run_once): New variable.
10022 (gdbserver_usage): Document it.
10023 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10024 the first run if RUN_ONCE.
10025 * server.h (run_once, remote_prepare): New declarations.
10026
7a9dd1b2
TT
100272011-04-19 Tom Tromey <tromey@redhat.com>
10028
10029 * win32-low.c (handle_load_dll): Remove duplicate "the".
10030
81239425
PM
100312011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10032
10033 Remove support for old Cygwin 1.5 versions.
10034 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10035 function to avoid warning.
10036 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10037 warning.
10038
9e0627f1
PM
100392011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10040
10041 * gdbserver/server.h (Macro _): Define it if not available.
10042
588eebee
MS
100432011-03-14 Michael Snyder <msnyder@vmware.com>
10044
348af9f7 10045 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 10046
43f70d4c
JB
100472011-03-10 Joel Brobecker <brobecker@adacore.com>
10048
10049 * Makefile.in (maintainer-clean realclean distclean): Remove
10050 "make ... subdir_do" command.
10051
348af9f7
MS
100522011-03-10 Michael Snyder <msnyder@vmware.com>
10053
10054 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10055
10056 * server.c (handle_v_run): Free alloced buffer on early return.
10057
e637a4f5
YQ
100582011-03-09 Yao Qi <yao@codesourcery.com>
10059
10060 Revert:
10061 2011-03-04 Yao Qi <yao@codesourcery.com>
10062
10063 * Makefile.in: Remove GNU make feature --directory.
10064
10065 2011-03-05 Yao Qi <yao@codesourcery.com>
10066
10067 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10068 (subdir_do): New make target. Copied from gdb/Makefile.
10069 (maintainer-clean, realclean, distclean, clean): Call corresponding
10070 make targets in common/Makefile.
10071
10072 2011-02-11 Yao Qi <yao@codesourcery.com>
10073
10074 * configure.ac: Call AC_PROG_RANLIB.
10075 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10076 * configure: Regenerate.
10077
e6edda56
JK
100782011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10079
10080 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10081
e5141119
JB
100822011-03-06 Yao Qi <yao@codesourcery.com>
10083
10084 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10085
64794aa4
JB
100862011-03-05 Yao Qi <yao@codesourcery.com>
10087
10088 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10089 (subdir_do): New make target. Copied from gdb/Makefile.
10090 (maintainer-clean, realclean, distclean, clean): Call corresponding
10091 make targets in common/Makefile.
10092
7a762829
YQ
100932011-03-04 Yao Qi <yao@codesourcery.com>
10094
10095 * Makefile.in: Remove GNU make feature --directory.
10096
348af9f7
MS
100972011-03-04 Michael Snyder <msnyder@vmware.com>
10098
10099 * server.c (queue_stop_reply): Call xmalloc not malloc.
10100
101012011-03-02 Michael Snyder <msnyder@vmware.com>
10102
10103 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10104
9f72fee2
MS
101052011-02-28 Michael Snyder <msnyder@vmware.com>
10106
588eebee
MS
10107 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10108 (cmd_qtframe): Ditto.
10109 (cmd_qtbuffer): Ditto.
10110 (cmd_bigqtbuffer): Ditto.
10111
9f72fee2
MS
10112 * utils.c (decimal2str): Initialize 'width' to nine, then
10113 don't mess with it.
10114
8040bd49
UW
101152011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10116
10117 * hostio.c (require_data): Free *data, not data.
10118
7e52cbd0
JK
101192011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10120
10121 * hostio.c (require_data): Use free, not xfree.
10122
9130f83e
MS
101232011-02-27 Michael Snyder <msnyder@vmware.com>
10124
4b812f4e
MS
10125 * server.c (handle_query): Discard unused value.
10126
9130f83e
MS
10127 * hostio.c (require_data): Free malloc memory before returning
10128 error.
10129
69d37113
MS
101302011-02-26 Michael Snyder <msnyder@vmware.com>
10131
10132 * linux-low.c (list_threads): Call closedir for dirent.
10133
35f5825a
MS
101342011-02-27 Michael Snyder <msnyder@vmware.com>
10135
2a589cef
MS
10136 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10137 a case statement falls through.
10138
0adea5f7
MS
10139 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10140
35f5825a
MS
10141 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10142 in comparison.
10143
238f1c74
MS
101442011-02-26 Michael Snyder <msnyder@vmware.com>
10145
10146 * utils.c (decimal2str): Eliminate dead code and dead param.
10147 (pulongest): Drop dead param from call to decimal2str.
10148 (plongest): Ditto.
10149
633ff500
JB
101502011-02-24 Joel Brobecker <brobecker@adacore.com>
10151
10152 Revert the following patch (not approved yet):
10153 2011-02-21 Hui Zhu <teawater@gmail.com>
10154 * tracepoint.c (tp_printf): New function.
10155 (eval_agent_expr): Handle gdb_agent_op_printf.
10156
f9c6ff72
HZ
101572011-02-21 Hui Zhu <teawater@gmail.com>
10158
10159 * tracepoint.c (tp_printf): New function.
10160 (eval_agent_expr): Handle gdb_agent_op_printf.
10161
94d5e490
TT
101622011-02-18 Tom Tromey <tromey@redhat.com>
10163
10164 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10165 (tracepoint.o): Likewise.
10166 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10167 (gdb_agent_op_names): Likewise.
10168
c7f96d2b
TT
101692011-02-18 Tom Tromey <tromey@redhat.com>
10170
10171 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10172 gdb_agent_op_rot>: New constants.
10173 (gdb_agent_op_names): Add pick and roll.
10174 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10175 cases.
10176
0feedb2c
JK
101772011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10178
10179 * aclocal.m4: Regenerated with aclocal-1.11.1.
10180
b3b9301e
PA
101812011-02-14 Pedro Alves <pedro@codesourcery.com>
10182
10183 * server.c (handle_qxfer_traceframe_info): New.
10184 (qxfer_packets): Register "traceframe-info".
10185 (handle_query): Report support for qXfer:traceframe-info:read+.
10186 * tracepoint.c (match_blocktype): New.
10187 (traceframe_find_block_type): Rename to ...
10188 (traceframe_walk_blocks): ... this. Add callback filter argument,
10189 and use it.
10190 (traceframe_find_block_type): New, reimplemented on top of
10191 traceframe_walk_blocks.
10192 (build_traceframe_info_xml): New.
10193 (traceframe_read_info): New.
10194 * server.h (traceframe_read_info): Declare.
10195
4f3e6fb7
YQ
101962011-02-11 Yao Qi <yao@codesourcery.com>
10197
10198 * configure.ac: Call AC_PROG_RANLIB.
10199 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10200 * configure: Regenerate.
10201
764880b7
PA
102022011-02-07 Pedro Alves <pedro@codesourcery.com>
10203
10204 * server.c (gdb_read_memory): Change return semantics to allow
10205 partial transfers.
10206 (handle_search_memory_1): Adjust.
10207 (process_serial_event) <'m' packet>: Handle partial transfers.
10208 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10209
1c79eb8a
PA
102102011-01-28 Pedro Alves <pedro@codesourcery.com>
10211
10212 * regcache.c (init_register_cache): Initialize
10213 regcache->register_status.
10214 (free_register_cache): Release regcache->register_status.
10215 (regcache_cpy): Copy register_status.
10216 (registers_to_string): Print 'x's for unavailable registers.
10217 (supply_register): Mark the register's status valid or
10218 unavailable, depending on whether a buffer was passed in or not.
10219 (supply_register_zeroed): New.
10220 (supply_regblock): Mark the registers' status valid or
10221 unavailable, depending on whether a buffer was passed in or not.
10222 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10223 (struct regcache): New `register_status' field.
10224 (supply_register_zeroed): Declare.
10225 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10226 supply_register_zeroed, rather than passing a NULL buffer to
10227 supply_register.
10228 * tracepoint.c (fetch_traceframe_registers): Update comment.
10229
85724a0e
PA
102302011-01-28 Pedro Alves <pedro@codesourcery.com>
10231
10232 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10233 buffer explicit.
10234
d08aafef
PA
102352011-01-25 Pedro Alves <pedro@codesourcery.com>
10236
10237 * server.h (decode_xfer_write): Change prototype.
10238 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10239 and don't extract the annex here.
10240 * server.c (decode_xfer_read): Remove `annex' parameter,
10241 and don't extract the annex here.
10242 (decode_xfer): New.
10243 (struct qxfer): New.
10244 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10245 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10246 (handle_qxfer_statictrace): New functions, abstracted out from
10247 handle_query, and made to use the struct qxfer interface.
10248 (handle_threads_qxfer_proper): Rename to ...
10249 (handle_qxfer_threads_proper): ... this.
10250 (handle_threads_qxfer): Rename to ...
10251 (handle_qxfer_threads): ... this. Adjust.
10252 (qxfer_packets): New array.
10253 (handle_qxfer): New function.
10254 (handle_query): Use handle_qxfer.
10255
493e2a69
MS
102562011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10257
10258 * gdbreplay.c: Shorten lines of >= 80 columns.
10259 * linux-low.c: Ditto.
10260 * linux-ppc-low.c: Ditto.
10261 * linux-s390-low.c: Ditto.
10262 * linux-sparc-low.c: Ditto.
10263 * linux-x86-low.c: Ditto.
10264 * linux-xtensa-low.c: Ditto.
10265 * mem-break.c: Ditto.
10266 * nto-low.c: Ditto.
10267 * regcache.h: Ditto.
10268 * remote-utils.c: Ditto.
10269 * server.c: Ditto.
10270 * server.h: Ditto.
10271 * thread-db.c: Ditto.
10272 * tracepoint.c: Ditto.
10273 * utils.c: Ditto.
10274 * win32-low.h: Ditto.
10275
44944448
JB
102762011-01-05 Joel Brobecker <brobecker@adacore.com>
10277
10278 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10279 update.
10280
71ce852c
JB
102812011-01-01 Joel Brobecker <brobecker@adacore.com>
10282
10283 * server.c (gdbserver_version): Update copyright year in version
10284 output.
10285 * gdbreplay.c (gdbreplay_version): Ditto.
10286
eb826dc6
MF
102872010-12-29 Jie Zhang <jie.zhang@analog.com>
10288
10289 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10290 * linux-bfin-low.c: New file.
10291 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10292 PT_DATA_ADDR for BFIN targets.
10293 * Makefile.in (SFILES): Add linux-bfin-low.c.
10294 (clean): Remove reg-bfin.c.
10295 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10296 * README: Mention supported Blackfin targets.
10297
39ab222a
MF
102982010-12-23 Mike Frysinger <vapier@gentoo.org>
10299
10300 * .gitignore: New file.
10301
a1f2ce7d
MF
103022010-11-16 Mike Frysinger <vapier@gentoo.org>
10303
10304 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10305
f474844c
JZ
103062010-10-22 Jie Zhang <jie@codesourcery.com>
10307
10308 * Makefile.in: Add FLAGS_TO_PASS variable.
10309 (install): Remove dependency of install-only and recursively
10310 invoke make for install-only.
10311
f1048712
DE
103122010-10-04 Doug Evans <dje@google.com>
10313
10314 * Makefile.in (uninstall): Use $(DESTDIR).
10315
b53a1623
PA
103162010-09-24 Pedro Alves <pedro@codesourcery.com>
10317
e6ee044d
PA
10318 PR gdb/11842
10319
b53a1623
PA
10320 * linux-x86-low.c (compat_siginfo_from_siginfo)
10321 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10322 si_code is < 0. Check for si_code == SI_TIMER before checking for
10323 si_code < 0.
10324
fa1bd1e4
JB
103252010-09-13 Joel Brobecker <brobecker@adacore.com>
10326
10327 * lynx-i386-low.c: New file.
10328 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10329
47fac8f8
JB
103302010-09-13 Joel Brobecker <brobecker@adacore.com>
10331
10332 * lynx-low.c (ptrace_request_to_str): Remove handling for
10333 request values that have been removed in LynxOS 5.x.
10334
1adfc54d
JB
103352010-09-13 Joel Brobecker <brobecker@adacore.com>
10336
10337 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10338 <ptrace.h>
10339
c2a66c29
NS
103402010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10341
10342 * configure.ac: Add --enable-inprocess-agent option.
10343 * configure: Rebuilt.
10344
32fcada3
YQ
103452010-09-06 Yao Qi <yao@codesourcery.com>
10346
10347 * linux-low.c (linux_kill): Remove unused variable.
10348 (linux_stabilize_threads): Likewise.
10349 * server.c (start_inferior): Likewise.
10350 (queue_stop_reply_callback): Likewise.
10351 * tracepoint.c (do_action_at_tracepoint): Likewise.
10352
0cccb683
YQ
103532010-09-06 Yao Qi <yao@codesourcery.com>
10354
10355 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10356 on return.
10357
423ec54c
JK
103582010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10359
10360 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10361
12ac6819
PA
103622010-09-06 Pedro Alves <pedro@codesourcery.com>
10363
10364 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10365 "$(IPA_DEPFILES)".
10366
8ed54b31
JB
103672010-09-01 Joel Brobecker <brobecker@adacore.com>
10368
10369 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10370 gdbserver/lynx-ppc-low.c: New files.
10371 * Makefile.in (lynx_low_h): New variable.
10372 (lynx-low.o, lynx-ppc-low.o): New rules.
10373 * configure.ac: On LynxOS, link with -lnetinet.
10374 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10375 * configure: regenerate.
10376
bb0116a4
JB
103772010-09-01 Joel Brobecker <brobecker@adacore.com>
10378
10379 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10380 * configure.ac: Add check for vasprintf and vsnprintf.
10381 * configure, config.in: Regenerate.
10382 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10383
a778ab81 103842010-09-01 Joel Brobecker <brobecker@adacore.com>
10385
10386 * gdbreplay.c: Move include of alloca.h up, next to include of
10387 malloc.h.
10388 * server.h: Add include of malloc.h.
10389 * mem-break.c: Remove include of malloc.h.
10390 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10391
8b034a19 103922010-09-01 Joel Brobecker <brobecker@adacore.com>
10393
10394 * Makefile.in (memmem.o): Build with -Wno-error.
10395
103962010-09-01 Joel Brobecker <brobecker@adacore.com>
10397
10398 * utils.c (xsnprintf): Make non-static.
10399 * server.h: Add xsnprintf declaration.
10400 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10401 replace calls to snprintf by calls to xsnprintf throughout.
10402
104032010-09-01 Joel Brobecker <brobecker@adacore.com>
10404
10405 * configure.ac: Add configure check for alloca.
10406 * configure, config.in: Regenerate.
10407 * server.h: Include alloca.h if it exists.
10408 * gdbreplay.c: Include alloca.h if it exists.
10409
1a981360
PA
104102010-08-28 Pedro Alves <pedro@codesourcery.com>
10411
10412 * linux-low.c (__SIGRTMIN): Define if not already defined.
10413 (linux_create_inferior): Check for __ANDROID__ rather than
10414 __SIGRTMIN.
10415 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10416 are already deferred.
10417 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10418 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10419 stopped and already has a pending signal to report.
10420 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10421 a pending signal to report or is moving out of a jump pad.
10422 (linux_init_signals): Check for __ANDROID__ rather than
10423 __SIGRTMIN.
10424
b4d51a55
PA
104252010-08-28 Pedro Alves <pedro@codesourcery.com>
10426
10427 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10428 debug_threads check. Avoid a linear search when not doing debug
10429 output.
10430
ec48365d
PA
104312010-08-27 Pedro Alves <pedro@codesourcery.com>
10432
10433 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10434 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10435 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10436 (process_event): Change local fd's type to gdb_fildes_t.
10437 (create_file_handler): Adjust prototype.
10438 (delete_file_handler): Adjust prototype.
10439 (handle_file_event): Adjust prototype. Use pfildes.
10440 (create_file_event): Adjsut prototype.
10441 * remote-utils.c (remote_desc, listen_desc): Change type to
10442 gdb_fildes_t.
10443 * server.h: New gdb_fildes_t typedef.
10444 [USE_WIN32API]: Include winsock2.h.
10445 (delete_file_handler, add_file_handler): Adjust prototypes.
10446 (pfildes): Declare.
10447 * utils.c (pfildes): New.
10448
854d88f0
PA
104492010-08-27 Pedro Alves <pedro@codesourcery.com>
10450
10451 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10452 * configure: Regenerate.
10453
0146f85b
PA
104542010-08-27 Pedro Alves <pedro@codesourcery.com>
10455
10456 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10457 (linux_done_accessing_memory): ... this.
10458 (linux_target_ops): Adjust.
10459 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10460 * nto-low.c (nto_target_ops): Adjust comment.
10461 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10462 * spu-low.c (spu_target_ops): Adjust comment.
10463 * target.h (target_ops): Rename unprepare_to_access_memory field
10464 to done_accessing_memory.
10465 (unprepare_to_access_memory): Rename to ...
10466 (done_accessing_memory): ... this.
10467
90d74c30
PA
104682010-08-26 Pedro Alves <pedro@codesourcery.com>
10469
10470 * linux-low.c (linux_prepare_to_access_memory): New.
10471 (linux_unprepare_to_access_memory): New.
10472 (linux_target_ops): Install them.
10473 * server.c (read_memory): Rename to ...
10474 (gdb_read_memory): ... this. Use
10475 prepare_to_access_memory/prepare_to_access_memory.
10476 (write_memory): Rename to ...
10477 (gdb_write_memory): ... this. Use
10478 prepare_to_access_memory/prepare_to_access_memory.
10479 (handle_search_memory_1): Adjust.
10480 (process_serial_event): Adjust.
10481 * target.h (struct target_ops): New fields
10482 prepare_to_access_memory and unprepare_to_access_memory.
10483 (prepare_to_access_memory, unprepare_to_access_memory): New.
10484 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10485 prepare_to_access_memory/prepare_to_access_memory.
10486 * nto-low.c (nto_target_ops): Adjust.
10487 * spu-low.c (spu_target_ops): Adjust.
10488 * win32-low.c (win32_target_ops): Adjust.
10489
fd467969
PA
104902010-08-26 Pedro Alves <pedro@codesourcery.com>
10491
10492 * Makefile.in (WARN_CFLAGS): Get it from configure.
10493 (WERROR_CFLAGS): New.
10494 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10495 * configure.ac: Introduce --enable-werror, which adds -Werror to
10496 the compiler command line. Enabled by default. Disable with
10497 --disable-werror. Add -Wdeclaration-after-statement
10498 Wpointer-arith and -Wformat-nonliteral to warning flags.
10499 * configure: Regenerate.
10500
331e2f5f
PA
105012010-08-26 Pedro Alves <pedro@codesourcery.com>
10502
10503 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10504
e581f2b4
PA
105052010-08-26 Pedro Alves <pedro@codesourcery.com>
10506
10507 * gdbreplay.c (remote_error): New.
10508 (gdbchar): New.
10509 (expect): Use gdbchar. Check for error reading from GDB.
10510 Clarify sync error output.
10511 (play): Check for errors writing to GDB.
10512 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10513 * remote-utils.c (getpkt): Check for errors writing to the remote
10514 descriptor.
10515
3c11dd79
PA
105162010-08-25 Pedro Alves <pedro@codesourcery.com>
10517
10518 * linux-low.c (linux_wait_1): Move non-debugging code out of
10519 `debug_threads' control.
10520
d20a8ad9
PA
105212010-08-25 Pedro Alves <pedro@codesourcery.com>
10522
10523 * linux-low.c (linux_wait_1): Don't set last_status here.
10524 * server.c (push_event, queue_stop_reply_callback): Assert we're
10525 not pushing a TARGET_WAITKIND_IGNORE event.
10526 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10527 (myresume, handle_target_event): Set the thread's last_resume_kind
10528 and last_status from the target returned status.
10529
964e4306
PA
105302010-08-25 Pedro Alves <pedro@codesourcery.com>
10531
10532 PR threads/10729
10533
10534 * linux-x86-low.c (update_debug_registers_callback): New.
10535 (i386_dr_low_set_addr): Use it.
10536 (i386_dr_low_get_addr): New.
10537 (i386_dr_low_set_control): Use update_debug_registers_callback.
10538 (i386_dr_low_get_control): New.
10539 (i386_dr_low_get_status): Adjust.
10540 * linux-low.c (linux_stop_lwp): New.
10541 * linux-low.h (linux_stop_lwp): Declare.
10542
10543 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10544 argument instead of a i386_debug_reg_state.
10545 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10546 a i386_debug_reg_state.
10547 (i386_insert_aligned_watchpoint): Adjust.
10548 (i386_remove_aligned_watchpoint): Adjust.
10549 (i386_low_stopped_data_address): Read the debug registers from the
10550 inferior instead of from the mirrors.
10551 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10552 (i386_dr_low_get_addr): Declare.
10553 (i386_dr_low_get_control): Declare.
10554 (i386_dr_low_get_status): Change prototype.
10555
10556 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10557 (i386_dr_low_get_addr): New.
10558 (i386_dr_low_get_control): New.
10559 (i386_dr_low_get_status): Adjust prototype. Return
10560 dr_status_mirror.
10561 (i386_initial_stuff): Clear dr_status_mirror and
10562 dr_control_mirror.
10563 (i386_get_thread_context): Adjust.
10564 (i386_set_thread_context): Adjust.
10565 (i386_thread_added): Adjust.
10566
5f21a75b
PA
105672010-08-24 Pedro Alves <pedro@codesourcery.com>
10568
10569 * linux-low.h (linux_thread_area): Delete declaration.
10570
3e4c1235
TS
105712010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10572
10573 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10574 after its termination.
10575
1971b033
PA
105762010-08-09 Pedro Alves <pedro@codesourcery.com>
10577
10578 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10579 (gdb_wants_all_stopped): Delete.
10580 (linux_wait_1): Don't call them.
10581 * server.c (handle_v_cont): Tag all threads as want-stopped.
10582 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10583 stopped as "client-wants-stopped".
10584
310444ac
PA
105852010-07-31 Pedro Alves <pedro@codesourcery.com>
10586
10587 * Makefile.in (signals_h): New.
10588 (server_h): Depend on it.
10589 (server.o): Don't depend on $(signals_def).
10590 (signals.o): Depend on $(signals_def).
10591
a19cae16
JK
105922010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10593
10594 * Makefile.in (signals_def): New.
10595 (server_h): Append include/gdb/signals.h and signals_def.
10596 (server.o): Append signals_def.
10597
30d50328
JK
105982010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10599
10600 * server.c (handle_target_event): Use target_signal_to_host for
10601 resume_info.sig initialization.
10602 * target.h (struct thread_resume) <sig>: New comment.
10603
5c3216e2
OS
106042010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10605
c6f46ca0
OS
10606 * server.c (handle_query): strcpy() the returned string from paddress()
10607 instead of sprintf().
5c3216e2
OS
10608 * utils.c (paddress): Return phex_nz().
10609
6bd31874
JB
106102010-07-07 Joel Brobecker <brobecker@adacore.com>
10611
10612 * server.c (handle_v_cont): Call mourn_inferior if process
10613 just exited.
10614 (myresume): Likewise.
10615
0fb4aa4b
PA
106162010-07-01 Pedro Alves <pedro@codesourcery.com>
10617
10618 Static tracepoints, and integration with UST.
10619
10620 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10621 * mem-break.c (uninsert_all_breakpoints)
10622 (reinsert_all_breakpoints): New.
10623 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10624 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10625 (gdb_agent_ust_loaded, helper_thread_id)
10626 (gdb_agent_helper_thread_id): New macros.
10627 (struct ipa_sym_addresses): Add addr_ust_loaded,
10628 addr_helper_thread_id, addr_cmd_buf.
10629 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10630 (in_process_agent_loaded_ust): New.
10631 (write_e_ust_not_loaded): New.
10632 (maybe_write_ipa_ust_not_loaded): New.
10633 (struct collect_static_trace_data_action): New.
10634 (enum tracepoint_type) <static_tracepoint>: New.
10635 (struct tracepoint) <handle>: Mention static tracepoints.
10636 (struct static_tracepoint_ctx): New.
10637 (CMD_BUF_SIZE): New.
10638 (add_tracepoint_action): Handle static tracepoint actions.
10639 (unprobe_marker_at): New.
10640 (clear_installed_tracepoints): Handle static tracepoints.
10641 (cmd_qtdp): Handle static tracepoints.
10642 (probe_marker_at): New.
10643 (cmd_qtstart): Handle static tracepoints.
10644 (response_tracepoint): Handle static tracepoints.
10645 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10646 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10647 (get_context_regcache): Handle static tracepoints.
10648 (do_action_at_tracepoint): Handle static tracepoint actions.
10649 (traceframe_find_block_type): Handle static trace data blocks.
10650 (traceframe_read_sdata): New.
10651 (download_tracepoints): Download static tracepoint actions.
10652 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10653 (GDB_PROBE_NAME): New.
10654 (ust_ops): New.
10655 (GET_UST_SYM): New.
10656 (USTF): New.
10657 (dlsym_ust): New.
10658 (ust_marker_to_static_tracepoint): New.
10659 (gdb_probe): New.
10660 (collect_ust_data_at_tracepoint): New.
10661 (gdb_ust_probe): New.
10662 (UNIX_PATH_MAX, SOCK_DIR): New.
10663 (gdb_ust_connect_sync_socket): New.
10664 (resume_thread, stop_thread): New.
10665 (run_inferior_command): New.
10666 (init_named_socket): New.
10667 (gdb_ust_socket_init): New.
10668 (cstr_to_hexstr): New.
10669 (next_st): New.
10670 (first_marker, next_marker): New.
10671 (response_ust_marker): New.
10672 (cmd_qtfstm, cmd_qtsstm): New.
10673 (unprobe_marker_at, probe_marker_at): New.
10674 (cmd_qtstmat, gdb_ust_thread): New.
10675 (gdb_ust_init): New.
10676 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10677 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10678 (ST_REGENTRY): New.
10679 (x86_64_st_collect_regmap): New.
10680 (X86_64_NUM_ST_COLLECT_GREGS): New.
10681 (AMD64_RIP_REGNUM): New.
10682 (supply_static_tracepoint_registers): New.
10683 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10684 (ST_REGENTRY): New.
10685 (i386_st_collect_regmap): New.
10686 (i386_NUM_ST_COLLECT_GREGS): New.
10687 (supply_static_tracepoint_registers): New.
10688 * server.c (handle_query): Handle qXfer:statictrace:read.
10689 <qSupported>: Report support for StaticTracepoints, and
10690 qXfer:statictrace:read features.
10691 * server.h (traceframe_read_sdata)
10692 (supply_static_tracepoint_registers): Declare.
10693 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10694 (unpack_varlen_hex): Include in IPA build.
10695 * Makefile.in (ustlibs, ustinc): New.
10696 (IPA_OBJS): Add remote-utils-ipa.o.
10697 ($(IPA_LIB)): Link -ldl and -lpthread.
10698 (UST_CFLAGS): New.
10699 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10700 * config.in, configure: Regenerate.
10701
9e4344e5
PA
107022010-06-20 Ian Lance Taylor <iant@google.com>
10703 Pedro Alves <pedro@codesourcery.com>
10704
10705 * linux-x86-low.c (always_true): Delete.
10706 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10707 trying to fool the compiler with always_true.
10708
c6beb2cb
PA
107092010-06-20 Pedro Alves <pedro@codesourcery.com>
10710
10711 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10712 conditions in gdbserver.
10713
d2ed6730
UW
107142010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10715
10716 * spu-low.c (spu_read_memory): Wrap around local store limit.
10717 (spu_write_memory): Likewise.
10718
4e29fb54
PA
107192010-06-15 Pedro Alves <pedro@codesourcery.com>
10720
10721 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10722 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10723 LONGEST uses.
10724 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10725 uses.
10726 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10727 uses with LONGEST uses.
10728
6a271cae
PA
107292010-06-14 Stan Shebs <stan@codesourcery.com>
10730 Pedro Alves <pedro@codesourcery.com>
10731
10732 Bytecode compiler.
10733
10734 * linux-x86-low.c: Include limits.h.
10735 (add_insns): New.
10736 (always_true): New.
10737 (EMIT_ASM): New.
10738 (EMIT_ASM32): New.
10739 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10740 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10741 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10742 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10743 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10744 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10745 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10746 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10747 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10748 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10749 (amd64_emit_void_call_2): New.
10750 (amd64_emit_ops): New.
10751 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10752 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10753 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10754 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10755 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10756 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10757 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10758 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10759 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10760 (i386_emit_stack_adjust, i386_emit_int_call_1)
10761 (i386_emit_void_call_2): New.
10762 (i386_emit_ops): New.
10763 (x86_emit_ops): New.
10764 (the_low_target): Install x86_emit_ops.
10765 * server.h (struct emit_ops): New.
10766 (get_raw_reg_func_addr): Declare.
10767 (current_insn_ptr, emit_error): Declare.
10768 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10769 (set_trace_state_variable_value): New defines.
10770 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10771 addr_get_trace_state_variable_value and
10772 addr_set_trace_state_variable_value.
10773 (symbol_list): New fields for get_raw_reg,
10774 get_trace_state_variable_value and set_trace_state_variable_value.
10775 (condfn): New typedef.
10776 (struct tracepoint): New field `compiled_cond'.
10777 (do_action_at_tracepoint): Clear compiled_cond.
10778 (get_trace_state_variable_value, set_trace_state_variable_value):
10779 Export in the IPA.
10780 (condition_true_at_tracepoint): If there's a compiled condition,
10781 run that.
10782 (current_insn_ptr, emit_error): New globals.
10783 (struct bytecode_address): New.
10784 (get_raw_reg_func_addr): New.
10785 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10786 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10787 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10788 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10789 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10790 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10791 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10792 (compile_tracepoint_condition, compile_bytecodes): New.
10793 * target.h (emit_ops): Forward declare.
10794 (struct target_ops): New field emit_ops.
10795 (target_emit_ops): New.
10796 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10797 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10798 * linux-low.c (linux_emit_ops): New.
10799 (linux_target_ops): Install it.
10800 * linux-low.h (struct linux_target_ops): New field emit_ops.
10801
92b72907
UW
108022010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10803
10804 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10805 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10806
fa593d66
PA
108072010-06-01 Pedro Alves <pedro@codesourcery.com>
10808 Stan Shebs <stan@codesourcery.com>
10809
10810 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10811 (all): Depend on $(extra_libraries).
10812 (install-only): Install the IPA.
10813 (IPA_OBJS, IPA_LIB): New.
10814 (clean): Remove the IPA lib.
10815 (IPAGENT_CFLAGS): New.
10816 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10817 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10818 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10819 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10820 * configure.ac: Check for atomic builtins support in the compiler.
10821 (IPA_DEPFILES, extra_libraries): Define.
10822 * configure.srv (ipa_obj): Add description.
10823 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10824 (i[34567]86-*-linux*): Set ipa_obj.
10825 (x86_64-*-linux*): Set ipa_obj.
10826 * linux-low.c (stabilizing_threads): New.
10827 (supports_fast_tracepoints): New.
10828 (linux_detach): Stabilize threads before detaching.
10829 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10830 the lwp is either not stabilizing, or is moving out of a jump pad.
10831 (linux_fast_tracepoint_collecting): New.
10832 (maybe_move_out_of_jump_pad): New.
10833 (enqueue_one_deferred_signal): New.
10834 (dequeue_one_deferred_signal): New.
10835 (linux_wait_for_event_1): If moving out of a jump pad, defer
10836 pending signals to later.
10837 (linux_stabilize_threads): New.
10838 (linux_wait_1): Check if threads need moving out of jump pads, and
10839 do it if so.
10840 (stuck_in_jump_pad_callback): New.
10841 (move_out_of_jump_pad_callback): New.
10842 (lwp_running): New.
10843 (linux_resume_one_lwp): Handle moving out of jump pads.
10844 (linux_set_resume_request): Dequeue deferred signals.
10845 (need_step_over_p): Also step over fast tracepoint jumps.
10846 (start_step_over): Also uninsert fast tracepoint jumps.
10847 (finish_step_over): Also reinsert fast tracepoint jumps.
10848 (linux_install_fast_tracepoint_jump): New.
10849 (linux_target_ops): Install linux_stabilize_threads and
10850 linux_install_fast_tracepoint_jump_pad.
10851 * linux-low.h (linux_target_ops) <get_thread_area,
10852 install_fast_tracepoint_jump_pad>: New fields.
10853 (struct lwp_info) <collecting_fast_tracepoint,
10854 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10855 (linux_get_thread_area): Declare.
10856 * linux-x86-low.c (jump_insn): New.
10857 (x86_get_thread_area): New.
10858 (append_insns): New.
10859 (push_opcode): New.
10860 (amd64_install_fast_tracepoint_jump_pad): New.
10861 (i386_install_fast_tracepoint_jump_pad): New.
10862 (x86_install_fast_tracepoint_jump_pad): New.
10863 (the_low_target): Install x86_get_thread_area and
10864 x86_install_fast_tracepoint_jump_pad.
10865 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10866 (struct fast_tracepoint_jump): New.
10867 (fast_tracepoint_jump_insn): New.
10868 (fast_tracepoint_jump_shadow): New.
10869 (find_fast_tracepoint_jump_at): New.
10870 (fast_tracepoint_jump_here): New.
10871 (delete_fast_tracepoint_jump): New.
10872 (set_fast_tracepoint_jump): New.
10873 (uninsert_fast_tracepoint_jumps_at): New.
10874 (reinsert_fast_tracepoint_jumps_at): New.
10875 (set_breakpoint_at): Use write_inferior_memory.
10876 (uninsert_raw_breakpoint): Use write_inferior_memory.
10877 (check_mem_read): Mask out fast tracepoint jumps.
10878 (check_mem_write): Mask out fast tracepoint jumps.
10879 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10880 (set_fast_tracepoint_jump): Declare.
10881 (delete_fast_tracepoint_jump)
10882 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10883 (reinsert_fast_tracepoint_jumps_at): Declare.
10884 * regcache.c: Don't compile many functions when building the
10885 in-process agent library.
10886 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10887 the register buffer in the heap.
10888 (free_register_cache): If the register buffer isn't owned by the
10889 regcache, don't free it.
10890 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10891 pre-existing register caches.
10892 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10893 type.
10894 (convert_ascii_to_int): : Constify `from' parameter type.
10895 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10896 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10897 the needed buffer in-place.
10898 (relocate_instruction): New.
10899 * server.c (handle_query) <qSymbols>: If the target supports
10900 tracepoints, give it a chance of looking up symbols. Report
10901 support for fast tracepoints.
10902 (handle_status): Stabilize threads.
10903 (process_serial_event): Adjust.
10904 * server.h (struct fast_tracepoint_jump): Forward declare.
10905 (struct process_info) <fast_tracepoint_jumps>: New field.
10906 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10907 (decode_X_packet, decode_M_packet): Adjust.
10908 (relocate_instruction): Declare.
10909 (in_process_agent_loaded): Declare.
10910 (tracepoint_look_up_symbols): Declare.
10911 (struct fast_tpoint_collect_status): Declare.
10912 (fast_tracepoint_collecting): Declare.
10913 (force_unlock_trace_buffer): Declare.
10914 (handle_tracepoint_bkpts): Declare.
10915 (initialize_low_tracepoint)
10916 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10917 * target.h (struct target_ops) <stabilize_threads,
10918 install_fast_tracepoint_jump_pad>: New fields.
10919 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10920 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10921 [HAVE_STDINT_H]: Include stdint.h.
10922 (trace_debug_1): Rename to ...
10923 (trace_vdebug): ... this.
10924 (trace_debug): Rename to ...
10925 (trace_debug_1): ... this. Add `level' parameter.
10926 (trace_debug): New.
10927 (ATTR_USED, ATTR_NOINLINE): New.
10928 (IP_AGENT_EXPORT): New.
10929 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10930 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10931 (about_to_request_buffer_space, trace_buffer_is_full)
10932 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10933 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10934 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10935 (traceframe_write_count, traceframes_created)
10936 (trace_state_variables)
10937 New renaming defines.
10938 (struct ipa_sym_addresses): New.
10939 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10940 (symbol_list): New.
10941 (ipa_sym_addrs): New.
10942 (all_tracepoint_symbols_looked_up): New.
10943 (in_process_agent_loaded): New.
10944 (write_e_ipa_not_loaded): New.
10945 (maybe_write_ipa_not_loaded): New.
10946 (tracepoint_look_up_symbols): New.
10947 (debug_threads) [IN_PROCESS_AGENT]: New.
10948 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10949 (UNKNOWN_SIDE_EFFECTS): New.
10950 (stop_tracing): New.
10951 (flush_trace_buffer): New.
10952 (stop_tracing_bkpt): New.
10953 (flush_trace_buffer_bkpt): New.
10954 (read_inferior_integer): New.
10955 (read_inferior_uinteger): New.
10956 (read_inferior_data_pointer): New.
10957 (write_inferior_data_pointer): New.
10958 (write_inferior_integer): New.
10959 (write_inferior_uinteger): New.
10960 (struct collect_static_trace_data_action): Delete.
10961 (enum tracepoint_type): New.
10962 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
10963 <actions_str, step_actions, step_actions_str>: Only include in
10964 GDBserver.
fa593d66
PA
10965 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10966 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10967 (tracepoints): Use IP_AGENT_EXPORT.
10968 (last_tracepoint): Don't include in the IPA.
10969 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10970 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10971 (alloced_trace_state_variables): New.
10972 (trace_state_variables): Use IP_AGENT_EXPORT.
10973 (traceframe_t): Delete unused variable.
10974 (circular_trace_buffer): Don't include in the IPA.
10975 (trace_buffer_start): Delete.
10976 (struct trace_buffer_control): New.
10977 (trace_buffer_free): Delete.
10978 (struct ipa_trace_buffer_control): New.
10979 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10980 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10981 New.
10982 (trace_buffer_ctrl): New.
10983 (TRACE_BUFFER_CTRL_CURR): New.
10984 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10985 Reimplement as macros.
10986 (trace_buffer_wrap): Delete.
10987 (traceframe_write_count, traceframe_read_count)
10988 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10989 (struct tracepoint_hit_ctx) <type>: New field.
10990 (struct fast_tracepoint_ctx): New.
10991 (memory_barrier): New.
10992 (cmpxchg): New.
10993 (record_tracepoint_error): Update atomically in the IPA.
10994 (clear_inferior_trace_buffer): New.
10995 (about_to_request_buffer_space): New.
10996 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10997 updating the same buffer.
10998 (add_tracepoint): Default the tracepoint's type to trap
10999 tracepoint, and orig_size to -1.
11000 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11001 internal variables.
11002 (create_trace_state_variable): New parameter `gdb'. Handle it.
11003 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11004 (cmd_qtdp): Handle fast tracepoints.
11005 (cmd_qtdv): Adjust.
11006 (max_jump_pad_size): New.
11007 (gdb_jump_pad_head): New.
11008 (get_jump_space_head): New.
11009 (claim_jump_space): New.
11010 (sort_tracepoints): New.
11011 (MAX_JUMP_SIZE): New.
11012 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11013 IPA.
11014 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11015 support. Upload fast traceframes, and delete internal IPA
11016 breakpoints.
11017 (stop_tracing_handler): New.
11018 (flush_trace_buffer_handler): New.
11019 (cmd_qtstop): Upload fast tracepoints.
11020 (response_tracepoint): Handle fast tracepoints.
11021 (tracepoint_finished_step): Upload fast traceframes. Set the
11022 tracepoint hit context's tracepoint type.
11023 (handle_tracepoint_bkpts): New.
11024 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11025 type. Add comment about fast tracepoints.
11026 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11027 non-existing action_str field.
11028 (get_context_regcache): Handle fast tracepoints.
11029 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11030 to the regcache.
11031 (fast_tracepoint_from_jump_pad_address): New.
11032 (fast_tracepoint_from_ipa_tpoint_address): New.
11033 (collecting_t): New.
11034 (force_unlock_trace_buffer): New.
11035 (fast_tracepoint_collecting): New.
11036 (collecting): New.
11037 (gdb_collect): New.
11038 (write_inferior_data_ptr): New.
11039 (target_tp_heap): New.
11040 (target_malloc): New.
11041 (download_agent_expr): New.
11042 (UALIGN): New.
11043 (download_tracepoints): New.
11044 (download_trace_state_variables): New.
11045 (upload_fast_traceframes): New.
11046 (IPA_FIRST_TRACEFRAME): New.
11047 (IPA_NEXT_TRACEFRAME_1): New.
11048 (IPA_NEXT_TRACEFRAME): New.
11049 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11050 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11051 (gdb_jump_pad_buffer_end): New.
11052 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11053 (initialize_tracepoint): Adjust.
11054 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11055 buffer. Initialize the low module.
11056 * utils.c (PREFIX, TOOLNAME): New.
11057 (malloc_failure): Use PREFIX.
11058 (error): In the IPA, an error causes an exit.
11059 (fatal, warning): Use PREFIX.
11060 (internal_error): Use TOOLNAME.
11061 (NUMCELLS): Increase to 10.
11062 * configure, config.in: Regenerate.
11063
d149dd1d
PA
110642010-06-01 Pedro Alves <pedro@codesourcery.com>
11065
11066 * server.c (handle_query) <qSupported>: Do two passes over the
11067 qSupported string to avoid nesting strtok.
11068
f6528abd
JK
110692010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11070
11071 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11072 (CDEPS): New.
11073 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11074 -Wl,--dynamic-list.
11075 * configure: Regenerate.
11076 * proc-service.list: New.
11077
ca2a87a0
JK
110782010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11079
11080 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11081 New comment.
11082
363a6e9f
OS
110832010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11084
11085 * gdbreplay.c (remote_open): Check error return from socket() call by
11086 its equality to -1 not by it being negative.
11087 * remote-utils.c (remote_open): Likewise.
11088
d23b6cb1
PA
110892010-05-23 Pedro Alves <pedro@codesourcery.com>
11090
11091 * config.h: Regenerate.
11092
28d3cf85
MK
110932010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11094
11095 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11096 doesn't provide PTRACE_GET_THREAD_AREA.
11097
fea36a59
MK
110982010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11099
11100 * linux-m68k-low.c: Include <asm/ptrace.h>
11101 (ps_get_thread_area): Implement.
11102
24b066ba
DE
111032010-05-03 Doug Evans <dje@google.com>
11104
11105 * event-loop.c (struct callback_event): New struct.
11106 (callback_list): New global.
11107 (append_callback_event, delete_callback_event): New functions.
11108 (process_callback): New function.
11109 (start_event_loop): Call it.
11110 * remote-utils.c (NOT_SCHEDULED): Define.
11111 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11112 moved out of readchar.
11113 (readchar): Rewrite. Call reschedule before returning.
11114 (reset_readchar): New function.
11115 (remote_close): Call it.
11116 (process_remaining, reschedule): New functions.
11117 * server.h (callback_handler_func): New typedef.
11118 (append_callback_event, delete_callback_event): Declare.
11119
9836d6ea
PA
111202010-05-03 Pedro Alves <pedro@codesourcery.com>
11121
11122 * proc-service.c (ps_pglobal_lookup): Use
11123 thread_db_look_up_one_symbol.
11124 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11125 parameter. Use it instead of all_symbols_looked_up.
11126 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11127 field.
11128 (all_symbols_looked_up): Don't declare.
11129 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11130 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11131 field.
11132 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11133 Set all_symbols_looked_up here.
11134 (thread_db_look_up_one_symbol): New.
11135 (thread_db_get_tls_address): Adjust.
11136 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11137 thread_db object on the heap, and tentatively set it in the
11138 process structure.
11139 (thread_db_init): Don't set all_symbols_looked_up here.
11140 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11141
7984d532
PA
111422010-05-03 Pedro Alves <pedro@codesourcery.com>
11143
11144 * linux-low.c (linux_kill, linux_detach): Adjust.
11145 (status_pending_p_callback): Remove redundant statement. Check
11146 for !TARGET_WAITIKIND_IGNORE, instead of
11147 TARGET_WAITKIND_STOPPED.
11148 (handle_tracepoints): Make sure LWP is locked. Adjust.
11149 (linux_wait_for_event_1): Adjust.
11150 (linux_cancel_breakpoints): New.
11151 (unsuspend_one_lwp): New.
11152 (unsuspend_all_lwps): New.
11153 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11154 (send_sigstop_callback): Change return type to int, add new
11155 `except' parameter and handle it.
11156 (suspend_and_send_sigstop_callback): New.
11157 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11158 pass them down. If SUSPEND, also increment the lwp's suspend
11159 count.
11160 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11161 (need_step_over_p): Don't consider suspended LWPs.
11162 (start_step_over): Adjust.
11163 (proceed_one_lwp): Change return type to int, add new `except'
11164 parameter and handle it.
11165 (unsuspend_and_proceed_one_lwp): New.
11166 (proceed_all_lwps): Use find_inferior instead of
11167 for_each_inferior.
11168 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11169 also decrement the suspend count of LWPs. Pass `except' down,
11170 instead of hacking its suspend count.
11171 (linux_pause_all): Add `freeze' parameter. Adjust.
11172 (linux_unpause_all): New.
11173 (linux_target_ops): Install linux_unpause_all.
11174 * server.c (handle_status): Adjust.
11175 * target.h (struct target_ops): New fields `unpause_all' and
11176 `cancel_breakpoints'. Add new parameter to `pause_all'.
11177 (pause_all): Add new `freeze' parameter.
11178 (unpause_all): New.
11179 (cancel_breakpoints): New.
11180 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11181 cancel breakpoints.
11182 (cmd_qtstart): Pause threads.
11183 (stop_tracing): Pause threads, and cancel breakpoints.
11184 * win32-low.c (win32_target_ops): Adjust.
11185
e471f25b
PA
111862010-05-03 Pedro Alves <pedro@codesourcery.com>
11187
11188 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11189 the inferior right away from here...
11190 (linux_wait_1): ... to here, and adjust to check the thread's
11191 last_resume_kind instead of the lwp's step or stop_expected flags.
11192
1915ef4f
PA
111932010-05-02 Pedro Alves <pedro@codesourcery.com>
11194
11195 * README: Use consistent `GDB' and `GDBserver' spellings.
11196
f9e39928
PA
111972010-05-02 Pedro Alves <pedro@codesourcery.com>
11198
11199 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11200 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11201 (linux_detach_one_lwp): Assume the lwp is stopped.
11202 (any_thread_of): Delete.
11203 (linux_detach): Stop all lwps here. Don't blindly delete all
11204 breakpoints.
11205 (delete_lwp_callback): New.
11206 (linux_mourn): Delete all lwps of the process that is gone.
11207 (linux_wait_1): Don't delete the last lwp of the process here.
11208 * mem-break.h (mark_breakpoints_out): Declare.
11209 * mem-break.c (mark_breakpoints_out): New.
11210 (free_all_breakpoints): Use it.
11211 * server.c (handle_target_event): If the process is gone, mark
11212 breakpoints out.
11213 * thread-db.c (struct thread_db) <create_bp>: New field.
11214 (thread_db_enable_reporting): Fix prototype. Store a thread event
11215 breakpoint reference in the thread_db struct.
11216 (thread_db_load_search): Clear the thread_db object.
11217 (try_thread_db_load_1): Ditto.
11218 (switch_to_process): New.
11219 (disable_thread_event_reporting): Use it.
11220 (remove_thread_event_breakpoints): New.
11221 (thread_db_detach, thread_db_mourn): Use it.
11222
1e7fc18c
PA
112232010-05-01 Pedro Alves <pedro@codesourcery.com>
11224
11225 * linux-low.c (linux_enable_event_reporting): New.
11226 (linux_wait_for_event_1, handle_extended_wait): Use it.
11227
02fc4de7
PA
112282010-04-30 Pedro Alves <pedro@codesourcery.com>
11229
11230 * linux-low.c (linux_kill_one_lwp, linux_kill)
11231 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11232 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11233 SIGSTOP even if the LWP is stopped.
11234 (send_sigstop_callback): New.
11235 (stop_all_lwps): Use send_sigstop_callback instead.
11236 (linux_resume_one_thread): Adjust.
11237 (proceed_one_lwp): Still proceed an LWP that the client has
11238 requested to stop, if we haven't reported it as stopped yet. Make
11239 sure that LWPs the client want stopped, have a pending SIGSTOP.
11240
bc3b5632
DE
112412010-04-26 Doug Evans <dje@google.com>
11242
ae1ada35
DE
11243 * server.c (handle_general_set): Make static.
11244
bc3b5632
DE
11245 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11246 Print received char after testing for error/eof instead of before.
11247 (input_interrupt): Tweak comment.
11248
65730243
DE
112492010-04-23 Doug Evans <dje@google.com>
11250
11251 * server.c (start_inferior): Print inferior argv if --debug.
11252
a8ae7dc0
AR
112532010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11254
11255 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11256 * nto-x86-low.c: Include server.h
11257
1c07cc19
PM
112582010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11259
11260 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11261 be consistent with other sources of this directory.
11262 (init_registers_amd64): Correct name of source file of this function
11263 in the comment.
11264
e0a61e09
PM
112652010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11266
11267 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11268 64-bit executables.
11269
54709339
PM
112702010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11271
11272 * win32-i386-low.c: Add 64-bit support.
11273 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11274 (init_registers_amd64): Declare.
11275 (mappings): Add 64-bit version of array.
11276 (init_windows_x86): New function.
11277 (the_low_target): Change init_arch field to init_windows_x86.
11278
e8f0053d
PM
112792010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11280
11281 * win32-low.c: Adapt to support also 64-bit architecture.
11282 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11283 (get_image_name): Use SIZE_T type for local variable `done'.
11284 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11285 (toolhelp_get_dll_name): Idem.
11286 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11287 Use uintptr_t typecast to avoid warning.
11288 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11289 (handle_exception): Use phex_nz to avoid warning.
11290 (win32_wait): Remove unused local variable `process'.
11291
c481e77e
PM
112922010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11293
11294 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11295 `amd64-avx.o'.
11296
12ea4b69
PM
112972010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11298
11299 * configure.ac: Use `ws2_32' library for srv_mingw.
11300 * configure: Regenerate.
11301 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11302 * remote-utils.c: Likewise.
11303
f6d1620c
L
113042010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11305
11306 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11307 if __x86_64__ is defined.
11308
8e642873
PM
113092010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11310
11311 * configure: Regenerate.
11312
711e434b
PM
113132010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11314
11315 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11316 * target.h (target_ops): New get_tib_address field.
11317 * win32-low.h (win32_thread_info): Add thread_local_base field.
11318 * win32-low.c (child_add_thread): Add tlb argument.
11319 Set thread_local_base field to TLB.
11320 (get_child_debug_event): Adapt to child_add_thread change.
11321 (win32_get_tib_address): New function.
11322 (win32_target_ops): Set get_tib_address field to
11323 win32_get_tib_address.
11324 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11325
505106cd
PA
113262010-04-12 Pedro Alves <pedro@codesourcery.com>
11327
505106cd
PA
11328 * linux-low.c (linux_mourn): Also remove the process.
11329 * server.c (handle_target_event): Don't remove the process here.
11330 * nto-low.c (nto_mourn): New.
11331 (nto_target_ops): Install it.
11332 * spu-low.c (spu_mourn): New.
11333 (spu_target_ops): Install it.
11334 * win32-low.c (win32_mourn): New.
11335 (win32_target_ops): Install it.
11336
e8470a06
PA
113372010-04-12 Pedro Alves <pedro@codesourcery.com>
11338
11339 * server.h (buffer_xml_printf): Remove redundant `;'.
11340
45ba0d02
PA
113412010-04-12 Pedro Alves <pedro@codesourcery.com>
11342
11343 * regcache.c (set_register_cache): Invalidate regcaches before
11344 changing the register cache layout.
11345 (regcache_invalidate_one): Allow a NULL regcache.
11346 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11347 regcaches before changing the register cache layout or the target
11348 regsets.
11349
59e04013
L
113502010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11351
11352 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11353 variable warning on Linux/x86-64.
11354
8336d594
PA
113552010-04-11 Pedro Alves <pedro@codesourcery.com>
11356
11357 GDBserver disconnected tracing support.
11358
11359 * linux-low.c (linux_remove_process): Delete.
11360 (add_lwp): Don't set last_resume_kind here.
11361 (linux_kill): Use `mourn'.
11362 (linux_detach): Use `thread_db_detach', and `mourn'.
11363 (linux_mourn): New.
11364 (linux_attach_lwp_1): Adjust comment.
11365 (linux_attach): last_resume_kind moved the thread_info; adjust.
11366 (status_pending_p_callback): Adjust.
11367 (linux_wait_for_event_1): Adjust.
11368 (count_events_callback, select_singlestep_lwp_callback)
11369 (select_event_lwp_callback, cancel_breakpoints_callback)
11370 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11371 (proceed_one_lwp): Adjust.
11372 (linux_async): Add debug output.
11373 (linux_thread_stopped): New.
11374 (linux_pause_all): New.
11375 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11376 linux_pause_all.
11377 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11378 (thread_db_free): Delete declaration.
11379 (thread_db_detach, thread_db_mourn): Declare.
11380 * thread-db.c (thread_db_init): Use thread_db_mourn.
11381 (thread_db_free): Delete, split in two.
11382 (disable_thread_event_reporting): New.
11383 (thread_db_detach): New.
11384 (thread_db_mourn): New.
11385
11386 * server.h (struct thread_info) <last_resume_kind>: New field.
11387 <attached>: Add comment.
11388 <gdb_detached>: New field.
11389 (handler_func): Change return type to int.
11390 (handle_serial_event, handle_target_event): Ditto.
11391 (gdb_connected): Declare.
11392 (tracing): Delete.
11393 (disconnected_tracing): Declare.
11394 (stop_tracing): Declare.
11395
11396 * server.c (handle_query) <qSupported>: Report support for
11397 disconnected tracing.
11398 (queue_stop_reply_callback): Account for running threads.
11399 (gdb_wants_thread_stopped): New.
11400 (gdb_wants_all_threads_stopped): New.
11401 (gdb_reattached_process): New.
11402 (handle_status): Clear the `gdb_detached' flag of all processes.
11403 In all-stop, stop all threads.
11404 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11405 (process_serial_event): If the remote connection breaks, or if an
11406 exit was forced with "monitor exit", force an event loop exit.
11407 Handle disconnected tracing on detach.
11408 (handle_serial_event): Adjust.
11409 (handle_target_event): If GDB isn't connected, forward events back
11410 to the inferior, unless the last process exited, in which case,
11411 exit gdbserver. Adjust interface.
11412
11413 * remote-utils.c (remote_open): Don't block in accept. Instead
11414 register an event loop source on the listen socket file
11415 descriptor. Refactor bits into ...
11416 (listen_desc): ... this new global.
11417 (gdb_connected): ... this new function.
11418 (enable_async_notification): ... this new function.
11419 (handle_accept_event): ... this new function.
11420 (remote_close): Clear remote_desc.
11421
11422 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11423
11424 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11425 New fields.
11426 (mourn_inferior): Define.
11427 (target_process_qsupported): Avoid the dangling else problem.
11428 (thread_stopped): Define.
11429 (pause_all): Define.
11430 (target_waitstatus_to_string): Declare.
11431 * target.c (target_waitstatus_to_string): New.
11432
11433 * tracepoint.c (tracing): Make extern.
11434 (disconnected_tracing): New.
11435 (stop_tracing): Make extern. Handle tracing stops due to GDB
11436 disconnecting.
11437 (cmd_qtdisconnected): New.
11438 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11439 (handle_tracepoint_general_set): Handle QTDisconnected.
11440
11441 * event-loop.c (event_handler_func): Change return type to int.
11442 (process_event): Bail out if the event handler wants the event
11443 loop to stop.
11444 (handle_file_event): Ditto.
11445 (start_event_loop): Bail out if the event handler wants the event
11446 loop to stop.
11447
11448 * nto-low.c (nto_target_ops): Adjust.
11449 * spu-low.c (spu_wait): Don't remove the process here.
11450 (spu_target_ops): Adjust.
11451 * win32-low.c (win32_wait): Don't remove the process here.
11452 (win32_target_ops): Adjust.
11453
5d267c4c
PA
114542010-04-11 Pedro Alves <pedro@codesourcery.com>
11455
11456 * regcache.c (realloc_register_cache): Invalidate inferior's
11457 regcache before recreating it.
11458
623ccd72
PA
114592010-04-09 Pedro Alves <pedro@codesourcery.com>
11460
11461 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11462
219f2f23
PA
114632010-04-09 Stan Shebs <stan@codesourcery.com>
11464 Pedro Alves <pedro@codesourcery.com>
11465
11466 * server.h (LONGEST): New.
11467 (struct thread_info) <while_stepping>: New field.
11468 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11469 Declare.
11470 (initialize_tracepoint, handle_tracepoint_general_set)
11471 (handle_tracepoint_query, tracepoint_finished_step)
11472 (tracepoint_was_hit, release_while_stepping_state_list):
11473 (current_traceframe): Declare.
11474 * server.c (handle_general_set): Handle tracepoint packets.
11475 (read_memory): New.
11476 (write_memory): New.
11477 (handle_search_memory_1): Use read_memory.
11478 (handle_query): Report support for conditional tracepoints, trace
11479 state variables, and tracepoint sources. Handle tracepoint
11480 queries.
11481 (main): Initialize the tracepoints module.
11482 (process_serial_event): Handle traceframe reads/writes.
11483
11484 * linux-low.c (handle_tracepoints): New.
11485 (linux_wait_1): Call it.
11486 (linux_resume_one_lwp): Handle while-stepping.
11487 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11488 (linux_target_ops): Install them.
11489 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11490 New field.
11491 * linux-x86-low.c (x86_supports_tracepoints): New.
11492 (the_low_target). Install it.
11493
11494 * mem-break.h (delete_breakpoint): Declare.
11495 * mem-break.c (delete_breakpoint): Make external.
11496
11497 * target.h (struct target_ops): Add `supports_tracepoints',
11498 `read_pc', and `write_pc' fields.
11499 (target_supports_tracepoints): Define.
11500 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11501 (phex_nz): New.
11502
11503 * regcache.h (struct regcache) <registers_owned>: New field.
11504 (init_register_cache, regcache_cpy): Declare.
11505 (regcache_read_pc, regcache_write_pc): Declare.
11506 (register_cache_size): Declare.
11507 (supply_regblock): Declare.
11508 * regcache.c (init_register_cache): New.
11509 (new_register_cache): Use it.
11510 (regcache_cpy): New.
11511 (register_cache_size): New.
11512 (supply_regblock): New.
11513 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 11514
219f2f23
PA
11515 * tracepoint.c: New.
11516
11517 * Makefile.in (OBS): Add tracepoint.o.
11518 (tracepoint.o): New rule.
11519
3a13a53b
L
115202010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11521
11522 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11523 (i386-mmx.o): New.
11524 (i386-mmx.c): Likewise.
11525 (i386-mmx-linux.o): Likewise.
11526 (i386-mmx-linux.c): Likewise.
11527
11528 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11529 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11530 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11531 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11532
11533 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11534 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11535 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11536
1570b33e
L
115372010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11538
11539 * Makefile.in (clean): Updated.
11540 (i386-avx.o): New.
11541 (i386-avx.c): Likewise.
11542 (i386-avx-linux.o): Likewise.
11543 (i386-avx-linux.c): Likewise.
11544 (amd64-avx.o): Likewise.
11545 (amd64-avx.c): Likewise.
11546 (amd64-avx-linux.o): Likewise.
11547 (amd64-avx-linux.c): Likewise.
11548
11549 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11550 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11551 (srv_amd64_regobj): Add amd64-avx.o.
11552 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11553 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11554 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11555 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11556 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11557 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11558 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11559
11560 * i387-fp.c: Include "i386-xstate.h".
11561 (i387_xsave): New.
11562 (i387_cache_to_xsave): Likewise.
11563 (i387_xsave_to_cache): Likewise.
11564 (x86_xcr0): Likewise.
11565
11566 * i387-fp.h (i387_cache_to_xsave): Likewise.
11567 (i387_xsave_to_cache): Likewise.
11568 (x86_xcr0): Likewise.
11569
11570 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11571 * linux-crisv32-low.c (target_regsets): Likewise.
11572 * linux-m68k-low.c (target_regsets): Likewise.
11573 * linux-mips-low.c (target_regsets): Likewise.
11574 * linux-ppc-low.c (target_regsets): Likewise.
11575 * linux-s390-low.c (target_regsets): Likewise.
11576 * linux-sh-low.c (target_regsets): Likewise.
11577 * linux-sparc-low.c (target_regsets): Likewise.
11578 * linux-xtensa-low.c (target_regsets): Likewise.
11579
11580 * linux-low.c: Include <sys/uio.h>.
11581 (regsets_fetch_inferior_registers): Support nt_type.
11582 (regsets_store_inferior_registers): Likewise.
11583 (linux_process_qsupported): New.
11584 (linux_target_ops): Add linux_process_qsupported.
11585
11586 * linux-low.h (regset_info): Add nt_type.
11587 (linux_target_ops): Add process_qsupported.
11588
11589 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11590 and <sys/uio.h>.
11591 (init_registers_i386_avx_linux): New.
11592 (init_registers_amd64_avx_linux): Likewise.
11593 (xmltarget_i386_linux_no_xml): Likewise.
11594 (xmltarget_amd64_linux_no_xml): Likewise.
11595 (PTRACE_GETREGSET): Likewise.
11596 (PTRACE_SETREGSET): Likewise.
11597 (x86_fill_xstateregset): Likewise.
11598 (x86_store_xstateregset): Likewise.
11599 (use_xml): Likewise.
11600 (x86_linux_update_xmltarget): Likewise.
11601 (x86_linux_process_qsupported): Likewise.
11602 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11603 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11604 init_registers_i386_linux here. Call
11605 x86_linux_update_xmltarget.
11606 (the_low_target): Add x86_linux_process_qsupported.
11607
11608 * server.c (handle_query): Call target_process_qsupported.
11609
11610 * target.h (target_ops): Add process_qsupported.
11611 (target_process_qsupported): New.
11612
fc7238bb
PA
116132010-04-03 Pedro Alves <pedro@codesourcery.com>
11614
11615 * inferiors.c (add_thread): Set last_status kind to
11616 TARGET_WAITKIND_IGNORE.
11617 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11618 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11619 (linux_wait_1): Move `thread' local definition to block that uses
11620 it. Don't NULL initialize `event_child'.
11621 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11622 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11623 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11624
bdabb078
PA
116252010-04-01 Pedro Alves <pedro@codesourcery.com>
11626
11627 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11628 an extended waitstatus, or by a watchpoint.
11629 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11630 thread was stepping or has been stopped by a watchpoint.
11631
d3bbe7a0
PA
116322010-04-01 Pedro Alves <pedro@codesourcery.com>
11633
11634 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11635 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11636 of another, then delete the previous, and validate all
11637 breakpoints.
11638 (validate_inserted_breakpoint): New.
11639 (delete_disabled_breakpoints): New.
11640 (validate_breakpoints): New.
11641 (check_mem_read): Validate breakpoints before trusting their
11642 shadow. Delete disabled breakpoints.
11643 (check_mem_write): Validate breakpoints before trusting they
11644 should be inserted. Delete disabled breakpoints.
11645 * mem-break.h (validate_breakpoints):
11646 * server.c (handle_query): Validate breakpoints when we see a
11647 qSymbol query.
11648
8b07ae33
PA
116492010-04-01 Pedro Alves <pedro@codesourcery.com>
11650
11651 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11652 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11653 if we could tell there's a GDB breakpoint at stop_pc.
11654 (need_step_over_p): Don't do a step over if we find a GDB
11655 breakpoint at the resume PC.
11656
11657 * mem-break.c (struct raw_breakpoint): New.
11658 (enum bkpt_type): New type `gdb_breakpoint'.
11659 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11660 fields. New field `raw'.
11661 (find_raw_breakpoint_at): New.
11662 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11663 breakpoint instead.
11664 (set_breakpoint_at): Adjust.
11665 (delete_raw_breakpoint): New.
11666 (release_breakpoint): New.
11667 (delete_breakpoint): Rename to...
11668 (delete_breakpoint_1): ... this. Add proc parameter. Use
11669 release_breakpoint. Return ENOENT.
11670 (delete_breakpoint): Reimplement.
11671 (find_breakpoint_at): Delete.
11672 (find_gdb_breakpoint_at): New.
11673 (delete_breakpoint_at): Delete.
11674 (set_gdb_breakpoint_at): New.
11675 (delete_gdb_breakpoint_at): New.
11676 (gdb_breakpoint_here): New.
11677 (set_reinsert_breakpoint): Use release_breakpoint.
11678 (uninsert_breakpoint): Rename to ...
11679 (uninsert_raw_breakpoint): ... this.
11680 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11681 (reinsert_raw_breakpoint): Change parameter type to
11682 raw_breakpoint.
11683 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11684 instead.
11685 (check_breakpoints): Adjust. Use release_breakpoint.
11686 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11687 (breakpoint_inserted_here): Ditto.
11688 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11689 Don't trust the breakpoint's shadow if it is not inserted.
11690 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11691 (delete_all_breakpoints): Adjust.
11692 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11693 use delete_breakpoint_1.
11694
11695 * mem-break.h (breakpoints_supported): Delete declaration.
11696 (set_gdb_breakpoint_at): Declare.
11697 (gdb_breakpoint_here): Declare.
11698 (delete_breakpoint_at): Delete.
11699 (delete_gdb_breakpoint_at): Declare.
11700
11701 * server.h (struct raw_breakpoint): Forward declare.
11702 (struct process_info): New field `raw_breakpoints'.
11703
11704 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11705 breakpoints.
11706
6bf5e0ba
PA
117072010-03-24 Pedro Alves <pedro@codesourcery.com>
11708
11709 * linux-low.c (status_pending_p_callback): Fix comment.
11710 (linux_wait_for_event_1): Move most of the internal breakpoint
11711 handling from here...
11712 (linux_wait_1): ... to here.
11713 (count_events_callback): New.
11714 (select_singlestep_lwp_callback): New.
11715 (select_event_lwp_callback): New.
11716 (cancel_breakpoints_callback): New.
11717 (select_event_lwp): New.
11718 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11719 priority to all LWPs that have had events that should be reported
11720 to the client. Cancel breakpoints when about to reporting the
11721 event to the client, not while stopping lwps. No longer cancel
11722 finished single-steps here.
11723 (cancel_finished_single_step): Delete.
11724 (cancel_finished_single_steps): Delete.
11725
414a389f
PA
117262010-03-24 Pedro Alves <pedro@codesourcery.com>
11727
11728 * mem-break.c (enum bkpt_type): New.
11729 (struct breakpoint): New field `type'.
11730 (set_breakpoint_at): Change return type to struct breakpoint
11731 pointer. Set type to `other_breakpoint' by default.
11732 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11733 in the breakpoint list.
11734 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11735 (reinsert_breakpoint): Rename to ...
11736 (reinsert_raw_breakpoint): ... this.
11737 (reinsert_breakpoints_at): Adjust.
11738 * mem-break.h (struct breakpoint): Declare.
11739 (set_breakpoint_at): Change return type to struct breakpoint
11740 pointer.
11741
2280c721
PA
117422010-03-24 Pedro Alves <pedro@codesourcery.com>
11743
11744 * server.c (handle_query): Assign, not compare.
11745
d50171e4
PA
117462010-03-24 Pedro Alves <pedro@codesourcery.com>
11747
11748 Teach linux gdbserver to step-over-breakpoints.
11749
11750 * linux-low.c (can_hardware_single_step): New.
11751 (supports_breakpoints): New.
11752 (handle_extended_wait): If stopping threads, read the stop pc of
11753 the new cloned LWP.
11754 (get_pc): New.
11755 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11756 low target doesn't support retrieving the PC.
11757 (add_lwp): Set last_resume_kind to resume_continue.
11758 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11759 (linux_attach): Don't clear stop_expected. Set the lwp's
11760 last_resume_kind to resume_stop.
11761 (linux_detach_one_lwp): Don't check for removed breakpoints.
11762 (check_removed_breakpoint): Delete.
11763 (status_pending_p): Rename to ...
11764 (status_pending_p_callback): ... this. Don't check for removed
11765 breakpoints. Don't consider threads that are stopped from GDB's
11766 perspective.
11767 (linux_wait_for_lwp): Always read the stop_pc here.
11768 (cancel_breakpoint): New.
11769 (step_over_bkpt): New global.
11770 (linux_wait_for_event_1): Implement stepping over breakpoints.
11771 (gdb_wants_lwp_stopped): New.
11772 (gdb_wants_all_stopped): New.
11773 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11774 single-step traps here. Store the thread's last reported target
11775 wait status.
11776 (send_sigstop): Don't clear stop_expected. Always set it,
11777 instead.
11778 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11779 (cancel_finished_single_step): New.
11780 (cancel_finished_single_steps): New.
11781 (wait_for_sigstop): Don't cancel finished single-step traps here.
11782 (linux_resume_one_lwp): Don't check for removed breakpoints.
11783 Don't set `step' on non-hardware step archs.
11784 (linux_set_resume_request): Ignore resume_stop requests if already
11785 stopping or stopped. Set the lwp's last_resume_kind.
11786 (resume_status_pending_p): Don't check for removed breakpoints.
11787 (need_step_over_p): New.
11788 (start_step_over): New.
11789 (finish_step_over): New.
11790 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11791 requests. Clear the thread's last reported target waitstatus.
11792 Don't use the `suspended' flag. Don't consider pending breakpoints.
11793 (linux_resume): Start a step-over if necessary.
11794 (proceed_one_lwp): New.
11795 (proceed_all_lwps): New.
11796 (unstop_all_lwps): New.
11797 * linux-low.h (struct lwp_info): Rewrite comment for the
11798 `suspended' flag. Add the `stop_pc' field. Delete the
11799 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11800 Add `'last_resume_kind' and `need_step_over' fields.
11801 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11802 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11803 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11804 (set_raw_breakpoint_at): New.
11805 (set_breakpoint_at): Rewrite to use it.
11806 (reinsert_breakpoint_handler): Delete.
11807 (set_reinsert_breakpoint): New.
11808 (reinsert_breakpoint_by_bp): Delete.
11809 (delete_reinsert_breakpoints): New.
11810 (uninsert_breakpoint): Rewrite.
11811 (uninsert_breakpoints_at): New.
11812 (reinsert_breakpoint): Rewrite.
11813 (reinsert_breakpoints_at): New.
11814 (check_breakpoints): Rewrite.
11815 (breakpoint_here): New.
11816 (breakpoint_inserted_here): New.
11817 (check_mem_read): Adjust.
11818 * mem-break.h (breakpoints_supported, breakpoint_here)
11819 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11820 (reinsert_breakpoint_by_bp): Delete declaration.
11821 (delete_reinsert_breakpoints): Declare.
11822 (reinsert_breakpoint): Delete declaration.
11823 (reinsert_breakpoints_at): Declare.
11824 (uninsert_breakpoint): Delete declaration.
11825 (uninsert_breakpoints_at): Declare.
11826 (check_breakpoints): Adjust prototype.
11827 * server.h: Adjust include order.
11828 (struct thread_info): Declare here. Add a `last_status' field.
11829
30ba68cb
MS
118302010-03-23 Michael Snyder <msnyder@vmware.com>
11831
11832 * server.c (crc32): New function.
11833 (handle_query): Add handling for 'qCRC:' request.
11834
b9a881c2
PA
118352010-03-23 Pedro Alves <pedro@codesourcery.com>
11836
11837 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11838 lwp had been stopped by a watchpoint.
11839
e92d13d5
PA
118402010-03-16 Pedro Alves <pedro@codesourcery.com>
11841
11842 * server.h (internal_error): Declare.
11843 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11844 * utils.c (internal_error): New function.
11845
64daa791
AS
118462010-03-15 Andreas Schwab <schwab@redhat.com>
11847
11848 * configure.srv: Fix typo setting srv_regobj.
11849
f52cd8cd
PA
118502010-03-15 Pedro Alves <pedro@codesourcery.com>
11851
11852 * linux-low.c (fetch_register): Avoid passing a non string literal
11853 format to `error'.
11854 (usr_store_inferior_registers): Ditto.
11855
93ae6fdc
PA
118562010-03-14 Pedro Alves <pedro@codesourcery.com>
11857
11858 * linux-low.c (linux_write_memory): Bail out early if peeking
11859 memory failed.
11860
c3adc08c
PA
118612010-03-14 Pedro Alves <pedro@codesourcery.com>
11862
11863 * linux-low.h (struct lwp_info): New fields
11864 `stopped_by_watchpoint' and `stopped_data_address'.
11865 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11866 here, and cache them in the lwp object.
11867 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11868 directly.
11869 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11870 field.
11871 (linux_stopped_by_watchpoint): Rewrite.
11872 (linux_stopped_data_address): Rewrite.
11873
bce522a2
PA
118742010-03-06 Simo Melenius <simo.melenius@iki.fi>
11875
11876 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11877 switching the current inferior, not before.
11878
90884b2b
L
118792010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11880
11881 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11882 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11883 i386-linux.c and amd64-linux.c.
11884 (reg-i386.o): Removed.
11885 (reg-i386.c): Likewise.
11886 (reg-i386-linux.o): Likewise.
11887 (reg-i386-linux.c): Likewise.
11888 (reg-x86-64.o): Likewise.
11889 (reg-x86-64.c): Likewise.
11890 (reg-x86-64-linux.o): Likewise.
11891 (reg-x86-64-linux.c): Likewise.
11892 (i386.o): New.
11893 (i386.c): Likewise.
11894 (i386-linux.o): Likewise.
11895 (i386-linux.c): Likewise.
11896 (amd64.o): Likewise.
11897 (amd64.c): Likewise.
11898 (amd64-linux.o): Likewise.
11899 (amd64-linux.c): Likewise.
11900
11901 * configure.srv (srv_i386_regobj): New.
11902 (srv_i386_linux_regobj): Likewise.
11903 (srv_amd64_regobj): Likewise.
11904 (srv_amd64_linux_regobj): Likewise.
11905 (srv_i386_32bit_xmlfiles): Likewise.
11906 (srv_i386_64bit_xmlfiles): Likewise.
11907 (srv_i386_xmlfiles): Likewise.
11908 (srv_amd64_xmlfiles): Likewise.
11909 (srv_i386_linux_xmlfiles): Likewise.
11910 (srv_amd64_linux_xmlfiles): Likewise.
11911 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11912 srv_xmlfiles to $srv_i386_xmlfiles.
11913 (i[34567]86-*-mingw32ce*): Likewise.
11914 (i[34567]86-*-mingw*): Likewise.
11915 (i[34567]86-*-nto*): Likewise.
11916 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11917 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11918 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11919 (x86_64-*-linux*): Likewise.
11920
11921 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11922 (init_registers_amd64_linux): New.
11923 (x86_arch_setup): Replace init_registers_x86_64_linux with
11924 init_registers_amd64_linux.
11925
193f13e6
MK
119262010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11927
11928 * configure.ac: Check for libdl. If it is not available link against
11929 static libthread_db.
11930 * configure: Regenerate.
11931
85d721b8
PA
119322010-02-22 Pedro Alves <pedro@codesourcery.com>
11933
11934 PR9605
11935
11936 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11937 handing a read watchpoint.
11938 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11939
6076632b
DE
119402010-02-12 Doug Evans <dje@google.com>
11941
11942 * linux-low.c (linux_supports_tracefork_flag): Document.
11943 (linux_look_up_symbols): Add comment.
11944
3327ccf7
L
119452010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11946
11947 * regcache.c (supply_register): Clear regcache if buf is NULL.
11948
0718675c 119492010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 11950 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
11951
11952 * inferiors.c (find_inferior): Add function documentation.
11953 (unloaded_dll): Handle the case where the unloaded dll has not
11954 been previously registered in the dll list.
11955
177321bd
DJ
119562010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11957
11958 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11959 (thumb2_breakpoint): New.
11960 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11961
2b009048
DJ
119622010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11963
11964 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11965 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11966 breakpoints.
11967
3be029c7
PA
119682010-01-21 Pedro Alves <pedro@codesourcery.com>
11969
11970 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11971
18f5de3b
JK
119722010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11973
11974 * linux-s390-low.c (s390_collect_ptrace_register)
11975 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11976
3743bb4f
DE
119772010-01-21 Doug Evans <dje@google.com>
11978
14ce3065
DE
11979 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11980 (PTRACE_ARG4_TYPE): New macro.
11981 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11982 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11983 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11984 (usr_store_inferior_registers): Ditto.
11985 (linux_read_memory, linux_write_memory): Ditto.
11986 (linux_test_for_tracefork): Ditto.
11987
3743bb4f
DE
11988 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11989 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11990
8b315be5
PA
119912010-01-21 Pedro Alves <pedro@codesourcery.com>
11992
11993 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11994 target.
11995
85492558
PA
119962010-01-21 Pedro Alves <pedro@codesourcery.com>
11997
11998 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11999 prototype to take a regcache. Adjust.
12000
442ea881
PA
120012010-01-20 Pedro Alves <pedro@codesourcery.com>
12002
12003 * regcache.h (struct thread_info): Forward declare.
12004 (struct regcache): New.
12005 (new_register_cache): Adjust prototype.
12006 (get_thread_regcache): Declare.
12007 (free_register_cache): Adjust prototype.
12008 (registers_to_string, registers_from_string): Ditto.
12009 (supply_register, supply_register_by_name, collect_register)
12010 (collect_register_as_string, collect_register_by_name): Ditto.
12011 * regcache.c (struct inferior_regcache_data): Delete.
12012 (get_regcache): Rename to ...
12013 (get_thread_regcache): ... this. Adjust. Switch inferior before
12014 fetching registers.
12015 (regcache_invalidate_one): Adjust.
12016 (regcache_invalidate): Fix prototype.
12017 (new_register_cache): Return the new register cache.
12018 (free_register_cache): Change prototype.
12019 (realloc_register_cache): Adjust.
12020 (registers_to_string): Change prototype to take a regcache. Adjust.
12021 (registers_from_string): Ditto.
12022 (register_data): Ditto.
12023 (supply_register): Ditto.
12024 (supply_register_by_name): Ditto.
12025 (collect_register): Ditto.
12026 (collect_register_as_string): Ditto.
12027 (collect_register_by_name): Ditto.
12028 * server.c (process_serial_event): Adjust.
12029 * linux-low.h (regset_fill_func, regset_store_func): Change
12030 prototype.
12031 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12032 Change prototype.
12033 * linux-low.c (get_stop_pc): Adjust.
12034 (check_removed_breakpoint): Adjust.
12035 (linux_wait_for_event): Adjust.
12036 (linux_resume_one_lwp): Adjust.
12037 (fetch_register): Add regcache parameter. Adjust.
12038 (usr_store_inferior_registers): Ditto.
12039 (regsets_fetch_inferior_registers): Ditto.
12040 (regsets_store_inferior_registers): Ditto.
12041 (linux_fetch_registers, linux_store_registers): Ditto.
12042 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12043 regcache. Adjust.
43aaf8b6
PA
12044 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12045 Ditto.
442ea881
PA
12046 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12047 prototype to take a regcache.
12048 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12049 * remote-utils.c (convert_ascii_to_int, outreg)
12050 (prepare_resume_reply): Change prototype to take a regcache.
12051 Adjust.
12052 * target.h (struct target_ops) <fetch_registers, store_registers>:
12053 Change prototype to take a regcache.
12054 (fetch_inferior_registers, store_inferior_registers): Change
12055 prototype to take a regcache. Adjust.
12056 * proc-service.c (ps_lgetregs): Adjust.
12057 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12058 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12059 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12060 take a regcache. Adjust.
12061 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12062 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12063 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12064 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12065 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12066 (cris_cannot_fetch_register):
12067 (cris_breakpoint_at): Change prototype to take a regcache.
12068 Adjust.
12069 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12070 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12071 to take a regcache. Adjust.
12072 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12073 Adjust.
12074 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12075 take a regcache. Adjust.
12076 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12077 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12078 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12079 * linux-mips-low.c (mips_get_pc):
12080 (mips_set_pc): Change prototype to take a regcache. Adjust.
12081 (mips_reinsert_addr): Adjust.
12082 (mips_collect_register): Change prototype to take a regcache.
12083 Adjust.
12084 (mips_supply_register):
12085 (mips_collect_register_32bit, mips_supply_register_32bit)
12086 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12087 (mips_store_fpregset): Ditto.
43aaf8b6
PA
12088 * linux-ppc-low.c (ppc_supply_ptrace_register)
12089 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
12090 (parse_spufs_run): Adjust.
12091 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12092 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12093 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12094 take a regcache. Adjust.
12095 * linux-s390-low.c (s390_collect_ptrace_register)
12096 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12097 (s390_set_pc): Change prototype to take a regcache. Adjust.
12098 (s390_arch_setup): Adjust.
12099 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12100 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12101 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12102 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12103 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12104 regcache. Adjust.
12105 (sparc_breakpoint_at): Adjust.
12106 * linux-xtensa-low.c (xtensa_fill_gregset):
12107 (xtensa_store_gregset):
12108 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12109 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12110 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12111 prototype to take a regcache. Adjust.
12112 * win32-arm-low.c (arm_fetch_inferior_register)
12113 (arm_store_inferior_register): Change prototype to take a
12114 regcache. Adjust.
12115 * win32-i386-low.c (i386_fetch_inferior_register)
12116 (i386_store_inferior_register): Change prototype to take a
12117 regcache. Adjust.
12118 * win32-low.c (child_fetch_inferior_registers)
12119 (child_store_inferior_registers): Change prototype to take a
12120 regcache. Adjust.
12121 (win32_wait): Adjust.
12122 (win32_fetch_inferior_registers): Change prototype to take a
12123 regcache. Adjust.
12124 (win32_store_inferior_registers): Adjust.
12125 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12126 store_inferior_register>: Change prototype to take a regcache.
12127
60c3d7b0
DE
121282010-01-20 Doug Evans <dje@google.com>
12129
12130 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12131 #ifdef.
12132 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 12133 (W_STOPCODE): Provide definition if missing.
60c3d7b0 12134
dc146f7c
VP
121352010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12136
12137 * linux-low.c (linux_core_of_thread): New.
12138 (compare_ints, show_process, list_threads): New.
12139 (linux_qxfer_osdata): Report threads and cores.
12140 (linux_target_op): Register linux_core_of_thread.
12141 * remote-utils.c (prepare_resume_reply): Report the core.
12142 (buffer_xml_printf): Support %d specifier.
12143 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12144 New.
12145 (handle_query): Handle qXfer:threads. Announce availability
12146 thereof.
12147 * target.h (struct target_ops): New field core_of_thread.
12148
7803799a
UW
121492010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12150
12151 * Makefile.in (clean): Remove new generated files.
12152 (reg-s390.o, reg-s390.c): Remove rules.
12153 (reg-s390x.o, reg-s390x.c): Likewise.
12154 (s390-linux32.o, s390-linux32.c): Add rules.
12155 (s390-linux64.o, s390-linux64.c): Likewise.
12156 (s390x-linux64.o, s390x-linux64.c): Likewise.
12157 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12158 * linux-s390-low.c: Include <elf.h>.
12159 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12160 (init_registers_s390): Remove prototype.
12161 (init_registers_s390x): Likewise.
12162 (init_registers_s390_linux32): Add prototype.
12163 (init_registers_s390_linux64): Likewise.
12164 (init_registers_s390x_linux64): Likewise.
12165 (s390_num_regs_3264): New define.
12166 (s390_regmap_3264): New global variable.
12167 (s390_cannot_fetch_register): Remove obsolete check.
12168 (s390_cannot_store_register): Likewise.
12169 (s390_collect_ptrace_register): Handle upper/lower register halves.
12170 (s390_supply_ptrace_register): Likewise.
12171 (s390_fill_gregset): Update to register number changes.
12172 (s390_get_hwcap): New routine.
12173 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12174 Install appropriate regmap and register set.
12175
6e7ffa39
JB
121762010-01-01 Joel Brobecker <brobecker@adacore.com>
12177
12178 * server.c (gdbserver_version): Update copyright year to 2010.
12179 * gdbreplay.c (gdbreplay_version): Likewise.
12180
957f3f49
DE
121812009-12-28 Doug Evans <dje@google.com>
12182
12183 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12184 elf/external.h. Include <elf.h> instead but only if necessary.
12185
ca5c370d
PA
121862009-12-28 Pedro Alves <pedro@codesourcery.com>
12187
12188 * linux-low.c (linux_remove_process): Remove `detaching'
12189 parameter. Don't release/detach from thread_db here.
12190 (linux_kill): Release/detach from thread_db here, ...
12191 (linux_detach): ... and here, before actually detaching.
12192 (linux_wait_1): ... and here, when a process exits.
12193 * thread-db.c (any_thread_of): New.
12194 (thread_db_free): Switch the current inferior to a thread of the
12195 passed in process.
12196
4ee62156
DE
121972009-12-21 Doug Evans <dje@google.com>
12198
d90e6a88
DE
12199 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12200
c5f62d5f
DE
12201 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12202 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12203 warning ifndef __NR_tkill. Move setting of errno there too.
12204 Delete unnecessary resetting of errno after syscall.
12205 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12206
10e86dd7
DE
12207 * configure.ac: Check for dladdr.
12208 * config.in: Regenerate.
12209 * configure: Regenerate.
12210 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12211 (try_thread_db_load): Update.
12212
4ee62156
DE
12213 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12214
00f515da
DE
122152009-12-18 Doug Evans <dje@google.com>
12216
e9464885
DE
12217 * event-loop.c: Include unistd.h if it exists.
12218
07d4f67e
DE
12219 * linux-low.c (my_waitpid): Move definition away from being in
12220 between linux_tracefork_child/linux_test_for_tracefork.
12221
00f515da
DE
12222 * gdb_proc_service.h (psaddr_t): Fix type.
12223 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12224 signature to match glibc.
12225
1de1badb
DE
122262009-12-16 Doug Evans <dje@google.com>
12227
12228 * linux-low.c (linux_read_memory): Fix argument to read.
12229
aeeb81d1
PA
122302009-11-26 Pedro Alves <pedro@codesourcery.com>
12231
12232 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12233 events, don't leave current_inferior pointing at null.
12234
10357975
PA
122352009-11-26 Pedro Alves <pedro@codesourcery.com>
12236
12237 * win32-low.c (LOG): Delete.
12238 (OUTMSG): Output to stderr.
12239 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12240 on compile time LOG macro.
12241 (win32_wait): Fix debug output.
12242
cf6e3471
PA
122432009-11-26 Pedro Alves <pedro@codesourcery.com>
12244
12245 * win32-low.c (win32_add_one_solib): If the dll name is
12246 "ntdll.dll", prepend the system directory to the dll path.
12247
0c85e18e
MK
122482009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12249
12250 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12251
9ac544ce 122522009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 12253 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
12254
12255 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12256 * configure.ac: Check for __mcoldfire__ and set
12257 gdb_cv_m68k_is_coldfire.
12258 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12259 reg-cf.o and reg-m68k.o.
12260 * configure: Regenerated.
12261
fd7dd3e6
PA
122622009-11-16 Pedro Alves <pedro@codesourcery.com>
12263
12264 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12265 Pass it to thread_db_free.
12266 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12267 proper `detaching' argument to linux_remove_process.
12268 * linux-low.h (thread_db_free): Add `detaching' parameter.
12269 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12270 to thread_db_free.
12271 (thread_db_free): Add `detaching' parameter. Only
12272 call td_ta_clear_event if detaching from process.
12273
75aa492e
MK
122742009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12275
12276 * thread-db.c (thread_db_free): Fix typo.
12277
21e1bee4
PP
122782009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12279
12280 PR gdb/10838
12281 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12282
8838b45e
NS
122832009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12284
12285 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12286 with an i686 compiler.
12287 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12288 needed.
12289 * configure: Rebuilt.
12290
8a35fb51
SL
122912009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12292
12293 PR gdb/10783
12294
12295 * server.c (handle_search_memory_1): Correct read_addr initialization
12296 in loop for searching subsequent chunks.
12297
96f15937
PP
122982009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12299
12300 * configure.ac: New --with-libthread-db option.
12301 * thread-db.c: Allow direct dependence on libthread_db.
12302 (thread_db_free): Adjust.
12303 * config.in: Regenerate.
12304 * configure: Likewise.
889bf7c5 12305
5f7d1694
PP
123062009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12307
12308 PR gdb/10757
12309 * thread-db.c (attach_thread): New function.
12310 (maybe_attach_thread): Return success/failure.
12311 (find_new_threads_callback): Adjust.
889bf7c5
PA
12312 (thread_db_find_new_threads): Loop until no new threads.
12313
88e3b899
PA
123142009-10-13 Pedro Alves <pedro@codesourcery.com>
12315
12316 * proc-service.c (ps_lgetregs): Formatting.
12317
cdbfd419
PP
123182009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12319
12320 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12321 * configure.ac: Adjust.
12322 * linux-low.h (struct process_info_private): Move members to struct
12323 thread_db.
12324 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12325 * linux-low.c (linux_remove_process): Adjust.
12326 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12327 * server.c (handle_query): Move code ...
12328 (handle_monitor_command): ... here. New function.
12329 * target.h (struct target_ops): New member.
12330 * thread-db.c (struct thread_db): New.
12331 (libthread_db_search_path): New variable.
12332 (thread_db_create_event, thread_db_enable_reporting)
12333 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12334 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12335 (try_thread_db_load_1, dladdr_to_soname): New functions.
12336 (try_thread_db_load, thread_db_load_search): New functions.
12337 (thread_db_init): Search for libthread_db.
12338 (thread_db_free): New function.
12339 (thread_db_handle_monitor_command): Likewise.
12340 * config.in: Regenerate.
12341 * configure: Regenerate.
889bf7c5 12342
4168d2d6
UW
123432009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12344
12345 * spu-low.c (spu_kill): Wait for inferior to terminate.
12346 Call clear_inferiors.
12347 (spu_detach): Call clear_inferiors.
12348
81ecdfbb
RW
123492009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12350
12351 * aclocal.m4: Regenerate.
12352 * config.in: Likewise.
12353 * configure: Likewise.
12354
0b9ff2c0
UW
123552009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12356
12357 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12358 (parse_spufs_run): New function.
12359 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12360 (ppc_breakpoint_at): Handle SPU breakpoints.
12361
efcbbd14
UW
123622009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12363
12364 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12365 (SPUFS_MAGIC): Define.
12366 (spu_enumerate_spu_ids): New function.
12367 (linux_qxfer_spu): New function.
12368 (linux_target_ops): Install linux_qxfer_spu.
12369
f4d9bade
UW
123702009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12371
12372 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12373 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12374 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12375 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12376 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12377 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12378 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12379 (init_registers_powerpc_cell32l): Add prototype.
12380 (init_registers_powerpc_cell64l): Likewise.
12381 (ppc_arch_setup): Detect Cell/B.E. architecture.
12382
96e946ca
RW
123832009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12384
12385 * Makefile.in (datarootdir): New variable.
12386
58d6951d
DJ
123872009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12388
12389 * linux-low.c (linux_write_memory): Update debugging output.
12390 * Makefile.in (clean): Add new descriptions.
12391 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12392 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12393 * configure.srv: Add new files for arm*-*-linux*.
12394 * linux-arm-low.c: Add new declarations.
12395 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12396 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12397 (HWCAP_VFPv3D16): New.
12398 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12399 instead of __IWMMXT__.
12400 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12401 (arm_arch_setup): New.
12402 (target_regsets): Remove #ifdef. Add VFP regset.
12403 (the_low_target): Use arm_arch_setup.
12404
12b42a12
DJ
124052009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12406
12407 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12408 the main thread again.
12409
ac8c974e
AR
124102009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12411
12412 Adding Neutrino gdbserver.
12413 * configure: Regenerated.
12414 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12415 * configure.srv (i[34567]86-*-nto*): New target.
12416 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12417 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12418 (nto_comctrl) [__QNX__]: New function.
12419 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12420
4424e0c3 124212009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
12422
12423 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12424 srv_tgtobj.
12425
912cf4ba
PA
124262009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12427 Pedro Alves <pedro@codesourcery.com>
12428
12429 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12430 don't support CONTEXT_EXTENDED_REGISTERS.
12431 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12432 (the_low_target): Install them.
12433 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12434 failing with ERROR_PIPE_NOT_CONNECTED.
12435
aa5ca48f
DE
124362009-06-30 Doug Evans <dje@google.com>
12437 Pierre Muller <muller@ics.u-strasbg.fr>
12438
12439 Add h/w watchpoint support to x86-linux, win32-i386.
12440 * Makefile.in (SFILES): Add i386-low.c
12441 (i386_low_h): Define.
12442 (i386-low.o): Add dependencies.
12443 (linux-x86-low.o): Add i386-low.h dependency.
12444 (win32-i386-low.o): Ditto.
12445 * i386-low.c: New file.
12446 * i386-low.h: New file.
12447 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12448 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12449 * linux-low.c (linux_add_process): Initialize arch_private.
12450 (linux_remove_process): Free arch_private.
12451 (add_lwp): Initialize arch_private.
12452 (delete_lwp): Free arch_private.
12453 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12454 provided.
12455 * linux-low.h (process_info_private): New member arch_private.
12456 (lwp_info): New member arch_private.
12457 (linux_target_ops): New members new_process, new_thread,
12458 prepare_to_resume.
12459 (ptid_of): New macro.
12460 * linux-x86-low.c: Include stddef.h, i386-low.h.
12461 (arch_process_info): New struct.
12462 (arch_lwp_info): New struct.
12463 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12464 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12465 (i386_dr_low_get_status): New function.
12466 (x86_insert_point, x86_remove_point): New functions.
12467 (x86_stopped_by_watchpoint): New function.
12468 (x86_stopped_data_address): New function.
12469 (x86_linux_new_process, x86_linux_new_thread): New functions.
12470 (x86_linux_prepare_to_resume): New function.
12471 (the_low_target): Add entries for insert_point, remove_point,
12472 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12473 prepare_to_resume.
12474 * server.c (debug_hw_points): New global.
12475 (monitor_show_help): Document set debug-hw-points.
12476 (handle_query): Process "set debug-hw-points".
12477 * server.h (debug_hw_points): Declare.
12478 (paddress): Declare.
12479 * utils.c (NUMCELLS, CELLSIZE): New macros.
12480 (get_sell, xsnprintf, paddress): New functions.
12481 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12482 remove_point, stopped_by_watchpoint, stopped_data_address.
12483 * win32-i386-low.c: Include i386-low.h.
12484 (debug_reg_state): Replaces dr.
12485 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12486 (i386_dr_low_get_status): New function.
12487 (i386_insert_point, i386_remove_point): New functions.
12488 (i386_stopped_by_watchpoint): New function.
12489 (i386_stopped_data_address): New function.
12490 (i386_initial_stuff): Update.
12491 (get_thread_context,set_thread_context,i386_thread_added): Update.
12492 (the_low_target): Add entries for insert_point,
12493 remove_point, stopped_by_watchpoint, stopped_data_address.
12494 * win32-low.c (win32_insert_watchpoint): New function.
12495 (win32_remove_watchpoint): New function.
12496 (win32_stopped_by_watchpoint): New function.
12497 (win32_stopped_data_address): New function.
12498 (win32_target_ops): Add entries for insert_watchpoint,
12499 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12500 * win32-low.h (win32_target_ops): New members insert_point,
12501 remove_point, stopped_by_watchpoint, stopped_data_address.
12502
d993e290
PA
125032009-06-25 Pedro Alves <pedro@codesourcery.com>
12504
12505 * server.c (process_serial_event): Re-return unsupported, not
12506 error, if the type isn't recognized. Re-allow supporting only
12507 insert or remove packets. Also call require_running for
12508 breakpoints. Add missing break statement to default case. Tidy.
12509 * target.h (struct target_ops): Rename insert_watchpoint to
12510 insert_point, and remove_watchpoint to remove_point.
12511
12512 * linux-low.h (struct linux_target_ops): Likewise.
12513 * linux-low.c (linux_insert_watchpoint): Rename to ...
12514 (linux_insert_point): ... this. Adjust.
12515 (linux_remove_watchpoint): Rename to ...
12516 (linux_remove_point): ... this. Adjust.
12517 (linux_target_ops): Adjust.
12518 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12519 (cris_insert_point): ... this.
12520 (cris_remove_watchpoint): Rename to ...
12521 (cris_remove_point): ... this.
12522 (the_low_target): Adjust.
12523
0f54c268
PM
125242009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12525
12526 * server.c (handle_v_kill): Pass signal_pid to
12527 kill_inferior if multi_process is zero.
12528
c6314022
AR
125292009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12530
12531 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12532 * target.h (target_ops): Comment for *_watchpoint to make it clear
12533 the functions can get types '0' and '1'.
12534
4463ce24
AR
125352009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12536
12537 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12538 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12539 * regcache.c (get_regcache): Likewise.
12540 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12541 * win32-low.c (child_fetch_inferior_registers): Remove check for
12542 regno 0.
12543
cf8fd78b
PA
125442009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12545 Pedro Alves <pedro@codesourcery.com>
12546
12547 * target.h (struct target_ops) <supports_multi_process>: New
12548 callback.
12549 (target_supports_multi_process): New.
12550 * server.c (handle_query): Even if GDB reports support, only
12551 enable multi-process if the target also supports it. Report
12552 multi-process support only if the target backend supports it.
12553 * linux-low.c (linux_supports_multi_process): New function.
12554 (linux_target_ops): Install it as target_supports_multi_process
12555 callback.
12556
47c0c975
DE
125572009-05-24 Doug Evans <dje@google.com>
12558
e09875d4
DE
12559 Global renaming of find_thread_pid to find_thread_ptid.
12560 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12561 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12562 All callers updated.
12563
e27d73f6
DE
12564 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12565 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12566 directly.
12567
47c0c975
DE
12568 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12569 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12570 (linux_resume_one_lwp): Ditto.
12571
2acc282a
DE
125722009-05-23 Doug Evans <dje@google.com>
12573
12574 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12575 from struct inferior_list_entry * to struct lwp_info *.
12576 All callers updated.
12577
9f1036c1
DE
125782009-05-13 Doug Evans <dje@google.com>
12579
12580 * linux-x86-low.c: Don't include assert.h.
12581 (x86_siginfo_fixup): Use fatal, not assert.
12582 (x86_arch_setup): Fix comment.
12583
d0722149
DE
125842009-05-12 Doug Evans <dje@google.com>
12585
12586 Biarch support for i386/amd64 gdbserver.
12587 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12588 Add linux-x86-low.c.
12589 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12590 (linux-x86-low.o): Add.
12591 * linux-x86-64-low.c: Delete.
12592 * linux-i386-low.c: Delete.
12593 * linux-x86-low.c: New file.
12594 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12595 linux-x86-low.o.
12596 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12597 linux-x86-low.o.
12598 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12599 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12600 (linux_child_pid_to_exec_file): New function.
12601 (elf_64_header_p, elf_64_file_p): New functions.
12602 (siginfo_fixup): New function.
12603 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12604 give target a chance to convert layout.
12605 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12606 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12607
fdeb2a12
DE
126082009-05-07 Doug Evans <dje@google.com>
12609
12610 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12611 (regsets_store_inferior_registers): Ditto.
12612
a6dbe5df
PA
126132009-05-06 Pedro Alves <pedro@codesourcery.com>
12614
12615 PR server/10048
12616
12617 * linux-low.c (must_set_ptrace_flags): Delete.
12618 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12619 of the global.
12620 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12621 `lwp->must_set_ptrace_flags' instead.
ba42693b 12622 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
12623 (linux_wait_1): ... not here.
12624
5091eb23
DE
126252009-04-30 Doug Evans <dje@google.com>
12626
9f767825
DE
12627 * inferiors.c (started_inferior_callback): New function.
12628 (attached_inferior_callback): New function.
12629 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12630 * server.c (print_started_pid, print_attached_pid): New functions.
12631 (detach_or_kill_for_exit): New function.
12632 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12633 * server.h (have_started_inferiors_p): Declare.
12634 (have_attached_inferiors_p): Declare.
12635
5091eb23
DE
12636 * inferiors.c (remove_process): Fix memory leak, free process.
12637 * linux-low.c (linux_remove_process): New function.
12638 (linux_kill): Call it instead of remove_process.
12639 (linux_detach, linux_wait_1): Ditto.
12640
155c8968
PA
126412009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12642
12643 * configure.srv: Add x86 Windows CE target.
12644
7fe519cb
UW
126452009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12646
12647 * inferiors.c (get_thread_process): Make global.
12648 * server.h (get_thread_process): Add prototype.
12649 * thread-db.c (find_one_thread): Use get_thread_process
12650 instead of current_process.
12651 (thread_db_get_tls_address): Do not crash if called when
12652 thread layer is not yet initialized.
12653
5472f405
UW
126542009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12655
12656 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12657 * spu-low.c (current_tid): Rename to ...
12658 (current_ptid): ... this.
12659 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12660 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12661 ptid_get_lwp (current_ptid) instead of current_tid.
12662 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12663 instead of current_tid. Use find_process_pid to verify pid
12664 argument is valid. Pass proper argument to remove_process.
12665 (spu_thread_alive): Compare current_ptid instead of current_tid.
12666 (spu_resume): Likewise.
12667
55ac2b99
PA
126682009-04-02 Pedro Alves <pedro@codesourcery.com>
12669
12670 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12671 variable.
12672
95954743
PA
126732009-04-01 Pedro Alves <pedro@codesourcery.com>
12674
12675 Implement the multiprocess extensions, and add linux multiprocess
12676 support.
12677
12678 * server.h (ULONGEST): Declare.
12679 (struct ptid, ptid_t): New.
12680 (minus_one_ptid, null_ptid): Declare.
12681 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12682 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12683 (struct inferior_list_entry): Change `id' type from unsigned from
12684 to ptid_t.
12685 (struct sym_cache, struct breakpoint, struct
12686 process_info_private): Forward declare.
12687 (struct process_info): Declare.
12688 (current_process): Declare.
12689 (all_processes): Declare.
12690 (initialize_inferiors): Declare.
12691 (add_thread): Adjust to use ptid_t.
12692 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12693 (add_process, remove_process, find_thread_pid): Declare.
12694 (find_inferior_id): Adjust to use ptid_t.
12695 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12696 (multi_process): Declare.
12697 (push_event): Adjust to use ptid_t.
12698 (read_ptid, write_ptid): Declare.
12699 (prepare_resume_reply): Adjust to use ptid_t.
12700 (clear_symbol_cache): Declare.
12701 * inferiors.c (all_processes): New.
12702 (null_ptid, minus_one_ptid): New.
12703 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12704 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12705 (add_thread): Change unsigned long to ptid. Remove gdb_id
12706 parameter. Adjust.
12707 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12708 (gdb_id_to_thread): Rename to ...
12709 (find_thread_pid): ... this. Change unsigned long to ptid.
12710 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12711 (loaded_dll, pull_pid_from_list): Adjust.
12712 (add_process, remove_process, find_process_pid)
12713 (get_thread_process, current_process, initialize_inferiors): New.
12714 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12715 (struct target_waitstatus) <related_pid>: Ditto.
12716 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12717 return type to int.
12718 (struct target_ops) <join>: Add `pid' argument.
12719 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12720 (struct target_ops) <wait>: Add `ptid' field. Change return type
12721 to ptid.
12722 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12723 (mywait): Add `ptid' argument. Change return type to ptid_t.
12724 (target_pid_to_str): Declare.
12725 * target.c (set_desired_inferior): Adjust to use ptids.
12726 (mywait): Add new `ptid' argument. Adjust.
12727 (target_pid_to_str): New.
12728 * mem-break.h (free_all_breakpoints): Declare.
12729 * mem-break.c (breakpoints): Delelete.
12730 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12731 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12732 to use per-process breakpoint list.
12733 (free_all_breakpoints): New.
12734 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12735 (symbol_cache, all_symbols_looked_up): Delete.
12736 (hexchars): New.
12737 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12738 read_ptid): New.
12739 (prepare_resume_reply): Change ptid argument's type from unsigned
12740 long to ptid_t. Adjust. Implement W;process and X;process.
12741 (free_sym_cache, clear_symbol_cache): New.
12742 (look_up_one_symbol): Adjust to per-process symbol cache. *
12743 * server.c (cont_thread, general_thread, step_thread): Change type
12744 to ptid_t.
12745 (attached): Delete.
12746 (multi_process): New.
12747 (last_ptid): Change type to ptid_t.
12748 (struct vstop_notif) <ptid>: Change type to ptid_t.
12749 (queue_stop_reply, push_event): Change `ptid' argument's type to
12750 ptid_t.
12751 (discard_queued_stop_replies): Add `pid' argument.
12752 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12753 changes. Don't reference the `attached' global.
12754 (attach_inferior): Adjust to mywait interface changes.
12755 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12756 features. Handle and report "multiprocess+". Handle
12757 "qAttached:PID".
12758 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12759 changes.
12760 (handle_v_kill): New.
12761 (handle_v_stopped): Adjust to use target_pid_to_str.
12762 (handle_v_requests): Allow multiple attaches and runs when
12763 multiprocess extensions are in effect. Handle "vKill".
12764 (myresume): Adjust to use ptids.
12765 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12766 (handle_status): Adjust to discard_queued_stop_replies interface
12767 change.
12768 (first_thread_of, kill_inferior_callback)
12769 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12770 (main): Call initialize_inferiors. Adjust to use ptids, killing
12771 and detaching from all inferiors. Handle multiprocess packet
12772 variants.
12773 * linux-low.h: Include gdb_proc_service.h.
12774 (struct process_info_private): New.
12775 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12776 <lwpid_of>: Use ptid_get_lwp.
12777 (get_lwp_thread): Adjust.
12778 (struct lwp_info): Add `dead' member.
12779 (find_lwp_pid): Declare.
12780 * linux-low.c (thread_db_active): Delete.
12781 (new_inferior): Adjust comment.
12782 (inferior_pid): Delete.
12783 (linux_add_process): New.
12784 (handle_extended_wait): Adjust.
12785 (add_lwp): Change unsigned long to ptid.
12786 (linux_create_inferior): Add process to processes table. Adjust
12787 to use ptids. Don't set new_inferior here.
12788 (linux_attach_lwp): Rename to ...
12789 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12790 it. Adjust to use ptids.
12791 (linux_attach_lwp): New.
12792 (linux_attach): Add process to processes table. Don't set
12793 new_inferior here.
12794 (struct counter): New.
12795 (second_thread_of_pid_p, last_thread_of_process_p): New.
12796 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12797 multiple processes.
12798 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12799 processes. Remove process from process table.
12800 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12801 to multiple processes.
12802 (any_thread_of): New.
12803 (linux_detach): Add `pid' argument, and handle it. Remove process
12804 from processes table.
12805 (linux_join): Add `pid' argument. Handle it.
12806 (linux_thread_alive): Change unsighed long argument to ptid_t.
12807 Consider dead lwps as not being alive.
12808 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12809 threads we're not interested in.
12810 (same_lwp, find_lwp_pid): New.
12811 (linux_wait_for_lwp): Change `pid' argument's type from int to
12812 ptid_t. Adjust.
12813 (linux_wait_for_event): Rename to ...
12814 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12815 from int to ptid_t. Adjust.
12816 (linux_wait_for_event): New.
12817 (linux_wait_1): Add `ptid' argument. Change return type to
12818 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12819 that exit from the process table.
12820 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12821 Adjust.
12822 (mark_lwp_dead): New.
12823 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12824 stopping all threads, mark its main lwp as dead.
12825 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12826 ptids.
12827 (fetch_register, usr_store_inferior_registers)
12828 (regsets_fetch_inferior_registers)
12829 (regsets_store_inferior_registers, linux_read_memory)
12830 (linux_write_memory): Inline `inferior_pid'.
12831 (linux_look_up_symbols): Adjust to use per-process
12832 `thread_db_active'.
12833 (linux_request_interrupt): Adjust to use ptids.
12834 (linux_read_auxv): Inline `inferior_pid'.
12835 (initialize_low): Don't reference thread_db_active.
12836 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12837 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12838 (ps_getpid): Return the pid of the current inferior.
12839 * thread-db.c (proc_handle, thread_agent): Delete.
12840 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12841 per-process data.
12842 (find_one_thread): Change argument type to ptid_t. Adjust to
12843 per-process data.
12844 (maybe_attach_thread): Adjust to per-process data and ptids.
12845 (thread_db_find_new_threads): Ditto.
12846 (thread_db_init): Ditto.
12847 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12848 processes table. Adjust to use ptids.
12849 (spu_kill, spu_detach): Adjust interface. Remove process from
12850 processes table.
12851 (spu_join, spu_thread_alive): Adjust interface.
12852 (spu_wait): Adjust interface. Remove process from processes
12853 table. Adjust to use ptids.
12854 * win32-low.c (current_inferior_tid): Delete.
12855 (current_inferior_ptid): New.
12856 (debug_event_ptid): New.
12857 (thread_rec): Take a ptid. Adjust.
12858 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12859 (child_delete_thread): Ditto.
12860 (do_initial_child_stuff): Add `attached' argument. Add process to
12861 processes table.
12862 (child_fetch_inferior_registers, child_store_inferior_registers):
12863 Adjust.
12864 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12865 (win32_attach): Pass 1 to do_initial_child_stuff.
12866 (win32_kill): Adjust interface. Remove process from processes
12867 table.
12868 (win32_detach): Ditto.
12869 (win32_join): Adjust interface.
12870 (win32_thread_alive): Take a ptid.
12871 (win32_resume): Adjust to use ptids.
12872 (get_child_debug_event): Ditto.
12873 (win32_wait): Adjust interface. Remove exiting process from
12874 processes table.
12875
bd99dc85
PA
128762009-04-01 Pedro Alves <pedro@codesourcery.com>
12877
12878 Non-stop mode support.
12879
12880 * server.h (non_stop): Declare.
12881 (gdb_client_data, handler_func): Declare.
12882 (delete_file_handler, add_file_handler, start_event_loop):
12883 Declare.
12884 (handle_serial_event, handle_target_event, push_event)
12885 (putpkt_notif): Declare.
12886 * target.h (enum resume_kind): New.
12887 (struct thread_resume): Replace `step' field by `kind' field.
12888 (TARGET_WNOHANG): Define.
12889 (struct target_ops) <wait>: Add `options' argument.
12890 <supports_non_stop, async, start_non_stop>: New fields.
12891 (target_supports_non_stop, target_async): New.
12892 (start_non_stop): Declare.
12893 (mywait): Add `options' argument.
12894 * target.c (mywait): Add `options' argument. Print child exit
12895 notifications here.
12896 (start_non_stop): New.
12897 * server.c (non_stop, own_buf, mem_buf): New globals.
12898 (struct vstop_notif): New.
12899 (notif_queue): New global.
12900 (queue_stop_reply, push_event, discard_queued_stop_replies)
12901 (send_next_stop_reply): New.
12902 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12903 interface changes.
12904 (attach_inferior): In non-stop mode, don't wait for the target
12905 here.
12906 (handle_general_set): Handle QNonStop.
12907 (handle_query): When handling qC, return the current general
12908 thread, instead of the first thread of the list.
12909 (handle_query): If the backend supports non-stop mode, include
12910 QNonStop+ in the qSupported query response.
12911 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12912 and non-stop mode.
12913 (handle_v_attach, handle_v_run): Handle non-stop mode.
12914 (handle_v_stopped): New.
12915 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12916 (myresume): Adjust to use resume_kind. Handle non-stop.
12917 (queue_stop_reply_callback): New.
12918 (handle_status): Handle non-stop mode.
12919 (main): Clear non_stop flag on reconnection. Use the event-loop.
12920 Refactor serial protocol handling from here ...
12921 (process_serial_event): ... to this new function. When GDB
12922 selects any thread, select one here. In non-stop mode, wait until
12923 GDB acks all pending events before exiting.
12924 (handle_serial_event, handle_target_event): New.
12925 * remote-utils.c (remote_open): Install remote_desc in the event
12926 loop.
12927 (remote_close): Remove remote_desc from the event loop.
12928 (putpkt_binary): Rename to...
12929 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12930 (putpkt_binary): New as wrapper around putpkt_binary_1.
12931 (putpkt_notif): New.
12932 (prepare_resume_reply): In non-stop mode, don't change the
12933 general_thread.
12934 * event-loop.c: New.
12935 * Makefile.in (OBJ): Add event-loop.o.
12936 (event-loop.o): New rule.
12937
12938 * linux-low.h (pid_of): Moved here.
12939 (lwpid_of): New.
12940 (get_lwp_thread): Use lwpid_of.
12941 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12942 * linux-low.c (pid_of): Delete.
12943 (inferior_pid): Use lwpid_of.
12944 (linux_event_pipe): New.
12945 (target_is_async_p): New.
12946 (delete_lwp): New.
12947 (handle_extended_wait): Use lwpid_of.
12948 (add_lwp): Don't set lwpid field.
12949 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12950 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12951 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12952 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12953 first. Adjust to linux_wait_for_event interface changes. Use
12954 lwpid_of.
12955 (linux_detach): Don't delete the main lwp here.
12956 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12957 (status_pending_p): Don't consider explicitly suspended lwps.
12958 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12959 pointer. Add OPTIONS argument. Change return type to int. Use
12960 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12961 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12962 pointer. Add status pointer argument. Return a pid instead of a
12963 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12964 changes. In non-stop mode, don't switch to a random thread.
12965 (linux_wait): Rename to...
12966 (linux_wait_1): ... this. Add target_options argument, and handle
12967 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12968 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12969 clean exit and signal exit code. Don't stop all threads in
12970 non-stop mode. In all-stop mode, only stop all threads when
12971 reporting a stop to GDB. Handle explicit thread stop requests.
12972 (async_file_flush, async_file_mark): New.
12973 (linux_wait): New.
12974 (send_sigstop): Use lwpid_of.
12975 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12976 interface changes. In non-stop mode, don't switch to a random
12977 thread.
12978 (linux_resume_one_lwp): Use lwpid_of.
12979 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12980 (linux_resume_one_thread): ... this. Handle resume_stop. In
12981 non-stop mode, don't look for pending flag in all threads.
12982 (resume_status_pending_p): Don't consider explicitly suspended
12983 threads.
12984 (my_waitpid): Reimplement. Emulate __WALL.
12985 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12986 Use lwpid_of.
12987 (sigchld_handler, linux_supports_non_stop, linux_async)
12988 (linux_start_non_stop): New.
12989 (linux_target_ops): Register linux_supports_non_stop, linux_async
12990 and linux_start_non_stop.
12991 (initialize_low): Install SIGCHLD handler.
12992 * thread-db.c (thread_db_create_event, find_one_thread)
12993 (thread_db_get_tls_address): Use lwpid_of.
12994 * win32-low.c (win32_detach): Adjust to use resume_kind.
12995 (win32_wait): Add `options' argument.
12996 * spu-low.c (spu_resume): Adjust to use resume_kind.
12997 (spu_wait): Add `options' argument.
12998
5b1c542e
PA
129992009-04-01 Pedro Alves <pedro@codesourcery.com>
13000
13001 Decouple target code from remote protocol.
13002
13003 * target.h (enum target_waitkind): New.
13004 (struct target_waitstatus): New.
13005 (struct target_ops) <wait>: Return an unsigned long. Take a
13006 target_waitstatus pointer instead of a char pointer.
13007 (mywait): Likewise.
13008 * target.c (mywait): Change prototype to return an unsigned long.
13009 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13010 * server.h (thread_from_wait, old_thread_from_wait): Delete
13011 declarations.
13012 (prepare_resume_reply): Change prototype to take a
13013 target_waitstatus.
13014 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13015 (last_status, last_ptid): New.
13016 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13017 pid instead of a signal.
13018 (attach_inferior): Remove "status" and "signal" parameters.
13019 Adjust.
13020 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13021 not as an address.
13022 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13023 (handle_v_requests, myresume): Remove "status" and "signal"
13024 parameters. Adjust.
13025 (handle_status): New.
13026 (main): Delete local `status'. Adjust.
13027 * remote-utils.c: Include target.h.
13028 (prepare_resume_reply): Change prototype to take a
13029 target_waitstatus. Adjust.
13030
13031 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13032 interface.
13033 * spu-low.c (spu_wait): Adjust.
13034 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13035 Delete.
13036 (win32_wait): Adjust.
13037
2bd7c093
PA
130382009-04-01 Pedro Alves <pedro@codesourcery.com>
13039
13040 * target.h (struct thread_resume): Delete leave_stopped member.
13041 (struct target_ops): Add a `n' argument to the `resume' callback.
13042 * server.c (start_inferior): Adjust.
13043 (handle_v_cont, myresume): Adjust.
13044 * linux-low.c (check_removed_breakpoint): Adjust to resume
13045 interface change, and to removed leave_stopped field.
13046 (resume_ptr): Delete.
13047 (struct thread_resume_array): New.
13048 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13049 resume interface change.
13050 (linux_continue_one_thread, linux_queue_one_thread)
13051 (resume_status_pending_p): Check if the resume field is NULL
13052 instead of checking the leave_stopped member.
13053 (linux_resume): Adjust to the target resume interface change.
13054 * spu-low.c (spu_resume): Adjust to the target resume interface
13055 change.
13056 * win32-low.c (win32_detach, win32_resume): Ditto.
13057
c35fafde
PA
130582009-04-01 Pedro Alves <pedro@codesourcery.com>
13059
13060 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13061 flag.
13062 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13063 pending.
13064 (linux_continue_one_thread): Only preserve the stepping flag if
13065 there's a pending breakpoint.
13066
0a59d50b
PA
130672009-03-31 Pedro Alves <pedro@codesourcery.com>
13068
13069 * server.c (main): After the inferior having exited, call
13070 remote_close before exiting gdbserver.
13071
f04c6d38
TJB
130722009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13073
13074 Fix size of FPSCR in Power 7 processors.
13075 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13076 (PPC_FEATURE_HAS_DFP): New #define.
13077 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13078 size of the FPSCR.
13079
78e5cee6
PA
130802009-03-23 Pedro Alves <pedro@codesourcery.com>
13081
13082 * server.c (handle_query) Whitespace and formatting.
13083
1b3f6016
PA
130842009-03-22 Pedro Alves <pedro@codesourcery.com>
13085
13086 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13087 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13088 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13089 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13090 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13091 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13092 Makefile.in, configure.ac: Fix whitespace throughout.
13093 * configure: Regenerate.
13094
a07b2135
PA
130952009-03-22 Pedro Alves <pedro@codesourcery.com>
13096
13097 * inferiors.c (find_inferior): Make it safe for the callback
13098 function to delete the currently iterated inferior.
13099
67cc2626
PA
131002009-03-22 Pedro Alves <pedro@codesourcery.com>
13101
13102 * Makefile.in (linuw_low_h): Move higher.
13103 (thread-db.o): Depend on $(linux_low_h).
13104
54a0b537
PA
131052009-03-17 Pedro Alves <pedro@codesourcery.com>
13106
13107 Rename "process" to "lwp" throughout.
13108
13109 * linux-low.c (all_processes): Rename to...
13110 (all_lwps): ... this.
13111 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13112 (add_process): Rename to ...
13113 (add_lwp): ... this. Adjust.
13114 (linux_create_inferior): Adjust.
13115 (linux_attach_lwp): Adjust.
13116 (linux_attach): Adjust.
13117 (linux_kill_one_process): Rename to ...
13118 (linux_kill_one_lwp): ... this. Adjust.
13119 (linux_kill): Adjust.
13120 (linux_detach_one_process): Rename to ...
13121 (linux_detach_one_lwp): ... this. Adjust.
13122 (linux_detach): Adjust.
13123 (check_removed_breakpoint): Adjust.
13124 (status_pending_p): Adjust.
13125 (linux_wait_for_process): Rename to ...
13126 (linux_wait_for_lwp): ... this. Adjust.
13127 (linux_wait_for_event): Adjust.
13128 (send_sigstop): Adjust.
13129 (wait_for_sigstop): Adjust.
13130 (stop_all_processes): Rename to ...
13131 (stop_all_lwps): ... this.
13132 (linux_resume_one_process): Rename to ...
13133 (linux_resume_one_lwp): ... this. Adjust.
13134 (linux_set_resume_request, linux_continue_one_thread)
13135 (linux_queue_one_thread, resume_status_pending_p)
13136 (usr_store_inferior_registers, regsets_store_inferior_registers)
13137 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13138 Adjust.
13139 * linux-low.h (get_process): Rename to ...
13140 (get_lwp): ... this. Adjust.
13141 (get_thread_process): Rename to ...
13142 (get_thread_lwp): ... this. Adjust.
13143 (get_process_thread): Rename to ...
13144 (get_lwp_thread): ... this. Adjust.
13145 (struct process_info): Rename to ...
13146 (struct lwp_info): ... this.
13147 (all_processes): Rename to ...
13148 (all_lwps): ... this.
13149 * proc-service.c (ps_lgetregs): Adjust.
13150 * thread-db.c (thread_db_create_event, find_one_thread)
13151 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13152
0b16c5cf
PA
131532009-03-14 Pedro Alves <pedro@codesourcery.com>
13154
13155 * server.c (handle_query): Handle "qAttached".
13156
32de4b9d
NS
131572009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13158
13159 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13160 GPLv3, update license URL.
13161
2aecd87f
DE
131622009-03-01 Doug Evans <dje@google.com>
13163
93efd302 13164 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
13165 (server_h): Add gdb_signals.h.
13166 (signals.o): Update.
13167 * server.h (target_signal_from_host,target_signal_to_host_p)
13168 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13169
86b1f9c5
PM
131702009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13171
13172 * remote-utils.c (getpkt): Also generate remote-debug
13173 information if noack_mode is set.
13174
4aa995e1
PA
131752009-02-06 Pedro Alves <pedro@codesourcery.com>
13176
13177 * server.c (handle_query): Report qXfer:siginfo:read and
13178 qXfer:siginfo:write as supported and handle them.
13179 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13180 * linux-low.c (linux_xfer_siginfo): New.
13181 (linux_target_ops): Set it.
13182
62709adf
PA
131832009-01-26 Pedro Alves <pedro@codesourcery.com>
13184
13185 * server.c (gdbserver_usage): Mention --remote-debug.
13186 (main): Accept '--remote-debug' switch.
13187
aef93bd7
DE
131882009-01-18 Doug Evans <dje@google.com>
13189
13190 * regcache.c (new_register_cache): No need to check result of xcalloc.
13191 * server.c (handle_search_memory): Back out calls to xmalloc,
13192 result is checked and error is returned to user upon failure.
13193 (handle_query): Ditto. Add more checks for result of malloc.
13194 (handle_v_cont): Check result of malloc, report error back to
13195 user upon failure.
13196 (handle_v_run): Ditto. Call freeargv.
13197 * server.h (freeargv): Declare.
13198 * utils.c (freeargv): New fn.
13199
54363045
DE
132002009-01-15 Doug Evans <dje@google.com>
13201
f626972c
DE
13202 * gdbreplay.c (perror_with_name): Make arg const char *.
13203 * server.h (target_signal_to_name): Make return type const char *.
0842e787 13204 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 13205 * utils.c (perror_with_name): Make arg const char *.
54363045 13206
18aae699
PA
132072009-01-14 Pedro Alves <pedro@codesourcery.com>
13208
13209 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13210 when handling a EXIT_PROCESS_DEBUG_EVENT.
13211
ff703abe
JB
132122009-01-06 Joel Brobecker <brobecker@adacore.com>
13213
13214 * gdbreplay.c (gdbreplay_version): Update copyright year.
13215 * server.c (gdbserver_version): Likewise.
13216
f21cc1a2 132172009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
13218
13219 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 13220 (handle_extended_wait): Improve comment.
0e21c1ec 13221
bca929d3
DE
132222008-12-13 Doug Evans <dje@google.com>
13223
13224 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13225 * server.h (ATTR_MALLOC): New macro.
13226 (xmalloc,xcalloc,xstrdup): Declare.
13227 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13228 * inferiors.c: Ditto.
13229 * linux-low.c: Ditto.
13230 * mem-break.c: Ditto.
13231 * regcache.c: Ditto.
13232 * remote-utils.c: Ditto.
13233 * server.c: Ditto.
13234 * target.c: Ditto.
13235 * win32-low.c: Ditto.
13236
97438e3f
DE
132372008-12-12 Doug Evans <dje@google.com>
13238
896c7fbb
DE
13239 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13240 in debugging printf.
13241
97438e3f
DE
13242 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13243
e3b886f8
DE
132442008-12-09 Doug Evans <dje@google.com>
13245
13246 * linux-low.h (struct process_info): Delete member tid, unused.
13247 * thread-db.c (find_one_thread): Update.
13248 (maybe_attach_thread): Update.
13249
07e059b5
VP
132502008-12-02 Pedro Alves <pedro@codesourcery.com>
13251
889bf7c5
PA
13252 * target.h (struct target_ops): Add qxfer_osdata member.
13253 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13254 and dirent.h.
13255 (linux_qxfer_osdata): New functions.
13256 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13257 callback.
13258 * server.c (handle_query): Handle "qXfer:osdata:read:".
13259 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13260 (buffer_xml_printf): New functions.
13261 * server.h (struct buffer): New.
13262 (buffer_grow_str, buffer_grow_str0): New macros.
13263 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13264 (buffer_xml_printf): Declare.
07e059b5 13265
4cab47ab
DE
132662008-11-24 Doug Evans <dje@google.com>
13267
13268 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13269
f142445f
DJ
132702008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13271
13272 * server.c (handle_v_run): Always use the supplied argument list.
13273
d0107bb6 132742008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 13275
d0107bb6
BW
13276 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13277 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 13278
2c4ad781
TJB
132792008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13280
13281 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13282 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13283 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13284 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13285 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13286 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13287 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13288 XML target descriptions.
13289 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13290 when inferior is running on an ISA 2.05 or later processor. Add
13291 special case to return offset for full 64-bit slot of FPSCR when
13292 in 32-bits.
13293
dfb64f85
DJ
132942008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13295
13296 * Makefile.in (SFILES, clean): Added sparc64 files.
13297 (reg-sparc64.o, reg-sparc64.c): New.
13298 * configure.srv (sparc*-*-linux*): New configuration.
13299 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13300 syscall arguments for SPARC.
13301 (regsets_store_inferior_registers): Likewise.
13302 * linux-sparc-low.c: New file.
13303
66b6e1dd
DE
133042008-10-21 Doug Evans <dje@google.com>
13305
13306 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13307 (READLINE_DIR,READLINE_DEP): Delete.
13308 (INTERNAL_CFLAGS): Update.
13309 (LINTFLAGS): Update.
13310
9b710a42
PA
133112008-10-10 Pedro Alves <pedro@codesourcery.com>
13312
13313 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13314 whole argv from the last run, not just argv[0].
13315
5822d809
PA
133162008-09-08 Pedro Alves <pedro@codesourcery.com>
13317
13318 * regcache.c (new_register_cache): Return NULL if the register
13319 cache size isn't known yet.
13320 (free_register_cache): Avoid dereferencing a NULL regcache.
13321
74aac56f
DJ
133222008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13323
13324 * configure.srv: Merge MIPS and MIPS64.
13325
400b20f5
MR
133262008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13327
13328 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13329
677c5bb1
LM
133302008-08-18 Luis Machado <luisgpm@br.ibm.com>
13331
13332 * Makefile.in: Add required vsx dependencies.
13333
13334 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13335 Declare init_registers_powerpc_vsx32l.
13336 Declare init_registers_powerpc_vsx64l.
13337 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13338 (ppc_arch_setup): Check for VSX in hwcap.
13339 (ppc_fill_vsxregset): New function.
13340 (ppc_store_vsxregset): New function.
13341 Add new VSX entry in regset_info target_regsets.
13342
13343 * configure.srv: Add new VSX dependencies.
13344
a6f3e723
SL
133452008-08-12 Pedro Alves <pedro@codesourcery.com>
13346
13347 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13348 (remote_open): Set or clear transport_is_reliable.
13349 (putpkt_binary): Don't expect acks in noack mode.
13350 (getpkt): Don't send ack/nac in noack mode.
13351 * server.c (handle_general_set): Handle QStartNoAckMode.
13352 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13353 qSupported.
13354 (main): Reset noack_mode on every connection.
13355 * server.h (noack_mode): Declare.
13356
a417dc56
RW
133572008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13358
13359 * Makefile.in (GDBREPLAY_OBS): New variable.
13360 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13361
3221518c
UW
133622008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13363 Daniel Jacobowitz <dan@codesourcery.com>
13364
13365 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13366 (usr_store_inferior_registers): Likewise.
13367 (regsets_store_inferior_registers): Likewise.
13368
ec56be1b
PA
133692008-07-31 Rolf Jansen <rj@surtec.com>
13370 Pedro Alves <pedro@codesourcery.com>
13371
13372 * configure.ac: Check for memmem declaration.
13373 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13374 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13375 (disable_packet_qfThreadInfo): Unconditionally compile.
13376 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13377 * configure, config.in: Regenerate.
13378
2fe5e3ff
DE
133792008-07-28 Doug Kwan <dougkwan@google.com>
13380
13381 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13382 (linux_write_memory): Remove declaration of errno.
13383
836acd6d
UW
133842008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13385
13386 * linux-low.c (handle_extended_wait): Do not use "status"
13387 variable uninitialized.
13388
aeba519e
PA
133892008-07-07 Pedro Alves <pedro@codesourcery.com>
13390
13391 * server.c (handle_v_attach): Inhibit reporting dll changes.
13392
db42f210
PA
133932008-06-27 Pedro Alves <pedro@codesourcery.com>
13394
13395 * remote-utils.c (prepare_resume_reply): If requested, don't
13396 output "thread:TID" in the T stop reply.
13397
13398 * server.c (disable_packet_vCont, disable_packet_Tthread)
13399 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13400 (handle_query): If requested, disable support for qC, qfThreadInfo
13401 and qsThreadInfo.
13402 (handle_v_requests): If requested, disable support for vCont.
13403 (gdbserver_show_disableable): New.
13404 (main): Handle --disable-packet and --disable-packet=LIST.
13405
13406 * server.h (disable_packet_vCont, disable_packet_Tthread)
13407 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13408
8e4c5421
CD
134092008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13410
13411 * server.c (gdbserver_usage): Mention --version.
13412
6e23a804
DJ
134132008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13414
13415 * Makefile.in (gdbreplay.o): New rule.
13416
90aa6a40
JM
134172008-06-06 Joseph Myers <joseph@codesourcery.com>
13418
13419 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13420 message, not gdbserver.
13421
c16158bc 134222008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
13423 Nathan Sidwell <nathan@codesourcery.com>
13424 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
13425
13426 * acinclude.m4: Include ../../config/acx.m4.
13427 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13428 * configure, config.in: Regenerate.
13429 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13430 * server.c (gdbserver_version): Print PKGVERSION.
13431 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13432 (main): Adjust gdbserver_usage calls.
13433 * gdbreplay.c (version, host_name): Add declarations.
13434 (gdbreplay_version, gdbreplay_usage): New.
13435 (main): Accept --version and --help options.
13436
aeb75bf5
DJ
134372008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13438
13439 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13440 (arm_breakpoint_at): Handle Thumb.
13441 (the_low_target): Add comment.
13442
76b233dd
UW
134432008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13444
13445 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13446
08388c79
DE
134472008-05-09 Doug Evans <dje@google.com>
13448
a3c83fae
DE
13449 * server.h (decode_search_memory_packet): Declare.
13450 * remote-utils.c (decode_search_memory_packet): New fn.
13451 * server.c (handle_search_memory_1): New fn.
08388c79
DE
13452 (handle_search_memory): New fn.
13453 (handle_query): Process qSearch:memory packets.
13454
bb9c3d36
UW
134552008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13456
13457 * regcache.c (registers_length): Remove.
13458 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13459 full register packet.
13460 * regcache.h (registers_length): Remove prototype.
13461 * server.h (PBUFSIZ): Define to 16384.
13462
7284e1be
UW
134632008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13464
13465 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13466 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13467 powerpc-64l.o, and powerpc-altivec64l.o.
13468 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13469 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13470 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13471 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13472 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13473 to srv_xmlfiles.
13474
13475 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13476 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13477 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13478 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13479 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13480 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13481 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13482 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13483 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13484 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13485 (clean): Update.
13486
13487 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13488 (init_registers_powerpc_32l): ... this new prototype.
13489 (init_registers_powerpc_32): Remove, replace by ...
13490 (init_registers_powerpc_altivec32l): ... this new prototype.
13491 (init_registers_powerpc_e500): Remove, replace by ...
13492 (init_registers_powerpc_e500l): ... this new prototype.
13493 (init_registers_ppc64): Remove, replace by ...
13494 (init_registers_powerpc_64l): ... this new prototype.
13495 (init_registers_powerpc_64): Remove, replace by ...
13496 (init_registers_powerpc_altivec64l): ... this new prototype.
13497 (ppc_num_regs): Set to 73.
13498 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13499 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13500 (ppc_cannot_store_register): Handle orig_r3 and trap.
13501 (ppc_arch_setup): Update init_registers_... calls.
13502 (ppc_fill_gregset): Handle orig_r3 and trap.
13503
13504 * inferiors.c (clear_inferiors): Reset current_inferior.
13505
fdc59709
PB
135062008-04-23 Paolo Bonzini <bonzini@gnu.org>
13507
889bf7c5
PA
13508 * acinclude.m4: Add override.m4.
13509 * configure: Regenerate.
fdc59709 13510
c9b2f845
UW
135112008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13512
13513 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13514 initial call to init_register_ppc64.
13515
550512b8
UW
135162008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13517
43aaf8b6
PA
13518 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13519 single powerpc*-*-linux* case.
550512b8
UW
13520 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13521
b6430ec3
UW
135222008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13523
13524 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 13525 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
13526 from reg_xmlfiles.
13527 * linux-ppc-low.c: Include <elf.h>.
13528 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13529 (ppc_hwcap): New global variable.
13530 (ppc_regmap): Remove __SPE__ #ifdef sections.
13531 (ppc_regmap_e500): New global variable.
13532 (ppc_cannot_store_register): Update __SPE__ special case.
13533 (ppc_get_hwcap): New function.
13534 (ppc_arch_setup): Use it to determine whether inferior supports
13535 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13536 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13537 Do not access registers if target does not support AltiVec.
13538 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13539 Do not access registers if target does not support SPE.
13540 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13541
52fa2412
UW
135422008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13543
13544 * linux-low.c (disabled_regsets, num_regsets): New.
13545 (use_regsets_p): Delete.
13546 (linux_wait_for_process): Clear disabled_regsets.
13547 (regsets_fetch_inferior_registers): Check and set it.
13548 (regsets_store_inferior_registers): Likewise.
13549 (linux_fetch_registers, linux_store_registers): Do not use
13550 use_regsets_p.
13551 (initialize_low): Allocate disabled_regsets.
13552
e28b3332
DJ
135532008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13554
13555 * Makefile.in (LIBOBJS): New.
13556 (OBS): Use LIBOBJS.
13557 (memmem.o): New rule.
13558 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13559 * configure: Regenerated.
13560
4536995d
UW
135612008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13562
13563 * server.c (handle_query): Never return "unsupported" for
13564 qXfer:features:read queries.
13565
221c031f
UW
135662008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13567
13568 * server.c (get_features_xml): Fix inverted condition.
13569 (handle_query): Always support qXfer:feature:read.
13570
ccd213ac
DJ
135712008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13572
13573 * server.c (wrapper_argv): New.
13574 (start_inferior): Handle wrapper_argv. If set, expect an extra
13575 trap.
13576 (gdbserver_usage): Document --wrapper.
13577 (main): Parse --wrapper.
13578
6fe305f7
UW
135792008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13580
13581 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13582 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13583 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13584 (ppc_set_pc): Likewise.
13585 (ppc_arch_setup): New function.
13586 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13587 of collect_register.
889bf7c5 13588 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 13589
5b0a002e
UW
135902008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13591
13592 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13593 instead of linux-ppc64-low.o.
13594 * linux-ppc64-low.c: Remove file.
13595 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13596 (linux-ppc64-low.o): Remove rule.
13597
13598 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13599 (init_registers_powerpc_64): Likewise.
13600 (ppc_regmap): Conditionally define depending on __powerpc64__.
13601 (ppc_cannot_store_register): Do not special-case "fpscr" when
13602 compiled on __powerpc64__.
13603 (ppc_collect_ptrace_register): New function.
13604 (ppc_supply_ptrace_register): New function.
13605 (ppc_breakpoint): Change type to "unsigned int".
13606 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13607 (the_low_target): Conditionally provide initializers for the
889bf7c5 13608 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
13609 collect_ptrace_register and supply_ptrace_register members.
13610
9b4b61c8
UW
136112008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13612
13613 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13614 * server.c (gdbserver_xmltarget): Define.
13615 (get_features_xml): Use it to replace "target.xml" and arch_string.
13616
13617 * configure.srv: Remove srv_xmltarget. Add XML files that were
13618 mentioned there to srv_xmlfiles instead. Remove conditional tests
13619 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13620 srv_xmlfiles and srv_regobj to include all possible choices.
13621 * configure.ac (srv_xmltarget): Remove.
13622 (srv_xmlfiles): Do not add "target.xml".
13623 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13624 checks for supplementary target information.
13625 * configure: Regenerate.
13626 * Makefile.in (XML_TARGET): Remove.
13627 (target.xml): Remove rule.
13628 (clean): Do not clean up target.xml.
13629 (.PRECIOUS): Do not mention target.xml.
13630
13631 * target.h (struct target_ops): Remove arch_string member.
13632 * linux-low.c (linux_arch_string): Remove.
13633 (linux_target_ops): Remove arch_string initializer.
13634 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13635 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13636 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13637 * spu-low.c (spu_arch_string): Remove.
13638 (spu_target_ops): Remove arch_string initializer.
13639 * win32-low.c (win32_arch_string): Remove.
13640 (win32_target_ops): Remove arch_string initializer.
13641 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13642 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13643 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13644
ee1a7ae4
UW
136452008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13646
13647 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13648 by collect_ptrace_register and supply_ptrace_register hooks.
13649 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13650 instead of checking for the_low_target.left_pad_xfer.
13651 (usr_store_inferior_registers): Use collect_ptrace_register callback
13652 instead of checking for the_low_target.left_pad_xfer.
13653
13654 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13655 (s390_supply_ptrace_register): Likewise.
13656 (s390_fill_gregset): Call s390_collect_ptrace_register.
13657 (the_low_target): Update.
13658
13659 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13660 (ppc_supply_ptrace_register): Likewise.
13661 (the_low_target): Update.
13662
13663 * linux-i386-low.c (the_low_target): Update.
13664 * linux-x86-64-low.c (the_low_target): Update.
13665
d61ddec4
UW
136662008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13667
13668 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13669 reg-s390.o and reg-s390x.o.
13670
13671 * linux-low.c (new_inferior): New global variable.
13672 (linux_create_inferior, linux_attach): Set it.
13673 (linux_wait_for_process): Call the_low_target.arch_setup after the
13674 target has stopped for the first time.
13675 (initialize_low): Do not call the_low_target.arch_setup.
13676
13677 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13678 (s390_set_pc): Likewise.
13679 (s390_arch_setup): New function.
13680 (the_low_target): Use s390_arch_setup as arch_setup routine.
13681
13682 * regcache.c (realloc_register_cache): New function.
13683 (set_register_cache): Call it for each existing regcache.
13684
d05b4ac3
UW
136852008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13686
13687 * server.h (init_registers): Remove prototype.
13688
13689 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13690 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13691 instead of init_registers ().
13692 * linux-arm-low.c (init_registers_arm): Add prototype.
13693 (init_registers_arm_with_iwmmxt): Likewise.
13694 (the_low_target): Add initializer for arch_setup field.
13695 * linux-cris-low.c (init_registers_cris): Add prototype.
13696 (the_low_target): Add initializer for arch_setup field.
13697 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13698 (the_low_target): Add initializer for arch_setup field.
13699 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13700 (the_low_target): Add initializer for arch_setup field.
13701 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13702 (the_low_target): Add initializer for arch_setup field.
13703 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13704 (the_low_target): Add initializer for arch_setup field.
13705 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13706 (the_low_target): Add initializer for arch_setup field.
13707 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13708 (init_registers_mips64_linux): Likewise.
13709 (the_low_target): Add initializer for arch_setup field.
13710 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13711 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13712 (the_low_target): Add initializer for arch_setup field.
13713 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13714 (init_registers_powerpc_64): Likewise.
13715 (the_low_target): Add initializer for arch_setup field.
13716 * linux-s390-low.c (init_registers_s390): Add prototype.
13717 (init_registers_s390x): Likewise.
13718 (the_low_target): Add initializer for arch_setup field.
13719 * linux-sh-low.c (init_registers_sh): Add prototype.
13720 (the_low_target): Add initializer for arch_setup field.
13721 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13722 (the_low_target): Add initializer for arch_setup field.
13723 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13724 (the_low_target): Add initializer for arch_setup field.
13725
13726 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13727 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13728 instead of init_registers ().
13729 * win32-arm-low.c (init_registers_arm): Add prototype.
13730 (the_low_target): Add initializer for arch_setup field.
13731 * win32-i386-low.c (init_registers_i386): Add prototype.
13732 (the_low_target): Add initializer for arch_setup field.
13733
13734 * spu-low.c (init_registers_spu): Add prototype.
13735 (initialize_low): Call initialie_registers_spu () instead of
13736 initialize_registers ().
13737
fd96d250
PA
137382008-02-19 Pedro Alves <pedro@codesourcery.com>
13739
13740 * server.c (handle_v_requests): When handling the vRun and vAttach
13741 packets, if already debugging a process, don't kill it. Return an
13742 error instead.
13743
d41b6bb4
DJ
137442008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13745
13746 * server.c (handle_query): Correct length check.
13747
5ac588cf
PA
137482008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13749
13750 * win32-low.c (do_initial_child_stuff): Add process handle
13751 parameter. Set current_process_handle and current_process_id from the
13752 parameters. Clear globals.
13753 (win32_create_inferior): Don't set current_process_handle and
13754 current_process_id here. Instead pass them on the call to
13755 do_initial_child_stuff.
13756 (win32_attach): Likewise.
13757 (win32_clear_inferiors): New.
13758 (win32_kill): Don't close the current process handle or the
13759 current thread handle here. Instead call win32_clear_inferiors.
13760 (win32_detach): Don't open a new handle to the process. Call
13761 win32_clear_inferiors.
13762 (win32_join): Don't rely on current_process_handle; open a new
13763 handle using the process id.
13764 (win32_wait): Call win32_clear_inferiors when the inferior process
13765 has exited.
13766
ecd7ecbc
DJ
137672008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13768
13769 * server.c (monitor_show_help): Add "exit".
13770
1525d545
MG
137712008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13772
ecd7ecbc 13773 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
13774 (clean): Add reg-xtensa.c.
13775 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
13776 * configure.srv (xtensa*-*-linux*) New target.
13777 * linux-xtensa-low.c: New.
13778 * xtensa-xtregs.c: New.
1525d545 13779
59a016f0
PA
137802008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13781
13782 * hostio.c: Don't include errno.h.
13783 (errno_to_fileio_errno): Move to hostio-errno.
13784 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13785 error number outputting to the target->hostio_last_error callback.
13786 (hostio_packet_error): Use FILEIO_EINVAL directly.
13787 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13788 calls to hostio_error.
13789 * hostio-errno.c: New.
13790 * server.h (hostio_last_error_from_errno): Declare.
13791 * target.h (target_ops): Add hostio_last_error member.
13792 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13793 as hostio_last_error handler.
889bf7c5 13794 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
13795 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13796 (wince_hostio_last_error): New functions.
13797 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13798 as hostio_last_error handler.
13799 (win32_target_ops) [!_WIN32_WCE]: Register
13800 hostio_last_error_from_errno as hostio_last_error handler.
13801 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13802 (hostio-errno.o): New rule.
13803 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13804 * configure.srv (srv_hostio_err_objs): New variable. Default to
13805 hostio-errno.o.
13806 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13807 * configure: Regenerate.
13808
2d717e4f
DJ
138092008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13810
13811 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13812 (linux_kill, linux_detach): Clean up the process list.
13813 * remote-utils.c (remote_open): Improve port number parsing.
13814 (putpkt_binary, input_interrupt): Only send interrupts if the target
13815 is running.
13816 * server.c (extended_protocol): Make static.
13817 (attached): Define earlier.
13818 (exit_requested, response_needed, program_argv): New variables.
13819 (target_running): New.
13820 (start_inferior): Clear attached here.
13821 (attach_inferior): Set attached here.
13822 (require_running): Define.
13823 (handle_query): Use require_running and target_running. Implement
13824 "monitor exit".
13825 (handle_v_attach, handle_v_run): New.
13826 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13827 (gdbserver_usage): Update.
13828 (main): Redo argument parsing. Handle --debug and --multi. Handle
13829 --attach along with other options or after the port. Save
13830 program_argv. Support no initial program. Resynchronize
13831 communication with GDB after an error. Handle "monitor exit".
13832 Use require_running and target_running. Always allow the extended
13833 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13834 restart in extended mode.
13835 * README: Refer to the GDB manual. Update --attach usage.
13836
7407e2de
AS
138372007-12-20 Andreas Schwab <schwab@suse.de>
13838
13839 * linux-low.c (STACK_SIZE): Define.
13840 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13841 (linux_test_for_tracefork): Likewise.
13842
b65d95c5
DJ
138432007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13844
13845 * linux-low.c (linux_wait_for_event): Update messages. Do not
13846 reinsert auto-delete breakpoints.
13847 * mem-break.c (struct breakpoint): Change return type of handler to
13848 int.
13849 (set_breakpoint_at): Update handler type.
13850 (reinsert_breakpoint_handler): Return 1 instead of calling
13851 delete_breakpoint.
13852 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13853 setting a new one.
13854 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13855 * mem-break.h (set_breakpoint_at): Update handler type.
13856 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13857 * win32-low.c (auto_delete_breakpoint): New.
13858 (get_child_debug_event): Use it.
13859
4e799345
DJ
138602007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13861
13862 * configure.ac: Check for pread and pwrite.
13863 * hostio.c (handle_pread): Fall back to lseek and read.
13864 (handle_pwrite): Fall back to lseek and write.
13865 * config.in, configure: Regenerated.
13866
27524b67
DJ
138672007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13868
13869 * server.c (myresume): Add own_buf argument.
13870 (main): Update calls.
13871
a20d5e98
DJ
138722007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13873
13874 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13875 * remote-utils.c (remote_open): Do not call disable_async_io.
13876 (block_async_io): Delete.
13877 (unblock_async_io): Make static.
13878 (initialize_async_io): New.
13879 * server.c (handle_v_cont): Handle async I/O here.
13880 (myresume): Likewise. Move other common resume tasks here...
13881 (main): ... from here. Call initialize_async_io. Disable async
13882 I/O before the main loop.
13883 * server.h (initialize_async_io): Declare.
13884 (block_async_io, unblock_async_io): Delete prototypes.
13885 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13886
b79d787e
DJ
138872007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13888
13889 * remote-utils.c (readchar): Allow binary data in received messages.
13890
d97903b2
PA
138912007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13892
13893 * win32-low.c (attaching): New global.
13894 (win32_create_inferior): Clear the `attaching' global.
13895 (win32_attach): Set the `attaching' global.
13896 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13897 attaching. Only set a breakpoint at the entry point if not
13898 attaching.
13899
311de423
PA
139002007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13901
13902 * server.c (main): Don't report dll events on the initial
13903 connection on attaches.
13904
6c2d16d2
PA
139052007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13906
13907 * server.c (main): Relax numerical bases supported for the pid of
13908 the --attach command line argument.
13909
5ca906e6
PA
139102007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13911
13912 * win32-low.c (win32_attach): Call OpenProcess before
13913 DebugActiveProcess, not after. Add last error output to error
13914 call.
13915
9c6c8194
PA
139162007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13917
13918 * win32-low.c (win32_get_thread_context)
13919 (win32_set_thread_context): New functions.
13920 (thread_rec): Use win32_get_thread_context.
13921 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13922 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13923 field.
13924
4d5d1aaa
PA
139252007-12-03 Leo Zayas
13926 Pedro Alves <pedro_alves@portugalmail.pt>
13927
13928 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13929 global variables.
13930 (child_add_thread): Minor cleanup.
13931 (child_continue): Resume artificially suspended threads before
13932 calling ContinueDebugEvent.
13933 (suspend_one_thread): New.
13934 (fake_breakpoint_event): New.
13935 (get_child_debug_event): Change return type to int. Check here if
13936 gdb sent an interrupt request. If a soft interrupt was requested,
13937 fake a breakpoint event. Return 0 if there is no event to handle,
13938 and 1 otherwise.
13939 (win32_wait): Don't check here if gdb sent an interrupt request.
13940 Ensure there is a valid event to handle.
13941 (win32_request_interrupt): Add soft interruption method as last
13942 resort.
13943
c436e841
PA
139442007-12-03 Leo Zayas
13945 Pedro Alves <pedro_alves@portugalmail.pt>
13946
13947 * win32-low.h (win32_thread_info): Add descriptions to the
13948 structure members. Replace `suspend_count' counter by a
13949 `suspended' flag.
13950 * win32-low.c (thread_rec): Update condition of when to get the
13951 context from the inferior. Rely on ContextFlags being set if it
13952 has already been retrieved. Only suspend the inferior thread if
13953 we haven't already. Warn if that fails.
13954 (continue_one_thread): s/suspend_count/suspended/. Only call
13955 ResumeThread once. Warn if that fails.
13956
e7b5fa67
PA
139572007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13958
13959 * win32-low.c (win32_wait): Don't read from the inferior when it
13960 has already exited.
13961
a385171d
PA
139622007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13963
13964 * Makefile.in (win32_low_h): New variable.
13965 (win32-low.o): Add dependency on $(win32_low_h).
13966 (win32-arm-low.o, win32-i386-low.o): New rules.
13967
f80c84b3
DJ
139682007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13969
13970 * hostio.c: Correct copyright year.
13971
a6b151f1
DJ
139722007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13973
13974 * Makefile.in (OBS): Add hostio.o.
13975 (hostio.o): New rule.
13976 * server.h (handle_vFile): Declare.
13977 * hostio.c: New file.
13978 * server.c (handle_v_requests): Take packet_len and new_packet_len
13979 for binary packets. Call handle_vFile.
13980 (main): Update call to handle_v_requests.
13981
f9387fc3
DJ
139822007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13983
13984 * linux-low.c: Include <sched.h>.
13985
51c2684e
DJ
139862007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13987
13988 * linux-low.c (linux_tracefork_grandchild): New.
13989 (linux_tracefork_child): Use clone.
13990 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13991
75f83163
JB
139922007-10-31 Joel Brobecker <brobecker@adacore.com>
13993
13994 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13995
da5898ce
DJ
139962007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13997
13998 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13999
24a09b5f
DJ
140002007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14001
14002 * inferiors.c (change_inferior_id): Delete.
14003 (add_pid_to_list, pull_pid_from_list): New.
14004 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14005 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14006 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14007 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14008 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14009 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14010 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14011 (using_threads): Always set to 1.
14012 (handle_extended_wait): New.
14013 (add_process): Do not set TID.
14014 (linux_create_inferior): Set must_set_ptrace_flags.
14015 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14016 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14017 (linux_thread_alive): Rename TID argument to LWPID.
14018 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14019 (linux_wait_for_event): Do not use TID or check using_threads. Update
14020 call to dead_thread_notify. Call handle_extended_wait.
14021 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14022 (send_sigstop): Delete sigstop_sent.
14023 (wait_for_sigstop): Avoid TID.
14024 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14025 (linux_test_for_tracefork): New.
14026 (linux_lookup_signals): Use thread_db_active and
14027 linux_supports_tracefork_flag.
14028 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14029 * linux-low.h (get_process_thread): Avoid TID.
14030 (struct process_ifo): Move thread_known and tid to the end. Remove
14031 sigstop_sent.
14032 (linux_attach_lwp, thread_db_init): Update prototypes.
14033 * server.h (change_inferior_id): Delete prototype.
14034 (add_pid_to_list, pull_pid_from_list): New prototypes.
14035 * thread-db.c (thread_db_use_events): New.
14036 (find_first_thread): Rename to...
14037 (find_one_thread): ...this. Update callers and messages. Do not
14038 call fatal. Check thread_db_use_events. Do not call
14039 change_inferior_id or new_thread_notify.
14040 (maybe_attach_thread): Update. Do not call new_thread_notify.
14041 (thread_db_init): Set thread_db_use_events. Check use_events.
14042 * utils.c (fatal, warning): Correct message prefix.
14043
30ed0a8f
DJ
140442007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14045
14046 * Makefile.in (clean): Remove new files.
14047 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14048 (powerpc-64.o, powerpc-64.c): New rules.
14049 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14050 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14051 with SPE.
14052 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14053 SPE targets.
14054 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14055 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14056 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14057 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14058 (target_regsets): Add AltiVec and SPE register sets.
14059 * configure.ac: Check for AltiVec and SPE.
14060 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14061 (ppc_fill_vrregset, ppc_store_vrregset): New.
14062 (target_regsets): Add AltiVec register set.
14063 * configure: Regenerated.
14064
fd462a61
DJ
140652007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14066
14067 * linux-low.c (O_LARGEFILE): Define.
14068 (linux_read_memory): Use /proc/PID/mem.
14069 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14070 * configure, config.in: Regenerated.
14071
69f223ed
DJ
140722007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14073
14074 * linux-low.c (linux_wait_for_event): Do not pass signals while
14075 single-stepping.
14076
aec18585
PA
140772007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14078
14079 * win32-low.c (create_process): New.
14080 (win32_create_inferior): Use create_process instead of
14081 CreateProcess. If create_process failed retry appending an ".exe"
14082 suffix. Store the GetLastError result immediatelly after
14083 create_process calls and use it on the call to error.
14084
34d86ddd
PA
140852007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14086
14087 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14088
5a0e3bd0
JB
140892007-08-23 Joel Brobecker <brobecker@adacore.com>
14090
14091 * configure.ac: Switch license to GPLv3.
14092
f88c79e6
MS
140932007-08-01 Michael Snyder <msnyder@access-company.com>
14094
14095 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14096
6b3d9b83
PA
140972007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14098
14099 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14100 typedef.
14101 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14102 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14103 CloseToolhelp32Snapshot.
14104 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14105 CloseToolhelp32Snapshot.
14106
c588c53c
MS
141072007-07-27 Michael Snyder <michael.snyder@access-company.com>
14108
14109 * server.c (main): Check for inferior exit before main loop.
14110
aa0403d9
PA
141112007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14112
14113 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14114 instead of on tmp_desc.
14115
255e7678
DJ
141162007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14117 Daniel Jacobowitz <dan@codesourcery.com>
14118
14119 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14120 (add_thread): Minor cleanups.
14121 (clear_inferiors): Move lower in the file. Clear the DLL
14122 list.
14123 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14124 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14125 (xml_escape_text): New.
14126 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14127 for qSupported.
14128 (handle_v_cont): Report errors.
14129 (gdbserver_version): Update.
14130 (main): Correct size of own_buf. Do not report initial DLL events.
14131 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14132 (unloaded_dll, xml_escape_text): New.
14133 * win32-low.c (enum target_waitkind): Update comments.
14134 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14135 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14136 (win32_EnumProcessModules, win32_GetModuleInformation)
14137 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14138 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14139 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14140 (win32_Module32First, win32_Module32Next, load_toolhelp)
14141 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14142 (get_child_debug_event): Handle DLL events.
14143 (win32_wait): Likewise.
14144
0d37add9
DJ
141452007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14146
14147 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14148 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14149
45e2715e
PA
141502007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14151
14152 * win32-low.c (handle_output_debug_string): Ignore event if not
14153 waiting.
14154
c5674cf1
PA
141552007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14156
14157 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14158
2bbe3cc1
DJ
141592007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14160
14161 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14162
ae13219e
DJ
141632007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14164
14165 * inferiors.c (change_inferior_id): Add comment.
14166 * linux-low.c (check_removed_breakpoint): Add an early
14167 prototype. Improve debug output.
14168 (linux_attach): Doc update.
14169 (linux_detach_one_process, linux_detach): Clean up before releasing
14170 each process.
14171 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14172 * linux-low.h (struct process_info): Doc improvement.
14173 * mem-break.c (delete_all_breakpoints): New.
14174 * mem-break.h (delete_all_breakpoints): New prototype.
14175 * thread-db.c (find_first_thread): New.
14176 (thread_db_create_event): Call it instead of
14177 thread_db_find_new_threads. Clean up unused variables.
14178 (maybe_attach_thread): Remove first thread handling.
14179 (thread_db_find_new_threads): Use find_first_thread.
14180 (thread_db_get_tls_address): Likewise.
14181
4105de34
DJ
141822007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14183
14184 * thread-db.c (thread_db_find_new_threads): Add prototype.
14185 (thread_db_create_event): Check for the main thread before adding
14186 a new thread.
14187 (maybe_attach_thread): Only enable event reporting if TID == 0.
14188 (thread_db_get_tls_address): Check for new threads.
14189
2b876972
DJ
141902007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14191
14192 * linux-low.c (linux_create_inferior): Try execv before execvp.
14193 * spu-low.c (spu_create_inferior): Likewise.
14194
7a245884
DJ
141952007-06-13 Mike Frysinger <vapier@gentoo.org>
14196
14197 * linux-low.c (linux_create_inferior): Change execv to execvp.
14198 * spu-low.c (spu_create_inferior): Likewies.
14199
117ce543
DJ
142002007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14201
14202 * Makefile.in (clean): Clean new files instead of deleted ones.
14203 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14204 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14205 rules.
14206 * configure.srv: Specify XML files and new regformats for MIPS and
14207 MIPS64 GNU/Linux.
14208 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14209 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14210 an entry for the restart register.
14211 (mips_cannot_fetch_register, mips_cannot_store_register)
14212 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14213 register names to match the XML descriptions.
14214 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14215 restart register instead of $0.
14216
0e7f50da
UW
142172007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14218 Markus Deuling <deuling@de.ibm.com>
14219
14220 * remote-utils.c (decode_xfer_write): New function.
14221 * server.h (decode_xfer_write): Add prototype.
14222 * server.c (handle_query): Add PACKET_LEN argument. Support
14223 qXfer:spu:read and qXfer:spu:write packets.
14224 (main): Pass packet_len to handle_query.
14225 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14226 * target.h (target_ops): Add qxfer_spu.
14227
374c1d38
UW
142282007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14229
14230 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14231 accessing non-seekable spufs files.
14232
bb63802a
UW
142332007-05-16 Markus Deuling <deuling@de.ibm.com>
14234
889bf7c5 14235 * server.c (handle_query): Add reply for qC packet.
bb63802a 14236
7390519e
PA
142372007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14238 Leo Zayas <lerele@champenstudios@com>
14239
14240 * server.h (check_remote_input_interrupt_request): New function.
14241 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14242 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14243 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14244 (check_remote_input_interrupt_request): New function.
14245 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 14246 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
14247 winapi_GenerateConsoleCtrlEvent): New typedefs.
14248 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14249 to 250 ms.
14250 (win32_wait): Check for remote interrupt request
14251 with check_remote_input_interrupt_request.
14252 (win32_request_interrupt): New function.
14253 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14254
34b34921
PA
142552007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14256
14257 * win32-low.c (debug_registers_changed,
14258 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14259 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14260 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14261 (thread_rec): Get context using the low target.
14262 (child_add_thread): Call thread_added on the low target,
14263 which does the same thing.
14264 (regptr): Delete.
14265 (do_initial_child_stuff): Remove debug registers references.
14266 Set context using the low target. Resume threads after
14267 setting the contexts.
14268 (child_continue): Remove dead variable. Remove debug
14269 registers references.
14270 (child_fetch_inferior_registers): Go through the low target.
14271 (do_child_store_inferior_registers): Remove.
14272 (child_store_inferior_registers): Go through the low target.
14273 (win32_resume): Remove debug registers references.
14274 Set context using the low target.
14275 (handle_exception): Change return type to void. Don't record
14276 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14277 first chance exception.
889bf7c5 14278 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
14279 goto loop. Always return after waiting for debug event.
14280 (win32_wait): Convert to switch statement. Handle spurious
14281 events.
14282
14283 * win32-i386-low.c (debug_registers_changed,
14284 debug_registers_used): New.
14285 (initial_stuff): Rename to ...
14286 (i386_initial_stuff): ... this. Clear debug registers
14287 state variables.
14288 (store_debug_registers): Delete.
14289 (i386_get_thread_context): New.
14290 (load_debug_registers): Delete.
14291 (i386_set_thread_context): New.
14292 (i386_thread_added): New.
14293 (single_step): Rename to ...
14294 (i386_single_step): ... this.
14295 (do_fetch_inferior_registers): Rename to ...
14296 (i386_fetch_inferior_register): ... this.
14297 (i386_store_inferior_register): New.
14298 (the_low_target): Adapt to new interface.
14299
14300 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14301 (arm_get_thread_context): New.
14302 (arm_set_thread_context): New.
14303 (regptr): New.
14304 (do_fetch_inferior_registers): Rename to ...
14305 (arm_fetch_inferior_register): ... this.
14306 (arm_store_inferior_register): New.
14307 (arm_wince_breakpoint): Reimplement as unsigned long.
14308 (arm_wince_breakpoint_len): Define.
14309 (the_low_target): Adapt to new interface.
14310
14311 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14312 load_debug_registers. Add get_thread_context, set_thread_context,
14313 thread_added and store_inferior_register. Rename
14314 fetch_inferior_registers to fetch_inferior_register.
14315 (regptr): Remove declaration.
14316
dd6953e1
PA
143172007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14318
14319 * linux-low.c (linux_detach): Change return type to int. Return 0.
14320 * spu-low.c (spu_detach): Likewise.
14321
444d6139
PA
143222007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14323
14324 * target.h (target_ops): Change return type of detach to int.
14325 Add join.
14326 (join_inferior): New.
14327 * server.c (main): Don't skip detach support on mingw32.
14328 If the inferior doesn't support detaching return error.
14329 Call join_inferior instead of using waitpid.
14330 * linux-low.c (linux_join): New.
14331 (linux_target_op): Add linux_join.
14332 * spu-low.c (spu_join): New.
14333 (spu_target_ops): Add spu_join.
14334 * win32-low.c (win32_detach): Adapt to new interface.
14335 Reopen current_process_handle before detaching. Issue a child
14336 resume before detaching.
14337 (win32_join): New.
14338 (win32_target_op): Add win32_join.
14339
1d5315fe
PA
143402007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14341
14342 * win32-low.c (win32-attach): Fix return value.
14343 * target.h (target_ops): Describe ATTACH return values.
14344
bf914831
PA
143452007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14346
14347 * win32-low.c (GETPROCADDRESS): Define.
14348 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14349 (winapi_DebugSetProcessKillOnExit): Likewise.
14350 (win32_create_inferior): Force usage of ansi CreateProcessA.
14351 (win32_attach): Use GETPROCADDRESS.
14352 (win32_detach): Likewise.
14353
f72f3e60
PA
143542007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14355
14356 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14357
ed50f18f
PA
143582007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14359
14360 * win32-low.c: Commit leftover changes from 2007-03-29.
14361
0c2ead7e
DJ
143622007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14363
14364 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14365 fields short instead of int. Add explicit padding.
14366 (i387_cache_to_fsave): Remove unnecessary casts.
14367 (i387_fsave_to_cache): Doc fix.
14368 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14369
73725ff3
DJ
143702007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14371
14372 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14373 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14374
d99f33d8
PA
143752007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14376
14377 * configure.srv (arm*-*-mingw32ce*): Move near the other
14378 arm targets.
14379
68070c10
PA
143802007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14381
2482afc6 14382 * configure.ac: Add errno checking.
68070c10
PA
14383 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14384 sys/file.h and malloc.h.
14385 (AC_CHECK_DECLS): Add perror.
14386 (srv_mingwce): Handle.
2482afc6 14387 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
14388 win32-i386-low.o to srv_tgtobj.
14389 (i[34567]86-*-mingw*): Likewise.
14390 (arm*-*-mingw32ce*): Add case.
14391 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14392 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14393 [__MINGW32CE__] (strerror): New function.
14394 [__MINGW32CE__] (errno): Define to GetLastError.
14395 [__MINGW32CE__] (COUNTOF): New macro.
14396 (remote_open): Remove extra close call.
14397 * mem-break.c (delete_breakpoint_at): New function.
14398 * mem-break.h (delete_breakpoint_at): Declare.
14399 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14400 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14401 [USE_WIN32API] (read, write): Add char* casts.
14402 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14403 * server.h: Include wincecompat.h on Windows CE.
14404 [HAVE_ERRNO_H]: Check.
14405 (perror): Declare if not declared.
14406 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14407 (perror_with_name): Remove errno declaration.
14408 * wincecompat.h: New.
14409 * wincecompat.c: New.
14410 * win32-low.h: New.
14411 * win32-arm-low.c: New.
14412 * win32-i386-low.c: New.
14413 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14414 (OUTMSG2): Make it safe.
14415 (_T): New macro.
14416 (COUNTOF): New macro.
14417 (NUM_REGS): Get it from the low target.
14418 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14419 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14420 (thread_rec): Let low target handle debug registers.
14421 (child_add_thread): Likewise.
14422 (child_init_thread_list): Likewise.
14423 (continue_one_thread): Likewise.
14424 (regptr): New.
14425 (do_child_fetch_inferior_registers): Move to ...
14426 * win32-i386-low.c: ... here, and rename to ...
14427 (do_fetch_inferior_registers): ... this.
889bf7c5 14428 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
14429 Go through the low target.
14430 (do_child_store_inferior_registers): Use regptr.
14431 (strwinerror): New function.
14432 (win32_create_inferior): Handle Windows CE.
14433 Use strwinerror instead of strerror on Windows error
14434 codes. Add program to the error output.
14435 Don't close the main thread handle on Windows CE.
14436 (win32_attach): Use coredll.dll on Windows CE.
14437 (win32_kill): Close current process and current
14438 thread handles.
14439 (win32_detach): Use coredll.dll on Windows CE.
14440 (win32_resume): Let low target handle debug registers, and
14441 step request.
14442 (handle_exception): Add/Remove initial breakpoint. Avoid
14443 non-existant WSTOPSIG on Windows CE.
14444 (win32_read_inferior_memory): Cast to remove warning.
14445 (win32_arch_string): Go through the low target.
14446 (initialize_low): Call set_breakpoint_data with the low
14447 target's breakpoint.
14448 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14449 FOP_REGNUM, mappings): Move to ...
14450 * win32-i386-low.c: ... here.
14451 * win32-low.c (win32_thread_info): Move to ...
14452 * win32-low.h: ... here.
14453 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14454 win32-arm-low.c and wincecompat.c.
14455 (all:): Add $EXEEXT.
14456 (install-only:): Likewise.
14457 (gdbserver:): Likewise.
14458 (gdbreplay:): Likewise.
14459 * config.in: Regenerate.
14460 * configure: Regenerate.
14461
41093d81
PA
144622007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14463
14464 * win32-low.c: Rename typedef thread_info to
14465 win32_thread_info throughout.
14466
544afa54
PA
144672007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14468
14469 * win32-i386-low.c: Rename to ...
14470 * win32-low.c: ... this.
14471 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14472 * Makefile.in: Likewise.
14473
bce7165d
PA
144742007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14475
14476 * remote-utils.c (monitor_output): Constify msg parameter.
14477 * server.h (monitor_output): Likewise.
14478 * win32-i386-low.c (handle_output_debug_string): New.
14479 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14480 handle_output_debug_string.
14481 (get_child_debug_event): Likewise.
14482
506c7aa0
DJ
144832007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14484
14485 * server.c (main): Correct strtoul check.
14486
42c81e2a
DJ
144872007-03-27 Jon Ringle <jon@ringle.org>
14488
14489 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14490
9453113a
DJ
144912007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14492
14493 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14494
64a69107
DJ
144952007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14496
14497 * terminal.h: Check HAVE_SGTTY_H.
14498
144992007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
14500
14501 * remote-utils.c (remote_open): Print out the assigned port number.
14502
c74d0ad8
DJ
145032007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14504
14505 * remote-utils.c (monitor_output): New function.
14506 * server.c (debug_threads): Define here.
14507 (monitor_show_help): New function.
14508 (handle_query): Handle qRcmd.
14509 (main): Do not handle 'd' packet.
14510 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14511 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14512 of debug_threads.
14513
de7c3b4a
PA
145142007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14515
14516 * Makefile.in (EXEEXT): New.
14517 (clean): Use $(EXEEXT).
14518
ef57601b
PA
145192007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14520
14521 * target.h (target_ops): Rename send_signal to request_interrupt,
14522 and remove enum target_signal parameter.
14523 * linux-low.c (linux_request_interrupt): Rename from
14524 linux_send_signal, and always send SIGINT.
14525 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14526 and always send SIGINT.
14527 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14528 of send_signal.
14529 (input_interrupt): Likewise.
14530
820f2bda
PA
145312007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14532
14533 * server.c (get_features_xml): Check if target implemented
14534 arch_string.
14535 * win32-i386-low.c (win32_arch_string): New.
14536 (win32_target_ops): Add win32_arch_string as arch_string member.
14537
ab39bf24
UW
145382007-02-22 Markus Deuling <deuling@de.ibm.com>
14539
14540 * spu-low.c (spu_arch_string): New.
14541 (spu_target_ops): Add spu_arch_string.
14542
61ff6e04
DJ
145432007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14544
14545 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14546 * configure.ac: Do not check for terminal.h.
14547 * configure, config.in: Regenerated.
14548
fb1e4ffc
DJ
145492007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14550
14551 * Makefile.in (OBS): Add $(XML_BUILTIN).
14552 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14553 (clean): Update.
14554 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14555 (arm-with-iwmmxt.c): New.
14556 * config.in, configure: Regenerate.
14557 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14558 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14559 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14560 (arm*-*-linux*): Add iWMMXt and regset support.
14561 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14562 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14563 (arm_store_wmmxregset, target_regsets): New.
14564 * server.c (get_features_xml): Take annex argument. Check builtin
14565 XML documents.
14566 (handle_query): Handle multiple annexes.
14567
0f48aa01
DJ
145682007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14569
14570 * remote-utils.c [USE_WIN32API] (read, write): Define.
14571 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14572 write.
14573
23181151
DJ
145742007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14575
14576 * linux-i386-low.c (the_low_target): Set arch_string.
14577 * linux-x86-64-low.c (the_low_target): Likewise.
14578 * linux-low.c (linux_arch_string): New.
14579 (linux_target_ops): Add it.
14580 * linux-low.h (struct linux_target_ops): Add arch_string.
14581 * server.c (write_qxfer_response): Use const void * for DATA.
14582 (get_features_xml): New.
14583 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14584 * target.h (struct target_ops): Add arch_string method.
14585
9d606399
DJ
145862007-01-03 Denis Pilat <denis.pilat@st.com>
14587 Daniel Jacobowitz <dan@codesourcery.com>
14588
14589 * linux-low.c (linux_kill): Handle being called with no threads.
14590 * win32-i386-low.c (win32_kill): Likewise.
14591 (get_child_debug_event): Clear current_process_handle.
14592
145932006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
14594 Daniel Jacobowitz <dan@codesourcery.com>
14595
14596 * remote-utils.c (remote_open): Check the type of specified
14597 serial port devices before opening them.
14598 * server.c (main): Kill the inferior if an error occurs during
14599 the first remote_open.
14600
a5e13d24
DJ
146012006-12-05 Markus Deuling <deuling@de.ibm.com>
14602
14603 * README: Update supported targets.
14604
186947f7
DJ
146052006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14606
14607 * Makefile.in (clean): Remove reg-mips64.c.
14608 (reg-mips64.c, reg-mips64.o): New rules.
14609 * configure.srv: Handle mips64. Include regset support for mips.
14610 * linux-mips-low.c (union mips_register): New.
14611 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14612 (mips_breakpoint, mips_breakpoint_at): Use int.
14613 (mips_collect_register, mips_supply_register)
14614 (mips_collect_register_32bit, mips_supply_register_32bit)
14615 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14616 (mips_store_fpregset, target_regsets): New.
14617 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14618
a13e2c95
UW
146192006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14620
14621 * configure.srv: Add target "spu*-*-*".
14622 * Makefile.in (clean): Remove reg-spu.c.
14623 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14624 * spu-low.c: New file.
14625
cb7283db
DJ
146262006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14627
14628 * configure.ac: Correct td_thr_tls_get_addr test.
14629 * configure: Regenerated.
14630
89be2091
DJ
146312006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14632
14633 * linux-low.c (linux_wait_for_event): Reformat. Use the
14634 pass_signals array.
14635 * remote-utils.c (decode_address_to_semicolon): New.
14636 * server.c (pass_signals, handle_general_set): New.
14637 (handle_query): Mention QPassSignals for qSupported.
14638 (main): Call handle_general_set.
14639 * server.h (pass_signals, decode_address_to_semicolon): New.
14640
000ef4f0
DJ
146412006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14642
14643 * server.c (handle_query): Correct error handling for read_auxv.
14644
b7149293
UW
146452005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14646
14647 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14648 and srv_linux_thread_db to yes.
14649 * linux-s390-low.c (s390_fill_gregset): New function.
14650 (target_regsets): Define data structure.
14651
dae5f5cf
DJ
146522006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14653
14654 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14655 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14656 * config.in, configure: Regenerated.
14657 * inferiors.c (gdb_id_to_thread): New function.
14658 (gdb_id_to_thread_id): Use it.
14659 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14660 * linux-low.h (struct process_info): Add th member.
14661 (thread_db_get_tls_address): New prototype.
14662 * remote-utils.c (decode_address): Make non-static.
14663 * server.c (handle_query): Handle qGetTLSAddr.
14664 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14665 * target.h (struct target_ops): Add get_tls_address.
14666 * thread-db.c (maybe_attach_thread): Save the thread handle.
14667 (thread_db_get_tls_address): New.
14668
32ca6d61
DJ
146692006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14670
14671 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14672 (linux_resume_one_process): Take a siginfo_t *. Update all
14673 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14674 (struct pending_signals): Add a siginfo_t.
14675 (linux_wait_for_process): Always set last_status.
14676 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14677 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14678 * linux-low.h (struct process_info): Add last_status.
14679
5ffff7c1
DJ
146802006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14681
14682 * remote-utils.c (try_rle): New function.
14683 (putpkt_binary): Use it.
14684
8695c747
DJ
146852006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14686
14687 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14688 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14689 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14690 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14691 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14692 point registers.
14693
290fadea
RS
146942006-08-08 Richard Sandiford <richard@codesourcery.com>
14695
14696 * server.c (terminal_fd): New variable.
14697 (old_foreground_pgrp): Likewise.
14698 (restore_old_foreground_pgrp): New function.
14699 (start_inferior): Record the terminal file descriptor in terminal_fd
14700 and its original foreground group in old_foreground_pgrp. Register
14701 restore_old_foreground_pgrp with atexit().
14702
9f2e1e63
DJ
147032006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14704
14705 * server.c (handle_query): Correct qPart to qXfer.
14706
b80864fb
DJ
147072006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14708
14709 * configure.ac: Check for more headers which are missing on
14710 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14711 * configure.srv: Add Cygwin and mingw32.
14712 * remote-utils.c: Don't include headers unconditionally which
14713 are missing on mingw32. Include <winsock.h> for mingw32.
14714 (remote_open): Adjust for mingw32 support. Flush
14715 standard error after writing to it.
14716 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14717 (unblock_async_io, enable_async_io, disable_async_io)
14718 (readchar, getpkt): Update for Winsock support.
14719 (prepare_resume_reply): Expect a protocol signal number.
14720 * server.c: Disable <sys/wait.h> on mingw32.
14721 (start_inferior): Adjust for mingw32 support. Flush
14722 standard error after writing to it.
14723 (attach_inferior): Likewise. Use protocol signal
14724 numbers.
14725 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14726 and names.
14727 * win32-i386-low.c: New file.
14728 * Makefile.in (XM_CLIBS): Set.
14729 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14730 (win32-i386-low.o): New dependency rule.
14731 * linux-low.c (linux_wait): Use target signal numbers.
14732 * target.h (struct target_ops): Doc fix.
14733 * server.h (target_signal_to_name): New prototype.
14734 * gdbreplay.c: Don't include headers unconditionally which
14735 are missing on mingw32. Include <winsock.h> for mingw32.
14736 (remote_close, remote_open): Adjust for Winsock support.
14737 * configure, config.in: Regenerated.
14738
0876f84a
DJ
147392006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14740
14741 * server.c (decode_xfer_read, write_qxfer_response): New.
14742 (handle_query): Take a packet length argument. Handle
14743 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14744 the qSupported response.
14745 (main): Update call to handle_query.
14746
01f9e8fa
DJ
147472006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14748
14749 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14750 (putpkt_binary): Renamed from putpkt and adjusted for binary
14751 data.
14752 (putpkt): New wrapper for putpkt_binary.
14753 (readchar): Don't mask off the high bit.
14754 (decode_X_packet): New function.
14755 * server.c (main): Call putpkt_binary if a handler sets the packet
14756 length. Save the length of the incoming packet. Handle 'X'.
14757 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14758
be2a5f71
DJ
147592006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14760
14761 * server.c (handle_query): Handle qSupported.
14762
ea025f5f
DJ
147632006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14764
14765 * remote-utils.c (all_symbols_looked_up): New variable.
14766 (look_up_one_symbol): Check it.
14767 * server.h (look_up_one_symbol): New declaration.
14768 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14769
9308fc88
DJ
147702006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14771
14772 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 14773 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
14774 (PTRACE_GET_THREAD_AREA): Define.
14775 (ps_get_thread_area): New function.
14776
52fb6437
NS
147772006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14778
14779 * configure.srv (m68k*-*-uclinux*): New target.
14780 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14781 (linux_resume_one_process): Remove extraneous cast.
14782 (linux_read_offsets): New.
14783 (linux_target_op): Add linux_read_offsets on mmuless systems.
14784 * server.c (handle_query): Add qOffsets logic.
14785 * target.h (struct target_ops): Add read_offsets.
14786
21b0f40c
DJ
147872006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14788
14789 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14790 (PTRACE_GET_THREAD_AREA): Define.
14791 (ps_get_thread_area): New function.
14792 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14793 (linux-x86-64-low.o): Update.
14794
0050a760
DJ
147952006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14796
14797 * configure.ac: Remove checks for prfpregset_t.
14798 * gdb_proc_service.h: New file.
14799 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14800 new "gdb_proc_service.h".
14801 * proc-service.c: Likewise.
14802 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14803 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14804 * Makefile.in (gdb_proc_service_h): Updated.
14805 * configure, config.in: Regenerated.
14806
b92a518e
DJ
148072006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14808
14809 * remote-utils.c (prepare_resume_reply): Move declaration
14810 of gdb_id_from_wait to the top of the block.
14811
545587ee
DJ
148122006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14813
14814 * linux-low.c (regsets_store_inferior_registers): Read the regset
14815 from the target before filling it.
14816
9db87ebd
DJ
148172006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14818
14819 * server.c (attach_inferior): Return SIGTRAP for a successful
14820 attach.
14821
dd24457d
DJ
148222006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14823
14824 * Makefile.in (OBS): Add version.o.
14825 (STAGESTUFF): Delete.
14826 (version.o): Add dependencies.
14827 (version.c): Replace rule.
14828 (clean): Remove version.c.
14829 * server.c (gdbserver_version): New.
14830 (gdbserver_usage): Use printf.
14831 (main): Handle --version and --help.
14832 * server.h (version, host_name): Add declarations.
14833
6f0f660e
EZ
148342005-12-23 Eli Zaretskii <eliz@gnu.org>
14835
889bf7c5
PA
14836 * linux-arm-low.c:
14837 * linux-arm-low.c:
14838 * inferiors.c:
14839 * i387-fp.h:
14840 * i387-fp.c:
14841 * gdbreplay.c:
14842 * regcache.c:
14843 * proc-service.c:
14844 * mem-break.h:
14845 * mem-break.c:
14846 * linux-x86-64-low.c:
14847 * linux-sh-low.c:
14848 * linux-s390-low.c:
14849 * linux-ppc64-low.c:
14850 * linux-ppc-low.c:
14851 * linux-mips-low.c:
14852 * linux-m68k-low.c:
14853 * linux-m32r-low.c:
14854 * linux-low.h:
14855 * linux-low.c:
14856 * linux-ia64-low.c:
14857 * linux-i386-low.c:
14858 * linux-crisv32-low.c:
14859 * thread-db.c:
14860 * terminal.h:
14861 * target.h:
14862 * target.c:
14863 * server.h:
14864 * server.c:
14865 * remote-utils.c:
14866 * regcache.h:
14867 * utils.c:
14868 * Makefile.in:
14869 * configure.ac:
6f0f660e
EZ
14870 * gdbserver.1: Add (C) after Copyright. Update the FSF
14871 address.
14872
9d1fb177
DJ
148732005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14874
14875 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14876 (arm_breakpoint_at): Recognize both breakpoints.
14877 (the_low_target): Use the correct breakpoint instruction.
14878
011a70c2
DJ
148792005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14880
14881 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14882 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14883 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14884 (the_low_target): Update.
14885
7fb85e41
AS
148862005-10-25 Andreas Schwab <schwab@suse.de>
14887
14888 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14889
14890 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14891 (ia64_num_regs): Reduce to 462.
14892
3db0444b
DJ
148932005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14894
14895 * acinclude.m4: Correct quoting.
14896 * aclocal.m4: Regenerated.
14897
14898 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14899 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14900 (thread_db_init): Call thread_db_err_str.
14901 * configure.ac: Check for TD_VERSION.
14902 * config.in, configure: Regenerated.
14903
bee0189a
DJ
149042005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14905
14906 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14907
e9d25b98
DJ
149082005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14909
14910 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14911 is not available. Define HAVE_PTRACE_GETREGS if it is.
14912 * config.in, configure: Regenerated.
14913 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14914 * linux-i386-low.c, linux-m68k-low.c: Update to use
14915 HAVE_PTRACE_GETREGS.
14916 * linux-low.c (regsets_fetch_inferior_registers)
14917 (regsets_store_inferior_registers): Only return 0 if we processed
14918 GENERAL_REGS.
14919 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14920 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14921
a06660f7
DJ
149222005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14923
14924 * inferiors.c (struct thread_info): Add gdb_id.
14925 (add_thread): Add gdb_id argument.
14926 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14927 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14928 calls to add_thread.
14929 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14930 * server.c (handle_query): Use thread_to_gdb_id.
14931 (handle_v_cont, main): Use gdb_id_to_thread_id.
14932 * server.h (add_thread): Update prototype.
14933 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14934 prototypes.
14935
5a1f5858
DJ
149362005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14937
14938 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14939 left-padded registers.
14940 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14941 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14942
e122f1f5
SE
149432005-07-01 Steve Ellcey <sje@cup.hp.com>
14944
14945 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14946 * configure: Regenerate.
14947 * config.in: Regenerate.
14948 * server.h (NEED_DECLARATION_STRERROR):
14949 Replace with !HAVE_DECL_STRERROR.
14950
d592fa2f
DJ
149512005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14952
14953 * linux-low.c (linux_wait, linux_send_signal): Don't test
14954 an unsigned long variable for > 0 if it could be MAX_ULONG.
14955 * server.c (myresume): Likewise.
14956 * target.c (set_desired_inferior): Likewise.
14957
ccbd4912
MK
149582005-06-13 Mark Kettenis <kettenis@gnu.org>
14959
14960 * configure.ac: Simplify and improve check for socklen_t.
14961 * configure, config.in: Regenerate.
14962
f450004a
DJ
149632005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14964
14965 * acconfig.h: Remove.
14966 * configure.ac: Add a test for socklen_t. Use three-argument
14967 AC_DEFINE throughout.
14968 * config.in: Regenerated using autoheader 2.59.
14969 * configure: Regenerated.
14970
14971 * gdbreplay.c (socklen_t): Provide a default.
14972 (remote_open): Use socklen_t.
14973 * remote-utils.c (socklen_t): Provide a default.
14974 (remote_open): Use socklen_t.
14975 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14976 unsigned char.
14977
14978 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14979 char for buffers.
14980 * linux-low.c (linux_read_memory, linux_write_memory)
14981 (linux_read_auxv): Likewise.
14982 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14983 (check_mem_write): Likewise.
14984 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14985 Likewise.
14986 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14987 (registers_from_string, register_data): Likewise.
14988 * server.c (handle_query, main): Likewise.
14989 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14990 (decode_M_packet): Likewise.
14991 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14992 * target.h (struct target_ops): Update read_memory, write_memory,
14993 and read_auxv.
14994 (read_inferior_memory, write_inferior_memory): Update.
14995 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14996 to unsigned char *.
14997 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14998 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14999 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15000 linux-s390-low.c, linux-sh-low.c: Update for changes in
15001 read_inferior_memory and the_low_target->breakpoint.
15002
eee84df1
DJ
150032005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15004
15005 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15006 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15007 * configure.srv: Add powerpc64-*-linux*.
15008 * linux-ppc64-low.c: New file.
15009
45b134e5
OF
150102005-05-23 Orjan Friberg <orjanf@axis.com>
15011
15012 * linux-cris-low.c: New file with support for CRIS.
15013 * linux-crisv32-low.c: Ditto for CRISv32.
15014 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15015 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 15016 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
15017 reg-crisv32.o, and reg-crisv32.c to make rules.
15018 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15019 recognized targets.
15020
48d93c75
UW
150212005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15022
15023 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15024 of sizeof (PTRACE_XFER_TYPE).
15025 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15026
e013ee27
OF
150272005-05-12 Orjan Friberg <orjanf@axis.com>
15028
889bf7c5 15029 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
15030 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15031 pointers for hardware watchpoint support.
15032 * linux-low.h (struct linux_target_ops): Ditto.
15033 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15034 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15035 to linux_target_ops.
15036 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15037 reply packet.
15038 * server.c (main): Recognize 'Z' and 'z' packets.
15039
b0ded00b
UW
150402005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15041
15042 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15043 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15044 (the_low_target): Add new members.
15045
8643e2ad
DJ
150462005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15047
15048 * proc-service.c (ps_lgetregs): Search all_processes instead of
15049 all_threads.
15050
fc620387
DJ
150512005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15052
15053 * server.c (start_inferior): Change return type to int.
15054 (attach_inferior): Change sigptr to int *.
15055 (handle_v_cont, handle_v_requests): Change signal to int *.
15056 (main): Change signal to int.
15057
150582005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
15059
15060 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15061 * configure.srv: Add m32r*-*-linux*.
15062 * linux-m32r-low.c: New file.
15063
e0e76420
DJ
150642005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15065
15066 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15067
a1928bad
DJ
150682005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15069
15070 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15071 Take unsigned long arguments for PIDs.
15072 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15073 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15074 (wait_for_sigstop, linux_resume_one_process)
15075 (regsets_fetch_inferior_registers, linux_send_signal)
15076 (linux_read_auxv): Likewise. Update the types of variables holding
15077 PIDs. Update format string specifiers.
15078 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15079 * remote-utils.c (prepare_resume_reply): Likewise.
15080 * server.c (cont_thread, general_thread, step_thread)
15081 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15082 unsigned long.
15083 (handle_query): Update format specifiers.
15084 (handle_v_cont, main): Use strtoul for thread IDs.
15085 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15086 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15087 (general_thread, step_thread, thread_from_wait)
15088 (old_thread_from_wait): Update.
15089 * target.h (struct thread_resume): Use unsigned long for THREAD.
15090 (struct target_ops): Use unsigned long for arguments to attach and
15091 thread_alive.
15092
dcdb98d2
DJ
150932005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15094
15095 * acinclude.m4: Include bfd/bfd.m4 directly.
15096 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15097 <agriffis@toolchain.org>.
15098 * aclocal.m4, configure: Regenerated.
15099
bec39cab
AC
151002005-01-07 Andrew Cagney <cagney@gnu.org>
15101
15102 * configure.ac: Rename configure.in, require autoconf 2.59.
15103 * configure: Re-generate.
15104
434c4c77
DJ
151052004-12-08 Daniel Jacobowitz <dan@debian.org>
15106
15107 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15108 LIBS when finished.
15109 * aclocal.m4: Regenerated.
15110 * configure: Regenerated.
15111
db1d3e1b
AS
151122004-11-21 Andreas Schwab <schwab@suse.de>
15113
15114 * linux-m68k-low.c (m68k_num_gregs): Define.
15115 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15116 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15117 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15118 (m68k_breakpoint_at): New. Add to the_low_target.
15119
15120 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15121 srv_linux_thread_db to yes.
15122
43360365
JB
151232004-10-20 Joel Brobecker <brobecker@gnat.com>
15124
15125 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15126 (ARCH_SET_FS): Likewise.
15127 (ARCH_GET_FS): Likewise.
15128 (ARCH_GET_GS): Likewise.
15129
fd500816
DJ
151302004-10-16 Daniel Jacobowitz <dan@debian.org>
15131
15132 * linux-i386-low.c (ps_get_thread_area): New.
15133 * linux-x86-64-low.c (ps_get_thread_area): New.
15134 * linux-low.c: Include <sys/syscall.h>.
15135 (linux_kill_one_process): Don't kill the first thread here.
15136 (linux_kill): Kill the first thread here.
15137 (kill_lwp): New function.
15138 (send_sigstop, linux_send_signal): Use it.
15139 * proc-service.c: Clean up #ifdefs.
15140 (fpregset_info): Delete.
15141 (ps_lgetregs): Update and enable implementation.
15142 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15143 implementations.
15144 * remote-utils.c (struct sym_cache, symbol_cache): New.
15145 (input_interrupt): Print a clearer message.
15146 (async_io_enabled): New variable.
15147 (enable_async_io, disable_async_io): Use it. Update comments.
15148 (look_up_one_symbol): Use the symbol cache.
15149 * thread-db.c (thread_db_look_up_symbols): New function.
15150 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15151
f6de3c42
DJ
151522004-10-16 Daniel Jacobowitz <dan@debian.org>
15153
15154 * configure.in: Test for -rdynamic.
15155 * configure: Regenerated.
15156 * Makefile (INTERNAL_LDFLAGS): New.
15157 (gdbserver, gdbreplay): Use it.
15158
2c0fc042
AC
151592004-09-02 Andrew Cagney <cagney@gnu.org>
15160
15161 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15162
075b3282
DJ
151632004-03-23 Daniel Jacobowitz <drow@mvista.com>
15164
15165 * linux-low.c (linux_wait): Clear all_processes list also.
15166
fa6a77dc
DJ
151672004-03-12 Daniel Jacobowitz <drow@mvista.com>
15168
15169 * linux-low.c: Include <errno.h>. Remove extern declaration of
15170 errno.
15171
6d782a97
DJ
151722004-03-12 Daniel Jacobowitz <drow@mvista.com>
15173
15174 * gdbreplay.c, server.h, utils.c: Update copyright years.
15175
3a7fb99b
DJ
151762004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15177
15178 * server.c (main): Print child status or termination signal from
15179 variable 'signal', not 'sig'.
15180
c3e735a6
DJ
151812004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15182
15183 * linux-low.c (linux_read_memory): Change return type to
15184 int. Check for and return error from ptrace().
15185 * target.c (read_inferior_memory): Change return type to int. Pass
15186 back return status from the_target->read_memory().
15187 * target.h (struct target_ops): Adapt *read_memory() prototype.
15188 Update comment.
15189 (read_inferior_memory): Adapt prototype.
15190 * server.c (main): Return an error packet if
15191 read_inferior_memory() returns an error.
15192
a59d1c82
DJ
151932004-03-04 Daniel Jacobowitz <drow@mvista.com>
15194
15195 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15196 Unify with other clean targets.
15197
dc3f8883
DJ
151982004-02-29 Daniel Jacobowitz <drow@mvista.com>
15199
15200 * server.c (handle_v_cont): Call set_desired_inferior.
15201
89a208da
DJ
152022004-02-29 Daniel Jacobowitz <drow@mvista.com>
15203
15204 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15205
62ea82f5
DJ
152062004-02-29 Daniel Jacobowitz <drow@mvista.com>
15207
15208 * linux-low.c (linux_wait): Unblock async I/O.
15209 (linux_resume): Block and enable async I/O.
15210 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15211 * server.h (block_async_io, unblock_async_io): Add prototypes.
15212
6910d122
DJ
152132004-02-29 Daniel Jacobowitz <drow@mvista.com>
15214
15215 * remote-utils.c (remote_open): Print a status notice after
15216 opening a TCP port.
15217 * server.c (attach_inferior): Print a status notice after
15218 attaching.
15219
152202004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
15221
15222 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15223
c89dc5d4
DJ
152242004-02-26 Daniel Jacobowitz <drow@mvista.com>
15225
15226 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15227 error packet.
15228 * server.c, target.h: Update copyright years.
15229
4b8dad4a
RM
152302004-02-25 Roland McGrath <roland@redhat.com>
15231
15232 * target.h (struct target_ops): New member `read_auxv'.
15233 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15234 * linux-low.c (linux_read_auxv): New function.
15235 (linux_target_ops): Initialize `read_auxv' member to that.
15236
d7446758
JB
152372004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15238
15239 Committed by Jim Blandy <jimb@redhat.com>.
15240
15241 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 15242 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
15243 instead of GPR_SIZE to distiguish s390 and s390x targets.
15244
5544ad89
DJ
152452004-01-31 Daniel Jacobowitz <drow@mvista.com>
15246
15247 * linux-low.c: Update copyright year.
15248 (check_removed_breakpoint): Clear pending_is_breakpoint.
15249 (linux_set_resume_request, linux_queue_one_thread)
15250 (resume_status_pending_p): New functions.
15251 (linux_continue_one_thread): Use process->resume.
15252 (linux_resume): Only resume threads if there are no pending events.
15253 * linux-low.h (struct process_info): Add resume request
15254 pointer.
15255
2a68b70e
DJ
152562004-01-30 Daniel Jacobowitz <drow@mvista.com>
15257
15258 * regcache.c (new_register_cache): Clear the allocated register
15259 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15260
64386c31
DJ
152612003-10-13 Daniel Jacobowitz <drow@mvista.com>
15262
15263 * linux-low.c (linux_resume): Take a struct thread_resume *
15264 argument.
15265 (linux_wait): Update call.
15266 (resume_ptr): New static variable.
15267 (linux_continue_one_thread): Renamed from
15268 linux_continue_one_process. Use resume_ptr.
15269 (linux_resume): Use linux_continue_one_thread.
15270 * server.c (handle_v_cont, handle_v_requests): New functions.
15271 (myresume): New function.
15272 (main): Handle 'v' case.
15273 * target.h (struct thread_resume): New type.
15274 (struct target_ops): Change argument of "resume" to struct
15275 thread_resume *.
15276 (myresume): Delete macro.
15277
c938e9b0
L
152782003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15279
15280 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15281 (uninstall): Support DESTDIR.
15282
7f313d07
BC
15283Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15284
15285 * configure.srv: Add xscale*linux copy of arm*linux entry.
15286
3b2fc2ea
DJ
152872003-07-24 Daniel Jacobowitz <drow@mvista.com>
15288
15289 * linux-arm-low.c (arm_reinsert_addr): New function.
15290 (the_low_target): Add arm_reinsert_addr.
15291
1c0a559e
MK
152922003-07-08 Mark Kettenis <kettenis@gnu.org>
15293
15294 * mem-break.c: Remove whitespace at end of file.
15295
43d5792c
DJ
152962003-06-28 Daniel Jacobowitz <drow@mvista.com>
15297
15298 * configure.in: Check whether we need to prototype strerror.
15299 * server.h: Optionally prototype strerror.
15300 * gdbreplay.c (perror_with_name): Use strerror.
15301 * linux-low.c (linux_attach_lwp): Use strerror.
15302 * utils.c (perror_with_name): Use strerror.
15303 * config.in, configure: Regenerated.
15304
c8a86edf
DJ
153052003-06-28 Daniel Jacobowitz <drow@mvista.com>
15306
15307 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15308 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15309
73d37363
DJ
153102003-06-20 Daniel Jacobowitz <drow@mvista.com>
15311
15312 * Makefile.in (SFILES): Update.
15313 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15314 low-sun3.c: Remove files.
15315
6ad8ae5c
DJ
153162003-06-17 Daniel Jacobowitz <drow@mvista.com>
15317
15318 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15319 (linux_detach_one_process, linux_detach): New functions.
15320 (linux_target_ops): Add linux_detach.
15321 * server.c (main): Handle 'D' packet.
15322 * target.h (struct target_ops): Add "detach" member.
15323 (detach_inferior): Define.
15324
1581182a
MK
153252003-06-13 Mark Kettenis <kettenis@gnu.org>
15326
15327 From Kelley Cook <kelleycook@wideopenwest.com>:
15328 * configure.srv: Accept i[34567]86 variants.
15329
e5379b03
DJ
153302003-06-05 Daniel Jacobowitz <drow@mvista.com>
15331
15332 * linux-low.c (linux_wait_for_event): Correct comment typos.
15333 (linux_resume_one_process): Call check_removed_breakpoint.
15334 (linux_send_signal): New function.
15335 (linux_target_ops): Add linux_send_signal.
15336 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15337 of kill.
15338 * target.h (struct target_ops): Add send_signal.
15339
2ff29de4
JB
153402003-05-29 Jim Blandy <jimb@redhat.com>
15341
15342 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15343 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15344 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15345 away part of the register's value.
15346
254787d4
DJ
153472003-03-26 Daniel Jacobowitz <drow@mvista.com>
15348
15349 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15350 (linux_wait_for_event, linux_init_signals): Likewise.
15351
94e10508
DJ
153522003-03-17 Daniel Jacobowitz <drow@mvista.com>
15353
15354 * configure.in: Check for stdlib.h.
15355 * configure: Regenerated.
15356 * config.in: Regenerated.
15357
4c0711e0
DJ
153582003-01-04 Andreas Schwab <schwab@suse.de>
15359
15360 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15361
ef66e766
AC
153622003-01-02 Andrew Cagney <ac131313@redhat.com>
15363
15364 * Makefile.in: Remove obsolete code.
15365
a1358604
DJ
153662002-11-20 Daniel Jacobowitz <drow@mvista.com>
15367
15368 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15369 defined(PT_FPR0_HI).
15370
23ce3b1c
DJ
153712002-11-17 Stuart Hughes <seh@zee2.com>
15372
15373 * linux-arm-low.c (arm_num_regs): Increase.
15374 (arm_regmap): Include status register.
15375
153762002-11-17 Daniel Jacobowitz <drow@mvista.com>
15377
15378 * linux-low.c (register_addr): Remove incorrect -1 check.
15379
a9fa9f7d
DJ
153802002-08-29 Daniel Jacobowitz <drow@mvista.com>
15381
15382 * linux-low.c (linux_create_inferior): Call setpgid. Return
15383 the new PID.
15384 (unstopped_p, linux_signal_pid): Remove.
15385 (linux_target_ops): Remove linux_signal_pid.
15386 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15387 global instead of target method.
15388 * target.h (struct target_ops): Remove signal_pid. Update comment
15389 for create_inferior.
15390 * server.c (signal_pid): New variable.
15391 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 15392 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
15393 (attach_inferior): Set signal_pid.
15394
17574093
DJ
153952002-08-23 Daniel Jacobowitz <drow@mvista.com>
15396
15397 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15398
153992002-08-20 Jim Blandy <jimb@redhat.com>
15400
15401 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15402 default for this.
15403
154042002-08-01 Andrew Cagney <cagney@redhat.com>
15405
15406 * Makefile.in: Make chill references obsolete.
15407
154082002-07-24 Kevin Buettner <kevinb@redhat.com>
15409
15410 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15411 * configure: Regenerate.
15412 * config.in: Regenerate.
15413
154142002-07-09 David O'Brien <obrien@FreeBSD.org>
15415
15416 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15417 (perror_with_name, remote_close, remote_open, expect, play): Static.
15418
154192002-07-04 Michal Ludvig <mludvig@suse.cz>
15420
4b8dad4a 15421 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
15422 byte offsets instead of an array of indexes.
15423 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15424
154252002-06-13 Daniel Jacobowitz <drow@mvista.com>
15426
15427 * regcache.c: Add comment.
15428
154292002-06-11 Daniel Jacobowitz <drow@mvista.com>
15430
15431 * thread-db.c: New file.
15432 * proc-service.c: New file.
15433 * acinclude.m4: New file.
15434 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15435 proc-service.o, and thread-db.o.
15436 (linux-low.o): Add USE_THREAD_DB.
15437 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15438 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15439 * aclocal.m4: Regenerated.
15440 * config.in: Regenerated.
15441 * configure: Regenerated.
15442 * configure.in: Check for proc_service.h, sys/procfs.h,
15443 thread_db.h, and linux/elf.h headrs.
15444 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15445 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15446 Check for -lthread_db and thread support.
15447 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15448 PowerPC, and SuperH.
15449 * i387-fp.c: Constify arguments.
15450 * i387-fp.h: Likewise.
15451 * inferiors.c: (struct thread_info): Renamed from
15452 `struct inferior_info'. Remove PID member. Use generic inferior
15453 list header. All uses updated.
15454 (inferiors, signal_pid): Removed.
15455 (all_threads): New variable.
15456 (get_thread): Define.
15457 (add_inferior_to_list): New function.
15458 (for_each_inferior): New function.
15459 (change_inferior_id): New function.
15460 (add_inferior): Removed.
15461 (remove_inferior): New function.
15462 (add_thread): New function.
15463 (free_one_thread): New function.
15464 (remove_thread): New function.
15465 (clear_inferiors): Use for_each_inferior and free_one_thread.
15466 (find_inferior): New function.
15467 (find_inferior_id): New function.
15468 (inferior_target_data): Update argument type.
15469 (set_inferior_target_data): Likewise.
15470 (inferior_regcache_data): Likewise.
15471 (set_inferior_regcache_data): Likewise.
15472 * linux-low.c (linux_bp_reinsert): Remove.
15473 (all_processes, stopping_threads, using_thrads)
15474 (struct pending_signals, debug_threads, pid_of): New.
15475 (inferior_pid): Replace with macro.
15476 (struct inferior_linux_data): Remove.
15477 (get_stop_pc, add_process): New functions.
15478 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15479 Use add_process and add_thread.
15480 (linux_attach_lwp): New function, based on old linux_attach. Use
15481 add_process and add_thread. Set stop_expected for new threads.
15482 (linux_attach): New function.
15483 (linux_kill_one_process): New function.
15484 (linux_kill): Kill all LWPs.
15485 (linux_thread_alive): Use find_inferior_id.
15486 (check_removed_breakpoints, status_pending_p): New functions.
15487 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15488 Update. Use WNOHANG. Wait for cloned processes also. Update process
15489 struct for the found process.
15490 (linux_wait_for_event): New function.
15491 (linux_wait): Use it. Support LWPs.
15492 (send_sigstop, wait_for_sigstop, stop_all_processes)
15493 (linux_resume_one_process, linux_continue_one_process): New functions.
15494 (linux_resume): Support LWPs.
15495 (REGISTER_RAW_SIZE): Remove.
15496 (fetch_register): Use register_size instead. Call supply_register.
15497 (usr_store_inferior_registers): Likewise. Call collect_register.
15498 Fix recursive case.
15499 (regsets_fetch_inferior_registers): Improve error message.
15500 (regsets_store_inferior_registers): Add debugging.
15501 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15502 (unstopped_p, linux_signal_pid): New functions.
15503 (linux_target_ops): Add linux_signal_pid.
15504 (linux_init_signals): New function.
15505 (initialize_low): Call it. Initialize using_threads.
15506 * regcache.c (inferior_regcache_data): Add valid
15507 flag.
15508 (get_regcache): Fetch registers lazily. Add fetch argument
15509 and update all callers.
15510 (regcache_invalidate_one, regcache_invalidate): New
15511 functions.
15512 (new_register_cache): Renamed from create_register_cache.
15513 Return the new regcache.
15514 (free_register_cache): Change argument to a void *.
15515 (registers_to_string, registers_from_string): Call get_regcache
15516 with fetch flag set.
15517 (register_data): Make static. Pass fetch flag to get_regcache.
15518 (supply_register): Call get_regcache with fetch flag clear.
15519 (collect_register): Call get_regcache with fetch flag set.
15520 (collect_register_as_string): New function.
15521 * regcache.h: Update.
15522 * remote-utils.c (putpkt): Flush after debug output and use
15523 stderr.
15524 Handle input interrupts while waiting for an ACK.
15525 (input_interrupt): Use signal_pid method.
15526 (getpkt): Flush after debug output and use stderr.
15527 (outreg): Use collect_register_as_string.
15528 (new_thread_notify, dead_thread_notify): New functions.
15529 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15530 and general_thread.
15531 (look_up_one_symbol): Flush after debug output.
15532 * server.c (step_thread, server_waiting): New variables.
15533 (start_inferior): Don't use signal_pid. Update call to mywait.
15534 (attach_inferior): Update call to mywait.
15535 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15536 (main): Don't fetch/store registers explicitly. Use
15537 set_desired_inferior. Support proposed ``Hs'' packet. Update
15538 calls to mywait.
15539 * server.h: Update.
15540 (struct inferior_list, struct_inferior_list_entry): New.
15541 * target.c (set_desired_inferior): New.
15542 (write_inferior_memory): Constify.
15543 (mywait): New function.
15544 * target.h: Update.
15545 (struct target_ops): New signal_pid method.
15546 (mywait): Removed macro, added prototype.
15547
15548 * linux-low.h (regset_func): Removed.
15549 (regset_fill_func, regset_store_func): New.
15550 (enum regset_type): New.
15551 (struct regset_info): Add type field. Use new operation types.
15552 (struct linux_target_ops): stop_pc renamed to get_pc.
15553 Add decr_pc_after_break and breakpoint_at.
15554 (get_process, get_thread_proess, get_process_thread)
15555 (strut process_info, all_processes, linux_attach_lwp)
15556 (thread_db_init): New.
15557
15558 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15559 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15560 (the_low_target): Add new members.
15561 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15562 (i386_store_fpxregset): Constify.
15563 (target_regsets): Add new kind identifier.
15564 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15565 (i386_set_pc): Add debugging.
15566 (i386_breakpoint_at): New function.
15567 (the_low_target): Add new members.
15568 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15569 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15570 (mips_breakpoint_at): New.
15571 (the_low_target): Add new members.
15572 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15573 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15574 (the_low_target): Add new members.
15575 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15576 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15577 (the_low_target): Add new members.
15578 * linux-x86-64-low.c (target_regsets): Add new kind
15579 identifier.
15580
155812002-05-15 Daniel Jacobowitz <drow@mvista.com>
15582
15583 From Martin Pool <mbp@samba.org>:
15584 * server.c (gdbserver_usage): New function.
15585 (main): Call it.
15586
155872002-05-14 Daniel Jacobowitz <drow@mvista.com>
15588
15589 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15590 stop_at -> stop_pc.
15591
155922002-05-04 Andrew Cagney <ac131313@redhat.com>
15593
15594 * Makefile.in: Remove obsolete code.
15595
155962002-04-24 Michal Ludvig <mludvig@suse.cz>
15597
15598 * linux-low.c (regsets_fetch_inferior_registers),
15599 (regsets_store_inferior_registers): Removed cast to int from
15600 ptrace() calls.
15601 * regcache.h: Added declaration of struct inferior_info.
15602
156032002-04-20 Daniel Jacobowitz <drow@mvista.com>
15604
15605 * inferiors.c (struct inferior_info): Add regcache_data.
15606 (add_inferior): Call create_register_cache.
15607 (clear_inferiors): Call free_register_cache.
15608 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15609 * regcache.c (struct inferior_regcache_data): New.
15610 (registers): Remove.
15611 (get_regcache): New function.
15612 (create_register_cache, free_register_cache): New functions.
15613 (set_register_cache): Don't initialize the register cache here.
15614 (registers_to_string, registers_from_string, register_data): Call
15615 get_regcache.
15616 * regcache.h: Add prototypes.
15617 * server.h: Likewise.
15618
156192002-04-20 Daniel Jacobowitz <drow@mvista.com>
15620
15621 * mem-break.c: New file.
15622 * mem-break.h: New file.
15623 * Makefile.in: Add mem-break.o rule; update server.h
15624 dependencies.
15625 * inferiors.c (struct inferior_info): Add target_data
15626 member.
15627 (clear_inferiors): Free target_data member if set.
15628 (inferior_target_data, set_inferior_target_data): New functions.
15629 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15630 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15631 * linux-low.c (linux_bp_reinsert): New variable.
15632 (struct inferior_linux_data): New.
15633 (linux_create_inferior): Use set_inferior_target_data.
15634 (linux_attach): Likewise. Call add_inferior.
15635 (linux_wait_for_one_inferior): New function.
15636 (linux_wait): Call it.
15637 (linux_write_memory): Add const.
15638 (initialize_low): Call set_breakpoint_data.
15639 * linux-low.h (struct linux_target_ops): Add breakpoint
15640 handling members.
15641 * server.c (attach_inferior): Remove extra add_inferior
15642 call.
15643 * server.h: Include mem-break.h. Update inferior.c
15644 prototypes.
15645 * target.c (read_inferior_memory)
15646 (write_inferior_memory): New functions.
15647 * target.h (read_inferior_memory)
15648 (write_inferior_memory): Change macros to prototypes.
15649 (struct target_ops): Update comments. Add const to write_memory
15650 definition.
15651
156522002-04-11 Daniel Jacobowitz <drow@mvista.com>
15653
15654 * linux-low.c (usr_store_inferior_registers): Support
15655 registers which are allowed to fail to store.
15656 * linux-low.h (linux_target_ops): Likewise.
15657 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15658 (ppc_cannot_store_register): FPSCR may not be storable.
15659
156602002-04-09 Daniel Jacobowitz <drow@mvista.com>
15661
15662 * server.h: Include <string.h> if HAVE_STRING_H.
15663 * ChangeLog: Correct paths in last ChangeLog entry.
15664
156652002-04-09 Daniel Jacobowitz <drow@mvista.com>
15666
15667 * linux-low.h: Remove obsolete prototypes.
15668 (struct linux_target_ops): New.
15669 (extern the_low_target): New.
15670 * linux-low.c (num_regs, regmap): Remove declarations.
15671 (register_addr): Use the_low_target explicitly.
15672 (fetch_register): Likewise.
15673 (usr_fetch_inferior_registers): Likewise.
15674 (usr_store_inferior_registers): Likewise.
15675 * linux-arm-low.c (num_regs): Remove.
15676 (arm_num_regs): Define.
15677 (arm_regmap): Renamed from regmap, made static.
15678 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15679 made static.
15680 (arm_cannot_store_register): Renamed from cannot_store_register,
15681 made static.
15682 (the_low_target): New.
15683 * linux-i386-low.c (num_regs): Remove.
15684 (i386_num_regs): Define.
15685 (i386_regmap): Renamed from regmap, made static.
15686 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15687 made static.
15688 (i386_cannot_store_register): Renamed from cannot_store_register,
15689 made static.
15690 (the_low_target): New.
15691 * linux-ia64-low.c (num_regs): Remove.
15692 (ia64_num_regs): Define.
15693 (ia64_regmap): Renamed from regmap, made static.
15694 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15695 made static.
15696 (ia64_cannot_store_register): Renamed from cannot_store_register,
15697 made static.
15698 (the_low_target): New.
15699 * linux-m68k-low.c (num_regs): Remove.
15700 (m68k_num_regs): Define.
15701 (m68k_regmap): Renamed from regmap, made static.
15702 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15703 made static.
15704 (m68k_cannot_store_register): Renamed from cannot_store_register,
15705 made static.
15706 (the_low_target): New.
15707 * linux-mips-low.c (num_regs): Remove.
15708 (mips_num_regs): Define.
15709 (mips_regmap): Renamed from regmap, made static.
15710 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15711 made static.
15712 (mips_cannot_store_register): Renamed from cannot_store_register,
15713 made static.
15714 (the_low_target): New.
15715 * linux-ppc-low.c (num_regs): Remove.
15716 (ppc_num_regs): Define.
15717 (ppc_regmap): Renamed from regmap, made static.
15718 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15719 made static.
15720 (ppc_cannot_store_register): Renamed from cannot_store_register,
15721 made static.
15722 (the_low_target): New.
15723 * linux-s390-low.c (num_regs): Remove.
15724 (s390_num_regs): Define.
15725 (s390_regmap): Renamed from regmap, made static.
15726 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15727 made static.
15728 (s390_cannot_store_register): Renamed from cannot_store_register,
15729 made static.
15730 (the_low_target): New.
15731 * linux-sh-low.c (num_regs): Remove.
15732 (sh_num_regs): Define.
15733 (sh_regmap): Renamed from regmap, made static.
15734 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15735 made static.
15736 (sh_cannot_store_register): Renamed from cannot_store_register,
15737 made static.
15738 (the_low_target): New.
15739 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15740 (the_low_target): New.
15741
157422002-04-09 Daniel Jacobowitz <drow@mvista.com>
15743
15744 * Makefile.in: Add stamp-h target.
15745 * configure.in: Create stamp-h.
15746 * configure: Regenerated.
15747
157482002-04-09 Daniel Jacobowitz <drow@mvista.com>
15749
15750 * inferiors.c: New file.
15751 * target.c: New file.
15752 * target.h: New file.
15753 * Makefile.in: Add target.o and inferiors.o. Update
15754 dependencies.
15755 * linux-low.c (inferior_pid): New static variable,
15756 moved from server.c.
15757 (linux_create_inferior): Renamed from create_inferior.
15758 Call add_inferior. Return 0 on success instead of a PID.
15759 (linux_attach): Renamed from myattach.
15760 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15761 (linux_thread_alive): Renamed from mythread_alive.
15762 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15763 child dies.
15764 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15765 (regsets_store_inferior_registers): Correct error message.
15766 Add missing ``return 0''.
15767 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15768 (linux_store_registers): Renamed from store_inferior_registers.
15769 (linux_read_memory): Renamed from read_inferior_memory.
15770 (linux_write_memory): Renamed from write_inferior_memory.
15771 (linux_target_ops): New structure.
15772 (initialize_low): Call set_target_ops ().
15773 * remote-utils.c (unhexify): New function.
15774 (hexify): New function.
15775 (input_interrupt): Send signals to ``signal_pid''.
15776 * server.c (inferior_pid): Remove.
15777 (start_inferior): Update create_inferior call.
15778 (attach_inferior): Call add_inferior.
15779 (handle_query): New function.
15780 (main): Call handle_query for `q' packets.
15781 * server.h: Include "target.h". Remove obsolete prototypes.
15782 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15783
157842002-04-09 Daniel Jacobowitz <drow@mvista.com>
15785
15786 * Makefile.in: Add WARN_CFLAGS. Update configury
15787 dependencies.
15788 * configure.in: Check for <string.h>
15789 * configure: Regenerate.
15790 * config.in: Regenerate.
15791 * gdbreplay.c: Include needed system headers.
15792 (remote_open): Remove strchr prototype.
15793 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15794 * regcache.c (supply_register): Change buf argument to const void *.
15795 (supply_register_by_name): Likewise.
15796 (collect_register): Change buf argument to void *.
15797 (collect_register_by_name): Likewise.
15798 * regcache.h: Add missing prototypes.
15799 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15800 * server.c (handle_query): New function.
15801 (attached): New static variable, moved out of main.
15802 (main): Quiet longjmp clobber warnings.
15803 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15804 * utils.c (error): Remove NORETURN.
15805 (fatal): Likewise.
This page took 1.955782 seconds and 4 git commands to generate.