[GDBserver] Move arm.o to arch/arm.o
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
7eb4e0f9
YQ
12017-10-17 Yao Qi <yao.qi@linaro.org>
2
3 * configure.srv: Rename arm.o with arch/arm.o.
4
60d6cfc9
YQ
52017-10-17 Yao Qi <yao.qi@linaro.org>
6
7 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
8 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
9 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
10 (arch-i386.o, arch-amd64.o): Remove rules.
11 (arch/%.o): New rule.
12 Update POSTCOMPILE and COMPILE.pre.
13 * configure.ac: Invoke AC_CONFIG_COMMANDS.
14 * configure: Re-generated.
15 * configure.srv: Replace arch-i386.o with arch/i386.o.
16 Replace arch-amd64.o with arch/amd64.o.
17
5bfda255
YQ
182017-10-16 Yao Qi <yao.qi@linaro.org>
19
20 * configure: Regenerated.
21
9c80ecd6
SM
222017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
23
24 * inferiors.h: (struct inferior_list): Remove.
25 (struct inferior_list_entry); Remove.
26 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
27 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
28 get_first_inferior): Remove.
29 (for_each_inferior, for_each_inferior_with_data, find_inferior,
30 find_inferior_id, find_inferior_in_random): Change signature.
31 * inferiors.c (all_threads): Change type to
32 std::list<thread_info *>.
33 (get_thread): Remove macro.
34 (find_inferior, find_inferior_id): Change signature, implement
35 using find_thread.
36 (find_inferior_in_random): Change signature, implement using
37 find_thread_in_random.
38 (for_each_inferior, for_each_inferior_with_data): Change
39 signature, implement using for_each_thread.
40 (add_inferior_to_list, remove_inferior): Remove.
41 (add_thread, get_first_thread, thread_of_pid,
42 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
43 (get_first_inferior, one_inferior_p, clear_inferior_list):
44 Remove.
45 (clear_inferiors, get_thread_process): Update.
46 * gdbthread.h: Include <list>.
47 (struct thread_info) <entry>: Remove field.
48 <id>: New field.
49 (all_threads): Change type to std::list<thread_info *>.
50 (get_first_inferior): Add doc.
51 (find_thread, for_each_thread, find_thread_in_random): New
52 functions.
53 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
54 * linux-arm-low.c (update_registers_callback): Update.
55 * linux-low.c (second_thread_of_pid_p): Update.
56 (kill_one_lwp_callback, linux_detach_lwp_callback,
57 delete_lwp_callback, status_pending_p_callback, same_lwp,
58 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
59 iterate_over_lwps, not_stopped_callback,
60 resume_stopped_resumed_lwps, count_events_callback,
61 select_singlestep_lwp_callback, select_event_lwp_callback,
62 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
63 suspend_and_send_sigstop_callback, wait_for_sigstop,
64 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
65 lwp_running, linux_set_resume_request, resume_status_pending_p,
66 need_step_over_p, start_step_over, linux_resume_one_thread,
67 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
68 reset_lwp_ptrace_options_callback): Update.
69 * linux-mips-low.c (update_watch_registers_callback): Update.
70 * regcache.c (regcache_invalidate_one, regcache_invalidate):
71 Update.
72 (free_register_cache_thread_one): Remove.
73 (regcache_release): Update.
74 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
75 handle_qxfer_threads_worker): Update.
76 (handle_query): Update, use list iterator.
77 (visit_actioned_threads, handle_pending_status,
78 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
79 clear_pending_status_callback, set_pending_status_callback,
80 find_status_pending_thread_callback, handle_status,
81 process_serial_event): Update.
82 * target.c (thread_search_callback): Update.
83 * thread-db.c (thread_db_get_tls_address): Update.
84 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
85 Update.
86 * win32-i386-low.c (update_debug_registers_callback): Update.
87 * win32-low.c (delete_thread_info, child_delete_thread,
88 continue_one_thread, suspend_one_thread,
89 get_child_debug_event): Adjust.
90
9179355e
SM
912017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
92
93 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
94 * inferiors.h: Include <list>.
95 (struct process_info) <entry>: Remove field.
96 <pid>: New field.
97 (pid_of): Change macro to function.
98 (ptid_of, lwpid_of): Remove macro.
99 (all_processes): Change type to std::list<process_info *>.
100 (ALL_PROCESSES): Remove macro.
101 (for_each_process, find_process): New function.
102 * inferiors.c (all_processes): Change type to
103 std::list<process_info *>.
104 (find_thread_process): Adjust.
105 (add_process): Likewise.
106 (remove_process): Likewise.
107 (find_process_pid): Likewise.
108 (get_first_process): Likewise.
109 (started_inferior_callback): Remove.
110 (have_started_inferiors_p): Adjust.
111 (attached_inferior_callback): Remove.
112 (have_attached_inferiors_p): Adjust.
113 * linux-low.c (check_zombie_leaders): Likewise.
114 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
115 (x86_linux_update_xmltarget): Adjust.
116 * server.c (handle_query): Likewise.
117 (gdb_reattached_process): Remove.
118 (handle_status): Adjust.
119 (kill_inferior_callback): Likewise.
120 (detach_or_kill_inferior): Remove.
121 (print_started_pid): Likewise.
122 (print_attached_pid): Likewise.
123 (detach_or_kill_for_exit): Update.
124 (process_serial_event): Likewise.
125 * linux-arm-low.c (arm_new_fork): Likewise.
126
c9cb8905
SM
1272017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
128
129 * dll.h: Include <list>.
130 (struct dll_info): Add constructor.
131 <entry>: Remove field.
132 (all_dlls): Change type to std::list<dll_info>.
133 * dll.c: Include <algorithm>.
134 (get_dll): Remove macro.
135 (all_dlls): Change type to std::list<dll_info *>.
136 (free_one_dll): Remove.
137 (match_dll): Likewise.
138 (loaded_dll): Adjust.
139 (unloaded_dll): Adjust to all_dlls type change, use
140 std::find_if. Inline code from match_dll.
141 (clear_dlls): Adjust to all_dlls type change.
142 * server.c (emit_dll_description): Remove.
143 (handle_qxfer_libraries): Adjust to all_dlls type change,
144 integrate emit_dll_description's functionality.
145
04ec7890
SM
1462017-10-12 Simon Marchi <simon.marchi@ericsson.com>
147
148 * linux-low.h (struct linux_target_ops) <delete_process>: New
149 field.
150 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
151 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
152 (struct linux_target_ops): Add delete_process callback.
153 * linux-arm-low.c (arm_delete_process): New.
154 (struct linux_target_ops): Add delete_process callback.
155 * linux-bfin-low.c (struct linux_target_ops): Likewise.
156 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
157 * linux-m32r-low.c (struct linux_target_ops): Likewise.
158 * linux-mips-low.c (mips_linux_delete_process): New.
159 (struct linux_target_ops): Add delete_process callback.
160 * linux-ppc-low.c (struct linux_target_ops): Likewise.
161 * linux-s390-low.c (struct linux_target_ops): Likewise.
162 * linux-sh-low.c (struct linux_target_ops): Likewise.
163 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
164 * linux-tile-low.c (struct linux_target_ops): Likewise.
165 * linux-x86-low.c (x86_linux_delete_process): New.
166 (struct linux_target_ops): Add delete_process callback.
167 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
168
466eecee
SM
1692017-10-12 Simon Marchi <simon.marchi@ericsson.com>
170
171 * linux-aarch64-low.c (the_low_target): Add thread delete
172 callback.
173 * linux-arm-low.c (arm_delete_thread): New function.
174 (the_low_target): Add thread delete callback.
175 * linux-bfin-low.c (the_low_target): Likewise.
176 * linux-crisv32-low.c (the_low_target): Likewise.
177 * linux-low.c (delete_lwp): Invoke delete_thread callback if
178 set.
179 * linux-low.h (struct linux_target_ops) <delete_thread>: New
180 field.
181 * linux-m32r-low.c (the_low_target): Add thread delete callback.
182 * linux-mips-low.c (mips_linux_delete_thread): New function.
183 (the_low_target): Add thread delete callback.
184 * linux-ppc-low.c (the_low_target): Likewise.
185 * linux-s390-low.c (the_low_target): Likewise.
186 * linux-sh-low.c (the_low_target): Likewise.
187 * linux-tic6x-low.c (the_low_target): Likewise.
188 * linux-tile-low.c (the_low_target): Likewise.
189 * linux-x86-low.c (the_low_target): Likewise.
190 * linux-xtensa-low.c (the_low_target): Likewise.
191
b79f7801
YZ
1922017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
193
194 * win32-low.c: Include "common-inferior.h".
195
bc3b087d
SDJ
1962017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
197
198 * inferiors.c (set_inferior_cwd): New function.
199 * server.c (handle_general_set): Handle QSetWorkingDir packet.
200 (handle_query): Inform that QSetWorkingDir is supported.
201 * win32-low.c (create_process): Pass the inferior's cwd to
202 CreateProcess.
203
d092c5a2
SDJ
2042017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
205
206 * inferiors.c (current_inferior_cwd): New global variable.
207 (get_inferior_cwd): New function.
208 * inferiors.h (struct process_info) <cwd>: New field.
209
7da0a886
SDJ
2102017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
211
212 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
213 (OBS): Add gdb_tilde_expand.o.
214
289a6840
SM
2152017-10-02 Simon Marchi <simon.marchi@ericsson.com>
216
217 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
218 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
219
256642e8
PA
2202017-09-29 Pedro Alves <palves@redhat.com>
221
222 * ax.c (gdb_parse_agent_expr): Constify.
223 * ax.h (gdb_parse_agent_expr): Constify.
224 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
225 Constify.
226 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
227 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
228 * remote-utils.h (read_ptid): Constify.
229 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
230 (process_point_options, process_serial_event): Constify.
231 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
232 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
233 (cmd_qtbuffer): Constify.
234
5b9ca4d4
PA
2352017-09-29 Pedro Alves <palves@redhat.com>
236
237 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
238 fails.
239
94c207e0
PA
2402017-09-29 Pedro Alves <palves@redhat.com>
241
242 * linux-low.c (handle_extended_wait): Pass parent thread instead
243 of process to thread_db_notice_clone.
244 * linux-low.h (thread_db_notice_clone): Replace parent process
245 parameter with parent thread parameter.
246 * thread-db.c (find_one_thread): Add comment.
247 (thread_db_notice_clone): Replace parent process parameter with
248 parent thread parameter. Temporarily switch to the parent thread.
249
75352e28
SDJ
2502017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
251
252 * gdbthread.h: Include "common-gdbthread.h".
253 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
254 "if" when validating the ptid.
255 * remote-utils.c: Include "gdbthread.h".
256 (prepare_resume_reply): Use "switch_to_thread".
257 * target.c (done_accessing_memory): Likewise.
258
ad339634
AA
2592017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
260
261 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
262 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
263 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
264 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
265 s390x-gs-linux64-ipa.o to ipa_obj.
266 * linux-s390-low.c (HWCAP_S390_GS): New define.
267 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
268 New functions.
269 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
270 (s390_arch_setup): Check for guarded-storage support and choose
271 appropriate tdesc.
272 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
273 init_registers_s390x_gs_linux64.
274 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
275 enum value.
276 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
277 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
278
cc4d742f
SM
2792017-09-22 Simon Marchi <simon.marchi@ericsson.com>
280
281 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
282
f6327dcb
KB
2832017-09-21 Kevin Buettner <kevinb@redhat.com>
284
285 * linux-low.h (struct lwp_info): Add new field, thread_handle.
286 (thread_db_thread_handle): Declare.
287 * linux-low.c (linux_target_ops): Initialize thread_handle.
288 * server.c (handle_qxfer_threads_worker): Add support for
289 "handle" attribute.
290 * target.h (struct target_ops): Add new function pointer,
291 thread_handle.
292 (target_thread_handle): Define.
293 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
294 field in lwp.
295 (thread_db_thread_handle): New function.
296
86299109
KB
2972017-09-21 Kevin Buettner <kevinb@redhat.com>
298
299 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
300 * linux-low.h (thread_db_notice_clone): Declare.
301 * thread-db.c (thread_db_notice_clone): New function.
302
f557a88a
PA
3032017-09-21 Pedro Alves <palves@redhat.com>
304
305 * server.c (gdb_read_memory, handle_status, process_serial_event)
306 (handle_serial_event, handle_target_event): Adjust to
307 set_desired_thread prototype change.
308 * target.c (set_desired_thread): Remove 'use_general' parameter
309 and adjust.
310 * target.h (set_desired_thread): Remove 'use_general' parameter.
311
223ffa71
TT
3122017-09-20 Tom Tromey <tom@tromey.com>
313
314 * target.c (target_terminal::terminal_state): Define.
315 (target_terminal::init): Rename from target_terminal_init.
316 (target_terminal::inferior): Rename from
317 target_terminal_inferior.
318 (target_terminal::ours): Rename from target_terminal_ours.
319 (target_terminal::ours_for_output, target_terminal::info): New.
320
04fd3ba9
SM
3212017-09-16 Simon Marchi <simon.marchi@ericsson.com>
322
323 * server.c (accumulate_file_name_length): Remove.
324 (emit_dll_description): Adjust to std::string change.
325 (handle_qxfer_libraries): Use std::string to hold document.
326
5e187554
SM
3272017-09-16 Simon Marchi <simon.marchi@ericsson.com>
328
329 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
330 return type of xml_escape_text.
331 * server.c (emit_dll_description): Likewise.
332
1526853e
SM
3332017-09-16 Simon Marchi <simon.marchi@ericsson.com>
334
335 * server.c (captured_main): Accept argument for --selftest.
336 Update run_tests call.
337 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
338 when registering selftests.
339
c4dfafab
SDJ
3402017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
341
342 * regcache.c (get_thread_regcache): Update code to use "std::vector"
343 instead of "VEC" for "target_desc.reg_defs".
344 (regcache_cpy): Likewise.
345 (registers_to_string): Likewise.
346 (registers_from_string): Likewise.
347 (find_regno): Likewise.
348 (supply_regblock): Likewise.
349 (regcache_raw_read_unsigned): Likewise.
350 * tdesc.c (init_target_desc): Likewise.
351 (tdesc_create_reg): Likewise.
352 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
353 (struct target_desc) <reg_defs>: Convert to "std::vector".
354 (target_desc): Do not initialize "reg_defs".
355 (~target_desc): Update code to use "std::vector" instead of "VEC"
356 for "target_desc.reg_defs".
357 (operator==): Likewise.
358
124aceb4
SM
3592017-09-15 Simon Marchi <simon.marchi@ericsson.com>
360
361 * inferiors.h (thread_to_gdb_id): Remove.
362 * inferiors.c (thread_to_gdb_id): Remove.
363 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
364 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
365 lynx_store_registers, lynx_read_memory, lynx_write_memory):
366 Likewise.
367 * nto-low.c (nto_fetch_registers, nto_store_registers,
368 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
369
96cde54f
SM
3702017-09-15 Simon Marchi <simon.marchi@ericsson.com>
371
372 * inferiors.h (gdb_id_to_thread_id): Remove.
373 * inferiors.c (gdb_id_to_thread_id): Remove.
374 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
375 removal. Move pid declaration closer to where it's used.
376
e8ca139e
SM
3772017-09-15 Simon Marchi <simon.marchi@ericsson.com>
378
379 * server.c (handle_detach): New function.
380 (process_serial_event): Move code out, call handle_detach.
381
f8a4e119
SM
3822017-09-15 Simon Marchi <simon.marchi@ericsson.com>
383
384 * server.c (require_running): Rename to ...
385 (require_running_or_return): ... this ...
386 (require_running_or_break): ... and this.
387 (handle_query, process_serial_event): Adjust.
388
0eb0a407
SM
3892017-09-15 Simon Marchi <simon.marchi@ericsson.com>
390
391 * linux-low.c (linux_set_resume_request): Remove unused
392 variables.
393
785922a5
SM
3942017-09-15 Simon Marchi <simon.marchi@ericsson.com>
395
396 * server.c (first_thread_of): Remove.
397 (process_serial_event): Replace usage of first_thread_of with
398 find_any_thread_of_pid.
399 * tracepoint.c (same_process_p): Remove.
400 (gdb_agent_about_to_close): Replace usage of same_process_p with
401 find_any_thread_of_pid.
402 * linux-x86-low.c (same_process_callback): Remove.
403 (x86_arch_setup_process_callback): Replace usage of
404 same_process_callback with find_any_thread_of_pid.
405 * thread-db.c (any_thread_of): Remove.
406 (switch_to_process): Replace usage of any_thread_of with
407 find_any_thread_of_pid.
408 * inferiors.c (thread_pid_matches_callback): Remove.
409 (find_thread_process): Adjust to use find_any_thread_of_pid.
410
a059f00c
SDJ
4112017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
412
413 * regcache.c (get_thread_regcache): Guard calls to "memset"
414 with "!VEC_empty".
415
cc397f3a
SDJ
4162017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
417
418 * linux-low.c (handle_extended_wait): Use
419 "allocate_target_description" instead of "XNEW".
420 * linux-x86-low.c (initialize_low_arch): Likewise.
421
22916b07
YQ
4222017-09-05 Yao Qi <yao.qi@linaro.org>
423
424 * configure.srv (srv_i386_regobj): Remove.
425 (srv_amd64_regobj): Remove.
426 (srv_regobj): Set it to "" for x86 non-linux targets.
427 * linux-x86-tdesc.c (i386_linux_read_description):
428 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
429 (init_registers_i386): Remove the declaration.
430 (tdesc_i386): Remove the declaration.
431 (lynx_i386_arch_setup): Call i386_create_target_description.
432 * nto-x86-low.c: Likewise.
433 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
434 [!__x86_64__]: include arch/i386.h.
435 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
436
38602d55
YQ
4372017-09-05 Yao Qi <yao.qi@linaro.org>
438
439 * configure.srv (srv_amd64_linux_xmlfiles): Remove
440 i386/amd64-XXX-linux from it.
441
44b886ff
YQ
4422017-09-05 Yao Qi <yao.qi@linaro.org>
443
444 * configure.srv: Empty srv_amd64_linux_regobj if $development is
445 false.
446 (ipa_amd64_linux_regobj): Remove.
447 (ipa_x32_linux_regobj): Remove.
448
b4570e4b
YQ
4492017-09-05 Yao Qi <yao.qi@linaro.org>
450
451 * Makefile.in (arch-amd64.o): New rule.
452 * configure.srv: Append arch-amd64.o.
453 * linux-amd64-ipa.c: Include common/x86-xstate.h.
454 (get_ipa_tdesc): Call amd64_linux_read_description.
455 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
456 and init_registers_amd64_XXX.
457 * linux-x86-low.c (x86_linux_read_description): Call
458 amd64_linux_read_description.
459 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
460 (initialize_low_arch): Don't call init_registers_x32_XXX and
461 init_registers_amd64_XXX.
462 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
463 and tdesc_amd64_XXX.
464 [__x86_64__] (amd64_tdesc_test): New function.
465 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
466 and init_registers_amd64_XXX.
467 * linux-x86-tdesc.c: Include arch/amd64.h.
468 (xcr0_to_tdesc_idx): New function.
469 (i386_linux_read_description): New function.
470 (amd64_get_ipa_tdesc_idx): New function.
471 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
472 (amd64_get_ipa_tdesc): Declare.
473
d1f28ea2
YQ
4742017-09-05 Yao Qi <yao.qi@linaro.org>
475
476 * configure.srv (srv_i386_linux_xmlfiles): Remove
477 i386/i386-XXX-linux.xml from it.
478
25a93583
YQ
4792017-09-05 Yao Qi <yao.qi@linaro.org>
480
481 * configure.srv: Set srv_i386_linux_regobj empty if $development
482 is false.
483 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
484 initialize_low_tdesc.
485 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
486 with #if initialize_low_tdesc.
487 * linux-x86-tdesc-selftest.c: New file.
488 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
489
5f035c07
YQ
4902017-09-05 Yao Qi <yao.qi@linaro.org>
491
492 * Makefile.in (arch-i386.o): New rule.
493 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
494 (x86_64-*-linux*): Likewise.
495 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
496 include arch/i386.h.
497 (i386_linux_read_description): Remove code and call
498 i386_create_target_description.
499 * tdesc.c (allocate_target_description): New function.
500 * tdesc.h (set_tdesc_architecture): Remove declaration.
501 (set_tdesc_osabi): Likewise.
502
0abe8a89
YQ
5032017-09-05 Yao Qi <yao.qi@linaro.org>
504
505 * linux-x86-tdesc.c: Don't include <inttypes.h>.
506 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
507 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
508 .xmltarget.
509 * server.c (get_features_xml): Call tdesc_get_features_xml.
510 * tdesc.c (set_tdesc_architecture): New function.
511 (set_tdesc_osabi): New function.
512 (tdesc_get_features_xml): New function.
513 (tdesc_create_feature): Add an argument.
514 * tdesc.h (struct target_desc) <features>: New field.
515 <arch, osabi>: New field.
516 (~target_desc): xfree features, arch, and osabi.
517 (target_desc::oerator==): Don't compare .xmltarget.
518 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
519 (set_tdesc_osabi): Likewise.
520 (tdesc_get_features_xml): Likewise.
521
0a188386
YQ
5222017-09-05 Yao Qi <yao.qi@linaro.org>
523
524 * linux-x86-tdesc.c: Include selftest.h.
525 (i386_tdesc_test): New function.
526 (initialize_low_tdesc): Call selftests::register_test.
527 * tdesc.h: Include regdef.h.
528 (target_desc): Override operator == and !=.
529
f49ff000
YQ
5302017-09-05 Yao Qi <yao.qi@linaro.org>
531
532 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
533 (ipa_obj): Likewise.
534 * linux-i386-ipa.c: Include common/x86-xstate.h
535 (get_ipa_tdesc): Call i386_linux_read_description.
536 (initialize_low_tracepoint): Don't call init_registers_XXX
537 functions, call initialize_low_tdesc instead.
538 * linux-x86-low.c (x86_linux_read_description): Call
539 i386_linux_read_description.
540 (initialize_low_arch): Don't call init_registers_i386_XXX
541 functions, call initialize_low_tdesc.
542 * linux-x86-tdesc.c: New file.
543 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
544 (i386_get_ipa_tdesc_idx): Declare.
545 (i386_get_ipa_tdesc): Declare.
546 (initialize_low_tdesc): Declare.
547
2b68ef2f
YQ
5482017-09-05 Yao Qi <yao.qi@linaro.org>
549
550 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
551 instead of 0.
552
f7000548
YQ
5532017-09-05 Yao Qi <yao.qi@linaro.org>
554
555 * Makefile.in (IPA_OBJS): Add vec-ipa.o
556 * regcache.c (get_thread_regcache): Use VEC_length.
557 (init_register_cache): Likewise.
558 (regcache_cpy): Likewise.
559 (registers_to_string): Iterate reg_defs via VEC_iterate.
560 (find_regno): Likewise.
561 (find_register_by_number): Use VEC_index.
562 (register_size): Call find_register_by_number.
563 (register_data): Call find_register_by_number.
564 (supply_regblock): Use VEC_length.
565 (regcache_raw_read_unsigned): Likewise.
566 * tdesc.c (init_target_desc): Iterate reg_defs via
567 VEC_iterate.
568 (default_description): Update initializer.
569 (copy_target_description): Don't update field num_registers.
570 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
571 <num_registers>: Remove.
572
50a421ac
SM
5732017-09-04 Simon Marchi <simon.marchi@ericsson.com>
574
575 * Makefile.in (.SECONDARY): Define target.
576
23fdd69e
SM
5772017-09-03 Simon Marchi <simon.marchi@ericsson.com>
578
579 * linux-low.c (linux_wait_1): Adjust.
580 * server.c (queue_stop_reply_callback): Adjust.
581
0a2dde4a
SDJ
5822017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
583
584 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
585 QEnvironmentUnset and QEnvironmentReset packets.
586 (handle_query): Inform remote that QEnvironmentHexEncoded,
587 QEnvironmentUnset and QEnvironmentReset are supported.
588
6afd337d
SM
5892017-08-25 Simon Marchi <simon.marchi@ericsson.com>
590
591 * inferiors.h (inferior_target_data): Rename to ...
592 (thread_target_data): ... this.
593 (inferior_regcache_data): Rename to ...
594 (thread_regcache_data): ... this.
595 (set_inferior_regcache_data): Rename to ...
596 (set_thread_regcache_data): ... this.
597 * inferiors.c (inferior_target_data): Rename to ...
598 (thread_target_data): ... this.
599 (inferior_regcache_data): Rename to ...
600 (thread_regcache_data): ... this.
601 (set_inferior_regcache_data): Rename to ...
602 (set_thread_regcache_data): ... this.
603 (free_one_thread): Update.
604 * linux-low.h (get_thread_lwp): Update.
605 * regcache.c (get_thread_regcache): Update.
606 (regcache_invalidate_thread): Update.
607 (free_register_cache_thread): Update.
608 * win32-i386-low.c (update_debug_registers_callback): Update.
609 (win32_get_current_dr): Update.
610 * win32-low.c (thread_rec): Update.
611 (delete_thread_info): Update.
612 (continue_one_thread): Update.
613 (suspend_one_thread): Update.
614
a160cc46
SM
6152017-08-24 Simon Marchi <simon.marchi@ericsson.com>
616
617 * inferiors.c (set_inferior_target_data): Remove.
618 * inferiors.h (set_inferior_target_data): Remove.
619
6d580b63
YQ
6202017-08-18 Yao Qi <yao.qi@linaro.org>
621
622 * Makefile.in (OBS): Add selftest.o.
623 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
624 * configure, config.in: Re-generated.
625 * server.c: Include common/sefltest.h.
626 (captured_main): Handle option --selftest.
627
f5a29eb0
YQ
6282017-08-09 Yao Qi <yao.qi@linaro.org>
629
630 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
631 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
632 i386-avx-mpx.o and i386-mmx.o.
633 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
634 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
635 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
636 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
637 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
638 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
639 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
640 i386/amd64-avx-mpx.xml.
641
57757c2f
YQ
6422017-08-09 Yao Qi <yao.qi@linaro.org>
643
644 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
645 and x32-avx-avx512.o.
646 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
647 i386/x32-avx-avx512.xml.
648
229d26fc
SM
6492017-07-26 Simon Marchi <simon.marchi@ericsson.com>
650
651 * tracepoint.h (enum class fast_tpoint_collect_result): New
652 enumeration.
653 (fast_tracepoint_collecting): Change return type to
654 fast_tpoint_collect_result.
655 * tracepoint.c (fast_tracepoint_collecting): Likewise.
656 * linux-low.h: Include tracepoint.h.
657 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
658 fast_tpoint_collect_result.
659 * linux-low.c (handle_tracepoints): Adjust.
660 (linux_fast_tracepoint_collecting): Change return type to
661 fast_tpoint_collect_result.
662 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
663 linux_wait_1, stuck_in_jump_pad_callback,
664 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
665 proceed_one_lwp): Adjust to type change.
666
2e1e43e1
YQ
6672017-07-10 Yao Qi <yao.qi@linaro.org>
668
669 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
670
adc764e7
YQ
6712017-06-29 Yao Qi <yao.qi@linaro.org>
672
673 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
674 Remove.
675 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
676
a206891a
SM
6772017-06-20 Simon Marchi <simon.marchi@ericsson.com>
678
679 * Makefile.in (IPA_OBJS): Sort and format one item per line.
680
9a6c7d9c
SDJ
6812017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
682
683 * linux-low.c (linux_create_inferior): Adjust code to access the
684 environment information via 'gdb_environ' class.
685 * lynx-low.c (lynx_create_inferior): Likewise.
686 * server.c (our_environ): Make it an instance of 'gdb_environ'.
687 (get_environ): Return a pointer to 'our_environ'.
688 (captured_main): Initialize 'our_environ'.
689 * server.h (get_environ): Adjust prototype.
690 * spu-low.c (spu_create_inferior): Adjust code to access the
691 environment information via 'gdb_environ' class.
692
ae3e2ccf
SM
6932017-06-17 Simon Marchi <simon.marchi@ericsson.com>
694
695 * linux-low.c (linux_read_memory, linux_write_memory): Remove
696 usage of "register" keyword.
697
3e019bdc
SM
6982017-06-17 Simon Marchi <simon.marchi@ericsson.com>
699
700 * configure: Re-generate.
701
8465943a
SM
7022017-06-17 Simon Marchi <simon.marchi@ericsson.com>
703
704 * configure: Re-generate.
705
cf0dd6f0
SM
7062017-06-17 Simon Marchi <simon.marchi@ericsson.com>
707
708 * Makefile.in (COMPILE.pre): Add "-x c++".
709
9845682b
SDJ
7102017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
711
712 * fork-child.c: Conditionally include <signal.h>.
713
aefd8b33
SDJ
7142017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
715
716 * server.c (handle_general_set): Handle new packet
717 "QStartupWithShell".
718 (handle_query): Add "QStartupWithShell" to the list of supported
719 packets.
720 (gdbserver_usage): Add help text explaining the
721 new "--startup-with-shell" and "--no-startup-with-shell" CLI
722 options.
723 (captured_main): Recognize and act upon the presence of the new
724 CLI options.
725
2090129c
SDJ
7262017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
727 Pedro Alves <palves@redhat.com>
728
729 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
730 * configure: Regenerate.
731 * configure.srv (srv_linux_obj): Add "fork-child.o" and
732 "fork-inferior.o".
733 (i[34567]86-*-lynxos*): Likewise.
734 (spu*-*-*): Likewise.
735 * fork-child.c: New file.
736 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
737 and "environ.h".
738 (linux_ptrace_fun): New function.
739 (linux_create_inferior): Adjust function prototype to reflect
740 change on "target.h". Adjust function code to use
741 "fork_inferior".
742 (linux_request_interrupt): Delete "signal_pid".
743 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
744 (lynx_ptrace_fun): New function.
745 (lynx_create_inferior): Adjust function prototype to reflect
746 change on "target.h". Adjust function code to use
747 "fork_inferior".
748 * nto-low.c (nto_create_inferior): Adjust function prototype and
749 code to reflect change on "target.h". Update comments.
750 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
751 "common-terminal.h" and "environ.h".
752 (terminal_fd): Moved to fork-child.c.
753 (old_foreground_pgrp): Likewise.
754 (restore_old_foreground_pgrp): Likewise.
755 (last_status): Make it global.
756 (last_ptid): Likewise.
757 (our_environ): New variable.
758 (startup_with_shell): Likewise.
759 (program_name): Likewise.
760 (program_argv): Rename to...
761 (program_args): ...this.
762 (wrapper_argv): New variable.
763 (start_inferior): Delete function.
764 (get_exec_wrapper): New function.
765 (get_exec_file): Likewise.
766 (get_environ): Likewise.
767 (prefork_hook): Likewise.
768 (post_fork_inferior): Likewise.
769 (postfork_hook): Likewise.
770 (postfork_child_hook): Likewise.
771 (handle_v_run): Update code to deal with arguments coming from the
772 remote host. Update calls from "start_inferior" to
773 "create_inferior".
774 (captured_main): Likewise. Initialize environment variable. Call
775 "have_job_control".
776 * server.h (post_fork_inferior): New prototype.
777 (get_environ): Likewise.
778 (last_status): Declare.
779 (last_ptid): Likewise.
780 (signal_pid): Likewise.
781 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
782 (spu_ptrace_fun): New function.
783 (spu_create_inferior): Adjust function prototype to reflect change
784 on "target.h". Adjust function code to use "fork_inferior".
785 * target.c (target_terminal_init): New function.
786 (target_terminal_inferior): Likewise.
787 (target_terminal_ours): Likewise.
788 * target.h: Include <vector>.
789 (struct target_ops) <create_inferior>: Update prototype.
790 (create_inferior): Update macro.
791 * utils.c (gdb_flush_out_err): New function.
792 * win32-low.c (win32_create_inferior): Adjust function prototype
793 and code to reflect change on "target.h".
794
043a4934
SDJ
7952017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
796
797 * inferiors.c (switch_to_thread): New function.
798
15652511
SDJ
7992017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
800
801 * Makefile.in (SFILE): Add "common/job-control.c".
802 (OBS): Add "job-control.o".
803
21ea5acd
SDJ
8042017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
805
806 * Makefile: Remove "@host_makefile_frag@".
807
e13cb306
PA
8082017-05-05 Pedro Alves <palves@redhat.com>
809
810 * configure: Regenerate.
811
c94fee56
SDJ
8122017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
813
814 * configure: Regenerate.
815
a0ff9e1a
SM
8162017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
817
818 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
819 software_single_step change of return type to
820 std::vector<CORE_ADDR>.
821 * linux-low.c (install_software_single_step_breakpoints):
822 Likewise.
823 * linux-low.h (install_software_single_step_breakpoints):
824 Likewise.
825
be628ab8
SDJ
8262017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
827
828 * remote-utils.c: Include "gdb_termios.h" instead of
829 "terminal.h".
830 * terminal.h: Delete file.
831
7c5ded6a
SDJ
8322017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
833
834 * server.c: Include <vector>.
835 <program_argv, wrapper_argv>: Convert to std::vector.
836 (start_inferior): Rewrite function to use C++.
837 (handle_v_run): Likewise. Update code that calculates the argv
838 based on the vRun packet; use C++.
839 (captured_main): Likewise.
840
436252de
SM
8412017-04-06 Simon Marchi <simon.marchi@ericsson.com>
842
843 * server.c (handle_v_cont): Initialize thread_resume::thread
844 with null_ptid.
845
9bf2a700
PA
8462017-04-05 Pedro Alves <palves@redhat.com>
847
848 * configure: Regenerate.
849
a121b7c1
PA
8502017-04-05 Pedro Alves <palves@redhat.com>
851
852 * gdbreplay.c (sync_error): Constify.
853 * linux-x86-low.c (push_opcode): Constify.
854
21c8a587
PA
8552017-04-05 Pedro Alves <palves@redhat.com>
856
857 * win32-low.c (get_child_debug_event)
858 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
859 Report TARGET_WAITKIND_SPURIOUS instead.
860
fb32b4f7
PA
8612017-04-05 Pedro Alves <palves@redhat.com>
862
863 * remote-utils.c (remote_prepare, remote_open): Constify.
864 * remote-utils.h (remote_prepare, remote_open): Constify.
865 * server.c (captured_main): Constify 'port' handling.
866
65dd1e59
SM
8672017-04-04 Simon Marchi <simon.marchi@ericsson.com>
868
869 * Makefile.in (clean): Clear .deps.
870
8fa5b777
SM
8712017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
872
873 * .gitignore: Remove generated files, replace with wildcard.
874 * (clean): Replace removal of generated files with wildcard.
875 (version.c): Replace with...
876 (version-generated.c): ...this.
877 (xml-builtin.c): Replace with...
878 (xml-builtin-generated.c): ...this.
879 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
880 (%.c: *regformats*): Replace with...
881 (%-generated.c: *regformats*): ...this.
882
a12e714b
MF
8832017-03-27 Max Filippov <jcmvbkbc@gmail.com>
884
885 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
886 (xtensa_fill_gregset): Call collect_register_by_name for
887 threadptr register.
888 (xtensa_store_gregset): Call supply_register_by_name for
889 threadptr register.
890
1a09b50a
MF
8912017-03-27 Max Filippov <jcmvbkbc@gmail.com>
892
893 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
894 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
895 (xtensa_store_gregset): Call supply_register for all registers in
896 a0_regnum..a0_regnum + C0_NREGS range.
897
1a01e7c6
SM
8982017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
899
900 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
901 (ax-ipa.o: ax.c): Remove.
902 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
903 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
904 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
905 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
906 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
907
36bc18a8
SM
9082017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
909
910 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
911 (print-utils-ipa.o: ../common/print-utils.c): Remove.
912 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
913 (errors-ipa.o: ../common/errors.c): Remove.
914 (format-ipa.o: ../common/format.c): Remove.
915 (common-utils-ipa.o: ../common/common-utils.c): Remove.
916
a8ebe3d5
SM
9172017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
918
919 * Makefile.in (%-ipa.o: %.c): New rule.
920 (tracepoint-ipa.o: tracepoint.c): Remove.
921 (utils-ipa.o: utils.c): Remove.
922 (remote-utils-ipa.o: remote-utils.c): Remove.
923 (regcache-ipa.o: regcache.c): Remove.
924 (i386-linux-ipa.o: i386-linux.c): Remove.
925 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
926 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
927 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
928 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
929 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
930 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
931 (amd64-linux-ipa.o: amd64-linux.c): Remove.
932 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
933 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
934 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
935 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
936 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
937 (aarch64-ipa.o: aarch64.c): Remove.
938 (s390-linux32-ipa.o: s390-linux32.c): Remove.
939 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
940 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
941 (s390-linux64-ipa.o: s390-linux64.c): Remove.
942 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
943 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
944 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
945 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
946 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
947 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
948 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
949 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
950 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
951 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
952 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
953 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
954 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
955 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
956 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
957 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
958 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
959 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
960 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
961 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
962 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
963 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
964 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
965 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
966 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
967 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
968 (tdesc-ipa.o: tdesc.c): Remove.
969 (x32-linux-ipa.o: x32-linux.c): Remove.
970 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
971 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
972
50cfacb7
SM
9732017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
974
975 * Makefile.in (%.o: ../arch/%.c): New rule.
976 (arm.o: ../arch/arm.c): Remove.
977 (arm-linux.o: ../arch/arm-linux.c): Remove.
978 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
979 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
980
c5a22423
SM
9812017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
982
983 * Makefile.in (%.o: ../nat/%.c): New rule.
984 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
985 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
986 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
987 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
988 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
989 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
990 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
991 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
992 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
993 (linux-personality.o: ../nat/linux-personality.c): Remove.
994 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
995 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
996 (x86-linux.o: ../nat/x86-linux.c): Remove.
997 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
998 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
999
6bda016b
SM
10002017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1001
1002 * Makefile.in (%.o: ../common/%.c): New rule.
1003 (signals.o: ../common/signals.c): Remove.
1004 (print-utils.o: ../common/print-utils.c): Remove.
1005 (rsp-low.o: ../common/rsp-low.c): Remove.
1006 (common-utils.o: ../common/common-utils.c): Remove.
1007 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1008 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1009 (vec.o: ../common/vec.c): Remove.
1010 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1011 (xml-utils.o: ../common/xml-utils.c): Remove.
1012 (ptid.o: ../common/ptid.c): Remove.
1013 (buffer.o: ../common/buffer.c): Remove.
1014 (format.o: ../common/format.c): Remove.
1015 (filestuff.o: ../common/filestuff.c): Remove.
1016 (agent.o: ../common/agent.c): Remove.
1017 (errors.o: ../common/errors.c): Remove.
1018 (environ.o: ../common/environ.c): Remove.
1019 (common-debug.o: ../common/common-debug.c): Remove.
1020 (cleanups.o: ../common/cleanups.c): Remove.
1021 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1022 (fileio.o: ../common/fileio.c): Remove.
1023 (common-regcache.o: ../common/common-regcache.c): Remove.
1024 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1025 (new-op.o: ../common/new-op.c): Remove.
1026 (btrace-common.o: ../common/btrace-common.c): Remove.
1027
21122961
SM
10282017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1029
1030 * Makefile.in (%.o: ../target/%.c): New rule.
1031 (waitstatus.o: ../target/waitstatus.c): Remove.
1032
c362e621
SM
10332017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1034
1035 * Makefile.in
1036 (%.c: ../regformats/%.dat,
1037 (%.c: ../regformats/arm/%.dat,
1038 (%.c: ../regformats/i386/%.dat,
1039 (%.c: ../regformats/rs6000/%.dat): New rules.
1040 (aarch64.c): Remove.
1041 (reg-arm.c): Remove.
1042 (arm-with-iwmmxt.c): Remove.
1043 (arm-with-vfpv2.c): Remove.
1044 (arm-with-vfpv3.c): Remove.
1045 (arm-with-neon.c): Remove.
1046 (reg-bfin.c): Remove.
1047 (reg-cris.c): Remove.
1048 (reg-crisv32.c): Remove.
1049 (i386.c): Remove.
1050 (i386-linux.c): Remove.
1051 (i386-avx.c): Remove.
1052 (i386-avx-linux.c): Remove.
1053 (i386-avx-avx512.c): Remove.
1054 (i386-avx-avx512-linux.c): Remove.
1055 (i386-mpx.c): Remove.
1056 (i386-mpx-linux.c): Remove.
1057 (i386-avx-mpx-avx512-pku.c): Remove.
1058 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1059 (i386-avx-mpx.c): Remove.
1060 (i386-avx-mpx-linux.c): Remove.
1061 (i386-mmx.c): Remove.
1062 (i386-mmx-linux.c): Remove.
1063 (reg-ia64.c): Remove.
1064 (reg-m32r.c): Remove.
1065 (reg-m68k.c): Remove.
1066 (reg-cf.c): Remove.
1067 (mips-linux.c): Remove.
1068 (mips-dsp-linux.c): Remove.
1069 (mips64-linux.c): Remove.
1070 (mips64-dsp-linux.c): Remove.
1071 (nios2-linux.c): Remove.
1072 (powerpc-32.c): Remove.
1073 (powerpc-32l.c): Remove.
1074 (powerpc-altivec32l.c): Remove.
1075 (powerpc-cell32l.c): Remove.
1076 (powerpc-vsx32l.c): Remove.
1077 (powerpc-isa205-32l.c): Remove.
1078 (powerpc-isa205-altivec32l.c): Remove.
1079 (powerpc-isa205-vsx32l.c): Remove.
1080 (powerpc-e500l.c): Remove.
1081 (powerpc-64l.c): Remove.
1082 (powerpc-altivec64l.c): Remove.
1083 (powerpc-cell64l.c): Remove.
1084 (powerpc-vsx64l.c): Remove.
1085 (powerpc-isa205-64l.c): Remove.
1086 (powerpc-isa205-altivec64l.c): Remove.
1087 (powerpc-isa205-vsx64l.c): Remove.
1088 (s390-linux32.c): Remove.
1089 (s390-linux32v1.c): Remove.
1090 (s390-linux32v2.c): Remove.
1091 (s390-linux64.c): Remove.
1092 (s390-linux64v1.c): Remove.
1093 (s390-linux64v2.c): Remove.
1094 (s390-te-linux64.c): Remove.
1095 (s390-vx-linux64.c): Remove.
1096 (s390-tevx-linux64.c): Remove.
1097 (s390x-linux64.c): Remove.
1098 (s390x-linux64v1.c): Remove.
1099 (s390x-linux64v2.c): Remove.
1100 (s390x-te-linux64.c): Remove.
1101 (s390x-vx-linux64.c): Remove.
1102 (s390x-tevx-linux64.c): Remove.
1103 (tic6x-c64xp-linux.c): Remove.
1104 (tic6x-c64x-linux.c): Remove.
1105 (tic6x-c62x-linux.c): Remove.
1106 (reg-sh.c): Remove.
1107 (reg-sparc64.c): Remove.
1108 (reg-spu.c): Remove.
1109 (amd64.c): Remove.
1110 (amd64-linux.c): Remove.
1111 (amd64-avx.c): Remove.
1112 (amd64-avx-linux.c): Remove.
1113 (amd64-avx-avx512.c): Remove.
1114 (amd64-avx-avx512-linux.c): Remove.
1115 (amd64-mpx.c): Remove.
1116 (amd64-mpx-linux.c): Remove.
1117 (amd64-avx-mpx-avx512-pku.c): Remove.
1118 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1119 (amd64-avx-mpx.c): Remove.
1120 (amd64-avx-mpx-linux.c): Remove.
1121 (x32.c): Remove.
1122 (x32-linux.c): Remove.
1123 (x32-avx.c): Remove.
1124 (x32-avx-linux.c): Remove.
1125 (x32-avx-avx512.c): Remove.
1126 (x32-avx-avx512-linux.c): Remove.
1127 (reg-xtensa.c): Remove.
1128 (reg-tilegx.c): Remove.
1129 (reg-tilegx32.c): Remove.
1130
1672e0d9
SDJ
11312017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1132
1133 * Makefile.in (SFILES): Add "common/environ.c".
1134 (OBJS): Add "common/environ.h".
1135
239b6d10
WT
11362017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1137
1138 * configure.ac: Check if the fs_base and gs_base members of
1139 `struct user_regs_struct' exist.
1140 * config.in: Regenerated.
1141 * configure: Likewise.
1142
694b382c
AT
11432017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1144
1145 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1146 target_read_memory.
1147 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1148 (get_next_pcs_syscall_next_pc): Likewise.
1149
7dc53023
LM
11502016-12-23 Luis Machado <lgustavo@codesourcery.com>
1151
1152 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1153 * nto-x86-low.c: Likewise.
1154
ad02e4fe
SM
11552016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1156
1157 * Makefile.in: Include disable-implicit-rules.mk.
1158
dcb07cfa
PA
11592016-11-23 Pedro Alves <palves@redhat.com>
1160
1161 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1162 (debug_vprintf): Use std::chrono::steady_clock instead of
1163 gettimeofday. Use '.' instead of ':'.
1164 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1165 (get_timestamp): Use std::chrono::steady_clock instead of
1166 gettimeofday.
1167
8629c02c
SM
11682016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1169
1170 * Makefile.in: Fix whitespace formatting.
1171
b593ecca
SM
11722016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1173
1174 * Makefile.in (SFILES, OBS): Flatten list and order
1175 alphabetically.
1176
9986ba08
PA
11772016-11-23 Pedro Alves <palves@redhat.com>
1178
1179 * event-loop.c (handle_file_event): Use warning.
1180 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1181 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1182 Use warning.
1183
4eefa7bc
PA
11842016-11-23 Pedro Alves <palves@redhat.com>
1185
1186 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1187 output.
1188 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1189 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1190 debug_printf and debug_flush for debug output.
1191 * server.c (handle_general_set): Likewise.
1192 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1193 output.
1194
5443506e
SM
11952016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1196
1197 * Makefile.in (.c.o): Replace rule with ...
1198 (%.o: %.c): ... this one.
1199
3b165252
SM
12002016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1201
1202 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1203 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1204 make.
1205 * configure.ac: Remove checks for the make program.
1206 * configure: Re-generate.
1207
0bcda685
PA
12082016-10-28 Pedro Alves <palves@redhat.com>
1209
1210 * Makefile.in (CXX_DIALECT): Get from configure.
1211 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1212 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1213 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1214 * config.in: Regenerate.
1215 * configure: Regenerate.
1216
c3805894
YQ
12172016-10-27 Yao Qi <yao.qi@linaro.org>
1218
1219 * linux-low.c (linux_supports_range_stepping): Return true if
1220 can_software_single_step return true.
1221
89342618
YQ
12222016-10-27 Yao Qi <yao.qi@linaro.org>
1223
1224 * inferiors.c (find_inferior_in_random): New function.
1225 * inferiors.h (find_inferior_in_random): Declare.
1226 * linux-low.c (linux_wait_for_event_filtered): Call
1227 find_inferior_in_random instead of find_inferior.
1228
e3652c84
YQ
12292016-10-27 Yao Qi <yao.qi@linaro.org>
1230
1231 * linux-low.c (linux_wait_1): If single-step breakpoints are
1232 inserted, remove them.
1233
5a04c4cf
PA
12342016-10-26 Pedro Alves <palves@redhat.com>
1235
1236 * linux-low.c (handle_extended_wait): Link parent/child fork
1237 threads.
1238 (linux_wait_1): Unlink them.
1239 (linux_set_resume_request): Ignore resume requests for
1240 already-resumed and unhandled fork child threads.
1241 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1242 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1243 New functions.
1244 (handle_v_requests) <vCont>: Don't call require_running.
1245 * server.h (in_queued_stop_replies): New declaration.
1246
cb93dc7f
YQ
12472016-10-24 Yao Qi <yao.qi@linaro.org>
1248
1249 PR server/20733
1250 * linux-aarch64-low.c (append_insns): Cast the return value to
1251 'uint32_t *'.
1252
a1078bea
YQ
12532016-10-10 Yao Qi <yao.qi@linaro.org>
1254
1255 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1256
1fb77080
SDJ
12572016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1258
1259 * target.c (target_supports_multi_process): New function, moved
1260 from...
1261 * target.h (target_supports_multi_process): ... here. Remove
1262 macro.
1263
39b5a3b9
TT
12642016-10-05 Tom Tromey <tom@tromey.com>
1265
1266 PR remote/20655:
1267 * tracepoint.c (handle_tracepoint_bkpts): Check
1268 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1269
c1d0b70a
YQ
12702016-10-05 Yao Qi <yao.qi@linaro.org>
1271
1272 * configure.srv: Update the path of arm-*.xml files.
1273
0a69eedb
YQ
12742016-10-05 Terry Guo <terry.guo@arm.com>
1275 Yao Qi <yao.qi@linaro.org>
1276
1277 * Makefile.in: Adjust the path of rules.
1278 * configure.srv: Update the path of xml files.
1279 * regformats/arm-with-iwmmxt.dat: Regenerated.
1280 * regformats/arm-with-neon.dat: Likewise.
1281 * regformats/arm-with-vfpv2.dat: Likewise.
1282 * regformats/arm-with-vfpv3.dat Likewise.
1283
17e16485
YQ
12842016-09-30 Yao Qi <yao.qi@linaro.org>
1285
1286 PR gdbserver/20627
1287 * target.c (target_stop_and_wait): Don't call
1288 target_continue_no_signal, use resume_stop instead.
1289
edeeb602
YQ
12902016-09-26 Yao Qi <yao.qi@linaro.org>
1291
1292 * linux-low.c (linux_wait_1): Call debug_exit.
1293
503b1c39
PA
12942016-09-23 Pedro Alves <palves@redhat.com>
1295
1296 * Makefile.in (SFILES): Add common/new-op.c.
1297 (OBS): Add common/new-op.o.
1298 (new-op.o): New rule.
1299
74172ecf
SM
13002016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1301
1302 * .gitinore: Ignore more files.
1303
fc6cda2e
YQ
13042016-09-21 Yao Qi <yao.qi@linaro.org>
1305
1306 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1307 23.
1308
bc1e6c81
SDJ
13092016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1310
1311 * server.c (start_inferior): Call target_mourn_inferior instead of
1312 mourn_inferior; pass ptid_t argument to it.
1313 (resume): Likewise.
1314 (handle_target_event): Likewise.
1315 * target.c (target_mourn_inferior): New function.
1316 * target.h (mourn_inferior): Delete macro.
1317
0e00e962
AA
13182016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1319
1320 * linux-low.c (lwp_is_stepping): New function.
1321
1d8cb77d
CL
13222016-09-06 Carl Love <cel@us.ibm.com>
1323
1324 * server.c (start_inferior): Fixed comment, requested comment change
1325 didn't get updated correctly. Removed reference to ptrace () call as
1326 it is only true on Linux systems.
1327
7313bced
CL
13282016-09-06 Carl Love <cel@us.ibm.com>
1329
1330 * server.c (start_inferior): Do not call
1331 function target_post_create_inferior () if the
1332 inferior process has already exited.
1333
cf6de44d
PA
13342016-09-05 Pedro Alves <palves@redhat.com>
1335
1336 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1337 (COMPILE.pre, CC_LD): Use CXX directly.
1338 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1339 * acinclude.m4: Don't include build-with-cxx.m4.
1340 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1341 * configure: Regenerate.
1342
c1da6748
AT
13432016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1344
1345 PR gdb/19495
1346 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1347 call writing data to own_buf.
1348
f2b9e3df
SDJ
13492016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1350
1351 * target.c (mywait): Call target_wait instead of
1352 the_target->wait.
1353 (target_wait): New function.
1354
049a8570
SDJ
13552016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1356
1357 * server.c (start_inferior): New variable 'ptid'. Replace calls
1358 to the_target->resume by target_continue{,_no_signal}, depending
1359 on the case.
1360 * target.c (target_stop_and_wait): Call target_continue_no_signal
1361 instead of the_target->resume.
1362 (target_continue): New function.
1363
3aa5cfa0
AT
13642016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1365
1366 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1367
754653a7
AZ
13682016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1369
1370 PR server/20491
1371 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1372 ps_prochandle.
1373 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1374 * linux-arm-low.c (ps_get_thread_area): Likewise.
1375 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1376 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1377 * linux-mips-low.c (ps_get_thread_area): Likewise.
1378 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1379 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1380 * linux-x86-low.c (ps_get_thread_area): Likewise.
1381 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1382
ed036b40
PA
13832016-08-19 Pedro Alves <palves@redhat.com>
1384
1385 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1386
c8ef42ee
PA
13872016-08-19 Pedro Alves <palves@redhat.com>
1388
1389 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1390 comment. Use memcpy instead of casting through unsigned long.
1391
9c235a72
PA
13922016-08-19 Pedro Alves <palves@redhat.com>
1393
1394 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1395 allocating around 0x80000000.
1396
201506da
PA
13972016-08-19 Pedro Alves <palves@redhat.com>
1398
1399 PR gdb/20415
1400 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1401 (x32-avx512-linux-ipa.o): New rules.
1402 * configure.ac (x86_64-*-linux*): New x32 check.
1403 * configure.srv (ipa_x32_linux_regobj): New.
1404 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1405 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1406 descriptions.
1407 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1408 descriptions.
1409 * configure: Regenerate.
1410
f348d89a
PA
14112016-08-09 Pedro Alves <palves@redhat.com>
1412
1413 PR gdb/18653
1414 * Makefile.in (OBS): Add signals-state-save-restore.o.
1415 (signals-state-save-restore.o): New rule.
1416 * config.in: Regenerate.
1417 * configure: Regenerate.
1418 * linux-low.c: Include "signals-state-save-restore.h".
1419 (linux_create_inferior): Call
1420 restore_original_signals_state.
1421 * server.c: Include "dispositions-save-restore.h".
1422 (captured_main): Call save_original_signals_state.
1423
1baf5149
PA
14242016-08-05 Pedro Alves <palves@redhat.com>
1425
1426 * configure: Regenerate.
1427
fcd4a73d
YQ
14282016-08-04 Yao Qi <yao.qi@linaro.org>
1429
1430 * linux-low.c (regsets_fetch_inferior_registers): Check
1431 errno is ESRCH or not.
1432
979659d0
YQ
14332016-08-02 Yao Qi <yao.qi@linaro.org>
1434
1435 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1436 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1437 (thread_db_load_search): Update.
1438 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1439 td_ta_set_event and td_ta_event_getmsg.
1440
6598661d
PA
14412016-07-26 Pedro Alves <palves@redhat.com>
1442
1443 PR server/20414
1444 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1445 of unsigned long for 64-bit registers and use uint32_t instead of
1446 unsigned int for 32-bit registers.
1447
9cf12d57
PA
14482016-07-26 Pedro Alves <palves@redhat.com>
1449
1450 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1451 to 'ptrace'.
1452
305450ed
TT
14532016-07-21 Tom Tromey <tom@tromey.com>
1454
1455 * configure: Rebuild.
1456
2583da7c
YQ
14572016-07-21 Yao Qi <yao.qi@linaro.org>
1458
1459 * mem-break.c (find_gdb_breakpoint): Cast bp to
1460 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1461
21536b36
YQ
14622016-07-21 Yao Qi <yao.qi@linaro.org>
1463
1464 * server.c (handle_v_requests): Support s and S actions
1465 if target_supports_software_single_step return true.
1466
8901d193
YQ
14672016-07-21 Yao Qi <yao.qi@linaro.org>
1468
1469 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1470 is resume_step, call maybe_hw_step.
1471 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1472 and unstop them.
1473 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1474 breakpoints or not.
1475 (proceed_one_lwp): If resume request is resume_step, install
1476 reinsert breakpoints and call maybe_hw_step.
1477
0e9a339e
YQ
14782016-07-21 Yao Qi <yao.qi@linaro.org>
1479
1480 * linux-low.c (proceed_one_lwp): Declare.
1481 (linux_resume_one_thread): Remove local variable 'step'.
1482 Lift code enqueue signal. Call proceed_one_lwp instead of
1483 linux_resume_one_lwp.
1484
4281b351
YQ
14852016-07-21 Yao Qi <yao.qi@linaro.org>
1486
1487 * linux-low.c (linux_resume_one_thread): Call
1488 enqueue_pending_signal.
1489
984a2c04
YQ
14902016-07-21 Yao Qi <yao.qi@linaro.org>
1491
1492 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1493 * inferiors.c (do_restore_current_thread_cleanup): New function.
1494 (make_cleanup_restore_current_thread): Likewise.
1495 * linux-low.c (install_software_single_step_breakpoints): Call
1496 make_cleanup_restore_current_thread. Switch current_thread to
1497 thread.
1498
bec903c9
YQ
14992016-07-21 Yao Qi <yao.qi@linaro.org>
1500
1501 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1502 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1503 (clone_one_breakpoint): Likewise.
1504 (delete_reinsert_breakpoints): Change parameter to thread.
1505 Callers updated.
1506 (has_reinsert_breakpoints): Likewise.
1507 (uninsert_reinsert_breakpoints): Likewise.
1508 (reinsert_reinsert_breakpoints): Likewise.
1509 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1510 (delete_reinsert_breakpoints): Likewise.
1511 (reinsert_reinsert_breakpoints): Likewise.
1512 (uninsert_reinsert_breakpoints): Likewise.
1513 (has_reinsert_breakpoints): Likewise.
1514
63c40ec7
YQ
15152016-07-21 Yao Qi <yao.qi@linaro.org>
1516
1517 * inferiors.c (get_thread_process): Make parameter const.
1518 * inferiors.h (get_thread_process): Update declaration.
1519 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1520 Add new parameters child_thread and parent_thread. Callers
1521 updated.
1522 * mem-break.h (clone_all_breakpoints): Update declaration.
1523
9aa76cd0
YQ
15242016-07-21 Yao Qi <yao.qi@linaro.org>
1525
1526 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1527 <command_list, handler>: Remove.
1528 (struct gdb_breakpoint): New.
1529 (struct other_breakpoint): New.
1530 (struct reinsert_breakpoint): New.
1531 (is_gdb_breakpoint): New function.
1532 (any_persistent_commands): Update command_list if
1533 is_gdb_breakpoint returns true.
1534 (set_breakpoint): Create breakpoints according to their types.
1535 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1536 (set_gdb_breakpoint_1): Likewise.
1537 (set_gdb_breakpoint): Likewise.
1538 (clear_breakpoint_conditions): Change parameter type to
1539 'struct gdb_breakpoint *'.
1540 (clear_breakpoint_commands): Likewise.
1541 (clear_breakpoint_conditions_and_commands): Likewise.
1542 (add_condition_to_breakpoint): Likewise.
1543 (add_breakpoint_condition): Likewise.
1544 (add_commands_to_breakpoint): Likewise.
1545 (check_breakpoints): Check other_breakpoint.
1546 (clone_one_breakpoint): Clone breakpopint according to its type.
1547 * mem-break.h (struct gdb_breakpoint): Declare.
1548 (set_gdb_breakpoint): Update declaration.
1549 (clear_breakpoint_conditions_and_commands): Likewise.
1550 (add_breakpoint_condition): Likewise.
1551 (add_breakpoint_commands): Likewise.
1552 * server.c (process_point_options): Change parameter type to
1553 'struct gdb_breakpoint *'.
1554
811f8301
YQ
15552016-07-21 Yao Qi <yao.qi@linaro.org>
1556
1557 * mem-break.c (set_breakpoint_at): Rename it to ...
1558 (set_breakpoint_type_at): ... it.
1559 (set_breakpoint_at): Call set_breakpoint_type_at.
1560 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1561 * mem-break.h (set_breakpoint_at): Update comments.
1562
b1c51e36
CLT
15632016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1564
1565 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1566 to buf parameter.
1567 (nios2_store_gregset): Likewise.
1568
ced2dffb
PA
15692016-07-01 Pedro Alves <palves@redhat.com>
1570 Antoine Tremblay <antoine.tremblay@ericsson.com>
1571
1572 * linux-low.c: Change interface to take the target lwp_info
1573 pointer directly and return void. Handle detaching from a zombie
1574 thread.
1575 (linux_detach_lwp_callback): New function.
1576 (linux_detach): Detach from the leader thread after detaching from
1577 the clone threads.
1578
2ac09a5b
YQ
15792016-06-28 Yao Qi <yao.qi@linaro.org>
1580
1581 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1582 for variable new_offset.
1583 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1584 (aarch64_ftrace_insn_reloc_cb): Likewise.
1585 (aarch64_ftrace_insn_reloc_tb): Likewise.
1586 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1587 PRIx64 instead of PRIx32.
1588
79e7fd4f
YQ
15892016-06-28 Yao Qi <yao.qi@linaro.org>
1590
1591 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1592 (the_low_target): Install arm_get_syscall_trapinfo.
1593
061fc021
YQ
15942016-06-28 Yao Qi <yao.qi@linaro.org>
1595
1596 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1597 function.
1598 (the_low_target): Install aarch64_get_syscall_trapinfo.
1599
4cc32bec
YQ
16002016-06-28 Yao Qi <yao.qi@linaro.org>
1601
1602 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1603 Callers updated.
1604 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1605 Remove parameter sysno.
1606 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1607 sysret.
1608
782c1122
AA
16092016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1610
1611 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1612 (s390_emit_ne_goto): Likewise.
1613 (s390_emit_lt_goto): Likewise.
1614 (s390_emit_le_goto): Likewise.
1615 (s390_emit_gt_goto): Likewise.
1616 (s390_emit_ge_goto): Likewise.
1617 (s390x_emit_eq_goto): Likewise.
1618 (s390x_emit_ne_goto): Likewise.
1619 (s390x_emit_lt_goto): Likewise.
1620 (s390x_emit_le_goto): Likewise.
1621 (s390x_emit_gt_goto): Likewise.
1622 (s390x_emit_ge_goto): Likewise.
1623 (s390_emit_ops_impl): Mark variable static.
1624 (s390x_emit_ops): Likewise.
1625
2e7b624b
YQ
16262016-06-17 Yao Qi <yao.qi@linaro.org>
1627
1628 * linux-low.c (handle_extended_wait): Call
1629 uninsert_reinsert_breakpoints for the parent process. Remove
1630 reinsert breakpoints from the child process. Reinsert them to
1631 the parent process when vfork is done.
1632 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1633 (reinsert_reinsert_breakpoints): New function.
1634 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1635 (reinsert_reinsert_breakpoints): Declare.
1636
8a81c5d7
YQ
16372016-06-17 Yao Qi <yao.qi@linaro.org>
1638
1639 * linux-low.c (handle_extended_wait): If the parent is doing
1640 step-over, remove the reinsert breakpoints from the forked child.
1641
f50bf8e5
YQ
16422016-06-17 Yao Qi <yao.qi@linaro.org>
1643
1644 * linux-low.c (unsuspend_all_lwps): Declare.
1645 (linux_low_filter_event): If thread exited, call finish_step_over.
1646 If step-over is finished, unsuspend other threads.
1647
8376a3cb
YQ
16482016-06-17 Yao Qi <yao.qi@linaro.org>
1649
1650 * linux-low.c (linux_resume_one_lwp_throw): Assert
1651 has_reinsert_breakpoints returns false.
1652 * mem-break.c (delete_disabled_breakpoints): Assert
1653 bp type isn't reinsert_breakpoint.
1654
f79b145d
YQ
16552016-06-17 Yao Qi <yao.qi@linaro.org>
1656
1657 * linux-low.c (maybe_hw_step): New function.
1658 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1659 (finish_step_over): Switch current_thread to lwp temporarily,
1660 and assert has_reinsert_breakpoints returns true.
1661 (proceed_one_lwp): Call maybe_hw_step.
1662 * mem-break.c (has_reinsert_breakpoints): New function.
1663 * mem-break.h (has_reinsert_breakpoints): Declare.
1664
0ae534d2
JT
16652016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1666
1667 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1668
fcdad592
YQ
16692016-05-17 Yao Qi <yao.qi@linaro.org>
1670
1671 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1672 instead of find_inferior.
1673
9e784964
YQ
16742016-05-05 Yao Qi <yao.qi@linaro.org>
1675
1676 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1677 Initialize res to zero.
1678
cf2ebb6e
YQ
16792016-05-05 Yao Qi <yao.qi@linaro.org>
1680
1681 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1682 to uint32_t.
1683
c1aebf87
UW
16842016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1685
1686 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1687 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1688 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1689
35fd2deb 16902016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 1691 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
1692
1693 * tracepoint.c (write_inferior_int8): New function.
1694 (cmd_qtenable_disable): Write enable flag using
1695 write_inferior_int8.
1696
484b3c32
YQ
16972016-04-25 Yao Qi <yao.qi@linaro.org>
1698
1699 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1700 (need_step_over_p): Return zero if the LWP has pending signals
1701 can be delivered on software single step target.
1702
85ba7d86
YQ
17032016-04-25 Yao Qi <yao.qi@linaro.org>
1704
1705 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1706 return instead of error.
1707
3539aa13
YQ
17082016-04-22 Yao Qi <yao.qi@linaro.org>
1709
1710 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1711 to 23.
1712
5b061e98
YQ
17132016-04-22 Yao Qi <yao.qi@linaro.org>
1714
1715 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1716 signal when stepping over breakpoint with software single
1717 step.
1718
3451269c
PA
17192016-04-21 Pedro Alves <palves@redhat.com>
1720
1721 * linux-s390-low.c (s390_collect_ptrace_register)
1722 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1723 add casts.
1724 (s390_check_regset): Use void * instead of gdb_byte *.
1725
a2358508
PA
17262016-04-20 Pedro Alves <palves@redhat.com>
1727
1728 * configure: Renegerate.
1729
6885166d
YQ
17302016-04-20 Yao Qi <yao.qi@linaro.org>
1731
1732 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1733 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1734 number 16.
1735 (arm_store_gregset): Likewise.
1736
2b863f51
WT
17372016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1738
1739 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1740 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1741 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1742 (amd64-avx-mpx-linux.c): New rules.
1743 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1744 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1745 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1746 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1747 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1748 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1749 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1750 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1751 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1752 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1753 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1754 * linux-x86-low.c (x86_linux_read_description): Add case for
1755 X86_XSTATE_AVX_MPX_MASK.
1756 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1757 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1758 init_registers_i386_avx_mpx_linux.
1759 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1760 (initialize_low_tracepoint): Call
1761 init_registers_i386_avx_mpx_linux.
1762 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1763 (initialize_low_tracepoint): Call
1764 init_registers_amd64_avx_mpx_linux.
1765 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1766 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1767 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1768 declarations.
1769
9b30624b
PA
17702016-04-18 Pedro Alves <palves@redhat.com>
1771
1772 * configure: Regenerate.
1773
45e3745e
AT
17742016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1775
1776 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1777 (aarch64_emit_sub): Likewise.
1778
2afc13ff
PA
17792016-04-12 Pedro Alves <palves@redhat.com>
1780
1781 * utils.c (prepare_to_throw_exception): Delete.
1782
6e774b13
SM
17832016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1784
1785 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1786
4dca19f8
MK
17872016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1788
1789 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1790
d0a9981f
MK
17912016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1792
1793 * linux-aarch64-ipa.c: Add <elf.h> include.
1794 * linux-ppc-ipa.c: Add <elf.h> include.
1795 * linux-s390-ipa.c: Add <elf.h> include.
1796
252db07e
MK
17972016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1798
1799 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1800 (get_raw_reg_ptr): Likewise.
1801 (get_trace_state_variable_value_ptr): Likewise.
1802 (set_trace_state_variable_value_ptr): Likewise.
1803 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1804 char *.
1805
14e2b6d9
MK
18062016-03-31 Wei-cheng Wang <cole945@gmail.com>
1807 Marcin Kościelnicki <koriakin@0x04.net>
1808
1809 PR/17221
1810 * linux-ppc-low.c (emit_insns): New function.
1811 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1812 (ppc_emit_prologue): New function.
1813 (ppc_emit_epilogue): New function.
1814 (ppc_emit_add): New function.
1815 (ppc_emit_sub): New function.
1816 (ppc_emit_mul): New function.
1817 (ppc_emit_lsh): New function.
1818 (ppc_emit_rsh_signed): New function.
1819 (ppc_emit_rsh_unsigned): New function.
1820 (ppc_emit_ext): New function.
1821 (ppc_emit_zero_ext): New function.
1822 (ppc_emit_log_not): New function.
1823 (ppc_emit_bit_and): New function.
1824 (ppc_emit_bit_or): New function.
1825 (ppc_emit_bit_xor): New function.
1826 (ppc_emit_bit_not): New function.
1827 (ppc_emit_equal): New function.
1828 (ppc_emit_less_signed): New function.
1829 (ppc_emit_less_unsigned): New function.
1830 (ppc_emit_ref): New function.
1831 (ppc_emit_const): New function.
1832 (ppc_emit_reg): New function.
1833 (ppc_emit_pop): New function.
1834 (ppc_emit_stack_flush): New function.
1835 (ppc_emit_swap): New function.
1836 (ppc_emit_stack_adjust): New function.
1837 (ppc_emit_call): New function.
1838 (ppc_emit_int_call_1): New function.
1839 (ppc_emit_void_call_2): New function.
1840 (ppc_emit_if_goto): New function.
1841 (ppc_emit_goto): New function.
1842 (ppc_emit_eq_goto): New function.
1843 (ppc_emit_ne_goto): New function.
1844 (ppc_emit_lt_goto): New function.
1845 (ppc_emit_le_goto): New function.
1846 (ppc_emit_gt_goto): New function.
1847 (ppc_emit_ge_goto): New function.
1848 (ppc_write_goto_address): New function.
1849 (ppc_emit_ops_impl): New static variable.
1850 (ppc64v1_emit_prologue): New function.
1851 (ppc64v2_emit_prologue): New function.
1852 (ppc64_emit_epilogue): New function.
1853 (ppc64_emit_add): New function.
1854 (ppc64_emit_sub): New function.
1855 (ppc64_emit_mul): New function.
1856 (ppc64_emit_lsh): New function.
1857 (ppc64_emit_rsh_signed): New function.
1858 (ppc64_emit_rsh_unsigned): New function.
1859 (ppc64_emit_ext): New function.
1860 (ppc64_emit_zero_ext): New function.
1861 (ppc64_emit_log_not): New function.
1862 (ppc64_emit_bit_and): New function.
1863 (ppc64_emit_bit_or): New function.
1864 (ppc64_emit_bit_xor): New function.
1865 (ppc64_emit_bit_not): New function.
1866 (ppc64_emit_equal): New function.
1867 (ppc64_emit_less_signed): New function.
1868 (ppc64_emit_less_unsigned): New function.
1869 (ppc64_emit_ref): New function.
1870 (ppc64_emit_const): New function.
1871 (ppc64v1_emit_reg): New function.
1872 (ppc64v2_emit_reg): New function.
1873 (ppc64_emit_pop): New function.
1874 (ppc64_emit_stack_flush): New function.
1875 (ppc64_emit_swap): New function.
1876 (ppc64v1_emit_call): New function.
1877 (ppc64v2_emit_call): New function.
1878 (ppc64v1_emit_int_call_1): New function.
1879 (ppc64v2_emit_int_call_1): New function.
1880 (ppc64v1_emit_void_call_2): New function.
1881 (ppc64v2_emit_void_call_2): New function.
1882 (ppc64_emit_if_goto): New function.
1883 (ppc64_emit_eq_goto): New function.
1884 (ppc64_emit_ne_goto): New function.
1885 (ppc64_emit_lt_goto): New function.
1886 (ppc64_emit_le_goto): New function.
1887 (ppc64_emit_gt_goto): New function.
1888 (ppc64_emit_ge_goto): New function.
1889 (ppc64v1_emit_ops_impl): New static variable.
1890 (ppc64v2_emit_ops_impl): New static variable.
1891 (ppc_emit_ops): New function.
1892 (linux_low_target): Wire in ppc_emit_ops.
1893
a2174ba4
MK
18942016-03-31 Wei-cheng Wang <cole945@gmail.com>
1895 Marcin Kościelnicki <koriakin@0x04.net>
1896
1897 PR/17221
1898 * Makefile.in: Add powerpc-*-ipa.o
1899 * configure.srv: Add ipa_obj for powerpc*-linux.
1900 * linux-ppc-ipa.c: New file.
1901 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1902 includes.
1903 (PPC_FIELD): New macro.
1904 (PPC_SEXT): New macro.
1905 (PPC_OP6): New macro.
1906 (PPC_BO): New macro.
1907 (PPC_LI): New macro.
1908 (PPC_BD): New macro.
1909 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1910 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1911 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1912 (ppc_get_thread_area): New function.
1913 (is_elfv2_inferior): New function.
1914 (gen_ds_form): New function.
1915 (GEN_STD): New macro.
1916 (GEN_STDU): New macro.
1917 (GEN_LD): New macro.
1918 (GEN_LDU): New macro.
1919 (gen_d_form): New function.
1920 (GEN_ADDI): New macro.
1921 (GEN_ADDIS): New macro.
1922 (GEN_LI): New macro.
1923 (GEN_LIS): New macro.
1924 (GEN_ORI): New macro.
1925 (GEN_ORIS): New macro.
1926 (GEN_LWZ): New macro.
1927 (GEN_STW): New macro.
1928 (GEN_STWU): New macro.
1929 (gen_xfx_form): New function.
1930 (GEN_MFSPR): New macro.
1931 (GEN_MTSPR): New macro.
1932 (GEN_MFCR): New macro.
1933 (GEN_MTCR): New macro.
1934 (GEN_SYNC): New macro.
1935 (GEN_LWSYNC): New macro.
1936 (gen_x_form): New function.
1937 (GEN_OR): New macro.
1938 (GEN_MR): New macro.
1939 (GEN_LWARX): New macro.
1940 (GEN_STWCX): New macro.
1941 (GEN_CMPW): New macro.
1942 (gen_md_form): New function.
1943 (GEN_RLDICL): New macro.
1944 (GEN_RLDICR): New macro.
1945 (gen_i_form): New function.
1946 (GEN_B): New macro.
1947 (GEN_BL): New macro.
1948 (gen_b_form): New function.
1949 (GEN_BNE): New macro.
1950 (GEN_LOAD): New macro.
1951 (GEN_STORE): New macro.
1952 (gen_limm): New function.
1953 (gen_atomic_xchg): New function.
1954 (gen_call): New function.
1955 (ppc_relocate_instruction): New function.
1956 (ppc_install_fast_tracepoint_jump_pad): New function.
1957 (ppc_get_min_fast_tracepoint_insn_len): New function.
1958 (ppc_get_ipa_tdesc_idx): New function.
1959 (the_low_target): Wire in the new functions.
1960 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1961 tdescs.
1962 * linux-ppc-tdesc.h: New file.
1963
a13c4696
MK
19642016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1965
1966 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1967 (alloc_jump_pad_buffer): New function.
1968 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1969 (alloc_jump_pad_buffer): New function.
1970 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1971 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1972 (alloc_jump_pad_buffer): New function.
1973 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1974 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1975 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1976 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1977
1cda1512
MK
19782016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1979
1980 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1981 * linux-amd64-ipa.c: Likewise.
1982 * linux-i386-ipa.c: Likewise.
1983 * linux-s390-ipa.c: Likewise.
1984 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1985 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1986 set_trace_state_variable_value_ptr.
1987 (struct ipa_sym_addresses): Likewise.
1988 (symbol_list): Likewise.
1989 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1990 accessing gdb_collect directly.
1991 (gdb_collect_ptr_type): New typedef.
1992 (get_raw_reg_ptr_type): New typedef.
1993 (get_trace_state_variable_value_ptr_type): New typedef.
1994 (set_trace_state_variable_value_ptr_type): New typedef.
1995 (gdb_collect_ptr): New global.
1996 (get_raw_reg_ptr): New global.
1997 (get_trace_state_variable_value_ptr): New global.
1998 (set_trace_state_variable_value_ptr): New global.
1999 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2000 accessing get_raw_reg directly.
2001 (get_get_tsv_func_addr): Likewise for
2002 get_trace_state_variable_value_ptr.
2003 (get_set_tsv_func_addr): Likewise for
2004 set_trace_state_variable_value_ptr.
2005 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2006
72fb5488
SM
20072016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2008
2009 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2010
28170b88
MK
20112016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2012
2013 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2014 packets.
2015 (relocate_instruction): Remove own_buf.
2016 * server.c (own_buf): Make global.
2017 (handle_v_requests): Make global.
2018 * server.h (own_buf): New declaration.
2019 (handle_v_requests): New prototype.
2020
f39e8743
MK
20212016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2022
2023 PR 18377
2024 * linux-s390-low.c (add_insns): New function.
2025 (s390_emit_prologue): New function.
2026 (s390_emit_epilogue): New function.
2027 (s390_emit_add): New function.
2028 (s390_emit_sub): New function.
2029 (s390_emit_mul): New function.
2030 (s390_emit_lsh): New function.
2031 (s390_emit_rsh_signed): New function.
2032 (s390_emit_rsh_unsigned): New function.
2033 (s390_emit_ext): New function.
2034 (s390_emit_log_not): New function.
2035 (s390_emit_bit_and): New function.
2036 (s390_emit_bit_or): New function.
2037 (s390_emit_bit_xor): New function.
2038 (s390_emit_bit_not): New function.
2039 (s390_emit_equal): New function.
2040 (s390_emit_less_signed): New function.
2041 (s390_emit_less_unsigned): New function.
2042 (s390_emit_ref): New function.
2043 (s390_emit_if_goto): New function.
2044 (s390_emit_goto): New function.
2045 (s390_write_goto_address): New function.
2046 (s390_emit_litpool): New function.
2047 (s390_emit_const): New function.
2048 (s390_emit_call): New function.
2049 (s390_emit_reg): New function.
2050 (s390_emit_pop): New function.
2051 (s390_emit_stack_flush): New function.
2052 (s390_emit_zero_ext): New function.
2053 (s390_emit_swap): New function.
2054 (s390_emit_stack_adjust): New function.
2055 (s390_emit_set_r2): New function.
2056 (s390_emit_int_call_1): New function.
2057 (s390_emit_void_call_2): New function.
2058 (s390_emit_eq_goto): New function.
2059 (s390_emit_ne_goto): New function.
2060 (s390_emit_lt_goto): New function.
2061 (s390_emit_le_goto): New function.
2062 (s390_emit_gt_goto): New function.
2063 (s390_emit_ge_goto): New function.
2064 (s390x_emit_prologue): New function.
2065 (s390x_emit_epilogue): New function.
2066 (s390x_emit_add): New function.
2067 (s390x_emit_sub): New function.
2068 (s390x_emit_mul): New function.
2069 (s390x_emit_lsh): New function.
2070 (s390x_emit_rsh_signed): New function.
2071 (s390x_emit_rsh_unsigned): New function.
2072 (s390x_emit_ext): New function.
2073 (s390x_emit_log_not): New function.
2074 (s390x_emit_bit_and): New function.
2075 (s390x_emit_bit_or): New function.
2076 (s390x_emit_bit_xor): New function.
2077 (s390x_emit_bit_not): New function.
2078 (s390x_emit_equal): New function.
2079 (s390x_emit_less_signed): New function.
2080 (s390x_emit_less_unsigned): New function.
2081 (s390x_emit_ref): New function.
2082 (s390x_emit_if_goto): New function.
2083 (s390x_emit_const): New function.
2084 (s390x_emit_call): New function.
2085 (s390x_emit_reg): New function.
2086 (s390x_emit_pop): New function.
2087 (s390x_emit_stack_flush): New function.
2088 (s390x_emit_zero_ext): New function.
2089 (s390x_emit_swap): New function.
2090 (s390x_emit_stack_adjust): New function.
2091 (s390x_emit_int_call_1): New function.
2092 (s390x_emit_void_call_2): New function.
2093 (s390x_emit_eq_goto): New function.
2094 (s390x_emit_ne_goto): New function.
2095 (s390x_emit_lt_goto): New function.
2096 (s390x_emit_le_goto): New function.
2097 (s390x_emit_gt_goto): New function.
2098 (s390x_emit_ge_goto): New function.
2099 (s390_emit_ops): New function.
2100 (struct linux_target_ops): Fill in emit_ops hook.
2101
abd9baf9
MK
21022016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2103
2104 PR 18377
2105 * Makefile.in: Add s390 IPA files.
2106 * configure.srv: Build IPA for s390.
2107 * linux-s390-ipa.c: New file.
2108 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2109 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2110 (tdesc_s390_linux32): Likewise.
2111 (init_registers_s390_linux32v1): Likewise.
2112 (tdesc_s390_linux32v1): Likewise.
2113 (init_registers_s390_linux32v2): Likewise.
2114 (tdesc_s390_linux32v2): Likewise.
2115 (init_registers_s390_linux64): Likewise.
2116 (tdesc_s390_linux64): Likewise.
2117 (init_registers_s390_linux64v1): Likewise.
2118 (tdesc_s390_linux64v1): Likewise.
2119 (init_registers_s390_linux64v2): Likewise.
2120 (tdesc_s390_linux64v2): Likewise.
2121 (init_registers_s390_te_linux64): Likewise.
2122 (tdesc_s390_te_linux64): Likewise.
2123 (init_registers_s390_vx_linux64): Likewise.
2124 (tdesc_s390_vx_linux64): Likewise.
2125 (init_registers_s390_tevx_linux64): Likewise.
2126 (tdesc_s390_tevx_linux64): Likewise.
2127 (init_registers_s390x_linux64): Likewise.
2128 (tdesc_s390x_linux64): Likewise.
2129 (init_registers_s390x_linux64v1): Likewise.
2130 (tdesc_s390x_linux64v1): Likewise.
2131 (init_registers_s390x_linux64v2): Likewise.
2132 (tdesc_s390x_linux64v2): Likewise.
2133 (init_registers_s390x_te_linux64): Likewise.
2134 (tdesc_s390x_te_linux64): Likewise.
2135 (init_registers_s390x_vx_linux64): Likewise.
2136 (tdesc_s390x_vx_linux64): Likewise.
2137 (init_registers_s390x_tevx_linux64): Likewise.
2138 (tdesc_s390x_tevx_linux64): Likewise.
2139 (have_hwcap_s390_vx): New static variable.
2140 (s390_arch_setup): Fill have_hwcap_s390_vx.
2141 (s390_get_thread_area): New function.
2142 (s390_ft_entry_gpr_esa): New const.
2143 (s390_ft_entry_gpr_zarch): New const.
2144 (s390_ft_entry_misc): New const.
2145 (s390_ft_entry_fr): New const.
2146 (s390_ft_entry_vr): New const.
2147 (s390_ft_main_31): New const.
2148 (s390_ft_main_64): New const.
2149 (s390_ft_exit_fr): New const.
2150 (s390_ft_exit_vr): New const.
2151 (s390_ft_exit_misc): New const.
2152 (s390_ft_exit_gpr_esa): New const.
2153 (s390_ft_exit_gpr_zarch): New const.
2154 (append_insns): New function.
2155 (s390_relocate_instruction): New function.
2156 (s390_install_fast_tracepoint_jump_pad): New function.
2157 (s390_get_min_fast_tracepoint_insn_len): New function.
2158 (s390_get_ipa_tdesc_idx): New function.
2159 (struct linux_target_ops): Wire in the above functions.
2160 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2161 * linux-s390-tdesc.h: New file.
2162
a4105d04
MK
21632016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2164
2165 * linux-s390-low.c (s390_supports_tracepoints): New function.
2166 (struct linux_target_ops): Fill supports_tracepoints hook.
2167
35ac8b3e
YQ
21682016-03-18 Yao Qi <yao.qi@linaro.org>
2169
2170 * linux-low.c (lwp_signal_can_be_delivered): New function.
2171 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2172
94610ec4
YQ
21732016-03-18 Yao Qi <yao.qi@linaro.org>
2174
2175 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2176 0 if signal is enqueued. Remove 'signal' from one debugging
2177 message. Move one debugging message to some lines below.
2178 Remove code setting 'signal' to 0.
2179
80aea927
YQ
21802016-03-18 Yao Qi <yao.qi@linaro.org>
2181
2182 * linux-low.c (linux_low_filter_event): Remove redundant
2183 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2184
b04fd3be
MK
21852016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2186
2187 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2188 (struct linux_target_ops): Wire in the above.
2189
c40c8d4b
YQ
21902016-03-03 Yao Qi <yao.qi@linaro.org>
2191
2192 * linux-low.c: Update comments to start_step_over.
2193
0f8288ae
YQ
21942016-03-03 Yao Qi <yao.qi@linaro.org>
2195
2196 PR server/19736
2197 * linux-low.c (handle_extended_wait): Set child suspended
2198 if event_lwp->bp_reinsert isn't zero.
2199
fdbd04a8
YQ
22002016-03-02 Yao Qi <yao.qi@linaro.org>
2201
2202 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2203 enqueue_pending_signal.
2204
6896a8fa
MK
22052016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2206
2207 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2208 is actually loaded.
2209
ab503087
MK
22102016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2211
2212 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2213 (s390_regmap_3264) [!__s390x__]: New global.
2214 (s390_collect_ptrace_register): Skip map entries containing -1.
2215 (s390_supply_ptrace_register): Ditto.
2216 (s390_fill_gprs_high): New function.
2217 (s390_store_gprs_high): New function.
2218 (s390_regsets): Add NT_S390_HIGH_GPRS.
2219 (s390_get_hwcap): Enable on 31-bit.
2220 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2221 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2222 Detect NT_S390_HIGH_GPRS.
2223 (s390_usrregs_info_3264): Enable on 31-bit.
2224 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2225 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2226
ae91f625
MK
22272016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2228
2229 PR gdb/13808
2230 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2231 * configure.srv: Ditto.
2232 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2233 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2234 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2235 (init_registers_amd64_linux): Remove prototype.
2236 (tdesc_amd64_linux): Remove declaration.
2237 (get_ipa_tdesc): New function.
2238 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2239 initialize remaining tdescs.
2240 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2241 (init_registers_i386_linux): Remove prototype.
2242 (tdesc_i386_linux): Remove declaration.
2243 (get_ipa_tdesc): New function.
2244 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2245 initialize remaining tdescs.
2246 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2247 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2248 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2249 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2250 (x86_get_ipa_tdesc_idx): New function.
2251 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2252 * linux-x86-tdesc.h: New file.
2253 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2254 (target_get_ipa_tdesc_idx): New macro.
2255 * tracepoint.c (ipa_tdesc_idx): New macro.
2256 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2257 (symbol_list): Add ipa_tdesc_idx.
2258 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2259 (ipa_tdesc): Remove.
2260 (ipa_tdesc_idx): New variable.
2261 (get_context_regcache): Use get_ipa_tdesc.
2262 (gdb_collect): Ditto.
2263 (gdb_probe): Ditto.
2264 * tracepoint.h (get_ipa_tdesc): New prototype.
2265 (ipa_tdesc): Remove.
2266
e7ad2f14
PA
22672016-02-24 Pedro Alves <palves@redhat.com>
2268
2269 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2270 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2271 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2272 Factor out common code between the USE_SIGTRAP_SIGINFO and
2273 !USE_SIGTRAP_SIGINFO blocks.
2274 (linux_low_filter_event): Call save_stop_reason instead of
2275 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2276 Update comments.
2277 (linux_wait_1): Update comments.
2278
657f9cde
WW
22792016-02-24 Wei-cheng Wang <cole945@gmail.com>
2280
2281 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2282 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2283 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2284 ppc_insert_point, ppc_remove_point.
2285
b00b61e1
MK
22862016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2287
2288 * linux-s390-low.c (s390_supports_z_point_type): New function.
2289 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2290
553cb527
YQ
22912016-02-16 Yao Qi <yao.qi@linaro.org>
2292
2293 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2294 PC. Get pc from regcache_read_pc.
2295
a5652c21
YQ
22962016-02-12 Yao Qi <yao.qi@linaro.org>
2297
2298 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2299 or linux_get_pc_32bit.
2300 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2301
ed443b61
YQ
23022016-02-12 Yao Qi <yao.qi@linaro.org>
2303
2304 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2305 arm_linux_get_next_pcs_fixup.
2306
020ecd38
MK
23072016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2308
2309 * tracepoint.c (x_tracepoint_action_download): Change
2310 write_inferior_data_ptr to write_inferior_data_pointer.
2311 (cmd_qtstart): Likewise.
2312 (write_inferior_data_ptr): Remove.
2313 (download_agent_expr): Change write_inferior_data_ptr to
2314 write_inferior_data_pointer.
2315 (download_tracepoint_1): Likewise.
2316 (download_tracepoint): Likewise.
2317 (download_trace_state_variables): Likewise.
2318
7cae9051
WW
23192016-02-11 Wei-cheng Wang <cole945@gmail.com>
2320 Marcin Kościelnicki <koriakin@0x04.net>
2321
2322 * tracepoint.c (struct tracepoint_action_ops): Remove.
2323 (struct tracepoint_action): Remove ops.
2324 (m_tracepoint_action_download, r_tracepoint_action_download)
2325 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2326 size and offset accordingly.
2327 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2328 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2329 (tracepoint_action_send, tracepoint_action_download): New functions.
2330 Helpers for trace action handlers.
2331 (add_tracepoint_action): Remove setup actions ops.
2332 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2333
9f6a71b4
YQ
23342016-02-10 Yao Qi <yao.qi@linaro.org>
2335
2336 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2337
1e94266c
SM
23382016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2339
2340 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2341 to AC_OUTPUT.
2342 * configure: Regenerate.
2343
8adce034
SM
23442016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2345
2346 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2347 void * to gdb_byte *.
2348 * linux-low.c (siginfo_fixup): Likewise.
2349 (linux_xfer_siginfo): Likewise.
2350 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2351 Likewise.
2352 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2353
93813b37
WT
23542016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2355
2356 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2357 to srv_tgtobj.
2358 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2359 to srv_tgtobj.
2360 * linux-x86-low.c [__x86_64__]: Include
2361 "nat/amd64-linux-siginfo.h".
2362 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2363 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2364 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2365 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2366 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2367 (cpt_si_fd, si_timerid, si_overrun): Move from
2368 nat/amd64-linux-siginfo.c.
2369 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2370
8424cc97
SM
23712016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2372
2373 * server.c (skip_to_semicolon): Remove.
2374 (process_point_options): Use strchrnul instead of
2375 skip_to_semicolon.
2376
4d18591b
YQ
23772016-01-26 Yao Qi <yao.qi@linaro.org>
2378
2379 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2380 * linux-low.c (install_software_single_step_breakpoints): Don't
2381 call regcache_read_pc.
2382 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2383 argument pc.
2384
d8020970
YQ
23852016-01-26 Yao Qi <yao.qi@linaro.org>
2386
2387 * linux-low.c (install_software_single_step_breakpoints): Call
2388 regcache_read_pc instead of get_pc.
2389
8b207339
YQ
23902016-01-26 Yao Qi <yao.qi@linaro.org>
2391
2392 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2393 (unblock_async_io): Rename to ...
2394 (block_unblock_async_io): ... it. New function.
2395 (enable_async_io): Don't install SIGIO handler. Unblock it
2396 instead.
2397 (disable_async_io): Don't ignore SIGIO. Block it instead.
2398 (initialize_async_io): Install SIGIO handler. Don't call
2399 unblock_async_io.
2400
18879fef
YQ
24012016-01-26 Yao Qi <yao.qi@linaro.org>
2402
2403 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2404 first character is '\003', call *the_target->request_interrupt.
2405
a0f8e08a
YQ
24062016-01-25 Yao Qi <yao.qi@linaro.org>
2407
2408 * remote-utils.c (new_thread_notify): Remove.
2409 (dead_thread_notify): Likewise.
2410 * remote-utils.h (new_thread_notify): Remove declaration.
2411 (dead_thread_notify): Likewise.
2412
cc5fd9ab
MK
24132016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2414
2415 * gdb.trace/pending.exp: Fix expected message on continue.
2416
99e8eb11
MK
24172016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2418
2419 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2420 it works properly on big-endian machines where sizeof (CORE_ADDR)
2421 != sizeof (void *).
2422
a994041d
PA
24232016-01-21 Pedro Alves <palves@redhat.com>
2424
2425 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2426 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2427 * configure: Regenerate.
2428
f7a6a40d
YQ
24292016-01-21 Yao Qi <yao.qi@linaro.org>
2430
2431 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2432 is_thumb and set it according to CPSR saved on the stack.
2433 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2434 arm_sigreturn_next_pc.
2435
6f69e520
YQ
24362016-01-18 Yao Qi <yao.qi@linaro.org>
2437
2438 * linux-low.c (linux_set_pc_64bit): New function.
2439 (linux_get_pc_64bit): New function.
2440 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2441 Declare.
2442 * linux-sparc-low.c (debug_threads): Remove declaration.
2443 (sparc_get_pc): Remove.
2444 (the_low_target): Use linux_get_pc_64bit instead of
2445 sparc_get_pc.
2446 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2447 (the_low_target): Use linux_get_pc_64bit and
2448 linux_set_pc_64bit.
2449
276d4552
YQ
24502016-01-18 Yao Qi <yao.qi@linaro.org>
2451
2452 * linux-arm-low.c (debug_threads): Remove declaration.
2453 (arm_get_pc, arm_set_pc): Remove.
2454 (the_low_target): Use linux_get_pc_32bit and
2455 linux_set_pc_32bit.
2456 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2457 (the_low_target): Use linux_get_pc_32bit and
2458 linux_set_pc_32bit.
2459 * linux-cris-low.c (debug_threads): Remove declaration.
2460 (cris_get_pc, cris_set_pc,): Remove.
2461 (the_low_target): Use linux_get_pc_32bit and
2462 linux_set_pc_32bit.
2463 * linux-crisv32-low.c (debug_threads): Remove declaration.
2464 (cris_get_pc, cris_set_pc): Remove.
2465 (the_low_target): Use linux_get_pc_32bit and
2466 linux_set_pc_32bit.
2467 * linux-low.c: Include inttypes.h.
2468 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2469 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2470 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2471 (the_low_target): Use linux_get_pc_32bit and
2472 linux_set_pc_32bit.
2473 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2474 (the_low_target): Use linux_get_pc_32bit and
2475 linux_set_pc_32bit.
2476 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2477 (the_low_target): Use linux_get_pc_32bit and
2478 linux_set_pc_32bit.
2479 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2480 (the_low_target): Use linux_get_pc_32bit and
2481 linux_set_pc_32bit.
2482 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2483 (the_low_target): Use linux_get_pc_32bit and
2484 linux_set_pc_32bit.
2485
eb0edac8
GB
24862016-01-18 Gary Benson <gbenson@redhat.com>
2487
2488 * configure.ac (AC_FUNC_FORK): New check.
2489 * config.in: Regenerate.
2490 * configure: Likewise.
2491
1b451dda
YQ
24922016-01-14 Yao Qi <yao.qi@linaro.org>
2493
2494 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2495 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2496 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2497 arm_get_next_pcs_ctor.
2498
82075af2
JS
24992016-01-12 Josh Stone <jistone@redhat.com>
2500 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2501
2502 * inferiors.h: Include "gdb_vecs.h".
2503 (struct process_info): Add syscalls_to_catch.
2504 * inferiors.c (remove_process): Free syscalls_to_catch.
2505 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2506 syscall_return stops.
2507 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2508 * server.c (handle_general_set): Handle QCatchSyscalls.
2509 (handle_query): Report support for QCatchSyscalls.
2510 * target.h (struct target_ops): Add supports_catch_syscall.
2511 (target_supports_catch_syscall): New macro.
2512 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2513 (struct lwp_info): Add syscall_state.
2514 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2515 Maintain syscall_state and syscalls_to_catch across exec.
2516 (get_syscall_trapinfo): New function, proxy to the_low_target.
2517 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2518 (linux_low_filter_event): Toggle syscall_state entry/return for
2519 syscall traps, and set it ignored for all others.
2520 (gdb_catching_syscalls_p): New function.
2521 (gdb_catch_this_syscall_p): New function.
2522 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2523 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2524 (linux_supports_catch_syscall): New function.
2525 (linux_target_ops): Install it.
2526 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2527 (the_low_target): Install it.
2528
8f13a3ce
MF
25292016-01-12 Mike Frysinger <vapier@gentoo.org>
2530
2531 * acinclude.m4: Include new ../warning.m4 file.
2532 * configure: Regenerated.
2533 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2534
5b3da067
MF
25352016-01-12 Mike Frysinger <vapier@gentoo.org>
2536
2537 * ax.c (is_goto_target): Mark static.
2538 * linux-low.c (register_addr): Likewise.
2539 (linux_fetch_registers, linux_store_registers): Likewise.
2540 * mem-break.c (any_persistent_commands): Fix old prototype.
2541 (add_commands_to_breakpoint): Mark static.
2542 * regcache.c (find_register_by_name): Delete unused func.
2543 * remote-utils.c (hex_or_minus_one): Mark static.
2544 * server.c (monitor_show_help): Mark static.
2545 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2546 handle_v_requests): Likewise.
2547
bc504a31
PA
25482016-01-12 Pedro Alves <palves@redhat.com>
2549
2550 Remove use of the registered trademark symbol throughout.
2551
5a0dd67a
YQ
25522016-01-08 Yao Qi <yao.qi@linaro.org>
2553
2554 * remote-utils.c (getpkt): If c is '\003', call target hook
2555 request_interrupt.
2556
b2ca446f
YQ
25572016-01-06 Yao Qi <yao.qi@linaro.org>
2558
2559 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2560 linux-aarch32-low.c.
2561 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2562 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2563 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2564 (thumb2_breakpoint): Declare.
2565 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2566 linux-aarch32-low.h.
2567 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2568 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2569 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2570
edd88788
JB
25712016-01-01 Joel Brobecker <brobecker@adacore.com>
2572
2573 * gdbreplay.c (gdbreplay_version): Change copyright year in
2574 version message.
2575 * server.c (gdbserver_version): Likewise.
2576
65da7f14
PP
25772015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2578
2579 * server.c (crc32_table): Delete.
2580 (crc32): Use libiberty's xcrc32 function.
2581
4abd5ed2
JB
25822015-12-22 Joel Brobecker <brobecker@adacore.com>
2583
2584 * lynx-low.c (lynx_delete_thread_callback): New function.
2585 (lynx_mourn): Properly delete our process and all of its
2586 threads. Remove call to clear_inferiors.
2587
0e50fe5c
JB
25882015-12-22 Joel Brobecker <brobecker@adacore.com>
2589
2590 * target.c (thread_search_callback): Add check that
2591 the thread_stopped target callback is not NULL before
2592 calling it.
2593
35adc03f
YQ
25942015-12-21 Yao Qi <yao.qi@linaro.org>
2595
2596 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2597 arm breakpoint.
2598
bd2b2909
AT
25992015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2600
2601 * server.c (handle_query): Call target_supports_software_single_step.
2602
7fe5e27e
AT
26032015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2604
2605 * linux-low.c (single_step): New function.
2606 (linux_resume_one_lwp_throw): Call single_step.
2607 (start_step_over): Likewise.
2608
d9311bfa
AT
26092015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2610
2611 * Makefile.in (SFILES): Append arch/arm-linux.c,
2612 arch/arm-get-next-pcs.c.
2613 (arm-linux.o): New rule.
2614 (arm-get-next-pcs.o): New rule.
2615 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2616 arm-linux.o.
2617 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2618 to linux-aarch32-low.c.
2619 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2620 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2621 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2622 (thumb2_breakpoint_len): Likewise.
2623 (arm_is_thumb_mode): Make non-static.
2624 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2625 from linux-aarch32-low.c.
2626 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2627 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2628 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2629 (thumb2_breakpoint_len): Likewise.
2630 (arm_is_thumb_mode): New declaration.
2631 * linux-arm-low.c: Include arch/arm-linux.h
2632 aarch/arm-get-next-pcs.h, sys/syscall.h.
2633 (get_next_pcs_ops): New struct.
2634 (get_next_pcs_addr_bits_remove): New function.
2635 (get_next_pcs_is_thumb): New function.
2636 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2637 (arm_sigreturn_next_pc): Likewise.
2638 (get_next_pcs_syscall_next_pc): Likewise.
2639 (arm_gdbserver_get_next_pcs): Likewise.
2640 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2641 Initialize.
2642 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2643 * server.h: Include gdb_vecs.h.
2644
68ce2059
AT
26452015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2646
2647 * Makefile.in (SFILES): Append common/common-regcache.c.
2648 (OBS): Append common-regcache.o.
2649 (common-regcache.o): New rule.
2650 * regcache.c (init_register_cache): Initialize cache to
2651 REG_UNAVAILABLE.
2652 (regcache_raw_read_unsigned): New function.
2653 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2654 register_status enum.
2655
fa5308bd
AT
26562015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2657
2658 * linux-aarch64-low.c (the_low_targets): Rename
2659 breakpoint_reinsert_addr to get_next_pcs.
2660 * linux-arm-low.c (the_low_targets): Likewise.
2661 * linux-bfin-low.c (the_low_targets): Likewise.
2662 * linux-cris-low.c (the_low_targets): Likewise.
2663 * linux-crisv32-low.c (the_low_targets): Likewise.
2664 * linux-low.c (can_software_single_step): Likewise.
2665 (install_software_single_step_breakpoints): New function.
2666 (start_step_over): Use install_software_single_step_breakpoints.
2667 * linux-low.h: New CORE_ADDR vector.
2668 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2669 get_next_pcs.
2670 * linux-mips-low.c (the_low_targets): Likewise.
2671 * linux-nios2-low.c (the_low_targets): Likewise.
2672 * linux-sparc-low.c (the_low_targets): Likewise.
2673
4a6ed09b
PA
26742015-12-17 Pedro Alves <palves@redhat.com>
2675
2676 * linux-low.c (linux_kill_one_lwp): Remove references to
2677 LinuxThreads.
2678 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2679 to 'kill'.
2680 (linux_init_signals): Delete.
2681 (initialize_low): Adjust.
2682 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2683
7544db95
PA
26842015-12-16 Pedro Alves <palves@redhat.com>
2685
2686 * configure.ac (compiler warning flags): When testing a
2687 -Wno-foo option, check whether -Wfoo works instead.
2688 * configure: Regenerate.
2689
8020350c
DB
26902015-12-11 Don Breazeal <donb@codesourcery.com>
2691
2692 * server.c (process_serial_event): Don't exit from gdbserver
2693 in remote mode if there are still active inferiors.
2694
db91f502
YQ
26952015-12-11 Yao Qi <yao.qi@linaro.org>
2696
2697 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2698 arm_breakpoint_at if the process is 32-bit.
2699
b37a6290
YQ
27002015-12-11 Yao Qi <yao.qi@linaro.org>
2701
2702 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2703 arm breakpoint.
2704
17b1509a
YQ
27052015-12-07 Yao Qi <yao.qi@linaro.org>
2706
2707 * configure.srv: Append arm.o to srv_tgtobj for
2708 aarch64*-*-linux* target.
2709 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2710 from linux-arm-low.c.
2711 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2712 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2713 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2714 (thumb2_breakpoint_len): Likewise.
2715 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2716 (arm_breakpoint_kinds): Likewise.
2717 (arm_breakpoint_kind_from_pc): Likewise.
2718 (arm_sw_breakpoint_from_kind): Likewise.
2719 (arm_breakpoint_kind_from_current_state): Likewise.
2720 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2721 (arm_sw_breakpoint_from_kind): Declare.
2722 (arm_breakpoint_kind_from_current_state): Declare.
2723 (arm_breakpoint_at): Declare.
2724 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2725 arm_sw_breakpoint_from_kind if process is 32-bit.
2726 (aarch64_breakpoint_kind_from_pc): New function.
2727 (aarch64_breakpoint_kind_from_current_state): New function.
2728 (the_low_target): Initialize fields breakpoint_kind_from_pc
2729 and breakpoint_kind_from_current_state.
2730 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2731 linux-aarch32-low.c.
2732 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2733 (arm_breakpoint, arm_breakpoint_len): Likewise.
2734 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2735 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2736 (arm_is_thumb_mode): Likewise.
2737 (arm_breakpoint_at): Likewise.
2738 (arm_breakpoint_kind_from_pc): Likewise.
2739 (arm_sw_breakpoint_from_kind): Likewise.
2740 (arm_breakpoint_kind_from_current_state): Likewise.
2741
2742 Revert:
2743 2015-08-04 Yao Qi <yao.qi@linaro.org>
2744
2745 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2746 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2747 * server.c (extended_protocol): Remove "static".
2748 * server.h (extended_protocol): Declare it.
2749
ece66d65
JS
27502015-12-04 Josh Stone <jistone@redhat.com>
2751
2752 * target.h (struct target_ops) <arch_setup>: Rename to ...
2753 (struct target_ops) <post_create_inferior>: ... this.
2754 (target_arch_setup): Rename to ...
2755 (target_post_create_inferior): ... this, calling post_create_inferior.
2756 * server.c (start_inferior): Update target_arch_setup calls to
2757 target_post_create_inferior.
2758 * linux-low.c (linux_low_ptrace_options): Forward declare.
2759 (linux_arch_setup): Update its comment for general use.
2760 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2761 (struct linux_target_ops): Use linux_post_create_inferior.
2762 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2763 to post_create_inferior.
2764 * nto-low.c (struct nto_target_ops): Likewise.
2765 * spu-low.c (struct spu_target_ops): Likewise.
2766 * win32-low.c (struct win32_target_ops): Likewise.
2767
e58c48b4
AT
27682015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2769
2770 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2771
fbec8956
AT
27722015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2773
2774 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2775 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2776 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2777 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2778 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2779 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2780 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2781 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2782 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2783 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2784 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2785 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2786
9b4c5f87
AT
27872015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2788
2789 * linux-low.c (linux_look_up_symbols): Don't call
2790 linux_supports_traceclone.
2791 * linux-low.h (thread_db_init): Remove use_events argument.
2792 * thread-db.c (thread_db_use_event): Remove global variable.
2793 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2794 (struct thread_db) <td_create_bp>: Remove field.
2795 (thread_db_create_event): Remove function.
2796 (thread_db_enable_reporting): Likewise.
2797 (find_one_thread): Don't check for thread_db_use_events.
2798 (attach_thread): Likewise.
2799 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2800 (try_thread_db_load_1): Don't check for thread_db_use_events.
2801 (thread_db_init): Remove use_events argument and thread events
2802 handling.
2803 (remove_thread_event_breakpoints): Remove function.
2804 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2805
7d00775e
AT
28062015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2807
2808 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2809 New function.
2810 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2811 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2812 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2813 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2814 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2815 Initialize.
2816 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2817 New function.
2818 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2819 * linux-low.c (can_hardware_single_step): Use
2820 supports_hardware_single_step.
2821 (can_software_single_step): New function.
2822 (start_step_over): Call can_software_single_step.
2823 (linux_supports_hardware_single_step): New function.
2824 (struct target_ops) <supports_software_single_step>: Initialize.
2825 * linux-low.h (struct linux_target_ops)
2826 <supports_hardware_single_step>: Initialize.
2827 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2828 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2829 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2830 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2831 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2832 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2833 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2834 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2835 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2836 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2837 Initialize.
2838 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2839 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2840 Initialize.
2841 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2842 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2843 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2844 New function.
2845 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2846 * target.h (struct target_ops): <supports_software_single_step>:
2847 New field.
2848 (target_supports_software_single_step): New macro.
2849
2d97cd35
AT
28502015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2851
2852 * linux-low.c (linux_wait_1): Fix pc advance condition.
2853 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2854 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2855
769ef81f
AT
28562015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2857
2858 * linux-arm-low.c (arm_is_thumb_mode): New function.
2859 (arm_breakpoint_at): Use arm_is_thumb_mode.
2860 (arm_breakpoint_kind_from_current_state): New function.
2861 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2862 Initialize.
2863 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2864 (linux_breakpoint_kind_from_current_state): New function.
2865 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2866 * linux-low.h (struct linux_target_ops)
2867 <breakpoint_kind_from_current_state>: New field.
2868 * target.h (struct target_ops): Likewise.
2869 (target_breakpoint_kind_from_current_state): New macro.
2870
1bebeeca
PA
28712015-11-30 Pedro Alves <palves@redhat.com>
2872
2873 * linux-low.c (linux_resume): Wake up the event loop before
2874 returning.
2875
a67a9fae
PA
28762015-11-30 Pedro Alves <palves@redhat.com>
2877
2878 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2879 check.
2880 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2881 to -1.
2882 * target.c (struct thread_search): New structure.
2883 (thread_search_callback): New function.
2884 (prev_general_thread): New global.
2885 (prepare_to_access_memory, done_accessing_memory): New functions.
2886 * target.h (prepare_to_access_memory, done_accessing_memory):
2887 Replace macros with function declarations.
2888
f2faf941
PA
28892015-11-30 Pedro Alves <palves@redhat.com>
2890
2891 PR 14618
2892 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2893 report TARGET_WAITKIND_NO_RESUMED.
2894 * remote-utils.c (prepare_resume_reply): Handle
2895 TARGET_WAITKIND_NO_RESUMED.
2896 * server.c (report_no_resumed): New global.
2897 (handle_query) <qSupported>: Handle "no-resumed+". Report
2898 "no-resumed+" support.
2899 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2900 return error if the client doesn't support no-resumed events.
2901 (push_stop_notification): New function.
2902 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2903 events if the client supports them.
2904
a681f9c9
PA
29052015-11-30 Pedro Alves <palves@redhat.com>
2906
2907 * linux-low.c (thread_still_has_status_pending_p): Don't check
2908 vCont;t here.
2909 (lwp_resumed): New function.
2910 (status_pending_p_callback): Return early if the LWP is not
2911 supposed to be resumed.
2912
65706a29
PA
29132015-11-30 Pedro Alves <palves@redhat.com>
2914
2915 * linux-low.c (handle_extended_wait): Assert that the LWP's
2916 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2917 thread create events, leave the new child's status pending.
2918 (linux_low_filter_event): If GDB wants to hear about thread exit
2919 events, leave the LWP marked dead and don't delete it.
2920 (linux_wait_for_event_filtered): Don't check for thread exit.
2921 (filter_exit_event): New function.
2922 (linux_wait_1): Use it, when returning an exit event.
2923 (linux_resume_one_lwp_throw): Assert that the LWP's
2924 waitstatus is TARGET_WAITKIND_IGNORE.
2925 * remote-utils.c (prepare_resume_reply): Handle
2926 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2927 * server.c (report_thread_events): New global.
2928 (handle_general_set): Handle QThreadEvents.
2929 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2930 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2931 TARGET_WAITKIND_THREAD_EXITED.
2932 * server.h (report_thread_events): Declare.
2933
56cf4bed
PA
29342015-11-30 Pedro Alves <palves@redhat.com>
2935
2936 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2937 the thread's last_resume_kind was resume_stop.
2938
500c1d85
PA
29392015-11-30 Pedro Alves <palves@redhat.com>
2940
2941 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2942 before returning.
2943
de979965
PA
29442015-11-30 Pedro Alves <palves@redhat.com>
2945
2946 * server.c (handle_v_requests): Handle vCtrlC.
2947
34c65914
PA
29482015-11-30 Pedro Alves <palves@redhat.com>
2949
2950 * gdbthread.h (find_any_thread_of_pid): Declare.
2951 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2952 functions.
2953 * server.c (handle_query): If current_thread is NULL, look for
2954 another thread of the selected process.
2955
79efa585 29562015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 2957 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
2958
2959 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2960 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2961 name in reply.
2962 * target.h (struct target_ops) <thread_name>: New field.
2963 (target_thread_name): New macro.
2964
80d82c19
JB
29652015-11-23 Joel Brobecker <brobecker@adacore.com>
2966
2967 * regcache.h (regcache_invalidate_pid): Add declaration.
2968 * regcache.c (regcache_invalidate_pid): New function, extracted
2969 from regcache_invalidate.
2970 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2971 Add trivial documentation comment.
2972 * lynx-low.c: Use regcache_invalidate_pid instead of
2973 regcache_invalidate.
2974
64da5dd5
JB
29752015-11-23 Joel Brobecker <brobecker@adacore.com>
2976
2977 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2978 and Elf64_auxv_t if the target is Android.
2979
37ce4055
DE
29802015-11-22 Doug Evans <xdje42@gmail.com>
2981
2982 * target.h: #include <sys/types.h>.
2983
06e03fff
PA
29842015-11-19 Pedro Alves <palves@redhat.com>
2985
2986 * linux-low.c (linux_process_qsupported): Change prototype.
2987 Adjust.
2988 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2989 Change prototype.
2990 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2991 and adjust to loop over all features.
2992 * server.c (handle_query) <qSupported>: Adjust to call
2993 target_process_qsupported once, passing it a vector of unprocessed
2994 features.
2995 * target.h (struct target_ops) <process_qsupported>: Change
2996 prototype.
2997 (target_process_qsupported): Adjust.
2998
9a084706
PA
29992015-11-19 Pedro Alves <palves@redhat.com>
3000
3001 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3002 mode.
3003 * configure: Regenerate.
3004
dad44a1f
PA
30052015-11-19 Pedro Alves <palves@redhat.com>
3006
3007 * configure: Regenerate.
3008
231c0592
YQ
30092015-11-19 Yao Qi <yao.qi@linaro.org>
3010
3011 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3012 type to uint32_t.
3013
6c1c9a8b
YQ
30142015-11-19 Yao Qi <yao.qi@linaro.org>
3015
3016 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3017 (struct aarch64_operand): Move enum out.
3018
9caa3311
YQ
30192015-11-19 Yao Qi <yao.qi@linaro.org>
3020
3021 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3022 struct user_fpsimd_state *.
3023 (aarch64_store_fpregset): Likewise.
3024
6a69a054
YQ
30252015-11-19 Yao Qi <yao.qi@linaro.org>
3026
3027 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3028 struct user_pt_regs *.
3029 (aarch64_store_gregset): Likewise.
3030
1798301e
PA
30312015-11-18 Pedro Alves <palves@redhat.com>
3032
3033 * Makefile.in (all_object_files): Add $IPA_OBJS.
3034
ce7715e2
PA
30352015-11-17 Pedro Alves <palves@redhat.com>
3036
3037 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3038 GDB_SIGNAL_0 and gdb_signal_to_string.
3039
c0879059
PA
30402015-11-17 Pedro Alves <palves@redhat.com>
3041
3042 * win32-low.c (handle_output_debug_string): Remove parameter.
3043 (win32_kill): Remove our_status local and adjust call to
3044 handle_output_debug_string.
3045 (get_child_debug_event): Adjust call to
3046 handle_output_debug_string.
3047
1996e237
SM
30482015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3049
3050 * linux-mips-low.c (mips_fill_gregset): Add cast.
3051 (mips_store_gregset): Likewise.
3052 (mips_fill_fpregset): Likewise.
3053 (mips_store_fpregset): Likewise.
3054
cbec665b
SM
30552015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3056
3057 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3058 priv.
3059
eb3e3c67
SM
30602015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3061
3062 * linux-mips-low.c (mips_linux_new_thread): Change type of
3063 watch_type to enum target_hw_bp_type.
3064
171de4b8
SM
30652015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3066
3067 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3068 Change return type to arm_hwbp_type.
3069
04248ead
SM
30702015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3071
3072 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3073 (arm_store_gregset): Likewise.
3074 * linux-arm-low.c (arm_get_hwcap): Likewise.
3075 (arm_read_description): Likewise.
3076
04b3479c
SM
30772015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3078
3079 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3080
2bc84e8a
SM
30812015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3082
3083 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3084 (ppc_fill_vsxregset): Likewise.
3085 (ppc_store_vsxregset): Likewise.
3086 (ppc_fill_vrregset): Likewise.
3087 (ppc_store_vrregset): Likewise.
3088 (ppc_fill_evrregset): Likewise.
3089 (ppc_store_evrregset): Likewise.
3090
e6c5bb05
SM
30912015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3092
3093 * linux-ppc-low.c (ppc_usrregs_info): Remove
3094 forward-declaration.
3095 (ppc_arch_setup): Move lower in file.
3096
7ea45d72
SM
30972015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3098
3099 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3100 (ps_pdwrite): Likewise.
3101
69291610
HW
31022015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3103
3104 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3105 to after assert checks.
3106
b42945fd
SM
31072015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3108
3109 * proc-service.c (ps_pdread): Add/adjust casts.
3110 (ps_pdwrite): Add/adjust casts.
3111
d6f85c84
SM
31122015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3113
3114 * server.c (handle_search_memory_1): Cast return value of
3115 memmem.
3116
f98cd059
SM
31172015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3118
3119 * server.c (write_qxfer_response): Change type of data to
3120 gdb_byte *.
3121
d2412fa5
PA
31222015-10-29 Pedro Alves <palves@redhat.com>
3123
3124 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3125
c17414a2
PA
31262015-10-29 Pedro Alves <palves@redhat.com>
3127
3128 * tracepoint.c (clear_installed_tracepoints): Add casts.
3129
e053fbc4
PA
31302015-10-29 Pedro Alves <palves@redhat.com>
3131
3132 * server.c (handle_v_cont, process_serial_event): Add enum
3133 gdb_signal casts to signal parsing code.
3134
add67df8
PA
31352015-10-29 Pedro Alves <palves@redhat.com>
3136
3137 * linux-low.h (NULL_REGSET): Define.
3138 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3139 * linux-arm-low.c (arm_regsets): Likewise.
3140 * linux-crisv32-low.c (cris_regsets): Likewise.
3141 * linux-m68k-low.c (m68k_regsets): Likewise.
3142 * linux-mips-low.c (mips_regsets): Likewise.
3143 * linux-nios2-low.c (nios2_regsets): Likewise.
3144 * linux-ppc-low.c (ppc_regsets): Likewise.
3145 * linux-s390-low.c (s390_regsets): Likewise.
3146 * linux-sh-low.c (sh_regsets): Likewise.
3147 * linux-sparc-low.c (sparc_regsets): Likewise.
3148 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3149 * linux-tile-low.c (tile_regsets): Likewise.
3150 * linux-x86-low.c (x86_regsets): Likewise.
3151 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3152
50bc912a
PA
31532015-10-29 Pedro Alves <palves@redhat.com>
3154
3155 * linux-low.h (NULL_REGSET): Define.
3156 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3157 * linux-arm-low.c (arm_regsets): Likewise.
3158 * linux-crisv32-low.c (cris_regsets): Likewise.
3159 * linux-m68k-low.c (m68k_regsets): Likewise.
3160 * linux-mips-low.c (mips_regsets): Likewise.
3161 * linux-nios2-low.c (nios2_regsets): Likewise.
3162 * linux-ppc-low.c (ppc_regsets): Likewise.
3163 * linux-s390-low.c (s390_regsets): Likewise.
3164 * linux-sh-low.c (sh_regsets): Likewise.
3165 * linux-sparc-low.c (sparc_regsets): Likewise.
3166 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3167 * linux-tile-low.c (tile_regsets): Likewise.
3168 * linux-x86-low.c (x86_regsets): Likewise.
3169 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3170
682b2546
DE
31712015-10-26 Doug Evans <dje@google.com>
3172
3173 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3174
963843d4
DE
31752015-10-26 Doug Evans <dje@google.com>
3176
3177 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3178
d41401ac
DE
31792015-10-26 Doug Evans <dje@google.com>
3180
3181 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3182 for debug_printf.
3183 (attach_thread, find_new_threads_callback): Ditto.
3184
3db28855
AT
31852015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3186
3187 * mem-break.h (set_breakpoint_data): Remove.
3188
fb78e89c
AT
31892015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3190
3191 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3192 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3193 (initialize_low): Remove set_breakpoint_data call.
3194 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3195 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3196 (initialize_low): Remove set_breakpoint_data call.
3197 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3198 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3199 (initialize_low): Remove set_breakpoint_data call.
3200
2e6ee069
AT
32012015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3202
3203 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3204 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3205 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3206 * target.h (target_breakpoint_kind_from_pc): New macro.
3207
1652a986
AT
32082015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3209
3210 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3211 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3212 the default breakpoint kind.
3213
abeead09
AT
32142015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3215
3216 * linux-arm-low.c (arm_supports_z_point_type): Add software
3217 breakpoint support.
3218
b0b4b501
AT
32192015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3220
3221 * linux-arm-low.c: Refactor breakpoint definitions.
3222 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3223 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3224
8689682c
AT
32252015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3226
3227 * Makefile.in: Add arm.c/o.
3228 * configure.srv: Likewise.
3229 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3230 (arm_breakpoint_kind_from_pc): New function.
3231 (arm_sw_breakpoint_from_kind): Return proper kind.
3232 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3233
27165294
AT
32342015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3235
3236 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3237 removal.
3238 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3239 (struct raw_breakpoint) <size>: Remove.
3240 (struct raw_breakpoint) <kind>: Add.
3241 (bp_size): New function.
3242 (bp_opcode): Likewise.
3243 (find_raw_breakpoint_at): Adjust for kind.
3244 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3245 (remove_memory_breakpoint): Adjust for kind call bp_size.
3246 (set_raw_breakpoint_at): Adjust for kind.
3247 (set_breakpoint): Likewise.
3248 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3249 (delete_raw_breakpoint): Adjust for kind.
3250 (delete_breakpoint): Likewise.
3251 (find_gdb_breakpoint): Likewise.
3252 (set_gdb_breakpoint_1): Likewise.
3253 (set_gdb_breakpoint): Likewise.
3254 (delete_gdb_breakpoint_1): Likewise.
3255 (delete_gdb_breakpoint): Likewise.
3256 (uninsert_raw_breakpoint): Likewise.
3257 (reinsert_raw_breakpoint): Likewise.
3258 (set_breakpoint_data): Remove.
3259 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3260 (check_mem_read): Adjust for kind call bp_size.
3261 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3262 (clone_one_breakpoint): Adjust for kind.
3263 * mem-break.h (set_gdb_breakpoint): Likewise.
3264 (delete_gdb_breakpoint): Likewise.
3265 * server.c (process_serial_event): Likewise.
3266
dd373349
AT
32672015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3268
3269 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3270 (struct linux_target_ops) <breakpoint>: Remove.
3271 (struct linux_target_ops) <breakpoint_len>: Remove.
3272 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3273 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3274 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3275 (arm_sw_breakpoint_from_kind): New function.
3276 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3277 (struct linux_target_ops) <breakpoint>: Remove.
3278 (struct linux_target_ops) <breakpoint_len>: Remove.
3279 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3280 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3281 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3282 (struct linux_target_ops) <breakpoint>: Remove.
3283 (struct linux_target_ops) <breakpoint_len>: Remove.
3284 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3285 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3286 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3287 (struct linux_target_ops) <breakpoint>: Remove.
3288 (struct linux_target_ops) <breakpoint_len>: Remove.
3289 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3290 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3291 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3292 and sw_breakpoint_from_kind to increment the pc.
3293 (linux_breakpoint_kind_from_pc): New function.
3294 (linux_sw_breakpoint_from_kind): New function.
3295 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3296 (initialize_low): Call breakpoint_kind_from_pc and
3297 sw_breakpoint_from_kind to replace breakpoint_data/len.
3298 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3299 New field.
3300 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3301 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3302 (struct linux_target_ops) <breakpoint>: Remove.
3303 (struct linux_target_ops) <breakpoint_len>: Remove.
3304 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3305 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3306 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3307 (struct linux_target_ops) <breakpoint>: Remove.
3308 (struct linux_target_ops) <breakpoint_len>: Remove.
3309 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3310 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3311 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3312 (struct linux_target_ops) <breakpoint>: Remove.
3313 (struct linux_target_ops) <breakpoint_len>: Remove.
3314 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3315 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3316 * linux-nios2-low.c (nios2_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-ppc-low.c (ppc_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-s390-low.c (s390_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-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3332 (struct linux_target_ops) <breakpoint>: Remove.
3333 (struct linux_target_ops) <breakpoint_len>: Remove.
3334 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3335 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3336 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3337 (struct linux_target_ops) <breakpoint>: Remove.
3338 (struct linux_target_ops) <breakpoint_len>: Remove.
3339 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3340 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3341 * linux-tic6x-low.c (tic6x_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-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3347 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3348 (struct linux_target_ops) <breakpoint>: Remove.
3349 (struct linux_target_ops) <breakpoint_len>: Remove.
3350 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3351 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3352 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3353 (struct linux_target_ops) <breakpoint>: Remove.
3354 (struct linux_target_ops) <breakpoint_len>: Remove.
3355 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3356 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3357
4cd98a19
AT
33582015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3359
3360 * linux-cris-low.c (cris_get_pc): Remove void arg.
3361
774ee6d2
AR
33622015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3363
3364 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3365 variable name.
3366
833dcd29
AR
33672015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3368
3369 * inferiors.c (thread_pid_matches_callback): New function.
3370 (find_thread_process): New function.
3371 (remove_thread): Reset current_thread.
3372 (remove_process): Assert threads have been removed first.
3373
8d689ee5
YQ
33742015-10-15 Yao Qi <yao.qi@linaro.org>
3375
3376 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3377 if it is 3.
3378 (aarch64_remove_point): Likewise.
3379 * regcache.c (regcache_register_size): New function.
3380
1c2e1515
YQ
33812015-10-12 Yao Qi <yao.qi@linaro.org>
3382
3383 * linux-aarch64-low.c: Update all callers as emit_load_store
3384 is renamed to aarch64_emit_load_store.
3385
e1c587c3
YQ
33862015-10-12 Yao Qi <yao.qi@linaro.org>
3387
3388 * linux-aarch64-low.c: Update all callers of function renaming
3389 from emit_insn to aarch64_emit_insn.
3390
b6542f81
YQ
33912015-10-12 Yao Qi <yao.qi@linaro.org>
3392
3393 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3394 arch/aarch64-insn.h.
3395 (struct aarch64_memory_operand): Likewise.
3396 (ENCODE): Likewise.
3397 (emit_insn): Move to arch/aarch64-insn.c.
3398 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3399 (emit_load_store): Move to arch/aarch64-insn.c.
3400 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3401 (can_encode_int32): Remove.
3402
246994ce
YQ
34032015-10-12 Yao Qi <yao.qi@linaro.org>
3404
3405 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3406 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3407 (aarch64_relocate_instruction): Likewise.
3408 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3409 (struct aarch64_insn_visitor): Likewise.
3410
0badd99f
YQ
34112015-10-12 Yao Qi <yao.qi@linaro.org>
3412
3413 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3414 (struct aarch64_insn_visitor): New.
3415 (struct aarch64_insn_relocation_data): New.
3416 (aarch64_ftrace_insn_reloc_b): New function.
3417 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3418 (aarch64_ftrace_insn_reloc_cb): Likewise.
3419 (aarch64_ftrace_insn_reloc_tb): Likewise.
3420 (aarch64_ftrace_insn_reloc_adr): Likewise.
3421 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3422 (aarch64_ftrace_insn_reloc_others): Likewise.
3423 (visitor): New.
3424 (aarch64_relocate_instruction): Use visitor.
3425
dfaffe9d
YQ
34262015-10-12 Yao Qi <yao.qi@linaro.org>
3427
3428 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3429 int. Add argument buf.
3430 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3431 aarch64_relocate_instruction.
3432
70b439f0
YQ
34332015-10-12 Yao Qi <yao.qi@linaro.org>
3434
3435 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3436 argument insn. Remove local variable insn. Don't call
3437 target_read_uint32.
3438 (aarch64_install_fast_tracepoint_jump_pad): Call
3439 target_read_uint32.
3440
7781c06f
YQ
34412015-09-30 Yao Qi <yao.qi@linaro.org>
3442
3443 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3444 (emit_load_store_pair): Likewise.
3445
9a3c8263
SM
34462015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3447
3448 * dll.c (match_dll): Add cast(s).
3449 (unloaded_dll): Likewise.
3450 * linux-low.c (second_thread_of_pid_p): Likewise.
3451 (delete_lwp_callback): Likewise.
3452 (count_events_callback): Likewise.
3453 (select_event_lwp_callback): Likewise.
3454 (linux_set_resume_request): Likewise.
3455 * server.c (accumulate_file_name_length): Likewise.
3456 (emit_dll_description): Likewise.
3457 (handle_qxfer_threads_worker): Likewise.
3458 (visit_actioned_threads): Likewise.
3459 * thread-db.c (any_thread_of): Likewise.
3460 * tracepoint.c (same_process_p): Likewise.
3461 (match_blocktype): Likewise.
3462 (build_traceframe_info_xml): Likewise.
3463
224c3ddb
SM
34642015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3465
3466 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3467 assignment.
3468 (gdb_unparse_agent_expr): Likewise.
3469 * hostio.c (require_data): Likewise.
3470 (handle_pread): Likewise.
3471 * linux-low.c (disable_regset): Likewise.
3472 (fetch_register): Likewise.
3473 (store_register): Likewise.
3474 (get_dynamic): Likewise.
3475 (linux_qxfer_libraries_svr4): Likewise.
3476 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3477 (set_fast_tracepoint_jump): Likewise.
3478 (uninsert_fast_tracepoint_jumps_at): Likewise.
3479 (reinsert_fast_tracepoint_jumps_at): Likewise.
3480 (validate_inserted_breakpoint): Likewise.
3481 (clone_agent_expr): Likewise.
3482 * regcache.c (init_register_cache): Likewise.
3483 * remote-utils.c (putpkt_binary_1): Likewise.
3484 (decode_M_packet): Likewise.
3485 (decode_X_packet): Likewise.
3486 (look_up_one_symbol): Likewise.
3487 (relocate_instruction): Likewise.
3488 (monitor_output): Likewise.
3489 * server.c (handle_search_memory): Likewise.
3490 (handle_qxfer_exec_file): Likewise.
3491 (handle_qxfer_libraries): Likewise.
3492 (handle_qxfer): Likewise.
3493 (handle_query): Likewise.
3494 (handle_v_cont): Likewise.
3495 (handle_v_run): Likewise.
3496 (captured_main): Likewise.
3497 * target.c (write_inferior_memory): Likewise.
3498 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3499 * tracepoint.c (init_trace_buffer): Likewise.
3500 (add_tracepoint_action): Likewise.
3501 (add_traceframe): Likewise.
3502 (add_traceframe_block): Likewise.
3503 (cmd_qtdpsrc): Likewise.
3504 (cmd_qtdv): Likewise.
3505 (cmd_qtstatus): Likewise.
3506 (response_source): Likewise.
3507 (response_tsv): Likewise.
3508 (cmd_qtnotes): Likewise.
3509 (gdb_collect): Likewise.
3510 (initialize_tracepoint): Likewise.
3511
afbe19f8
PL
35122015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3513
3514 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3515 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3516 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3517 <NOP>: New.
3518 (enum aarch64_condition_codes): New enum.
3519 (w0): New static global.
3520 (fp): Likewise.
3521 (lr): Likewise.
3522 (struct aarch64_memory_operand) <type>: New
3523 MEMORY_OPERAND_POSTINDEX type.
3524 (postindex_memory_operand): New helper function.
3525 (emit_ret): New function.
3526 (emit_load_store_pair): New function, factored out of emit_stp
3527 with support for MEMORY_OPERAND_POSTINDEX.
3528 (emit_stp): Rewrite using emit_load_store_pair.
3529 (emit_ldp): New function.
3530 (emit_load_store): Likewise.
3531 (emit_ldr): Mention post-index instruction in comment.
3532 (emit_ldrh): New function.
3533 (emit_ldrb): New function.
3534 (emit_ldrsw): Mention post-index instruction in comment.
3535 (emit_str): Likewise.
3536 (emit_subs): New function.
3537 (emit_cmp): Likewise.
3538 (emit_and): Likewise.
3539 (emit_orr): Likewise.
3540 (emit_orn): Likewise.
3541 (emit_eor): Likewise.
3542 (emit_mvn): Likewise.
3543 (emit_lslv): Likewise.
3544 (emit_lsrv): Likewise.
3545 (emit_asrv): Likewise.
3546 (emit_mul): Likewise.
3547 (emit_sbfm): Likewise.
3548 (emit_sbfx): Likewise.
3549 (emit_ubfm): Likewise.
3550 (emit_ubfx): Likewise.
3551 (emit_csinc): Likewise.
3552 (emit_cset): Likewise.
3553 (emit_nop): Likewise.
3554 (emit_ops_insns): New helper function.
3555 (emit_pop): Likewise.
3556 (emit_push): Likewise.
3557 (aarch64_emit_prologue): New function.
3558 (aarch64_emit_epilogue): Likewise.
3559 (aarch64_emit_add): Likewise.
3560 (aarch64_emit_sub): Likewise.
3561 (aarch64_emit_mul): Likewise.
3562 (aarch64_emit_lsh): Likewise.
3563 (aarch64_emit_rsh_signed): Likewise.
3564 (aarch64_emit_rsh_unsigned): Likewise.
3565 (aarch64_emit_ext): Likewise.
3566 (aarch64_emit_log_not): Likewise.
3567 (aarch64_emit_bit_and): Likewise.
3568 (aarch64_emit_bit_or): Likewise.
3569 (aarch64_emit_bit_xor): Likewise.
3570 (aarch64_emit_bit_not): Likewise.
3571 (aarch64_emit_equal): Likewise.
3572 (aarch64_emit_less_signed): Likewise.
3573 (aarch64_emit_less_unsigned): Likewise.
3574 (aarch64_emit_ref): Likewise.
3575 (aarch64_emit_if_goto): Likewise.
3576 (aarch64_emit_goto): Likewise.
3577 (aarch64_write_goto_address): Likewise.
3578 (aarch64_emit_const): Likewise.
3579 (aarch64_emit_call): Likewise.
3580 (aarch64_emit_reg): Likewise.
3581 (aarch64_emit_pop): Likewise.
3582 (aarch64_emit_stack_flush): Likewise.
3583 (aarch64_emit_zero_ext): Likewise.
3584 (aarch64_emit_swap): Likewise.
3585 (aarch64_emit_stack_adjust): Likewise.
3586 (aarch64_emit_int_call_1): Likewise.
3587 (aarch64_emit_void_call_2): Likewise.
3588 (aarch64_emit_eq_goto): Likewise.
3589 (aarch64_emit_ne_goto): Likewise.
3590 (aarch64_emit_lt_goto): Likewise.
3591 (aarch64_emit_le_goto): Likewise.
3592 (aarch64_emit_gt_goto): Likewise.
3593 (aarch64_emit_ge_got): Likewise.
3594 (aarch64_emit_ops_impl): New static global variable.
3595 (aarch64_emit_ops): New target function, return
3596 &aarch64_emit_ops_impl.
3597 (struct linux_target_ops): Install it.
3598
bb903df0
PL
35992015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3600
3601 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3602 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3603 aarch64-ipa.o.
3604 * linux-aarch64-ipa.c: New file.
3605 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3606 and endian.h.
3607 (aarch64_get_thread_area): New target method.
3608 (extract_signed_bitfield): New helper function.
3609 (aarch64_decode_ldr_literal): New function.
3610 (enum aarch64_opcodes): New enum.
3611 (struct aarch64_register): New struct.
3612 (struct aarch64_operand): New struct.
3613 (x0): New static global.
3614 (x1): Likewise.
3615 (x2): Likewise.
3616 (x3): Likewise.
3617 (x4): Likewise.
3618 (w2): Likewise.
3619 (ip0): Likewise.
3620 (sp): Likewise.
3621 (xzr): Likewise.
3622 (aarch64_register): New helper function.
3623 (register_operand): Likewise.
3624 (immediate_operand): Likewise.
3625 (struct aarch64_memory_operand): New struct.
3626 (offset_memory_operand): New helper function.
3627 (preindex_memory_operand): Likewise.
3628 (enum aarch64_system_control_registers): New enum.
3629 (ENCODE): New macro.
3630 (emit_insn): New helper function.
3631 (emit_b): New function.
3632 (emit_bcond): Likewise.
3633 (emit_cb): Likewise.
3634 (emit_tb): Likewise.
3635 (emit_blr): Likewise.
3636 (emit_stp): Likewise.
3637 (emit_ldp_q_offset): Likewise.
3638 (emit_stp_q_offset): Likewise.
3639 (emit_load_store): Likewise.
3640 (emit_ldr): Likewise.
3641 (emit_ldrsw): Likewise.
3642 (emit_str): Likewise.
3643 (emit_ldaxr): Likewise.
3644 (emit_stxr): Likewise.
3645 (emit_stlr): Likewise.
3646 (emit_data_processing_reg): Likewise.
3647 (emit_data_processing): Likewise.
3648 (emit_add): Likewise.
3649 (emit_sub): Likewise.
3650 (emit_mov): Likewise.
3651 (emit_movk): Likewise.
3652 (emit_mov_addr): Likewise.
3653 (emit_mrs): Likewise.
3654 (emit_msr): Likewise.
3655 (emit_sevl): Likewise.
3656 (emit_wfe): Likewise.
3657 (append_insns): Likewise.
3658 (can_encode_int32_in): New helper function.
3659 (aarch64_relocate_instruction): New function.
3660 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3661 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3662 (struct linux_target_ops): Install aarch64_get_thread_area,
3663 aarch64_install_fast_tracepoint_jump_pad and
3664 aarch64_get_min_fast_tracepoint_insn_len.
3665
787749ea
PL
36662015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3667
3668 * Makefile.in (aarch64-insn.o): New rule.
3669 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3670
9812b2e6
YQ
36712015-09-21 Yao Qi <yao.qi@linaro.org>
3672
3673 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3674
18fe412b
YQ
36752015-09-21 Yao Qi <yao.qi@linaro.org>
3676
3677 * tracepoint.c (max_jump_pad_size): Remove.
3678
a0cc84cd
YQ
36792015-09-18 Yao Qi <yao.qi@linaro.org>
3680
3681 * linux-aarch64-low.c: Don't include sys/uio.h.
3682 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3683
d78908cf
WW
36842015-09-16 Wei-cheng Wang <cole945@gmail.com>
3685
3686 * tracepoint.c (eval_result_type): Change prototype.
3687 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3688
d57e0d50
PA
36892015-09-15 Pedro Alves <palves@redhat.com>
3690
3691 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3692 Check whether to report exec events instead of checking whether
3693 multiprocess is enabled.
3694
5a676acc
PA
36952015-09-15 Pedro Alves <palves@redhat.com>
3696
3697 PR remote/18965
3698 * remote-utils.c (prepare_resume_reply): Merge
3699 TARGET_WAITKIND_VFORK_DONE switch case with the
3700 TARGET_WAITKIND_FORKED case.
3701
7c5d0fad
YQ
37022015-09-15 Yao Qi <yao.qi@linaro.org>
3703
3704 * server.c (handle_query): Check string comparison using
3705 "else if" instead of "if".
3706
750ce8d1
YQ
37072015-09-15 Yao Qi <yao.qi@linaro.org>
3708
3709 * server.c (vCont_supported): New global variable.
3710 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3711 matches. Append ";vContSupported+" to own_buf.
3712 (handle_v_requests): Append ";s;S" to own_buf if target supports
3713 hardware single step or vCont_supported is false.
3714 (capture_main): Set vCont_supported to zero.
3715
70b90b91
YQ
37162015-09-15 Yao Qi <yao.qi@linaro.org>
3717
3718 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3719 it to ...
3720 (linux_supports_hardware_single_step): ... New function.
3721 (linux_target_ops): Update.
3722 * lynx-low.c (lynx_target_ops): Set field
3723 supports_hardware_single_step to target_can_do_hardware_single_step.
3724 * nto-low.c (nto_target_ops): Likewise.
3725 * spu-low.c (spu_target_ops): Likewise.
3726 * win32-low.c (win32_target_ops): Likewise.
3727 * target.c (target_can_do_hardware_single_step): New function.
3728 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3729 Remove. <supports_hardware_single_step>: New field.
3730 (target_supports_conditional_breakpoints): Remove.
3731 (target_supports_hardware_single_step): New macro.
3732 (target_can_do_hardware_single_step): Declare.
3733 * server.c (handle_query): Use target_supports_hardware_single_step
3734 instead of target_supports_conditional_breakpoints.
3735
ade90bde
YQ
37362015-09-15 Yao Qi <yao.qi@linaro.org>
3737
3738 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3739 function.
3740 (struct linux_target_ops the_low_target): Install
3741 aarch64_linux_siginfo_fixup.
3742
94585166
DB
37432015-09-11 Don Breazeal <donb@codesourcery.com>
3744 Luis Machado <lgustavo@codesourcery.com>
3745
3746 * linux-low.c (linux_mourn): Static declaration.
3747 (linux_arch_setup): Move in front of
3748 handle_extended_wait.
3749 (linux_arch_setup_thread): New function.
3750 (handle_extended_wait): Handle exec events. Call
3751 linux_arch_setup_thread. Make event_lwp argument a
3752 pointer-to-a-pointer.
3753 (check_zombie_leaders): Do not check stopped threads.
3754 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3755 (linux_low_filter_event): Add lwp and thread for exec'ing
3756 non-leader thread if leader thread has been deleted.
3757 Refactor code into linux_arch_setup_thread and call it.
3758 Pass child lwp pointer by reference to handle_extended_wait.
3759 (linux_wait_for_event_filtered): Update comment.
3760 (linux_wait_1): Prevent clobbering exec event status.
3761 (linux_supports_exec_events): New function.
3762 (linux_target_ops) <supports_exec_events>: Initialize new member.
3763 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3764 new member.
3765 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3766 * server.c (report_exec_events): New global variable.
3767 (handle_query): Handle qSupported query for exec-events feature.
3768 (captured_main): Initialize report_exec_events.
3769 * server.h (report_exec_events): Declare new global variable.
3770 * target.h (struct target_ops) <supports_exec_events>: New
3771 member.
3772 (target_supports_exec_events): New macro.
3773 * win32-low.c (win32_target_ops) <supports_exec_events>:
3774 Initialize new member.
3775
0568462b
MM
37762015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3777
3778 * linux-low.c (linux_low_enable_btrace): Remove.
3779 (linux_target_ops): Replace linux_low_enable_btrace with
3780 linux_enable_btrace.
3781
39edd165
YQ
37822015-09-03 Yao Qi <yao.qi@linaro.org>
3783
3784 * linux-aarch64-low.c (aarch64_insert_point): Call
3785 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3786 returns true.
3787
1db33b5a
UW
37882015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3789
3790 * linux-low.c (check_stopped_by_breakpoint): Use
3791 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3792
ab290430
PA
37932015-08-27 Pedro Alves <palves@redhat.com>
3794
3795 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3796
8d749320
SM
37972015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3798
6711b7f8
SM
3799 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3800 the XNEW-family equivalent.
8d749320
SM
3801 (compile_bytecodes): Likewise.
3802 * dll.c (loaded_dll): Likewise.
3803 * event-loop.c (append_callback_event): Likewise.
3804 (create_file_handler): Likewise.
3805 (create_file_event): Likewise.
3806 * hostio.c (handle_open): Likewise.
3807 * inferiors.c (add_thread): Likewise.
3808 (add_process): Likewise.
3809 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3810 * linux-arm-low.c (arm_new_process): Likewise.
3811 (arm_new_thread): Likewise.
3812 * linux-low.c (add_to_pid_list): Likewise.
3813 (linux_add_process): Likewise.
3814 (handle_extended_wait): Likewise.
3815 (add_lwp): Likewise.
3816 (enqueue_one_deferred_signal): Likewise.
3817 (enqueue_pending_signal): Likewise.
3818 (linux_resume_one_lwp_throw): Likewise.
3819 (linux_resume_one_thread): Likewise.
3820 (linux_read_memory): Likewise.
3821 (linux_write_memory): Likewise.
3822 * linux-mips-low.c (mips_linux_new_process): Likewise.
3823 (mips_linux_new_thread): Likewise.
3824 (mips_add_watchpoint): Likewise.
3825 * linux-x86-low.c (initialize_low_arch): Likewise.
3826 * lynx-low.c (lynx_add_process): Likewise.
3827 * mem-break.c (set_raw_breakpoint_at): Likewise.
3828 (set_breakpoint): Likewise.
3829 (add_condition_to_breakpoint): Likewise.
3830 (add_commands_to_breakpoint): Likewise.
3831 (clone_agent_expr): Likewise.
3832 (clone_one_breakpoint): Likewise.
3833 * regcache.c (new_register_cache): Likewise.
3834 * remote-utils.c (look_up_one_symbol): Likewise.
3835 * server.c (queue_stop_reply): Likewise.
3836 (start_inferior): Likewise.
3837 (queue_stop_reply_callback): Likewise.
3838 (handle_target_event): Likewise.
3839 * spu-low.c (fetch_ppc_memory): Likewise.
3840 (store_ppc_memory): Likewise.
3841 * target.c (set_target_ops): Likewise.
3842 * thread-db.c (thread_db_load_search): Likewise.
3843 (try_thread_db_load_1): Likewise.
3844 * tracepoint.c (add_tracepoint): Likewise.
3845 (add_tracepoint_action): Likewise.
3846 (create_trace_state_variable): Likewise.
3847 (cmd_qtdpsrc): Likewise.
3848 (cmd_qtro): Likewise.
3849 (add_while_stepping_state): Likewise.
3850 * win32-low.c (child_add_thread): Likewise.
3851 (get_image_name): Likewise.
3852
ed8b7b42
YQ
38532015-08-25 Yao Qi <yao.qi@linaro.org>
3854
3855 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3856
db3cb7cb
YQ
38572015-08-25 Yao Qi <yao.qi@linaro.org>
3858
3859 * Makefile.in (aarch64-linux.o): New rule.
3860 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3861 srv_tgtobj.
3862 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3863 (aarch64_init_debug_reg_state): Make it extern.
3864 (aarch64_linux_prepare_to_resume): Remove.
3865
f6011a1c
YQ
38662015-08-25 Yao Qi <yao.qi@linaro.org>
3867
3868 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3869 lwp_arch_private_info and ptid_of_lwp.
3870
88e2cf7e
YQ
38712015-08-25 Yao Qi <yao.qi@linaro.org>
3872
3873 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3874 Find proc_info by find_process_pid. All callers updated.
3875
5e35436e
YQ
38762015-08-25 Yao Qi <yao.qi@linaro.org>
3877
3878 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3879 Remove.
3880 (debug_reg_change_callback): Remove.
3881 (aarch64_notify_debug_reg_change): Remove.
3882
4a8a7965
YQ
38832015-08-25 Yao Qi <yao.qi@linaro.org>
3884
3885 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3886 Call current_lwp_ptid.
3887
32a271ee
YQ
38882015-08-25 Yao Qi <yao.qi@linaro.org>
3889
3890 * linux-aarch64-low.c (debug_reg_change_callback): Use
3891 debug_printf.
3892
0d51c8d7
YQ
38932015-08-25 Yao Qi <yao.qi@linaro.org>
3894
3895 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3896
31a43dd5
YQ
38972015-08-25 Yao Qi <yao.qi@linaro.org>
3898
3899 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3900
8ee52567
YQ
39012015-08-25 Yao Qi <yao.qi@linaro.org>
3902
3903 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3904 the code.
3905
ff3f0f45
YQ
39062015-08-25 Yao Qi <yao.qi@linaro.org>
3907
3908 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3909 Remove.
3910 (debug_reg_change_callback): Remove argument entry and add argument
3911 lwp. Remove local variable thread. Don't print thread id in the
3912 debugging output. Don't check whether pid of thread equals to pid.
3913 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3914 iterate_over_lwps instead find_inferior.
3915
3d40fbb5
PA
39162015-08-24 Pedro Alves <palves@redhat.com>
3917
3918 * inferiors.c (get_first_process): New function.
3919 * inferiors.h (get_first_process): New declaration.
3920 * remote-utils.c (read_ptid): Default to the first process in the
3921 list, instead of to the current thread's process.
3922
438e1e42
PA
39232015-08-24 Pedro Alves <palves@redhat.com>
3924
3925 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3926 * event-loop.c: Likewise.
3927 * remote-utils.c: Likewise.
3928 * tracepoint.c: Likewise.
3929
a8c6d4fc
PA
39302015-08-24 Pedro Alves <palves@redhat.com>
3931
3932 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3933 ptid_get_lwp.
3934
99b0bb12
PA
39352015-08-21 Pedro Alves <palves@redhat.com>
3936
3937 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3938 instead of literal 1.
3939
f8904751
PA
39402015-08-21 Pedro Alves <palves@redhat.com>
3941
3942 * tdesc.c (default_description): Explicitly zero-initialize.
3943
465a859e
PA
39442015-08-21 Pedro Alves <palves@redhat.com>
3945
3946 PR gdb/18749
3947 * inferiors.c (remove_thread): Discard any pending stop reply for
3948 this thread.
3949 * server.c (remove_all_on_match_pid): Rename to ...
3950 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3951 instead of a pid.
3952 (discard_queued_stop_replies): Change parameter to a ptid. Now
3953 extern.
3954 (handle_v_kill, kill_inferior_callback, captured_main)
3955 (process_serial_event): Adjust.
3956 * server.h (discard_queued_stop_replies): Declare.
3957
f0db101d
PA
39582015-08-21 Pedro Alves <palves@redhat.com>
3959
3960 * linux-low.c (wait_for_sigstop): Always switch to no thread
3961 selected if the previously current thread dies.
3962 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3963 process instead of the current thread's.
3964 * remote-utils.c (input_interrupt): Don't check if there's no
3965 current thread.
3966 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3967 current thread to the general thread fails, error out.
3968 (handle_qxfer_auxv, handle_qxfer_libraries)
3969 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3970 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3971 (handle_query): Check if there's a thread selected instead of
3972 checking whether there's any thread in the thread list.
3973 (handle_qxfer_threads, handle_qxfer_btrace)
3974 (handle_qxfer_btrace_conf): Don't error out early if there's no
3975 thread in the thread list.
3976 (handle_v_cont, myresume): Don't set the current thread to the
3977 continue thread.
3978 (process_serial_event) <Hg handling>: Also set thread_id if the
3979 previous general thread is still alive.
3980 (process_serial_event) <g/G handling>: If setting the current
3981 thread to the general thread fails, error out.
3982 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3983 thread's lwp instead of the current thread's.
3984 * target.c (set_desired_thread): If the desired thread was not
3985 found, leave the current thread pointing to NULL. Return an int
3986 (boolean) indicating success.
3987 * target.h (set_desired_thread): Change return type to int.
3988
40045d91
MF
39892015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3990
3991 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3992 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3993 #includes.
3994 (ps_get_thread_area): New function.
3995
45face3b
GB
39962015-08-19 Gary Benson <gbenson@redhat.com>
3997
3998 * hostio.c (handle_pread): Do not attempt to read more data
3999 than hostio_reply_with_data can fit in a packet.
4000
16d5f642
JB
40012015-08-18 Joel Brobecker <brobecker@adacore.com>
4002
4003 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4004
a738da3a
MF
40052015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4006
4007 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4008
33ebda9d
PA
40092015-08-06 Pedro Alves <palves@redhat.com>
4010
4011 * tracepoint.c (expr_eval_result): Now an int.
4012
a44892be
PA
40132015-08-06 Pedro Alves <palves@redhat.com>
4014
4015 * gdbthread.h (struct regcache): Forward declare.
4016 (struct thread_info) <regcache_data>: Now a struct regcache
4017 pointer.
4018 * inferiors.c (inferior_regcache_data)
4019 (set_inferior_regcache_data): Now work with struct regcache
4020 pointers.
4021 * inferiors.h (struct regcache): Forward declare.
4022 (inferior_regcache_data, set_inferior_regcache_data): Now work
4023 with struct regcache pointers.
4024 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4025 (free_register_cache_thread): Remove struct regcache pointer
4026 casts.
4027
608a1e46
PA
40282015-08-06 Pedro Alves <palves@redhat.com>
4029
4030 * server.c (captured_main): On error, print the exception message
4031 to stderr, and if run_once is set, throw a quit.
4032
f0ce0d3a
PA
40332015-08-06 Pedro Alves <palves@redhat.com>
4034
4035 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4036 the current thread.
4037
bf47e248
PA
40382015-08-06 Pedro Alves <palves@redhat.com>
4039
4040 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4041 reading beyond the passed in buffer length.
4042
b6b9ffcc
PL
40432015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4044
4045 * tracepoint.c (symbol_list) <required>: Remove.
4046
863d01bd
PA
40472015-08-06 Pedro Alves <palves@redhat.com>
4048
4049 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4050 count if stopping and suspending threads.
4051 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4052 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4053 (linux_detach): Complete an ongoing step-over.
4054 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4055 throughout.
4056 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4057 (linux_wait_1): If passing a signal to the inferior after
4058 finishing a step-over, unsuspend and re-resume all lwps. If we
4059 see a single-step event but the thread should be continuing, don't
4060 pass the trap to gdb.
4061 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4062 internal_error instead of gdb_assert.
4063 (enqueue_pending_signal): New function.
4064 (check_ptrace_stopped_lwp_gone): Add debug output.
4065 (start_step_over): Use internal_error instead of gdb_assert.
4066 (complete_ongoing_step_over): New function.
4067 (linux_resume_one_thread): Don't resume a suspended thread.
4068 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4069 it stepping.
4070
00db26fa
PA
40712015-08-06 Pedro Alves <palves@redhat.com>
4072
4073 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4074 (linux_thread_alive): Use lwp_is_marked_dead.
4075 (extended_event_reported): Delete.
4076 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4077 instead of extended_event_reported.
4078 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4079 as well.
4080 (lwp_is_marked_dead): New function.
4081 (lwp_running): Use lwp_is_marked_dead.
4082 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4083 comment.
4084
ad071a30
PA
40852015-08-06 Pedro Alves <palves@redhat.com>
4086
4087 * linux-low.c (linux_wait_1): Move fork event output out of the
4088 !report_to_gdb check. Pass event_child->waitstatus to
4089 target_waitstatus_to_string instead of ourstatus.
4090
524b57e6
YQ
40912015-08-04 Yao Qi <yao.qi@linaro.org>
4092
4093 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4094 if current_thread is 32 bit.
4095
6085d6f6
YQ
40962015-08-04 Yao Qi <yao.qi@linaro.org>
4097
4098 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4099 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4100 * server.c (extended_protocol): Remove "static".
4101 * server.h (extended_protocol): Declare it.
4102
8a7e4587
YQ
41032015-08-04 Yao Qi <yao.qi@linaro.org>
4104
4105 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4106 both aarch64 and aarch32.
4107 (aarch64_set_pc): Likewise.
4108
3b53ae99
YQ
41092015-08-04 Yao Qi <yao.qi@linaro.org>
4110
4111 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4112 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4113 arm-with-neon.xml to srv_xmlfiles.
4114 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4115 (is_64bit_tdesc): New function.
4116 (aarch64_linux_read_description): New function.
4117 (aarch64_arch_setup): Call aarch64_linux_read_description.
4118 (regs_info): Rename to regs_info_aarch64.
4119 (aarch64_regs_info): Return right regs_info.
4120 (initialize_low_arch): Call initialize_low_arch_aarch32.
4121
bd9e6534
YQ
41222015-08-04 Yao Qi <yao.qi@linaro.org>
4123
4124 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4125 * linux-aarch32-low.c: New file.
4126 * linux-aarch32-low.h: New file.
4127 * linux-arm-low.c (arm_fill_gregset): Move it to
4128 linux-aarch32-low.c.
4129 (arm_store_gregset): Likewise.
4130 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4131 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4132 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4133 (regs_info): Rename to regs_info_arm.
4134 (arm_regs_info): Return regs_info_aarch32 if
4135 have_ptrace_getregset is 1 and target description is
4136 arm_with_neon or arm_with_vfpv3.
4137 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4138 Call initialize_low_arch_aarch32 instead.
4139
ded48a5e
YQ
41402015-08-04 Yao Qi <yao.qi@linaro.org>
4141
4142 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4143 * linux-low.c: ... here.
4144 * linux-low.h (have_ptrace_getregset): Declare it.
4145
96e9210f
PA
41462015-08-04 Pedro Alves <palves@redhat.com>
4147
4148 * thread-db.c (struct thread_db): Use new typedefs.
4149 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4150 CHK calls.
4151 (disable_thread_event_reporting): Cast result of dlsym to
4152 destination function pointer type.
4153 (thread_db_mourn): Use td_ta_delete_ftype.
4154
af60a1ef
SL
41552015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4156
4157 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4158 arch variant.
4159 (CDX_BREAKPOINT): Define for R2.
4160 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4161 (the_low_target): Add comments.
4162
e8b41681
YQ
41632015-07-30 Yao Qi <yao.qi@linaro.org>
4164
4165 * linux-arm-low.c (arm_hwcap): Remove it.
4166 (arm_read_description): New local variable arm_hwcap. Don't
4167 set arm_hwcap to zero.
4168
89abb039
YQ
41692015-07-30 Yao Qi <yao.qi@linaro.org>
4170
4171 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4172 Use regcache->tdesc instead.
4173 (arm_store_wmmxregset): Likewise.
4174 (arm_fill_vfpregset): Likewise.
4175 (arm_store_vfpregset): Likewise.
4176
deca266c
YQ
41772015-07-30 Yao Qi <yao.qi@linaro.org>
4178
4179 * linux-arm-low.c: Include arch/arm.h.
4180 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4181 (arm_store_gregset): Likewise.
4182
aa58a496
SM
41832015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4184
4185 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4186 ptrace's 4th parameter.
4187
50904b25
YQ
41882015-07-27 Yao Qi <yao.qi@linaro.org>
4189
4190 * configure.srv (case aarch64*-*-linux*): Don't set
4191 srv_linux_usrregs.
4192
5826e159
PA
41932015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4194
4195 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4196 sys/ptrace.h.
4197 * linux-arm-low.c: Likewise.
4198 * linux-cris-low.c: Likewise.
4199 * linux-crisv32-low.c: Likewise.
4200 * linux-low.c: Likewise.
4201 * linux-m68k-low.c: Likewise.
4202 * linux-mips-low.c: Likewise.
4203 * linux-nios2-low.c: Likewise.
4204 * linux-s390-low.c: Likewise.
4205 * linux-sparc-low.c: Likewise.
4206 * linux-tic6x-low.c: Likewise.
4207 * linux-tile-low.c: Likewise.
4208 * linux-x86-low.c: Likewise.
4209
54019719
PA
42102015-07-24 Pedro Alves <palves@redhat.com>
4211
4212 * config.in: Regenerate.
4213 * configure: Regenerate.
4214
eb7aa561
PA
42152015-07-24 Pedro Alves <palves@redhat.com>
4216
4217 * acinclude.m4: Include ../ptrace.m4.
4218 * configure.ac: Call GDB_AC_PTRACE.
4219 * config.in, configure: Regenerate.
4220
55d7b841
YQ
42212015-07-24 Yao Qi <yao.qi@linaro.org>
4222
4223 * linux-low.c (linux_create_inferior): Remove setting to
4224 proc->priv->new_inferior.
4225 (linux_attach): Likewise.
4226 (linux_low_filter_event): Likewise.
4227 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4228
c06cbd92
YQ
42292015-07-24 Yao Qi <yao.qi@linaro.org>
4230
4231 * linux-low.c (linux_arch_setup): New function.
4232 (linux_low_filter_event): If proc->tdesc is NULL and
4233 proc->attached is true, call the_low_target.arch_setup.
4234 Otherwise, keep status pending, and return.
4235 (linux_resume_one_lwp_throw): Don't call get_pc if
4236 thread->while_stepping isn't NULL. Don't call
4237 get_thread_regcache if proc->tdesc is NULL.
4238 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4239 (linux_target_ops): Install arch_setup.
4240 * server.c (start_inferior): Call the_target->arch_setup.
4241 * target.h (struct target_ops) <arch_setup>: New field.
4242 (target_arch_setup): New marco.
4243 * lynx-low.c (lynx_target_ops): Update.
4244 * nto-low.c (nto_target_ops): Update.
4245 * spu-low.c (spu_target_ops): Update.
4246 * win32-low.c (win32_target_ops): Update.
4247
5ae3ebba
YQ
42482015-07-24 Yao Qi <yao.qi@linaro.org>
4249
4250 * linux-low.c (linux_add_process): Don't set
4251 proc->priv->new_inferior.
4252 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4253 (linux_attach): Likewise.
4254
eb97750b
YQ
42552015-07-24 Yao Qi <yao.qi@linaro.org>
4256
4257 * server.c (start_inferior): Code refactor.
4258
51aee833
YQ
42592015-07-24 Yao Qi <yao.qi@linaro.org>
4260
4261 * server.c (process_serial_event): Set general_thread.
4262
af1b22f3
YQ
42632015-07-21 Yao Qi <yao.qi@linaro.org>
4264
4265 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4266 aarch64_linux_get_debug_reg_capacity.
4267
554717a3
YQ
42682015-07-17 Yao Qi <yao.qi@linaro.org>
4269
4270 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4271 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4272 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4273 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4274 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4275 (AARCH64_HWP_ALIGNMENT): Likewise.
4276 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4277 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4278 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4279 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4280 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4281 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4282 (struct aarch64_debug_reg_state): Likewise.
4283 (struct arch_lwp_info): Likewise.
4284 (aarch64_align_watchpoint): Likewise.
4285 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4286 (aarch64_watchpoint_length): Likewise.
4287 (aarch64_point_encode_ctrl_reg): Likewise
4288 (aarch64_point_is_aligned): Likewise.
4289 (aarch64_align_watchpoint): Likewise.
4290 (aarch64_linux_set_debug_regs):
4291 (aarch64_dr_state_insert_one_point): Likewise.
4292 (aarch64_dr_state_remove_one_point): Likewise.
4293 (aarch64_handle_breakpoint): Likewise.
4294 (aarch64_handle_aligned_watchpoint): Likewise.
4295 (aarch64_handle_unaligned_watchpoint): Likewise.
4296 (aarch64_handle_watchpoint): Likewise.
4297
c67ca4de
YQ
42982015-07-17 Yao Qi <yao.qi@linaro.org>
4299
4300 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4301 and don't aarch64_get_debug_reg_state. All callers update.
4302 (aarch64_handle_aligned_watchpoint): Likewise.
4303 (aarch64_handle_unaligned_watchpoint): Likewise.
4304 (aarch64_handle_watchpoint): Likewise.
4305 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4306 (aarch64_remove_point): Likewise.
4307
25abf979
YQ
43082015-07-17 Yao Qi <yao.qi@linaro.org>
4309
4310 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4311 debug_printf.
4312 (aarch64_handle_unaligned_watchpoint): Likewise.
4313
db1ff28b
JK
43142015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4315
4316 Revert the previous 3 commits:
4317 Move gdb_regex* to common/
4318 Move linux_find_memory_regions_full & co.
4319 gdbserver build-id attribute generator
4320
700ca40f
JK
43212015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4322 Jan Kratochvil <jan.kratochvil@redhat.com>
4323
4324 gdbserver build-id attribute generator.
4325 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4326 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4327 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4328 (find_phdr): New.
4329 (get_dynamic): Use find_pdhr to traverse program headers.
4330 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4331 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4332 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4333 (get_hex_build_id): New.
4334 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4335 to reply XML document.
4336
9904185c
JK
43372015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4338 Jan Kratochvil <jan.kratochvil@redhat.com>
4339
4340 * target.c: Include target/target-utils.h and fcntl.h.
4341 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4342 (target_fileio_read_stralloc): New functions.
4343
6e5b4429
JK
43442015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4345
4346 * Makefile.in (OBS): Add gdb_regex.o.
4347 (gdb_regex.o): New.
4348 * config.in: Rebuilt.
4349 * configure: Rebuilt.
4350
ddc98fbf
JK
43512015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4352 Jan Kratochvil <jan.kratochvil@redhat.com>
4353
4354 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4355 * Makefile.in (OBS): Add target-utils.o.
4356 (linux-maps.o, target-utils.o): New.
4357 * configure.srv (srv_linux_obj): Add linux-maps.o.
4358
e57bb7a0
PL
43592015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4360
4361 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4362 function, return 1.
4363 (the_low_target): Install it.
4364
586b02a9
PA
43652015-07-14 Pedro Alves <palves@redhat.com>
4366
4367 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4368 Instead, ignore ECHILD, and throw an error for other errnos.
4369
58c1b36c
PA
43702015-07-10 Pedro Alves <palves@redhat.com>
4371
4372 * event-loop.c (struct callback_event) <data>: Change type to
4373 gdb_client_data instance instead of gdb_client_data pointer.
4374 (append_callback_event): Adjust.
4375
421530db
PL
43762015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4377
4378 * linux-aarch64-low.c: Add comments for each linux_target_ops
4379 method. Remove comments already covered in target_ops and
4380 linux_target_ops definitions.
4381 (the_low_target): Add comments for each unimplemented method.
4382
c2d65f38
YQ
43832015-07-09 Yao Qi <yao.qi@linaro.org>
4384
4385 * linux-aarch64-low.c (aarch64_regmap): Remove.
4386 (aarch64_usrregs_info): Remove.
4387 (regs_info): Set field usrregs to NULL.
4388
b20a6524
MM
43892015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4390
4391 * linux-low.c: Include "rsp-low.h"
4392 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4393 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4394 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4395 (handle_btrace_enable_pt): New.
4396 (handle_btrace_general_set): Support "pt".
4397 (handle_btrace_conf_general_set): Support "pt:size".
4398
96c97461
PL
43992015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4400
4401 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4402 Z_PACKET_SW_BP.
4403
37d66942
PL
44042015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4405
4406 * linux-aarch64-low.c: Remove comment about endianness.
4407 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4408 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4409 memcmp.
4410
dc06243f
GB
44112015-06-24 Gary Benson <gbenson@redhat.com>
4412
4413 * linux-i386-ipa.c (stdint.h): Do not include.
4414 * lynx-i386-low.c (stdint.h): Likewise.
4415 * lynx-ppc-low.c (stdint.h): Likewise.
4416 * mem-break.c (stdint.h): Likewise.
4417 * thread-db.c (stdint.h): Likewise.
4418 * tracepoint.c (stdint.h): Likewise.
4419 * win32-low.c (stdint.h): Likewise.
4420
124e13d9
SM
44212015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4422
4423 * server.c (write_qxfer_response): Update call to
4424 remote_escape_output.
4425
909c2cda
JK
44262015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4427 Jan Kratochvil <jan.kratochvil@redhat.com>
4428
4429 Merge multiple hex conversions.
4430 * gdbreplay.c (tohex): Rename to 'fromhex'.
4431 (logchar): Use fromhex.
4432
24c05f46
JK
44332015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4434
4435 * server.c (handle_qxfer_libraries): Set `version' attribute for
4436 <library-list>.
4437
14d2069a
GB
44382015-06-10 Gary Benson <gbenson@redhat.com>
4439
4440 * target.h (struct target_ops) <multifs_open>: New field.
4441 <multifs_unlink>: Likewise.
4442 <multifs_readlink>: Likewise.
4443 * linux-low.c (nat/linux-namespaces.h): New include.
4444 (linux_target_ops): Initialize the_target->multifs_open,
4445 the_target->multifs_unlink and the_target->multifs_readlink.
4446 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4447 * hostio.c (hostio_fs_pid): New static variable.
4448 (hostio_handle_new_gdb_connection): New function.
4449 (handle_setfs): Likewise.
4450 (handle_open): Use the_target->multifs_open as appropriate.
4451 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4452 (handle_readlink): Use the_target->multifs_readlink as
4453 appropriate.
4454 (handle_vFile): Handle vFile:setfs packets.
4455 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4456 after target_handle_new_gdb_connection.
4457
4b8b5e72
GB
44582015-06-10 Gary Benson <gbenson@redhat.com>
4459
4460 * configure.ac (AC_CHECK_FUNCS): Add setns.
4461 * config.in: Regenerate.
4462 * configure: Likewise.
4463 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4464 (linux-namespaces.o): New rule.
4465 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4466
3ac2e371
GB
44672015-06-09 Gary Benson <gbenson@redhat.com>
4468
4469 * hostio.c (handle_open): Process mode argument with
4470 fileio_to_host_mode.
4471
ca9b78ce
YQ
44722015-06-01 Yao Qi <yao.qi@linaro.org>
4473
4474 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4475 * linux-x86-low.c: Likewise.
4476
bfacd19d
DB
44772015-05-28 Don Breazeal <donb@codesourcery.com>
4478
4479 * linux-low.c (handle_extended_wait): Initialize
4480 thread_info.last_resume_kind for new fork children.
4481
452003ef
PA
44822015-05-15 Pedro Alves <palves@redhat.com>
4483
4484 * target.h (target_handle_new_gdb_connection): Rewrite using if
4485 wrapped in do/while.
4486
1041a03c
JB
44872015-05-14 Joel Brobecker <brobecker@adacore.com>
4488
4489 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4490 * configure, config.in: Regenerate.
4491 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4492 Declare typedef.
4493
c269dbdb
DB
44942015-05-12 Don Breazeal <donb@codesourcery.com>
4495
4496 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4497 PTRACE_EVENT_VFORK_DONE.
4498 (linux_low_ptrace_options, extended_event_reported): Add vfork
4499 events.
4500 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4501 and "vforkdone" for RSP 'T' Stop Reply Packet.
4502 * server.h (report_vfork_events): Declare
4503 global variable.
4504
3a8a0396
DB
45052015-05-12 Don Breazeal <donb@codesourcery.com>
4506
4507 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4508 (the_low_target) <new_fork>: Initialize new member.
4509 * linux-arm-low.c (arm_new_fork): New function.
4510 (the_low_target) <new_fork>: Initialize new member.
4511 * linux-low.c (handle_extended_wait): Call new target function
4512 new_fork.
4513 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4514 * linux-mips-low.c (mips_add_watchpoint): New function
4515 extracted from mips_insert_point.
4516 (the_low_target) <new_fork>: Initialize new member.
4517 (mips_linux_new_fork): New function.
4518 (mips_insert_point): Call mips_add_watchpoint.
4519 * linux-x86-low.c (x86_linux_new_fork): New function.
4520 (the_low_target) <new_fork>: Initialize new member.
4521
de0d863e
DB
45222015-05-12 Don Breazeal <donb@codesourcery.com>
4523
4524 * linux-low.c (handle_extended_wait): Implement return value,
4525 rename argument 'event_child' to 'event_lwp', handle
4526 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4527 (linux_low_ptrace_options): New function.
4528 (linux_low_filter_event): Call linux_low_ptrace_options,
4529 use different argument fo linux_enable_event_reporting,
4530 use return value from handle_extended_wait.
4531 (extended_event_reported): New function.
4532 (linux_wait_1): Call extended_event_reported and set
4533 status to report fork events.
4534 (linux_write_memory): Add pid to debug message.
4535 (reset_lwp_ptrace_options_callback): New function.
4536 (linux_handle_new_gdb_connection): New function.
4537 (linux_target_ops): Initialize new structure member.
4538 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4539 * lynx-low.c: Initialize new structure member.
4540 * remote-utils.c (prepare_resume_reply): Implement stop reason
4541 "fork" for "T" stop message.
4542 * server.c (handle_query): Call handle_new_gdb_connection.
4543 * server.h (report_fork_events): Declare global flag.
4544 * target.h (struct target_ops) <handle_new_gdb_connection>:
4545 New member.
4546 (target_handle_new_gdb_connection): New macro.
4547 * win32-low.c: Initialize new structure member.
4548
ddcbc397
DB
45492015-05-12 Don Breazeal <donb@codesourcery.com>
4550
4551 * mem-break.c (APPEND_TO_LIST): Define macro.
4552 (clone_agent_expr): New function.
4553 (clone_one_breakpoint): New function.
4554 (clone_all_breakpoints): New function.
4555 * mem-break.h: Declare new functions.
4556
89245bc0
DB
45572015-05-12 Don Breazeal <donb@codesourcery.com>
4558
4559 * linux-low.c (linux_supports_fork_events): New function.
4560 (linux_supports_vfork_events): New function.
4561 (linux_target_ops): Initialize new structure members.
4562 (initialize_low): Call linux_check_ptrace_features.
4563 * lynx-low.c (lynx_target_ops): Initialize new structure
4564 members.
4565 * server.c (report_fork_events, report_vfork_events):
4566 New global flags.
4567 (handle_query): Add new features to qSupported packet and
4568 response.
4569 (captured_main): Initialize new global variables.
4570 * target.h (struct target_ops) <supports_fork_events>:
4571 New member.
4572 <supports_vfork_events>: New member.
4573 (target_supports_fork_events): New macro.
4574 (target_supports_vfork_events): New macro.
4575 * win32-low.c (win32_target_ops): Initialize new structure
4576 members.
4577
835205d0
GB
45782015-05-12 Gary Benson <gbenson@redhat.com>
4579
4580 * server.c (handle_qxfer_exec_file): Use current process
4581 if annex is empty.
4582
21e94bd9
SL
45832015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4584
4585 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4586 Remove HAVE_PTRACE_GETREGS conditionals.
4587 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4588 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4589
45614f15
YQ
45902015-05-08 Yao Qi <yao.qi@linaro.org>
4591
4592 * linux-low.c (linux_supports_conditional_breakpoints): New
4593 function.
4594 (linux_target_ops): Install new target method.
4595 * lynx-low.c (lynx_target_ops): Install NULL hook for
4596 supports_conditional_breakpoints.
4597 * nto-low.c (nto_target_ops): Likewise.
4598 * spu-low.c (spu_target_ops): Likewise.
4599 * win32-low.c (win32_target_ops): Likewise.
4600 * server.c (handle_query): Check
4601 target_supports_conditional_breakpoints.
4602 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4603 New field.
4604 (target_supports_conditional_breakpoints): New macro.
4605
80ad801e
PA
46062015-05-06 Pedro Alves <palves@redhat.com>
4607
4608 PR server/18081
4609 * server.c (start_inferior): If the process exits, mourn it.
4610
819843c7
GB
46112015-04-21 Gary Benson <gbenson@redhat.com>
4612
4613 * hostio.c (fileio_open_flags_to_host): Factored out to
4614 fileio_to_host_openflags in common/fileio.c. Single use
4615 updated.
4616
a2d5a9d7
MF
46172015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4618
4619 * linux-xtensa-low.c (xtensa_fill_gregset)
4620 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4621 XCHAL_HAVE_LOOP.
4622
deb44829
MF
46232015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4624
4625 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4626 (regs_info): Replace usrregs pointer with NULL.
4627
e57f1de3
GB
46282015-04-17 Gary Benson <gbenson@redhat.com>
4629
4630 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4631 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4632 * server.c (handle_qxfer_exec_file): New function.
4633 (qxfer_packets): Add exec-file entry.
4634 (handle_query): Report qXfer:exec-file:read as supported packet.
4635
62828379
RN
46362015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4637
4638 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4639
b88bb450
GB
46402015-04-09 Gary Benson <gbenson@redhat.com>
4641
4642 * hostio-errno.c (errno_to_fileio_error): Remove function.
4643 Update caller to use remote_fileio_to_fio_error.
4644
c8f4bfdd
YQ
46452015-04-09 Yao Qi <yao.qi@linaro.org>
4646
4647 * linux-low.c (linux_insert_point): Call
4648 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4649 (linux_remove_point): Call remove_memory_breakpoint if type is
4650 raw_bkpt_type_sw.
4651 * linux-x86-low.c (x86_insert_point): Don't call
4652 insert_memory_breakpoint.
4653 (x86_remove_point): Don't call remove_memory_breakpoint.
4654
41f98f02
PA
46552015-04-01 Pedro Alves <palves@redhat.com>
4656 Cleber Rosa <crosa@redhat.com>
4657
4658 * server.c (gdbserver_usage): Reorganize and extend the usage
4659 message.
4660
2bf6fb9d
PA
46612015-03-24 Pedro Alves <palves@redhat.com>
4662
4663 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4664 output. Also dump TRAP_TRACE.
4665 (linux_low_filter_event): In debug output, distinguish a
4666 resume_stop SIGSTOP from a delayed SIGSTOP.
4667
369f6daa
GB
46682015-03-24 Gary Benson <gbenson@redhat.com>
4669
4670 * linux-x86-low.c (x86_linux_new_thread): Moved to
4671 nat/x86-linux.c.
4672 (x86_linux_prepare_to_resume): Likewise.
4673
8e5d4070
GB
46742015-03-24 Gary Benson <gbenson@redhat.com>
4675
4676 * Makefile.in (x86-linux-dregs.o): New rule.
4677 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4678 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4679 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4680 (x86_linux_dr_get): Likewise.
4681 (x86_linux_dr_set): Likewise.
4682 (update_debug_registers_callback): Likewise.
4683 (x86_linux_dr_set_addr): Likewise.
4684 (x86_linux_dr_get_addr): Likewise.
4685 (x86_linux_dr_set_control): Likewise.
4686 (x86_linux_dr_get_control): Likewise.
4687 (x86_linux_dr_get_status): Likewise.
4688 (x86_linux_update_debug_registers): Likewise.
4689
2b95d440
GB
46902015-03-24 Gary Benson <gbenson@redhat.com>
4691
4692 * linux-x86-low.c (x86_linux_update_debug_registers):
4693 New function, factored out from...
4694 (x86_linux_prepare_to_resume): ...this.
4695
14b0bc68
GB
46962015-03-24 Gary Benson <gbenson@redhat.com>
4697
4698 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4699 (x86_linux_dr_set): Likewise.
4700 (update_debug_registers_callback): Likewise.
4701 (x86_linux_dr_set_addr): Likewise.
4702 (x86_linux_dr_get_addr): Likewise.
4703 (x86_linux_dr_set_control): Likewise.
4704 (x86_linux_dr_get_control): Likewise.
4705 (x86_linux_dr_get_status): Likewise.
4706 (x86_linux_prepare_to_resume): Likewise.
4707
5dfe6ca8
GB
47082015-03-24 Gary Benson <gbenson@redhat.com>
4709
4710 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4711 Use perror_with_name. Pass string through gettext.
4712 (x86_linux_dr_set): Likewise.
4713
d33472ad
GB
47142015-03-24 Gary Benson <gbenson@redhat.com>
4715
4716 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4717 (x86_linux_dr_set_addr): ...this.
4718 (x86_dr_low_get_addr): Rename to...
4719 (x86_linux_dr_get_addr): ...this.
4720 (x86_dr_low_set_control): Rename to...
4721 (x86_linux_dr_set_control): ...this.
4722 (x86_dr_low_get_control): Rename to...
4723 (x86_linux_dr_get_control): ...this.
4724 (x86_dr_low_get_status): Rename to...
4725 (x86_linux_dr_get_status): ...this.
4726 (x86_dr_low): Update with new function names.
4727
4b134ca1
GB
47282015-03-24 Gary Benson <gbenson@redhat.com>
4729
4730 * Makefile.in (x86-linux.o): New rule.
4731 * configure.srv: Add x86-linux.o to relevant targets.
4732 * linux-low.c (lwp_set_arch_private_info): New function.
4733 (lwp_arch_private_info): Likewise.
4734 * linux-x86-low.c: Include nat/x86-linux.h.
4735 (arch_lwp_info): Removed structure.
4736 (update_debug_registers_callback):
4737 Use lwp_set_debug_registers_changed.
4738 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4739 and lwp_set_debug_registers_changed.
4740 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4741
34c703da
GB
47422015-03-24 Gary Benson <gbenson@redhat.com>
4743
4744 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4745 * linux-arm-low.c (arm_new_thread): Likewise.
4746 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4747 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4748 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4749 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4750
cff068da
GB
47512015-03-24 Gary Benson <gbenson@redhat.com>
4752
4753 * linux-low.c (ptid_of_lwp): New function.
4754 (lwp_is_stopped): Likewise.
4755 (lwp_stop_reason): Likewise.
4756 * linux-x86-low.c (update_debug_registers_callback):
4757 Use lwp_is_stopped.
4758 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4759 lwp_stop_reason.
4760
b2f7c7e8
GB
47612015-03-24 Gary Benson <gbenson@redhat.com>
4762
4763 * linux-low.h (linux_stop_lwp): Remove declaration.
4764
6d4ee8c6
GB
47652015-03-24 Gary Benson <gbenson@redhat.com>
4766
4767 * linux-low.h: Include nat/linux-nat.h.
4768 * linux-low.c (iterate_over_lwps_args): New structure.
4769 (iterate_over_lwps_filter): New function.
4770 (iterate_over_lwps): Likewise.
4771 * linux-x86-low.c (update_debug_registers_callback):
4772 Update signature to what iterate_over_lwps expects.
4773 Remove PID check that iterate_over_lwps now performs.
4774 (x86_dr_low_set_addr): Use iterate_over_lwps.
4775 (x86_dr_low_set_control): Likewise.
4776
70a0bb6b
GB
47772015-03-24 Gary Benson <gbenson@redhat.com>
4778
4779 * linux-x86-low.c (x86_debug_reg_state): New function.
4780 (x86_linux_prepare_to_resume): Use the above.
4781
7b669087
GB
47822015-03-24 Gary Benson <gbenson@redhat.com>
4783
4784 * linux-low.c (current_lwp_ptid): New function.
4785 * linux-x86-low.c: Include nat/linux-nat.h.
4786 (x86_dr_low_get_addr): Use current_lwp_ptid.
4787 (x86_dr_low_get_control): Likewise.
4788 (x86_dr_low_get_status): Likewise.
4789
eef49a3d
PA
47902015-03-20 Pedro Alves <palves@redhat.com>
4791
4792 * tracepoint.c (cmd_qtstatus): Make "str" const.
4793
b2333d22
PA
47942015-03-20 Pedro Alves <palves@redhat.com>
4795
4796 * server.c (handle_general_set): Make "req_str" const.
4797
23f238d3
PA
47982015-03-19 Pedro Alves <palves@redhat.com>
4799
4800 * linux-low.c (linux_resume_one_lwp): Rename to ...
4801 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4802 instead call perror_with_name.
4803 (check_ptrace_stopped_lwp_gone): New function.
4804 (linux_resume_one_lwp): Reimplement as wrapper around
4805 linux_resume_one_lwp_throw that swallows errors if the LWP is
4806 gone.
4807
91baf43f
PA
48082015-03-19 Pedro Alves <palves@redhat.com>
4809
4810 * linux-low.c (count_events_callback, select_event_lwp_callback):
4811 No longer check whether the thread has resume_stop as last resume
4812 kind.
4813
8bf3b159
PA
48142015-03-19 Pedro Alves <palves@redhat.com>
4815
4816 * linux-low.c (count_events_callback, select_event_lwp_callback):
4817 Use the lwp's status_pending_p field, not the thread's.
4818
b90fc188
PA
48192015-03-19 Pedro Alves <palves@redhat.com>
4820
4821 * linux-low.c (select_event_lwp_callback): Update comments to
4822 no longer mention SIGTRAP.
4823
464b0089
GB
48242015-03-18 Gary Benson <gbenson@redhat.com>
4825
4826 * server.c (handle_query): Do not report vFile:fstat as supported.
4827
aa9e327f
GB
48282015-03-11 Gary Benson <gbenson@redhat.com>
4829
4830 * hostio.c (sys/types.h): New include.
4831 (sys/stat.h): Likewise.
4832 (common-remote-fileio.h): Likewise.
4833 (handle_fstat): New function.
4834 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 4835
791c0056
GB
48362015-03-11 Gary Benson <gbenson@redhat.com>
4837
4838 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4839 struct stat.st_blocks and struct stat.st_blksize.
4840 * configure: Regenerate.
4841 * config.in: Likewise.
4842 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4843 (OBS): Add common-remote-fileio.o.
4844 (common-remote-fileio.o): New rule.
4845
9a9df970
PA
48462015-03-09 Pedro Alves <palves@redhat.com>
4847
4848 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4849 'struct sockaddr' pointer in 'accept' call.
4850
9eb1356e
PA
48512015-03-09 Pedro Alves <palves@redhat.com>
4852
4853 Revert:
4854 2015-03-07 Pedro Alves <palves@redhat.com>
4855 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4856 or <winsock2.h> here. Instead include "gdb_socket.h".
4857 (remote_open): Use union gdb_sockaddr_u.
4858 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4859 or <winsock2.h> here. Instead include "gdb_socket.h".
4860 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4861 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4862 or <sys/un.h>.
4863 (init_named_socket, gdb_agent_helper_thread): Use union
4864 gdb_sockaddr_u.
4865
aac331e4
PA
48662015-03-07 Pedro Alves <palves@redhat.com>
4867
4868 * configure.ac (build_warnings): Move
4869 -Wdeclaration-after-statement to the C-specific set.
4870 * configure: Regenerate.
4871
366c75fc
PA
48722015-03-07 Pedro Alves <palves@redhat.com>
4873
4874 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4875 or <winsock2.h> here. Instead include "gdb_socket.h".
4876 (remote_open): Use union gdb_sockaddr_u.
4877 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4878 or <winsock2.h> here. Instead include "gdb_socket.h".
4879 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4880 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4881 or <sys/un.h>.
4882 (init_named_socket, gdb_agent_helper_thread): Use union
4883 gdb_sockaddr_u.
4884
492d29ea
PA
48852015-03-07 Pedro Alves <palves@redhat.com>
4886
4887 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4888 instead.
4889
60a191ed
YQ
48902015-03-06 Yao Qi <yao.qi@linaro.org>
4891
4892 * linux-aarch64-low.c (aarch64_insert_point): Use
4893 show_debug_regs as a boolean.
4894 (aarch64_remove_point): Likewise.
4895
f5771b1d
PA
48962015-03-05 Pedro Alves <palves@redhat.com>
4897
4898 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4899 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4900 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4901 * nto-low.c (nto_target_ops): Likewise.
4902 * spu-low.c (spu_target_ops): Likewise.
4903 * win32-low.c (win32_target_ops): Likewise.
4904
3e572f71
PA
49052015-03-04 Pedro Alves <palves@redhat.com>
4906
72f4393d 4907 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
4908 Decide whether a breakpoint triggered based on the SIGTRAP's
4909 siginfo.si_code.
72f4393d
L
4910 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4911 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
4912 (linux_low_filter_event): Check for breakpoints before checking
4913 watchpoints.
4914 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4915 siginfo.si_code.
72f4393d
L
4916 (linux_stopped_by_sw_breakpoint)
4917 (linux_supports_stopped_by_sw_breakpoint)
4918 (linux_stopped_by_hw_breakpoint)
4919 (linux_supports_stopped_by_hw_breakpoint): New functions.
4920 (linux_target_ops): Install new target methods.
3e572f71 4921
1ec68e26
PA
49222015-03-04 Pedro Alves <palves@redhat.com>
4923
4924 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4925 * server.c (swbreak_feature, hwbreak_feature): New globals.
4926 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4927 (captured_main): Clear swbreak_feature and hwbreak_feature.
4928 * server.h (swbreak_feature, hwbreak_feature): Declare.
4929 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4930 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4931 supports_stopped_by_hw_breakpoint>: New fields.
4932 (target_supports_stopped_by_sw_breakpoint)
4933 (target_stopped_by_sw_breakpoint)
4934 (target_supports_stopped_by_hw_breakpoint)
4935 (target_stopped_by_hw_breakpoint): Declare.
4936
15c66dd6
PA
49372015-03-04 Pedro Alves <palves@redhat.com>
4938
4939 enum lwp_stop_reason -> enum target_stop_reason
4940 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4941 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4942 (linux_wait_1, stuck_in_jump_pad_callback)
4943 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4944 (linux_stopped_by_watchpoint):
4945 * linux-low.h (enum lwp_stop_reason): Delete.
4946 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4947 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4948
98fc70d6
YQ
49492015-03-04 Yao Qi <yao.qi@linaro.org>
4950
4951 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4952
dd2ac174
GB
49532015-03-03 Gary Benson <gbenson@redhat.com>
4954
4955 * hostio.c (handle_vFile): Fix prefix lengths.
4956
d68e53f4
MM
49572015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4958
4959 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4960 ptr_bits.
4961
bf2d68ab
AA
49622015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4963
4964 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4965 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4966 (clean): Add "rm -f" for above C files.
4967 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4968 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4969 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4970 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4971 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4972 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4973 (init_registers_s390x_vx_linux64)
4974 (init_registers_s390x_tevx_linux64)
4975 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4976 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4977 declarations.
4978 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4979 (s390_store_vxrs_high): New functions.
4980 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4981 NT_S390_VXRS_HIGH.
4982 (s390_arch_setup): Add logic for selecting one of the new target
4983 descriptions. Activate the new vector regsets if applicable.
4984 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4985 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4986 and init_registers_s390x_tevx_linux64.
4987
c966a859
PA
49882015-03-01 Pedro Alves <palves@redhat.com>
4989
4990 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4991 parameter.
4992
4180215b
PA
49932015-02-27 Pedro Alves <palves@redhat.com>
4994
4995 * linux-x86-low.c (u_debugreg_offset): New function.
4996 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4997
749bab01
PA
49982015-02-27 Pedro Alves <palves@redhat.com>
4999
5000 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5001 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5002 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5003 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5004 (ps_lsetfpregs, ps_getpid)
5005 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5006 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5007 (ps_lsetxregs, ps_plog): Declare.
5008
3c14e5a3
PA
50092015-02-27 Pedro Alves <palves@redhat.com>
5010
5011 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5012 IP_AGENT_EXPORT_FUNC.
5013 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5014 IP_AGENT_EXPORT_FUNC.
5015 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5016 (IP_AGENT_EXPORT): Delete.
5017 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5018 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5019 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5020 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5021 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5022 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5023 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5024 (traceframe_read_count, traceframe_write_count)
5025 (traceframes_created, trace_state_variables, get_raw_reg)
5026 (get_trace_state_variable_value, set_trace_state_variable_value)
5027 (ust_loaded, helper_thread_id, cmd_buf): Use
5028 IPA_SYM_EXPORTED_NAME.
5029 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5030 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5031 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5032 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5033 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5034 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5035 EXTERN_C_PUSH/EXTERN_C_POP.
5036 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5037 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5038 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5039 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5040 (traceframe_write_count, traceframe_read_count)
5041 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5042 (about_to_request_buffer_space, get_trace_state_variable_value)
5043 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5044 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5045 EXTERN_C_PUSH/EXTERN_C_POP.
5046 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5047 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5048 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5049 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5050 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5051 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5052 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5053 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5054 Define.
5055 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5056 (IP_AGENT_EXPORT_VAR_DECL): Define.
5057 (tracing): Declare.
5058 (gdb_agent_get_raw_reg): Declare.
5059
fe978cb0
PA
50602015-02-27 Tom Tromey <tromey@redhat.com>
5061 Pedro Alves <palves@redhat.com>
5062
5063 Rename symbols whose names are reserved C++ keywords throughout.
5064
3bc3d82a
PA
50652015-02-27 Pedro Alves <palves@redhat.com>
5066
5067 * Makefile.in (COMPILER): New, get it from autoconf.
5068 (CXX): Get from autoconf instead.
5069 (COMPILE.pre): Use COMPILER.
5070 (CC-LD): Rename to ...
5071 (CC_LD): ... this. Use COMPILER.
5072 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5073 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5074 * acinclude.m4: Include build-with-cxx.m4.
5075 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5076 Disable -Werror by default if building in C++ mode.
5077 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5078 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5079 the C++ compiler. Save/restore CXXFLAGS too.
5080 * configure: Regenerate.
5081
07697489
PA
50822015-02-27 Pedro Alves <palves@redhat.com>
5083
5084 * acinclude.m4: Include libiberty.m4.
5085 * configure.ac: Call libiberty_INIT.
5086 * config.in, configure: Regenerate.
5087
9beb7c4e
PA
50882015-02-26 Pedro Alves <palves@redhat.com>
5089
5090 * linux-low.c (linux_wait_1): When incrementing the PC past a
5091 program breakpoint always use the_low_target.breakpoint_len as
5092 increment, rather than the maximum between that and
5093 the_low_target.decr_pc_after_break.
5094
8090aef2
PA
50952015-02-23 Pedro Alves <palves@redhat.com>
5096
5097 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5098 thread was doing a step-over; always adjust the PC if
5099 we stepped over a permanent breakpoint.
5100 (linux_wait_1): If we stepped over breakpoint that was on top of a
5101 permanent breakpoint, manually advance the PC past it.
5102
bc9540e8
PA
51032015-02-23 Pedro Alves <palves@redhat.com>
5104
5105 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5106 modes.
5107 (x86_fill_gregset, x86_store_gregset): Use it when handling
5108 $orig_eax.
5109
2db9a427
PA
51102015-02-20 Pedro Alves <palves@redhat.com>
5111
5112 * thread-db.c: Include "nat/linux-procfs.h".
5113 (thread_db_init): Skip listing new threads if the kernel supports
5114 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5115
afa8d396
PA
51162015-02-20 Pedro Alves <palves@redhat.com>
5117
5118 * linux-low.c (status_pending_p_callback): Use ptid_match.
5119
c9587f88
AT
51202015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5121
5122 PR breakpoints/16812
5123 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5124 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5125 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5126
b05ec7a5
AT
51272015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5128
5129 PR breakpoints/15956
5130 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5131
d33501a5
MM
51322015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5133
5134 * linux-low.c (linux_low_btrace_conf): Print size.
5135 * server.c (handle_btrace_conf_general_set): New.
5136 (hanle_general_set): Call handle_btrace_conf_general_set.
5137 (handle_query): Report Qbtrace-conf:bts:size as supported.
5138
f4abbc16
MM
51392015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5140
5141 * linux-low.c (linux_low_enable_btrace): Update parameters.
5142 (linux_low_btrace_conf): New.
5143 (linux_target_ops)<to_btrace_conf>: Initialize.
5144 * server.c (current_btrace_conf): New.
5145 (handle_btrace_enable): Rename to ...
5146 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5147 to target_enable_btrace. Update comment. Update users.
5148 (handle_qxfer_btrace_conf): New.
5149 (qxfer_packets): Add btrace-conf entry.
5150 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5151 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5152 (target_ops)<read_btrace_conf>: New.
5153 (target_enable_btrace): Update parameters.
5154 (target_read_btrace_conf): New.
5155
043c3577
MM
51562015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5157
5158 * server.c (handle_btrace_general_set): Remove call to
5159 target_supports_btrace.
5160 (supported_btrace_packets): New.
5161 (handle_query): Call supported_btrace_packets.
5162 * target.h: include btrace-common.h.
5163 (btrace_target_info): Removed.
5164 (supports_btrace, target_supports_btrace): Update parameters.
5165
734b0e4b
MM
51662015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5167
5168 * Makefile.in (SFILES): Add common/btrace-common.c.
5169 (OBS): Add common/btrace-common.o.
5170 (btrace-common.o): Add build rules.
5171 * linux-low: Include btrace-common.h.
5172 (linux_low_read_btrace): Use struct btrace_data. Call
5173 btrace_data_init and btrace_data_fini.
5174
d6c146e9
PA
51752015-02-06 Pedro Alves <palves@redhat.com>
5176
5177 * thread-db.c (find_new_threads_callback): Add debug output.
5178
20ba1ce6
PA
51792015-02-04 Pedro Alves <palves@redhat.com>
5180
5181 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5182 (resume_stopped_resumed_lwps): New function.
5183 (linux_wait_for_event_filtered): Use it.
5184
8cc73a39
SDJ
51852015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5186
5187 * Makefile.in (SFILES): Add linux-personality.c.
5188 (linux-personality.o): New rule.
5189 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5190 list of objects to be built.
5191 * linux-low.c: Include nat/linux-personality.h.
5192 (linux_create_inferior): Remove code to disable address space
5193 randomization (moved to ../nat/linux-personality.c). Create
5194 cleanup to disable address space randomization.
5195
fb23d554
SDJ
51962015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5197
5198 * Makefile.in (posix-strerror.o): New rule.
5199 (mingw-strerror.o): Likewise.
5200 * configure: Regenerated.
5201 * configure.ac: Source file ../common/common.host. Initialize new
5202 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5203
cdf43629
YQ
52042015-01-14 Yao Qi <yao@codesourcery.com>
5205
5206 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5207 (ppc-linux.o): New rule.
5208 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5209 * configure.ac: AC_CHECK_FUNCS(getauxval).
5210 * config.in: Re-generated.
5211 * configure: Re-generated.
5212 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5213 ppc64_64bit_inferior_p
5214
514c5338
YQ
52152015-01-14 Yao Qi <yao@codesourcery.com>
5216
5217 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5218 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5219 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5220 (PT_ORIG_R3, PT_TRAP): Likewise.
5221 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5222 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5223 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5224
3368c1e5
JB
52252015-01-10 Joel Brobecker <brobecker@adacore.com>
5226
5227 * i387-fp.c (i387_cache_to_xsave): In look over
5228 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5229 zmmh_low_space field by use of zmmh_high_space.
5230
582511be
PA
52312015-01-09 Pedro Alves <palves@redhat.com>
5232
5233 * linux-low.c (step_over_bkpt): Move higher up in the file.
5234 (handle_extended_wait): Don't store the stop_pc here.
5235 (get_stop_pc): Adjust comments and rename to ...
5236 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5237 stopped for a software breakpoint or hardware breakpoint.
5238 (thread_still_has_status_pending_p): New function.
5239 (status_pending_p_callback): Use
5240 thread_still_has_status_pending_p. If the event is no longer
5241 interesting, resume the LWP.
5242 (handle_tracepoints): Add assert.
5243 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5244 (wstatus_maybe_breakpoint): New function.
5245 (cancel_breakpoint): Delete function.
5246 (check_stopped_by_watchpoint): New function, factored out from
5247 linux_low_filter_event.
5248 (lp_status_maybe_breakpoint): Delete function.
5249 (linux_low_filter_event): Remove filter_ptid argument.
5250 Leave thread group exits pending here. Store the LWP's stop PC.
5251 Always leave events pending.
5252 (linux_wait_for_event_filtered): Pull all events out of the
5253 kernel, and leave them all pending.
5254 (count_events_callback, select_event_lwp_callback): Consider all
5255 events.
5256 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5257 (select_event_lwp): Only give preference to the stepping LWP in
5258 all-stop mode. Adjust comments.
5259 (ignore_event): New function.
5260 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5261 references to cancel_breakpoints. Adjust to renames. Also give
5262 equal priority to all LWPs that have had events in non-stop mode.
5263 If reporting a software breakpoint event, unadjust the LWP's PC.
5264 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5265 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5266 Adjust.
5267 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5268 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5269 (linux_stopped_by_watchpoint): Adjust.
5270 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5271 * linux-low.h (enum lwp_stop_reason): New.
5272 (struct lwp_info) <stop_pc>: Adjust comment.
5273 <stopped_by_watchpoint>: Delete field.
5274 <stop_reason>: New field.
5275 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5276 * mem-break.c (software_breakpoint_inserted_here)
5277 (hardware_breakpoint_inserted_here): New function.
5278 * mem-break.h (software_breakpoint_inserted_here)
5279 (hardware_breakpoint_inserted_here): Declare.
5280 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5281 (cancel_breakpoints): Delete.
5282 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5283 (upload_fast_traceframes): Remove references to
5284 cancel_breakpoints.
5285
a33e3959
PA
52862015-01-09 Pedro Alves <palves@redhat.com>
5287
5288 * thread-db.c (find_new_threads_callback): Ignore thread if the
5289 kernel thread ID is -1.
5290
8784d563
PA
52912015-01-09 Pedro Alves <palves@redhat.com>
5292
5293 * linux-low.c (linux_attach_fail_reason_string): Move to
5294 nat/linux-ptrace.c, and rename.
5295 (linux_attach_lwp): Update comment.
5296 (attach_proc_task_lwp_callback): New function.
5297 (linux_attach): Adjust to rename and use
5298 linux_proc_attach_tgid_threads.
5299 (linux_attach_fail_reason_string): Delete declaration.
5300
76f2b779
JB
53012015-01-01 Joel Brobecker <brobecker@adacore.com>
5302
5303 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5304 * server.c (gdbserver_version): Likewise.
5305
fafcc06a
SDJ
53062014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5307
5308 * remote-utils.c: Include ctype.h.
5309 (input_interrupt): Explicitly handle the case when the char
5310 received is the NUL byte. Improve the printing of non-ASCII
5311 characters.
5312
beed38b8
JB
53132014-12-16 Joel Brobecker <brobecker@adacore.com>
5314
5315 * linux-low.c (linux_low_filter_event): Update call to
5316 linux_enable_event_reporting following the addition of
5317 a new parameter to that function.
5318
bf330350
CU
53192014-12-16 Catalin Udma <catalin.udma@freescale.com>
5320
5321 PR server/17457
5322 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5323 (AARCH64_FPCR_REGNO): Likewise.
5324 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5325 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5326 (aarch64_store_fpregset): Likewise.
5327
5227d625
JB
53282014-12-15 Joel Brobecker <brobecker@adacore.com>
5329
5330 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5331 Remove FIXME comment about assumption about N.
5332
f93b65a0
JB
53332014-12-13 Joel Brobecker <brobecker@adacore.com>
5334
5335 * configure.ac: If large-file support is disabled in GDBserver,
5336 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5337 * configure: Regenerate.
5338
e5a9158d
AA
53392014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5340
5341 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5342 warning upon ENODATA from ptrace.
5343 * linux-s390-low.c (s390_store_tdb): New.
5344 (s390_regsets): Add regset for NT_S390_TDB.
5345
feea5f36
AA
53462014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5347
5348 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5349 without a fill_function.
5350 * linux-s390-low.c (s390_fill_last_break): Remove.
5351 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5352 (s390_arch_setup): Use regset's size instead of fill_function for
5353 loop end condition.
5354
098dbe61
AA
53552014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5356
5357 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5358 the regset's store function when ptrace returned an error.
5359 * regcache.c (get_thread_regcache): Invalidate register cache
5360 before fetching inferior's registers.
5361
28eef672
AA
53622014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5363
5364 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5365 while-loop as for-loop.
5366 (regsets_store_inferior_registers): Likewise.
5367
bdca27a2
YQ
53682014-11-28 Yao Qi <yao@codesourcery.com>
5369
5370 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5371 * config.in, configure: Re-generate.
5372 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5373 is defined.
5374
9c232dda
YQ
53752014-11-21 Yao Qi <yao@codesourcery.com>
5376
5377 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5378 (AC_CHECK_HEADERS): Remove malloc.h.
5379 * configure: Re-generated.
5380 * config.in: Re-generated.
5381 * server.h: Don't include alloca.h and malloc.h.
5382 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5383 Don't include malloc.h.
5384
43968415
JB
53852014-11-17 Joel Brobecker <brobecker@adacore.com>
5386
5387 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5388 corresponding ERRNO check in same block.
5389
40e91bc7
PA
53902014-11-12 Pedro Alves <palves@redhat.com>
5391
5392 * server.c (cont_thread): Update comment.
5393 (start_inferior, attach_inferior): No longer clear cont_thread.
5394 (handle_v_cont): No longer set cont_thread.
5395 (captured_main): Clear cont_thread each time a GDB connects.
5396
c2c118cf
PA
53972014-11-12 Pedro Alves <palves@redhat.com>
5398
5399 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5400 thread, and don't resume all threads if the Hc thread has exited.
5401
78708b7c
PA
54022014-11-12 Pedro Alves <palves@redhat.com>
5403
5404 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5405 the process group instead of to a specific LWP.
5406
a2abc7de
PA
54072014-10-15 Pedro Alves <palves@redhat.com>
5408
5409 PR server/17487
5410 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5411 parameter.
5412 (arm_set_thread_context): Delete.
5413 (the_low_target): Adjust.
5414 * win32-i386-low.c (debug_registers_changed)
5415 (debug_registers_used): Delete.
5416 (update_debug_registers_callback): New function.
5417 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5418 needing to update their debug registers.
5419 (win32_get_current_dr): New function.
5420 (x86_dr_low_get_addr, x86_dr_low_get_control)
5421 (x86_dr_low_get_status): Fetch the debug register from the thread
5422 record's context.
5423 (i386_initial_stuff): Adjust.
5424 (i386_get_thread_context): Remove current_event parameter. Don't
5425 clear debug_registers_changed nor copy DR values to
5426 debug_reg_state.
5427 (i386_set_thread_context): Delete.
5428 (i386_prepare_to_resume): New function.
5429 (i386_thread_added): Mark the thread as needing to update irs
5430 debug registers.
5431 (the_low_target): Remove i386_set_thread_context and install
5432 i386_prepare_to_resume.
5433 * win32-low.c (win32_get_thread_context): Adjust.
5434 (win32_set_thread_context): Use SetThreadContext
5435 directly.
5436 (win32_prepare_to_resume): New function.
5437 (win32_require_context): New function, factored out from ...
5438 (thread_rec): ... this.
5439 (continue_one_thread): Call win32_prepare_to_resume on each thread
5440 we're about to continue.
5441 (win32_resume): Call win32_prepare_to_resume on the event thread.
5442 * win32-low.h (struct win32_thread_info)
5443 <debug_registers_changed>: New field.
5444 (struct win32_target_ops): Change prototype of set_thread_context,
5445 delete set_thread_context and add prepare_to_resume.
5446 (win32_require_context): New declaration.
5447
a442d071
GB
54482014-10-08 Gary Benson <gbenson@redhat.com>
5449
5450 * server.h: Do not include common-exceptions.h.
5451
6f1947e8
GB
54522014-10-08 Gary Benson <gbenson@redhat.com>
5453
5454 * server.h: Do not include cleanups.h.
5455
63b434a4
JH
54562014-09-30 James Hogan <james.hogan@imgtec.com>
5457
5458 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5459 mips64-dsp-linux.c.
5460
c4d9ceb6
YQ
54612014-09-23 Yao Qi <yao@codesourcery.com>
5462
5463 * linux-low.c (lp_status_maybe_breakpoint): New function.
5464 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5465 (count_events_callback): Likewise.
5466 (select_event_lwp_callback): Likewise.
5467 (cancel_breakpoints_callback): Likewise.
5468
89a5711c
DB
54692014-09-19 Don Breazeal <donb@codesourcery.com>
5470
5471 * linux-low.c (handle_extended_wait): Call
5472 linux_ptrace_get_extended_event.
5473 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5474 linux_is_extended_waitstatus.
5475
bffc0964
JB
54762014-09-16 Joel Brobecker <brobecker@adacore.com>
5477
5478 * Makefile.in (CPPFLAGS): Define.
5479 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5480 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5481
0bfdf32f
GB
54822014-09-16 Gary Benson <gbenson@redhat.com>
5483
5484 * inferiors.h (current_inferior): Renamed as...
5485 (current_thread): New variable. All uses updated.
5486 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5487 (maybe_move_out_of_jump_pad): Likewise.
5488 (cancel_breakpoint): Likewise.
5489 (linux_low_filter_event): Likewise.
5490 (wait_for_sigstop): Likewise.
5491 (linux_resume_one_lwp): Likewise.
5492 (need_step_over_p): Likewise.
5493 (start_step_over): Likewise.
5494 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5495 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5496 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5497 and save_inferior as saved_thread.
5498 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5499 saved_thread.
5500 (regcache_invalidate_thread): Likewise.
5501 * remote-utils.c (prepare_resume_reply): Likewise.
5502 * thread-db.c (thread_db_get_tls_address): Likewise.
5503 (disable_thread_event_reporting): Likewise.
5504 (remove_thread_event_breakpoints): Likewise.
5505 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5506 as saved_thread.
5507 * target.h (set_desired_inferior): Renamed as...
5508 (set_desired_thread): New declaration. All uses updated.
5509 * server.c (myresume): Updated comment to reference thread instead
5510 of inferior.
5511 (handle_serial_event): Likewise.
5512 (handle_target_event): Likewise.
5513
361c8ade
GB
55142014-09-12 Tom Tromey <tromey@redhat.com>
5515 Gary Benson <gbenson@redhat.com>
5516
5517 * regcache.h: Include common-regcache.h.
5518 (regcache_read_pc): Don't declare.
5519 * regcache.c (get_thread_regcache_for_ptid): New function.
5520
bd9269f7
GB
55212014-09-11 Tom Tromey <tromey@redhat.com>
5522 Gary Benson <gbenson@redhat.com>
5523
5524 * symbol.c: New file.
5525 * Makefile.in (SFILES): Add symbol.c.
5526 (OBS): Add symbol.o.
5527
f8c1d06b
GB
55282014-09-11 Gary Benson <gbenson@redhat.com>
5529
5530 * target.c (target_stop_ptid, target_continue_ptid): New
5531 functions.
5532
721ec300
GB
55332014-09-11 Tom Tromey <tromey@redhat.com>
5534 Gary Benson <gbenson@redhat.com>
5535
5536 * target.h: Include target/target.h.
5537 * target.c (target_read_memory, target_read_uint32)
5538 (target_write_memory): New functions.
5539
c5e92cca
GB
55402014-09-11 Gary Benson <gbenson@redhat.com>
5541
5542 * server.h (debug_hw_points): Don't declare.
5543 * server.c (debug_hw_points): Don't define. Replace all uses
5544 with show_debug_regs.
5545 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5546 all uses with show_debug_regs.
5547
2e4bb98a
EBM
55482014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5549
5550 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5551 endianness into account.
5552 (ppc_supply_ptrace_register): Likewise.
5553
ac740bc7
JH
55542014-09-03 James Hogan <james.hogan@imgtec.com>
5555
5556 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5557 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5558
97ea6506
GB
55592014-09-03 Gary Benson <gbenson@redhat.com>
5560
5561 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5562 ALL_DEBUG_ADDRESS_REGISTERS.
5563
df7e5265
GB
55642014-09-02 Gary Benson <gbenson@redhat.com>
5565
5566 * i386-low.h: Renamed as...
5567 * x86-low.h: New file. All type, function and variable name
5568 prefixes changed from "i386_" to "x86_". All references updated.
5569 * i386-low.c: Renamed as...
5570 * x86-low.c: New file. All type, function and variable name
5571 prefixes changed from "i386_" to "x86_". All references updated.
5572
ed859da7
GB
55732014-09-02 Gary Benson <gbenson@redhat.com>
5574
5575 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5576 (x86_linux_new_thread): Likewise.
5577
860789c7
GB
55782014-08-29 Gary Benson <gbenson@redhat.com>
5579
5580 * server.h (setjmp.h): Do not include.
5581 (toplevel): Do not declare.
5582 (common-exceptions.h): Include.
5583 (cleanups.h): Likewise.
5584 * server.c (toplevel): Do not define.
5585 (exit_code): New static global.
5586 (detach_or_kill_for_exit_cleanup): New function.
5587 (main): New function. Original main renamed to...
5588 (captured_main): New function.
5589 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5590
ff55e1b5
GB
55912014-08-29 Gary Benson <gbenson@redhat.com>
5592
5593 * Makefile.in (SFILES): Add common/common-exceptions.c.
5594 (OBS): Add common-exceptions.o.
5595 (common-exceptions.o): New rule.
5596 * utils.c (prepare_to_throw_exception): New function.
5597
e9bcb658
GB
55982014-08-29 Gary Benson <gbenson@redhat.com>
5599
5600 * config.in: Regenerate.
5601 * configure: Likewise.
5602
e3180625
GB
56032014-08-29 Gary Benson <gbenson@redhat.com>
5604
5605 * Makefile.in (SFILES): Add common/cleanups.c.
5606 (OBS): cleanups.o.
5607 (cleanups.o): New rule.
5608
e3d6ba5d
GB
56092014-08-29 Gary Benson <gbenson@redhat.com>
5610
5611 * utils.c (internal_vwarning): New function.
5612
7096e886
GB
56132014-08-28 Gary Benson <gbenson@redhat.com>
5614
5615 * utils.h (fatal): Remove declaration.
5616 * utils.c (fatal): Remove function.
5617
14ce3192
GB
56182014-08-28 Gary Benson <gbenson@redhat.com>
5619
5620 * tracepoint.c (gdb_agent_init): Replace fatal with
5621 perror_with_name.
5622 (initialize_tracepoint): Likewise.
5623
50278d59
GB
56242014-08-28 Gary Benson <gbenson@redhat.com>
5625
5626 * remote-utils.c (remote_prepare): Replace fatal with error.
5627
aa96c426
GB
56282014-08-28 Gary Benson <gbenson@redhat.com>
5629
5630 * linux-low.c (linux_async): Replace fatal with warning.
5631 Tidy up and return.
5632 (linux_start_non_stop): Return -1 if linux_async failed.
5633
f7160e97
GB
56342014-08-28 Gary Benson <gbenson@redhat.com>
5635
5636 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5637 gdb_assert.
5638 (i386_dr_low_get_addr): Remove vague comment.
5639 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5640 gdb_assert.
5641
38e08fca
GB
56422014-08-28 Gary Benson <gbenson@redhat.com>
5643
5644 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5645 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5646 internal_error.
5647 (linux_resume_one_lwp): Likewise.
5648 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5649 gdb_assert.
5650 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5651 with internal_error.
5652 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5653 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5654 (find_register_by_name): Replace fatal with internal_error.
5655 (find_regno): Likewise.
5656 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5657 * thread-db.c (thread_db_create_event): Likewise.
5658 (thread_db_load_search): Likewise.
5659 (try_thread_db_load_1): Likewise.
5660 * tracepoint.c (get_jump_space_head): Replace fatal with
5661 internal_error.
5662 (claim_trampoline_space): Likewise.
5663 (have_fast_tracepoint_trampoline_buffer): Likewise.
5664 (cmd_qtstart): Likewise.
5665 (stop_tracing): Likewise.
5666 (fast_tracepoint_collecting): Likewise.
5667 (target_malloc): Likewise.
5668 (download_tracepoint): Likewise.
5669 (download_trace_state_variables): Replace check with gdb_assert.
5670 (upload_fast_traceframes): Replace fatal with internal_error.
5671
34abf635
GB
56722014-08-19 Tom Tromey <tromey@redhat.com>
5673 Gary Benson <gbenson@redhat.com>
5674
5675 * Makefile.in (SFILES): Add common/common-debug.c.
5676 (OBS): Add common-debug.o.
5677 (common-debug.o): New rule.
5678 * debug.h (debug_printf): Don't declare.
5679 * debug.c (debug_printf): Renamed and rewritten as...
5680 (debug_vprintf): New function.
5681
f6e94d78
GB
56822014-08-19 Gary Benson <gbenson@redhat.com>
5683
5684 * utils.h: Do not include print-utils.h.
5685
9239eeab
GB
56862014-08-19 Tom Tromey <tromey@redhat.com>
5687 Gary Benson <gbenson@redhat.com>
5688
5689 * server.h: Add static assertion.
5690 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5691
ef87c8bb
GB
56922014-08-19 Tom Tromey <tromey@redhat.com>
5693 Gary Benson <gbenson@redhat.com>
5694
5695 * Makefile.in (SFILES): Add common/errors.c.
5696 (OBS): Add errors.o.
5697 (IPA_OBS): Add errors-ipa.o.
5698 (errors.o): New rule.
5699 (errors-ipa.o): Likewise.
5700 * utils.h (perror_with_name, error, warning): Don't declare.
5701 * utils.c (warning): Renamed and rewritten as...
5702 (vwarning): New function.
5703 (error): Renamed and rewritten as...
5704 (verror): New function.
5705 (internal_error): Renamed and rewritten as...
5706 (internal_verror): New function.
5707
bb974a24
GB
57082014-08-07 Gary Benson <gbenson@redhat.com>
5709
5710 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5711 * configure: Regenerate.
5712 * config.in: Likewise.
5713 * server.h: Do not include errno.h.
5714 * event-loop.c: Likewise.
5715 * hostio-errno.c: Likewise.
5716 * linux-low.c: Likewise.
5717 * remote-utils.c: Likewise.
5718 * spu-low.c: Likewise.
5719 * utils.c: Likewise.
5720 * gdbreplay.c: Unconditionally include errno.h.
5721
6d3d12eb
GB
57222014-08-07 Gary Benson <gbenson@redhat.com>
5723
5724 * server.h: Do not include string.h.
5725 * event-loop.c: Likewise.
5726 * linux-low.c: Likewise.
5727 * regcache.c: Likewise.
5728 * remote-utils.c: Likewise.
5729 * spu-low.c: Likewise.
5730 * utils.c: Likewise.
5731
dccbb609
GB
57322014-08-07 Gary Benson <gbenson@redhat.com>
5733
5734 * server.h: Do not include gdb_assert.h.
5735
e76df0d0
GB
57362014-08-07 Gary Benson <gbenson@redhat.com>
5737
5738 * server.h: Do not include common-utils.h.
5739
4cb9c816
GB
57402014-08-07 Gary Benson <gbenson@redhat.com>
5741
5742 * server.h: Do not include ptid.h.
5743 * notif.h: Likewise.
5744
3995eeee
GB
57452014-08-07 Gary Benson <gbenson@redhat.com>
5746
5747 * server.h: Do not include gdb_locale.h.
5748
cb9f1a9b
GB
57492014-08-07 Gary Benson <gbenson@redhat.com>
5750
5751 * server.h: Do not include gdb/signals.h.
5752 * win32-low.c: Likewise.
5753
a5fceff8
GB
57542014-08-07 Gary Benson <gbenson@redhat.com>
5755
5756 * server.h: Do not include pathmax.h.
5757
b9391142
GB
57582014-08-07 Gary Benson <gbenson@redhat.com>
5759
5760 * server.h: Do not include libiberty.h.
5761 * linux-bfin-low.c: Likewise.
5762
0e443c87
GB
57632014-08-07 Gary Benson <gbenson@redhat.com>
5764
5765 * server.h: Do not include ansidecl.h.
5766
8ebb3f56
GB
57672014-08-07 Gary Benson <gbenson@redhat.com>
5768
5769 * linux-x86-low.c: Do not include stddef.h.
5770 * lynx-ppc-low.c: Likewise.
5771 * tracepoint.c: Likewise.
5772
8980bdf6
GB
57732014-08-07 Gary Benson <gbenson@redhat.com>
5774
5775 * server.h: Do not include stdarg.h.
5776 * nto-low.c: Likewise.
5777
d7096f71
GB
57782014-08-07 Gary Benson <gbenson@redhat.com>
5779
5780 * server.h: Do not include stdlib.h.
5781 * inferiors.c: Likewise.
5782 * linux-low.c: Likewise.
5783 * regcache.c: Likewise.
5784 * spu-low.c: Likewise.
5785 * tracepoint.c: Likewise.
5786 * utils.c: Likewise.
5787
d02f550d
GB
57882014-08-07 Gary Benson <gbenson@redhat.com>
5789
5790 * server.h: Do not include stdio.h.
5791 * linux-low.c: Likewise.
5792 * remote-utils.c: Likewise.
5793 * spu-low.c: Likewise.
5794 * utils.c: Likewise.
5795 * wincecompat.c: Likewise.
5796
87f6c4e3
GB
57972014-08-06 Gary Benson <gbenson@redhat.com>
5798
5799 * regcache.c (init_register_cache): Move conditionals inside if.
5800
7089dca4
GB
58012014-08-06 Gary Benson <gbenson@redhat.com>
5802
5803 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5804
462f517e
GB
58052014-07-31 Gary Benson <gbenson@redhat.com>
5806
5807 * ax.h: Do not include server.h.
5808 * gdbthread.h: Likewise.
5809 * lynx-low.h: Likewise.
5810 * notif.h: Likewise.
5811
976411d6
GB
58122014-07-30 Gary Benson <gbenson@redhat.com>
5813
5814 * server.h: Include common-defs.h.
5815 Do not include config.h or build-gnulib-gdbserver/config.h.
5816
d41f6d8e
GB
58172014-07-30 Gary Benson <gbenson@redhat.com>
5818
5819 * hostio-errno.c: Move server.h to top of includes list.
5820 * inferiors.c: Likewise.
5821 * linux-x86-low.c: Likewise.
5822 * notif.c: Include server.h.
5823
314c6a35
TT
58242014-07-24 Tom Tromey <tromey@redhat.com>
5825 Gary Benson <gbenson@redhat.com>
5826
5827 * server.h (CORE_ADDR): Now unsigned.
5828
69ff6be5
PA
58292014-07-16 Pedro Alves <palves@redhat.com>
5830
5831 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5832
ce9e3fe7
PA
58332014-07-15 Pedro Alves <palves@redhat.com>
5834
5835 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5836 copy.
5837
e76126e8
PA
58382014-07-11 Pedro Alves <palves@redhat.com>
5839
5840 * linux-low.c (kill_wait_lwp): New function, based on
5841 kill_one_lwp_callback, but use my_waitpid directly.
5842 (kill_one_lwp_callback, linux_kill): Use it.
5843
8e9db26e
PA
58442014-06-23 Pedro Alves <palves@redhat.com>
5845
5846 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5847 before setting DR0..DR3.
5848
698b3e08
GB
58492014-06-20 Gary Benson <gbenson@redhat.com>
5850
5851 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5852 * configure: Regenerated.
5853 * config.in: Likewise.
5854
125f8a3d
GB
58552014-06-20 Gary Benson <gbenson@redhat.com>
5856
5857 * Makefile.in (SFILES): Update locations for files moved
5858 from common to nat.
5859 (object file files): Reordered.
5860
42995dbd
GB
58612014-06-20 Gary Benson <gbenson@redhat.com>
5862
5863 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5864 (i386_dr_low_set_addr): Likewise.
5865 (i386_dr_low_get_addr): Likewise.
5866 (i386_dr_low_can_set_control): Likewise.
5867 (i386_dr_low_set_control): Likewise.
5868 (i386_dr_low_get_control): Likewise.
5869 (i386_dr_low_get_status): Likewise.
5870 (i386_get_debug_register_length): Likewise.
5871 * linux-x86-low.c (i386_dr_low_set_addr):
5872 Changed signature. Made static.
5873 (i386_dr_low_get_addr): Likewise.
5874 (i386_dr_low_set_control): Likewise.
5875 (i386_dr_low_get_control): Likewise.
5876 (i386_dr_low_get_status): Likewise.
5877 (i386_dr_low): New global variable.
5878 * win32-i386-low.c (i386_dr_low_set_addr):
5879 Changed signature. Made static.
5880 (i386_dr_low_get_addr): Likewise.
5881 (i386_dr_low_set_control): Likewise.
5882 (i386_dr_low_get_control): Likewise.
5883 (i386_dr_low_get_status): Likewise.
5884 (i386_dr_low): New global variable.
5885
e1d2394b
MS
58862014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5887
5888 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5889 * Makefile.in (AR, AR_FLAGS): Define.
5890 * configure: Regenerate.
5891
3a8ee006
GB
58922014-06-19 Gary Benson <gbenson@redhat.com>
5893
5894 * Makefile.in (i386-dregs.o): New rule.
5895 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5896 * i386-low.c (target.h): Remove include.
5897 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5898 (DR_CONTROL_SHIFT): Likewise.
5899 (DR_CONTROL_SIZE): Likewise.
5900 (DR_RW_EXECUTE): Likewise.
5901 (DR_RW_WRITE): Likewise.
5902 (DR_RW_READ): Likewise.
5903 (DR_RW_IORW): Likewise.
5904 (DR_LEN_1): Likewise.
5905 (DR_LEN_2): Likewise.
5906 (DR_LEN_4): Likewise.
5907 (DR_LEN_8): Likewise.
5908 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5909 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5910 (DR_ENABLE_SIZE): Likewise.
5911 (DR_LOCAL_SLOWDOWN): Likewise.
5912 (DR_GLOBAL_SLOWDOWN): Likewise.
5913 (DR_CONTROL_RESERVED): Likewise.
5914 (I386_DR_CONTROL_MASK): Likewise.
5915 (I386_DR_VACANT): Likewise.
5916 (I386_DR_LOCAL_ENABLE): Likewise.
5917 (I386_DR_GLOBAL_ENABLE): Likewise.
5918 (I386_DR_DISABLE): Likewise.
5919 (I386_DR_SET_RW_LEN): Likewise.
5920 (I386_DR_GET_RW_LEN): Likewise.
5921 (I386_DR_WATCH_HIT): Likewise.
5922 (i386_wp_op_t): Likewise.
5923 (i386_show_dr): Likewise.
5924 (i386_length_and_rw_bits): Likewise.
5925 (i386_insert_aligned_watchpoint): Likewise.
5926 (i386_remove_aligned_watchpoint): Likewise.
5927 (i386_handle_nonaligned_watchpoint): Likewise.
5928 i386_update_inferior_debug_regs(): Likewise.
5929 (i386_dr_insert_watchpoint): Likewise.
5930 (i386_dr_remove_watchpoint): Likewise.
5931 (i386_dr_region_ok_for_watchpoint): Likewise.
5932 (i386_dr_stopped_data_address): Likewise.
5933 (i386_dr_stopped_by_watchpoint): Likewise.
5934
8f26655c
GB
59352014-06-19 Gary Benson <gbenson@redhat.com>
5936
5937 * i386-low.c (i386_dr_show): Renamed to
5938 i386_show_dr and made static. All uses updated.
5939 (i386_dr_length_and_rw_bits): Renamed to
5940 i386_length_and_rw_bits and made static.
5941 All uses updated.
5942 (i386_dr_insert_aligned_watchpoint): Renamed to
5943 i386_insert_aligned_watchpoint and made static.
5944 All uses updated.
5945 (i386_dr_remove_aligned_watchpoint): Renamed to
5946 i386_remove_aligned_watchpoint and made static.
5947 All uses updated.
5948 (i386_dr_update_inferior_debug_regs): Renamed to
5949 i386_update_inferior_debug_regs and made static.
5950 All uses updated.
5951
b9228891
GB
59522014-06-18 Gary Benson <gbenson@redhat.com>
5953
5171def3
GB
5954 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5955 (i386_dr_low_can_set_control): Likewise.
5956 (i386_get_debug_register_length): Likewise.
5957 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5958 (i386_dr_low_can_set_control): Likewise.
5959 (i386_get_debug_register_length): Likewise.
5960
59612014-06-17 Gary Benson <gbenson@redhat.com>
5962
b9228891
GB
5963 * i386-low.h (i386-dregs.h): New include.
5964 (DR_FIRSTADDR): Now in i386-dregs.h.
5965 (DR_LASTADDR): Likewise.
5966 (DR_NADDR): Likewise.
5967 (DR_STATUS): Likewise.
5968 (DR_CONTROL): Likewise.
5969 (i386_debug_reg_state): Likewise.
5970 (i386_dr_insert_watchpoint): Likewise.
5971 (i386_dr_remove_watchpoint): Likewise.
5972 (i386_dr_region_ok_for_watchpoint): Likewise.
5973 (i386_dr_stopped_data_address): Likewise.
5974 (i386_dr_stopped_by_watchpoint): Likewise.
5975 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5976
4be83cc2
GB
59772014-06-18 Gary Benson <gbenson@redhat.com>
5978
5979 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5980 i386_dr_insert_watchpoint.
5981 (i386_low_remove_watchpoint): Renamed to
5982 i386_dr_remove_watchpoint.
5983 (i386_low_region_ok_for_watchpoint): Renamed to
5984 i386_dr_region_ok_for_watchpoint.
5985 (i386_low_stopped_data_address): Renamed to
5986 i386_dr_stopped_data_address.
5987 (i386_low_stopped_by_watchpoint): Renamed to
5988 i386_dr_stopped_by_watchpoint.
5989 * i386-low.c (i386_show_dr): Renamed to
5990 i386_dr_show and made nonstatic. All uses updated.
5991 (i386_length_and_rw_bits): Renamed to
5992 i386_dr_length_and_rw_bits and made nonstatic.
5993 All uses updated.
5994 (i386_insert_aligned_watchpoint): Renamed to
5995 i386_dr_insert_aligned_watchpoint and made nonstatic.
5996 All uses updated.
5997 (i386_remove_aligned_watchpoint): Renamed to
5998 i386_dr_remove_aligned_watchpoint and made nonstatic.
5999 All uses updated.
6000 (i386_update_inferior_debug_regs): Renamed to
6001 i386_dr_update_inferior_debug_regs and made nonstatic.
6002 All uses updated.
6003 (i386_low_insert_watchpoint): Renamed to
6004 i386_dr_insert_watchpoint. All uses updated.
6005 (i386_low_remove_watchpoint): Renamed to
6006 i386_dr_remove_watchpoint. All uses updated.
6007 (i386_low_region_ok_for_watchpoint): Renamed to
6008 i386_dr_region_ok_for_watchpoint. All uses updated.
6009 (i386_low_stopped_data_address): Renamed to
6010 i386_dr_stopped_data_address. All uses updated.
6011 (i386_low_stopped_by_watchpoint): Renamed to
6012 i386_dr_stopped_by_watchpoint. All uses updated.
6013
131aa0d4
GB
60142014-06-18 Gary Benson <gbenson@redhat.com>
6015
6016 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6017 (i386_dr_low_can_set_control): Likewise.
6018 (i386_insert_aligned_watchpoint): New check.
6019
d9305f7f
GB
60202014-06-18 Gary Benson <gbenson@redhat.com>
6021
6022 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6023 Renamed to state.
6024
e927c9fc
GB
60252014-06-18 Gary Benson <gbenson@redhat.com>
6026
6027 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6028 instead of fatal and error.
6029 (i386_handle_nonaligned_watchpoint): Likewise.
6030
1b6d4134
GB
60312014-06-18 Gary Benson <gbenson@redhat.com>
6032
6033 * i386-low.c (i386_get_debug_register_length): New macro.
6034 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6035 (i386_show_dr): Use debug_printf instead of fprintf. Use
6036 phex to format values.
6037
6e62758f
GB
60382014-06-18 Gary Benson <gbenson@redhat.com>
6039
6040 * i386-low.h: Comment changes.
6041 * i386-low.c: Likewise.
6042
fc6e2f03
GB
60432014-06-18 Gary Benson <gbenson@redhat.com>
6044
6045 * i386-low.c: Whitespace changes.
6046
f9d1eeed
TT
60472014-06-12 Tom Tromey <tromey@redhat.com>
6048
6049 * utils.c (freeargv): Remove.
6050
0b04e523
TT
60512014-06-12 Tom Tromey <tromey@redhat.com>
6052
6053 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6054 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6055 (parse_debug_format_options): Likewise.
6056 (gdbserver_usage): Likewise.
6057 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6058 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6059 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6060 against libiberty.
6061 ($(LIBGNU)): Depend on libiberty.
6062 (all-lib): Recurse into all subdirs.
6063 (install-only): Invoke "install" target in subdirs.
6064 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6065 targets.
6066 * configure: Rebuild.
6067 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6068 for vasprintf, vsnprintf, or gettimeofday.
6069 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6070 srv_tgtobj.
6071
270c9937
JB
60722014-06-05 Joel Brobecker <brobecker@adacore.com>
6073
6074 * development.sh: Delete.
6075 * Makefile.in (config.status): Adjust dependency on development.sh.
6076 * configure.ac: Adjust development.sh source call.
6077 * configure: Regenerate.
6078
0a261ed8
PA
60792014-06-02 Pedro Alves <palves@redhat.com>
6080
6081 * ax.c (gdb_free_agent_expr): New function.
6082 * ax.h (gdb_free_agent_expr): New declaration.
6083 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6084 list.
6085 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6086 static.
6087 (clear_breakpoint_conditions_and_commands): New function.
6088 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6089 (clear_breakpoint_conditions_and_commands): New declaration.
6090
e9dae05e
RR
60912014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6092
6093 * linux-aarch64-low.c (asm/ptrace.h): Include.
6094
5876f503
JK
60952014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6096
6097 Fix TLS access for -static -pthread.
6098 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6099 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6100 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6101
802e8e6d
PA
61022014-05-20 Pedro Alves <palves@redhat.com>
6103
6104 * linux-aarch64-low.c (aarch64_insert_point)
6105 (aarch64_remove_point): No longer check whether the type is
6106 supported here. Adjust to new interface.
6107 (the_low_target): Install aarch64_supports_z_point_type as
6108 supports_z_point_type method.
6109 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6110 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6111 instead of a Z packet char. Adjust.
6112 (arm_supports_z_point_type): New function.
6113 (arm_insert_point, arm_remove_point): Adjust to new interface.
6114 (the_low_target): Install arm_supports_z_point_type.
6115 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6116 (cris_insert_point, cris_remove_point): Adjust to new interface.
6117 Don't check whether the type is supported here.
6118 (the_low_target): Install cris_supports_z_point_type.
6119 * linux-low.c (linux_supports_z_point_type): New function.
6120 (linux_insert_point, linux_remove_point): Adjust to new interface.
6121 * linux-low.h (struct linux_target_ops) <insert_point,
6122 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6123 raw_breakpoint pointer parameter.
6124 <supports_z_point_type>: New method.
6125 * linux-mips-low.c (mips_supports_z_point_type): New function.
6126 (mips_insert_point, mips_remove_point): Adjust to new interface.
6127 Use mips_supports_z_point_type.
6128 (the_low_target): Install mips_supports_z_point_type.
6129 * linux-ppc-low.c (the_low_target): Install NULL as
6130 supports_z_point_type method.
6131 * linux-s390-low.c (the_low_target): Install NULL as
6132 supports_z_point_type method.
6133 * linux-sparc-low.c (the_low_target): Install NULL as
6134 supports_z_point_type method.
6135 * linux-x86-low.c (x86_supports_z_point_type): New function.
6136 (x86_insert_point): Adjust to new insert_point interface. Use
6137 insert_memory_breakpoint. Adjust to new
6138 i386_low_insert_watchpoint interface.
6139 (x86_remove_point): Adjust to remove_point interface. Use
6140 remove_memory_breakpoint. Adjust to new
6141 i386_low_remove_watchpoint interface.
6142 (the_low_target): Install x86_supports_z_point_type.
6143 * lynx-low.c (lynx_target_ops): Install NULL as
6144 supports_z_point_type callback.
6145 * nto-low.c (nto_supports_z_point_type): New.
6146 (nto_insert_point, nto_remove_point): Adjust to new interface.
6147 (nto_target_ops): Install nto_supports_z_point_type.
6148 * mem-break.c: Adjust intro comment.
6149 (struct raw_breakpoint) <raw_type, size>: New fields.
6150 <inserted>: Update comment.
6151 <shlib_disabled>: Delete field.
6152 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6153 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6154 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6155 (raw_bkpt_type_to_target_hw_bp_type): New function.
6156 (find_enabled_raw_code_breakpoint_at): New function.
6157 (find_raw_breakpoint_at): New type and size parameters. Use them.
6158 (insert_memory_breakpoint): New function, based off
6159 set_raw_breakpoint_at.
6160 (remove_memory_breakpoint): New function.
6161 (set_raw_breakpoint_at): Reimplement.
6162 (set_breakpoint): New, based on set_breakpoint_at.
6163 (set_breakpoint_at): Reimplement.
6164 (delete_raw_breakpoint): Go through the_target->remove_point
6165 instead of assuming memory breakpoints.
6166 (find_gdb_breakpoint_at): Delete.
6167 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6168 (find_gdb_breakpoint): New function.
6169 (set_gdb_breakpoint_at): Delete.
6170 (z_type_supported): New function.
6171 (set_gdb_breakpoint_1): New function, loosely based off
6172 set_gdb_breakpoint_at.
6173 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6174 (delete_gdb_breakpoint_at): Delete.
6175 (delete_gdb_breakpoint_1): New function, loosely based off
6176 delete_gdb_breakpoint_at.
6177 (delete_gdb_breakpoint): New function.
6178 (clear_gdb_breakpoint_conditions): Rename to ...
6179 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6180 breakpoint.
6181 (add_condition_to_breakpoint): Make static.
6182 (add_breakpoint_condition): Take a struct breakpoint pointer
6183 instead of an address. Adjust.
6184 (gdb_condition_true_at_breakpoint): Rename to ...
6185 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6186 z_type parameter.
6187 (gdb_condition_true_at_breakpoint): Reimplement.
6188 (add_breakpoint_commands): Take a struct breakpoint pointer
6189 instead of an address. Adjust.
6190 (gdb_no_commands_at_breakpoint): Rename to ...
6191 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6192 parameter. Return true if no breakpoint was found. Change debug
6193 output.
6194 (gdb_no_commands_at_breakpoint): Reimplement.
6195 (run_breakpoint_commands): Rename to ...
6196 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6197 and change return type to boolean.
6198 (run_breakpoint_commands): New function.
6199 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6200 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6201 breakpoint. Go through the_target->remove_point instead of
6202 assuming memory breakpoint.
6203 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6204 software and hardware breakpoints.
6205 (reinsert_raw_breakpoint): Go through the_target->insert_point
6206 instead of assuming memory breakpoint.
6207 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6208 software and hardware breakpoints.
6209 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6210 Check both software and hardware breakpoints.
6211 (validate_inserted_breakpoint): Assert the breakpoint is a
6212 software breakpoint. Set the inserted flag to -1 instead of
6213 setting shlib_disabled.
6214 (delete_disabled_breakpoints): Adjust.
6215 (validate_breakpoints): Only validate software breakpoints.
6216 Adjust to inserted flag change.
6217 (check_mem_read, check_mem_write): Skip breakpoint types other
6218 than software breakpoints. Adjust to inserted flag change.
6219 * mem-break.h (enum raw_bkpt_type): New enum.
6220 (raw_breakpoint, struct process_info): Forward declare.
6221 (Z_packet_to_target_hw_bp_type): Delete declaration.
6222 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6223 (set_gdb_breakpoint, delete_gdb_breakpoint)
6224 (clear_breakpoint_conditions): New declarations.
6225 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6226 (breakpoint_inserted_here): Update comment.
6227 (add_breakpoint_condition, add_breakpoint_commands): Replace
6228 address parameter with a breakpoint pointer parameter.
6229 (gdb_breakpoint_here): Update comment.
6230 (delete_gdb_breakpoint_at): Delete.
6231 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6232 * server.c (process_point_options): Take a struct breakpoint
6233 pointer instead of an address. Adjust.
6234 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6235 delete_gdb_breakpoint.
6236 * spu-low.c (spu_target_ops): Install NULL as
6237 supports_z_point_type method.
6238 * target.h: Include mem-break.h.
6239 (struct target_ops) <prepare_to_access_memory>: Update comment.
6240 <supports_z_point_type>: New field.
6241 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6242 instead of a char. Also take a raw breakpoint pointer.
6243 * win32-arm-low.c (the_low_target): Install NULL as
6244 supports_z_point_type.
6245 * win32-i386-low.c (i386_supports_z_point_type): New function.
6246 (i386_insert_point, i386_remove_point): Adjust to new interface.
6247 (the_low_target): Install i386_supports_z_point_type.
6248 * win32-low.c (win32_supports_z_point_type): New function.
6249 (win32_insert_point, win32_remove_point): Adjust to new interface.
6250 (win32_target_ops): Install win32_supports_z_point_type.
6251 * win32-low.h (struct win32_target_ops):
6252 <supports_z_point_type>: New method.
6253 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6254 instead of a char. Also take a raw breakpoint pointer.
6255
932539e3
PA
62562014-05-20 Pedro Alves <palves@redhat.com>
6257
6258 * mem-break.h: Include break-common.h.
6259 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6260 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6261 (Z_packet_to_target_hw_bp_type): New declaration.
6262 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6263 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6264 (Z_PACKET_ACCESS_WP): Delete macros.
6265 (Z_packet_to_hw_type): Delete function.
6266 * i386-low.h: Don't include break-common.h here.
6267 (Z_packet_to_hw_type): Delete declaration.
6268 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6269 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6270 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6271 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6272 * linux-aarch64-low.c: Don't include break-common.h here.
6273 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6274 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6275 (Z_packet_to_target_hw_bp_type): Delete function.
6276 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6277 function.
6278 (mips_insert_point, mips_remove_point): Use
6279 Z_packet_to_target_hw_bp_type.
6280
4ff0d3d8
PA
62812014-05-20 Pedro Alves <palves@redhat.com>
6282
6283 * linux-aarch64-low.c: Include break-common.h.
6284 (enum target_point_type): Delete.
6285 (Z_packet_to_point_type): Rename to ...
6286 (Z_packet_to_target_hw_bp_type): ... this, and return a
6287 target_hw_bp_type instead.
6288 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6289 instead of an enum target_point_type.
6290 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6291 breakpoint type.
6292 (aarch64_dr_state_insert_one_point)
6293 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6294 (aarch64_handle_aligned_watchpoint)
6295 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6296 Take an enum target_hw_bp_type instead of an enum
6297 target_point_type.
6298 (aarch64_supports_z_point_type): New function.
6299 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6300 use Z_packet_to_target_hw_bp_type.
6301
786dc519
JB
63022014-05-20 Joel Brobecker <brobecker@adacore.com>
6303
6304 * configure.ac: Only use -Werror by default when DEVELOPMENT
6305 is true.
6306 * configure: Regenerate.
6307
9e0aa64f
JK
63082014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6309
6310 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6311 * linux-x86-low.c (X86_64_USER_REGS): New.
6312 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6313
2b577b92
YQ
63142014-04-28 Yao Qi <yao@codesourcery.com>
6315
6316 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6317 name.
6318
94611da2
PA
63192014-04-25 Pedro Alves <palves@redhat.com>
6320
6321 PR server/16255
6322 * linux-low.c (linux_attach_fail_reason_string): New function.
6323 (linux_attach_lwp): Delete.
6324 (linux_attach_lwp_1): Rename to ...
6325 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6326 argument. Remove "initial" parameter. Return int instead of
6327 void. Don't error or warn here.
6328 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6329 failure to attach to the tgid. Call warning when failing to
6330 attach to an lwp.
6331 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6332 argument. Remove "initial" parameter. Return int instead of
6333 void. Don't error or warn here.
6334 (linux_attach_fail_reason_string): New declaration.
6335 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6336 interface change. Use linux_attach_fail_reason_string.
6337
01f9f808
MS
63382014-04-24 Michael Sturm <michael.sturm@mintel.com>
6339 Walfred Tedeschi <walfred.tedeschi@intel.com>
6340
6341 * Makefile.in: Added rules to handle new files
6342 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6343 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6344 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6345 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6346 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6347 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6348 x32-avx512-linux.o.
6349 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6350 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6351 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6352 i386/x32-avx512.xml.
6353 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6354 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6355 i386/x32-avx512-linux.xml.
6356 * i387-fp.c (num_avx512_k_registers): New constant for number
6357 of K registers.
6358 (num_avx512_zmmh_low_registers): New constant for number of
6359 lower ZMM registers (0-15).
6360 (num_avx512_zmmh_high_registers): New constant for number of
6361 higher ZMM registers (16-31).
6362 (num_avx512_ymmh_registers): New contant for number of higher
6363 YMM registers (ymm16-31 added by avx521 on x86_64).
6364 (num_avx512_xmm_registers): New constant for number of higher
6365 XMM registers (xmm16-31 added by AVX512 on x86_64).
6366 (struct i387_xsave): Add space for AVX512 registers.
6367 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6368 Add code to handle AVX512 registers.
6369 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6370 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6371 prototypei from generated file.
6372 (tdesc_amd64_avx512_linux): Likewise.
6373 (init_registers_x32_avx512_linux): Likewise.
6374 (tdesc_x32_avx512_linux): Likewise.
6375 (init_registers_i386_avx512_linux): Likewise.
6376 (tdesc_i386_avx512_linux): Likewise.
6377 (x86_64_regmap): Add AVX512 registers.
6378 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6379 mask.
6380 (initialize_low_arch): Add code to initialize AVX512 registers.
6381
51aa91f9
PA
63822014-04-23 Pedro Alves <palves@redhat.com>
6383
6384 * mem-break.c (find_gdb_breakpoint_at): Make static.
6385 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6386
a4165e94
PA
63872014-04-23 Pedro Alves <palves@redhat.com>
6388
6389 * i386-low.c: Don't include break-common.h here.
6390 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6391 prototype to take target_hw_bp_type as argument instead of a Z
6392 packet char.
6393 * i386-low.h: Include break-common.h here.
6394 (Z_packet_to_hw_type): Declare.
6395 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6396 prototypes.
6397 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6398 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6399 (x86_remove_point): Convert the packet number to a
6400 target_hw_bp_type before calling i386_low_remove_watchpoint.
6401 * win32-i386-low.c (i386_insert_point): Convert the packet number
6402 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6403 (i386_remove_point): Convert the packet number to a
6404 target_hw_bp_type before calling i386_low_remove_watchpoint.
6405
b8acf843
PA
64062014-04-23 Pedro Alves <palves@redhat.com>
6407
6408 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6409
d708bcd1
PA
64102014-04-10 Pedro Alves <palves@redhat.com>
6411
6412 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6413 Check if the condition or command is NULL before checking if the
6414 breakpoint is known. On success, return true.
6415 * mem-break.h (add_breakpoint_condition): Document return.
6416 (add_breakpoint_commands): Add describing comment.
6417 * server.c (skip_to_semicolon): New function.
6418 (process_point_options): Use it.
6419
2eec7d5b
PA
64202014-04-09 Pedro Alves <palves@redhat.com>
6421
6422 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6423 to lwpid_of.
6424
fa96cb38
PA
64252014-02-27 Pedro Alves <palves@redhat.com>
6426
6427 PR 12702
6428 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6429 macros.
6430 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6431 output.
6432 (last_thread_of_process_p): Take a PID argument instead of a
6433 thread pointer.
6434 (linux_wait_for_lwp): Delete.
6435 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6436 functions.
6437 (linux_low_filter_event): New function, party factored out from
6438 linux_wait_for_event.
6439 (linux_wait_for_event): Rename to ...
6440 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6441 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6442 sigsuspend. Check for zombie leaders.
6443 (linux_wait_for_event): Reimplement as wrapper around
6444 linux_wait_for_event_filtered.
6445 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6446 a normal or signal exit is seen, it's the whole process exiting.
6447 (wait_for_sigstop): No longer a for_each_inferior callback.
6448 Rewrite on top of linux_wait_for_event_filtered.
6449 (stop_all_lwps): Call wait_for_sigstop directly.
6450 * server.c (resume, handle_target_event): Handle
6451 TARGET_WAITKIND_NO_RESUMED.
6452
d763de10
JB
64532014-02-26 Joel Brobecker <brobecker@adacore.com>
6454
6455 * win32-low.c (psapi_get_dll_name,
6456 * win32_CreateToolhelp32Snapshot): Delete.
6457 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6458 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6459 Delete.
6460 (handle_load_dll): Add function description.
6461 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6462
850a0f76
JB
64632014-02-26 Joel Brobecker <brobecker@adacore.com>
6464
6465 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6466 Add comment.
6467 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6468 base address when calling win32_add_one_solib.
6469 (handle_load_dll): Delete local variable load_addr.
6470 Remove 0x1000 offset applied to DLL base address when calling
6471 win32_add_one_solib.
6472 (handle_unload_dll): Add comment.
6473
f25b3fc3
JB
64742014-02-26 Joel Brobecker <brobecker@adacore.com>
6475
6476 * win32-low.c (win32_add_all_dlls): Renames
6477 win32_ensure_ntdll_loaded. Rewrite function documentation.
6478 Adjust implementation to always load all DLLs.
6479 Add 0x1000 offset to DLL base address when calling
6480 win32_add_one_solib.
6481 (child_initialization_done): New static global.
6482 (do_initial_child_stuff): Set child_initialization_done to
6483 zero during child initialization, and 1 after. Replace call
6484 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6485 Add comment.
6486 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6487 (handle_unload_dll): Add function documentation.
6488 (get_child_debug_event): Ignore load and unload DLL events
6489 during child initialization.
6490
d86d4aaf
DE
64912014-02-20 Doug Evans <dje@google.com>
6492
3bc32da3 6493 Remove global all_lwps.
d86d4aaf
DE
6494 * inferiors.h (ptid_of): Move here from linux-low.h.
6495 (pid_of, lwpid_of): Ditto.
6496 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6497 parameter is a struct thread_info * now.
6498 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6499 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6500 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6501 directly.
6502 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6503 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6504 * linux-arm-low.c (update_registers_callback): Update, "entry"
6505 parameter is a struct thread_info * now.
6506 Fetch lwpid from current_inferior directly.
6507 (arm_insert_point): Pass &all_threads to find_inferior instead of
6508 &all_lwps.
6509 (arm_remove_point): Ditto.
6510 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6511 (arm_prepare_to_resume): Fetch pid from thread.
6512 (arm_read_description): Fetch lwpid from current_inferior directly.
6513 * linux-low.c (all_lwps): Delete.
6514 (delete_lwp): Delete call to remove_inferior.
6515 (handle_extended_wait): Fetch lwpid from thread.
6516 (add_lwp): Don't set lwp->entry.id. Remove call to
6517 add_inferior_to_list.
6518 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6519 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6520 (kill_one_lwp_callback): Ditto.
6521 (linux_kill): Don't dereference NULL pointer.
6522 Fetch ptid,lwpid from thread.
6523 (get_detach_signal): Fetch ptid from thread.
6524 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6525 Simplify call to regcache_invalidate_thread.
6526 (delete_lwp_callback): Update, "entry" parameter is a
6527 struct thread_info * now. Fetch pid from thread.
6528 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6529 (status_pending_p_callback): Update, "entry" parameter is a
6530 struct thread_info * now. Fetch ptid from thread.
6531 (find_lwp_pid): Update, "entry" parameter is a
6532 struct thread_info * now.
6533 (linux_wait_for_lwp): Fetch pid from thread.
6534 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6535 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6536 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6537 (dequeue_one_deferred_signal): Ditto.
6538 (cancel_breakpoint): Fetch ptid from current_inferior.
6539 (linux_wait_for_event): Pass &all_threads to find_inferior,
6540 not &all_lwps. Fetch ptid, lwpid from thread.
6541 (count_events_callback): Update, "entry" parameter is a
6542 struct thread_info * now.
6543 (select_singlestep_lwp_callback): Ditto.
6544 (select_event_lwp_callback): Ditto.
6545 (cancel_breakpoints_callback): Ditto.
6546 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6547 not &all_lwps.
6548 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6549 (unsuspend_one_lwp): Update, "entry" parameter is a
6550 struct thread_info * now.
6551 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6552 not &all_lwps.
6553 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6554 Fetch lwpid from thread, not lwp.
6555 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6556 Pass &all_threads to find_inferior, not &all_lwps.
6557 (send_sigstop): Fetch lwpid from thread, not lwp.
6558 (send_sigstop_callback): Update, "entry" parameter is a
6559 struct thread_info * now.
6560 (suspend_and_send_sigstop_callback): Ditto.
6561 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6562 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6563 struct thread_info * now.
6564 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6565 from thread, lwp.
6566 (lwp_running): Update, "entry" parameter is a
6567 struct thread_info * now.
6568 (stop_all_lwps): Fetch ptid from thread.
6569 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6570 (linux_resume_one_lwp): Fetch lwpid from thread.
6571 (linux_set_resume_request): Update, "entry" parameter is a
6572 struct thread_info * now. Fetch pid, lwpid from thread.
6573 (resume_status_pending_p): Update, "entry" parameter is a
6574 struct thread_info * now.
6575 (need_step_over_p): Ditto. Fetch lwpid from thread.
6576 (start_step_over): Fetch lwpid from thread.
6577 (linux_resume_one_thread): Update, "entry" parameter is a
6578 struct thread_info * now. Fetch lwpid from thread.
6579 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6580 (proceed_one_lwp): Update, "entry" parameter is a
6581 struct thread_info * now. Fetch lwpid from thread.
6582 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6583 struct thread_info * now.
6584 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6585 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6586 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6587 directly.
6588 (regsets_store_inferior_registers): Ditto.
6589 (fetch_register, store_register): Ditto.
6590 (linux_read_memory, linux_write_memory): Ditto.
6591 (linux_request_interrupt): Ditto.
6592 (linux_read_auxv): Ditto.
6593 (linux_xfer_siginfo): Ditto.
6594 (linux_qxfer_spu): Ditto.
6595 (linux_qxfer_libraries_svr4): Ditto.
6596 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6597 moved to inferiors.h.
6598 (get_lwp): Delete.
6599 (get_thread_lwp): Update.
6600 (struct lwp_info): Delete member "entry". Simplify comment for
6601 member "thread".
6602 (all_lwps): Delete.
6603 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6604 current_inferior directly.
6605 (update_watch_registers_callback): Update, "entry" parameter is a
6606 struct thread_info * now. Fetch pid from thread.
6607 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6608 (mips_insert_point): Fetch lwpid from current_inferior.
6609 Pass &all_threads to find_inferior, not &all_lwps.
6610 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6611 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6612 directly.
6613 (mips_stopped_data_address): Ditto.
6614 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6615 directly.
6616 * linux-tile-low.c (tile_arch_setup): Ditto.
6617 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6618 (update_debug_registers_callback): Update, "entry" parameter is a
6619 struct thread_info * now. Fetch pid from thread.
6620 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6621 Pass &all_threads to find_inferior, not &all_lwps.
6622 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6623 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6624 Pass &all_threads to find_inferior, not &all_lwps.
6625 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6626 (i386_dr_low_get_status): Ditto.
6627 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6628 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6629 (x86_linux_read_description): Ditto.
6630 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6631
3b8361aa
DE
66322014-02-20 Doug Evans <dje@google.com>
6633
6634 * inferiors.c (get_first_inferior): Fix buglet.
6635
f7667f0d
DE
66362014-02-19 Doug Evans <dje@google.com>
6637
6638 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6639 * inferiors.c (add_thread): Change result type to struct thread_info *.
6640 All callers updated.
6641 (add_lwp): Call add_thread here instead of in callers.
6642 All callers updated.
6643 * linux-low.h (get_lwp_thread): Rewrite.
6644 (struct lwp_info): New member "thread".
6645
b3312d80
DE
66462014-02-19 Doug Evans <dje@google.com>
6647
6648 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6649 All callers updated.
6650
ecc6f45c
DE
66512014-02-19 Doug Evans <dje@google.com>
6652
6653 * inferiors.c (add_thread): Fix whitespace.
6654
649ebbca
DE
66552014-02-19 Doug Evans <dje@google.com>
6656
6657 * dll.c (clear_dlls): Replace accessing list implemention details
6658 with API function.
6659 * gdbthread.h (get_first_thread): Declare.
6660 * inferiors.c (for_each_inferior_with_data): New function.
6661 (get_first_thread): New function.
6662 (find_thread_ptid): Simplify.
6663 (get_first_inferior): New function.
6664 (clear_list): Delete.
6665 (one_inferior_p): New function.
6666 (clear_inferior_list): New function.
6667 (clear_inferiors): Update.
6668 * inferiors.h (for_each_inferior_with_data): Declare.
6669 (clear_inferior_list): Declare.
6670 (one_inferior_p): Declare.
6671 (get_first_inferior): Declare.
6672 * linux-low.c (linux_wait_for_event): Replace accessing list
6673 implemention details with API function.
6674 * server.c (target_running): Ditto.
6675 (accumulate_file_name_length): New function.
6676 (emit_dll_description): New function.
6677 (handle_qxfer_libraries): Replace accessing list implemention
6678 details with API function.
6679 (handle_qxfer_threads_worker): New function.
6680 (handle_qxfer_threads_proper): Replace accessing list implemention
6681 details with API function.
6682 (handle_query): Ditto.
6683 (visit_actioned_threads_callback_ftype): New typedef.
6684 (visit_actioned_threads_data): New struct.
6685 (visit_actioned_threads): Rewrite to be find_inferior callback.
6686 (resume): Call find_inferior.
6687 (handle_status): Replace accessing list implemention
6688 details with API function.
6689 (process_serial_event): Replace accessing list implemention details
6690 with API function.
6691 * target.c (set_desired_inferior): Replace accessing list implemention
6692 details with API function.
6693 * tracepoint.c (same_process_p): New function.
6694 (gdb_agent_about_to_close): Replace accessing list implemention
6695 details with API function.
6696 * win32-low.c (child_delete_thread): Replace accessing list
6697 implemention details with API function.
6698 (match_dll_by_basename): New function.
6699 (dll_is_loaded_by_basename): New function.
6700 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6701 details call to dll_is_loaded_by_basename.
6702
80894984
DE
67032014-02-19 Doug Evans <dje@google.com>
6704
6705 * dll.h (struct dll_info): Add comment.
6706 * gdbthread.h (struct thread_info): Add comment.
6707 (current_ptid): Simplify.
6708 * inferiors.c (add_process): Update.
6709 (remove_process): Update.
6710 * inferiors.h (struct process_info): Rename member "head" to "entry".
6711 * linux-low.c (delete_lwp): Update.
6712 (add_lwp): Update.
6713 (last_thread_of_process_p): Update.
6714 (kill_one_lwp_callback, linux_kill): Update.
6715 (status_pending_p_callback): Update.
6716 (wait_for_sigstop): Update. Simplify read of ptid.
6717 (start_step_over): Update.
6718 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6719 (get_lwp_thread): Update.
6720 (struct lwp_info): Rename member "head" to "entry".
6721 * regcache.h (inferior_list_entry): Delete.
6722 * server.c (kill_inferior_callback): Update.
6723 (detach_or_kill_inferior_callback): Update.
6724 (print_started_pid): Update.
6725 (print_attached_pid): Update.
6726 (process_serial_event): Simplify read of ptid.
6727 * thread-db.c (thread_db_create_event): Update.
6728 (thread_db_get_tls_address): Update.
6729 * win32-low.c (current_inferior_ptid): Simplify.
6730
46917d26
TT
67312014-02-19 Tom Tromey <tromey@redhat.com>
6732
6733 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6734 argument.
6735 (target_supports_btrace): Update.
6736
0759a81e
YQ
67372014-02-14 Yao Qi <yao@codesourcery.com>
6738
6739 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6740 (rsp-low-ipa.o): New target.
6741
a7191e8b
TT
67422014-02-12 Tom Tromey <tromey@redhat.com>
6743
6744 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6745 convert_ascii_to_int.
6746 * regcache.c (registers_to_string): Likewise.
6747 * remote-utils.c (decode_M_packet): Likewise.
6748 * server.c (process_serial_event): Likewise.
6749
ff0e980e
TT
67502014-02-12 Tom Tromey <tromey@redhat.com>
6751
6752 * server.c (handle_query, handle_v_run): Use hex2bin, not
6753 unhexify.
6754 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6755
e9371aff
TT
67562014-02-12 Tom Tromey <tromey@redhat.com>
6757
6758 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6759 convert_int_to_ascii.
6760 * regcache.c (registers_to_string, collect_register_as_string):
6761 Likewise.
6762 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6763 Likewise.
6764 * server.c (process_serial_event): Likewise.
6765 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6766 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6767
971dc0b8
TT
67682014-02-12 Tom Tromey <tromey@redhat.com>
6769
6770 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6771 bin2hex, not hexify.
6772 * tracepoint.c (cmd_qtstatus): Likewise.
6773
0a822afb
TT
67742014-02-12 Tom Tromey <tromey@redhat.com>
6775
6776 * remote-utils.c (monitor_output): Pass explicit length to
6777 hexify.
6778
9c3d6531
TT
67792014-02-12 Tom Tromey <tromey@redhat.com>
6780
6781 * tracepoint.c: Include rsp-low.h.
6782 * server.c: Include rsp-low.h.
6783 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6784 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6785 declare.
6786 * remote-utils.c: Include rsp-low.h.
6787 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6788 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6789 (convert_int_to_ascii, convert_ascii_to_int): Move to
6790 common/rsp-low.c.
6791 * regcache.c: Include rsp-low.h.
6792 * ax.c: Include rsp-low.h.
6793 * Makefile.in (SFILES): Add common/rsp-low.c.
6794 (OBS): Add rsp-low.o.
6795 (rsp-low.o): New target.
6796
01fd3ea5
TT
67972014-02-12 Tom Tromey <tromey@redhat.com>
6798
6799 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6800 Include print-utils.h.
6801 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6802 (plongest, thirty_two, phex_nz): Remove.
6803 * Makefile.in (SFILES): Add common/print-utils.c.
6804 (OBS): Add print-utils.o.
6805 (print-utils-ipa.o): New target.
6806 (print-utils.o): New target.
6807 (IPA_OBJS): Add print-utils-ipa.o.
6808
e99dc820
TT
68092014-02-06 Tom Tromey <tromey@redhat.com>
6810
6811 * Makefile.in (SFILES): Fix indentation.
6812
ee1e2d4f
DE
68132014-02-05 Doug Evans <dje@google.com>
6814
6815 * linux-low.c (linux_wait_for_event): Improve comment.
6816 (linux_wait_1): Keep current_inferior in sync with event_child.
6817
f5a02773
DE
68182014-01-22 Doug Evans <dje@google.com>
6819
6820 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6821
87ce2a04
DE
68222014-01-22 Doug Evans <dje@google.com>
6823
6824 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6825 * configure: Regenerate.
6826 * config.in: Regenerate.
6827 * Makefile.in (SFILES): Add debug.c.
6828 (OBS): Add debug.o.
6829 * debug.c: New file.
6830 * debug.h: New file.
6831 * linux-aarch64-low.c (*): Update all debugging printfs to use
6832 debug_printf instead of fprintf.
6833 * linux-arm-low.c (*): Ditto.
6834 * linux-cris-low.c (*): Ditto.
6835 * linux-crisv32-low.c (*): Ditto.
6836 * linux-m32r-low.c (*): Ditto.
6837 * linux-sparc-low.c (*): Ditto.
6838 * linux-x86.c (*): Ditto.
6839 * linux-low.c (*): Ditto.
6840 (linux_wait_1): Add calls to debug_enter, debug_exit.
6841 (linux_wait): Remove redundant debugging printf.
6842 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6843 (linux_resume, unstop_all_lwps): Ditto.
6844 * mem-break.c (*): Update all debugging printfs to use
6845 debug_printf instead of fprintf.
6846 * remote-utils.c (*): Ditto.
6847 * thread-db.c (*): Ditto.
6848 * server.c #include <ctype.h>, "gdb_vecs.h".
6849 (debug_threads): Moved to debug.c.
6850 (*): Update all debugging printfs to use debug_printf instead of
6851 fprintf.
6852 (start_inferior): Replace call to fflush with call to debug_flush.
6853 (monitor_show_help): Mention set debug-format.
6854 (parse_debug_format_options): New function.
6855 (handle_monitor_command): Handle "monitor set debug-format".
6856 (gdbserver_usage): Mention --debug-format.
6857 (main): Parse --debug-format.
6858 * server.h (debug_threads): Declaration moved to debug.h.
6859 #include "debug.h".
6860 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6861 trace_debug_1 that uses debug_printf.
6862 (tracepoint_look_up_symbols): Update all debugging printfs to use
6863 debug_printf instead of fprintf.
6864
e671835b
BS
68652014-01-20 Baruch Siach <baruch@tkos.co.il>
6866
6867 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6868 sys/ptrace.h.
6869
b5737fa9
PA
68702014-01-17 Pedro Alves <palves@redhat.com>
6871
ea38d2a9 6872 PR build/16445
c7faa97a
PA
6873 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6874 defined after including gdb_proc_service.h.
b5737fa9 6875
40ed484e
DE
68762014-01-16 Doug Evans <dje@google.com>
6877
6878 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6879 (match_dll): Use it.
6880
969c39fb
MM
68812014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6882
6883 * target.h (target_ops) <read_btrace>: Change parameters and
6884 return type to allow error reporting.
6885 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6886 trace reading errors on.
6887 * linux-low.c (linux_low_read_btrace): Pass trace reading
6888 errors on.
6889 (linux_low_disable_btrace): New.
6890
ab7f45ba
DE
68912014-01-15 Doug Evans <dje@google.com>
6892
6893 * inferiors.c (thread_id_to_gdb_id): Delete.
6894 * inferiors.h (thread_id_to_gdb_id): Delete.
6895
66af0f44
EZ
68962014-01-13 Eli Zaretskii <eliz@gnu.org>
6897
6898 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6899 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6900 versions.
6901
9939e131
PA
69022014-01-08 Pedro Alves <palves@redhat.com>
6903
6904 * server.c (handle_status): Don't discard previous queued stop
6905 replies or thread's pending status here.
6906 (main) <disconnection>: Do it here instead.
6907
b7ea362b
PA
69082014-01-08 Pedro Alves <palves@redhat.com>
6909
6910 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6911 * server.c (visit_actioned_threads, handle_pending_status): New
6912 function.
6913 (handle_v_cont): Factor out parts to ...
6914 (resume): ... this new function. If in all-stop, and a thread
6915 being resumed has a pending status, report it without actually
6916 resuming.
6917 (myresume): Adjust to use the new 'resume' function.
6918 (clear_pending_status_callback, set_pending_status_callback)
6919 (find_status_pending_thread_callback): New functions.
6920 (handle_status): Handle the case of multiple threads having
6921 interesting statuses to report. Report threads' real last signal
6922 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6923 with an interesting thread to report the status for, instead of
6924 always reporting the status of the first thread.
6925
28498c42
JB
69262014-01-01 Joel Brobecker <brobecker@adacore.com>
6927
6928 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6929 * gdbreplay.c (gdbreplay_version): Likewise.
6930
f45c82da
YZ
69312013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6932
6933 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6934 iov.iov_len with the real length in use.
6935
379a5e2d
JB
69362013-12-13 Joel Brobecker <brobecker@adacore.com>
6937
6938 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6939 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6940 for all targets that use win32-low.c.
6941 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6942 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6943
4210d83e
PA
69442013-12-13 Pedro Alves <palves@redhat.com>
6945
6946 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6947 if equal to TARGET_WAITKIND_LOADED.
6948 * win32-low.c (cached_status): New static global.
6949 (win32_wait): Add declaration.
6950 (do_initial_child_stuff): Flush all initial pending debug events
6951 up to the initial breakpoint.
6952 (win32_wait): If CACHED_STATUS was set, return that instead
6953 of doing a real wait. Remove the code resuming the execution
6954 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6955 during the initial phase. Also remove the code changing
6956 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6957 TARGET_WAITKIND_STOPPED.
6958
e7f0d979
YQ
69592013-12-11 Yao Qi <yao@codesourcery.com>
6960
6961 * notif.c (handle_notif_ack): Return 0 if no notification
6962 matches.
6963
ebcf782c
DE
69642013-11-20 Doug Evans <dje@google.com>
6965
6966 * linux-low.c (linux_set_resume_request): Fix comment.
6967
20ad9378
DE
69682013-11-20 Doug Evans <dje@google.com>
6969
6970 * linux-low.c (resume_status_pending_p): Tweak comment.
6971
a196ebeb
WT
69722013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6973
6974 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6975 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6976 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6977 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6978 (srv_amd64_regobj): Add amd64-mpx.o.
6979 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6980 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6981 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6982 * i387-fp.c (num_pl_bnd_register) Added constant.
6983 (num_pl_bnd_cfg_registers) Added constant.
6984 (struct i387_xsave) Added reserved area and MPX fields.
6985 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6986 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6987 function.
6988 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6989 (init_registers_amd64_mpx_linux): Declare new function.
6990 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6991 (x86_64_regmap): Add MPX registers.
6992 (x86_linux_read_description): Add MPX case.
6993 (initialize_low_arch): Initialize MPX targets.
6994
0080a2f6
TT
69952013-11-18 Tom Tromey <tromey@redhat.com>
6996
6997 * configure: Rebuild.
6998 * configure.ac: Don't check for stdlib.h.
6999 * gdbreplay.c: Unconditionally include stdlib.h.
7000
2978b111
TT
70012013-11-18 Tom Tromey <tromey@redhat.com>
7002
7003 * config.in: Rebuild.
7004 * configure: Rebuild.
7005 * configure.ac: Don't use AC_HEADER_DIRENT.
7006
a3d08894
TT
70072013-11-18 Tom Tromey <tromey@redhat.com>
7008
7009 * server.h: Don't check HAVE_STRING_H.
7010 * gdbreplay.c: Don't check HAVE_STRING_H.
7011 * configure: Rebuild.
7012
0a5dd17d
TT
70132013-11-18 Tom Tromey <tromey@redhat.com>
7014
7015 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7016 LIBGNU.
7017
1bd2f0ba
TT
70182013-11-08 Tom Tromey <tromey@redhat.com>
7019
7020 * configure, config.in: Rebuild.
7021 * configure.ac: Remove unused configury.
7022
3266f10b
TT
70232013-11-08 Tom Tromey <tromey@redhat.com>
7024
7025 * acinclude.m4: Include common.m4, codeset.m4.
7026 * configure, config.in: Rebuild.
7027 * configure.ac: Use GDB_AC_COMMON.
7028
6682d959
AA
70292013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7030
7031 * linux-s390-low.c (HWCAP_S390_TE): New define.
7032 (s390_arch_setup): Consider the TE field in the HWCAP for
7033 determining 'have_regset_tdb'.
7034
fd0a4d76
SDJ
70352013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7036
7037 PR gdb/16014
7038 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7039 call to sizeof.
7040
1a3d890b
PA
70412013-10-02 Pedro Alves <palves@redhat.com>
7042
7043 * server.c (process_serial_event): Don't output "GDBserver
7044 exiting" if GDB is connected through stdio.
7045 * target.c (mywait): Likewise, be silent if GDB is connected
7046 through stdio.
7047
97ad4581
JB
70482013-10-01 Joel Brobecker <brobecker@adacore.com>
7049
7050 * lynx-low.c (lynx_add_threads_after_attach): New function.
7051 (lynx_attach): Remove call to add_thread. Add call to
7052 lynx_add_threads_after_attach instead.
7053
5b4e221c
MF
70542013-09-28 Mike Frysinger <vapier@gentoo.org>
7055
7056 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7057 * config.in, configure: Regenerated.
7058
ee47b2f8
YQ
70592013-09-18 Yao Qi <yao@codesourcery.com>
7060
7061 PR server/15959
7062 * server.c (start_inferior): Clear 'resume_info'.
7063
d6707650 70642013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7065
d6707650
JW
7066 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7067 for each register.
7068
9243dd0e 70692013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7070
9243dd0e
JW
7071 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7072 linux-tile-low.o to srv_tgtobj.
7073
c623a6ef
WN
70742013-09-16 Will Newton <will.newton@linaro.org>
7075
7076 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7077 out regs.
7078
fb71d39e
PA
70792013-09-06 Pedro Alves <palves@redhat.com>
7080
7081 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7082 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7083 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7084 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7085 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7086 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7087
8e7e9910
PA
70882013-09-06 Pedro Alves <palves@redhat.com>
7089
7090 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7091 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7092
7c3a12ca
PA
70932013-09-06 Pedro Alves <palves@redhat.com>
7094
7095 * linux-amd64-ipa.c: Include tracepoint.h.
7096 * linux-i386-ipa.c: Include tracepoint.h.
7097
8eb3d7b6
RW
70982013-09-06 Ricard Wanderlof <ricardw@axis.com>
7099
7100 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7101 (ps_get_thread_area): New function.
7102
eddddb9d
RW
71032013-09-06 Ricard Wanderlof <ricardw@axis.com>
7104
7105 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7106 (initialize_low_arch): Call init_registers_crisv32 rather than
7107 init_register_crisv32.
7108
533b0600
PA
71092013-09-05 Pedro Alves <palves@redhat.com>
7110
7111 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7112 to ...
7113 * hostio.h: ... this new file.
7114 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7115 win32-low.c: Include hostio.h.
7116
0ce3d3b5
PA
71172013-09-05 Pedro Alves <palves@redhat.com>
7118
7119 * server.h (gdb_client_data, handler_func, callback_handler_func)
7120 (delete_file_handler, add_file_handler, append_callback_event)
7121 (delete_callback_event, start_event_loop, initialize_event_loop):
7122 Move to event-loop.h and include it.
7123 * event-loop.h: New file.
7124
799cdc37
PA
71252013-09-05 Pedro Alves <palves@redhat.com>
7126
7127 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7128 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7129 (loaded_dll, unloaded_dll): Move to ...
7130 * dll.h: ... this new file.
7131 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7132
6a6bbd9d
PA
71332013-09-05 Pedro Alves <palves@redhat.com>
7134
7135 * server.h (current_process, get_thread_process, all_processes)
7136 (add_inferior_to_list, for_each_inferior, current_inferior)
7137 (remove_inferior, add_process, remove_process, find_process_pid)
7138 (have_started_inferiors_p, have_attached_inferiors_p)
7139 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7140 (clear_inferiors, find_inferior, find_inferior_id)
7141 (inferior_target_data, set_inferior_target_data)
7142 (inferior_regcache_data, set_inferior_regcache_data): Move to
7143 inferiors.h, and include it.
7144 * inferiors.h: New file.
7145
f699aaba
PA
71462013-09-05 Pedro Alves <palves@redhat.com>
7147
7148 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7149 Move ...
72f4393d 7150 * ax.h: ... here.
f699aaba 7151
c144c7a0
PA
71522013-09-05 Pedro Alves <palves@redhat.com>
7153
7154 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7155 tracepoint.h.
7156 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7157 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7158 (handle_tracepoint_general_set, handle_tracepoint_query)
7159 (tracepoint_finished_step, tracepoint_was_hit)
7160 (release_while_stepping_state_list, current_traceframe)
7161 (in_readonly_region, traceframe_read_mem)
7162 (fetch_traceframe_registers, traceframe_read_sdata)
7163 (traceframe_read_info, struct fast_tpoint_collect_status)
7164 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7165 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7166 (supply_fast_tracepoint_registers)
7167 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7168 (ipa_tdesc, claim_trampoline_space)
7169 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7170 (agent_mem_read, agent_get_trace_state_variable_value)
7171 (agent_set_trace_state_variable_value, agent_tsv_read)
7172 (agent_mem_read_string, get_raw_reg_func_addr)
7173 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7174 * tracepoint.h: ... this new file.
7175
ff42e6ab
PA
71762013-09-05 Pedro Alves <palves@redhat.com>
7177
7178 * server.h (perror_with_name, error, fatal, warning, paddress)
7179 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7180 include it.
7181 * utils.h: New file.
7182
541af0f4
PA
71832013-09-05 Pedro Alves <palves@redhat.com>
7184
7185 * server.h (remote_debug, noack_mode, transport_is_reliable)
7186 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7187 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7188 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7189 (write_enn, initialize_async_io, enable_async_io)
7190 (disable_async_io, check_remote_input_interrupt_request)
7191 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7192 (dead_thread_notify, prepare_resume_reply)
7193 (decode_address_to_semicolon, decode_address, decode_m_packet)
7194 (decode_M_packet, decode_X_packet, decode_xfer_write)
7195 (decode_search_memory_packet, unhexify, hexify)
7196 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7197 (look_up_one_symbol, relocate_instruction)
7198 (monitor_output): Move to remote-utils.h, and include it.
7199 * remote-utils.h: New file.
7200
eebdf26b
PA
72012013-09-05 Pedro Alves <palves@redhat.com>
7202
7203 * server.h (_): Delete.
7204
3aafd2ff
PA
72052013-09-02 Pedro Alves <palves@redhat.com>
7206
7207 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7208 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7209 allocated.
7210 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7211
cee83bcb
PM
72122013-09-02 Pierre Muller <muller@sourceware.org>
7213
7214 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7215 or WriteProcessMemory complete successfully and handle
7216 ERROR_PARTIAL_COPY error.
7217
9a13b2fa
PA
72182013-09-02 Pedro Alves <palves@redhat.com>
7219
7220 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7221 error instead of EIO.
7222
602e3198
JK
72232013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7224
7225 PR server/15604
7226 * linux-low.c: Include filestuff.h.
7227 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7228 * lynx-low.c: Include filestuff.h.
7229 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7230 * server.c: Include filestuff.h.
7231 (main): Call notice_open_fds.
7232 * spu-low.c: Include filestuff.h.
7233 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7234
96d7229d
LM
72352013-08-22 Luis Machado <lgustavo@codesourcery.com>
7236
7237 * Makefile.in: Explain why ../target and ../nat are not
7238 listed as include file search paths.
7239 (linux-waitpid.o): New object file rule.
7240 * configure.srv (srv_native_linux_obj): New variable.
7241 Replace all occurrences of linux native object files with
7242 $srv_native_linux_obj.
7243 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7244 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7245 (linux_enable_event_reporting): Remove declaration.
7246 (my_waitpid): Moved to common/linux-waitpid.c.
7247 (linux_wait_for_event): Pass ptid when calling
7248 linux_enable_event_reporting.
7249 (linux_supports_tracefork_flag): Remove.
7250 (linux_enable_event_reporting): Likewise.
7251 (linux_tracefork_grandchild): Remove.
7252 (STACK_SIZE): Moved to common/linux-ptrace.c.
7253 (linux_tracefork_child): Remove.
7254 (linux_test_for_tracefork): Remove.
7255 (linux_look_up_symbols): Call linux_supports_traceclone.
7256 (initialize_low): Remove call to linux_test_for_tracefork.
7257 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7258 common/linux-ptrace.h.
7259 (PTRACE_TYPE_ARG4): Likewise.
7260 Include linux-ptrace.h.
7261
32940073
PA
72622013-08-21 Pedro Alves <palves@redhat.com>
7263
7264 * config.in: Renegerate.
7265
33b60d58 72662013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 7267
33b60d58
LM
7268 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7269 (SFILES): Remove $(srcdir)/common/target-common.c and
7270 add $(srcdir)/target/waitstatus.c.
7271 (OBS): Remove target-common.o and add waitstatus.o.
7272 (server_h): Remove $(srcdir)/../common/target-common.h and
7273 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7274 and $(srcdir)/../target/waitstatus.h.
7275 (target-common.o): Remove.
7276 (waitstatus.o): New target object file.
7277 * target.h: Do not include target-common.h and
7278 include target/resume.h, target/wait.h and
7279 target/waitstatus.h.
7280
b8e1b30e
LM
72812013-08-13 Luis Machado <lgustavo@codesourcery.com>
7282
7283 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7284 to PTRACE_TYPE_ARG3.
7285 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7286 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7287 PTRACE_TYPE_ARG4.
7288 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7289 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7290
7a60ad40
YQ
72912013-07-27 Jie Zhang <jie@codesourcery.com>
7292 Daniel Jacobowitz <dan@codesourcery.com>
7293 Yao Qi <yao@codesourcery.com>
7294
7295 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7296 (mips-linux-watch.o): New rule.
7297 (mips_linux_watch_h): New variable.
7298 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7299 srv_tgtobj.
7300 * linux-mips-low.c: Include mips-linux-watch.h.
7301 (struct arch_process_info, struct arch_lwp_info): New.
7302 (update_watch_registers_callback): New function.
7303 (mips_linux_new_process, mips_linux_new_thread) New functions.
7304 (mips_linux_prepare_to_resume, mips_insert_point): New
7305 functions.
7306 (mips_remove_point, mips_stopped_by_watchpoint): New
7307 functions.
7308 (rsp_bp_type_to_target_hw_bp_type): New function.
7309 (mips_stopped_data_address): New function.
7310 (the_low_target): Add watchpoint support functions.
7311
de6f69ad
YQ
73122013-07-27 Yao Qi <yao@codesourcery.com>
7313
7314 * i386-low.c: Include break-common.h.
7315 (enum target_hw_bp_type): Remove.
7316
3360c0bf
LM
73172013-07-24 Luis Machado <lgustavo@codesourcery.com>
7318
7319 * Makefile.in (SFILES): /common/target-common.c.
7320 (OBS): Add target-common.o.
7321 (server_h): Add $(srcdir)/../common/target-common.h.
7322 (target-common.o): New target.
7323 * server.c (queue_stop_reply_callback): Free
7324 status string after use.
7325 * target.c (target_waitstatus_to_string): Remove.
7326 * target.h: Include target-common.h.
7327 (resume_kind): Likewise.
7328 (target_waitkind): Likewise.
7329 (target_waitstatus): Likewise.
7330 (TARGET_WNOHANG): Likewise.
7331
bd885420
YQ
73322013-07-04 Yao Qi <yao@codesourcery.com>
7333
7334 * Makefile.in (host_alias): Use @host_noncanonical@.
7335 (target_alias): Use @target_noncanonical@.
7336 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7337 ACX_NONCANONICAL_HOST.
7338 * configure: Regenerated.
7339
7340 Revert:
7341 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7342
7343 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7344 * configure: Rebuild.
7345 * Makefile.in (version_host, version_target): Get from configure.
7346 (version.c): Use $(version_host) and $(version_target).
7347
17ef446e
PA
73482013-07-03 Pedro Alves <palves@redhat.com>
7349
7350 * Makefile.in (config.status): Depend on development.sh.
7351 * acinclude.m4: Include libmcheck.m4.
7352 * configure: Regenerate.
7353
7a9a7487
MG
73542013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7355
7356 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7357 attribute inside the parentheses.
7358 (winapi_DebugSetProcessKillOnExit): Ditto.
7359 (winapi_DebugBreakProcess): Ditto.
7360 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 7361
49b64de6
MG
73622013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7363
7364 * notif.h (notif_event): Add a dummy member to avoid compiler
7365 errors.
7366
d5749ee7
PA
73672013-07-01 Pedro Alves <palves@redhat.com>
7368
7369 * hostio.c (HOSTIO_PATH_MAX): Define.
7370 (require_filename, handle_open, handle_unlink, handle_readlink):
7371 Use it.
7372
d8d2a3ee
PA
73732013-07-01 Pedro Alves <palves@redhat.com>
7374
7375 * server.h: Include "pathmax.h".
7376 * linux-low.c: Don't include sys/param.h.
7377 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7378 MAXPATHLEN.
7379 * win32-low.c: Don't include sys/param.h.
7380 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7381
bc7dea8d
PA
73822013-07-01 Pedro Alves <palves@redhat.com>
7383
7384 * event-loop.c: Don't check HAVE_UNISTD_H before including
7385 <unistd.h>.
7386 * gdbreplay.c: Likewise.
7387 * remote-utils.c: Likewise.
7388 * server.c: Likewise.
7389 * configure.ac: Don't check for unistd.h.
7390 * configure: Regenerate.
7391
d6c2da54
TT
73922013-06-28 Tom Tromey <tromey@redhat.com>
7393
7394 * Makefile.in (version.c): Use version.in, not
7395 common/version.in.
7396
257b6bec
MG
73972013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7398
7399 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7400 * configure: Rebuild.
7401 * Makefile.in (version_host, version_target): Get from configure.
7402 (version.c): Use $(version_host) and $(version_target).
7403
86ebe149
DK
74042013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7405
7406 Fix trace-status to output user name without trailing colon.
7407 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7408
f30aa5af
DK
74092013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7410
7411 Fix trace-status to output proper start-time and stop-time.
7412 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7413 output start time and stop time in hex as gdb expects.
7414
28a93511
YQ
74152013-06-26 Pedro Alves <pedro@codesourcery.com>
7416
7417 * tracepoint.c (build_traceframe_info_xml): Output trace state
7418 variables present in the trace buffer.
7419
01208463
TT
74202013-06-24 Tom Tromey <tromey@redhat.com>
7421
7422 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7423 create-version.sh.
7424 (version.o): Remove.
7425 * gdbreplay.c: Include version.h.
7426 (version, host_name): Don't declare.
7427 * server.h: Include version.h.
7428 (version, host_name): Don't declare.
7429
760256f9
PA
74302013-06-12 Pedro Alves <palves@redhat.com>
7431
7432 * linux-x86-low.c (linux_is_elf64): Delete global.
7433 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7434 with local linux_pid_exe_is_elf_64_file use.
7435
030031ee
PA
74362013-06-11 Pedro Alves <palves@redhat.com>
7437
7438 * linux-low.c (regset_disabled, disable_regset): New functions.
7439 (regsets_fetch_inferior_registers)
7440 (regsets_store_inferior_registers): Use them.
7441 (initialize_regsets_info); Don't allocate the disabled_regsets
7442 array here.
7443 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7444 comment.
7445
5da6eb0a
PA
74462013-06-11 Pedro Alves <palves@redhat.com>
7447
7448 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7449 xmalloc.
7450
7e5aaa09
PA
74512013-06-11 Pedro Alves <palves@redhat.com>
7452
7453 * linux-x86-low.c (initialize_low_arch): Call
7454 init_registers_x32_avx_linux.
7455
d878444c
JK
74562013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7457
7458 Fix compatibility with Android Bionic.
7459 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7460 it is not empty.
7461
3aee8918
PA
74622013-06-07 Pedro Alves <palves@redhat.com>
7463
5f2b57b5 7464 PR server/14823
3aee8918
PA
7465 * Makefile.in (OBS): Add tdesc.o.
7466 (IPA_OBJS): Add tdesc-ipa.o.
7467 (tdesc-ipa.o): New rule.
7468 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7469 interface.
7470 * linux-low.c (new_inferior): Delete.
7471 (disabled_regsets, num_regsets): Delete.
7472 (linux_add_process): Adjust to set the new per-process
7473 new_inferior flag.
7474 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7475 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7476 was a stop. When calling arch_setup, switch the current inferior
7477 to the thread that got an event.
7478 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7479 (regsets_fetch_inferior_registers)
7480 (regsets_store_inferior_registers): New regsets_info parameter.
7481 Adjust to use it.
7482 (linux_register_in_regsets): New regs_info parameter. Adjust to
7483 use it.
7484 (register_addr, fetch_register, store_register): New usrregs_info
7485 parameter. Adjust to use it.
7486 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7487 parameter regs_info. Adjust to use it.
7488 (linux_fetch_registers): Get the current inferior's regs_info, and
7489 adjust to use it.
7490 (linux_store_registers): Ditto.
7491 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7492 (initialize_low): Don't initialize the target_regsets here. Call
7493 initialize_low_arch.
7494 * linux-low.h (target_regsets): Delete declaration.
7495 (struct regsets_info): New.
7496 (struct usrregs_info): New.
7497 (struct regs_info): New.
7498 (struct process_info_private) <new_inferior>: New field.
7499 (struct linux_target_ops): Delete the num_regs, regmap, and
7500 regset_bitmap fields. New field regs_info.
7501 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7502 * i387-fp.c (num_xmm_registers): Delete.
7503 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7504 calls to new interface.
7505 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7506 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7507 Infer the number of xmm registers from the regcache's target
7508 description.
7509 * i387-fp.h (num_xmm_registers): Delete.
7510 * inferiors.c (add_thread): Don't install the thread's regcache
7511 here.
7512 * proc-service.c (gregset_info): Fetch the current inferior's
7513 regs_info. Adjust to use it.
7514 * regcache.c: Include tdesc.h.
7515 (register_bytes, reg_defs, num_registers)
7516 (gdbserver_expedite_regs): Delete.
7517 (get_thread_regcache): If the thread doesn't have a regcache yet,
7518 create one, instead of aborting gdbserver.
7519 (regcache_invalidate_one): Rename to ...
7520 (regcache_invalidate_thread): ... this.
7521 (regcache_invalidate_one): New.
7522 (regcache_invalidate): Only invalidate registers of the current
7523 process.
7524 (init_register_cache): Add target_desc parameter, and use it.
7525 (new_register_cache): Ditto. Assert the target description has a
7526 non zero registers_size.
7527 (regcache_cpy): Add assertions. Adjust.
7528 (realloc_register_cache, set_register_cache): Delete.
7529 (registers_to_string, registers_from_string): Adjust.
7530 (find_register_by_name, find_regno, find_register_by_number)
7531 (register_cache_size): Add target_desc parameter, and use it.
7532 (free_register_cache_thread, free_register_cache_thread_one)
7533 (regcache_release, register_cache_size): New.
7534 (register_size): Add target_desc parameter, and use it.
7535 (register_data, supply_register, supply_register_zeroed)
7536 (supply_regblock, supply_register_by_name, collect_register)
7537 (collect_register_as_string, collect_register_by_name): Adjust.
7538 * regcache.h (struct target_desc): Forward declare.
7539 (struct regcache) <tdesc>: New field.
7540 (init_register_cache, new_register_cache): Add target_desc
7541 parameter.
7542 (regcache_invalidate_thread): Declare.
7543 (regcache_invalidate_one): Delete declaration.
7544 (regcache_release): Declare.
7545 (find_register_by_number, register_cache_size, register_size)
7546 (find_regno): Add target_desc parameter.
7547 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7548 declarations.
7549 * remote-utils.c: Include tdesc.h.
7550 (outreg, prepare_resume_reply): Adjust.
7551 * server.c: Include tdesc.h.
7552 (gdbserver_xmltarget): Delete declaration.
7553 (get_features_xml, process_serial_event): Adjust.
7554 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7555 declare.
7556 (struct process_info) <tdesc>: New field.
7557 (ipa_tdesc): Declare.
7558 * tdesc.c: New file.
7559 * tdesc.h: New file.
7560 * tracepoint.c: Include tdesc.h.
7561 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7562 (get_context_regcache): Adjust to pass ipa_tdesc down.
7563 (do_action_at_tracepoint): Adjust to get the register cache size
7564 from the context regcache's description.
7565 (traceframe_walk_blocks): Adjust to get the register cache size
7566 from the current trace frame's description.
7567 (traceframe_get_pc): Adjust to get current trace frame's
7568 description and pass it down.
7569 (gdb_collect): Adjust to get the register cache size from the
7570 IPA's description.
7571 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7572 (gdbserver_xmltarget): Delete.
7573 (initialize_low_tracepoint): Set the ipa's target description.
7574 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7575 (initialize_low_tracepoint): Set the ipa's target description.
7576 * linux-x86-low.c: Include tdesc.h.
7577 [__x86_64__] (is_64bit_tdesc): New.
7578 (ps_get_thread_area, x86_get_thread_area): Use it.
7579 (i386_cannot_store_register): Rename to ...
7580 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7581 (i386_cannot_fetch_register): Rename to ...
7582 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7583 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7584 to new interface.
7585 (target_regsets): Rename to ...
7586 (x86_regsets): ... this.
7587 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7588 interface.
7589 (x86_siginfo_fixup): Use is_64bit_tdesc.
7590 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7591 (tdesc_x32_avx_linux, tdesc_x32_linux)
7592 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7593 Declare.
7594 (x86_linux_update_xmltarget): Delete.
7595 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7596 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7597 (AMD64_LINUX_USER64_CS): New.
7598 (x86_linux_read_description): New, based on
7599 x86_linux_update_xmltarget.
7600 (same_process_callback): New.
7601 (x86_arch_setup_process_callback): New.
7602 (x86_linux_update_xmltarget): New.
7603 (x86_regsets_info): New.
7604 (amd64_linux_regs_info): New.
7605 (i386_linux_usrregs_info): New.
7606 (i386_linux_regs_info): New.
7607 (x86_linux_regs_info): New.
7608 (x86_arch_setup): Reimplement.
7609 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7610 (x86_emit_ops): Ditto.
7611 (the_low_target): Adjust. Install x86_linux_regs_info,
7612 x86_cannot_fetch_register, and x86_cannot_store_register.
7613 (initialize_low_arch): New.
7614 * linux-ia64-low.c (tdesc_ia64): Declare.
7615 (ia64_fetch_register): Adjust.
7616 (ia64_usrregs_info, regs_info): New globals.
7617 (ia64_regs_info): New function.
7618 (the_low_target): Adjust.
7619 (initialize_low_arch): New function.
7620 * linux-sparc-low.c (tdesc_sparc64): Declare.
7621 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7622 Adjust.
7623 (sparc_arch_setup): New function.
7624 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7625 (the_low_target): Adjust.
7626 (initialize_low_arch): New function.
7627 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7628 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7629 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7630 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7631 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7632 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7633 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7634 (tdesc_powerpc_isa205_vsx64l): Declare.
7635 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7636 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7637 (ppc_set_pc, ppc_get_hwcap): Adjust.
7638 (ppc_usrregs_info): Forward declare.
7639 (!__powerpc64__) ppc_regmap_adjusted: New global.
7640 (ppc_arch_setup): Adjust to the current process'es target
7641 description.
7642 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7643 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7644 (ppc_store_evrregset): Adjust.
7645 (target_regsets): Rename to ...
7646 (ppc_regsets): ... this, and make static.
7647 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7648 (ppc_regs_info): New function.
7649 (the_low_target): Adjust.
7650 (initialize_low_arch): New function.
7651 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7652 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7653 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7654 (tdesc_s390x_linux64v2): Declare.
7655 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7656 (s390_fill_gregset, s390_store_last_break): Adjust.
7657 (target_regsets): Rename to ...
7658 (s390_regsets): ... this, and make static.
7659 (s390_get_pc, s390_set_pc): Adjust.
7660 (s390_get_hwcap): New target_desc parameter, and use it.
7661 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7662 (s390_arch_setup): Adjust to set the current process'es target
7663 description. Don't adjust the regmap.
7664 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7665 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7666 (regs_info_3264): New globals.
7667 (s390_regs_info): New function.
7668 (the_low_target): Adjust.
7669 (initialize_low_arch): New function.
7670 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7671 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7672 [__mips64] (init_registers_mips_linux)
7673 (init_registers_mips_dsp_linux): Delete defines.
7674 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7675 (have_dsp): New global.
7676 (mips_read_description): New, based on mips_arch_setup.
7677 (mips_arch_setup): Reimplement.
7678 (get_usrregs_info): New function.
7679 (mips_cannot_fetch_register, mips_cannot_store_register)
7680 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7681 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7682 (target_regsets): Rename to ...
7683 (mips_regsets): ... this, and make static.
7684 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7685 (dsp_regs_info, regs_info): New globals.
7686 (mips_regs_info): New function.
7687 (the_low_target): Adjust.
7688 (initialize_low_arch): New function.
7689 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7690 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7691 Declare.
7692 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7693 (arm_read_description): New, with bits factored from
7694 arm_arch_setup.
7695 (arm_arch_setup): Reimplement.
7696 (target_regsets): Rename to ...
7697 (arm_regsets): ... this, and make static.
7698 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7699 (arm_regs_info): New function.
7700 (the_low_target): Adjust.
7701 (initialize_low_arch): New function.
7702 * linux-m68k-low.c (tdesc_m68k): Declare.
7703 (target_regsets): Rename to ...
7704 (m68k_regsets): ... this, and make static.
7705 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7706 (m68k_regs_info): New function.
7707 (m68k_arch_setup): New function.
7708 (the_low_target): Adjust.
7709 (initialize_low_arch): New function.
7710 * linux-sh-low.c (tdesc_sharch): Declare.
7711 (target_regsets): Rename to ...
7712 (sh_regsets): ... this, and make static.
7713 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7714 (sh_regs_info, sh_arch_setup): New functions.
7715 (the_low_target): Adjust.
7716 (initialize_low_arch): New function.
7717 * linux-bfin-low.c (tdesc_bfin): Declare.
7718 (bfin_arch_setup): New function.
7719 (bfin_usrregs_info, regs_info): New globals.
7720 (bfin_regs_info): New function.
7721 (the_low_target): Adjust.
7722 (initialize_low_arch): New function.
7723 * linux-cris-low.c (tdesc_cris): Declare.
7724 (cris_arch_setup): New function.
7725 (cris_usrregs_info, regs_info): New globals.
7726 (cris_regs_info): New function.
7727 (the_low_target): Adjust.
7728 (initialize_low_arch): New function.
7729 * linux-cris-low.c (tdesc_crisv32): Declare.
7730 (cris_arch_setup): New function.
7731 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7732 (cris_regs_info): New function.
7733 (the_low_target): Adjust.
7734 (initialize_low_arch): New function.
7735 * linux-m32r-low.c (tdesc_m32r): Declare.
7736 (m32r_arch_setup): New function.
7737 (m32r_usrregs_info, regs_info): New globals.
7738 (m32r_regs_info): Adjust.
7739 (initialize_low_arch): New function.
7740 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7741 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7742 (tic6x_usrregs_info): Forward declare.
7743 (tic6x_read_description): New function, based on ...
7744 (tic6x_arch_setup): ... this. Reimplement.
7745 (target_regsets): Rename to ...
7746 (tic6x_regsets): ... this, and make static.
7747 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7748 (tic6x_regs_info): New function.
7749 (the_low_target): Adjust.
7750 (initialize_low_arch): New function.
7751 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7752 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7753 (target_regsets): Rename to ...
7754 (xtensa_regsets): ... this, and make static.
7755 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7756 globals.
7757 (xtensa_arch_setup, xtensa_regs_info): New functions.
7758 (the_low_target): Adjust.
7759 (initialize_low_arch): New function.
7760 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7761 (nios2_arch_setup): Set the current process'es tdesc.
7762 (target_regsets): Rename to ...
7763 (nios2_regsets): ... this.
7764 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7765 (nios2_regs_info): New function.
7766 (the_low_target): Adjust.
7767 (initialize_low_arch): New function.
a261b8f5
PA
7768 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7769 (aarch64_arch_setup): Set the current process'es tdesc.
7770 (target_regsets): Rename to ...
7771 (aarch64_regsets): ... this.
7772 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7773 (aarch64_regs_info): New function.
7774 (the_low_target): Adjust.
7775 (initialize_low_arch): New function.
3aee8918
PA
7776 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7777 globals.
7778 (target_regsets): Rename to ...
7779 (tile_regsets): ... this.
7780 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7781 (tile_regs_info): New function.
7782 (tile_arch_setup): Set the current process'es tdesc.
7783 (the_low_target): Adjust.
7784 (initialize_low_arch): New function.
7785 * spu-low.c (tdesc_spu): Declare.
7786 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7787 * win32-arm-low.c (tdesc_arm): Declare.
7788 (arm_arch_setup): New function.
7789 (the_low_target): Install arm_arch_setup instead of
7790 init_registers_arm.
7791 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7792 (init_windows_x86): Rename to ...
7793 (i386_arch_setup): ... this. Set `win32_tdesc'.
7794 (the_low_target): Adjust.
7795 * win32-low.c (win32_tdesc): New global.
7796 (child_add_thread): Don't create the thread cache here.
7797 (do_initial_child_stuff): Set the new process'es tdesc.
7798 * win32-low.h (struct target_desc): Forward declare.
7799 (win32_tdesc): Declare.
7800 * lynx-i386-low.c (tdesc_i386): Declare global.
7801 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7802 * lynx-low.c (lynx_tdesc): New global.
7803 (lynx_add_process): Set the new process'es tdesc.
7804 * lynx-low.h (struct target_desc): Forward declare.
7805 (lynx_tdesc): Declare global.
7806 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7807 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7808 * nto-low.c (nto_tdesc): New global.
7809 (do_attach): Set the new process'es tdesc.
7810 * nto-low.h (struct target_desc): Forward declare.
7811 (nto_tdesc): Declare.
7812 * nto-x86-low.c (tdesc_i386): Declare.
7813 (nto_x86_arch_setup): Set `nto_tdesc'.
7814
b1fbec62
GB
78152013-06-04 Gary Benson <gbenson@redhat.com>
7816
7817 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7818 to qSupported response when appropriate.
7819 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7820 with nonzero-length annex.
7821 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7822 arguments supplied in annex.
7823
d1ec4ce7
DE
78242013-05-31 Doug Evans <dje@google.com>
7825
ac44adcb 7826 PR server/15594
d1ec4ce7
DE
7827 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7828 64 bits in 64-cross-32 environment.
7829
9b25f2d3
PA
78302013-05-28 Pedro Alves <palves@redhat.com>
7831
7832 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7833 (aarch64-without-fpu.c): Delete rule.
7834 * configure.srv (aarch64*-*-linux*): Remove references to
7835 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7836 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7837 declaration.
7838
6740dc9c
PA
78392013-05-24 Pedro Alves <palves@redhat.com>
7840
7841 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7842 instead of strchr/decode_address. Error if the range isn't split
7843 with a ','. Don't assume there's be a ':' in the action.
7844
c2d6af84
PA
78452013-05-23 Yao Qi <yao@codesourcery.com>
7846 Pedro Alves <palves@redhat.com>
7847
7848 * linux-low.c (lwp_in_step_range): New function.
7849 (linux_wait_1): If the thread was range stepping and stopped
7850 outside the stepping range, report the stop to GDB. Otherwise,
7851 continue stepping. Add range stepping debug output.
7852 (linux_set_resume_request): Copy the step range from the resume
7853 request to the lwp.
7854 (linux_supports_range_stepping): New.
7855 (linux_target_ops) <supports_range_stepping>: Set to
7856 linux_supports_range_stepping.
7857 * linux-low.h (struct linux_target_ops)
7858 <supports_range_stepping>: New field.
7859 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7860 * linux-x86-low.c (x86_supports_range_stepping): New.
7861 (the_low_target) <supports_range_stepping>: Set to
7862 x86_supports_range_stepping.
7863 * server.c (handle_v_cont): Handle 'r' action.
7864 (handle_v_requests): Append ";r" if the target supports range
7865 stepping.
7866 * target.h (struct thread_resume) <step_range_start,
7867 step_range_end>: New fields.
7868 (struct target_ops) <supports_range_stepping>:
7869 New field.
7870 (target_supports_range_stepping): New macro.
7871
58794e1a
JB
78722013-05-17 Joel Brobecker <brobecker@adacore.com>
7873
7874 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7875 confusion in comment.
7876
d631c5a7
JB
78772013-05-17 Joel Brobecker <brobecker@adacore.com>
7878
7879 * lynx-low.c (struct process_info_private): New type.
7880 (lynx_add_process): New function.
7881 (lynx_create_inferior, lynx_attach): Replace calls to
7882 add_process by calls to lynx_add_process.
7883 (lynx_resume): If PTID is null, then try using
7884 current_process()->private->last_wait_event_ptid.
7885 Add comments.
7886 (lynx_clear_inferiors): Delete. The contents of that function
7887 has been inlined in lynx_mourn;
7888 (lynx_wait_1): Save the ptid in the process's private data.
7889 (lynx_mourn): Free the process' private data. Replace call
7890 to lynx_clear_inferiors by call to clear_inferiors.
7891
96f7a20f
YQ
78922013-05-17 Yao Qi <yao@codesourcery.com>
7893
7894 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7895 the right place.
7896
db0dfaa0
LM
78972013-05-16 Luis Machado <lgustavo@codesourcery.com>
7898
7899 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7900 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7901 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7902 PT_TEXT_END_ADDR guards. Update comments.
7903 (linux_target_op) <read_offsets>: Conditionally define to
7904 linux_read_offsets if the target is UCLIBC and if it defines
7905 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7906
68f5f838
SL
79072013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7908 Andrew Jenner <andrew@codesourcery.com>
7909
7910 * Makefile.in (SFILES): Add linux-nios2-low.c.
7911 (clean): Add action to delete nios2-linux.c.
7912 (nios2-linux.c): New rule.
7913 * configure.srv: Add nios2*-*-linux*.
7914 * linux-nios2-low.c: New.
7915
1ebff1fd
HAQ
79162013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7917
7918 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7919
f6150862
HZ
79202013-04-25 Hui Zhu <hui@codesourcery.com>
7921
7922 PR gdb/15186
f6150862
HZ
7923 * ax.c (ax_printf): Add fflush.
7924
614c279d
TT
79252013-04-22 Tom Tromey <tromey@redhat.com>
7926
7927 * Makefile.in (SFILES): Add filestuff.c.
7928 (OBS): Add filestuff.o.
7929 (filestuff.o): New target.
7930 * config.in, configure: Rebuild.
7931 * configure.ac: Check for fdwalk, pipe2.
7932
7d4e5717
PA
79332013-04-17 Pedro Alves <palves@redhat.com>
7934
7935 * configure.ac (USE_THREAD_DB): Delete variable.
7936 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7937 Don't AC_SUBST USE_THREAD_DB.
7938 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7939 * config.in, configure: Regenerate.
7940
d5c93e41
PA
79412013-04-16 Pedro Alves <palves@redhat.com>
7942
7943 * linux-low.h (struct lwp_info) <thread_known>: Move under
7944 the USE_THREAD_DB #ifdef.
7945
04f5fe89
PA
79462013-04-16 Pedro Alves <palves@redhat.com>
7947
7948 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7949 (linux-low.o): Delete rule.
7950 * linux-low.h: Always include "gdb_thread_db.h" instead of
7951 conditionally including thread_db.h.
7952 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7953 HAVE_THREAD_DB_H.
7954
480b27bf
JK
79552013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7956
7957 * Makefile.in (install-only): Fix make install regression.
7958
43662968
JK
79592013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7960
7961 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7962 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7963 installation.
7964 * gdbserver.1: Remove.
7965
3e74e146
PA
79662013-03-22 Pedro Alves <palves@redhat.com>
7967
7968 * linux-low.c (handle_extended_wait): Don't call
7969 linux_enable_event_reporting.
7970
a8347a2a
TT
79712013-03-15 Tony Theodore <tonyt@logyst.com>
7972
7973 PR build/9098:
7974 * Makefile.in (SHELL): Use @SHELL@.
7975
eeb56fa7
SDJ
79762013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7977
7978 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7979 compiler warning.
7980
4fa7e2ff
JB
79812013-03-13 Joel Brobecker <brobecker@adacore.com>
7982
7983 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7984 Remove extraneous NULL element.
7985
8ddb1965
YQ
79862013-03-13 Yao Qi <yao@codesourcery.com>
7987
7988 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7989 'V' block in trace frame.
7990
9accd112
MM
79912013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7992
7993 * target.h (struct target_ops): Add btrace ops.
7994 (target_supports_btrace): New macro.
7995 (target_enable_btrace): New macro.
7996 (target_disable_btrace): New macro.
7997 (target_read_btrace): New macro.
7998 * gdbthread.h (struct thread_info): Add btrace field.
7999 * server.c: Include btrace-common.h.
8000 (handle_btrace_general_set): New function.
8001 (handle_btrace_enable): New function.
8002 (handle_btrace_disable): New function.
8003 (handle_general_set): Call handle_btrace_general_set.
8004 (handle_qxfer_btrace): New function.
8005 (struct qxfer qxfer_packets[]): Add btrace entry.
8006 * inferiors.c (remove_thread): Disable btrace.
8007 * linux-low: Include linux-btrace.h.
8008 (linux_low_enable_btrace): New function.
8009 (linux_low_read_btrace): New function.
8010 (linux_target_ops): Add btrace ops.
8011 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8012 Add srv_linux_btrace=yes.
8013 (x86_64-*-linux*): Add linux-btrace.o.
8014 Add srv_linux_btrace=yes.
8015 * configure.ac: Define HAVE_LINUX_BTRACE.
8016 * config.in: Regenerated.
8017 * configure: Regenerated.
8018
5cc22e4c
MM
80192013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8020
8021 * server.c (handle_qxfer): Preserve error message if -3 is
8022 returned.
8023 (qxfer): Document the -3 return value.
8024
7c97f91e
MM
80252013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8026
8027 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8028 (linux_btrace_h): New variable.
8029 (linux-btrace.o): New rule.
8030
be9a119c 80312013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
8032 Hafiz Abid Qadeer <abidh@codesourcery.com>
8033
8034 * tracepoint.c (trace_buffer_size): New global.
8035 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8036 (init_trace_buffer): Change to one-argument function. Allocate
8037 trace buffer memory.
8038 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8039 handle QTBuffer:size packet.
8040 (cmd_bigqtbuffer_size): New function.
8041 (initialize_tracepoint): Call init_trace_buffer with
8042 DEFAULT_TRACE_BUFFER_SIZE.
8043 * server.c (handle_query): Add QTBuffer:size in the
8044 supported packets.
8045
e64f7499
YQ
80462013-03-07 Yao Qi <yao@codesourcery.com>
8047
8048 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8049 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8050 of -1.
8051 (cmd_qtsp): Adjust condition. Do post increment.
8052 Set cur_action and cur_step_action back to 0.
8053
f0ae6fc3
PA
80542013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8055
8056 PR server/15236
8057 * linux-low.c (linux_write_memory): Return early success if LEN is
8058 zero.
8059
b5b0b0af
CV
80602013-03-05 Corinna Vinschen <vinschen@redhat.de>
8061
334ad4a8 8062 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 8063
589bc927
TT
80642013-02-28 Tom Tromey <tromey@redhat.com>
8065
8066 * configure.ac: Invoke AC_SYS_LARGEFILE.
8067 * configure, config.in: Rebuild.
8068
dfe07582
CV
80692013-02-28 Corinna Vinschen <vinschen@redhat.com>
8070
8071 * win32-low.c: Throughout, fix format strings and casts of
8072 printf-like functions to avoid type related warnings on all
8073 platforms.
8074 (get_child_debug_event): Print dwDebugEventCode as hex since
8075 that's how it's usually documented.
8076
736cd585
YQ
80772013-02-28 Yao Qi <yao@codesourcery.com>
8078
8079 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8080 pulongest.
8081
e1f58301
JW
80822013-02-27 Jiong Wang <jiwang@tilera.com>
8083
8084 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8085 (reg-tilegx32.c): New rule.
8086 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8087 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8088 different register info initializer according to elf class.
8089 (init_registers_tilgx32): New function. The tilegx32 register info
8090 initializer.
8091 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8092 (tile_store_gregset): Likewise.
8093
d171ca78
YQ
80942013-02-27 Yao Qi <yao@codesourcery.com>
8095
8096 * server.c (process_point_options): Print debug message when
8097 debug_threads is true.
8098
282bbdf3
YQ
80992013-02-26 Yao Qi <yao@codesourcery.com>
8100
8101 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8102
aca22551
PA
81032013-02-19 Pedro Alves <palves@redhat.com>
8104 Kai Tietz <ktietz@redhat.com>
8105
8106 PR gdb/15161
8107
8108 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8109 instead of strtoul to extract address from packet.
8110 (process_serial_event) <'z'>: Likewise.
8111
4f3cee1c
YQ
81122013-02-18 Yao Qi <yao@codesourcery.com>
8113
8114 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8115
8e1d55a3
PA
81162013-02-14 Pedro Alves <palves@redhat.com>
8117
8118 Plug memory leak.
8119
8120 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8121 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8122
458820da
PA
81232013-02-14 Pedro Alves <palves@redhat.com>
8124
8125 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8126
baea0dae
PA
81272013-02-14 Pedro Alves <palves@redhat.com>
8128
8129 * tracepoint.c (save_string): Delete.
8130 (add_tracepoint_action): Use savestring instead of save_string.
8131
0b1afbb3
PA
81322013-02-12 Pedro Alves <palves@redhat.com>
8133
8134 * linux-xtensa-low.c: Ditto.
8135 * xtensa-xtregs.c: Ditto.
8136
8a4ac37e
PA
81372013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8138
8139 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8140 thread_db.
8141
148de6bb
MS
81422013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8143
8144 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8145 aarch64_num_wp_regs and aarch64_num_bp_regs to
8146 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8147
55fac6e0
MS
81482013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8149
8150 * linux-aarch64-low.c (ps_get_thread_area): Replace
8151 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8152
176eb98c
MS
81532013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8154 Marcus Shawcroft <marcus.shawcroft@arm.com>
8155 Nigel Stephens <nigel.stephens@arm.com>
8156 Yufeng Zhang <yufeng.zhang@arm.com>
8157
8158 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8159 (aarch64.c, aarch64-without-fpu.c): New targets.
8160 * configure.srv (aarch64*-*-linux*): New.
8161 * linux-aarch64-low.c: New file.
8162
56f7af9c
MS
81632013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8164
43aaf8b6 8165 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
8166 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8167 (dequeue_one_deferred_signal, linux_resume_one_thread)
8168 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8169 (linux_tracefork_grandchild, linux_test_for_tracefork)
8170 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8171 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8172 where the argument is 0.
8173
60f662b0
YQ
81742013-01-25 Yao Qi <yao@codesourcery.com>
8175
8176 * event-loop.c: Include "queue.h".
8177 (gdb_event_p): New typedef.
8178 (struct gdb_event) <next_event>: Remove.
8179 (event_queue): Change to QUEUE(gdb_event_p).
8180 (async_queue_event): Remove.
8181 (gdb_event_xfree): New.
8182 (initialize_event_loop): New.
8183 (process_event): Use API from QUEUE.
8184 (wait_for_event): Likewise.
8185 * server.c (main): Call initialize_event_loop.
8186 * server.h (initialize_event_loop): Declare.
8187
5ae4861a
YQ
81882013-01-18 Yao Qi <yao@codesourcery.com>
8189
8190 * ax.h (struct eval_agent_expr_context): New.
8191 (gdb_eval_agent_expr): Update declaration.
8192 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8193 TFRAME. Add new argument CTX.
8194 * server.h (struct eval_agent_expr_context): Declare.
8195 (agent_mem_read, agent_tsv_read): Update declaration.
8196 (agent_mem_read_string): Likewise.
8197 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8198 (add_traceframe_block): Add new argument TPOINT.
8199 Increase TPOINT->traceframe_usage.
8200 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8201 eval_tracepoint_agent_expr.
8202 (condition_true_at_tracepoint): Likewise.
8203 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8204 (agent_mem_read_string, agent_tsv_read): Likewise.
8205
85e00e85
YQ
82062013-01-16 Yao Qi <yao@codesourcery.com>
8207
8208 * linux-low.c (linux_resume_one_lwp): Don't check
8209 'lwp->bp_reinsert != 0'.
8210
4039cf45
JB
82112013-01-07 Joel Brobecker <brobecker@adacore.com>
8212 Pedro Alves <palves@redhat.com>
8213
8214 * lynx-low.c (ptrace_request_to_str): Define a temporary
8215 macro and use it to simplify this function's implementation.
8216
9044dee2
JB
82172013-01-07 Joel Brobecker <brobecker@adacore.com>
8218
8219 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8220 sets errno.
8221
e6352c8f
JB
82222013-01-07 Joel Brobecker <brobecker@adacore.com>
8223
8224 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8225
50681a27
JB
82262013-01-07 Joel Brobecker <brobecker@adacore.com>
8227
8228 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8229
3f6e77ef
JB
82302013-01-07 Joel Brobecker <brobecker@adacore.com>
8231
8232 * lynx-low.c (lynx_resume): Use the resume_info parameter
8233 to determine the ptid for the lynx_ptrace call, unless
8234 it is equal to minus_one_ptid, in which case we use the
8235 ptid of the current_inferior.
8236 (lynx_wait_1): After having received a thread create/exit
8237 event, resume the inferior's execution using the signaling
8238 thread's ptid, rather than the old ptid.
8239
7fda33ae
JB
82402013-01-07 Joel Brobecker <brobecker@adacore.com>
8241
8242 * lynx-low.c (lynx_resume): Delete variable ret.
8243
b9786c74
JB
82442013-01-01 Joel Brobecker <brobecker@adacore.com>
8245
8246 * gdbreplay.c (gdbreplay_version): Update copyright year.
8247 * server.c (gdbserver_version): Likewise.
8248
8b93d60f
JB
82492012-12-17 Joel Brobecker <brobecker@adacore.com>
8250
8251 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8252 new thread.
8253
037335a7
JB
82542012-12-17 Joel Brobecker <brobecker@adacore.com>
8255
8256 * lynx-low.c (ptrace_request_to_str): Add handling for
8257 PTRACE_GETTRACESIG.
8258
52d4cbd8
JB
82592012-12-17 Joel Brobecker <brobecker@adacore.com>
8260
8261 * lynx-low.c (lynx_attach): Delete variable new_process.
8262
ab8f6ca9
JB
82632012-12-17 Joel Brobecker <brobecker@adacore.com>
8264
8265 * lynx-low.c (lynx_create_inferior): Delete variable
8266 new_process.
8267
78cbc024
JB
82682012-12-17 Joel Brobecker <brobecker@adacore.com>
8269
8270 * lynx-low.c (ptrace_request_to_str): Do not handle
8271 PTRACE_GETTHREADLIST if this macro does not exist.
8272
14a00470
YQ
82732012-12-15 Yao Qi <yao@codesourcery.com>
8274
8275 * Makefile.in (OBS): Add notif.o.
8276 * notif.c, notif.h: New.
8277 * server.c: Include "notif.h".
8278 (struct vstop_notif) <next>: Remove.
8279 <base>: New field.
8280 (queue_stop_reply): Update.
8281 (push_event, send_next_stop_reply): Remove.
8282 (discard_queued_stop_replies): Update.
8283 (notif_stop): New variable.
8284 (handle_v_stopped): Remove.
8285 (handle_v_requests): Don't call handle_v_stopped. Call
8286 handle_ack_notif instead.
8287 (queue_stop_reply_callback): Call notif_event_enque instead
8288 of queue_stop_reply.
8289 (handle_status): Don't call send_next_stop_reply, call
8290 notif_write_event instead.
8291 (kill_inferior_callback): Likewise.
8292 (detach_or_kill_inferior_callback): Likewise.
8293 (main): Call initialize_notif.
8294 (process_serial_event): Call QUEUE_is_empty.
8295 (handle_target_event): Call notif_push instead of push event.
8296 * server.h (push_event): Remove declaration.
8297
61c125b9
TT
82982012-12-10 Tom Tromey <tromey@redhat.com>
8299
8300 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8301 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8302 macros.
8303 (.c.o): Rewrite.
8304 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8305 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8306 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8307 (amd64-linux-ipa.o, ax.o): Rewrite.
8308 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8309 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8310 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8311 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8312 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8313 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8314 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8315 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8316 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8317 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8318 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8319 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8320 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8321 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8322 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8323 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8324 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8325 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8326 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8327 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8328 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8329 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8330 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8331 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8332 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8333 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8334 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8335 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8336 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8337 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8338 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8339 (reg-tilegx.o): Remove.
8340 (all_object_files): New macro.
8341 Include .deps files.
8342 * aclocal.m4, configure: Rebuild.
8343 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8344 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8345 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8346
e90e9ad9
TT
83472012-12-05 Tom Tromey <tromey@redhat.com>
8348
8349 PR gdb/14917:
8350 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8351
02d403bf 83522012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
8353
8354 * configure.ac: Check for linux/perf_event.h.
8355 * config.in: Regenerated.
8356 * configure: Regenerated.
8357
0270a750
PA
83582012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8359
8360 * hostio.c (handle_readlink): Decrease buffer size
8361 parameter passed to readlink by one byte.
8362
8c29b58e
YQ
83632012-11-26 Yao Qi <yao@codesourcery.com>
8364
8365 * configure.ac (build_warnings): Append '-Wempty-body'.
8366 * configure: Regenerated.
8367 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8368 body.
8369
8bdce1ff
PM
83702012-11-15 Pierre Muller <muller@sourceware.org>
8371
8372 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8373 * config.in: Regenerate.
8374 * configure: Regenerate.
8375 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8376 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8377 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8378 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8379 header.
8380 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8381 instead of <sys/wait.h> header.
8382 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8383
02d403bf 83842012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
8385
8386 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8387 (various make rules): Remove -DGDBSERVER
8388
fbd5db48
YQ
83892012-11-09 Yao Qi <yao@codesourcery.com>
8390
8391 * spu-low.c (current_ptid): Move it to ..
8392 * gdbthread.h: ... here. New.
8393 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8394 * server.c (myresume, process_serial_event): Likewise.
8395 * thread-db.c (thread_db_find_new_threads): Likewise.
8396 * tracepoint.c (run_inferior_command): Likewise.
8397
b3dc46ff
AB
83982012-10-01 Andrew Burgess <aburgess@broadcom.com>
8399
8400 * server.c (handle_search_memory_1): Include access length in
8401 warning message.
8402
07c04788
HPN
84032012-09-05 Michael Brandt <michael.brandt@axis.com>
8404
8405 * linux-crisv32-low.c: Fix compile errors.
8406
918d227b
YQ
84072012-09-04 Yao Qi <yao@codesourcery.com>
8408
8409 * tracepoint.c (cmd_qtsv): Adjust debug message.
8410 Don't check CUR_TPOINT.
8411
18c1b81a
YQ
84122012-08-28 Yao Qi <yao@codesourcery.com>
8413
8414 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8415 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8416 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8417 Remove declarations of xmalloc, xreallloc, xstrdup and
8418 freeargv.
8419 * Makefile.in (libiberty_h): New.
8420 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8421 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8422
dc82f37b
YQ
84232012-08-23 Yao Qi <yao@codesourcery.com>
8424
8425 * server.h: Remove declaration of 'xsnprintf'.
8426
406b1477
KS
84272012-08-22 Keith Seitz <keiths@redhat.com>
8428
8429 * server.h: Include build-gnulib-gbserver/config.h.
8430 * gdbreplay.c: Likewise.
8431
e6712ff1
DE
84322012-08-08 Doug Evans <dje@google.com>
8433
8434 * Makefile.in (SFILES): Add gdb_vecs.c.
8435 (OBS): Add gdb_vecs.o.
8436 (gdb_vecs_h, host_defs_h): New variables.
8437 (thread-db.o): Add $(gdb_vecs_h) dependency.
8438 (gdb_vecs.o): New rule.
8439 * thread-db.c: #include "gdb_vecs.h".
8440 (thread_db_load_search): Use a vector to iterate over path elements.
8441 Handle text appearing after "$pdir".
8442
8443 * configure.ac: Add check for strstr.
8444 * config.in: Regenerate.
8445 * configure: Regenerate.
8446
7c3270ae
UW
84472012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8448
8449 * hostio.c (handle_pread): If pread fails, fall back to attempting
8450 lseek/read.
8451 (handle_pwrite): Likewise for pwrite.
8452
b62e2b27
UW
84532012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8454
8455 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8456 between unsupported TYPE and unimplementable ADDR/LEN combination.
8457 (arm_insert_point): Act on new return value.
8458
78a99e91
PA
84592012-07-31 Pedro Alves <palves@redhat.com>
8460
8461 * server.c (process_point_options): Only skip tokens if we find
8462 one that is unrecognized. Don't treat 'X' specially while
8463 skipping unrecognized tokens.
8464
fcf303ab
UW
84652012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8466
8467 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8468 to 4-byte-align HW breakpoint addresses for Thumb.
8469
7255706c
YQ
84702012-07-27 Yao Qi <yao@codesourcery.com>
8471
8472 PR remote/14161.
8473
8474 * server.h: Declare gdb_agent_about_to_close.
8475 * target.c (kill_inferior): Include "agent.h".
8476 New. Send command 'kill'.
8477 * target.h (kill_inferior): Removed macro.
8478 * tracepoint.c (gdb_agent_about_to_close): New.
8479 (gdb_agent_helper_thread): Handle command 'close'.
8480 Wait endlessly until the inferior stops.
8481 Install gdb_agent_remove_socket to atexit hook.
8482 (agent_socket_name): New static variable.
8483 (gdb_agent_socket_init): Replace local variable 'name' with
8484 'agent_socket_name'.
8485 (gdb_agent_remove_socket): New.
8486
5a3f286f
YQ
84872012-07-27 Yao Qi <yao@codesourcery.com>
8488
8489 * server.c (process_point_options): Stop at 'X' when parsing.
8490
961bd387
ME
84912012-07-19 Michael Eager <eager@eagercon.com>
8492
a261b8f5 8493 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
8494 to hw_execute.
8495 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8496 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8497 hardware breakpoint.
8498
aa7c7447
JK
84992012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8500
8501 * gdbserver/linux-low.c (initialize_low): Call
8502 linux_ptrace_init_warnings.
8503
7f216e7c
DE
85042012-07-02 Doug Evans <dje@google.com>
8505
8506 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8507 pointer to int.
8508
d3ce09f5
SS
85092012-07-02 Stan Shebs <stan@codesourcery.com>
8510
8511 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8512 (ax.o): Add it to build rule.
8513 (ax-ipa.o): Ditto.
8514 (OBS): Add format.o.
8515 (IPA_OBS): Add format.o.
8516 * server.c (handle_query): Claim support for breakpoint commands.
8517 (process_point_options): Add command case.
8518 (process_serial_event): Leave running if there are printfs in
8519 effect.
8520 * mem-break.h (any_persistent_commands): Declare.
8521 (add_breakpoint_commands): Declare.
8522 (gdb_no_commands_at_breakpoint): Declare.
8523 (run_breakpoint_commands): Declare.
8524 * mem-break.c (struct point_command_list): New struct.
8525 (struct breakpoint): New field command_list.
8526 (any_persistent_commands): New function.
8527 (add_commands_to_breakpoint): New function.
8528 (add_breakpoint_commands): New function.
8529 (gdb_no_commands_at_breakpoint): New function.
8530 (run_breakpoint_commands): New function.
8531 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8532 locally.
8533 * ax.c: Include format.h.
8534 (ax_printf): New function.
8535 (gdb_eval_agent_expr): Add printf opcode.
8536
2f8f6aed
YQ
85372012-06-13 Yao Qi <yao@codesourcery.com>
8538
8539 * server.c (start_inferior): Remove duplicated writes to fields
8540 'last_resume_kind' and 'last_status' of 'current_inferior'.
8541
0c9070b3
YQ
85422012-06-12 Yao Qi <yao@codesourcery.com>
8543 Pedro Alves <palves@redhat.com>
8544
8545 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8546 comment.
8547 * server.c (handle_v_cont): Extend comment.
8548
c52daf70
YQ
85492012-06-11 Yao Qi <yao@codesourcery.com>
8550
8551 * linux-low.c (linux_attach): Add 'static'.
8552
d38bbb0a
YQ
85532012-06-06 Yao Qi <yao@codesourcery.com>
8554
8555 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8556
89dc0afd
JK
85572012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8558
8559 Fix gcc -flto compilation warning.
8560 * server.c (main): Make variable multi_mode and attach volatile.
8561
75f62ce7
TJB
85622012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8563
8564 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8565 if the platform doesn't know about it.
8566
65f479b6
PA
85672012-05-30 Jeff Kenton <jkenton@tilera.com>
8568
8569 * Makefile.in (SFILES): Add linux-tile-low.c.
8570 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8571 * configure.srv: Handle tilegx-*-linux*.
8572 * linux-tile-low.c: New file.
8573
0c5bf5a9
JK
85742012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8575
8576 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8577
a493e3e2
PA
85782012-05-24 Pedro Alves <palves@redhat.com>
8579
8580 PR gdb/7205
8581
43aaf8b6 8582 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 8583
2ea28649
PA
85842012-05-24 Pedro Alves <palves@redhat.com>
8585
8586 PR gdb/7205
8587
8588 Replace target_signal with gdb_signal throughout.
8589
8d409d16
MR
85902012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8591
8592 * linux-low.c (linux_store_registers): Avoid the copying sequence
8593 when no data has been retrieved by ptrace.
8594
23512c01
MGD
85952012-05-22 Will Deacon <will.deacon@arm.com>
8596
8597 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8598 Include asm/ptrace.h.
8599 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8600 already defined.
8601
4934b29e
MR
86022012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8603
8604 * linux-low.c (linux_store_registers): Don't re-retrieve data
8605 with ptrace that has already been obtained from /proc. Always
8606 copy any data retrieved with ptrace to the buffer supplied.
8607
bde24c0a
PA
86082012-05-11 Yao Qi <yao@codesourcery.com>
8609 Pedro Alves <palves@redhat.com>
8610
8611 * linux-low.c (enum stopping_threads_kind): New.
8612 (stopping_threads): Change type to `enum stopping_threads_kind'.
8613 (handle_extended_wait): If stopping and suspending threads, leave
8614 the new_lwp suspended too.
8615 (linux_wait_for_event): Adjust.
8616 (stop_all_lwps): Set `stopping_threads' to
8617 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8618 whether we're suspending threads or just stopping them. Assert no
8619 recursion happens.
8620
623b6bdf
YQ
86212012-04-29 Yao Qi <yao@codesourcery.com>
8622
8623 * server.h: Move some code to ...
8624 * gdbthread.h: ... here. New.
8625 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8626 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8627 (nto-low.o, win32-low.o): Likewise.
8628 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8629 * regcache.c, remote-utils.c, server.c: Likewise.
8630 * target.c, tracepoint.c, win32-low.c: Likewise.
8631
f15f9948
TJB
86322012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8633
8634 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8635 (PTRACE_ARG4_TYPE): Likewise.
8636 (PTRACE_XFER_TYPE): Likewise.
8637 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8638 ptrace to PTRACE_ARG3_TYPE.
8639 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8640 (PTRACE_ARG4_TYPE): Likewise.
8641 (PTRACE_XFER_TYPE): Likewise.
8642 (linux_detach_one_lwp): Cast fourth argument of
8643 ptrace to long then PTRACE_ARG4_TYPE.
8644 (regsets_fetch_inferior_registers): Cast third argument of
8645 ptrace to long then PTRACE_ARG3_TYPE.
8646 (regsets_store_inferior_registers): Likewise.
8647
38ea300a
PA
86482012-04-20 Pedro Alves <palves@redhat.com>
8649
8650 * configure: Regenerate.
8651
c971b7fa
PA
86522012-04-19 Pedro Alves <palves@redhat.com>
8653
43aaf8b6 8654 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 8655 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
8656 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8657 (all, install-only, uninstall, clean-info, all-lib, clean): No
8658 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8659 (maintainer-clean realclean distclean): Use subdir_do.
8660 (subdir_do): New.
8661 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 8662 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
8663 * acinclude.m4: Include acx_configure_dir.m4.
8664 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8665 calls. Call AC_PROG_RANLIB. Configure gnulib using
8666 ACX_CONFIGURE_DIR.
8667 (GNULIB): New.
8668 (GNULIB_STDINT_H): Adjust.
8669 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8670 * gdbreplay.c: Include build-gnulib/config.h.
8671 * server.h: Likewise.
8672 * aclocal.m4: Regenerate.
8673 * config.in: Regenerate.
8674 * configure: Regenerate.
c971b7fa 8675
809277f8
PA
86762012-04-19 Pedro Alves <palves@redhat.com>
8677
8678 * Makefile.in (LIBGNU, INCGNU): Adjust.
8679 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8680 (all, install-only, uninstall, clean-info, all-lib, clean)
8681 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8682 * configure.ac: Adjust AC_OUTPUT output.
8683 * aclocal.m4: Regenerate.
8684 * configure: Regenerate.
8685
fd9bb8b8
PA
86862012-04-19 Pedro Alves <palves@redhat.com>
8687
8688 * Makefile.in (generated_files): New.
8689 (server_h): Remove the explicit dependency on config.h, and depend
8690 on $generated_files.
8691
1c298c66
PA
86922012-04-19 Pedro Alves <palves@redhat.com>
8693
8694 * Makefile.in (INCGNU): Add -Ignulib.
8695
57c4b50b
PA
86962012-04-19 Pedro Alves <palves@redhat.com>
8697
8698 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8699 (INCGNU): ... this, and spell out -I here.
8700 (GNULIB_LIB): Rename to ...
8701 (LIBGNU): ... this.
8702 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8703
1030e047
PA
87042012-04-19 Pedro Alves <palves@redhat.com>
8705
8706 * config.in: Regenerate.
8707
447d4319
PA
87082012-04-19 Pedro Alves <palves@redhat.com>
8709
8710 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8711 * server.h (memmem): Remove declaration.
8712 * config.in: Regenerate.
8713 * configure: Regenerate.
8714
aad9eab9
YQ
87152012-04-19 Yao Qi <yao@codesourcery.com>
8716
8717 * Makefile.in (SFILES): Add common/vec.c.
8718 (OBS): Add vec.o.
8719 (vec.o): New rule.
8720
3e10640f
YQ
87212012-04-19 Yao Qi <yao@codesourcery.com>
8722
8723 * remote-utils.c (prepare_resume_reply): Replace with macro
8724 target_core_of_thread.
8725 * server.c (handle_qxfer_threads_proper): Likewise.
8726 * target.h (traget_core_of_thread): New macro.
8727
71622373
PA
87282012-04-18 Pedro Alves <palves@redhat.com>
8729
8730 * aclocal.m4: Regenerate.
8731 * configure: Regenerate.
8732
80d26939
YQ
87332012-04-16 Yao Qi <yao@codesourcery.com>
8734
8735 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8736 duplicated on address.
8737
42476b70
YQ
87382012-04-16 Yao Qi <yao@codesourcery.com>
8739
8740 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8741 (struct tracepoint_action_ops) <send>: New field.
8742 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8743 (agent_expr_send, x_tracepoint_action_send): New.
8744 (l_tracepoint_action_send): New.
8745 (cmd_qtdp): Download and install tracepoint
8746 according to `use_agent'.
8747 (run_inferior_command): Add one more parameter `len'.
8748 Update callers.
8749 (tracepoint_send_agent): New.
8750 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8751
7bc83639
YQ
87522012-04-16 Yao Qi <yao@codesourcery.com>
8753
8754 * tracepoint.c (download_tracepoints): Moved to ...
8755 (cmd_qtstart): ... here.
8756
5f18041e
YQ
87572012-04-14 Yao Qi <yao@codesourcery.com>
8758
8759 * tracepoint.c: Include inttypes.h.
8760 (struct collect_memory_action): Use sized types.
8761 (struct tracepoint): Likewise.
8762 (cmd_qtdp, stop_tracing): Update print specifiers.
8763 (cmd_qtp, response_tracepoint): Likewise.
8764 (collect_data_at_tracepoint): Likewise.
8765 (collect_data_at_step): Likewise.
8766
55a8c076
YQ
87672012-04-14 Yao Qi <yao@codesourcery.com>
8768
8769 Import gnulib module inttypes.
8770 * aclocal.m4, config.in, configure: Regenerated.
8771
dc750257
YQ
87722012-04-14 Yao Qi <yao@codesourcery.com>
8773
8774 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8775 Makefile and config.status at last.
8776
0ab5faf9
YQ
87772012-04-13 Yao Qi <yao@codesourcery.com>
8778
8779 * tracepoint.c: Include stdint.h unconditionally.
8780
18f5fd81
TJB
87812012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8782
8783 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8784 on BFD_HAVE_SYS_PROCFS_TYPE.
8785 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8786 * configure: Regenerate.
8787 * config.in: Likewise.
8788
4d47af5c
L
87892012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8790
8791 * Makefile.in (clean): Also remove x32.c x32-linux.c
8792 x32-avx.c x32-avx-linux.c.
8793 (x32.o): New target.
8794 (x32.c): Likewise.
8795 (x32-linux.o): Likewise.
8796 (x32-linux.c): Likewise.
8797 (x32-avx.o): Likewise.
8798 (x32-avx.c): Likewise.
8799 (x32-avx-linux.o): Likewise.
8800 (x32-avx-linux.c): Likewise.
8801
8802 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8803 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8804 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8805 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8806 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8807 i386/x32-avx-linux.xml.
8808
8809 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8810 (init_registers_x32_avx_linux): Likwise.
8811 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8812 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8813
ecedbe58
PA
88142012-04-13 Pedro Alves <palves@redhat.com>
8815
8816 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8817 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8818 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8819 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8820 the sub-make.
8821
c92b5177
L
88222012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8823
8824 * linux-x86-low.c (compat_x32_clock_t): New.
8825 (compat_x32_siginfo_t): Likewise.
8826 (compat_x32_siginfo_from_siginfo): Likewise.
8827 (siginfo_from_compat_x32_siginfo): Likewise.
8828 (linux_is_elf64): Likewise.
8829 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8830 and siginfo_from_compat_x32_siginfo for x32.
8831 (x86_arch_setup): Set linux_is_elf64.
8832
214d508e
L
88332012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8834
8835 PR gdb/13969
8836 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8837 e_machine field.
8838 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8839 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8840 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8841 compatible with process.
8842
c9a1864a
YQ
88432012-04-12 Yao Qi <yao@codesourcery.com>
8844
8845 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8846 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8847 (install-only, install-info, clean): Handle sub dir gnulib.
8848 (all-lib, am--refresh): New targets.
8849 (memmem.o): Remove target.
8850 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8851 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8852 (AC_REPLACE_FUNCS): Remove memmem.
8853 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8854 (AC_OUTPUT): Generate Makefile in gnulib/.
8855 * aclocal.m4, config.in, configure: Regenerated.
8856
367ba2c2
MR
88572012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8858
8859 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8860
9d236627
PA
88612012-04-05 Pedro Alves <palves@redhat.com>
8862
8863 -Werror=strict-aliasing
8864
8865 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8866 pointer.
8867
111217b3
PA
88682012-04-04 Pedro Alves <palves@redhat.com>
8869
8870 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8871 (sparc_store_gregset_from_stack, sparc_store_gregset)
8872 (sparc_breakpoint_at): Fix formatting.
8873
8365dcf5
TJB
88742012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8875
8876 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8877 are available.
8878 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8879 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8880 * config.in: Regenerate.
8881 * configure: Likewise.
8882
689cc2ae
PA
88832012-03-29 Pedro Alves <palves@redhat.com>
8884
8885 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8886 Correct ptrace arguments.
8887
c14dfd32
PA
88882012-03-28 Pedro Alves <palves@redhat.com>
8889
8890 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8891 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8892 (IA64_FR1_REGNUM): New defines.
8893 (ia64_fetch_register): New.
8894 (the_low_target): Install it.
8895 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8896 field.
8897 * linux-low.c (linux_fetch_registers): Try the
8898 the_low_target.fetch_register hook first.
8899
8900 * linux-arm-low.c (the_low_target): Adjust.
8901 * linux-bfin-low.c (the_low_target): Adjust.
8902 * linux-cris-low.c (the_low_target): Adjust.
8903 * linux-crisv32-low.c (the_low_target): Adjust.
8904 * linux-m32r-low.c (the_low_target): Adjust.
8905 * linux-m68k-low.c (the_low_target): Adjust.
8906 * linux-mips-low.c (the_low_target): Adjust.
8907 * linux-ppc-low.c (the_low_target): Adjust.
8908 * linux-s390-low.c (the_low_target): Adjust.
8909 * linux-sh-low.c (the_low_target): Adjust.
8910 * linux-sparc-low.c (the_low_target): Adjust.
8911 * linux-tic6x-low.c (the_low_target): Adjust.
8912 * linux-x86-low.c (the_low_target): Adjust.
8913 * linux-xtensa-low.c (the_low_target): Adjust.
8914
63c88e13
PA
89152012-03-26 Pedro Alves <palves@redhat.com>
8916
8917 * server.c (handle_qxfer_libraries): Don't bail early if
8918 the_target->qxfer_libraries_svr4 is not NULL.
8919
fb723180
PA
89202012-03-26 Pedro Alves <palves@redhat.com>
8921
8922 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8923
0afae3cf
PA
89242012-03-23 Pedro Alves <palves@redhat.com>
8925
8926 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8927 "library-list-svr4" element's start tag when the the DSO list is
8928 empty.
8929
485f1ee4
PA
89302012-03-23 Pedro Alves <palves@redhat.com>
8931
8932 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8933 a variable whose type size is the same as the inferior's pointer
8934 size.
8935
a5362b9a
TS
89362012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8937
8938 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8939 struct siginfo.
8940 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8941 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8942 * linux-low.h: Include <signal.h>.
8943 (struct siginfo): Remove forward declaration.
8944 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8945 struct siginfo.
8946
d226c142
MF
89472012-03-21 Mike Frysinger <vapier@gentoo.org>
8948
8949 * .gitignore: Ignore more files.
8950
122f36ef
PA
89512012-03-19 Pedro Alves <palves@redhat.com>
8952 Jan Kratochvil <jan.kratochvil@redhat.com>
8953
8954 * server.c (cont_thread, general_thread): Add describing comments.
8955 (start_inferior): Clear `cont_thread'.
8956 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8957 of a process.
8958
fc3e5175
YQ
89592012-03-15 Yao Qi <yao@codesourcery.com>
8960
8961 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8962 handling to ...
8963 (cmd_qtdp): ... here.
8964
8d0d92cd
YQ
89652012-03-15 Yao Qi <yao@codesourcery.com>
8966
8967 * tracepoint.c (struct tracepoint_action_ops): New.
8968 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8969 (m_tracepoint_action_download): New.
8970 (r_tracepoint_action_download): New.
8971 (x_tracepoint_action_download): New.
8972 (l_tracepoint_action_download): New.
8973 (add_tracepoint_action): Install `action->ops' according type.
8974 (download_tracepoint_1): Move code `download' function pointer
8975 of various tracepoint_action_ops.
8976
87b0bb13
JK
89772012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8978
8979 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8980 linux_ptrace_attach_warnings.
8981
5f572dec
JK
89822012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8983
8984 * Makefile.in (linux-ptrace.o): New.
8985 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8986 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8987 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8988 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8989 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8990 of these targets.
8991 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8992
f4647387
YQ
89932012-03-08 Yao Qi <yao@codesourcery.com>
8994 Pedro Alves <palves@redhat.com>
8995
8996 Fix PR server/13392.
8997 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8998 offset of JMP insn.
8999 * tracepoint.c (remove_tracepoint): New.
9000 (cmd_qtdp): Call remove_tracepoint when failed to install.
9001
9b224c5e
PA
90022012-03-07 Pedro Alves <palves@redhat.com>
9003
9004 * linux-low.c (get_detach_signal): New.
9005 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9006 Pass on pending signals to PTRACE_DETACH. Check the result of the
9007 ptrace call.
9008 * server.c (program_signals, program_signals_p): New.
9009 (handle_general_set): Handle QProgramSignals.
9010 * server.h (program_signals, program_signals_p): Declare.
9011
e237a7e2
JK
90122012-03-05 Pedro Alves <palves@redhat.com>
9013 Jan Kratochvil <jan.kratochvil@redhat.com>
9014
9015 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9016 New comment why.
9017
5808517f
YQ
90182012-03-03 Yao Qi <yao@codesourcery.com>
9019
9020 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9021 agent_look_up_symbols.
9022
58b4daa5
YQ
90232012-03-03 Yao Qi <yao@codesourcery.com>
9024
9025 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9026 (linux-x86-low.o): Likewise.
9027 * server.h: Remove in_process_agent_loaded.
9028 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9029 common/agent.c.
9030 Update callers.
9031
8ffcbaaf
YQ
90322012-03-03 Yao Qi <yao@codesourcery.com>
9033
9034 * tracepoint.c (gdb_agent_capability): New global.
9035 (in_process_agent_loaded_ust): Renamed to
9036 `in_process_agent_supports_ust'.
9037 Update callers.
9038 (in_process_agent_supports_ust): Call agent_capability_check.
9039 (clear_installed_tracepoints): Assert that agent supports
9040 agent.
9041
d1feda86
YQ
90422012-03-03 Yao Qi <yao@codesourcery.com>
9043
9044 * linux-low.c (linux_supports_agent): New.
9045 (linux_target_ops): Initialize field `supports_agent' with
9046 linux_supports_agent.
9047 * target.h (struct target_ops) <supports_agent>: New.
9048 (target_supports_agent): New macro.
9049 * server.c (handle_general_set): Handle packet 'QAgent'.
9050 (handle_query): Send `QAgent+'.
9051 * Makefile.in (server.o): Depends on agent.h.
9052
2fa291ac
YQ
90532012-03-03 Yao Qi <yao@codesourcery.com>
9054
9055 * Makefile.in (OBS): Add agent.o.
9056 Add new rule for agent.o.
9057 Track dependence of tracepoint.c on agent.h.
9058 * tracepoint.c (run_inferior_command_1):
9059 (run_inferior_command): Call agent_run_command.
9060 (gdb_ust_connect_sync_socket): Deleted. Move it to
9061 common/agent.c.
9062 (resume_thread, stop_thread): Likewise.
9063 (gdb_ust_socket_init): Renamed to ...
9064 (gdb_agent_socket_init): ... New.
9065 (gdb_ust_thread): Renamed to ...
9066 (gdb_agent_helper_thread): ... New.
9067 (gdb_ust_init): Move some code to ...
9068 (gdb_agent_init): ... here. New.
9069 [HAVE_UST]: Call gdb_ust_init.
9070 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9071 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9072 * config.in, configure: Regenerated.
9073
05044653
PA
90742012-03-02 Pedro Alves <palves@redhat.com>
9075
9076 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9077 * linux-low.c (struct simple_pid_list): New.
9078 (stopped_pids): New a struct simple_pid_list pointer.
9079 (add_to_pid_list, pull_pid_from_list): New.
9080 (handle_extended_wait): Don't assume the first signal new children
9081 report is SIGSTOP. Adjust call to pull_pid_from_list.
9082 (linux_wait_for_lwp): Adjust.
9083
8d00225b
YQ
90842012-03-02 Yao Qi <yao@codesourcery.com>
9085
9086 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9087 debug log.
9088
19560ba5
YQ
90892012-03-02 Yao Qi <yao@codesourcery.com>
9090
9091 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9092 `stop_pc' and `tpoint'. Update caller.
9093
1faeff08
MR
90942012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9095
9096 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9097 * linux-low.c (use_linux_regsets): New macro.
9098 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9099 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9100 (linux_register_in_regsets): New function.
9101 (usr_fetch_inferior_registers): Skip registers covered by
9102 regsets.
9103 (usr_store_inferior_registers): Likewise.
9104 (usr_fetch_inferior_registers): New macro.
9105 (usr_store_inferior_registers): Likewise.
9106 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9107 (linux_store_registers): Likewise.
9108 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9109 prototype.
9110 (init_registers_mips64_dsp_linux): Likewise.
9111 (init_registers_mips_linux): New macro.
9112 (init_registers_mips_dsp_linux): Likewise.
9113 (mips_dsp_num_regs): Likewise.
9114 (DSP_BASE, DSP_CONTROL): New fallback macros.
9115 (mips_base_regs): New macro.
9116 (mips_regmap): Use it. Fix the size.
9117 (mips_dsp_regmap): New variable.
9118 (mips_dsp_regset_bitmap): Likewise.
9119 (mips_arch_setup): New function.
9120 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9121 than mips_regmap.
9122 (mips_cannot_store_register): Likewise.
9123 (the_low_target): Update .arch_setup, .num_regs and .regmap
9124 initializers. Add .regset_bitmap initializer.
9125 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9126 initializer.
9127 * linux-bfin-low.c (the_low_target): Likewise.
9128 * linux-cris-low.c (the_low_target): Likewise.
9129 * linux-crisv32-low.c (the_low_target): Likewise.
9130 * linux-ia64-low.c (the_low_target): Likewise.
9131 * linux-m32r-low.c (the_low_target): Likewise.
9132 * linux-m68k-low.c (the_low_target): Likewise.
9133 * linux-ppc-low.c (the_low_target): Likewise.
9134 * linux-s390-low.c (the_low_target): Likewise.
9135 * linux-sh-low.c (the_low_target): Likewise.
9136 * linux-sparc-low.c (the_low_target): Likewise.
9137 * linux-tic6x-low.c (the_low_target): Likewise.
9138 * linux-x86-low.c (the_low_target): Likewise.
9139 * linux-xtensa-low.c (the_low_target): Likewise.
9140 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9141 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9142 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9143 srv_xmlfiles.
9144 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9145 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9146
c03e6ccc
YQ
91472012-02-29 Yao Qi <yao@codesourcery.com>
9148 Pedro Alves <palves@redhat.com>
9149
9150 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9151 `step_over_finished' is true.
9152
644cebc9
PA
91532012-02-27 Pedro Alves <palves@redhat.com>
9154
9155 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9156 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9157
c14d7ab2
PA
91582012-02-27 Pedro Alves <palves@redhat.com>
9159
9160 PR server/9684
9161 * linux-low.c (pid_is_stopped): New.
9162 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9163
412c89dd
LM
91642012-02-25 Luis Machado <lgustavo@codesourcery.com>
9165
9166 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9167 of conditions.
9168
b745defe
MR
91692012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9170
9171 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9172
9f3a5c85
LM
91732012-02-24 Luis Machado <lgustavo@codesourcery>
9174
9175 * server.c (handle_query): Advertise support for target-side
9176 breakpoint condition evaluation.
9177 (process_point_options): New function.
9178 (process_serial_event): When inserting a breakpoint, check for
9179 a target-side condition that should be evaluated.
9180
9181 * mem-break.c: Include regcache.h and ax.h.
9182 (point_cond_list_t): New data structure.
9183 (breakpoint) <cond_list>: New field.
9184 (find_gdb_breakpoint_at): Make non-static.
9185 (delete_gdb_breakpoint_at): Clear any target-side
9186 conditions.
9187 (clear_gdb_breakpoint_conditions): New function.
9188 (add_condition_to_breakpoint): Likewise.
9189 (add_breakpoint_condition): Likewise.
9190 (gdb_condition_true_at_breakpoint): Likewise.
9191 (gdb_breakpoint_here): Return result directly instead
9192 of going through a local variable.
9193
9194 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9195 (clear_gdb_breakpoint_conditions): Likewise.
9196 (add_breakpoint_condition): Likewise.
9197 (gdb_condition_true_at_breakpoint): Likewise.
9198
9199 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9200 (need_step_over_p): Take target-side breakpoint condition into
9201 consideration.
9202
5e1dc496
LM
92032012-02-24 Luis Machado <lgustavo@codesourcery>
9204
9205 * server.h: Include tracepoint.h.
9206 (agent_mem_read, agent_get_trace_state_variable_value,
9207 agent_set_trace_state_variable_value,
9208 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9209 get_set_tsv_func_addr): New prototypes.
9210
9211 * ax.h: New include file.
9212 * ax.c: New source file.
9213
9214 * tracepoint.c: Include ax.h.
9215 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9216 agent_expr, eval_result_type): Move to ax.h.
9217 (parse_agent_expr): Rename to ...
9218 (gdb_parse_agent_expr): ... this, make it non-static and move
9219 to ax.h.
9220 (unparse_agent_expr) Rename to ...
9221 (gdb_unparse_agent_expr): ... this, make it non-static and move
9222 to ax.h.
9223 (eval_agent_expr): Rename to ...
9224 (eval_tracepoint_agent_expr): ... this.
9225 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9226 forward declarations.
9227 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9228 (agent_get_trace_state_variable_value): New function.
9229 (agent_set_trace_state_variable_value): New function.
9230 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9231 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9232 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9233 (condition_true_at_tracepoint): Likewise.
9234 (parse_agent_expr): Rename to ...
9235 (gdb_parse_agent_expr): ... this and move to ax.c.
9236 (unparse_agent_expr): Rename to ...
9237 (gdb_unparse_agent_expr): ... this and move to ax.c.
9238 (gdb_agent_op_name): Move to ax.c.
9239 (eval_agent_expr): Rename to ...
9240 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9241 and move to ax.c.
9242 (eval_tracepoint_agent_expr): New function.
9243 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 9244 non-static.
5e1dc496
LM
9245 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9246 ax.c.
9247 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9248 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9249 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9250 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9251 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9252 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9253 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9254 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9255 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9256 (compile_bytecodes): Remove forward declaration.
9257 (is_goto_target): Move to ax.c.
9258 (compile_bytecodes): Move to ax.c and call
9259 agent_get_trace_state_variable_value (...) and
9260 agent_set_trace_state_variable_value (...).
9261
9262 * Makefile.in: Update ax.c and IPA dependencies.
9263
277e4e52
PA
92642012-02-24 Pedro Alves <palves@redhat.com>
9265
9266 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9267 (cmd_bigqtbuffer_circular): ... this. Only handle
9268 'QTBuffer:circular:'.
9269 (handle_tracepoint_general_set): Adjust.
9270
bf4c19f7
YQ
92712012-02-16 Yao Qi <yao@codesourcery.com>
9272
9273 * inferiors.c: Move code to ...
9274 * dll.c: .... here. New.
9275 * server.h: Declare clear_dlls.
9276 * Makefile.in (SFILES): Add dll.c.
9277 (OBS): Add dll.o
9278 (dll.o): New rule.
9279
d73f2619
YQ
92802012-02-11 Yao Qi <yao@codesourcery.com>
9281
9282 * server.c: (handle_monitor_command): Add a new parameter
9283 `own_buf'.
9284 (handle_query): Update caller.
9285
f8255c2a
JB
92862012-02-09 Joel Brobecker <brobecker@adacore.com>
9287
9288 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9289 * configure, config.in: Regenerate.
9290 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9291 is not defined.
9292
da84f473
PA
92932012-02-02 Pedro Alves <palves@redhat.com>
9294
9295 Try SIGKILL first, then PTRACE_KILL.
9296 * linux-low.c (linux_kill_one_lwp): New.
9297 (linux_kill_one_lwp): Rename to ...
9298 (kill_one_lwp_callback): ... this. Use the new
9299 linux_kill_one_lwp.
9300
e886a173
PA
93012012-02-02 Pedro Alves <palves@redhat.com>
9302
9303 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9304 inferior.
9305
be07f1a2
PA
93062012-01-27 Pedro Alves <palves@redhat.com>
9307
9308 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9309 (elf_64_file_p): Make static.
9310 (linux_pid_exe_is_elf_64_file): New.
9311 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9312 Delete declarations.
9313 (linux_pid_exe_is_elf_64_file): Declare.
9314 * linux-x86-low.c (x86_arch_setup): Use
9315 linux_pid_exe_is_elf_64_file.
9316
d8301ad1
JK
93172012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9318
9319 * linux-low.c (linux_wait_for_event_1): Rename to ...
9320 (linux_wait_for_event): ... here and merge it with former
9321 linux_wait_for_event - new variable wait_ptid, use it.
9322 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9323
01b17894
PA
93242012-01-23 Pedro Alves <palves@redhat.com>
9325
9326 * server.c (main): Avoid yet another case of infinite loop while
9327 detaching/killing after a longjmp.
9328
e825046f
JK
93292012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9330
9331 Code cleanup.
9332 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9333
b9e7b9c3
UW
93342012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9335
9336 * hostio.c (handle_readlink): New function.
9337 (handle_vFile): Call it to handle "vFile:readlink" packets.
9338
901f9912
UW
93392012-01-20 Pedro Alves <palves@redhat.com>
9340 Ulrich Weigand <ulrich.weigand@linaro.org>
9341
9342 * server.c (handle_v_requests): Only support vAttach and vRun to
9343 start multiple processes when in extended protocol mode.
9344
fc1ab1a0
PA
93452012-01-17 Pedro Alves <palves@redhat.com>
9346
9347 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9348 memalign plus mprotect to allocate the scratch buffer.
9349
7d5d4e98
PA
93502012-01-13 Pedro Alves <palves@redhat.com>
9351
9352 * server.c (attach_inferior): Clear `cont_thread'.
9353
f128d5e9
PA
93542012-01-13 Pedro Alves <palves@redhat.com>
9355
9356 * server.c (main): Avoid infinite loop while detaching/killing
9357 after a longjmp.
9358
06db92f0
DE
93592012-01-09 Doug Evans <dje@google.com>
9360
9361 * server.c (start_inferior): Set last_ptid in --wrapper case.
9362
32d92999
YQ
93632012-01-06 Yao Qi <yao@codesourcery.com>
9364
9365 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9366 defined.
9367 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9368
5e0a92a9
YQ
93692012-01-04 Yao Qi <yao@codesourcery.com>
9370
9371 * tracepoint.c (cmd_qtdp): Print debug message
9372 for static tracepoint.
9373
ae639e8c
YQ
93742012-01-04 Yao Qi <yao@codesourcery.com>
9375
9376 * tracepoint.c (trace_vdebug): Differentiate debug message
9377 between gdbserver and IPA.
9378
f72429c5
YQ
93792012-01-03 Yao Qi <yao@codesourcery.com>
9380
9381 * tracepoint.c (tracepoint_was_hit): Don't collect for
9382 static tracepoint.
9383
12c3e59c
JB
93842012-01-02 Joel Brobecker <brobecker@adacore.com>
9385
9386 * terminal.h: Reformat copyright header.
9387
67827812
JB
93882012-01-02 Joel Brobecker <brobecker@adacore.com>
9389
9390 * server.c (gdbserver_version): Update copyright year.
9391 * gdbreplay.c (gdbreplay_version): Likewise.
9392
3e52c33d
JK
93932011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9394
9395 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9396
9397 Revert:
9398 2011-12-18 Hui Zhu <teawater@gmail.com>
9399 * linux-low.c (linux_create_inferior): Save return value to ret.
9400
66f1260e
HZ
94012011-12-18 Hui Zhu <teawater@gmail.com>
9402
9403 * linux-low.c (linux_create_inferior): Save return value to ret.
9404
e77616d7
DE
94052011-12-16 Doug Evans <dje@google.com>
9406
e7b06c57
DE
9407 * linux-low.c (linux_create_inferior): If stdio connection,
9408 redirect stdin from /dev/null, stdout to stderr.
9409 * remote-utils.c (remote_is_stdio): New static global.
9410 (remote_connection_is_stdio): New function.
9411 (remote_prepare): Handle stdio connection.
9412 (remote_open): Ditto.
9413 (remote_close): Don't close stdin for stdio connections.
9414 (read_prim,write_prim): New functions. Replace all calls to
9415 read/write to these.
9416 * server.c (main): Watch for "-" argument. Move call to
9417 remote_prepare before start_inferior.
9418 * server.h (STDIO_CONNECTION_NAME): New macro.
9419 (remote_connection_is_stdio): Declare.
9420
e77616d7
DE
9421 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9422 in debugging output.
9423
82067193
YQ
94242011-12-15 Yao Qi <yao@codesourcery.com>
9425
9426 * tracepoint.c: Include sys/syscall.h.
9427 (gdb_ust_thread): Remove preprocessor conditional.
9428
82bfbe7e
PA
94292011-12-14 Pedro Alves <pedro@codesourcery.com>
9430
9431 * linux-low.c (linux_detach_one_lwp): Call
9432 the_low_target.prepare_to_resume before detaching.
9433
712c6575
YQ
94342011-12-14 Yao Qi <yao@codesourcery.com>
9435
9436 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9437 of write.
9438
d54d1edf
YQ
94392011-12-14 Yao Qi <yao@codesourcery.com>
9440
9441 * i386-low.c (i386_low_stopped_data_address): Initialize local
9442 variable `control'.
9443
6210a125
PA
94442011-12-13 Pedro Alves <pedro@codesourcery.com>
9445
9446 PR remote/13492
9447
9448 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9449 DR_CONTROL unless necessary. Extend comments.
9450 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9451 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9452
2ece8244
YQ
94532011-12-13 Yao Qi <yao@codesourcery.com>
9454
9455 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9456 macros.
9457 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9458
784867a5
JK
94592011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9460
9461 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9462 Print new debug message for such case.
9463
6bf36717
JK
94642011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9465
9466 Fix overlapping memcpy.
9467 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9468 the read_inferior_memory transfer.
9469 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9470 write_inferior_memory transfer.
9471 (set_fast_tracepoint_jump): New variable buf. Use it for the
9472 read_inferior_memory and write_inferior_memory transfers.
9473 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9474 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9475 Use it for the write_inferior_memory transfer.
9476 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9477 buffers.
9478
50275556
MR
94792011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9480
9481 * linux-low.c (fetch_register, store_register): Make code
9482 consistent, fix formatting.
9483
7325beb4
MR
94842011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9485
9486 * linux-low.c (usr_store_inferior_registers): Factor out code
9487 to handle individual registers into...
9488 (store_register): ... this new function.
9489
c642a434
UW
94902011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9491
9492 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9493 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9494 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9495 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9496 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9497 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9498 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9499 (srv_xmlfiles): Add new XML files.
9500
9501 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9502 and <sys/uio.h>.
9503 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9504 (init_registers_s390_linux32v1): Add prototype.
9505 (init_registers_s390_linux32v2): Likewise.
9506 (init_registers_s390_linux64v1): Likewise.
9507 (init_registers_s390_linux64v2): Likewise.
9508 (init_registers_s390x_linux64v1): Likewise.
9509 (init_registers_s390x_linux64v2): Likewise.
9510 (s390_num_regs): Increment to 52.
9511 (s390_regmap): Add orig_r2 register.
9512 (s390_num_regs_3264): Increment to 68.
9513 (s390_regmap_3264): Add orig_r2 register.
9514 (s390_collect_ptrace_register): Handle orig_r2 register.
9515 (s390_supply_ptrace_register): Likewise.
9516 (s390_fill_last_break): New function.
9517 (s390_store_last_break): Likewise.
9518 (s390_fill_system_call): New function.
9519 (s390_store_system_call): Likewise.
9520 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9521 register sets.
9522 (s390_check_regset): New function.
9523 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9524 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9525 Update target_regsets for available register sets.
9526
2268b414
JK
95272011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9528 Jan Kratochvil <jan.kratochvil@redhat.com>
9529
9530 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9531 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9532 New.
9533 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9534 * linux-low.h (struct process_info_private): New member r_debug.
9535 * server.c (handle_qxfer_libraries): Call
9536 the_target->qxfer_libraries_svr4.
9537 (handle_qxfer_libraries_svr4): New function.
9538 (qxfer_packets): New entry "libraries-svr4".
9539 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9540 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9541 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9542 PACKET_qXfer_libraries_svr4.
9543
d6db1fab
UW
95442011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9545
9546 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9547 PSW address/mask between 8-byte and 16-byte formats.
9548 (s390_supply_ptrace_register): Likewise.
9549 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9550 basic addressing mode bit.
9551
242f5f1c
SS
95522011-11-24 Stan Shebs <stan@codesourcery.com>
9553
9554 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9555
f196051f
SS
95562011-11-17 Stan Shebs <stan@codesourcery.com>
9557
9558 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9559 (tracing_start_time): New global.
9560 (tracing_stop_time): New global.
9561 (tracing_user_name): New global.
9562 (tracing_notes): New global.
9563 (tracing_stop_note): New global.
9564 (cmd_qtstart): Set traceframe_usage, start_time.
9565 (stop_tracing): Set stop_time.
9566 (cmd_qtstatus): Report additional status.
9567 (cmd_qtp): New function.
9568 (handle_tracepoint_query): Call it.
9569 (cmd_qtnotes): New function.
9570 (handle_tracepoint_general_set): Call it.
9571 (get_timestamp): Rename from tsv_get_timestamp.
9572
405f8e94
SS
95732011-11-14 Stan Shebs <stan@codesourcery.com>
9574 Kwok Cheung Yeung <kcy@codesourcery.com>
9575
9576 * linux-x86-low.c (small_jump_insn): New.
9577 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9578 trampoline and error message, build a trampoline and issue a small
9579 jump instruction to it.
9580 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9581 trampoline and error message.
9582 (x86_get_min_fast_tracepoint_insn_len): New.
9583 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9584 * linux-low.h (struct linux_target_ops): Add arguments to
9585 install_fast_tracepoint_jump_pad operation, add new operation.
9586 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9587 arguments.
9588 (linux_get_min_fast_tracepoint_insn_len): New function.
9589 (linux_target_op): Add new operation.
9590 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9591 (gdb_trampoline_buffer_end): Ditto.
9592 (gdb_trampoline_buffer_error): Ditto.
9593 (struct ipa_sym_addresses): Add fields for new IPA variables.
9594 (symbol_list): Add entries for new IPA variables.
9595 (struct tracepoint): Add fields to hold the address range of the
9596 trampoline used by the tracepoint.
9597 (trampoline_buffer_head): New static variable.
9598 (trampoline_buffer_tail): Ditto.
9599 (claim_trampoline_space): New function.
9600 (have_fast_tracepoint_trampoline_buffer): New function.
9601 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9602 structure.
9603 (install_fast_tracepoint): Ditto, also add error buffer argument.
9604 (cmd_qtminftpilen): New function.
9605 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9606 (fast_tracepoint_from_trampoline_address): New function.
9607 (fast_tracepoint_collecting): Handle trampoline as part of jump
9608 pad space.
9609 (set_trampoline_buffer_space): New function.
9610 (initialize_tracepoint): Initialize new IPA variables.
9611 * target.h (struct target_ops): Add arguments to
9612 install_fast_tracepoint_jump_pad operation, add new
9613 get_min_fast_tracepoint_insn_len operation.
9614 (target_get_min_fast_tracepoint_insn_len): New.
9615 (install_fast_tracepoint_jump_pad): Add arguments.
9616 * server.h (IPA_BUFSIZ): Define.
9617 * linux-i386-ipa.c: Include extra header files.
9618 (initialize_fast_tracepoint_trampoline_buffer): New function.
9619 (initialize_low_tracepoint): Call it.
9620 * server.h (set_trampoline_buffer_space): Declare.
9621 (claim_trampoline_space): Ditto.
9622 (have_fast_tracepoint_trampoline_buffer): Ditto.
9623
1e4d1764
YQ
96242011-11-14 Yao Qi <yao@codesourcery.com>
9625
9626 * server.c (handle_query): Handle InstallInTrace for qSupported.
9627 * tracepoint.c (add_tracepoint): Sort list.
9628 (install_tracepoint, download_tracepoint): New.
9629 (cmd_qtdp): Call them to install and download tracepoints.
9630 (sort_tracepoints): Removed.
9631 (cmd_qtstart): Update.
9632
5c73ff4e
YQ
96332011-11-14 Yao Qi <yao@codesourcery.com>
9634
9635 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9636 * mem-break.h: Declare.
9637 * tracepoint.c (cmd_qtstart): Move some code to ...
9638 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9639 New.
9640 (download_tracepoints): Move some code to ...
9641 (download_tracepoint_1): ... here. New.
9642
86a30030
YQ
96432011-11-08 Yao Qi <yao@codesourcery.com>
9644
9645 * remote-utils.c (relocate_instruction): A comment fix.
9646
8d26e50c
JB
96472011-11-07 Joel Brobecker <brobecker@adacore.com>
9648
9649 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9650 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9651 dr_status_mirror and dr_control_mirror from debug_reg_state.
9652 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9653 (i386_initial_stuff): Remove use of deleted globals.
9654 (i386_get_thread_context, i386_set_thread_context,
9655 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9656 from debug_reg_state.
9657
a59306a3
YQ
96582011-11-05 Yao Qi <yao@codesourcery.com>
9659
9660 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9661 address as TPOINT's.
9662
3065dfb6
SS
96632011-11-02 Stan Shebs <stan@codesourcery.com>
9664
9665 * tracepoint.c (agent_mem_read_string): New function.
9666 (eval_agent_expr): Call it for tracenz.
9667 * server.c (handle_query): Report support for tracenz.
9668
fd0d8c7c
YQ
96692011-11-02 Yao Qi <yao@codesourcery.com>
9670
9671 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9672
609086b1
YQ
96732011-11-02 Yao Qi <yao@codesourcery.com>
9674
9675 * target.h: Fix a typo in comment.
9676
b9fd1791
PA
96772011-10-31 Pedro Alves <pedro@codesourcery.com>
9678
9679 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9680 clobber the breakpoints' shadows with fast tracepoint jumps.
9681 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9682 * target.c (write_inferior_memory): Also pass MYADDR down to
9683 check_mem_write.
9684
03583c20
UW
96852011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9686
9687 * configure.ac: Check support for personality routine.
9688 * configure: Regenerate.
9689 * config.in: Likewise.
9690 * linux-low.c: Include <sys/personality.h>.
9691 Define ADDR_NO_RANDOMIZE if necessary.
9692 (linux_create_inferior): Disable address space randomization when
9693 forking inferior, if requested.
9694 (linux_supports_disable_randomization): New function.
9695 (linux_target_ops): Install it.
9696 * server.h (disable_randomization): Declare.
9697 * server.c (disable_randomization): New global variable.
9698 (handle_general_set): Handle QDisableRandomization.
9699 (handle_query): Likewise for qSupported.
9700 (main): Support --disable-randomization and --no-disable-randomization
9701 command line arguments.
9702 * target.h (struct target_ops): Add supports_disable_randomization.
9703 (target_supports_disable_randomization): New macro.
9704
723b724b
MF
97052011-09-29 Mike Frysinger <vapier@gentoo.org>
9706
9707 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9708 ifdef check.
9709 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9710 [!PT_GETDSBT] (target_loadmap): New definition.
9711 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9712 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9713 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9714 and PT_GETDSBT to LINUX_LOADMAP.
9715 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9716 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9717
55329a5c 97182011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
9719
9720 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9721 (arm_linux_hwbp_cap): New static variable.
9722 (arm_linux_get_hwbp_cap): Replace by ...
9723 (arm_linux_init_hwbp_cap): ... this new function.
9724 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9725 (arm_linux_get_hw_watchpoint_count): Likewise.
9726 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9727 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9728 (arm_prepare_to_resume): Use perror_with_name instead of error.
9729
55329a5c 97302011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
9731
9732 * linux-arm-low.c: Include <signal.h>.
9733 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9734 (struct arm_linux_hwbp_cap): New data type.
9735 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9736 (struct arm_linux_hw_breakpoint): New data type.
9737 (MAX_BPTS, MAX_WPTS): Define.
9738 (struct arch_process_info, struct arch_lwp_info): New data types.
9739 (arm_linux_get_hwbp_cap): New function.
9740 (arm_linux_get_hw_breakpoint_count): Likewise.
9741 (arm_linux_get_hw_watchpoint_count): Likewise.
9742 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9743 (arm_hwbp_control_initialize): Likewise.
9744 (arm_hwbp_control_is_enabled): Likewise.
9745 (arm_hwbp_control_is_initialized): Likewise.
9746 (arm_hwbp_control_disable): Likewise.
9747 (arm_linux_hw_breakpoint_equal): Likewise.
9748 (arm_linux_hw_point_initialize): Likewise.
9749 (struct update_registers_data): New data structure.
9750 (update_registers_callback: New function.
9751 (arm_insert_point): Likewise.
9752 (arm_remove_point): Likewise.
9753 (arm_stopped_by_watchpoint): Likewise.
9754 (arm_stopped_data_address): Likewise.
9755 (arm_new_process): Likewise.
9756 (arm_new_thread): Likewise.
9757 (arm_prepare_to_resume): Likewise.
9758 (the_low_target): Register arm_insert_point, arm_remove_point,
9759 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9760 arm_new_thread, and arm_prepare_to_resume.
9761
6b9801d4
SS
97622011-09-15 Stan Shebs <stan@codesourcery.com>
9763
9764 * server.h (struct emit_ops): Add compare-goto fields.
9765 * tracepoint.c (gdb_agent_op_sizes): New table.
9766 (emit_eq_goto): New function.
9767 (emit_ne_goto): New function.
9768 (emit_lt_goto): New function.
9769 (emit_le_goto): New function.
9770 (emit_gt_goto): New function.
9771 (emit_ge_goto): New function.
9772 (is_goto_target): New function.
9773 (compile_bytecodes): Recognize special cases of compare-goto
9774 combinations and call specialized emitters for them.
9775 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9776 (amd64_emit_ne_goto): New function.
9777 (amd64_emit_lt_goto): New function.
9778 (amd64_emit_le_goto): New function.
9779 (amd64_emit_gt_goto): New function.
9780 (amd64_emit_ge_goto): New function.
9781 (amd64_emit_ops): Add the new functions.
9782 (i386_emit_eq_goto): New function.
9783 (i386_emit_ne_goto): New function.
9784 (i386_emit_lt_goto): New function.
9785 (i386_emit_le_goto): New function.
9786 (i386_emit_gt_goto): New function.
9787 (i386_emit_ge_goto): New function.
9788 (i386_emit_ops): Add the new functions.
9789
bf15cbda
SS
97902011-09-08 Stan Shebs <stan@codesourcery.com>
9791
9792 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9793 (i386_emit_epilogue): Restore %ebx.
9794
943ca1dd
JZ
97952011-08-31 Jie Zhang <jzhang918@gmail.com>
9796
9797 * server.c (step_thread): Remove definition.
9798 (process_serial_event): Don't handle Hs.
9799 * server.h (step_thread): Remove declaration.
9800 * target.c (set_desired_inferior): Remove use of step_thread.
9801
e3deef73
LM
98022011-08-24 Luis Machado <lgustavo@codesourcery.com>
9803
9804 * linux-low.c: Include linux-procfs.h.
9805 (linux_attach_lwp_1): Update comments.
9806 (linux_attach): Scan for existing threads when attaching to a
9807 process that is the tgid.
9808 * Makefile.in: Update dependencies.
9809
13da1c97
LM
98102011-08-24 Luis Machado <lgustavo@codesourcery.com>
9811
9812 * configure.srv: Add linux-procfs.o dependencies.
9813
881127c9
YQ
98142011-08-14 Yao Qi <yao@codesourcery.com>
9815
9816 * target.h (struct target_ops): Fix indent.
9817 * win32-low.c (win32_target_ops): Fix comment.
9818
58dbd541
YQ
98192011-08-14 Andrew Jenner <andrew@codesourcery.com>
9820 Yao Qi <yao@codesourcery.com>
9821
9822 * Makefile.in (clean): Remove tic6x-*.c files.
9823 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9824 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9825 (tic6x-c64xp-linux.c): Likewise.
9826 * configure.srv: Add support for tic6x-*-uclinux.
9827 * linux-tic6x-low.c: New.
9828 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9829
78d85199
YQ
98302011-08-14 Andrew Stubbs <ams@codesourcery.com>
9831 Yao Qi <yao@codesourcery.com>
9832
9833 * target.h (struct target_ops): Add read_loadmap.
9834 * linux-low.c (struct target_loadseg): New type.
9835 (struct target_loadmap): New type.
9836 (linux_read_loadmap): New function.
9837 (linux_target_ops): Add linux_read_loadmap.
9838 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
9839 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9840 to NULL.
78d85199 9841
a959a88d
EZ
98422011-08-05 Eli Zaretskii <eliz@gnu.org>
9843
9844 * win32-low.c: Include <stdint.h>.
9845
1ced966e
PA
98462011-07-22 Pedro Alves <pedro@codesourcery.com>
9847
9848 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9849 to the inferior here.
9850 (i386_remove_aligned_watchpoint): Ditto.
9851 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9852 fit part of the watchpoint in the debug registers.
9853 (i386_update_inferior_debug_regs): New.
9854 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9855 registers, and only update the inferior on success.
9856 (i386_low_remove_watchpoint): Ditto.
9857
d26e3629
KY
98582011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9859
9860 * linux-low.c (compare_ints, unique, list_threads, show_process,
9861 linux_core_of_thread): Delete.
9862 (linux_target_ops): Change linux_core_of_thread to
9863 linux_common_core_of_thread.
9864 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9865 * utils.c (malloc_failure): Change type of argument.
9866 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9867 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9868 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9869 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9870 (IPA_OBJS): Add common-utils-ipa.o.
9871 (ptid_h, linux_osdata_h): New macros.
9872 (server_h): Add common/common-utils.h, common/xml-utils.h,
9873 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9874 common/ptid.h.
9875 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9876 ptid.o, buffer.o): New rules.
9877 (linux-low.o): Add common/linux-osdata.h as a dependency.
9878 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9879 * configure.ac: Add AC_HEADER_DIRENT check.
9880 * config.in: Regenerate.
9881 * configure: Regenerate.
9882 * remote-utils.c (xml_escape_text): Delete.
9883 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9884 buffer_xml_printf): Move to common/buffer.c.
9885 * server.c (main): Remove call to initialize_inferiors.
9886 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9887 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9888 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9889 internal_error, gdb_assert, gdb_assert_fail): Delete.
9890 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9891 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9892 common/buffer.h.
9893 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9894 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9895 initialize_inferiors): Delete.
9896
2275a1a7
PA
98972011-07-20 Pedro Alves <pedro@codesourcery.com>
9898
9899 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9900 symbol error.
9901
0a5b1e09
PA
99022011-05-31 Pedro Alves <pedro@codesourcery.com>
9903
9904 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9905 assertion.
9906 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9907
6938fd34
YQ
99082011-05-26 Yao Qi <yao@codesourcery.com>
9909
9910 * Makefile.in (thread-db.o): Track dependence to
9911 common/gdb_thread_db.h.
9912 * thread-db.c: include gdb_thread_db.h from right place.
9913
b481f9e0
TT
99142011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9915
9916 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9917 __FILE__ and __LINE__ to internal_error.
9918
98a5dd13
DE
99192011-05-13 Doug Evans <dje@google.com>
9920
9921 * thread-db.c (try_thread_db_load_from_sdir): New function.
9922 (try_thread_db_load_from_dir): New function.
9923 (thread_db_load_search): Handle $sdir, ignore $pdir.
9924 Remove trying of system directories if search of
9925 libthread-db-search-path fails, that is now done via $sdir.
9926
d248b706
KY
99272011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9928
9929 * server.c (handle_query): Add EnableDisableTracepoints to the list
9930 of supported features.
43aaf8b6 9931 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 9932 tracepoints.
43aaf8b6
PA
9933 (cmd_qtenable_disable): New.
9934 (cmd_qtstart): Install tracepoints even if disabled.
9935 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9936 receiving a QTEnable or QTDisable packet.
9937 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9938 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9939 tracepoints.
9940 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 9941
84e578fb
DE
99422011-05-10 Doug Evans <dje@google.com>
9943
9944 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9945
71f55dd8
DE
99462011-05-04 Doug Evans <dje@google.com>
9947
9948 * linux-low.c (linux_join): Skip process lookup.
9949 * spu-low.c (spu_join): Ditto.
9950 * server.c (join_inferiors_callback): Delete.
9951 (process_serial_event): For 'D' packet (detach) call join_inferior
9952 directly.
9953
4d393d60
JM
99542011-05-04 Joseph Myers <joseph@codesourcery.com>
9955
9956 * README: Don't mention xscale*-*-linux*.
9957 * configure.srv (xscale*-*-linux*): Don't handle target.
9958
b00ad6ff
NF
99592011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9960
9961 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9962 casting pointers.
9963 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9964 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9965 (i386_emit_void_call_2): Likewise.
9966
af96c192
YQ
99672011-04-26 Yao Qi <yao@codesourcery.com>
9968
43aaf8b6
PA
9969 * linux-low.c: Move common macros to linux-ptrace.h.
9970 Include linux-ptrace.h.
af96c192
YQ
9971 * Makefile.in (linux_ptrace_h): New.
9972 (linux-low.o): Depends on linux-ptrace.h.
9973
03f2bd59
JK
99742011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9975
9976 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9977 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9978 (remote_prepare): New function with most of the TCP code from ...
9979 (remote_open): ... here. Detect PORT here unconditionally. Move also
9980 setting transport_is_reliable.
9981 * server.c (run_once): New variable.
9982 (gdbserver_usage): Document it.
9983 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9984 the first run if RUN_ONCE.
9985 * server.h (run_once, remote_prepare): New declarations.
9986
7a9dd1b2
TT
99872011-04-19 Tom Tromey <tromey@redhat.com>
9988
9989 * win32-low.c (handle_load_dll): Remove duplicate "the".
9990
81239425
PM
99912011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9992
9993 Remove support for old Cygwin 1.5 versions.
9994 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9995 function to avoid warning.
9996 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9997 warning.
9998
9e0627f1
PM
99992011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10000
10001 * gdbserver/server.h (Macro _): Define it if not available.
10002
588eebee
MS
100032011-03-14 Michael Snyder <msnyder@vmware.com>
10004
348af9f7 10005 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 10006
43f70d4c
JB
100072011-03-10 Joel Brobecker <brobecker@adacore.com>
10008
10009 * Makefile.in (maintainer-clean realclean distclean): Remove
10010 "make ... subdir_do" command.
10011
348af9f7
MS
100122011-03-10 Michael Snyder <msnyder@vmware.com>
10013
10014 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10015
10016 * server.c (handle_v_run): Free alloced buffer on early return.
10017
e637a4f5
YQ
100182011-03-09 Yao Qi <yao@codesourcery.com>
10019
10020 Revert:
10021 2011-03-04 Yao Qi <yao@codesourcery.com>
10022
10023 * Makefile.in: Remove GNU make feature --directory.
10024
10025 2011-03-05 Yao Qi <yao@codesourcery.com>
10026
10027 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10028 (subdir_do): New make target. Copied from gdb/Makefile.
10029 (maintainer-clean, realclean, distclean, clean): Call corresponding
10030 make targets in common/Makefile.
10031
10032 2011-02-11 Yao Qi <yao@codesourcery.com>
10033
10034 * configure.ac: Call AC_PROG_RANLIB.
10035 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10036 * configure: Regenerate.
10037
e6edda56
JK
100382011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10039
10040 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10041
e5141119
JB
100422011-03-06 Yao Qi <yao@codesourcery.com>
10043
10044 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10045
64794aa4
JB
100462011-03-05 Yao Qi <yao@codesourcery.com>
10047
10048 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10049 (subdir_do): New make target. Copied from gdb/Makefile.
10050 (maintainer-clean, realclean, distclean, clean): Call corresponding
10051 make targets in common/Makefile.
10052
7a762829
YQ
100532011-03-04 Yao Qi <yao@codesourcery.com>
10054
10055 * Makefile.in: Remove GNU make feature --directory.
10056
348af9f7
MS
100572011-03-04 Michael Snyder <msnyder@vmware.com>
10058
10059 * server.c (queue_stop_reply): Call xmalloc not malloc.
10060
100612011-03-02 Michael Snyder <msnyder@vmware.com>
10062
10063 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10064
9f72fee2
MS
100652011-02-28 Michael Snyder <msnyder@vmware.com>
10066
588eebee
MS
10067 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10068 (cmd_qtframe): Ditto.
10069 (cmd_qtbuffer): Ditto.
10070 (cmd_bigqtbuffer): Ditto.
10071
9f72fee2
MS
10072 * utils.c (decimal2str): Initialize 'width' to nine, then
10073 don't mess with it.
10074
8040bd49
UW
100752011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10076
10077 * hostio.c (require_data): Free *data, not data.
10078
7e52cbd0
JK
100792011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10080
10081 * hostio.c (require_data): Use free, not xfree.
10082
9130f83e
MS
100832011-02-27 Michael Snyder <msnyder@vmware.com>
10084
4b812f4e
MS
10085 * server.c (handle_query): Discard unused value.
10086
9130f83e
MS
10087 * hostio.c (require_data): Free malloc memory before returning
10088 error.
10089
69d37113
MS
100902011-02-26 Michael Snyder <msnyder@vmware.com>
10091
10092 * linux-low.c (list_threads): Call closedir for dirent.
10093
35f5825a
MS
100942011-02-27 Michael Snyder <msnyder@vmware.com>
10095
2a589cef
MS
10096 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10097 a case statement falls through.
10098
0adea5f7
MS
10099 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10100
35f5825a
MS
10101 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10102 in comparison.
10103
238f1c74
MS
101042011-02-26 Michael Snyder <msnyder@vmware.com>
10105
10106 * utils.c (decimal2str): Eliminate dead code and dead param.
10107 (pulongest): Drop dead param from call to decimal2str.
10108 (plongest): Ditto.
10109
633ff500
JB
101102011-02-24 Joel Brobecker <brobecker@adacore.com>
10111
10112 Revert the following patch (not approved yet):
10113 2011-02-21 Hui Zhu <teawater@gmail.com>
10114 * tracepoint.c (tp_printf): New function.
10115 (eval_agent_expr): Handle gdb_agent_op_printf.
10116
f9c6ff72
HZ
101172011-02-21 Hui Zhu <teawater@gmail.com>
10118
10119 * tracepoint.c (tp_printf): New function.
10120 (eval_agent_expr): Handle gdb_agent_op_printf.
10121
94d5e490
TT
101222011-02-18 Tom Tromey <tromey@redhat.com>
10123
10124 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10125 (tracepoint.o): Likewise.
10126 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10127 (gdb_agent_op_names): Likewise.
10128
c7f96d2b
TT
101292011-02-18 Tom Tromey <tromey@redhat.com>
10130
10131 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10132 gdb_agent_op_rot>: New constants.
10133 (gdb_agent_op_names): Add pick and roll.
10134 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10135 cases.
10136
0feedb2c
JK
101372011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10138
10139 * aclocal.m4: Regenerated with aclocal-1.11.1.
10140
b3b9301e
PA
101412011-02-14 Pedro Alves <pedro@codesourcery.com>
10142
10143 * server.c (handle_qxfer_traceframe_info): New.
10144 (qxfer_packets): Register "traceframe-info".
10145 (handle_query): Report support for qXfer:traceframe-info:read+.
10146 * tracepoint.c (match_blocktype): New.
10147 (traceframe_find_block_type): Rename to ...
10148 (traceframe_walk_blocks): ... this. Add callback filter argument,
10149 and use it.
10150 (traceframe_find_block_type): New, reimplemented on top of
10151 traceframe_walk_blocks.
10152 (build_traceframe_info_xml): New.
10153 (traceframe_read_info): New.
10154 * server.h (traceframe_read_info): Declare.
10155
4f3e6fb7
YQ
101562011-02-11 Yao Qi <yao@codesourcery.com>
10157
10158 * configure.ac: Call AC_PROG_RANLIB.
10159 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10160 * configure: Regenerate.
10161
764880b7
PA
101622011-02-07 Pedro Alves <pedro@codesourcery.com>
10163
10164 * server.c (gdb_read_memory): Change return semantics to allow
10165 partial transfers.
10166 (handle_search_memory_1): Adjust.
10167 (process_serial_event) <'m' packet>: Handle partial transfers.
10168 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10169
1c79eb8a
PA
101702011-01-28 Pedro Alves <pedro@codesourcery.com>
10171
10172 * regcache.c (init_register_cache): Initialize
10173 regcache->register_status.
10174 (free_register_cache): Release regcache->register_status.
10175 (regcache_cpy): Copy register_status.
10176 (registers_to_string): Print 'x's for unavailable registers.
10177 (supply_register): Mark the register's status valid or
10178 unavailable, depending on whether a buffer was passed in or not.
10179 (supply_register_zeroed): New.
10180 (supply_regblock): Mark the registers' status valid or
10181 unavailable, depending on whether a buffer was passed in or not.
10182 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10183 (struct regcache): New `register_status' field.
10184 (supply_register_zeroed): Declare.
10185 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10186 supply_register_zeroed, rather than passing a NULL buffer to
10187 supply_register.
10188 * tracepoint.c (fetch_traceframe_registers): Update comment.
10189
85724a0e
PA
101902011-01-28 Pedro Alves <pedro@codesourcery.com>
10191
10192 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10193 buffer explicit.
10194
d08aafef
PA
101952011-01-25 Pedro Alves <pedro@codesourcery.com>
10196
10197 * server.h (decode_xfer_write): Change prototype.
10198 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10199 and don't extract the annex here.
10200 * server.c (decode_xfer_read): Remove `annex' parameter,
10201 and don't extract the annex here.
10202 (decode_xfer): New.
10203 (struct qxfer): New.
10204 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10205 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10206 (handle_qxfer_statictrace): New functions, abstracted out from
10207 handle_query, and made to use the struct qxfer interface.
10208 (handle_threads_qxfer_proper): Rename to ...
10209 (handle_qxfer_threads_proper): ... this.
10210 (handle_threads_qxfer): Rename to ...
10211 (handle_qxfer_threads): ... this. Adjust.
10212 (qxfer_packets): New array.
10213 (handle_qxfer): New function.
10214 (handle_query): Use handle_qxfer.
10215
493e2a69
MS
102162011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10217
10218 * gdbreplay.c: Shorten lines of >= 80 columns.
10219 * linux-low.c: Ditto.
10220 * linux-ppc-low.c: Ditto.
10221 * linux-s390-low.c: Ditto.
10222 * linux-sparc-low.c: Ditto.
10223 * linux-x86-low.c: Ditto.
10224 * linux-xtensa-low.c: Ditto.
10225 * mem-break.c: Ditto.
10226 * nto-low.c: Ditto.
10227 * regcache.h: Ditto.
10228 * remote-utils.c: Ditto.
10229 * server.c: Ditto.
10230 * server.h: Ditto.
10231 * thread-db.c: Ditto.
10232 * tracepoint.c: Ditto.
10233 * utils.c: Ditto.
10234 * win32-low.h: Ditto.
10235
44944448
JB
102362011-01-05 Joel Brobecker <brobecker@adacore.com>
10237
10238 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10239 update.
10240
71ce852c
JB
102412011-01-01 Joel Brobecker <brobecker@adacore.com>
10242
10243 * server.c (gdbserver_version): Update copyright year in version
10244 output.
10245 * gdbreplay.c (gdbreplay_version): Ditto.
10246
eb826dc6
MF
102472010-12-29 Jie Zhang <jie.zhang@analog.com>
10248
10249 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10250 * linux-bfin-low.c: New file.
10251 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10252 PT_DATA_ADDR for BFIN targets.
10253 * Makefile.in (SFILES): Add linux-bfin-low.c.
10254 (clean): Remove reg-bfin.c.
10255 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10256 * README: Mention supported Blackfin targets.
10257
39ab222a
MF
102582010-12-23 Mike Frysinger <vapier@gentoo.org>
10259
10260 * .gitignore: New file.
10261
a1f2ce7d
MF
102622010-11-16 Mike Frysinger <vapier@gentoo.org>
10263
10264 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10265
f474844c
JZ
102662010-10-22 Jie Zhang <jie@codesourcery.com>
10267
10268 * Makefile.in: Add FLAGS_TO_PASS variable.
10269 (install): Remove dependency of install-only and recursively
10270 invoke make for install-only.
10271
f1048712
DE
102722010-10-04 Doug Evans <dje@google.com>
10273
10274 * Makefile.in (uninstall): Use $(DESTDIR).
10275
b53a1623
PA
102762010-09-24 Pedro Alves <pedro@codesourcery.com>
10277
e6ee044d
PA
10278 PR gdb/11842
10279
b53a1623
PA
10280 * linux-x86-low.c (compat_siginfo_from_siginfo)
10281 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10282 si_code is < 0. Check for si_code == SI_TIMER before checking for
10283 si_code < 0.
10284
fa1bd1e4
JB
102852010-09-13 Joel Brobecker <brobecker@adacore.com>
10286
10287 * lynx-i386-low.c: New file.
10288 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10289
47fac8f8
JB
102902010-09-13 Joel Brobecker <brobecker@adacore.com>
10291
10292 * lynx-low.c (ptrace_request_to_str): Remove handling for
10293 request values that have been removed in LynxOS 5.x.
10294
1adfc54d
JB
102952010-09-13 Joel Brobecker <brobecker@adacore.com>
10296
10297 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10298 <ptrace.h>
10299
c2a66c29
NS
103002010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10301
10302 * configure.ac: Add --enable-inprocess-agent option.
10303 * configure: Rebuilt.
10304
32fcada3
YQ
103052010-09-06 Yao Qi <yao@codesourcery.com>
10306
10307 * linux-low.c (linux_kill): Remove unused variable.
10308 (linux_stabilize_threads): Likewise.
10309 * server.c (start_inferior): Likewise.
10310 (queue_stop_reply_callback): Likewise.
10311 * tracepoint.c (do_action_at_tracepoint): Likewise.
10312
0cccb683
YQ
103132010-09-06 Yao Qi <yao@codesourcery.com>
10314
10315 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10316 on return.
10317
423ec54c
JK
103182010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10319
10320 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10321
12ac6819
PA
103222010-09-06 Pedro Alves <pedro@codesourcery.com>
10323
10324 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10325 "$(IPA_DEPFILES)".
10326
8ed54b31
JB
103272010-09-01 Joel Brobecker <brobecker@adacore.com>
10328
10329 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10330 gdbserver/lynx-ppc-low.c: New files.
10331 * Makefile.in (lynx_low_h): New variable.
10332 (lynx-low.o, lynx-ppc-low.o): New rules.
10333 * configure.ac: On LynxOS, link with -lnetinet.
10334 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10335 * configure: regenerate.
10336
bb0116a4
JB
103372010-09-01 Joel Brobecker <brobecker@adacore.com>
10338
10339 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10340 * configure.ac: Add check for vasprintf and vsnprintf.
10341 * configure, config.in: Regenerate.
10342 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10343
a778ab81 103442010-09-01 Joel Brobecker <brobecker@adacore.com>
10345
10346 * gdbreplay.c: Move include of alloca.h up, next to include of
10347 malloc.h.
10348 * server.h: Add include of malloc.h.
10349 * mem-break.c: Remove include of malloc.h.
10350 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10351
8b034a19 103522010-09-01 Joel Brobecker <brobecker@adacore.com>
10353
10354 * Makefile.in (memmem.o): Build with -Wno-error.
10355
103562010-09-01 Joel Brobecker <brobecker@adacore.com>
10357
10358 * utils.c (xsnprintf): Make non-static.
10359 * server.h: Add xsnprintf declaration.
10360 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10361 replace calls to snprintf by calls to xsnprintf throughout.
10362
103632010-09-01 Joel Brobecker <brobecker@adacore.com>
10364
10365 * configure.ac: Add configure check for alloca.
10366 * configure, config.in: Regenerate.
10367 * server.h: Include alloca.h if it exists.
10368 * gdbreplay.c: Include alloca.h if it exists.
10369
1a981360
PA
103702010-08-28 Pedro Alves <pedro@codesourcery.com>
10371
10372 * linux-low.c (__SIGRTMIN): Define if not already defined.
10373 (linux_create_inferior): Check for __ANDROID__ rather than
10374 __SIGRTMIN.
10375 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10376 are already deferred.
10377 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10378 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10379 stopped and already has a pending signal to report.
10380 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10381 a pending signal to report or is moving out of a jump pad.
10382 (linux_init_signals): Check for __ANDROID__ rather than
10383 __SIGRTMIN.
10384
b4d51a55
PA
103852010-08-28 Pedro Alves <pedro@codesourcery.com>
10386
10387 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10388 debug_threads check. Avoid a linear search when not doing debug
10389 output.
10390
ec48365d
PA
103912010-08-27 Pedro Alves <pedro@codesourcery.com>
10392
10393 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10394 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10395 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10396 (process_event): Change local fd's type to gdb_fildes_t.
10397 (create_file_handler): Adjust prototype.
10398 (delete_file_handler): Adjust prototype.
10399 (handle_file_event): Adjust prototype. Use pfildes.
10400 (create_file_event): Adjsut prototype.
10401 * remote-utils.c (remote_desc, listen_desc): Change type to
10402 gdb_fildes_t.
10403 * server.h: New gdb_fildes_t typedef.
10404 [USE_WIN32API]: Include winsock2.h.
10405 (delete_file_handler, add_file_handler): Adjust prototypes.
10406 (pfildes): Declare.
10407 * utils.c (pfildes): New.
10408
854d88f0
PA
104092010-08-27 Pedro Alves <pedro@codesourcery.com>
10410
10411 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10412 * configure: Regenerate.
10413
0146f85b
PA
104142010-08-27 Pedro Alves <pedro@codesourcery.com>
10415
10416 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10417 (linux_done_accessing_memory): ... this.
10418 (linux_target_ops): Adjust.
10419 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10420 * nto-low.c (nto_target_ops): Adjust comment.
10421 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10422 * spu-low.c (spu_target_ops): Adjust comment.
10423 * target.h (target_ops): Rename unprepare_to_access_memory field
10424 to done_accessing_memory.
10425 (unprepare_to_access_memory): Rename to ...
10426 (done_accessing_memory): ... this.
10427
90d74c30
PA
104282010-08-26 Pedro Alves <pedro@codesourcery.com>
10429
10430 * linux-low.c (linux_prepare_to_access_memory): New.
10431 (linux_unprepare_to_access_memory): New.
10432 (linux_target_ops): Install them.
10433 * server.c (read_memory): Rename to ...
10434 (gdb_read_memory): ... this. Use
10435 prepare_to_access_memory/prepare_to_access_memory.
10436 (write_memory): Rename to ...
10437 (gdb_write_memory): ... this. Use
10438 prepare_to_access_memory/prepare_to_access_memory.
10439 (handle_search_memory_1): Adjust.
10440 (process_serial_event): Adjust.
10441 * target.h (struct target_ops): New fields
10442 prepare_to_access_memory and unprepare_to_access_memory.
10443 (prepare_to_access_memory, unprepare_to_access_memory): New.
10444 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10445 prepare_to_access_memory/prepare_to_access_memory.
10446 * nto-low.c (nto_target_ops): Adjust.
10447 * spu-low.c (spu_target_ops): Adjust.
10448 * win32-low.c (win32_target_ops): Adjust.
10449
fd467969
PA
104502010-08-26 Pedro Alves <pedro@codesourcery.com>
10451
10452 * Makefile.in (WARN_CFLAGS): Get it from configure.
10453 (WERROR_CFLAGS): New.
10454 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10455 * configure.ac: Introduce --enable-werror, which adds -Werror to
10456 the compiler command line. Enabled by default. Disable with
10457 --disable-werror. Add -Wdeclaration-after-statement
10458 Wpointer-arith and -Wformat-nonliteral to warning flags.
10459 * configure: Regenerate.
10460
331e2f5f
PA
104612010-08-26 Pedro Alves <pedro@codesourcery.com>
10462
10463 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10464
e581f2b4
PA
104652010-08-26 Pedro Alves <pedro@codesourcery.com>
10466
10467 * gdbreplay.c (remote_error): New.
10468 (gdbchar): New.
10469 (expect): Use gdbchar. Check for error reading from GDB.
10470 Clarify sync error output.
10471 (play): Check for errors writing to GDB.
10472 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10473 * remote-utils.c (getpkt): Check for errors writing to the remote
10474 descriptor.
10475
3c11dd79
PA
104762010-08-25 Pedro Alves <pedro@codesourcery.com>
10477
10478 * linux-low.c (linux_wait_1): Move non-debugging code out of
10479 `debug_threads' control.
10480
d20a8ad9
PA
104812010-08-25 Pedro Alves <pedro@codesourcery.com>
10482
10483 * linux-low.c (linux_wait_1): Don't set last_status here.
10484 * server.c (push_event, queue_stop_reply_callback): Assert we're
10485 not pushing a TARGET_WAITKIND_IGNORE event.
10486 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10487 (myresume, handle_target_event): Set the thread's last_resume_kind
10488 and last_status from the target returned status.
10489
964e4306
PA
104902010-08-25 Pedro Alves <pedro@codesourcery.com>
10491
10492 PR threads/10729
10493
10494 * linux-x86-low.c (update_debug_registers_callback): New.
10495 (i386_dr_low_set_addr): Use it.
10496 (i386_dr_low_get_addr): New.
10497 (i386_dr_low_set_control): Use update_debug_registers_callback.
10498 (i386_dr_low_get_control): New.
10499 (i386_dr_low_get_status): Adjust.
10500 * linux-low.c (linux_stop_lwp): New.
10501 * linux-low.h (linux_stop_lwp): Declare.
10502
10503 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10504 argument instead of a i386_debug_reg_state.
10505 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10506 a i386_debug_reg_state.
10507 (i386_insert_aligned_watchpoint): Adjust.
10508 (i386_remove_aligned_watchpoint): Adjust.
10509 (i386_low_stopped_data_address): Read the debug registers from the
10510 inferior instead of from the mirrors.
10511 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10512 (i386_dr_low_get_addr): Declare.
10513 (i386_dr_low_get_control): Declare.
10514 (i386_dr_low_get_status): Change prototype.
10515
10516 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10517 (i386_dr_low_get_addr): New.
10518 (i386_dr_low_get_control): New.
10519 (i386_dr_low_get_status): Adjust prototype. Return
10520 dr_status_mirror.
10521 (i386_initial_stuff): Clear dr_status_mirror and
10522 dr_control_mirror.
10523 (i386_get_thread_context): Adjust.
10524 (i386_set_thread_context): Adjust.
10525 (i386_thread_added): Adjust.
10526
5f21a75b
PA
105272010-08-24 Pedro Alves <pedro@codesourcery.com>
10528
10529 * linux-low.h (linux_thread_area): Delete declaration.
10530
3e4c1235
TS
105312010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10532
10533 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10534 after its termination.
10535
1971b033
PA
105362010-08-09 Pedro Alves <pedro@codesourcery.com>
10537
10538 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10539 (gdb_wants_all_stopped): Delete.
10540 (linux_wait_1): Don't call them.
10541 * server.c (handle_v_cont): Tag all threads as want-stopped.
10542 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10543 stopped as "client-wants-stopped".
10544
310444ac
PA
105452010-07-31 Pedro Alves <pedro@codesourcery.com>
10546
10547 * Makefile.in (signals_h): New.
10548 (server_h): Depend on it.
10549 (server.o): Don't depend on $(signals_def).
10550 (signals.o): Depend on $(signals_def).
10551
a19cae16
JK
105522010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10553
10554 * Makefile.in (signals_def): New.
10555 (server_h): Append include/gdb/signals.h and signals_def.
10556 (server.o): Append signals_def.
10557
30d50328
JK
105582010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10559
10560 * server.c (handle_target_event): Use target_signal_to_host for
10561 resume_info.sig initialization.
10562 * target.h (struct thread_resume) <sig>: New comment.
10563
5c3216e2
OS
105642010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10565
c6f46ca0
OS
10566 * server.c (handle_query): strcpy() the returned string from paddress()
10567 instead of sprintf().
5c3216e2
OS
10568 * utils.c (paddress): Return phex_nz().
10569
6bd31874
JB
105702010-07-07 Joel Brobecker <brobecker@adacore.com>
10571
10572 * server.c (handle_v_cont): Call mourn_inferior if process
10573 just exited.
10574 (myresume): Likewise.
10575
0fb4aa4b
PA
105762010-07-01 Pedro Alves <pedro@codesourcery.com>
10577
10578 Static tracepoints, and integration with UST.
10579
10580 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10581 * mem-break.c (uninsert_all_breakpoints)
10582 (reinsert_all_breakpoints): New.
10583 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10584 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10585 (gdb_agent_ust_loaded, helper_thread_id)
10586 (gdb_agent_helper_thread_id): New macros.
10587 (struct ipa_sym_addresses): Add addr_ust_loaded,
10588 addr_helper_thread_id, addr_cmd_buf.
10589 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10590 (in_process_agent_loaded_ust): New.
10591 (write_e_ust_not_loaded): New.
10592 (maybe_write_ipa_ust_not_loaded): New.
10593 (struct collect_static_trace_data_action): New.
10594 (enum tracepoint_type) <static_tracepoint>: New.
10595 (struct tracepoint) <handle>: Mention static tracepoints.
10596 (struct static_tracepoint_ctx): New.
10597 (CMD_BUF_SIZE): New.
10598 (add_tracepoint_action): Handle static tracepoint actions.
10599 (unprobe_marker_at): New.
10600 (clear_installed_tracepoints): Handle static tracepoints.
10601 (cmd_qtdp): Handle static tracepoints.
10602 (probe_marker_at): New.
10603 (cmd_qtstart): Handle static tracepoints.
10604 (response_tracepoint): Handle static tracepoints.
10605 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10606 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10607 (get_context_regcache): Handle static tracepoints.
10608 (do_action_at_tracepoint): Handle static tracepoint actions.
10609 (traceframe_find_block_type): Handle static trace data blocks.
10610 (traceframe_read_sdata): New.
10611 (download_tracepoints): Download static tracepoint actions.
10612 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10613 (GDB_PROBE_NAME): New.
10614 (ust_ops): New.
10615 (GET_UST_SYM): New.
10616 (USTF): New.
10617 (dlsym_ust): New.
10618 (ust_marker_to_static_tracepoint): New.
10619 (gdb_probe): New.
10620 (collect_ust_data_at_tracepoint): New.
10621 (gdb_ust_probe): New.
10622 (UNIX_PATH_MAX, SOCK_DIR): New.
10623 (gdb_ust_connect_sync_socket): New.
10624 (resume_thread, stop_thread): New.
10625 (run_inferior_command): New.
10626 (init_named_socket): New.
10627 (gdb_ust_socket_init): New.
10628 (cstr_to_hexstr): New.
10629 (next_st): New.
10630 (first_marker, next_marker): New.
10631 (response_ust_marker): New.
10632 (cmd_qtfstm, cmd_qtsstm): New.
10633 (unprobe_marker_at, probe_marker_at): New.
10634 (cmd_qtstmat, gdb_ust_thread): New.
10635 (gdb_ust_init): New.
10636 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10637 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10638 (ST_REGENTRY): New.
10639 (x86_64_st_collect_regmap): New.
10640 (X86_64_NUM_ST_COLLECT_GREGS): New.
10641 (AMD64_RIP_REGNUM): New.
10642 (supply_static_tracepoint_registers): New.
10643 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10644 (ST_REGENTRY): New.
10645 (i386_st_collect_regmap): New.
10646 (i386_NUM_ST_COLLECT_GREGS): New.
10647 (supply_static_tracepoint_registers): New.
10648 * server.c (handle_query): Handle qXfer:statictrace:read.
10649 <qSupported>: Report support for StaticTracepoints, and
10650 qXfer:statictrace:read features.
10651 * server.h (traceframe_read_sdata)
10652 (supply_static_tracepoint_registers): Declare.
10653 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10654 (unpack_varlen_hex): Include in IPA build.
10655 * Makefile.in (ustlibs, ustinc): New.
10656 (IPA_OBJS): Add remote-utils-ipa.o.
10657 ($(IPA_LIB)): Link -ldl and -lpthread.
10658 (UST_CFLAGS): New.
10659 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10660 * config.in, configure: Regenerate.
10661
9e4344e5
PA
106622010-06-20 Ian Lance Taylor <iant@google.com>
10663 Pedro Alves <pedro@codesourcery.com>
10664
10665 * linux-x86-low.c (always_true): Delete.
10666 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10667 trying to fool the compiler with always_true.
10668
c6beb2cb
PA
106692010-06-20 Pedro Alves <pedro@codesourcery.com>
10670
10671 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10672 conditions in gdbserver.
10673
d2ed6730
UW
106742010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10675
10676 * spu-low.c (spu_read_memory): Wrap around local store limit.
10677 (spu_write_memory): Likewise.
10678
4e29fb54
PA
106792010-06-15 Pedro Alves <pedro@codesourcery.com>
10680
10681 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10682 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10683 LONGEST uses.
10684 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10685 uses.
10686 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10687 uses with LONGEST uses.
10688
6a271cae
PA
106892010-06-14 Stan Shebs <stan@codesourcery.com>
10690 Pedro Alves <pedro@codesourcery.com>
10691
10692 Bytecode compiler.
10693
10694 * linux-x86-low.c: Include limits.h.
10695 (add_insns): New.
10696 (always_true): New.
10697 (EMIT_ASM): New.
10698 (EMIT_ASM32): New.
10699 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10700 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10701 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10702 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10703 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10704 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10705 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10706 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10707 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10708 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10709 (amd64_emit_void_call_2): New.
10710 (amd64_emit_ops): New.
10711 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10712 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10713 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10714 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10715 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10716 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10717 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10718 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10719 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10720 (i386_emit_stack_adjust, i386_emit_int_call_1)
10721 (i386_emit_void_call_2): New.
10722 (i386_emit_ops): New.
10723 (x86_emit_ops): New.
10724 (the_low_target): Install x86_emit_ops.
10725 * server.h (struct emit_ops): New.
10726 (get_raw_reg_func_addr): Declare.
10727 (current_insn_ptr, emit_error): Declare.
10728 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10729 (set_trace_state_variable_value): New defines.
10730 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10731 addr_get_trace_state_variable_value and
10732 addr_set_trace_state_variable_value.
10733 (symbol_list): New fields for get_raw_reg,
10734 get_trace_state_variable_value and set_trace_state_variable_value.
10735 (condfn): New typedef.
10736 (struct tracepoint): New field `compiled_cond'.
10737 (do_action_at_tracepoint): Clear compiled_cond.
10738 (get_trace_state_variable_value, set_trace_state_variable_value):
10739 Export in the IPA.
10740 (condition_true_at_tracepoint): If there's a compiled condition,
10741 run that.
10742 (current_insn_ptr, emit_error): New globals.
10743 (struct bytecode_address): New.
10744 (get_raw_reg_func_addr): New.
10745 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10746 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10747 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10748 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10749 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10750 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10751 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10752 (compile_tracepoint_condition, compile_bytecodes): New.
10753 * target.h (emit_ops): Forward declare.
10754 (struct target_ops): New field emit_ops.
10755 (target_emit_ops): New.
10756 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10757 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10758 * linux-low.c (linux_emit_ops): New.
10759 (linux_target_ops): Install it.
10760 * linux-low.h (struct linux_target_ops): New field emit_ops.
10761
92b72907
UW
107622010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10763
10764 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10765 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10766
fa593d66
PA
107672010-06-01 Pedro Alves <pedro@codesourcery.com>
10768 Stan Shebs <stan@codesourcery.com>
10769
10770 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10771 (all): Depend on $(extra_libraries).
10772 (install-only): Install the IPA.
10773 (IPA_OBJS, IPA_LIB): New.
10774 (clean): Remove the IPA lib.
10775 (IPAGENT_CFLAGS): New.
10776 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10777 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10778 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10779 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10780 * configure.ac: Check for atomic builtins support in the compiler.
10781 (IPA_DEPFILES, extra_libraries): Define.
10782 * configure.srv (ipa_obj): Add description.
10783 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10784 (i[34567]86-*-linux*): Set ipa_obj.
10785 (x86_64-*-linux*): Set ipa_obj.
10786 * linux-low.c (stabilizing_threads): New.
10787 (supports_fast_tracepoints): New.
10788 (linux_detach): Stabilize threads before detaching.
10789 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10790 the lwp is either not stabilizing, or is moving out of a jump pad.
10791 (linux_fast_tracepoint_collecting): New.
10792 (maybe_move_out_of_jump_pad): New.
10793 (enqueue_one_deferred_signal): New.
10794 (dequeue_one_deferred_signal): New.
10795 (linux_wait_for_event_1): If moving out of a jump pad, defer
10796 pending signals to later.
10797 (linux_stabilize_threads): New.
10798 (linux_wait_1): Check if threads need moving out of jump pads, and
10799 do it if so.
10800 (stuck_in_jump_pad_callback): New.
10801 (move_out_of_jump_pad_callback): New.
10802 (lwp_running): New.
10803 (linux_resume_one_lwp): Handle moving out of jump pads.
10804 (linux_set_resume_request): Dequeue deferred signals.
10805 (need_step_over_p): Also step over fast tracepoint jumps.
10806 (start_step_over): Also uninsert fast tracepoint jumps.
10807 (finish_step_over): Also reinsert fast tracepoint jumps.
10808 (linux_install_fast_tracepoint_jump): New.
10809 (linux_target_ops): Install linux_stabilize_threads and
10810 linux_install_fast_tracepoint_jump_pad.
10811 * linux-low.h (linux_target_ops) <get_thread_area,
10812 install_fast_tracepoint_jump_pad>: New fields.
10813 (struct lwp_info) <collecting_fast_tracepoint,
10814 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10815 (linux_get_thread_area): Declare.
10816 * linux-x86-low.c (jump_insn): New.
10817 (x86_get_thread_area): New.
10818 (append_insns): New.
10819 (push_opcode): New.
10820 (amd64_install_fast_tracepoint_jump_pad): New.
10821 (i386_install_fast_tracepoint_jump_pad): New.
10822 (x86_install_fast_tracepoint_jump_pad): New.
10823 (the_low_target): Install x86_get_thread_area and
10824 x86_install_fast_tracepoint_jump_pad.
10825 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10826 (struct fast_tracepoint_jump): New.
10827 (fast_tracepoint_jump_insn): New.
10828 (fast_tracepoint_jump_shadow): New.
10829 (find_fast_tracepoint_jump_at): New.
10830 (fast_tracepoint_jump_here): New.
10831 (delete_fast_tracepoint_jump): New.
10832 (set_fast_tracepoint_jump): New.
10833 (uninsert_fast_tracepoint_jumps_at): New.
10834 (reinsert_fast_tracepoint_jumps_at): New.
10835 (set_breakpoint_at): Use write_inferior_memory.
10836 (uninsert_raw_breakpoint): Use write_inferior_memory.
10837 (check_mem_read): Mask out fast tracepoint jumps.
10838 (check_mem_write): Mask out fast tracepoint jumps.
10839 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10840 (set_fast_tracepoint_jump): Declare.
10841 (delete_fast_tracepoint_jump)
10842 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10843 (reinsert_fast_tracepoint_jumps_at): Declare.
10844 * regcache.c: Don't compile many functions when building the
10845 in-process agent library.
10846 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10847 the register buffer in the heap.
10848 (free_register_cache): If the register buffer isn't owned by the
10849 regcache, don't free it.
10850 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10851 pre-existing register caches.
10852 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10853 type.
10854 (convert_ascii_to_int): : Constify `from' parameter type.
10855 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10856 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10857 the needed buffer in-place.
10858 (relocate_instruction): New.
10859 * server.c (handle_query) <qSymbols>: If the target supports
10860 tracepoints, give it a chance of looking up symbols. Report
10861 support for fast tracepoints.
10862 (handle_status): Stabilize threads.
10863 (process_serial_event): Adjust.
10864 * server.h (struct fast_tracepoint_jump): Forward declare.
10865 (struct process_info) <fast_tracepoint_jumps>: New field.
10866 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10867 (decode_X_packet, decode_M_packet): Adjust.
10868 (relocate_instruction): Declare.
10869 (in_process_agent_loaded): Declare.
10870 (tracepoint_look_up_symbols): Declare.
10871 (struct fast_tpoint_collect_status): Declare.
10872 (fast_tracepoint_collecting): Declare.
10873 (force_unlock_trace_buffer): Declare.
10874 (handle_tracepoint_bkpts): Declare.
10875 (initialize_low_tracepoint)
10876 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10877 * target.h (struct target_ops) <stabilize_threads,
10878 install_fast_tracepoint_jump_pad>: New fields.
10879 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10880 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10881 [HAVE_STDINT_H]: Include stdint.h.
10882 (trace_debug_1): Rename to ...
10883 (trace_vdebug): ... this.
10884 (trace_debug): Rename to ...
10885 (trace_debug_1): ... this. Add `level' parameter.
10886 (trace_debug): New.
10887 (ATTR_USED, ATTR_NOINLINE): New.
10888 (IP_AGENT_EXPORT): New.
10889 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10890 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10891 (about_to_request_buffer_space, trace_buffer_is_full)
10892 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10893 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10894 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10895 (traceframe_write_count, traceframes_created)
10896 (trace_state_variables)
10897 New renaming defines.
10898 (struct ipa_sym_addresses): New.
10899 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10900 (symbol_list): New.
10901 (ipa_sym_addrs): New.
10902 (all_tracepoint_symbols_looked_up): New.
10903 (in_process_agent_loaded): New.
10904 (write_e_ipa_not_loaded): New.
10905 (maybe_write_ipa_not_loaded): New.
10906 (tracepoint_look_up_symbols): New.
10907 (debug_threads) [IN_PROCESS_AGENT]: New.
10908 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10909 (UNKNOWN_SIDE_EFFECTS): New.
10910 (stop_tracing): New.
10911 (flush_trace_buffer): New.
10912 (stop_tracing_bkpt): New.
10913 (flush_trace_buffer_bkpt): New.
10914 (read_inferior_integer): New.
10915 (read_inferior_uinteger): New.
10916 (read_inferior_data_pointer): New.
10917 (write_inferior_data_pointer): New.
10918 (write_inferior_integer): New.
10919 (write_inferior_uinteger): New.
10920 (struct collect_static_trace_data_action): Delete.
10921 (enum tracepoint_type): New.
10922 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
10923 <actions_str, step_actions, step_actions_str>: Only include in
10924 GDBserver.
fa593d66
PA
10925 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10926 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10927 (tracepoints): Use IP_AGENT_EXPORT.
10928 (last_tracepoint): Don't include in the IPA.
10929 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10930 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10931 (alloced_trace_state_variables): New.
10932 (trace_state_variables): Use IP_AGENT_EXPORT.
10933 (traceframe_t): Delete unused variable.
10934 (circular_trace_buffer): Don't include in the IPA.
10935 (trace_buffer_start): Delete.
10936 (struct trace_buffer_control): New.
10937 (trace_buffer_free): Delete.
10938 (struct ipa_trace_buffer_control): New.
10939 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10940 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10941 New.
10942 (trace_buffer_ctrl): New.
10943 (TRACE_BUFFER_CTRL_CURR): New.
10944 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10945 Reimplement as macros.
10946 (trace_buffer_wrap): Delete.
10947 (traceframe_write_count, traceframe_read_count)
10948 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10949 (struct tracepoint_hit_ctx) <type>: New field.
10950 (struct fast_tracepoint_ctx): New.
10951 (memory_barrier): New.
10952 (cmpxchg): New.
10953 (record_tracepoint_error): Update atomically in the IPA.
10954 (clear_inferior_trace_buffer): New.
10955 (about_to_request_buffer_space): New.
10956 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10957 updating the same buffer.
10958 (add_tracepoint): Default the tracepoint's type to trap
10959 tracepoint, and orig_size to -1.
10960 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10961 internal variables.
10962 (create_trace_state_variable): New parameter `gdb'. Handle it.
10963 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10964 (cmd_qtdp): Handle fast tracepoints.
10965 (cmd_qtdv): Adjust.
10966 (max_jump_pad_size): New.
10967 (gdb_jump_pad_head): New.
10968 (get_jump_space_head): New.
10969 (claim_jump_space): New.
10970 (sort_tracepoints): New.
10971 (MAX_JUMP_SIZE): New.
10972 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10973 IPA.
10974 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10975 support. Upload fast traceframes, and delete internal IPA
10976 breakpoints.
10977 (stop_tracing_handler): New.
10978 (flush_trace_buffer_handler): New.
10979 (cmd_qtstop): Upload fast tracepoints.
10980 (response_tracepoint): Handle fast tracepoints.
10981 (tracepoint_finished_step): Upload fast traceframes. Set the
10982 tracepoint hit context's tracepoint type.
10983 (handle_tracepoint_bkpts): New.
10984 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10985 type. Add comment about fast tracepoints.
10986 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10987 non-existing action_str field.
10988 (get_context_regcache): Handle fast tracepoints.
10989 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10990 to the regcache.
10991 (fast_tracepoint_from_jump_pad_address): New.
10992 (fast_tracepoint_from_ipa_tpoint_address): New.
10993 (collecting_t): New.
10994 (force_unlock_trace_buffer): New.
10995 (fast_tracepoint_collecting): New.
10996 (collecting): New.
10997 (gdb_collect): New.
10998 (write_inferior_data_ptr): New.
10999 (target_tp_heap): New.
11000 (target_malloc): New.
11001 (download_agent_expr): New.
11002 (UALIGN): New.
11003 (download_tracepoints): New.
11004 (download_trace_state_variables): New.
11005 (upload_fast_traceframes): New.
11006 (IPA_FIRST_TRACEFRAME): New.
11007 (IPA_NEXT_TRACEFRAME_1): New.
11008 (IPA_NEXT_TRACEFRAME): New.
11009 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11010 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11011 (gdb_jump_pad_buffer_end): New.
11012 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11013 (initialize_tracepoint): Adjust.
11014 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11015 buffer. Initialize the low module.
11016 * utils.c (PREFIX, TOOLNAME): New.
11017 (malloc_failure): Use PREFIX.
11018 (error): In the IPA, an error causes an exit.
11019 (fatal, warning): Use PREFIX.
11020 (internal_error): Use TOOLNAME.
11021 (NUMCELLS): Increase to 10.
11022 * configure, config.in: Regenerate.
11023
d149dd1d
PA
110242010-06-01 Pedro Alves <pedro@codesourcery.com>
11025
11026 * server.c (handle_query) <qSupported>: Do two passes over the
11027 qSupported string to avoid nesting strtok.
11028
f6528abd
JK
110292010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11030
11031 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11032 (CDEPS): New.
11033 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11034 -Wl,--dynamic-list.
11035 * configure: Regenerate.
11036 * proc-service.list: New.
11037
ca2a87a0
JK
110382010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11039
11040 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11041 New comment.
11042
363a6e9f
OS
110432010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11044
11045 * gdbreplay.c (remote_open): Check error return from socket() call by
11046 its equality to -1 not by it being negative.
11047 * remote-utils.c (remote_open): Likewise.
11048
d23b6cb1
PA
110492010-05-23 Pedro Alves <pedro@codesourcery.com>
11050
11051 * config.h: Regenerate.
11052
28d3cf85
MK
110532010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11054
11055 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11056 doesn't provide PTRACE_GET_THREAD_AREA.
11057
fea36a59
MK
110582010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11059
11060 * linux-m68k-low.c: Include <asm/ptrace.h>
11061 (ps_get_thread_area): Implement.
11062
24b066ba
DE
110632010-05-03 Doug Evans <dje@google.com>
11064
11065 * event-loop.c (struct callback_event): New struct.
11066 (callback_list): New global.
11067 (append_callback_event, delete_callback_event): New functions.
11068 (process_callback): New function.
11069 (start_event_loop): Call it.
11070 * remote-utils.c (NOT_SCHEDULED): Define.
11071 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11072 moved out of readchar.
11073 (readchar): Rewrite. Call reschedule before returning.
11074 (reset_readchar): New function.
11075 (remote_close): Call it.
11076 (process_remaining, reschedule): New functions.
11077 * server.h (callback_handler_func): New typedef.
11078 (append_callback_event, delete_callback_event): Declare.
11079
9836d6ea
PA
110802010-05-03 Pedro Alves <pedro@codesourcery.com>
11081
11082 * proc-service.c (ps_pglobal_lookup): Use
11083 thread_db_look_up_one_symbol.
11084 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11085 parameter. Use it instead of all_symbols_looked_up.
11086 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11087 field.
11088 (all_symbols_looked_up): Don't declare.
11089 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11090 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11091 field.
11092 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11093 Set all_symbols_looked_up here.
11094 (thread_db_look_up_one_symbol): New.
11095 (thread_db_get_tls_address): Adjust.
11096 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11097 thread_db object on the heap, and tentatively set it in the
11098 process structure.
11099 (thread_db_init): Don't set all_symbols_looked_up here.
11100 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11101
7984d532
PA
111022010-05-03 Pedro Alves <pedro@codesourcery.com>
11103
11104 * linux-low.c (linux_kill, linux_detach): Adjust.
11105 (status_pending_p_callback): Remove redundant statement. Check
11106 for !TARGET_WAITIKIND_IGNORE, instead of
11107 TARGET_WAITKIND_STOPPED.
11108 (handle_tracepoints): Make sure LWP is locked. Adjust.
11109 (linux_wait_for_event_1): Adjust.
11110 (linux_cancel_breakpoints): New.
11111 (unsuspend_one_lwp): New.
11112 (unsuspend_all_lwps): New.
11113 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11114 (send_sigstop_callback): Change return type to int, add new
11115 `except' parameter and handle it.
11116 (suspend_and_send_sigstop_callback): New.
11117 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11118 pass them down. If SUSPEND, also increment the lwp's suspend
11119 count.
11120 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11121 (need_step_over_p): Don't consider suspended LWPs.
11122 (start_step_over): Adjust.
11123 (proceed_one_lwp): Change return type to int, add new `except'
11124 parameter and handle it.
11125 (unsuspend_and_proceed_one_lwp): New.
11126 (proceed_all_lwps): Use find_inferior instead of
11127 for_each_inferior.
11128 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11129 also decrement the suspend count of LWPs. Pass `except' down,
11130 instead of hacking its suspend count.
11131 (linux_pause_all): Add `freeze' parameter. Adjust.
11132 (linux_unpause_all): New.
11133 (linux_target_ops): Install linux_unpause_all.
11134 * server.c (handle_status): Adjust.
11135 * target.h (struct target_ops): New fields `unpause_all' and
11136 `cancel_breakpoints'. Add new parameter to `pause_all'.
11137 (pause_all): Add new `freeze' parameter.
11138 (unpause_all): New.
11139 (cancel_breakpoints): New.
11140 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11141 cancel breakpoints.
11142 (cmd_qtstart): Pause threads.
11143 (stop_tracing): Pause threads, and cancel breakpoints.
11144 * win32-low.c (win32_target_ops): Adjust.
11145
e471f25b
PA
111462010-05-03 Pedro Alves <pedro@codesourcery.com>
11147
11148 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11149 the inferior right away from here...
11150 (linux_wait_1): ... to here, and adjust to check the thread's
11151 last_resume_kind instead of the lwp's step or stop_expected flags.
11152
1915ef4f
PA
111532010-05-02 Pedro Alves <pedro@codesourcery.com>
11154
11155 * README: Use consistent `GDB' and `GDBserver' spellings.
11156
f9e39928
PA
111572010-05-02 Pedro Alves <pedro@codesourcery.com>
11158
11159 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11160 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11161 (linux_detach_one_lwp): Assume the lwp is stopped.
11162 (any_thread_of): Delete.
11163 (linux_detach): Stop all lwps here. Don't blindly delete all
11164 breakpoints.
11165 (delete_lwp_callback): New.
11166 (linux_mourn): Delete all lwps of the process that is gone.
11167 (linux_wait_1): Don't delete the last lwp of the process here.
11168 * mem-break.h (mark_breakpoints_out): Declare.
11169 * mem-break.c (mark_breakpoints_out): New.
11170 (free_all_breakpoints): Use it.
11171 * server.c (handle_target_event): If the process is gone, mark
11172 breakpoints out.
11173 * thread-db.c (struct thread_db) <create_bp>: New field.
11174 (thread_db_enable_reporting): Fix prototype. Store a thread event
11175 breakpoint reference in the thread_db struct.
11176 (thread_db_load_search): Clear the thread_db object.
11177 (try_thread_db_load_1): Ditto.
11178 (switch_to_process): New.
11179 (disable_thread_event_reporting): Use it.
11180 (remove_thread_event_breakpoints): New.
11181 (thread_db_detach, thread_db_mourn): Use it.
11182
1e7fc18c
PA
111832010-05-01 Pedro Alves <pedro@codesourcery.com>
11184
11185 * linux-low.c (linux_enable_event_reporting): New.
11186 (linux_wait_for_event_1, handle_extended_wait): Use it.
11187
02fc4de7
PA
111882010-04-30 Pedro Alves <pedro@codesourcery.com>
11189
11190 * linux-low.c (linux_kill_one_lwp, linux_kill)
11191 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11192 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11193 SIGSTOP even if the LWP is stopped.
11194 (send_sigstop_callback): New.
11195 (stop_all_lwps): Use send_sigstop_callback instead.
11196 (linux_resume_one_thread): Adjust.
11197 (proceed_one_lwp): Still proceed an LWP that the client has
11198 requested to stop, if we haven't reported it as stopped yet. Make
11199 sure that LWPs the client want stopped, have a pending SIGSTOP.
11200
bc3b5632
DE
112012010-04-26 Doug Evans <dje@google.com>
11202
ae1ada35
DE
11203 * server.c (handle_general_set): Make static.
11204
bc3b5632
DE
11205 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11206 Print received char after testing for error/eof instead of before.
11207 (input_interrupt): Tweak comment.
11208
65730243
DE
112092010-04-23 Doug Evans <dje@google.com>
11210
11211 * server.c (start_inferior): Print inferior argv if --debug.
11212
a8ae7dc0
AR
112132010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11214
11215 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11216 * nto-x86-low.c: Include server.h
11217
1c07cc19
PM
112182010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11219
11220 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11221 be consistent with other sources of this directory.
11222 (init_registers_amd64): Correct name of source file of this function
11223 in the comment.
11224
e0a61e09
PM
112252010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11226
11227 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11228 64-bit executables.
11229
54709339
PM
112302010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11231
11232 * win32-i386-low.c: Add 64-bit support.
11233 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11234 (init_registers_amd64): Declare.
11235 (mappings): Add 64-bit version of array.
11236 (init_windows_x86): New function.
11237 (the_low_target): Change init_arch field to init_windows_x86.
11238
e8f0053d
PM
112392010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11240
11241 * win32-low.c: Adapt to support also 64-bit architecture.
11242 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11243 (get_image_name): Use SIZE_T type for local variable `done'.
11244 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11245 (toolhelp_get_dll_name): Idem.
11246 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11247 Use uintptr_t typecast to avoid warning.
11248 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11249 (handle_exception): Use phex_nz to avoid warning.
11250 (win32_wait): Remove unused local variable `process'.
11251
c481e77e
PM
112522010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11253
11254 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11255 `amd64-avx.o'.
11256
12ea4b69
PM
112572010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11258
11259 * configure.ac: Use `ws2_32' library for srv_mingw.
11260 * configure: Regenerate.
11261 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11262 * remote-utils.c: Likewise.
11263
f6d1620c
L
112642010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11265
11266 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11267 if __x86_64__ is defined.
11268
8e642873
PM
112692010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11270
11271 * configure: Regenerate.
11272
711e434b
PM
112732010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11274
11275 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11276 * target.h (target_ops): New get_tib_address field.
11277 * win32-low.h (win32_thread_info): Add thread_local_base field.
11278 * win32-low.c (child_add_thread): Add tlb argument.
11279 Set thread_local_base field to TLB.
11280 (get_child_debug_event): Adapt to child_add_thread change.
11281 (win32_get_tib_address): New function.
11282 (win32_target_ops): Set get_tib_address field to
11283 win32_get_tib_address.
11284 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11285
505106cd
PA
112862010-04-12 Pedro Alves <pedro@codesourcery.com>
11287
505106cd
PA
11288 * linux-low.c (linux_mourn): Also remove the process.
11289 * server.c (handle_target_event): Don't remove the process here.
11290 * nto-low.c (nto_mourn): New.
11291 (nto_target_ops): Install it.
11292 * spu-low.c (spu_mourn): New.
11293 (spu_target_ops): Install it.
11294 * win32-low.c (win32_mourn): New.
11295 (win32_target_ops): Install it.
11296
e8470a06
PA
112972010-04-12 Pedro Alves <pedro@codesourcery.com>
11298
11299 * server.h (buffer_xml_printf): Remove redundant `;'.
11300
45ba0d02
PA
113012010-04-12 Pedro Alves <pedro@codesourcery.com>
11302
11303 * regcache.c (set_register_cache): Invalidate regcaches before
11304 changing the register cache layout.
11305 (regcache_invalidate_one): Allow a NULL regcache.
11306 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11307 regcaches before changing the register cache layout or the target
11308 regsets.
11309
59e04013
L
113102010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11311
11312 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11313 variable warning on Linux/x86-64.
11314
8336d594
PA
113152010-04-11 Pedro Alves <pedro@codesourcery.com>
11316
11317 GDBserver disconnected tracing support.
11318
11319 * linux-low.c (linux_remove_process): Delete.
11320 (add_lwp): Don't set last_resume_kind here.
11321 (linux_kill): Use `mourn'.
11322 (linux_detach): Use `thread_db_detach', and `mourn'.
11323 (linux_mourn): New.
11324 (linux_attach_lwp_1): Adjust comment.
11325 (linux_attach): last_resume_kind moved the thread_info; adjust.
11326 (status_pending_p_callback): Adjust.
11327 (linux_wait_for_event_1): Adjust.
11328 (count_events_callback, select_singlestep_lwp_callback)
11329 (select_event_lwp_callback, cancel_breakpoints_callback)
11330 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11331 (proceed_one_lwp): Adjust.
11332 (linux_async): Add debug output.
11333 (linux_thread_stopped): New.
11334 (linux_pause_all): New.
11335 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11336 linux_pause_all.
11337 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11338 (thread_db_free): Delete declaration.
11339 (thread_db_detach, thread_db_mourn): Declare.
11340 * thread-db.c (thread_db_init): Use thread_db_mourn.
11341 (thread_db_free): Delete, split in two.
11342 (disable_thread_event_reporting): New.
11343 (thread_db_detach): New.
11344 (thread_db_mourn): New.
11345
11346 * server.h (struct thread_info) <last_resume_kind>: New field.
11347 <attached>: Add comment.
11348 <gdb_detached>: New field.
11349 (handler_func): Change return type to int.
11350 (handle_serial_event, handle_target_event): Ditto.
11351 (gdb_connected): Declare.
11352 (tracing): Delete.
11353 (disconnected_tracing): Declare.
11354 (stop_tracing): Declare.
11355
11356 * server.c (handle_query) <qSupported>: Report support for
11357 disconnected tracing.
11358 (queue_stop_reply_callback): Account for running threads.
11359 (gdb_wants_thread_stopped): New.
11360 (gdb_wants_all_threads_stopped): New.
11361 (gdb_reattached_process): New.
11362 (handle_status): Clear the `gdb_detached' flag of all processes.
11363 In all-stop, stop all threads.
11364 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11365 (process_serial_event): If the remote connection breaks, or if an
11366 exit was forced with "monitor exit", force an event loop exit.
11367 Handle disconnected tracing on detach.
11368 (handle_serial_event): Adjust.
11369 (handle_target_event): If GDB isn't connected, forward events back
11370 to the inferior, unless the last process exited, in which case,
11371 exit gdbserver. Adjust interface.
11372
11373 * remote-utils.c (remote_open): Don't block in accept. Instead
11374 register an event loop source on the listen socket file
11375 descriptor. Refactor bits into ...
11376 (listen_desc): ... this new global.
11377 (gdb_connected): ... this new function.
11378 (enable_async_notification): ... this new function.
11379 (handle_accept_event): ... this new function.
11380 (remote_close): Clear remote_desc.
11381
11382 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11383
11384 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11385 New fields.
11386 (mourn_inferior): Define.
11387 (target_process_qsupported): Avoid the dangling else problem.
11388 (thread_stopped): Define.
11389 (pause_all): Define.
11390 (target_waitstatus_to_string): Declare.
11391 * target.c (target_waitstatus_to_string): New.
11392
11393 * tracepoint.c (tracing): Make extern.
11394 (disconnected_tracing): New.
11395 (stop_tracing): Make extern. Handle tracing stops due to GDB
11396 disconnecting.
11397 (cmd_qtdisconnected): New.
11398 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11399 (handle_tracepoint_general_set): Handle QTDisconnected.
11400
11401 * event-loop.c (event_handler_func): Change return type to int.
11402 (process_event): Bail out if the event handler wants the event
11403 loop to stop.
11404 (handle_file_event): Ditto.
11405 (start_event_loop): Bail out if the event handler wants the event
11406 loop to stop.
11407
11408 * nto-low.c (nto_target_ops): Adjust.
11409 * spu-low.c (spu_wait): Don't remove the process here.
11410 (spu_target_ops): Adjust.
11411 * win32-low.c (win32_wait): Don't remove the process here.
11412 (win32_target_ops): Adjust.
11413
5d267c4c
PA
114142010-04-11 Pedro Alves <pedro@codesourcery.com>
11415
11416 * regcache.c (realloc_register_cache): Invalidate inferior's
11417 regcache before recreating it.
11418
623ccd72
PA
114192010-04-09 Pedro Alves <pedro@codesourcery.com>
11420
11421 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11422
219f2f23
PA
114232010-04-09 Stan Shebs <stan@codesourcery.com>
11424 Pedro Alves <pedro@codesourcery.com>
11425
11426 * server.h (LONGEST): New.
11427 (struct thread_info) <while_stepping>: New field.
11428 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11429 Declare.
11430 (initialize_tracepoint, handle_tracepoint_general_set)
11431 (handle_tracepoint_query, tracepoint_finished_step)
11432 (tracepoint_was_hit, release_while_stepping_state_list):
11433 (current_traceframe): Declare.
11434 * server.c (handle_general_set): Handle tracepoint packets.
11435 (read_memory): New.
11436 (write_memory): New.
11437 (handle_search_memory_1): Use read_memory.
11438 (handle_query): Report support for conditional tracepoints, trace
11439 state variables, and tracepoint sources. Handle tracepoint
11440 queries.
11441 (main): Initialize the tracepoints module.
11442 (process_serial_event): Handle traceframe reads/writes.
11443
11444 * linux-low.c (handle_tracepoints): New.
11445 (linux_wait_1): Call it.
11446 (linux_resume_one_lwp): Handle while-stepping.
11447 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11448 (linux_target_ops): Install them.
11449 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11450 New field.
11451 * linux-x86-low.c (x86_supports_tracepoints): New.
11452 (the_low_target). Install it.
11453
11454 * mem-break.h (delete_breakpoint): Declare.
11455 * mem-break.c (delete_breakpoint): Make external.
11456
11457 * target.h (struct target_ops): Add `supports_tracepoints',
11458 `read_pc', and `write_pc' fields.
11459 (target_supports_tracepoints): Define.
11460 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11461 (phex_nz): New.
11462
11463 * regcache.h (struct regcache) <registers_owned>: New field.
11464 (init_register_cache, regcache_cpy): Declare.
11465 (regcache_read_pc, regcache_write_pc): Declare.
11466 (register_cache_size): Declare.
11467 (supply_regblock): Declare.
11468 * regcache.c (init_register_cache): New.
11469 (new_register_cache): Use it.
11470 (regcache_cpy): New.
11471 (register_cache_size): New.
11472 (supply_regblock): New.
11473 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 11474
219f2f23
PA
11475 * tracepoint.c: New.
11476
11477 * Makefile.in (OBS): Add tracepoint.o.
11478 (tracepoint.o): New rule.
11479
3a13a53b
L
114802010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11481
11482 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11483 (i386-mmx.o): New.
11484 (i386-mmx.c): Likewise.
11485 (i386-mmx-linux.o): Likewise.
11486 (i386-mmx-linux.c): Likewise.
11487
11488 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11489 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11490 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11491 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11492
11493 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11494 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11495 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11496
1570b33e
L
114972010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11498
11499 * Makefile.in (clean): Updated.
11500 (i386-avx.o): New.
11501 (i386-avx.c): Likewise.
11502 (i386-avx-linux.o): Likewise.
11503 (i386-avx-linux.c): Likewise.
11504 (amd64-avx.o): Likewise.
11505 (amd64-avx.c): Likewise.
11506 (amd64-avx-linux.o): Likewise.
11507 (amd64-avx-linux.c): Likewise.
11508
11509 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11510 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11511 (srv_amd64_regobj): Add amd64-avx.o.
11512 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11513 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11514 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11515 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11516 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11517 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11518 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11519
11520 * i387-fp.c: Include "i386-xstate.h".
11521 (i387_xsave): New.
11522 (i387_cache_to_xsave): Likewise.
11523 (i387_xsave_to_cache): Likewise.
11524 (x86_xcr0): Likewise.
11525
11526 * i387-fp.h (i387_cache_to_xsave): Likewise.
11527 (i387_xsave_to_cache): Likewise.
11528 (x86_xcr0): Likewise.
11529
11530 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11531 * linux-crisv32-low.c (target_regsets): Likewise.
11532 * linux-m68k-low.c (target_regsets): Likewise.
11533 * linux-mips-low.c (target_regsets): Likewise.
11534 * linux-ppc-low.c (target_regsets): Likewise.
11535 * linux-s390-low.c (target_regsets): Likewise.
11536 * linux-sh-low.c (target_regsets): Likewise.
11537 * linux-sparc-low.c (target_regsets): Likewise.
11538 * linux-xtensa-low.c (target_regsets): Likewise.
11539
11540 * linux-low.c: Include <sys/uio.h>.
11541 (regsets_fetch_inferior_registers): Support nt_type.
11542 (regsets_store_inferior_registers): Likewise.
11543 (linux_process_qsupported): New.
11544 (linux_target_ops): Add linux_process_qsupported.
11545
11546 * linux-low.h (regset_info): Add nt_type.
11547 (linux_target_ops): Add process_qsupported.
11548
11549 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11550 and <sys/uio.h>.
11551 (init_registers_i386_avx_linux): New.
11552 (init_registers_amd64_avx_linux): Likewise.
11553 (xmltarget_i386_linux_no_xml): Likewise.
11554 (xmltarget_amd64_linux_no_xml): Likewise.
11555 (PTRACE_GETREGSET): Likewise.
11556 (PTRACE_SETREGSET): Likewise.
11557 (x86_fill_xstateregset): Likewise.
11558 (x86_store_xstateregset): Likewise.
11559 (use_xml): Likewise.
11560 (x86_linux_update_xmltarget): Likewise.
11561 (x86_linux_process_qsupported): Likewise.
11562 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11563 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11564 init_registers_i386_linux here. Call
11565 x86_linux_update_xmltarget.
11566 (the_low_target): Add x86_linux_process_qsupported.
11567
11568 * server.c (handle_query): Call target_process_qsupported.
11569
11570 * target.h (target_ops): Add process_qsupported.
11571 (target_process_qsupported): New.
11572
fc7238bb
PA
115732010-04-03 Pedro Alves <pedro@codesourcery.com>
11574
11575 * inferiors.c (add_thread): Set last_status kind to
11576 TARGET_WAITKIND_IGNORE.
11577 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11578 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11579 (linux_wait_1): Move `thread' local definition to block that uses
11580 it. Don't NULL initialize `event_child'.
11581 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11582 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11583 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11584
bdabb078
PA
115852010-04-01 Pedro Alves <pedro@codesourcery.com>
11586
11587 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11588 an extended waitstatus, or by a watchpoint.
11589 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11590 thread was stepping or has been stopped by a watchpoint.
11591
d3bbe7a0
PA
115922010-04-01 Pedro Alves <pedro@codesourcery.com>
11593
11594 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11595 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11596 of another, then delete the previous, and validate all
11597 breakpoints.
11598 (validate_inserted_breakpoint): New.
11599 (delete_disabled_breakpoints): New.
11600 (validate_breakpoints): New.
11601 (check_mem_read): Validate breakpoints before trusting their
11602 shadow. Delete disabled breakpoints.
11603 (check_mem_write): Validate breakpoints before trusting they
11604 should be inserted. Delete disabled breakpoints.
11605 * mem-break.h (validate_breakpoints):
11606 * server.c (handle_query): Validate breakpoints when we see a
11607 qSymbol query.
11608
8b07ae33
PA
116092010-04-01 Pedro Alves <pedro@codesourcery.com>
11610
11611 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11612 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11613 if we could tell there's a GDB breakpoint at stop_pc.
11614 (need_step_over_p): Don't do a step over if we find a GDB
11615 breakpoint at the resume PC.
11616
11617 * mem-break.c (struct raw_breakpoint): New.
11618 (enum bkpt_type): New type `gdb_breakpoint'.
11619 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11620 fields. New field `raw'.
11621 (find_raw_breakpoint_at): New.
11622 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11623 breakpoint instead.
11624 (set_breakpoint_at): Adjust.
11625 (delete_raw_breakpoint): New.
11626 (release_breakpoint): New.
11627 (delete_breakpoint): Rename to...
11628 (delete_breakpoint_1): ... this. Add proc parameter. Use
11629 release_breakpoint. Return ENOENT.
11630 (delete_breakpoint): Reimplement.
11631 (find_breakpoint_at): Delete.
11632 (find_gdb_breakpoint_at): New.
11633 (delete_breakpoint_at): Delete.
11634 (set_gdb_breakpoint_at): New.
11635 (delete_gdb_breakpoint_at): New.
11636 (gdb_breakpoint_here): New.
11637 (set_reinsert_breakpoint): Use release_breakpoint.
11638 (uninsert_breakpoint): Rename to ...
11639 (uninsert_raw_breakpoint): ... this.
11640 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11641 (reinsert_raw_breakpoint): Change parameter type to
11642 raw_breakpoint.
11643 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11644 instead.
11645 (check_breakpoints): Adjust. Use release_breakpoint.
11646 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11647 (breakpoint_inserted_here): Ditto.
11648 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11649 Don't trust the breakpoint's shadow if it is not inserted.
11650 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11651 (delete_all_breakpoints): Adjust.
11652 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11653 use delete_breakpoint_1.
11654
11655 * mem-break.h (breakpoints_supported): Delete declaration.
11656 (set_gdb_breakpoint_at): Declare.
11657 (gdb_breakpoint_here): Declare.
11658 (delete_breakpoint_at): Delete.
11659 (delete_gdb_breakpoint_at): Declare.
11660
11661 * server.h (struct raw_breakpoint): Forward declare.
11662 (struct process_info): New field `raw_breakpoints'.
11663
11664 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11665 breakpoints.
11666
6bf5e0ba
PA
116672010-03-24 Pedro Alves <pedro@codesourcery.com>
11668
11669 * linux-low.c (status_pending_p_callback): Fix comment.
11670 (linux_wait_for_event_1): Move most of the internal breakpoint
11671 handling from here...
11672 (linux_wait_1): ... to here.
11673 (count_events_callback): New.
11674 (select_singlestep_lwp_callback): New.
11675 (select_event_lwp_callback): New.
11676 (cancel_breakpoints_callback): New.
11677 (select_event_lwp): New.
11678 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11679 priority to all LWPs that have had events that should be reported
11680 to the client. Cancel breakpoints when about to reporting the
11681 event to the client, not while stopping lwps. No longer cancel
11682 finished single-steps here.
11683 (cancel_finished_single_step): Delete.
11684 (cancel_finished_single_steps): Delete.
11685
414a389f
PA
116862010-03-24 Pedro Alves <pedro@codesourcery.com>
11687
11688 * mem-break.c (enum bkpt_type): New.
11689 (struct breakpoint): New field `type'.
11690 (set_breakpoint_at): Change return type to struct breakpoint
11691 pointer. Set type to `other_breakpoint' by default.
11692 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11693 in the breakpoint list.
11694 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11695 (reinsert_breakpoint): Rename to ...
11696 (reinsert_raw_breakpoint): ... this.
11697 (reinsert_breakpoints_at): Adjust.
11698 * mem-break.h (struct breakpoint): Declare.
11699 (set_breakpoint_at): Change return type to struct breakpoint
11700 pointer.
11701
2280c721
PA
117022010-03-24 Pedro Alves <pedro@codesourcery.com>
11703
11704 * server.c (handle_query): Assign, not compare.
11705
d50171e4
PA
117062010-03-24 Pedro Alves <pedro@codesourcery.com>
11707
11708 Teach linux gdbserver to step-over-breakpoints.
11709
11710 * linux-low.c (can_hardware_single_step): New.
11711 (supports_breakpoints): New.
11712 (handle_extended_wait): If stopping threads, read the stop pc of
11713 the new cloned LWP.
11714 (get_pc): New.
11715 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11716 low target doesn't support retrieving the PC.
11717 (add_lwp): Set last_resume_kind to resume_continue.
11718 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11719 (linux_attach): Don't clear stop_expected. Set the lwp's
11720 last_resume_kind to resume_stop.
11721 (linux_detach_one_lwp): Don't check for removed breakpoints.
11722 (check_removed_breakpoint): Delete.
11723 (status_pending_p): Rename to ...
11724 (status_pending_p_callback): ... this. Don't check for removed
11725 breakpoints. Don't consider threads that are stopped from GDB's
11726 perspective.
11727 (linux_wait_for_lwp): Always read the stop_pc here.
11728 (cancel_breakpoint): New.
11729 (step_over_bkpt): New global.
11730 (linux_wait_for_event_1): Implement stepping over breakpoints.
11731 (gdb_wants_lwp_stopped): New.
11732 (gdb_wants_all_stopped): New.
11733 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11734 single-step traps here. Store the thread's last reported target
11735 wait status.
11736 (send_sigstop): Don't clear stop_expected. Always set it,
11737 instead.
11738 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11739 (cancel_finished_single_step): New.
11740 (cancel_finished_single_steps): New.
11741 (wait_for_sigstop): Don't cancel finished single-step traps here.
11742 (linux_resume_one_lwp): Don't check for removed breakpoints.
11743 Don't set `step' on non-hardware step archs.
11744 (linux_set_resume_request): Ignore resume_stop requests if already
11745 stopping or stopped. Set the lwp's last_resume_kind.
11746 (resume_status_pending_p): Don't check for removed breakpoints.
11747 (need_step_over_p): New.
11748 (start_step_over): New.
11749 (finish_step_over): New.
11750 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11751 requests. Clear the thread's last reported target waitstatus.
11752 Don't use the `suspended' flag. Don't consider pending breakpoints.
11753 (linux_resume): Start a step-over if necessary.
11754 (proceed_one_lwp): New.
11755 (proceed_all_lwps): New.
11756 (unstop_all_lwps): New.
11757 * linux-low.h (struct lwp_info): Rewrite comment for the
11758 `suspended' flag. Add the `stop_pc' field. Delete the
11759 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11760 Add `'last_resume_kind' and `need_step_over' fields.
11761 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11762 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11763 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11764 (set_raw_breakpoint_at): New.
11765 (set_breakpoint_at): Rewrite to use it.
11766 (reinsert_breakpoint_handler): Delete.
11767 (set_reinsert_breakpoint): New.
11768 (reinsert_breakpoint_by_bp): Delete.
11769 (delete_reinsert_breakpoints): New.
11770 (uninsert_breakpoint): Rewrite.
11771 (uninsert_breakpoints_at): New.
11772 (reinsert_breakpoint): Rewrite.
11773 (reinsert_breakpoints_at): New.
11774 (check_breakpoints): Rewrite.
11775 (breakpoint_here): New.
11776 (breakpoint_inserted_here): New.
11777 (check_mem_read): Adjust.
11778 * mem-break.h (breakpoints_supported, breakpoint_here)
11779 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11780 (reinsert_breakpoint_by_bp): Delete declaration.
11781 (delete_reinsert_breakpoints): Declare.
11782 (reinsert_breakpoint): Delete declaration.
11783 (reinsert_breakpoints_at): Declare.
11784 (uninsert_breakpoint): Delete declaration.
11785 (uninsert_breakpoints_at): Declare.
11786 (check_breakpoints): Adjust prototype.
11787 * server.h: Adjust include order.
11788 (struct thread_info): Declare here. Add a `last_status' field.
11789
30ba68cb
MS
117902010-03-23 Michael Snyder <msnyder@vmware.com>
11791
11792 * server.c (crc32): New function.
11793 (handle_query): Add handling for 'qCRC:' request.
11794
b9a881c2
PA
117952010-03-23 Pedro Alves <pedro@codesourcery.com>
11796
11797 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11798 lwp had been stopped by a watchpoint.
11799
e92d13d5
PA
118002010-03-16 Pedro Alves <pedro@codesourcery.com>
11801
11802 * server.h (internal_error): Declare.
11803 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11804 * utils.c (internal_error): New function.
11805
64daa791
AS
118062010-03-15 Andreas Schwab <schwab@redhat.com>
11807
11808 * configure.srv: Fix typo setting srv_regobj.
11809
f52cd8cd
PA
118102010-03-15 Pedro Alves <pedro@codesourcery.com>
11811
11812 * linux-low.c (fetch_register): Avoid passing a non string literal
11813 format to `error'.
11814 (usr_store_inferior_registers): Ditto.
11815
93ae6fdc
PA
118162010-03-14 Pedro Alves <pedro@codesourcery.com>
11817
11818 * linux-low.c (linux_write_memory): Bail out early if peeking
11819 memory failed.
11820
c3adc08c
PA
118212010-03-14 Pedro Alves <pedro@codesourcery.com>
11822
11823 * linux-low.h (struct lwp_info): New fields
11824 `stopped_by_watchpoint' and `stopped_data_address'.
11825 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11826 here, and cache them in the lwp object.
11827 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11828 directly.
11829 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11830 field.
11831 (linux_stopped_by_watchpoint): Rewrite.
11832 (linux_stopped_data_address): Rewrite.
11833
bce522a2
PA
118342010-03-06 Simo Melenius <simo.melenius@iki.fi>
11835
11836 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11837 switching the current inferior, not before.
11838
90884b2b
L
118392010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11840
11841 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11842 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11843 i386-linux.c and amd64-linux.c.
11844 (reg-i386.o): Removed.
11845 (reg-i386.c): Likewise.
11846 (reg-i386-linux.o): Likewise.
11847 (reg-i386-linux.c): Likewise.
11848 (reg-x86-64.o): Likewise.
11849 (reg-x86-64.c): Likewise.
11850 (reg-x86-64-linux.o): Likewise.
11851 (reg-x86-64-linux.c): Likewise.
11852 (i386.o): New.
11853 (i386.c): Likewise.
11854 (i386-linux.o): Likewise.
11855 (i386-linux.c): Likewise.
11856 (amd64.o): Likewise.
11857 (amd64.c): Likewise.
11858 (amd64-linux.o): Likewise.
11859 (amd64-linux.c): Likewise.
11860
11861 * configure.srv (srv_i386_regobj): New.
11862 (srv_i386_linux_regobj): Likewise.
11863 (srv_amd64_regobj): Likewise.
11864 (srv_amd64_linux_regobj): Likewise.
11865 (srv_i386_32bit_xmlfiles): Likewise.
11866 (srv_i386_64bit_xmlfiles): Likewise.
11867 (srv_i386_xmlfiles): Likewise.
11868 (srv_amd64_xmlfiles): Likewise.
11869 (srv_i386_linux_xmlfiles): Likewise.
11870 (srv_amd64_linux_xmlfiles): Likewise.
11871 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11872 srv_xmlfiles to $srv_i386_xmlfiles.
11873 (i[34567]86-*-mingw32ce*): Likewise.
11874 (i[34567]86-*-mingw*): Likewise.
11875 (i[34567]86-*-nto*): Likewise.
11876 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11877 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11878 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11879 (x86_64-*-linux*): Likewise.
11880
11881 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11882 (init_registers_amd64_linux): New.
11883 (x86_arch_setup): Replace init_registers_x86_64_linux with
11884 init_registers_amd64_linux.
11885
193f13e6
MK
118862010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11887
11888 * configure.ac: Check for libdl. If it is not available link against
11889 static libthread_db.
11890 * configure: Regenerate.
11891
85d721b8
PA
118922010-02-22 Pedro Alves <pedro@codesourcery.com>
11893
11894 PR9605
11895
11896 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11897 handing a read watchpoint.
11898 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11899
6076632b
DE
119002010-02-12 Doug Evans <dje@google.com>
11901
11902 * linux-low.c (linux_supports_tracefork_flag): Document.
11903 (linux_look_up_symbols): Add comment.
11904
3327ccf7
L
119052010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11906
11907 * regcache.c (supply_register): Clear regcache if buf is NULL.
11908
0718675c 119092010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 11910 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
11911
11912 * inferiors.c (find_inferior): Add function documentation.
11913 (unloaded_dll): Handle the case where the unloaded dll has not
11914 been previously registered in the dll list.
11915
177321bd
DJ
119162010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11917
11918 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11919 (thumb2_breakpoint): New.
11920 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11921
2b009048
DJ
119222010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11923
11924 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11925 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11926 breakpoints.
11927
3be029c7
PA
119282010-01-21 Pedro Alves <pedro@codesourcery.com>
11929
11930 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11931
18f5de3b
JK
119322010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11933
11934 * linux-s390-low.c (s390_collect_ptrace_register)
11935 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11936
3743bb4f
DE
119372010-01-21 Doug Evans <dje@google.com>
11938
14ce3065
DE
11939 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11940 (PTRACE_ARG4_TYPE): New macro.
11941 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11942 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11943 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11944 (usr_store_inferior_registers): Ditto.
11945 (linux_read_memory, linux_write_memory): Ditto.
11946 (linux_test_for_tracefork): Ditto.
11947
3743bb4f
DE
11948 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11949 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11950
8b315be5
PA
119512010-01-21 Pedro Alves <pedro@codesourcery.com>
11952
11953 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11954 target.
11955
85492558
PA
119562010-01-21 Pedro Alves <pedro@codesourcery.com>
11957
11958 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11959 prototype to take a regcache. Adjust.
11960
442ea881
PA
119612010-01-20 Pedro Alves <pedro@codesourcery.com>
11962
11963 * regcache.h (struct thread_info): Forward declare.
11964 (struct regcache): New.
11965 (new_register_cache): Adjust prototype.
11966 (get_thread_regcache): Declare.
11967 (free_register_cache): Adjust prototype.
11968 (registers_to_string, registers_from_string): Ditto.
11969 (supply_register, supply_register_by_name, collect_register)
11970 (collect_register_as_string, collect_register_by_name): Ditto.
11971 * regcache.c (struct inferior_regcache_data): Delete.
11972 (get_regcache): Rename to ...
11973 (get_thread_regcache): ... this. Adjust. Switch inferior before
11974 fetching registers.
11975 (regcache_invalidate_one): Adjust.
11976 (regcache_invalidate): Fix prototype.
11977 (new_register_cache): Return the new register cache.
11978 (free_register_cache): Change prototype.
11979 (realloc_register_cache): Adjust.
11980 (registers_to_string): Change prototype to take a regcache. Adjust.
11981 (registers_from_string): Ditto.
11982 (register_data): Ditto.
11983 (supply_register): Ditto.
11984 (supply_register_by_name): Ditto.
11985 (collect_register): Ditto.
11986 (collect_register_as_string): Ditto.
11987 (collect_register_by_name): Ditto.
11988 * server.c (process_serial_event): Adjust.
11989 * linux-low.h (regset_fill_func, regset_store_func): Change
11990 prototype.
11991 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11992 Change prototype.
11993 * linux-low.c (get_stop_pc): Adjust.
11994 (check_removed_breakpoint): Adjust.
11995 (linux_wait_for_event): Adjust.
11996 (linux_resume_one_lwp): Adjust.
11997 (fetch_register): Add regcache parameter. Adjust.
11998 (usr_store_inferior_registers): Ditto.
11999 (regsets_fetch_inferior_registers): Ditto.
12000 (regsets_store_inferior_registers): Ditto.
12001 (linux_fetch_registers, linux_store_registers): Ditto.
12002 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12003 regcache. Adjust.
43aaf8b6
PA
12004 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12005 Ditto.
442ea881
PA
12006 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12007 prototype to take a regcache.
12008 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12009 * remote-utils.c (convert_ascii_to_int, outreg)
12010 (prepare_resume_reply): Change prototype to take a regcache.
12011 Adjust.
12012 * target.h (struct target_ops) <fetch_registers, store_registers>:
12013 Change prototype to take a regcache.
12014 (fetch_inferior_registers, store_inferior_registers): Change
12015 prototype to take a regcache. Adjust.
12016 * proc-service.c (ps_lgetregs): Adjust.
12017 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12018 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12019 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12020 take a regcache. Adjust.
12021 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12022 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12023 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12024 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12025 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12026 (cris_cannot_fetch_register):
12027 (cris_breakpoint_at): Change prototype to take a regcache.
12028 Adjust.
12029 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12030 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12031 to take a regcache. Adjust.
12032 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12033 Adjust.
12034 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12035 take a regcache. Adjust.
12036 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12037 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12038 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12039 * linux-mips-low.c (mips_get_pc):
12040 (mips_set_pc): Change prototype to take a regcache. Adjust.
12041 (mips_reinsert_addr): Adjust.
12042 (mips_collect_register): Change prototype to take a regcache.
12043 Adjust.
12044 (mips_supply_register):
12045 (mips_collect_register_32bit, mips_supply_register_32bit)
12046 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12047 (mips_store_fpregset): Ditto.
43aaf8b6
PA
12048 * linux-ppc-low.c (ppc_supply_ptrace_register)
12049 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
12050 (parse_spufs_run): Adjust.
12051 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12052 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12053 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12054 take a regcache. Adjust.
12055 * linux-s390-low.c (s390_collect_ptrace_register)
12056 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12057 (s390_set_pc): Change prototype to take a regcache. Adjust.
12058 (s390_arch_setup): Adjust.
12059 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12060 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12061 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12062 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12063 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12064 regcache. Adjust.
12065 (sparc_breakpoint_at): Adjust.
12066 * linux-xtensa-low.c (xtensa_fill_gregset):
12067 (xtensa_store_gregset):
12068 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12069 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12070 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12071 prototype to take a regcache. Adjust.
12072 * win32-arm-low.c (arm_fetch_inferior_register)
12073 (arm_store_inferior_register): Change prototype to take a
12074 regcache. Adjust.
12075 * win32-i386-low.c (i386_fetch_inferior_register)
12076 (i386_store_inferior_register): Change prototype to take a
12077 regcache. Adjust.
12078 * win32-low.c (child_fetch_inferior_registers)
12079 (child_store_inferior_registers): Change prototype to take a
12080 regcache. Adjust.
12081 (win32_wait): Adjust.
12082 (win32_fetch_inferior_registers): Change prototype to take a
12083 regcache. Adjust.
12084 (win32_store_inferior_registers): Adjust.
12085 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12086 store_inferior_register>: Change prototype to take a regcache.
12087
60c3d7b0
DE
120882010-01-20 Doug Evans <dje@google.com>
12089
12090 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12091 #ifdef.
12092 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 12093 (W_STOPCODE): Provide definition if missing.
60c3d7b0 12094
dc146f7c
VP
120952010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12096
12097 * linux-low.c (linux_core_of_thread): New.
12098 (compare_ints, show_process, list_threads): New.
12099 (linux_qxfer_osdata): Report threads and cores.
12100 (linux_target_op): Register linux_core_of_thread.
12101 * remote-utils.c (prepare_resume_reply): Report the core.
12102 (buffer_xml_printf): Support %d specifier.
12103 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12104 New.
12105 (handle_query): Handle qXfer:threads. Announce availability
12106 thereof.
12107 * target.h (struct target_ops): New field core_of_thread.
12108
7803799a
UW
121092010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12110
12111 * Makefile.in (clean): Remove new generated files.
12112 (reg-s390.o, reg-s390.c): Remove rules.
12113 (reg-s390x.o, reg-s390x.c): Likewise.
12114 (s390-linux32.o, s390-linux32.c): Add rules.
12115 (s390-linux64.o, s390-linux64.c): Likewise.
12116 (s390x-linux64.o, s390x-linux64.c): Likewise.
12117 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12118 * linux-s390-low.c: Include <elf.h>.
12119 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12120 (init_registers_s390): Remove prototype.
12121 (init_registers_s390x): Likewise.
12122 (init_registers_s390_linux32): Add prototype.
12123 (init_registers_s390_linux64): Likewise.
12124 (init_registers_s390x_linux64): Likewise.
12125 (s390_num_regs_3264): New define.
12126 (s390_regmap_3264): New global variable.
12127 (s390_cannot_fetch_register): Remove obsolete check.
12128 (s390_cannot_store_register): Likewise.
12129 (s390_collect_ptrace_register): Handle upper/lower register halves.
12130 (s390_supply_ptrace_register): Likewise.
12131 (s390_fill_gregset): Update to register number changes.
12132 (s390_get_hwcap): New routine.
12133 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12134 Install appropriate regmap and register set.
12135
6e7ffa39
JB
121362010-01-01 Joel Brobecker <brobecker@adacore.com>
12137
12138 * server.c (gdbserver_version): Update copyright year to 2010.
12139 * gdbreplay.c (gdbreplay_version): Likewise.
12140
957f3f49
DE
121412009-12-28 Doug Evans <dje@google.com>
12142
12143 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12144 elf/external.h. Include <elf.h> instead but only if necessary.
12145
ca5c370d
PA
121462009-12-28 Pedro Alves <pedro@codesourcery.com>
12147
12148 * linux-low.c (linux_remove_process): Remove `detaching'
12149 parameter. Don't release/detach from thread_db here.
12150 (linux_kill): Release/detach from thread_db here, ...
12151 (linux_detach): ... and here, before actually detaching.
12152 (linux_wait_1): ... and here, when a process exits.
12153 * thread-db.c (any_thread_of): New.
12154 (thread_db_free): Switch the current inferior to a thread of the
12155 passed in process.
12156
4ee62156
DE
121572009-12-21 Doug Evans <dje@google.com>
12158
d90e6a88
DE
12159 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12160
c5f62d5f
DE
12161 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12162 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12163 warning ifndef __NR_tkill. Move setting of errno there too.
12164 Delete unnecessary resetting of errno after syscall.
12165 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12166
10e86dd7
DE
12167 * configure.ac: Check for dladdr.
12168 * config.in: Regenerate.
12169 * configure: Regenerate.
12170 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12171 (try_thread_db_load): Update.
12172
4ee62156
DE
12173 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12174
00f515da
DE
121752009-12-18 Doug Evans <dje@google.com>
12176
e9464885
DE
12177 * event-loop.c: Include unistd.h if it exists.
12178
07d4f67e
DE
12179 * linux-low.c (my_waitpid): Move definition away from being in
12180 between linux_tracefork_child/linux_test_for_tracefork.
12181
00f515da
DE
12182 * gdb_proc_service.h (psaddr_t): Fix type.
12183 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12184 signature to match glibc.
12185
1de1badb
DE
121862009-12-16 Doug Evans <dje@google.com>
12187
12188 * linux-low.c (linux_read_memory): Fix argument to read.
12189
aeeb81d1
PA
121902009-11-26 Pedro Alves <pedro@codesourcery.com>
12191
12192 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12193 events, don't leave current_inferior pointing at null.
12194
10357975
PA
121952009-11-26 Pedro Alves <pedro@codesourcery.com>
12196
12197 * win32-low.c (LOG): Delete.
12198 (OUTMSG): Output to stderr.
12199 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12200 on compile time LOG macro.
12201 (win32_wait): Fix debug output.
12202
cf6e3471
PA
122032009-11-26 Pedro Alves <pedro@codesourcery.com>
12204
12205 * win32-low.c (win32_add_one_solib): If the dll name is
12206 "ntdll.dll", prepend the system directory to the dll path.
12207
0c85e18e
MK
122082009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12209
12210 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12211
9ac544ce 122122009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 12213 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
12214
12215 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12216 * configure.ac: Check for __mcoldfire__ and set
12217 gdb_cv_m68k_is_coldfire.
12218 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12219 reg-cf.o and reg-m68k.o.
12220 * configure: Regenerated.
12221
fd7dd3e6
PA
122222009-11-16 Pedro Alves <pedro@codesourcery.com>
12223
12224 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12225 Pass it to thread_db_free.
12226 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12227 proper `detaching' argument to linux_remove_process.
12228 * linux-low.h (thread_db_free): Add `detaching' parameter.
12229 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12230 to thread_db_free.
12231 (thread_db_free): Add `detaching' parameter. Only
12232 call td_ta_clear_event if detaching from process.
12233
75aa492e
MK
122342009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12235
12236 * thread-db.c (thread_db_free): Fix typo.
12237
21e1bee4
PP
122382009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12239
12240 PR gdb/10838
12241 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12242
8838b45e
NS
122432009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12244
12245 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12246 with an i686 compiler.
12247 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12248 needed.
12249 * configure: Rebuilt.
12250
8a35fb51
SL
122512009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12252
12253 PR gdb/10783
12254
12255 * server.c (handle_search_memory_1): Correct read_addr initialization
12256 in loop for searching subsequent chunks.
12257
96f15937
PP
122582009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12259
12260 * configure.ac: New --with-libthread-db option.
12261 * thread-db.c: Allow direct dependence on libthread_db.
12262 (thread_db_free): Adjust.
12263 * config.in: Regenerate.
12264 * configure: Likewise.
889bf7c5 12265
5f7d1694
PP
122662009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12267
12268 PR gdb/10757
12269 * thread-db.c (attach_thread): New function.
12270 (maybe_attach_thread): Return success/failure.
12271 (find_new_threads_callback): Adjust.
889bf7c5
PA
12272 (thread_db_find_new_threads): Loop until no new threads.
12273
88e3b899
PA
122742009-10-13 Pedro Alves <pedro@codesourcery.com>
12275
12276 * proc-service.c (ps_lgetregs): Formatting.
12277
cdbfd419
PP
122782009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12279
12280 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12281 * configure.ac: Adjust.
12282 * linux-low.h (struct process_info_private): Move members to struct
12283 thread_db.
12284 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12285 * linux-low.c (linux_remove_process): Adjust.
12286 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12287 * server.c (handle_query): Move code ...
12288 (handle_monitor_command): ... here. New function.
12289 * target.h (struct target_ops): New member.
12290 * thread-db.c (struct thread_db): New.
12291 (libthread_db_search_path): New variable.
12292 (thread_db_create_event, thread_db_enable_reporting)
12293 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12294 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12295 (try_thread_db_load_1, dladdr_to_soname): New functions.
12296 (try_thread_db_load, thread_db_load_search): New functions.
12297 (thread_db_init): Search for libthread_db.
12298 (thread_db_free): New function.
12299 (thread_db_handle_monitor_command): Likewise.
12300 * config.in: Regenerate.
12301 * configure: Regenerate.
889bf7c5 12302
4168d2d6
UW
123032009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12304
12305 * spu-low.c (spu_kill): Wait for inferior to terminate.
12306 Call clear_inferiors.
12307 (spu_detach): Call clear_inferiors.
12308
81ecdfbb
RW
123092009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12310
12311 * aclocal.m4: Regenerate.
12312 * config.in: Likewise.
12313 * configure: Likewise.
12314
0b9ff2c0
UW
123152009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12316
12317 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12318 (parse_spufs_run): New function.
12319 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12320 (ppc_breakpoint_at): Handle SPU breakpoints.
12321
efcbbd14
UW
123222009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12323
12324 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12325 (SPUFS_MAGIC): Define.
12326 (spu_enumerate_spu_ids): New function.
12327 (linux_qxfer_spu): New function.
12328 (linux_target_ops): Install linux_qxfer_spu.
12329
f4d9bade
UW
123302009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12331
12332 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12333 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12334 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12335 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12336 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12337 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12338 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12339 (init_registers_powerpc_cell32l): Add prototype.
12340 (init_registers_powerpc_cell64l): Likewise.
12341 (ppc_arch_setup): Detect Cell/B.E. architecture.
12342
96e946ca
RW
123432009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12344
12345 * Makefile.in (datarootdir): New variable.
12346
58d6951d
DJ
123472009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12348
12349 * linux-low.c (linux_write_memory): Update debugging output.
12350 * Makefile.in (clean): Add new descriptions.
12351 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12352 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12353 * configure.srv: Add new files for arm*-*-linux*.
12354 * linux-arm-low.c: Add new declarations.
12355 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12356 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12357 (HWCAP_VFPv3D16): New.
12358 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12359 instead of __IWMMXT__.
12360 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12361 (arm_arch_setup): New.
12362 (target_regsets): Remove #ifdef. Add VFP regset.
12363 (the_low_target): Use arm_arch_setup.
12364
12b42a12
DJ
123652009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12366
12367 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12368 the main thread again.
12369
ac8c974e
AR
123702009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12371
12372 Adding Neutrino gdbserver.
12373 * configure: Regenerated.
12374 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12375 * configure.srv (i[34567]86-*-nto*): New target.
12376 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12377 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12378 (nto_comctrl) [__QNX__]: New function.
12379 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12380
4424e0c3 123812009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
12382
12383 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12384 srv_tgtobj.
12385
912cf4ba
PA
123862009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12387 Pedro Alves <pedro@codesourcery.com>
12388
12389 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12390 don't support CONTEXT_EXTENDED_REGISTERS.
12391 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12392 (the_low_target): Install them.
12393 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12394 failing with ERROR_PIPE_NOT_CONNECTED.
12395
aa5ca48f
DE
123962009-06-30 Doug Evans <dje@google.com>
12397 Pierre Muller <muller@ics.u-strasbg.fr>
12398
12399 Add h/w watchpoint support to x86-linux, win32-i386.
12400 * Makefile.in (SFILES): Add i386-low.c
12401 (i386_low_h): Define.
12402 (i386-low.o): Add dependencies.
12403 (linux-x86-low.o): Add i386-low.h dependency.
12404 (win32-i386-low.o): Ditto.
12405 * i386-low.c: New file.
12406 * i386-low.h: New file.
12407 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12408 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12409 * linux-low.c (linux_add_process): Initialize arch_private.
12410 (linux_remove_process): Free arch_private.
12411 (add_lwp): Initialize arch_private.
12412 (delete_lwp): Free arch_private.
12413 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12414 provided.
12415 * linux-low.h (process_info_private): New member arch_private.
12416 (lwp_info): New member arch_private.
12417 (linux_target_ops): New members new_process, new_thread,
12418 prepare_to_resume.
12419 (ptid_of): New macro.
12420 * linux-x86-low.c: Include stddef.h, i386-low.h.
12421 (arch_process_info): New struct.
12422 (arch_lwp_info): New struct.
12423 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12424 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12425 (i386_dr_low_get_status): New function.
12426 (x86_insert_point, x86_remove_point): New functions.
12427 (x86_stopped_by_watchpoint): New function.
12428 (x86_stopped_data_address): New function.
12429 (x86_linux_new_process, x86_linux_new_thread): New functions.
12430 (x86_linux_prepare_to_resume): New function.
12431 (the_low_target): Add entries for insert_point, remove_point,
12432 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12433 prepare_to_resume.
12434 * server.c (debug_hw_points): New global.
12435 (monitor_show_help): Document set debug-hw-points.
12436 (handle_query): Process "set debug-hw-points".
12437 * server.h (debug_hw_points): Declare.
12438 (paddress): Declare.
12439 * utils.c (NUMCELLS, CELLSIZE): New macros.
12440 (get_sell, xsnprintf, paddress): New functions.
12441 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12442 remove_point, stopped_by_watchpoint, stopped_data_address.
12443 * win32-i386-low.c: Include i386-low.h.
12444 (debug_reg_state): Replaces dr.
12445 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12446 (i386_dr_low_get_status): New function.
12447 (i386_insert_point, i386_remove_point): New functions.
12448 (i386_stopped_by_watchpoint): New function.
12449 (i386_stopped_data_address): New function.
12450 (i386_initial_stuff): Update.
12451 (get_thread_context,set_thread_context,i386_thread_added): Update.
12452 (the_low_target): Add entries for insert_point,
12453 remove_point, stopped_by_watchpoint, stopped_data_address.
12454 * win32-low.c (win32_insert_watchpoint): New function.
12455 (win32_remove_watchpoint): New function.
12456 (win32_stopped_by_watchpoint): New function.
12457 (win32_stopped_data_address): New function.
12458 (win32_target_ops): Add entries for insert_watchpoint,
12459 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12460 * win32-low.h (win32_target_ops): New members insert_point,
12461 remove_point, stopped_by_watchpoint, stopped_data_address.
12462
d993e290
PA
124632009-06-25 Pedro Alves <pedro@codesourcery.com>
12464
12465 * server.c (process_serial_event): Re-return unsupported, not
12466 error, if the type isn't recognized. Re-allow supporting only
12467 insert or remove packets. Also call require_running for
12468 breakpoints. Add missing break statement to default case. Tidy.
12469 * target.h (struct target_ops): Rename insert_watchpoint to
12470 insert_point, and remove_watchpoint to remove_point.
12471
12472 * linux-low.h (struct linux_target_ops): Likewise.
12473 * linux-low.c (linux_insert_watchpoint): Rename to ...
12474 (linux_insert_point): ... this. Adjust.
12475 (linux_remove_watchpoint): Rename to ...
12476 (linux_remove_point): ... this. Adjust.
12477 (linux_target_ops): Adjust.
12478 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12479 (cris_insert_point): ... this.
12480 (cris_remove_watchpoint): Rename to ...
12481 (cris_remove_point): ... this.
12482 (the_low_target): Adjust.
12483
0f54c268
PM
124842009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12485
12486 * server.c (handle_v_kill): Pass signal_pid to
12487 kill_inferior if multi_process is zero.
12488
c6314022
AR
124892009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12490
12491 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12492 * target.h (target_ops): Comment for *_watchpoint to make it clear
12493 the functions can get types '0' and '1'.
12494
4463ce24
AR
124952009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12496
12497 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12498 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12499 * regcache.c (get_regcache): Likewise.
12500 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12501 * win32-low.c (child_fetch_inferior_registers): Remove check for
12502 regno 0.
12503
cf8fd78b
PA
125042009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12505 Pedro Alves <pedro@codesourcery.com>
12506
12507 * target.h (struct target_ops) <supports_multi_process>: New
12508 callback.
12509 (target_supports_multi_process): New.
12510 * server.c (handle_query): Even if GDB reports support, only
12511 enable multi-process if the target also supports it. Report
12512 multi-process support only if the target backend supports it.
12513 * linux-low.c (linux_supports_multi_process): New function.
12514 (linux_target_ops): Install it as target_supports_multi_process
12515 callback.
12516
47c0c975
DE
125172009-05-24 Doug Evans <dje@google.com>
12518
e09875d4
DE
12519 Global renaming of find_thread_pid to find_thread_ptid.
12520 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12521 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12522 All callers updated.
12523
e27d73f6
DE
12524 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12525 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12526 directly.
12527
47c0c975
DE
12528 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12529 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12530 (linux_resume_one_lwp): Ditto.
12531
2acc282a
DE
125322009-05-23 Doug Evans <dje@google.com>
12533
12534 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12535 from struct inferior_list_entry * to struct lwp_info *.
12536 All callers updated.
12537
9f1036c1
DE
125382009-05-13 Doug Evans <dje@google.com>
12539
12540 * linux-x86-low.c: Don't include assert.h.
12541 (x86_siginfo_fixup): Use fatal, not assert.
12542 (x86_arch_setup): Fix comment.
12543
d0722149
DE
125442009-05-12 Doug Evans <dje@google.com>
12545
12546 Biarch support for i386/amd64 gdbserver.
12547 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12548 Add linux-x86-low.c.
12549 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12550 (linux-x86-low.o): Add.
12551 * linux-x86-64-low.c: Delete.
12552 * linux-i386-low.c: Delete.
12553 * linux-x86-low.c: New file.
12554 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12555 linux-x86-low.o.
12556 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12557 linux-x86-low.o.
12558 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12559 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12560 (linux_child_pid_to_exec_file): New function.
12561 (elf_64_header_p, elf_64_file_p): New functions.
12562 (siginfo_fixup): New function.
12563 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12564 give target a chance to convert layout.
12565 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12566 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12567
fdeb2a12
DE
125682009-05-07 Doug Evans <dje@google.com>
12569
12570 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12571 (regsets_store_inferior_registers): Ditto.
12572
a6dbe5df
PA
125732009-05-06 Pedro Alves <pedro@codesourcery.com>
12574
12575 PR server/10048
12576
12577 * linux-low.c (must_set_ptrace_flags): Delete.
12578 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12579 of the global.
12580 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12581 `lwp->must_set_ptrace_flags' instead.
ba42693b 12582 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
12583 (linux_wait_1): ... not here.
12584
5091eb23
DE
125852009-04-30 Doug Evans <dje@google.com>
12586
9f767825
DE
12587 * inferiors.c (started_inferior_callback): New function.
12588 (attached_inferior_callback): New function.
12589 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12590 * server.c (print_started_pid, print_attached_pid): New functions.
12591 (detach_or_kill_for_exit): New function.
12592 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12593 * server.h (have_started_inferiors_p): Declare.
12594 (have_attached_inferiors_p): Declare.
12595
5091eb23
DE
12596 * inferiors.c (remove_process): Fix memory leak, free process.
12597 * linux-low.c (linux_remove_process): New function.
12598 (linux_kill): Call it instead of remove_process.
12599 (linux_detach, linux_wait_1): Ditto.
12600
155c8968
PA
126012009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12602
12603 * configure.srv: Add x86 Windows CE target.
12604
7fe519cb
UW
126052009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12606
12607 * inferiors.c (get_thread_process): Make global.
12608 * server.h (get_thread_process): Add prototype.
12609 * thread-db.c (find_one_thread): Use get_thread_process
12610 instead of current_process.
12611 (thread_db_get_tls_address): Do not crash if called when
12612 thread layer is not yet initialized.
12613
5472f405
UW
126142009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12615
12616 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12617 * spu-low.c (current_tid): Rename to ...
12618 (current_ptid): ... this.
12619 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12620 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12621 ptid_get_lwp (current_ptid) instead of current_tid.
12622 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12623 instead of current_tid. Use find_process_pid to verify pid
12624 argument is valid. Pass proper argument to remove_process.
12625 (spu_thread_alive): Compare current_ptid instead of current_tid.
12626 (spu_resume): Likewise.
12627
55ac2b99
PA
126282009-04-02 Pedro Alves <pedro@codesourcery.com>
12629
12630 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12631 variable.
12632
95954743
PA
126332009-04-01 Pedro Alves <pedro@codesourcery.com>
12634
12635 Implement the multiprocess extensions, and add linux multiprocess
12636 support.
12637
12638 * server.h (ULONGEST): Declare.
12639 (struct ptid, ptid_t): New.
12640 (minus_one_ptid, null_ptid): Declare.
12641 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12642 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12643 (struct inferior_list_entry): Change `id' type from unsigned from
12644 to ptid_t.
12645 (struct sym_cache, struct breakpoint, struct
12646 process_info_private): Forward declare.
12647 (struct process_info): Declare.
12648 (current_process): Declare.
12649 (all_processes): Declare.
12650 (initialize_inferiors): Declare.
12651 (add_thread): Adjust to use ptid_t.
12652 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12653 (add_process, remove_process, find_thread_pid): Declare.
12654 (find_inferior_id): Adjust to use ptid_t.
12655 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12656 (multi_process): Declare.
12657 (push_event): Adjust to use ptid_t.
12658 (read_ptid, write_ptid): Declare.
12659 (prepare_resume_reply): Adjust to use ptid_t.
12660 (clear_symbol_cache): Declare.
12661 * inferiors.c (all_processes): New.
12662 (null_ptid, minus_one_ptid): New.
12663 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12664 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12665 (add_thread): Change unsigned long to ptid. Remove gdb_id
12666 parameter. Adjust.
12667 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12668 (gdb_id_to_thread): Rename to ...
12669 (find_thread_pid): ... this. Change unsigned long to ptid.
12670 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12671 (loaded_dll, pull_pid_from_list): Adjust.
12672 (add_process, remove_process, find_process_pid)
12673 (get_thread_process, current_process, initialize_inferiors): New.
12674 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12675 (struct target_waitstatus) <related_pid>: Ditto.
12676 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12677 return type to int.
12678 (struct target_ops) <join>: Add `pid' argument.
12679 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12680 (struct target_ops) <wait>: Add `ptid' field. Change return type
12681 to ptid.
12682 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12683 (mywait): Add `ptid' argument. Change return type to ptid_t.
12684 (target_pid_to_str): Declare.
12685 * target.c (set_desired_inferior): Adjust to use ptids.
12686 (mywait): Add new `ptid' argument. Adjust.
12687 (target_pid_to_str): New.
12688 * mem-break.h (free_all_breakpoints): Declare.
12689 * mem-break.c (breakpoints): Delelete.
12690 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12691 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12692 to use per-process breakpoint list.
12693 (free_all_breakpoints): New.
12694 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12695 (symbol_cache, all_symbols_looked_up): Delete.
12696 (hexchars): New.
12697 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12698 read_ptid): New.
12699 (prepare_resume_reply): Change ptid argument's type from unsigned
12700 long to ptid_t. Adjust. Implement W;process and X;process.
12701 (free_sym_cache, clear_symbol_cache): New.
12702 (look_up_one_symbol): Adjust to per-process symbol cache. *
12703 * server.c (cont_thread, general_thread, step_thread): Change type
12704 to ptid_t.
12705 (attached): Delete.
12706 (multi_process): New.
12707 (last_ptid): Change type to ptid_t.
12708 (struct vstop_notif) <ptid>: Change type to ptid_t.
12709 (queue_stop_reply, push_event): Change `ptid' argument's type to
12710 ptid_t.
12711 (discard_queued_stop_replies): Add `pid' argument.
12712 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12713 changes. Don't reference the `attached' global.
12714 (attach_inferior): Adjust to mywait interface changes.
12715 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12716 features. Handle and report "multiprocess+". Handle
12717 "qAttached:PID".
12718 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12719 changes.
12720 (handle_v_kill): New.
12721 (handle_v_stopped): Adjust to use target_pid_to_str.
12722 (handle_v_requests): Allow multiple attaches and runs when
12723 multiprocess extensions are in effect. Handle "vKill".
12724 (myresume): Adjust to use ptids.
12725 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12726 (handle_status): Adjust to discard_queued_stop_replies interface
12727 change.
12728 (first_thread_of, kill_inferior_callback)
12729 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12730 (main): Call initialize_inferiors. Adjust to use ptids, killing
12731 and detaching from all inferiors. Handle multiprocess packet
12732 variants.
12733 * linux-low.h: Include gdb_proc_service.h.
12734 (struct process_info_private): New.
12735 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12736 <lwpid_of>: Use ptid_get_lwp.
12737 (get_lwp_thread): Adjust.
12738 (struct lwp_info): Add `dead' member.
12739 (find_lwp_pid): Declare.
12740 * linux-low.c (thread_db_active): Delete.
12741 (new_inferior): Adjust comment.
12742 (inferior_pid): Delete.
12743 (linux_add_process): New.
12744 (handle_extended_wait): Adjust.
12745 (add_lwp): Change unsigned long to ptid.
12746 (linux_create_inferior): Add process to processes table. Adjust
12747 to use ptids. Don't set new_inferior here.
12748 (linux_attach_lwp): Rename to ...
12749 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12750 it. Adjust to use ptids.
12751 (linux_attach_lwp): New.
12752 (linux_attach): Add process to processes table. Don't set
12753 new_inferior here.
12754 (struct counter): New.
12755 (second_thread_of_pid_p, last_thread_of_process_p): New.
12756 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12757 multiple processes.
12758 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12759 processes. Remove process from process table.
12760 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12761 to multiple processes.
12762 (any_thread_of): New.
12763 (linux_detach): Add `pid' argument, and handle it. Remove process
12764 from processes table.
12765 (linux_join): Add `pid' argument. Handle it.
12766 (linux_thread_alive): Change unsighed long argument to ptid_t.
12767 Consider dead lwps as not being alive.
12768 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12769 threads we're not interested in.
12770 (same_lwp, find_lwp_pid): New.
12771 (linux_wait_for_lwp): Change `pid' argument's type from int to
12772 ptid_t. Adjust.
12773 (linux_wait_for_event): Rename to ...
12774 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12775 from int to ptid_t. Adjust.
12776 (linux_wait_for_event): New.
12777 (linux_wait_1): Add `ptid' argument. Change return type to
12778 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12779 that exit from the process table.
12780 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12781 Adjust.
12782 (mark_lwp_dead): New.
12783 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12784 stopping all threads, mark its main lwp as dead.
12785 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12786 ptids.
12787 (fetch_register, usr_store_inferior_registers)
12788 (regsets_fetch_inferior_registers)
12789 (regsets_store_inferior_registers, linux_read_memory)
12790 (linux_write_memory): Inline `inferior_pid'.
12791 (linux_look_up_symbols): Adjust to use per-process
12792 `thread_db_active'.
12793 (linux_request_interrupt): Adjust to use ptids.
12794 (linux_read_auxv): Inline `inferior_pid'.
12795 (initialize_low): Don't reference thread_db_active.
12796 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12797 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12798 (ps_getpid): Return the pid of the current inferior.
12799 * thread-db.c (proc_handle, thread_agent): Delete.
12800 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12801 per-process data.
12802 (find_one_thread): Change argument type to ptid_t. Adjust to
12803 per-process data.
12804 (maybe_attach_thread): Adjust to per-process data and ptids.
12805 (thread_db_find_new_threads): Ditto.
12806 (thread_db_init): Ditto.
12807 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12808 processes table. Adjust to use ptids.
12809 (spu_kill, spu_detach): Adjust interface. Remove process from
12810 processes table.
12811 (spu_join, spu_thread_alive): Adjust interface.
12812 (spu_wait): Adjust interface. Remove process from processes
12813 table. Adjust to use ptids.
12814 * win32-low.c (current_inferior_tid): Delete.
12815 (current_inferior_ptid): New.
12816 (debug_event_ptid): New.
12817 (thread_rec): Take a ptid. Adjust.
12818 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12819 (child_delete_thread): Ditto.
12820 (do_initial_child_stuff): Add `attached' argument. Add process to
12821 processes table.
12822 (child_fetch_inferior_registers, child_store_inferior_registers):
12823 Adjust.
12824 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12825 (win32_attach): Pass 1 to do_initial_child_stuff.
12826 (win32_kill): Adjust interface. Remove process from processes
12827 table.
12828 (win32_detach): Ditto.
12829 (win32_join): Adjust interface.
12830 (win32_thread_alive): Take a ptid.
12831 (win32_resume): Adjust to use ptids.
12832 (get_child_debug_event): Ditto.
12833 (win32_wait): Adjust interface. Remove exiting process from
12834 processes table.
12835
bd99dc85
PA
128362009-04-01 Pedro Alves <pedro@codesourcery.com>
12837
12838 Non-stop mode support.
12839
12840 * server.h (non_stop): Declare.
12841 (gdb_client_data, handler_func): Declare.
12842 (delete_file_handler, add_file_handler, start_event_loop):
12843 Declare.
12844 (handle_serial_event, handle_target_event, push_event)
12845 (putpkt_notif): Declare.
12846 * target.h (enum resume_kind): New.
12847 (struct thread_resume): Replace `step' field by `kind' field.
12848 (TARGET_WNOHANG): Define.
12849 (struct target_ops) <wait>: Add `options' argument.
12850 <supports_non_stop, async, start_non_stop>: New fields.
12851 (target_supports_non_stop, target_async): New.
12852 (start_non_stop): Declare.
12853 (mywait): Add `options' argument.
12854 * target.c (mywait): Add `options' argument. Print child exit
12855 notifications here.
12856 (start_non_stop): New.
12857 * server.c (non_stop, own_buf, mem_buf): New globals.
12858 (struct vstop_notif): New.
12859 (notif_queue): New global.
12860 (queue_stop_reply, push_event, discard_queued_stop_replies)
12861 (send_next_stop_reply): New.
12862 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12863 interface changes.
12864 (attach_inferior): In non-stop mode, don't wait for the target
12865 here.
12866 (handle_general_set): Handle QNonStop.
12867 (handle_query): When handling qC, return the current general
12868 thread, instead of the first thread of the list.
12869 (handle_query): If the backend supports non-stop mode, include
12870 QNonStop+ in the qSupported query response.
12871 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12872 and non-stop mode.
12873 (handle_v_attach, handle_v_run): Handle non-stop mode.
12874 (handle_v_stopped): New.
12875 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12876 (myresume): Adjust to use resume_kind. Handle non-stop.
12877 (queue_stop_reply_callback): New.
12878 (handle_status): Handle non-stop mode.
12879 (main): Clear non_stop flag on reconnection. Use the event-loop.
12880 Refactor serial protocol handling from here ...
12881 (process_serial_event): ... to this new function. When GDB
12882 selects any thread, select one here. In non-stop mode, wait until
12883 GDB acks all pending events before exiting.
12884 (handle_serial_event, handle_target_event): New.
12885 * remote-utils.c (remote_open): Install remote_desc in the event
12886 loop.
12887 (remote_close): Remove remote_desc from the event loop.
12888 (putpkt_binary): Rename to...
12889 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12890 (putpkt_binary): New as wrapper around putpkt_binary_1.
12891 (putpkt_notif): New.
12892 (prepare_resume_reply): In non-stop mode, don't change the
12893 general_thread.
12894 * event-loop.c: New.
12895 * Makefile.in (OBJ): Add event-loop.o.
12896 (event-loop.o): New rule.
12897
12898 * linux-low.h (pid_of): Moved here.
12899 (lwpid_of): New.
12900 (get_lwp_thread): Use lwpid_of.
12901 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12902 * linux-low.c (pid_of): Delete.
12903 (inferior_pid): Use lwpid_of.
12904 (linux_event_pipe): New.
12905 (target_is_async_p): New.
12906 (delete_lwp): New.
12907 (handle_extended_wait): Use lwpid_of.
12908 (add_lwp): Don't set lwpid field.
12909 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12910 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12911 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12912 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12913 first. Adjust to linux_wait_for_event interface changes. Use
12914 lwpid_of.
12915 (linux_detach): Don't delete the main lwp here.
12916 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12917 (status_pending_p): Don't consider explicitly suspended lwps.
12918 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12919 pointer. Add OPTIONS argument. Change return type to int. Use
12920 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12921 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12922 pointer. Add status pointer argument. Return a pid instead of a
12923 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12924 changes. In non-stop mode, don't switch to a random thread.
12925 (linux_wait): Rename to...
12926 (linux_wait_1): ... this. Add target_options argument, and handle
12927 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12928 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12929 clean exit and signal exit code. Don't stop all threads in
12930 non-stop mode. In all-stop mode, only stop all threads when
12931 reporting a stop to GDB. Handle explicit thread stop requests.
12932 (async_file_flush, async_file_mark): New.
12933 (linux_wait): New.
12934 (send_sigstop): Use lwpid_of.
12935 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12936 interface changes. In non-stop mode, don't switch to a random
12937 thread.
12938 (linux_resume_one_lwp): Use lwpid_of.
12939 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12940 (linux_resume_one_thread): ... this. Handle resume_stop. In
12941 non-stop mode, don't look for pending flag in all threads.
12942 (resume_status_pending_p): Don't consider explicitly suspended
12943 threads.
12944 (my_waitpid): Reimplement. Emulate __WALL.
12945 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12946 Use lwpid_of.
12947 (sigchld_handler, linux_supports_non_stop, linux_async)
12948 (linux_start_non_stop): New.
12949 (linux_target_ops): Register linux_supports_non_stop, linux_async
12950 and linux_start_non_stop.
12951 (initialize_low): Install SIGCHLD handler.
12952 * thread-db.c (thread_db_create_event, find_one_thread)
12953 (thread_db_get_tls_address): Use lwpid_of.
12954 * win32-low.c (win32_detach): Adjust to use resume_kind.
12955 (win32_wait): Add `options' argument.
12956 * spu-low.c (spu_resume): Adjust to use resume_kind.
12957 (spu_wait): Add `options' argument.
12958
5b1c542e
PA
129592009-04-01 Pedro Alves <pedro@codesourcery.com>
12960
12961 Decouple target code from remote protocol.
12962
12963 * target.h (enum target_waitkind): New.
12964 (struct target_waitstatus): New.
12965 (struct target_ops) <wait>: Return an unsigned long. Take a
12966 target_waitstatus pointer instead of a char pointer.
12967 (mywait): Likewise.
12968 * target.c (mywait): Change prototype to return an unsigned long.
12969 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12970 * server.h (thread_from_wait, old_thread_from_wait): Delete
12971 declarations.
12972 (prepare_resume_reply): Change prototype to take a
12973 target_waitstatus.
12974 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12975 (last_status, last_ptid): New.
12976 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12977 pid instead of a signal.
12978 (attach_inferior): Remove "status" and "signal" parameters.
12979 Adjust.
12980 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12981 not as an address.
12982 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12983 (handle_v_requests, myresume): Remove "status" and "signal"
12984 parameters. Adjust.
12985 (handle_status): New.
12986 (main): Delete local `status'. Adjust.
12987 * remote-utils.c: Include target.h.
12988 (prepare_resume_reply): Change prototype to take a
12989 target_waitstatus. Adjust.
12990
12991 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12992 interface.
12993 * spu-low.c (spu_wait): Adjust.
12994 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12995 Delete.
12996 (win32_wait): Adjust.
12997
2bd7c093
PA
129982009-04-01 Pedro Alves <pedro@codesourcery.com>
12999
13000 * target.h (struct thread_resume): Delete leave_stopped member.
13001 (struct target_ops): Add a `n' argument to the `resume' callback.
13002 * server.c (start_inferior): Adjust.
13003 (handle_v_cont, myresume): Adjust.
13004 * linux-low.c (check_removed_breakpoint): Adjust to resume
13005 interface change, and to removed leave_stopped field.
13006 (resume_ptr): Delete.
13007 (struct thread_resume_array): New.
13008 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13009 resume interface change.
13010 (linux_continue_one_thread, linux_queue_one_thread)
13011 (resume_status_pending_p): Check if the resume field is NULL
13012 instead of checking the leave_stopped member.
13013 (linux_resume): Adjust to the target resume interface change.
13014 * spu-low.c (spu_resume): Adjust to the target resume interface
13015 change.
13016 * win32-low.c (win32_detach, win32_resume): Ditto.
13017
c35fafde
PA
130182009-04-01 Pedro Alves <pedro@codesourcery.com>
13019
13020 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13021 flag.
13022 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13023 pending.
13024 (linux_continue_one_thread): Only preserve the stepping flag if
13025 there's a pending breakpoint.
13026
0a59d50b
PA
130272009-03-31 Pedro Alves <pedro@codesourcery.com>
13028
13029 * server.c (main): After the inferior having exited, call
13030 remote_close before exiting gdbserver.
13031
f04c6d38
TJB
130322009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13033
13034 Fix size of FPSCR in Power 7 processors.
13035 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13036 (PPC_FEATURE_HAS_DFP): New #define.
13037 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13038 size of the FPSCR.
13039
78e5cee6
PA
130402009-03-23 Pedro Alves <pedro@codesourcery.com>
13041
13042 * server.c (handle_query) Whitespace and formatting.
13043
1b3f6016
PA
130442009-03-22 Pedro Alves <pedro@codesourcery.com>
13045
13046 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13047 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13048 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13049 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13050 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13051 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13052 Makefile.in, configure.ac: Fix whitespace throughout.
13053 * configure: Regenerate.
13054
a07b2135
PA
130552009-03-22 Pedro Alves <pedro@codesourcery.com>
13056
13057 * inferiors.c (find_inferior): Make it safe for the callback
13058 function to delete the currently iterated inferior.
13059
67cc2626
PA
130602009-03-22 Pedro Alves <pedro@codesourcery.com>
13061
13062 * Makefile.in (linuw_low_h): Move higher.
13063 (thread-db.o): Depend on $(linux_low_h).
13064
54a0b537
PA
130652009-03-17 Pedro Alves <pedro@codesourcery.com>
13066
13067 Rename "process" to "lwp" throughout.
13068
13069 * linux-low.c (all_processes): Rename to...
13070 (all_lwps): ... this.
13071 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13072 (add_process): Rename to ...
13073 (add_lwp): ... this. Adjust.
13074 (linux_create_inferior): Adjust.
13075 (linux_attach_lwp): Adjust.
13076 (linux_attach): Adjust.
13077 (linux_kill_one_process): Rename to ...
13078 (linux_kill_one_lwp): ... this. Adjust.
13079 (linux_kill): Adjust.
13080 (linux_detach_one_process): Rename to ...
13081 (linux_detach_one_lwp): ... this. Adjust.
13082 (linux_detach): Adjust.
13083 (check_removed_breakpoint): Adjust.
13084 (status_pending_p): Adjust.
13085 (linux_wait_for_process): Rename to ...
13086 (linux_wait_for_lwp): ... this. Adjust.
13087 (linux_wait_for_event): Adjust.
13088 (send_sigstop): Adjust.
13089 (wait_for_sigstop): Adjust.
13090 (stop_all_processes): Rename to ...
13091 (stop_all_lwps): ... this.
13092 (linux_resume_one_process): Rename to ...
13093 (linux_resume_one_lwp): ... this. Adjust.
13094 (linux_set_resume_request, linux_continue_one_thread)
13095 (linux_queue_one_thread, resume_status_pending_p)
13096 (usr_store_inferior_registers, regsets_store_inferior_registers)
13097 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13098 Adjust.
13099 * linux-low.h (get_process): Rename to ...
13100 (get_lwp): ... this. Adjust.
13101 (get_thread_process): Rename to ...
13102 (get_thread_lwp): ... this. Adjust.
13103 (get_process_thread): Rename to ...
13104 (get_lwp_thread): ... this. Adjust.
13105 (struct process_info): Rename to ...
13106 (struct lwp_info): ... this.
13107 (all_processes): Rename to ...
13108 (all_lwps): ... this.
13109 * proc-service.c (ps_lgetregs): Adjust.
13110 * thread-db.c (thread_db_create_event, find_one_thread)
13111 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13112
0b16c5cf
PA
131132009-03-14 Pedro Alves <pedro@codesourcery.com>
13114
13115 * server.c (handle_query): Handle "qAttached".
13116
32de4b9d
NS
131172009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13118
13119 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13120 GPLv3, update license URL.
13121
2aecd87f
DE
131222009-03-01 Doug Evans <dje@google.com>
13123
93efd302 13124 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
13125 (server_h): Add gdb_signals.h.
13126 (signals.o): Update.
13127 * server.h (target_signal_from_host,target_signal_to_host_p)
13128 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13129
86b1f9c5
PM
131302009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13131
13132 * remote-utils.c (getpkt): Also generate remote-debug
13133 information if noack_mode is set.
13134
4aa995e1
PA
131352009-02-06 Pedro Alves <pedro@codesourcery.com>
13136
13137 * server.c (handle_query): Report qXfer:siginfo:read and
13138 qXfer:siginfo:write as supported and handle them.
13139 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13140 * linux-low.c (linux_xfer_siginfo): New.
13141 (linux_target_ops): Set it.
13142
62709adf
PA
131432009-01-26 Pedro Alves <pedro@codesourcery.com>
13144
13145 * server.c (gdbserver_usage): Mention --remote-debug.
13146 (main): Accept '--remote-debug' switch.
13147
aef93bd7
DE
131482009-01-18 Doug Evans <dje@google.com>
13149
13150 * regcache.c (new_register_cache): No need to check result of xcalloc.
13151 * server.c (handle_search_memory): Back out calls to xmalloc,
13152 result is checked and error is returned to user upon failure.
13153 (handle_query): Ditto. Add more checks for result of malloc.
13154 (handle_v_cont): Check result of malloc, report error back to
13155 user upon failure.
13156 (handle_v_run): Ditto. Call freeargv.
13157 * server.h (freeargv): Declare.
13158 * utils.c (freeargv): New fn.
13159
54363045
DE
131602009-01-15 Doug Evans <dje@google.com>
13161
f626972c
DE
13162 * gdbreplay.c (perror_with_name): Make arg const char *.
13163 * server.h (target_signal_to_name): Make return type const char *.
0842e787 13164 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 13165 * utils.c (perror_with_name): Make arg const char *.
54363045 13166
18aae699
PA
131672009-01-14 Pedro Alves <pedro@codesourcery.com>
13168
13169 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13170 when handling a EXIT_PROCESS_DEBUG_EVENT.
13171
ff703abe
JB
131722009-01-06 Joel Brobecker <brobecker@adacore.com>
13173
13174 * gdbreplay.c (gdbreplay_version): Update copyright year.
13175 * server.c (gdbserver_version): Likewise.
13176
f21cc1a2 131772009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
13178
13179 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 13180 (handle_extended_wait): Improve comment.
0e21c1ec 13181
bca929d3
DE
131822008-12-13 Doug Evans <dje@google.com>
13183
13184 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13185 * server.h (ATTR_MALLOC): New macro.
13186 (xmalloc,xcalloc,xstrdup): Declare.
13187 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13188 * inferiors.c: Ditto.
13189 * linux-low.c: Ditto.
13190 * mem-break.c: Ditto.
13191 * regcache.c: Ditto.
13192 * remote-utils.c: Ditto.
13193 * server.c: Ditto.
13194 * target.c: Ditto.
13195 * win32-low.c: Ditto.
13196
97438e3f
DE
131972008-12-12 Doug Evans <dje@google.com>
13198
896c7fbb
DE
13199 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13200 in debugging printf.
13201
97438e3f
DE
13202 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13203
e3b886f8
DE
132042008-12-09 Doug Evans <dje@google.com>
13205
13206 * linux-low.h (struct process_info): Delete member tid, unused.
13207 * thread-db.c (find_one_thread): Update.
13208 (maybe_attach_thread): Update.
13209
07e059b5
VP
132102008-12-02 Pedro Alves <pedro@codesourcery.com>
13211
889bf7c5
PA
13212 * target.h (struct target_ops): Add qxfer_osdata member.
13213 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13214 and dirent.h.
13215 (linux_qxfer_osdata): New functions.
13216 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13217 callback.
13218 * server.c (handle_query): Handle "qXfer:osdata:read:".
13219 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13220 (buffer_xml_printf): New functions.
13221 * server.h (struct buffer): New.
13222 (buffer_grow_str, buffer_grow_str0): New macros.
13223 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13224 (buffer_xml_printf): Declare.
07e059b5 13225
4cab47ab
DE
132262008-11-24 Doug Evans <dje@google.com>
13227
13228 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13229
f142445f
DJ
132302008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13231
13232 * server.c (handle_v_run): Always use the supplied argument list.
13233
d0107bb6 132342008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 13235
d0107bb6
BW
13236 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13237 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 13238
2c4ad781
TJB
132392008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13240
13241 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13242 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13243 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13244 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13245 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13246 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13247 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13248 XML target descriptions.
13249 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13250 when inferior is running on an ISA 2.05 or later processor. Add
13251 special case to return offset for full 64-bit slot of FPSCR when
13252 in 32-bits.
13253
dfb64f85
DJ
132542008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13255
13256 * Makefile.in (SFILES, clean): Added sparc64 files.
13257 (reg-sparc64.o, reg-sparc64.c): New.
13258 * configure.srv (sparc*-*-linux*): New configuration.
13259 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13260 syscall arguments for SPARC.
13261 (regsets_store_inferior_registers): Likewise.
13262 * linux-sparc-low.c: New file.
13263
66b6e1dd
DE
132642008-10-21 Doug Evans <dje@google.com>
13265
13266 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13267 (READLINE_DIR,READLINE_DEP): Delete.
13268 (INTERNAL_CFLAGS): Update.
13269 (LINTFLAGS): Update.
13270
9b710a42
PA
132712008-10-10 Pedro Alves <pedro@codesourcery.com>
13272
13273 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13274 whole argv from the last run, not just argv[0].
13275
5822d809
PA
132762008-09-08 Pedro Alves <pedro@codesourcery.com>
13277
13278 * regcache.c (new_register_cache): Return NULL if the register
13279 cache size isn't known yet.
13280 (free_register_cache): Avoid dereferencing a NULL regcache.
13281
74aac56f
DJ
132822008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13283
13284 * configure.srv: Merge MIPS and MIPS64.
13285
400b20f5
MR
132862008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13287
13288 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13289
677c5bb1
LM
132902008-08-18 Luis Machado <luisgpm@br.ibm.com>
13291
13292 * Makefile.in: Add required vsx dependencies.
13293
13294 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13295 Declare init_registers_powerpc_vsx32l.
13296 Declare init_registers_powerpc_vsx64l.
13297 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13298 (ppc_arch_setup): Check for VSX in hwcap.
13299 (ppc_fill_vsxregset): New function.
13300 (ppc_store_vsxregset): New function.
13301 Add new VSX entry in regset_info target_regsets.
13302
13303 * configure.srv: Add new VSX dependencies.
13304
a6f3e723
SL
133052008-08-12 Pedro Alves <pedro@codesourcery.com>
13306
13307 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13308 (remote_open): Set or clear transport_is_reliable.
13309 (putpkt_binary): Don't expect acks in noack mode.
13310 (getpkt): Don't send ack/nac in noack mode.
13311 * server.c (handle_general_set): Handle QStartNoAckMode.
13312 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13313 qSupported.
13314 (main): Reset noack_mode on every connection.
13315 * server.h (noack_mode): Declare.
13316
a417dc56
RW
133172008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13318
13319 * Makefile.in (GDBREPLAY_OBS): New variable.
13320 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13321
3221518c
UW
133222008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13323 Daniel Jacobowitz <dan@codesourcery.com>
13324
13325 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13326 (usr_store_inferior_registers): Likewise.
13327 (regsets_store_inferior_registers): Likewise.
13328
ec56be1b
PA
133292008-07-31 Rolf Jansen <rj@surtec.com>
13330 Pedro Alves <pedro@codesourcery.com>
13331
13332 * configure.ac: Check for memmem declaration.
13333 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13334 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13335 (disable_packet_qfThreadInfo): Unconditionally compile.
13336 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13337 * configure, config.in: Regenerate.
13338
2fe5e3ff
DE
133392008-07-28 Doug Kwan <dougkwan@google.com>
13340
13341 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13342 (linux_write_memory): Remove declaration of errno.
13343
836acd6d
UW
133442008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13345
13346 * linux-low.c (handle_extended_wait): Do not use "status"
13347 variable uninitialized.
13348
aeba519e
PA
133492008-07-07 Pedro Alves <pedro@codesourcery.com>
13350
13351 * server.c (handle_v_attach): Inhibit reporting dll changes.
13352
db42f210
PA
133532008-06-27 Pedro Alves <pedro@codesourcery.com>
13354
13355 * remote-utils.c (prepare_resume_reply): If requested, don't
13356 output "thread:TID" in the T stop reply.
13357
13358 * server.c (disable_packet_vCont, disable_packet_Tthread)
13359 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13360 (handle_query): If requested, disable support for qC, qfThreadInfo
13361 and qsThreadInfo.
13362 (handle_v_requests): If requested, disable support for vCont.
13363 (gdbserver_show_disableable): New.
13364 (main): Handle --disable-packet and --disable-packet=LIST.
13365
13366 * server.h (disable_packet_vCont, disable_packet_Tthread)
13367 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13368
8e4c5421
CD
133692008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13370
13371 * server.c (gdbserver_usage): Mention --version.
13372
6e23a804
DJ
133732008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13374
13375 * Makefile.in (gdbreplay.o): New rule.
13376
90aa6a40
JM
133772008-06-06 Joseph Myers <joseph@codesourcery.com>
13378
13379 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13380 message, not gdbserver.
13381
c16158bc 133822008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
13383 Nathan Sidwell <nathan@codesourcery.com>
13384 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
13385
13386 * acinclude.m4: Include ../../config/acx.m4.
13387 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13388 * configure, config.in: Regenerate.
13389 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13390 * server.c (gdbserver_version): Print PKGVERSION.
13391 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13392 (main): Adjust gdbserver_usage calls.
13393 * gdbreplay.c (version, host_name): Add declarations.
13394 (gdbreplay_version, gdbreplay_usage): New.
13395 (main): Accept --version and --help options.
13396
aeb75bf5
DJ
133972008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13398
13399 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13400 (arm_breakpoint_at): Handle Thumb.
13401 (the_low_target): Add comment.
13402
76b233dd
UW
134032008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13404
13405 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13406
08388c79
DE
134072008-05-09 Doug Evans <dje@google.com>
13408
a3c83fae
DE
13409 * server.h (decode_search_memory_packet): Declare.
13410 * remote-utils.c (decode_search_memory_packet): New fn.
13411 * server.c (handle_search_memory_1): New fn.
08388c79
DE
13412 (handle_search_memory): New fn.
13413 (handle_query): Process qSearch:memory packets.
13414
bb9c3d36
UW
134152008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13416
13417 * regcache.c (registers_length): Remove.
13418 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13419 full register packet.
13420 * regcache.h (registers_length): Remove prototype.
13421 * server.h (PBUFSIZ): Define to 16384.
13422
7284e1be
UW
134232008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13424
13425 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13426 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13427 powerpc-64l.o, and powerpc-altivec64l.o.
13428 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13429 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13430 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13431 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13432 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13433 to srv_xmlfiles.
13434
13435 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13436 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13437 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13438 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13439 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13440 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13441 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13442 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13443 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13444 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13445 (clean): Update.
13446
13447 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13448 (init_registers_powerpc_32l): ... this new prototype.
13449 (init_registers_powerpc_32): Remove, replace by ...
13450 (init_registers_powerpc_altivec32l): ... this new prototype.
13451 (init_registers_powerpc_e500): Remove, replace by ...
13452 (init_registers_powerpc_e500l): ... this new prototype.
13453 (init_registers_ppc64): Remove, replace by ...
13454 (init_registers_powerpc_64l): ... this new prototype.
13455 (init_registers_powerpc_64): Remove, replace by ...
13456 (init_registers_powerpc_altivec64l): ... this new prototype.
13457 (ppc_num_regs): Set to 73.
13458 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13459 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13460 (ppc_cannot_store_register): Handle orig_r3 and trap.
13461 (ppc_arch_setup): Update init_registers_... calls.
13462 (ppc_fill_gregset): Handle orig_r3 and trap.
13463
13464 * inferiors.c (clear_inferiors): Reset current_inferior.
13465
fdc59709
PB
134662008-04-23 Paolo Bonzini <bonzini@gnu.org>
13467
889bf7c5
PA
13468 * acinclude.m4: Add override.m4.
13469 * configure: Regenerate.
fdc59709 13470
c9b2f845
UW
134712008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13472
13473 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13474 initial call to init_register_ppc64.
13475
550512b8
UW
134762008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13477
43aaf8b6
PA
13478 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13479 single powerpc*-*-linux* case.
550512b8
UW
13480 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13481
b6430ec3
UW
134822008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13483
13484 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 13485 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
13486 from reg_xmlfiles.
13487 * linux-ppc-low.c: Include <elf.h>.
13488 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13489 (ppc_hwcap): New global variable.
13490 (ppc_regmap): Remove __SPE__ #ifdef sections.
13491 (ppc_regmap_e500): New global variable.
13492 (ppc_cannot_store_register): Update __SPE__ special case.
13493 (ppc_get_hwcap): New function.
13494 (ppc_arch_setup): Use it to determine whether inferior supports
13495 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13496 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13497 Do not access registers if target does not support AltiVec.
13498 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13499 Do not access registers if target does not support SPE.
13500 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13501
52fa2412
UW
135022008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13503
13504 * linux-low.c (disabled_regsets, num_regsets): New.
13505 (use_regsets_p): Delete.
13506 (linux_wait_for_process): Clear disabled_regsets.
13507 (regsets_fetch_inferior_registers): Check and set it.
13508 (regsets_store_inferior_registers): Likewise.
13509 (linux_fetch_registers, linux_store_registers): Do not use
13510 use_regsets_p.
13511 (initialize_low): Allocate disabled_regsets.
13512
e28b3332
DJ
135132008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13514
13515 * Makefile.in (LIBOBJS): New.
13516 (OBS): Use LIBOBJS.
13517 (memmem.o): New rule.
13518 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13519 * configure: Regenerated.
13520
4536995d
UW
135212008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13522
13523 * server.c (handle_query): Never return "unsupported" for
13524 qXfer:features:read queries.
13525
221c031f
UW
135262008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13527
13528 * server.c (get_features_xml): Fix inverted condition.
13529 (handle_query): Always support qXfer:feature:read.
13530
ccd213ac
DJ
135312008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13532
13533 * server.c (wrapper_argv): New.
13534 (start_inferior): Handle wrapper_argv. If set, expect an extra
13535 trap.
13536 (gdbserver_usage): Document --wrapper.
13537 (main): Parse --wrapper.
13538
6fe305f7
UW
135392008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13540
13541 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13542 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13543 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13544 (ppc_set_pc): Likewise.
13545 (ppc_arch_setup): New function.
13546 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13547 of collect_register.
889bf7c5 13548 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 13549
5b0a002e
UW
135502008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13551
13552 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13553 instead of linux-ppc64-low.o.
13554 * linux-ppc64-low.c: Remove file.
13555 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13556 (linux-ppc64-low.o): Remove rule.
13557
13558 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13559 (init_registers_powerpc_64): Likewise.
13560 (ppc_regmap): Conditionally define depending on __powerpc64__.
13561 (ppc_cannot_store_register): Do not special-case "fpscr" when
13562 compiled on __powerpc64__.
13563 (ppc_collect_ptrace_register): New function.
13564 (ppc_supply_ptrace_register): New function.
13565 (ppc_breakpoint): Change type to "unsigned int".
13566 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13567 (the_low_target): Conditionally provide initializers for the
889bf7c5 13568 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
13569 collect_ptrace_register and supply_ptrace_register members.
13570
9b4b61c8
UW
135712008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13572
13573 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13574 * server.c (gdbserver_xmltarget): Define.
13575 (get_features_xml): Use it to replace "target.xml" and arch_string.
13576
13577 * configure.srv: Remove srv_xmltarget. Add XML files that were
13578 mentioned there to srv_xmlfiles instead. Remove conditional tests
13579 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13580 srv_xmlfiles and srv_regobj to include all possible choices.
13581 * configure.ac (srv_xmltarget): Remove.
13582 (srv_xmlfiles): Do not add "target.xml".
13583 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13584 checks for supplementary target information.
13585 * configure: Regenerate.
13586 * Makefile.in (XML_TARGET): Remove.
13587 (target.xml): Remove rule.
13588 (clean): Do not clean up target.xml.
13589 (.PRECIOUS): Do not mention target.xml.
13590
13591 * target.h (struct target_ops): Remove arch_string member.
13592 * linux-low.c (linux_arch_string): Remove.
13593 (linux_target_ops): Remove arch_string initializer.
13594 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13595 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13596 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13597 * spu-low.c (spu_arch_string): Remove.
13598 (spu_target_ops): Remove arch_string initializer.
13599 * win32-low.c (win32_arch_string): Remove.
13600 (win32_target_ops): Remove arch_string initializer.
13601 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13602 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13603 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13604
ee1a7ae4
UW
136052008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13606
13607 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13608 by collect_ptrace_register and supply_ptrace_register hooks.
13609 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13610 instead of checking for the_low_target.left_pad_xfer.
13611 (usr_store_inferior_registers): Use collect_ptrace_register callback
13612 instead of checking for the_low_target.left_pad_xfer.
13613
13614 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13615 (s390_supply_ptrace_register): Likewise.
13616 (s390_fill_gregset): Call s390_collect_ptrace_register.
13617 (the_low_target): Update.
13618
13619 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13620 (ppc_supply_ptrace_register): Likewise.
13621 (the_low_target): Update.
13622
13623 * linux-i386-low.c (the_low_target): Update.
13624 * linux-x86-64-low.c (the_low_target): Update.
13625
d61ddec4
UW
136262008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13627
13628 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13629 reg-s390.o and reg-s390x.o.
13630
13631 * linux-low.c (new_inferior): New global variable.
13632 (linux_create_inferior, linux_attach): Set it.
13633 (linux_wait_for_process): Call the_low_target.arch_setup after the
13634 target has stopped for the first time.
13635 (initialize_low): Do not call the_low_target.arch_setup.
13636
13637 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13638 (s390_set_pc): Likewise.
13639 (s390_arch_setup): New function.
13640 (the_low_target): Use s390_arch_setup as arch_setup routine.
13641
13642 * regcache.c (realloc_register_cache): New function.
13643 (set_register_cache): Call it for each existing regcache.
13644
d05b4ac3
UW
136452008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13646
13647 * server.h (init_registers): Remove prototype.
13648
13649 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13650 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13651 instead of init_registers ().
13652 * linux-arm-low.c (init_registers_arm): Add prototype.
13653 (init_registers_arm_with_iwmmxt): Likewise.
13654 (the_low_target): Add initializer for arch_setup field.
13655 * linux-cris-low.c (init_registers_cris): Add prototype.
13656 (the_low_target): Add initializer for arch_setup field.
13657 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13658 (the_low_target): Add initializer for arch_setup field.
13659 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13660 (the_low_target): Add initializer for arch_setup field.
13661 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13662 (the_low_target): Add initializer for arch_setup field.
13663 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13664 (the_low_target): Add initializer for arch_setup field.
13665 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13666 (the_low_target): Add initializer for arch_setup field.
13667 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13668 (init_registers_mips64_linux): Likewise.
13669 (the_low_target): Add initializer for arch_setup field.
13670 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13671 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13672 (the_low_target): Add initializer for arch_setup field.
13673 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13674 (init_registers_powerpc_64): Likewise.
13675 (the_low_target): Add initializer for arch_setup field.
13676 * linux-s390-low.c (init_registers_s390): Add prototype.
13677 (init_registers_s390x): Likewise.
13678 (the_low_target): Add initializer for arch_setup field.
13679 * linux-sh-low.c (init_registers_sh): Add prototype.
13680 (the_low_target): Add initializer for arch_setup field.
13681 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13682 (the_low_target): Add initializer for arch_setup field.
13683 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13684 (the_low_target): Add initializer for arch_setup field.
13685
13686 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13687 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13688 instead of init_registers ().
13689 * win32-arm-low.c (init_registers_arm): Add prototype.
13690 (the_low_target): Add initializer for arch_setup field.
13691 * win32-i386-low.c (init_registers_i386): Add prototype.
13692 (the_low_target): Add initializer for arch_setup field.
13693
13694 * spu-low.c (init_registers_spu): Add prototype.
13695 (initialize_low): Call initialie_registers_spu () instead of
13696 initialize_registers ().
13697
fd96d250
PA
136982008-02-19 Pedro Alves <pedro@codesourcery.com>
13699
13700 * server.c (handle_v_requests): When handling the vRun and vAttach
13701 packets, if already debugging a process, don't kill it. Return an
13702 error instead.
13703
d41b6bb4
DJ
137042008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13705
13706 * server.c (handle_query): Correct length check.
13707
5ac588cf
PA
137082008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13709
13710 * win32-low.c (do_initial_child_stuff): Add process handle
13711 parameter. Set current_process_handle and current_process_id from the
13712 parameters. Clear globals.
13713 (win32_create_inferior): Don't set current_process_handle and
13714 current_process_id here. Instead pass them on the call to
13715 do_initial_child_stuff.
13716 (win32_attach): Likewise.
13717 (win32_clear_inferiors): New.
13718 (win32_kill): Don't close the current process handle or the
13719 current thread handle here. Instead call win32_clear_inferiors.
13720 (win32_detach): Don't open a new handle to the process. Call
13721 win32_clear_inferiors.
13722 (win32_join): Don't rely on current_process_handle; open a new
13723 handle using the process id.
13724 (win32_wait): Call win32_clear_inferiors when the inferior process
13725 has exited.
13726
ecd7ecbc
DJ
137272008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13728
13729 * server.c (monitor_show_help): Add "exit".
13730
1525d545
MG
137312008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13732
ecd7ecbc 13733 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
13734 (clean): Add reg-xtensa.c.
13735 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
13736 * configure.srv (xtensa*-*-linux*) New target.
13737 * linux-xtensa-low.c: New.
13738 * xtensa-xtregs.c: New.
1525d545 13739
59a016f0
PA
137402008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13741
13742 * hostio.c: Don't include errno.h.
13743 (errno_to_fileio_errno): Move to hostio-errno.
13744 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13745 error number outputting to the target->hostio_last_error callback.
13746 (hostio_packet_error): Use FILEIO_EINVAL directly.
13747 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13748 calls to hostio_error.
13749 * hostio-errno.c: New.
13750 * server.h (hostio_last_error_from_errno): Declare.
13751 * target.h (target_ops): Add hostio_last_error member.
13752 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13753 as hostio_last_error handler.
889bf7c5 13754 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
13755 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13756 (wince_hostio_last_error): New functions.
13757 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13758 as hostio_last_error handler.
13759 (win32_target_ops) [!_WIN32_WCE]: Register
13760 hostio_last_error_from_errno as hostio_last_error handler.
13761 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13762 (hostio-errno.o): New rule.
13763 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13764 * configure.srv (srv_hostio_err_objs): New variable. Default to
13765 hostio-errno.o.
13766 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13767 * configure: Regenerate.
13768
2d717e4f
DJ
137692008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13770
13771 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13772 (linux_kill, linux_detach): Clean up the process list.
13773 * remote-utils.c (remote_open): Improve port number parsing.
13774 (putpkt_binary, input_interrupt): Only send interrupts if the target
13775 is running.
13776 * server.c (extended_protocol): Make static.
13777 (attached): Define earlier.
13778 (exit_requested, response_needed, program_argv): New variables.
13779 (target_running): New.
13780 (start_inferior): Clear attached here.
13781 (attach_inferior): Set attached here.
13782 (require_running): Define.
13783 (handle_query): Use require_running and target_running. Implement
13784 "monitor exit".
13785 (handle_v_attach, handle_v_run): New.
13786 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13787 (gdbserver_usage): Update.
13788 (main): Redo argument parsing. Handle --debug and --multi. Handle
13789 --attach along with other options or after the port. Save
13790 program_argv. Support no initial program. Resynchronize
13791 communication with GDB after an error. Handle "monitor exit".
13792 Use require_running and target_running. Always allow the extended
13793 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13794 restart in extended mode.
13795 * README: Refer to the GDB manual. Update --attach usage.
13796
7407e2de
AS
137972007-12-20 Andreas Schwab <schwab@suse.de>
13798
13799 * linux-low.c (STACK_SIZE): Define.
13800 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13801 (linux_test_for_tracefork): Likewise.
13802
b65d95c5
DJ
138032007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13804
13805 * linux-low.c (linux_wait_for_event): Update messages. Do not
13806 reinsert auto-delete breakpoints.
13807 * mem-break.c (struct breakpoint): Change return type of handler to
13808 int.
13809 (set_breakpoint_at): Update handler type.
13810 (reinsert_breakpoint_handler): Return 1 instead of calling
13811 delete_breakpoint.
13812 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13813 setting a new one.
13814 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13815 * mem-break.h (set_breakpoint_at): Update handler type.
13816 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13817 * win32-low.c (auto_delete_breakpoint): New.
13818 (get_child_debug_event): Use it.
13819
4e799345
DJ
138202007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13821
13822 * configure.ac: Check for pread and pwrite.
13823 * hostio.c (handle_pread): Fall back to lseek and read.
13824 (handle_pwrite): Fall back to lseek and write.
13825 * config.in, configure: Regenerated.
13826
27524b67
DJ
138272007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13828
13829 * server.c (myresume): Add own_buf argument.
13830 (main): Update calls.
13831
a20d5e98
DJ
138322007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13833
13834 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13835 * remote-utils.c (remote_open): Do not call disable_async_io.
13836 (block_async_io): Delete.
13837 (unblock_async_io): Make static.
13838 (initialize_async_io): New.
13839 * server.c (handle_v_cont): Handle async I/O here.
13840 (myresume): Likewise. Move other common resume tasks here...
13841 (main): ... from here. Call initialize_async_io. Disable async
13842 I/O before the main loop.
13843 * server.h (initialize_async_io): Declare.
13844 (block_async_io, unblock_async_io): Delete prototypes.
13845 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13846
b79d787e
DJ
138472007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13848
13849 * remote-utils.c (readchar): Allow binary data in received messages.
13850
d97903b2
PA
138512007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13852
13853 * win32-low.c (attaching): New global.
13854 (win32_create_inferior): Clear the `attaching' global.
13855 (win32_attach): Set the `attaching' global.
13856 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13857 attaching. Only set a breakpoint at the entry point if not
13858 attaching.
13859
311de423
PA
138602007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13861
13862 * server.c (main): Don't report dll events on the initial
13863 connection on attaches.
13864
6c2d16d2
PA
138652007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13866
13867 * server.c (main): Relax numerical bases supported for the pid of
13868 the --attach command line argument.
13869
5ca906e6
PA
138702007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13871
13872 * win32-low.c (win32_attach): Call OpenProcess before
13873 DebugActiveProcess, not after. Add last error output to error
13874 call.
13875
9c6c8194
PA
138762007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13877
13878 * win32-low.c (win32_get_thread_context)
13879 (win32_set_thread_context): New functions.
13880 (thread_rec): Use win32_get_thread_context.
13881 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13882 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13883 field.
13884
4d5d1aaa
PA
138852007-12-03 Leo Zayas
13886 Pedro Alves <pedro_alves@portugalmail.pt>
13887
13888 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13889 global variables.
13890 (child_add_thread): Minor cleanup.
13891 (child_continue): Resume artificially suspended threads before
13892 calling ContinueDebugEvent.
13893 (suspend_one_thread): New.
13894 (fake_breakpoint_event): New.
13895 (get_child_debug_event): Change return type to int. Check here if
13896 gdb sent an interrupt request. If a soft interrupt was requested,
13897 fake a breakpoint event. Return 0 if there is no event to handle,
13898 and 1 otherwise.
13899 (win32_wait): Don't check here if gdb sent an interrupt request.
13900 Ensure there is a valid event to handle.
13901 (win32_request_interrupt): Add soft interruption method as last
13902 resort.
13903
c436e841
PA
139042007-12-03 Leo Zayas
13905 Pedro Alves <pedro_alves@portugalmail.pt>
13906
13907 * win32-low.h (win32_thread_info): Add descriptions to the
13908 structure members. Replace `suspend_count' counter by a
13909 `suspended' flag.
13910 * win32-low.c (thread_rec): Update condition of when to get the
13911 context from the inferior. Rely on ContextFlags being set if it
13912 has already been retrieved. Only suspend the inferior thread if
13913 we haven't already. Warn if that fails.
13914 (continue_one_thread): s/suspend_count/suspended/. Only call
13915 ResumeThread once. Warn if that fails.
13916
e7b5fa67
PA
139172007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13918
13919 * win32-low.c (win32_wait): Don't read from the inferior when it
13920 has already exited.
13921
a385171d
PA
139222007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13923
13924 * Makefile.in (win32_low_h): New variable.
13925 (win32-low.o): Add dependency on $(win32_low_h).
13926 (win32-arm-low.o, win32-i386-low.o): New rules.
13927
f80c84b3
DJ
139282007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13929
13930 * hostio.c: Correct copyright year.
13931
a6b151f1
DJ
139322007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13933
13934 * Makefile.in (OBS): Add hostio.o.
13935 (hostio.o): New rule.
13936 * server.h (handle_vFile): Declare.
13937 * hostio.c: New file.
13938 * server.c (handle_v_requests): Take packet_len and new_packet_len
13939 for binary packets. Call handle_vFile.
13940 (main): Update call to handle_v_requests.
13941
f9387fc3
DJ
139422007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13943
13944 * linux-low.c: Include <sched.h>.
13945
51c2684e
DJ
139462007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13947
13948 * linux-low.c (linux_tracefork_grandchild): New.
13949 (linux_tracefork_child): Use clone.
13950 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13951
75f83163
JB
139522007-10-31 Joel Brobecker <brobecker@adacore.com>
13953
13954 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13955
da5898ce
DJ
139562007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13957
13958 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13959
24a09b5f
DJ
139602007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13961
13962 * inferiors.c (change_inferior_id): Delete.
13963 (add_pid_to_list, pull_pid_from_list): New.
13964 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13965 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13966 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13967 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13968 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13969 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13970 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13971 (using_threads): Always set to 1.
13972 (handle_extended_wait): New.
13973 (add_process): Do not set TID.
13974 (linux_create_inferior): Set must_set_ptrace_flags.
13975 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13976 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13977 (linux_thread_alive): Rename TID argument to LWPID.
13978 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13979 (linux_wait_for_event): Do not use TID or check using_threads. Update
13980 call to dead_thread_notify. Call handle_extended_wait.
13981 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13982 (send_sigstop): Delete sigstop_sent.
13983 (wait_for_sigstop): Avoid TID.
13984 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13985 (linux_test_for_tracefork): New.
13986 (linux_lookup_signals): Use thread_db_active and
13987 linux_supports_tracefork_flag.
13988 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13989 * linux-low.h (get_process_thread): Avoid TID.
13990 (struct process_ifo): Move thread_known and tid to the end. Remove
13991 sigstop_sent.
13992 (linux_attach_lwp, thread_db_init): Update prototypes.
13993 * server.h (change_inferior_id): Delete prototype.
13994 (add_pid_to_list, pull_pid_from_list): New prototypes.
13995 * thread-db.c (thread_db_use_events): New.
13996 (find_first_thread): Rename to...
13997 (find_one_thread): ...this. Update callers and messages. Do not
13998 call fatal. Check thread_db_use_events. Do not call
13999 change_inferior_id or new_thread_notify.
14000 (maybe_attach_thread): Update. Do not call new_thread_notify.
14001 (thread_db_init): Set thread_db_use_events. Check use_events.
14002 * utils.c (fatal, warning): Correct message prefix.
14003
30ed0a8f
DJ
140042007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14005
14006 * Makefile.in (clean): Remove new files.
14007 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14008 (powerpc-64.o, powerpc-64.c): New rules.
14009 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14010 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14011 with SPE.
14012 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14013 SPE targets.
14014 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14015 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14016 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14017 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14018 (target_regsets): Add AltiVec and SPE register sets.
14019 * configure.ac: Check for AltiVec and SPE.
14020 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14021 (ppc_fill_vrregset, ppc_store_vrregset): New.
14022 (target_regsets): Add AltiVec register set.
14023 * configure: Regenerated.
14024
fd462a61
DJ
140252007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14026
14027 * linux-low.c (O_LARGEFILE): Define.
14028 (linux_read_memory): Use /proc/PID/mem.
14029 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14030 * configure, config.in: Regenerated.
14031
69f223ed
DJ
140322007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14033
14034 * linux-low.c (linux_wait_for_event): Do not pass signals while
14035 single-stepping.
14036
aec18585
PA
140372007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14038
14039 * win32-low.c (create_process): New.
14040 (win32_create_inferior): Use create_process instead of
14041 CreateProcess. If create_process failed retry appending an ".exe"
14042 suffix. Store the GetLastError result immediatelly after
14043 create_process calls and use it on the call to error.
14044
34d86ddd
PA
140452007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14046
14047 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14048
5a0e3bd0
JB
140492007-08-23 Joel Brobecker <brobecker@adacore.com>
14050
14051 * configure.ac: Switch license to GPLv3.
14052
f88c79e6
MS
140532007-08-01 Michael Snyder <msnyder@access-company.com>
14054
14055 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14056
6b3d9b83
PA
140572007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14058
14059 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14060 typedef.
14061 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14062 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14063 CloseToolhelp32Snapshot.
14064 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14065 CloseToolhelp32Snapshot.
14066
c588c53c
MS
140672007-07-27 Michael Snyder <michael.snyder@access-company.com>
14068
14069 * server.c (main): Check for inferior exit before main loop.
14070
aa0403d9
PA
140712007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14072
14073 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14074 instead of on tmp_desc.
14075
255e7678
DJ
140762007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14077 Daniel Jacobowitz <dan@codesourcery.com>
14078
14079 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14080 (add_thread): Minor cleanups.
14081 (clear_inferiors): Move lower in the file. Clear the DLL
14082 list.
14083 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14084 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14085 (xml_escape_text): New.
14086 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14087 for qSupported.
14088 (handle_v_cont): Report errors.
14089 (gdbserver_version): Update.
14090 (main): Correct size of own_buf. Do not report initial DLL events.
14091 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14092 (unloaded_dll, xml_escape_text): New.
14093 * win32-low.c (enum target_waitkind): Update comments.
14094 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14095 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14096 (win32_EnumProcessModules, win32_GetModuleInformation)
14097 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14098 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14099 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14100 (win32_Module32First, win32_Module32Next, load_toolhelp)
14101 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14102 (get_child_debug_event): Handle DLL events.
14103 (win32_wait): Likewise.
14104
0d37add9
DJ
141052007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14106
14107 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14108 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14109
45e2715e
PA
141102007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14111
14112 * win32-low.c (handle_output_debug_string): Ignore event if not
14113 waiting.
14114
c5674cf1
PA
141152007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14116
14117 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14118
2bbe3cc1
DJ
141192007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14120
14121 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14122
ae13219e
DJ
141232007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14124
14125 * inferiors.c (change_inferior_id): Add comment.
14126 * linux-low.c (check_removed_breakpoint): Add an early
14127 prototype. Improve debug output.
14128 (linux_attach): Doc update.
14129 (linux_detach_one_process, linux_detach): Clean up before releasing
14130 each process.
14131 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14132 * linux-low.h (struct process_info): Doc improvement.
14133 * mem-break.c (delete_all_breakpoints): New.
14134 * mem-break.h (delete_all_breakpoints): New prototype.
14135 * thread-db.c (find_first_thread): New.
14136 (thread_db_create_event): Call it instead of
14137 thread_db_find_new_threads. Clean up unused variables.
14138 (maybe_attach_thread): Remove first thread handling.
14139 (thread_db_find_new_threads): Use find_first_thread.
14140 (thread_db_get_tls_address): Likewise.
14141
4105de34
DJ
141422007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14143
14144 * thread-db.c (thread_db_find_new_threads): Add prototype.
14145 (thread_db_create_event): Check for the main thread before adding
14146 a new thread.
14147 (maybe_attach_thread): Only enable event reporting if TID == 0.
14148 (thread_db_get_tls_address): Check for new threads.
14149
2b876972
DJ
141502007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14151
14152 * linux-low.c (linux_create_inferior): Try execv before execvp.
14153 * spu-low.c (spu_create_inferior): Likewise.
14154
7a245884
DJ
141552007-06-13 Mike Frysinger <vapier@gentoo.org>
14156
14157 * linux-low.c (linux_create_inferior): Change execv to execvp.
14158 * spu-low.c (spu_create_inferior): Likewies.
14159
117ce543
DJ
141602007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14161
14162 * Makefile.in (clean): Clean new files instead of deleted ones.
14163 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14164 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14165 rules.
14166 * configure.srv: Specify XML files and new regformats for MIPS and
14167 MIPS64 GNU/Linux.
14168 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14169 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14170 an entry for the restart register.
14171 (mips_cannot_fetch_register, mips_cannot_store_register)
14172 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14173 register names to match the XML descriptions.
14174 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14175 restart register instead of $0.
14176
0e7f50da
UW
141772007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14178 Markus Deuling <deuling@de.ibm.com>
14179
14180 * remote-utils.c (decode_xfer_write): New function.
14181 * server.h (decode_xfer_write): Add prototype.
14182 * server.c (handle_query): Add PACKET_LEN argument. Support
14183 qXfer:spu:read and qXfer:spu:write packets.
14184 (main): Pass packet_len to handle_query.
14185 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14186 * target.h (target_ops): Add qxfer_spu.
14187
374c1d38
UW
141882007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14189
14190 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14191 accessing non-seekable spufs files.
14192
bb63802a
UW
141932007-05-16 Markus Deuling <deuling@de.ibm.com>
14194
889bf7c5 14195 * server.c (handle_query): Add reply for qC packet.
bb63802a 14196
7390519e
PA
141972007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14198 Leo Zayas <lerele@champenstudios@com>
14199
14200 * server.h (check_remote_input_interrupt_request): New function.
14201 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14202 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14203 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14204 (check_remote_input_interrupt_request): New function.
14205 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 14206 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
14207 winapi_GenerateConsoleCtrlEvent): New typedefs.
14208 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14209 to 250 ms.
14210 (win32_wait): Check for remote interrupt request
14211 with check_remote_input_interrupt_request.
14212 (win32_request_interrupt): New function.
14213 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14214
34b34921
PA
142152007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14216
14217 * win32-low.c (debug_registers_changed,
14218 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14219 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14220 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14221 (thread_rec): Get context using the low target.
14222 (child_add_thread): Call thread_added on the low target,
14223 which does the same thing.
14224 (regptr): Delete.
14225 (do_initial_child_stuff): Remove debug registers references.
14226 Set context using the low target. Resume threads after
14227 setting the contexts.
14228 (child_continue): Remove dead variable. Remove debug
14229 registers references.
14230 (child_fetch_inferior_registers): Go through the low target.
14231 (do_child_store_inferior_registers): Remove.
14232 (child_store_inferior_registers): Go through the low target.
14233 (win32_resume): Remove debug registers references.
14234 Set context using the low target.
14235 (handle_exception): Change return type to void. Don't record
14236 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14237 first chance exception.
889bf7c5 14238 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
14239 goto loop. Always return after waiting for debug event.
14240 (win32_wait): Convert to switch statement. Handle spurious
14241 events.
14242
14243 * win32-i386-low.c (debug_registers_changed,
14244 debug_registers_used): New.
14245 (initial_stuff): Rename to ...
14246 (i386_initial_stuff): ... this. Clear debug registers
14247 state variables.
14248 (store_debug_registers): Delete.
14249 (i386_get_thread_context): New.
14250 (load_debug_registers): Delete.
14251 (i386_set_thread_context): New.
14252 (i386_thread_added): New.
14253 (single_step): Rename to ...
14254 (i386_single_step): ... this.
14255 (do_fetch_inferior_registers): Rename to ...
14256 (i386_fetch_inferior_register): ... this.
14257 (i386_store_inferior_register): New.
14258 (the_low_target): Adapt to new interface.
14259
14260 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14261 (arm_get_thread_context): New.
14262 (arm_set_thread_context): New.
14263 (regptr): New.
14264 (do_fetch_inferior_registers): Rename to ...
14265 (arm_fetch_inferior_register): ... this.
14266 (arm_store_inferior_register): New.
14267 (arm_wince_breakpoint): Reimplement as unsigned long.
14268 (arm_wince_breakpoint_len): Define.
14269 (the_low_target): Adapt to new interface.
14270
14271 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14272 load_debug_registers. Add get_thread_context, set_thread_context,
14273 thread_added and store_inferior_register. Rename
14274 fetch_inferior_registers to fetch_inferior_register.
14275 (regptr): Remove declaration.
14276
dd6953e1
PA
142772007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14278
14279 * linux-low.c (linux_detach): Change return type to int. Return 0.
14280 * spu-low.c (spu_detach): Likewise.
14281
444d6139
PA
142822007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14283
14284 * target.h (target_ops): Change return type of detach to int.
14285 Add join.
14286 (join_inferior): New.
14287 * server.c (main): Don't skip detach support on mingw32.
14288 If the inferior doesn't support detaching return error.
14289 Call join_inferior instead of using waitpid.
14290 * linux-low.c (linux_join): New.
14291 (linux_target_op): Add linux_join.
14292 * spu-low.c (spu_join): New.
14293 (spu_target_ops): Add spu_join.
14294 * win32-low.c (win32_detach): Adapt to new interface.
14295 Reopen current_process_handle before detaching. Issue a child
14296 resume before detaching.
14297 (win32_join): New.
14298 (win32_target_op): Add win32_join.
14299
1d5315fe
PA
143002007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14301
14302 * win32-low.c (win32-attach): Fix return value.
14303 * target.h (target_ops): Describe ATTACH return values.
14304
bf914831
PA
143052007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14306
14307 * win32-low.c (GETPROCADDRESS): Define.
14308 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14309 (winapi_DebugSetProcessKillOnExit): Likewise.
14310 (win32_create_inferior): Force usage of ansi CreateProcessA.
14311 (win32_attach): Use GETPROCADDRESS.
14312 (win32_detach): Likewise.
14313
f72f3e60
PA
143142007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14315
14316 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14317
ed50f18f
PA
143182007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14319
14320 * win32-low.c: Commit leftover changes from 2007-03-29.
14321
0c2ead7e
DJ
143222007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14323
14324 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14325 fields short instead of int. Add explicit padding.
14326 (i387_cache_to_fsave): Remove unnecessary casts.
14327 (i387_fsave_to_cache): Doc fix.
14328 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14329
73725ff3
DJ
143302007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14331
14332 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14333 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14334
d99f33d8
PA
143352007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14336
14337 * configure.srv (arm*-*-mingw32ce*): Move near the other
14338 arm targets.
14339
68070c10
PA
143402007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14341
2482afc6 14342 * configure.ac: Add errno checking.
68070c10
PA
14343 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14344 sys/file.h and malloc.h.
14345 (AC_CHECK_DECLS): Add perror.
14346 (srv_mingwce): Handle.
2482afc6 14347 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
14348 win32-i386-low.o to srv_tgtobj.
14349 (i[34567]86-*-mingw*): Likewise.
14350 (arm*-*-mingw32ce*): Add case.
14351 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14352 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14353 [__MINGW32CE__] (strerror): New function.
14354 [__MINGW32CE__] (errno): Define to GetLastError.
14355 [__MINGW32CE__] (COUNTOF): New macro.
14356 (remote_open): Remove extra close call.
14357 * mem-break.c (delete_breakpoint_at): New function.
14358 * mem-break.h (delete_breakpoint_at): Declare.
14359 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14360 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14361 [USE_WIN32API] (read, write): Add char* casts.
14362 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14363 * server.h: Include wincecompat.h on Windows CE.
14364 [HAVE_ERRNO_H]: Check.
14365 (perror): Declare if not declared.
14366 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14367 (perror_with_name): Remove errno declaration.
14368 * wincecompat.h: New.
14369 * wincecompat.c: New.
14370 * win32-low.h: New.
14371 * win32-arm-low.c: New.
14372 * win32-i386-low.c: New.
14373 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14374 (OUTMSG2): Make it safe.
14375 (_T): New macro.
14376 (COUNTOF): New macro.
14377 (NUM_REGS): Get it from the low target.
14378 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14379 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14380 (thread_rec): Let low target handle debug registers.
14381 (child_add_thread): Likewise.
14382 (child_init_thread_list): Likewise.
14383 (continue_one_thread): Likewise.
14384 (regptr): New.
14385 (do_child_fetch_inferior_registers): Move to ...
14386 * win32-i386-low.c: ... here, and rename to ...
14387 (do_fetch_inferior_registers): ... this.
889bf7c5 14388 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
14389 Go through the low target.
14390 (do_child_store_inferior_registers): Use regptr.
14391 (strwinerror): New function.
14392 (win32_create_inferior): Handle Windows CE.
14393 Use strwinerror instead of strerror on Windows error
14394 codes. Add program to the error output.
14395 Don't close the main thread handle on Windows CE.
14396 (win32_attach): Use coredll.dll on Windows CE.
14397 (win32_kill): Close current process and current
14398 thread handles.
14399 (win32_detach): Use coredll.dll on Windows CE.
14400 (win32_resume): Let low target handle debug registers, and
14401 step request.
14402 (handle_exception): Add/Remove initial breakpoint. Avoid
14403 non-existant WSTOPSIG on Windows CE.
14404 (win32_read_inferior_memory): Cast to remove warning.
14405 (win32_arch_string): Go through the low target.
14406 (initialize_low): Call set_breakpoint_data with the low
14407 target's breakpoint.
14408 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14409 FOP_REGNUM, mappings): Move to ...
14410 * win32-i386-low.c: ... here.
14411 * win32-low.c (win32_thread_info): Move to ...
14412 * win32-low.h: ... here.
14413 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14414 win32-arm-low.c and wincecompat.c.
14415 (all:): Add $EXEEXT.
14416 (install-only:): Likewise.
14417 (gdbserver:): Likewise.
14418 (gdbreplay:): Likewise.
14419 * config.in: Regenerate.
14420 * configure: Regenerate.
14421
41093d81
PA
144222007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14423
14424 * win32-low.c: Rename typedef thread_info to
14425 win32_thread_info throughout.
14426
544afa54
PA
144272007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14428
14429 * win32-i386-low.c: Rename to ...
14430 * win32-low.c: ... this.
14431 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14432 * Makefile.in: Likewise.
14433
bce7165d
PA
144342007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14435
14436 * remote-utils.c (monitor_output): Constify msg parameter.
14437 * server.h (monitor_output): Likewise.
14438 * win32-i386-low.c (handle_output_debug_string): New.
14439 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14440 handle_output_debug_string.
14441 (get_child_debug_event): Likewise.
14442
506c7aa0
DJ
144432007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14444
14445 * server.c (main): Correct strtoul check.
14446
42c81e2a
DJ
144472007-03-27 Jon Ringle <jon@ringle.org>
14448
14449 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14450
9453113a
DJ
144512007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14452
14453 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14454
64a69107
DJ
144552007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14456
14457 * terminal.h: Check HAVE_SGTTY_H.
14458
144592007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
14460
14461 * remote-utils.c (remote_open): Print out the assigned port number.
14462
c74d0ad8
DJ
144632007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14464
14465 * remote-utils.c (monitor_output): New function.
14466 * server.c (debug_threads): Define here.
14467 (monitor_show_help): New function.
14468 (handle_query): Handle qRcmd.
14469 (main): Do not handle 'd' packet.
14470 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14471 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14472 of debug_threads.
14473
de7c3b4a
PA
144742007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14475
14476 * Makefile.in (EXEEXT): New.
14477 (clean): Use $(EXEEXT).
14478
ef57601b
PA
144792007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14480
14481 * target.h (target_ops): Rename send_signal to request_interrupt,
14482 and remove enum target_signal parameter.
14483 * linux-low.c (linux_request_interrupt): Rename from
14484 linux_send_signal, and always send SIGINT.
14485 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14486 and always send SIGINT.
14487 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14488 of send_signal.
14489 (input_interrupt): Likewise.
14490
820f2bda
PA
144912007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14492
14493 * server.c (get_features_xml): Check if target implemented
14494 arch_string.
14495 * win32-i386-low.c (win32_arch_string): New.
14496 (win32_target_ops): Add win32_arch_string as arch_string member.
14497
ab39bf24
UW
144982007-02-22 Markus Deuling <deuling@de.ibm.com>
14499
14500 * spu-low.c (spu_arch_string): New.
14501 (spu_target_ops): Add spu_arch_string.
14502
61ff6e04
DJ
145032007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14504
14505 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14506 * configure.ac: Do not check for terminal.h.
14507 * configure, config.in: Regenerated.
14508
fb1e4ffc
DJ
145092007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14510
14511 * Makefile.in (OBS): Add $(XML_BUILTIN).
14512 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14513 (clean): Update.
14514 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14515 (arm-with-iwmmxt.c): New.
14516 * config.in, configure: Regenerate.
14517 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14518 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14519 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14520 (arm*-*-linux*): Add iWMMXt and regset support.
14521 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14522 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14523 (arm_store_wmmxregset, target_regsets): New.
14524 * server.c (get_features_xml): Take annex argument. Check builtin
14525 XML documents.
14526 (handle_query): Handle multiple annexes.
14527
0f48aa01
DJ
145282007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14529
14530 * remote-utils.c [USE_WIN32API] (read, write): Define.
14531 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14532 write.
14533
23181151
DJ
145342007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14535
14536 * linux-i386-low.c (the_low_target): Set arch_string.
14537 * linux-x86-64-low.c (the_low_target): Likewise.
14538 * linux-low.c (linux_arch_string): New.
14539 (linux_target_ops): Add it.
14540 * linux-low.h (struct linux_target_ops): Add arch_string.
14541 * server.c (write_qxfer_response): Use const void * for DATA.
14542 (get_features_xml): New.
14543 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14544 * target.h (struct target_ops): Add arch_string method.
14545
9d606399
DJ
145462007-01-03 Denis Pilat <denis.pilat@st.com>
14547 Daniel Jacobowitz <dan@codesourcery.com>
14548
14549 * linux-low.c (linux_kill): Handle being called with no threads.
14550 * win32-i386-low.c (win32_kill): Likewise.
14551 (get_child_debug_event): Clear current_process_handle.
14552
145532006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
14554 Daniel Jacobowitz <dan@codesourcery.com>
14555
14556 * remote-utils.c (remote_open): Check the type of specified
14557 serial port devices before opening them.
14558 * server.c (main): Kill the inferior if an error occurs during
14559 the first remote_open.
14560
a5e13d24
DJ
145612006-12-05 Markus Deuling <deuling@de.ibm.com>
14562
14563 * README: Update supported targets.
14564
186947f7
DJ
145652006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14566
14567 * Makefile.in (clean): Remove reg-mips64.c.
14568 (reg-mips64.c, reg-mips64.o): New rules.
14569 * configure.srv: Handle mips64. Include regset support for mips.
14570 * linux-mips-low.c (union mips_register): New.
14571 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14572 (mips_breakpoint, mips_breakpoint_at): Use int.
14573 (mips_collect_register, mips_supply_register)
14574 (mips_collect_register_32bit, mips_supply_register_32bit)
14575 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14576 (mips_store_fpregset, target_regsets): New.
14577 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14578
a13e2c95
UW
145792006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14580
14581 * configure.srv: Add target "spu*-*-*".
14582 * Makefile.in (clean): Remove reg-spu.c.
14583 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14584 * spu-low.c: New file.
14585
cb7283db
DJ
145862006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14587
14588 * configure.ac: Correct td_thr_tls_get_addr test.
14589 * configure: Regenerated.
14590
89be2091
DJ
145912006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14592
14593 * linux-low.c (linux_wait_for_event): Reformat. Use the
14594 pass_signals array.
14595 * remote-utils.c (decode_address_to_semicolon): New.
14596 * server.c (pass_signals, handle_general_set): New.
14597 (handle_query): Mention QPassSignals for qSupported.
14598 (main): Call handle_general_set.
14599 * server.h (pass_signals, decode_address_to_semicolon): New.
14600
000ef4f0
DJ
146012006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14602
14603 * server.c (handle_query): Correct error handling for read_auxv.
14604
b7149293
UW
146052005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14606
14607 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14608 and srv_linux_thread_db to yes.
14609 * linux-s390-low.c (s390_fill_gregset): New function.
14610 (target_regsets): Define data structure.
14611
dae5f5cf
DJ
146122006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14613
14614 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14615 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14616 * config.in, configure: Regenerated.
14617 * inferiors.c (gdb_id_to_thread): New function.
14618 (gdb_id_to_thread_id): Use it.
14619 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14620 * linux-low.h (struct process_info): Add th member.
14621 (thread_db_get_tls_address): New prototype.
14622 * remote-utils.c (decode_address): Make non-static.
14623 * server.c (handle_query): Handle qGetTLSAddr.
14624 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14625 * target.h (struct target_ops): Add get_tls_address.
14626 * thread-db.c (maybe_attach_thread): Save the thread handle.
14627 (thread_db_get_tls_address): New.
14628
32ca6d61
DJ
146292006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14630
14631 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14632 (linux_resume_one_process): Take a siginfo_t *. Update all
14633 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14634 (struct pending_signals): Add a siginfo_t.
14635 (linux_wait_for_process): Always set last_status.
14636 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14637 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14638 * linux-low.h (struct process_info): Add last_status.
14639
5ffff7c1
DJ
146402006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14641
14642 * remote-utils.c (try_rle): New function.
14643 (putpkt_binary): Use it.
14644
8695c747
DJ
146452006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14646
14647 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14648 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14649 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14650 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14651 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14652 point registers.
14653
290fadea
RS
146542006-08-08 Richard Sandiford <richard@codesourcery.com>
14655
14656 * server.c (terminal_fd): New variable.
14657 (old_foreground_pgrp): Likewise.
14658 (restore_old_foreground_pgrp): New function.
14659 (start_inferior): Record the terminal file descriptor in terminal_fd
14660 and its original foreground group in old_foreground_pgrp. Register
14661 restore_old_foreground_pgrp with atexit().
14662
9f2e1e63
DJ
146632006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14664
14665 * server.c (handle_query): Correct qPart to qXfer.
14666
b80864fb
DJ
146672006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14668
14669 * configure.ac: Check for more headers which are missing on
14670 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14671 * configure.srv: Add Cygwin and mingw32.
14672 * remote-utils.c: Don't include headers unconditionally which
14673 are missing on mingw32. Include <winsock.h> for mingw32.
14674 (remote_open): Adjust for mingw32 support. Flush
14675 standard error after writing to it.
14676 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14677 (unblock_async_io, enable_async_io, disable_async_io)
14678 (readchar, getpkt): Update for Winsock support.
14679 (prepare_resume_reply): Expect a protocol signal number.
14680 * server.c: Disable <sys/wait.h> on mingw32.
14681 (start_inferior): Adjust for mingw32 support. Flush
14682 standard error after writing to it.
14683 (attach_inferior): Likewise. Use protocol signal
14684 numbers.
14685 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14686 and names.
14687 * win32-i386-low.c: New file.
14688 * Makefile.in (XM_CLIBS): Set.
14689 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14690 (win32-i386-low.o): New dependency rule.
14691 * linux-low.c (linux_wait): Use target signal numbers.
14692 * target.h (struct target_ops): Doc fix.
14693 * server.h (target_signal_to_name): New prototype.
14694 * gdbreplay.c: Don't include headers unconditionally which
14695 are missing on mingw32. Include <winsock.h> for mingw32.
14696 (remote_close, remote_open): Adjust for Winsock support.
14697 * configure, config.in: Regenerated.
14698
0876f84a
DJ
146992006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14700
14701 * server.c (decode_xfer_read, write_qxfer_response): New.
14702 (handle_query): Take a packet length argument. Handle
14703 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14704 the qSupported response.
14705 (main): Update call to handle_query.
14706
01f9e8fa
DJ
147072006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14708
14709 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14710 (putpkt_binary): Renamed from putpkt and adjusted for binary
14711 data.
14712 (putpkt): New wrapper for putpkt_binary.
14713 (readchar): Don't mask off the high bit.
14714 (decode_X_packet): New function.
14715 * server.c (main): Call putpkt_binary if a handler sets the packet
14716 length. Save the length of the incoming packet. Handle 'X'.
14717 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14718
be2a5f71
DJ
147192006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14720
14721 * server.c (handle_query): Handle qSupported.
14722
ea025f5f
DJ
147232006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14724
14725 * remote-utils.c (all_symbols_looked_up): New variable.
14726 (look_up_one_symbol): Check it.
14727 * server.h (look_up_one_symbol): New declaration.
14728 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14729
9308fc88
DJ
147302006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14731
14732 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 14733 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
14734 (PTRACE_GET_THREAD_AREA): Define.
14735 (ps_get_thread_area): New function.
14736
52fb6437
NS
147372006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14738
14739 * configure.srv (m68k*-*-uclinux*): New target.
14740 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14741 (linux_resume_one_process): Remove extraneous cast.
14742 (linux_read_offsets): New.
14743 (linux_target_op): Add linux_read_offsets on mmuless systems.
14744 * server.c (handle_query): Add qOffsets logic.
14745 * target.h (struct target_ops): Add read_offsets.
14746
21b0f40c
DJ
147472006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14748
14749 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14750 (PTRACE_GET_THREAD_AREA): Define.
14751 (ps_get_thread_area): New function.
14752 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14753 (linux-x86-64-low.o): Update.
14754
0050a760
DJ
147552006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14756
14757 * configure.ac: Remove checks for prfpregset_t.
14758 * gdb_proc_service.h: New file.
14759 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14760 new "gdb_proc_service.h".
14761 * proc-service.c: Likewise.
14762 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14763 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14764 * Makefile.in (gdb_proc_service_h): Updated.
14765 * configure, config.in: Regenerated.
14766
b92a518e
DJ
147672006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14768
14769 * remote-utils.c (prepare_resume_reply): Move declaration
14770 of gdb_id_from_wait to the top of the block.
14771
545587ee
DJ
147722006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14773
14774 * linux-low.c (regsets_store_inferior_registers): Read the regset
14775 from the target before filling it.
14776
9db87ebd
DJ
147772006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14778
14779 * server.c (attach_inferior): Return SIGTRAP for a successful
14780 attach.
14781
dd24457d
DJ
147822006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14783
14784 * Makefile.in (OBS): Add version.o.
14785 (STAGESTUFF): Delete.
14786 (version.o): Add dependencies.
14787 (version.c): Replace rule.
14788 (clean): Remove version.c.
14789 * server.c (gdbserver_version): New.
14790 (gdbserver_usage): Use printf.
14791 (main): Handle --version and --help.
14792 * server.h (version, host_name): Add declarations.
14793
6f0f660e
EZ
147942005-12-23 Eli Zaretskii <eliz@gnu.org>
14795
889bf7c5
PA
14796 * linux-arm-low.c:
14797 * linux-arm-low.c:
14798 * inferiors.c:
14799 * i387-fp.h:
14800 * i387-fp.c:
14801 * gdbreplay.c:
14802 * regcache.c:
14803 * proc-service.c:
14804 * mem-break.h:
14805 * mem-break.c:
14806 * linux-x86-64-low.c:
14807 * linux-sh-low.c:
14808 * linux-s390-low.c:
14809 * linux-ppc64-low.c:
14810 * linux-ppc-low.c:
14811 * linux-mips-low.c:
14812 * linux-m68k-low.c:
14813 * linux-m32r-low.c:
14814 * linux-low.h:
14815 * linux-low.c:
14816 * linux-ia64-low.c:
14817 * linux-i386-low.c:
14818 * linux-crisv32-low.c:
14819 * thread-db.c:
14820 * terminal.h:
14821 * target.h:
14822 * target.c:
14823 * server.h:
14824 * server.c:
14825 * remote-utils.c:
14826 * regcache.h:
14827 * utils.c:
14828 * Makefile.in:
14829 * configure.ac:
6f0f660e
EZ
14830 * gdbserver.1: Add (C) after Copyright. Update the FSF
14831 address.
14832
9d1fb177
DJ
148332005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14834
14835 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14836 (arm_breakpoint_at): Recognize both breakpoints.
14837 (the_low_target): Use the correct breakpoint instruction.
14838
011a70c2
DJ
148392005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14840
14841 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14842 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14843 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14844 (the_low_target): Update.
14845
7fb85e41
AS
148462005-10-25 Andreas Schwab <schwab@suse.de>
14847
14848 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14849
14850 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14851 (ia64_num_regs): Reduce to 462.
14852
3db0444b
DJ
148532005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14854
14855 * acinclude.m4: Correct quoting.
14856 * aclocal.m4: Regenerated.
14857
14858 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14859 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14860 (thread_db_init): Call thread_db_err_str.
14861 * configure.ac: Check for TD_VERSION.
14862 * config.in, configure: Regenerated.
14863
bee0189a
DJ
148642005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14865
14866 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14867
e9d25b98
DJ
148682005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14869
14870 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14871 is not available. Define HAVE_PTRACE_GETREGS if it is.
14872 * config.in, configure: Regenerated.
14873 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14874 * linux-i386-low.c, linux-m68k-low.c: Update to use
14875 HAVE_PTRACE_GETREGS.
14876 * linux-low.c (regsets_fetch_inferior_registers)
14877 (regsets_store_inferior_registers): Only return 0 if we processed
14878 GENERAL_REGS.
14879 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14880 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14881
a06660f7
DJ
148822005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14883
14884 * inferiors.c (struct thread_info): Add gdb_id.
14885 (add_thread): Add gdb_id argument.
14886 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14887 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14888 calls to add_thread.
14889 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14890 * server.c (handle_query): Use thread_to_gdb_id.
14891 (handle_v_cont, main): Use gdb_id_to_thread_id.
14892 * server.h (add_thread): Update prototype.
14893 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14894 prototypes.
14895
5a1f5858
DJ
148962005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14897
14898 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14899 left-padded registers.
14900 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14901 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14902
e122f1f5
SE
149032005-07-01 Steve Ellcey <sje@cup.hp.com>
14904
14905 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14906 * configure: Regenerate.
14907 * config.in: Regenerate.
14908 * server.h (NEED_DECLARATION_STRERROR):
14909 Replace with !HAVE_DECL_STRERROR.
14910
d592fa2f
DJ
149112005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14912
14913 * linux-low.c (linux_wait, linux_send_signal): Don't test
14914 an unsigned long variable for > 0 if it could be MAX_ULONG.
14915 * server.c (myresume): Likewise.
14916 * target.c (set_desired_inferior): Likewise.
14917
ccbd4912
MK
149182005-06-13 Mark Kettenis <kettenis@gnu.org>
14919
14920 * configure.ac: Simplify and improve check for socklen_t.
14921 * configure, config.in: Regenerate.
14922
f450004a
DJ
149232005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14924
14925 * acconfig.h: Remove.
14926 * configure.ac: Add a test for socklen_t. Use three-argument
14927 AC_DEFINE throughout.
14928 * config.in: Regenerated using autoheader 2.59.
14929 * configure: Regenerated.
14930
14931 * gdbreplay.c (socklen_t): Provide a default.
14932 (remote_open): Use socklen_t.
14933 * remote-utils.c (socklen_t): Provide a default.
14934 (remote_open): Use socklen_t.
14935 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14936 unsigned char.
14937
14938 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14939 char for buffers.
14940 * linux-low.c (linux_read_memory, linux_write_memory)
14941 (linux_read_auxv): Likewise.
14942 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14943 (check_mem_write): Likewise.
14944 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14945 Likewise.
14946 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14947 (registers_from_string, register_data): Likewise.
14948 * server.c (handle_query, main): Likewise.
14949 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14950 (decode_M_packet): Likewise.
14951 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14952 * target.h (struct target_ops): Update read_memory, write_memory,
14953 and read_auxv.
14954 (read_inferior_memory, write_inferior_memory): Update.
14955 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14956 to unsigned char *.
14957 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14958 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14959 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14960 linux-s390-low.c, linux-sh-low.c: Update for changes in
14961 read_inferior_memory and the_low_target->breakpoint.
14962
eee84df1
DJ
149632005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14964
14965 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14966 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14967 * configure.srv: Add powerpc64-*-linux*.
14968 * linux-ppc64-low.c: New file.
14969
45b134e5
OF
149702005-05-23 Orjan Friberg <orjanf@axis.com>
14971
14972 * linux-cris-low.c: New file with support for CRIS.
14973 * linux-crisv32-low.c: Ditto for CRISv32.
14974 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14975 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 14976 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
14977 reg-crisv32.o, and reg-crisv32.c to make rules.
14978 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14979 recognized targets.
14980
48d93c75
UW
149812005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14982
14983 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14984 of sizeof (PTRACE_XFER_TYPE).
14985 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14986
e013ee27
OF
149872005-05-12 Orjan Friberg <orjanf@axis.com>
14988
889bf7c5 14989 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
14990 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14991 pointers for hardware watchpoint support.
14992 * linux-low.h (struct linux_target_ops): Ditto.
14993 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14994 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14995 to linux_target_ops.
14996 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14997 reply packet.
14998 * server.c (main): Recognize 'Z' and 'z' packets.
14999
b0ded00b
UW
150002005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15001
15002 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15003 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15004 (the_low_target): Add new members.
15005
8643e2ad
DJ
150062005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15007
15008 * proc-service.c (ps_lgetregs): Search all_processes instead of
15009 all_threads.
15010
fc620387
DJ
150112005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15012
15013 * server.c (start_inferior): Change return type to int.
15014 (attach_inferior): Change sigptr to int *.
15015 (handle_v_cont, handle_v_requests): Change signal to int *.
15016 (main): Change signal to int.
15017
150182005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
15019
15020 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15021 * configure.srv: Add m32r*-*-linux*.
15022 * linux-m32r-low.c: New file.
15023
e0e76420
DJ
150242005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15025
15026 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15027
a1928bad
DJ
150282005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15029
15030 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15031 Take unsigned long arguments for PIDs.
15032 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15033 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15034 (wait_for_sigstop, linux_resume_one_process)
15035 (regsets_fetch_inferior_registers, linux_send_signal)
15036 (linux_read_auxv): Likewise. Update the types of variables holding
15037 PIDs. Update format string specifiers.
15038 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15039 * remote-utils.c (prepare_resume_reply): Likewise.
15040 * server.c (cont_thread, general_thread, step_thread)
15041 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15042 unsigned long.
15043 (handle_query): Update format specifiers.
15044 (handle_v_cont, main): Use strtoul for thread IDs.
15045 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15046 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15047 (general_thread, step_thread, thread_from_wait)
15048 (old_thread_from_wait): Update.
15049 * target.h (struct thread_resume): Use unsigned long for THREAD.
15050 (struct target_ops): Use unsigned long for arguments to attach and
15051 thread_alive.
15052
dcdb98d2
DJ
150532005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15054
15055 * acinclude.m4: Include bfd/bfd.m4 directly.
15056 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15057 <agriffis@toolchain.org>.
15058 * aclocal.m4, configure: Regenerated.
15059
bec39cab
AC
150602005-01-07 Andrew Cagney <cagney@gnu.org>
15061
15062 * configure.ac: Rename configure.in, require autoconf 2.59.
15063 * configure: Re-generate.
15064
434c4c77
DJ
150652004-12-08 Daniel Jacobowitz <dan@debian.org>
15066
15067 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15068 LIBS when finished.
15069 * aclocal.m4: Regenerated.
15070 * configure: Regenerated.
15071
db1d3e1b
AS
150722004-11-21 Andreas Schwab <schwab@suse.de>
15073
15074 * linux-m68k-low.c (m68k_num_gregs): Define.
15075 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15076 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15077 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15078 (m68k_breakpoint_at): New. Add to the_low_target.
15079
15080 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15081 srv_linux_thread_db to yes.
15082
43360365
JB
150832004-10-20 Joel Brobecker <brobecker@gnat.com>
15084
15085 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15086 (ARCH_SET_FS): Likewise.
15087 (ARCH_GET_FS): Likewise.
15088 (ARCH_GET_GS): Likewise.
15089
fd500816
DJ
150902004-10-16 Daniel Jacobowitz <dan@debian.org>
15091
15092 * linux-i386-low.c (ps_get_thread_area): New.
15093 * linux-x86-64-low.c (ps_get_thread_area): New.
15094 * linux-low.c: Include <sys/syscall.h>.
15095 (linux_kill_one_process): Don't kill the first thread here.
15096 (linux_kill): Kill the first thread here.
15097 (kill_lwp): New function.
15098 (send_sigstop, linux_send_signal): Use it.
15099 * proc-service.c: Clean up #ifdefs.
15100 (fpregset_info): Delete.
15101 (ps_lgetregs): Update and enable implementation.
15102 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15103 implementations.
15104 * remote-utils.c (struct sym_cache, symbol_cache): New.
15105 (input_interrupt): Print a clearer message.
15106 (async_io_enabled): New variable.
15107 (enable_async_io, disable_async_io): Use it. Update comments.
15108 (look_up_one_symbol): Use the symbol cache.
15109 * thread-db.c (thread_db_look_up_symbols): New function.
15110 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15111
f6de3c42
DJ
151122004-10-16 Daniel Jacobowitz <dan@debian.org>
15113
15114 * configure.in: Test for -rdynamic.
15115 * configure: Regenerated.
15116 * Makefile (INTERNAL_LDFLAGS): New.
15117 (gdbserver, gdbreplay): Use it.
15118
2c0fc042
AC
151192004-09-02 Andrew Cagney <cagney@gnu.org>
15120
15121 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15122
075b3282
DJ
151232004-03-23 Daniel Jacobowitz <drow@mvista.com>
15124
15125 * linux-low.c (linux_wait): Clear all_processes list also.
15126
fa6a77dc
DJ
151272004-03-12 Daniel Jacobowitz <drow@mvista.com>
15128
15129 * linux-low.c: Include <errno.h>. Remove extern declaration of
15130 errno.
15131
6d782a97
DJ
151322004-03-12 Daniel Jacobowitz <drow@mvista.com>
15133
15134 * gdbreplay.c, server.h, utils.c: Update copyright years.
15135
3a7fb99b
DJ
151362004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15137
15138 * server.c (main): Print child status or termination signal from
15139 variable 'signal', not 'sig'.
15140
c3e735a6
DJ
151412004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15142
15143 * linux-low.c (linux_read_memory): Change return type to
15144 int. Check for and return error from ptrace().
15145 * target.c (read_inferior_memory): Change return type to int. Pass
15146 back return status from the_target->read_memory().
15147 * target.h (struct target_ops): Adapt *read_memory() prototype.
15148 Update comment.
15149 (read_inferior_memory): Adapt prototype.
15150 * server.c (main): Return an error packet if
15151 read_inferior_memory() returns an error.
15152
a59d1c82
DJ
151532004-03-04 Daniel Jacobowitz <drow@mvista.com>
15154
15155 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15156 Unify with other clean targets.
15157
dc3f8883
DJ
151582004-02-29 Daniel Jacobowitz <drow@mvista.com>
15159
15160 * server.c (handle_v_cont): Call set_desired_inferior.
15161
89a208da
DJ
151622004-02-29 Daniel Jacobowitz <drow@mvista.com>
15163
15164 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15165
62ea82f5
DJ
151662004-02-29 Daniel Jacobowitz <drow@mvista.com>
15167
15168 * linux-low.c (linux_wait): Unblock async I/O.
15169 (linux_resume): Block and enable async I/O.
15170 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15171 * server.h (block_async_io, unblock_async_io): Add prototypes.
15172
6910d122
DJ
151732004-02-29 Daniel Jacobowitz <drow@mvista.com>
15174
15175 * remote-utils.c (remote_open): Print a status notice after
15176 opening a TCP port.
15177 * server.c (attach_inferior): Print a status notice after
15178 attaching.
15179
151802004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
15181
15182 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15183
c89dc5d4
DJ
151842004-02-26 Daniel Jacobowitz <drow@mvista.com>
15185
15186 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15187 error packet.
15188 * server.c, target.h: Update copyright years.
15189
4b8dad4a
RM
151902004-02-25 Roland McGrath <roland@redhat.com>
15191
15192 * target.h (struct target_ops): New member `read_auxv'.
15193 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15194 * linux-low.c (linux_read_auxv): New function.
15195 (linux_target_ops): Initialize `read_auxv' member to that.
15196
d7446758
JB
151972004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15198
15199 Committed by Jim Blandy <jimb@redhat.com>.
15200
15201 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 15202 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
15203 instead of GPR_SIZE to distiguish s390 and s390x targets.
15204
5544ad89
DJ
152052004-01-31 Daniel Jacobowitz <drow@mvista.com>
15206
15207 * linux-low.c: Update copyright year.
15208 (check_removed_breakpoint): Clear pending_is_breakpoint.
15209 (linux_set_resume_request, linux_queue_one_thread)
15210 (resume_status_pending_p): New functions.
15211 (linux_continue_one_thread): Use process->resume.
15212 (linux_resume): Only resume threads if there are no pending events.
15213 * linux-low.h (struct process_info): Add resume request
15214 pointer.
15215
2a68b70e
DJ
152162004-01-30 Daniel Jacobowitz <drow@mvista.com>
15217
15218 * regcache.c (new_register_cache): Clear the allocated register
15219 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15220
64386c31
DJ
152212003-10-13 Daniel Jacobowitz <drow@mvista.com>
15222
15223 * linux-low.c (linux_resume): Take a struct thread_resume *
15224 argument.
15225 (linux_wait): Update call.
15226 (resume_ptr): New static variable.
15227 (linux_continue_one_thread): Renamed from
15228 linux_continue_one_process. Use resume_ptr.
15229 (linux_resume): Use linux_continue_one_thread.
15230 * server.c (handle_v_cont, handle_v_requests): New functions.
15231 (myresume): New function.
15232 (main): Handle 'v' case.
15233 * target.h (struct thread_resume): New type.
15234 (struct target_ops): Change argument of "resume" to struct
15235 thread_resume *.
15236 (myresume): Delete macro.
15237
c938e9b0
L
152382003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15239
15240 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15241 (uninstall): Support DESTDIR.
15242
7f313d07
BC
15243Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15244
15245 * configure.srv: Add xscale*linux copy of arm*linux entry.
15246
3b2fc2ea
DJ
152472003-07-24 Daniel Jacobowitz <drow@mvista.com>
15248
15249 * linux-arm-low.c (arm_reinsert_addr): New function.
15250 (the_low_target): Add arm_reinsert_addr.
15251
1c0a559e
MK
152522003-07-08 Mark Kettenis <kettenis@gnu.org>
15253
15254 * mem-break.c: Remove whitespace at end of file.
15255
43d5792c
DJ
152562003-06-28 Daniel Jacobowitz <drow@mvista.com>
15257
15258 * configure.in: Check whether we need to prototype strerror.
15259 * server.h: Optionally prototype strerror.
15260 * gdbreplay.c (perror_with_name): Use strerror.
15261 * linux-low.c (linux_attach_lwp): Use strerror.
15262 * utils.c (perror_with_name): Use strerror.
15263 * config.in, configure: Regenerated.
15264
c8a86edf
DJ
152652003-06-28 Daniel Jacobowitz <drow@mvista.com>
15266
15267 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15268 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15269
73d37363
DJ
152702003-06-20 Daniel Jacobowitz <drow@mvista.com>
15271
15272 * Makefile.in (SFILES): Update.
15273 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15274 low-sun3.c: Remove files.
15275
6ad8ae5c
DJ
152762003-06-17 Daniel Jacobowitz <drow@mvista.com>
15277
15278 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15279 (linux_detach_one_process, linux_detach): New functions.
15280 (linux_target_ops): Add linux_detach.
15281 * server.c (main): Handle 'D' packet.
15282 * target.h (struct target_ops): Add "detach" member.
15283 (detach_inferior): Define.
15284
1581182a
MK
152852003-06-13 Mark Kettenis <kettenis@gnu.org>
15286
15287 From Kelley Cook <kelleycook@wideopenwest.com>:
15288 * configure.srv: Accept i[34567]86 variants.
15289
e5379b03
DJ
152902003-06-05 Daniel Jacobowitz <drow@mvista.com>
15291
15292 * linux-low.c (linux_wait_for_event): Correct comment typos.
15293 (linux_resume_one_process): Call check_removed_breakpoint.
15294 (linux_send_signal): New function.
15295 (linux_target_ops): Add linux_send_signal.
15296 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15297 of kill.
15298 * target.h (struct target_ops): Add send_signal.
15299
2ff29de4
JB
153002003-05-29 Jim Blandy <jimb@redhat.com>
15301
15302 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15303 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15304 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15305 away part of the register's value.
15306
254787d4
DJ
153072003-03-26 Daniel Jacobowitz <drow@mvista.com>
15308
15309 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15310 (linux_wait_for_event, linux_init_signals): Likewise.
15311
94e10508
DJ
153122003-03-17 Daniel Jacobowitz <drow@mvista.com>
15313
15314 * configure.in: Check for stdlib.h.
15315 * configure: Regenerated.
15316 * config.in: Regenerated.
15317
4c0711e0
DJ
153182003-01-04 Andreas Schwab <schwab@suse.de>
15319
15320 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15321
ef66e766
AC
153222003-01-02 Andrew Cagney <ac131313@redhat.com>
15323
15324 * Makefile.in: Remove obsolete code.
15325
a1358604
DJ
153262002-11-20 Daniel Jacobowitz <drow@mvista.com>
15327
15328 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15329 defined(PT_FPR0_HI).
15330
23ce3b1c
DJ
153312002-11-17 Stuart Hughes <seh@zee2.com>
15332
15333 * linux-arm-low.c (arm_num_regs): Increase.
15334 (arm_regmap): Include status register.
15335
153362002-11-17 Daniel Jacobowitz <drow@mvista.com>
15337
15338 * linux-low.c (register_addr): Remove incorrect -1 check.
15339
a9fa9f7d
DJ
153402002-08-29 Daniel Jacobowitz <drow@mvista.com>
15341
15342 * linux-low.c (linux_create_inferior): Call setpgid. Return
15343 the new PID.
15344 (unstopped_p, linux_signal_pid): Remove.
15345 (linux_target_ops): Remove linux_signal_pid.
15346 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15347 global instead of target method.
15348 * target.h (struct target_ops): Remove signal_pid. Update comment
15349 for create_inferior.
15350 * server.c (signal_pid): New variable.
15351 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 15352 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
15353 (attach_inferior): Set signal_pid.
15354
17574093
DJ
153552002-08-23 Daniel Jacobowitz <drow@mvista.com>
15356
15357 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15358
153592002-08-20 Jim Blandy <jimb@redhat.com>
15360
15361 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15362 default for this.
15363
153642002-08-01 Andrew Cagney <cagney@redhat.com>
15365
15366 * Makefile.in: Make chill references obsolete.
15367
153682002-07-24 Kevin Buettner <kevinb@redhat.com>
15369
15370 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15371 * configure: Regenerate.
15372 * config.in: Regenerate.
15373
153742002-07-09 David O'Brien <obrien@FreeBSD.org>
15375
15376 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15377 (perror_with_name, remote_close, remote_open, expect, play): Static.
15378
153792002-07-04 Michal Ludvig <mludvig@suse.cz>
15380
4b8dad4a 15381 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
15382 byte offsets instead of an array of indexes.
15383 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15384
153852002-06-13 Daniel Jacobowitz <drow@mvista.com>
15386
15387 * regcache.c: Add comment.
15388
153892002-06-11 Daniel Jacobowitz <drow@mvista.com>
15390
15391 * thread-db.c: New file.
15392 * proc-service.c: New file.
15393 * acinclude.m4: New file.
15394 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15395 proc-service.o, and thread-db.o.
15396 (linux-low.o): Add USE_THREAD_DB.
15397 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15398 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15399 * aclocal.m4: Regenerated.
15400 * config.in: Regenerated.
15401 * configure: Regenerated.
15402 * configure.in: Check for proc_service.h, sys/procfs.h,
15403 thread_db.h, and linux/elf.h headrs.
15404 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15405 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15406 Check for -lthread_db and thread support.
15407 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15408 PowerPC, and SuperH.
15409 * i387-fp.c: Constify arguments.
15410 * i387-fp.h: Likewise.
15411 * inferiors.c: (struct thread_info): Renamed from
15412 `struct inferior_info'. Remove PID member. Use generic inferior
15413 list header. All uses updated.
15414 (inferiors, signal_pid): Removed.
15415 (all_threads): New variable.
15416 (get_thread): Define.
15417 (add_inferior_to_list): New function.
15418 (for_each_inferior): New function.
15419 (change_inferior_id): New function.
15420 (add_inferior): Removed.
15421 (remove_inferior): New function.
15422 (add_thread): New function.
15423 (free_one_thread): New function.
15424 (remove_thread): New function.
15425 (clear_inferiors): Use for_each_inferior and free_one_thread.
15426 (find_inferior): New function.
15427 (find_inferior_id): New function.
15428 (inferior_target_data): Update argument type.
15429 (set_inferior_target_data): Likewise.
15430 (inferior_regcache_data): Likewise.
15431 (set_inferior_regcache_data): Likewise.
15432 * linux-low.c (linux_bp_reinsert): Remove.
15433 (all_processes, stopping_threads, using_thrads)
15434 (struct pending_signals, debug_threads, pid_of): New.
15435 (inferior_pid): Replace with macro.
15436 (struct inferior_linux_data): Remove.
15437 (get_stop_pc, add_process): New functions.
15438 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15439 Use add_process and add_thread.
15440 (linux_attach_lwp): New function, based on old linux_attach. Use
15441 add_process and add_thread. Set stop_expected for new threads.
15442 (linux_attach): New function.
15443 (linux_kill_one_process): New function.
15444 (linux_kill): Kill all LWPs.
15445 (linux_thread_alive): Use find_inferior_id.
15446 (check_removed_breakpoints, status_pending_p): New functions.
15447 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15448 Update. Use WNOHANG. Wait for cloned processes also. Update process
15449 struct for the found process.
15450 (linux_wait_for_event): New function.
15451 (linux_wait): Use it. Support LWPs.
15452 (send_sigstop, wait_for_sigstop, stop_all_processes)
15453 (linux_resume_one_process, linux_continue_one_process): New functions.
15454 (linux_resume): Support LWPs.
15455 (REGISTER_RAW_SIZE): Remove.
15456 (fetch_register): Use register_size instead. Call supply_register.
15457 (usr_store_inferior_registers): Likewise. Call collect_register.
15458 Fix recursive case.
15459 (regsets_fetch_inferior_registers): Improve error message.
15460 (regsets_store_inferior_registers): Add debugging.
15461 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15462 (unstopped_p, linux_signal_pid): New functions.
15463 (linux_target_ops): Add linux_signal_pid.
15464 (linux_init_signals): New function.
15465 (initialize_low): Call it. Initialize using_threads.
15466 * regcache.c (inferior_regcache_data): Add valid
15467 flag.
15468 (get_regcache): Fetch registers lazily. Add fetch argument
15469 and update all callers.
15470 (regcache_invalidate_one, regcache_invalidate): New
15471 functions.
15472 (new_register_cache): Renamed from create_register_cache.
15473 Return the new regcache.
15474 (free_register_cache): Change argument to a void *.
15475 (registers_to_string, registers_from_string): Call get_regcache
15476 with fetch flag set.
15477 (register_data): Make static. Pass fetch flag to get_regcache.
15478 (supply_register): Call get_regcache with fetch flag clear.
15479 (collect_register): Call get_regcache with fetch flag set.
15480 (collect_register_as_string): New function.
15481 * regcache.h: Update.
15482 * remote-utils.c (putpkt): Flush after debug output and use
15483 stderr.
15484 Handle input interrupts while waiting for an ACK.
15485 (input_interrupt): Use signal_pid method.
15486 (getpkt): Flush after debug output and use stderr.
15487 (outreg): Use collect_register_as_string.
15488 (new_thread_notify, dead_thread_notify): New functions.
15489 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15490 and general_thread.
15491 (look_up_one_symbol): Flush after debug output.
15492 * server.c (step_thread, server_waiting): New variables.
15493 (start_inferior): Don't use signal_pid. Update call to mywait.
15494 (attach_inferior): Update call to mywait.
15495 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15496 (main): Don't fetch/store registers explicitly. Use
15497 set_desired_inferior. Support proposed ``Hs'' packet. Update
15498 calls to mywait.
15499 * server.h: Update.
15500 (struct inferior_list, struct_inferior_list_entry): New.
15501 * target.c (set_desired_inferior): New.
15502 (write_inferior_memory): Constify.
15503 (mywait): New function.
15504 * target.h: Update.
15505 (struct target_ops): New signal_pid method.
15506 (mywait): Removed macro, added prototype.
15507
15508 * linux-low.h (regset_func): Removed.
15509 (regset_fill_func, regset_store_func): New.
15510 (enum regset_type): New.
15511 (struct regset_info): Add type field. Use new operation types.
15512 (struct linux_target_ops): stop_pc renamed to get_pc.
15513 Add decr_pc_after_break and breakpoint_at.
15514 (get_process, get_thread_proess, get_process_thread)
15515 (strut process_info, all_processes, linux_attach_lwp)
15516 (thread_db_init): New.
15517
15518 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15519 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15520 (the_low_target): Add new members.
15521 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15522 (i386_store_fpxregset): Constify.
15523 (target_regsets): Add new kind identifier.
15524 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15525 (i386_set_pc): Add debugging.
15526 (i386_breakpoint_at): New function.
15527 (the_low_target): Add new members.
15528 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15529 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15530 (mips_breakpoint_at): New.
15531 (the_low_target): Add new members.
15532 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15533 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15534 (the_low_target): Add new members.
15535 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15536 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15537 (the_low_target): Add new members.
15538 * linux-x86-64-low.c (target_regsets): Add new kind
15539 identifier.
15540
155412002-05-15 Daniel Jacobowitz <drow@mvista.com>
15542
15543 From Martin Pool <mbp@samba.org>:
15544 * server.c (gdbserver_usage): New function.
15545 (main): Call it.
15546
155472002-05-14 Daniel Jacobowitz <drow@mvista.com>
15548
15549 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15550 stop_at -> stop_pc.
15551
155522002-05-04 Andrew Cagney <ac131313@redhat.com>
15553
15554 * Makefile.in: Remove obsolete code.
15555
155562002-04-24 Michal Ludvig <mludvig@suse.cz>
15557
15558 * linux-low.c (regsets_fetch_inferior_registers),
15559 (regsets_store_inferior_registers): Removed cast to int from
15560 ptrace() calls.
15561 * regcache.h: Added declaration of struct inferior_info.
15562
155632002-04-20 Daniel Jacobowitz <drow@mvista.com>
15564
15565 * inferiors.c (struct inferior_info): Add regcache_data.
15566 (add_inferior): Call create_register_cache.
15567 (clear_inferiors): Call free_register_cache.
15568 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15569 * regcache.c (struct inferior_regcache_data): New.
15570 (registers): Remove.
15571 (get_regcache): New function.
15572 (create_register_cache, free_register_cache): New functions.
15573 (set_register_cache): Don't initialize the register cache here.
15574 (registers_to_string, registers_from_string, register_data): Call
15575 get_regcache.
15576 * regcache.h: Add prototypes.
15577 * server.h: Likewise.
15578
155792002-04-20 Daniel Jacobowitz <drow@mvista.com>
15580
15581 * mem-break.c: New file.
15582 * mem-break.h: New file.
15583 * Makefile.in: Add mem-break.o rule; update server.h
15584 dependencies.
15585 * inferiors.c (struct inferior_info): Add target_data
15586 member.
15587 (clear_inferiors): Free target_data member if set.
15588 (inferior_target_data, set_inferior_target_data): New functions.
15589 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15590 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15591 * linux-low.c (linux_bp_reinsert): New variable.
15592 (struct inferior_linux_data): New.
15593 (linux_create_inferior): Use set_inferior_target_data.
15594 (linux_attach): Likewise. Call add_inferior.
15595 (linux_wait_for_one_inferior): New function.
15596 (linux_wait): Call it.
15597 (linux_write_memory): Add const.
15598 (initialize_low): Call set_breakpoint_data.
15599 * linux-low.h (struct linux_target_ops): Add breakpoint
15600 handling members.
15601 * server.c (attach_inferior): Remove extra add_inferior
15602 call.
15603 * server.h: Include mem-break.h. Update inferior.c
15604 prototypes.
15605 * target.c (read_inferior_memory)
15606 (write_inferior_memory): New functions.
15607 * target.h (read_inferior_memory)
15608 (write_inferior_memory): Change macros to prototypes.
15609 (struct target_ops): Update comments. Add const to write_memory
15610 definition.
15611
156122002-04-11 Daniel Jacobowitz <drow@mvista.com>
15613
15614 * linux-low.c (usr_store_inferior_registers): Support
15615 registers which are allowed to fail to store.
15616 * linux-low.h (linux_target_ops): Likewise.
15617 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15618 (ppc_cannot_store_register): FPSCR may not be storable.
15619
156202002-04-09 Daniel Jacobowitz <drow@mvista.com>
15621
15622 * server.h: Include <string.h> if HAVE_STRING_H.
15623 * ChangeLog: Correct paths in last ChangeLog entry.
15624
156252002-04-09 Daniel Jacobowitz <drow@mvista.com>
15626
15627 * linux-low.h: Remove obsolete prototypes.
15628 (struct linux_target_ops): New.
15629 (extern the_low_target): New.
15630 * linux-low.c (num_regs, regmap): Remove declarations.
15631 (register_addr): Use the_low_target explicitly.
15632 (fetch_register): Likewise.
15633 (usr_fetch_inferior_registers): Likewise.
15634 (usr_store_inferior_registers): Likewise.
15635 * linux-arm-low.c (num_regs): Remove.
15636 (arm_num_regs): Define.
15637 (arm_regmap): Renamed from regmap, made static.
15638 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15639 made static.
15640 (arm_cannot_store_register): Renamed from cannot_store_register,
15641 made static.
15642 (the_low_target): New.
15643 * linux-i386-low.c (num_regs): Remove.
15644 (i386_num_regs): Define.
15645 (i386_regmap): Renamed from regmap, made static.
15646 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15647 made static.
15648 (i386_cannot_store_register): Renamed from cannot_store_register,
15649 made static.
15650 (the_low_target): New.
15651 * linux-ia64-low.c (num_regs): Remove.
15652 (ia64_num_regs): Define.
15653 (ia64_regmap): Renamed from regmap, made static.
15654 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15655 made static.
15656 (ia64_cannot_store_register): Renamed from cannot_store_register,
15657 made static.
15658 (the_low_target): New.
15659 * linux-m68k-low.c (num_regs): Remove.
15660 (m68k_num_regs): Define.
15661 (m68k_regmap): Renamed from regmap, made static.
15662 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15663 made static.
15664 (m68k_cannot_store_register): Renamed from cannot_store_register,
15665 made static.
15666 (the_low_target): New.
15667 * linux-mips-low.c (num_regs): Remove.
15668 (mips_num_regs): Define.
15669 (mips_regmap): Renamed from regmap, made static.
15670 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15671 made static.
15672 (mips_cannot_store_register): Renamed from cannot_store_register,
15673 made static.
15674 (the_low_target): New.
15675 * linux-ppc-low.c (num_regs): Remove.
15676 (ppc_num_regs): Define.
15677 (ppc_regmap): Renamed from regmap, made static.
15678 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15679 made static.
15680 (ppc_cannot_store_register): Renamed from cannot_store_register,
15681 made static.
15682 (the_low_target): New.
15683 * linux-s390-low.c (num_regs): Remove.
15684 (s390_num_regs): Define.
15685 (s390_regmap): Renamed from regmap, made static.
15686 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15687 made static.
15688 (s390_cannot_store_register): Renamed from cannot_store_register,
15689 made static.
15690 (the_low_target): New.
15691 * linux-sh-low.c (num_regs): Remove.
15692 (sh_num_regs): Define.
15693 (sh_regmap): Renamed from regmap, made static.
15694 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15695 made static.
15696 (sh_cannot_store_register): Renamed from cannot_store_register,
15697 made static.
15698 (the_low_target): New.
15699 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15700 (the_low_target): New.
15701
157022002-04-09 Daniel Jacobowitz <drow@mvista.com>
15703
15704 * Makefile.in: Add stamp-h target.
15705 * configure.in: Create stamp-h.
15706 * configure: Regenerated.
15707
157082002-04-09 Daniel Jacobowitz <drow@mvista.com>
15709
15710 * inferiors.c: New file.
15711 * target.c: New file.
15712 * target.h: New file.
15713 * Makefile.in: Add target.o and inferiors.o. Update
15714 dependencies.
15715 * linux-low.c (inferior_pid): New static variable,
15716 moved from server.c.
15717 (linux_create_inferior): Renamed from create_inferior.
15718 Call add_inferior. Return 0 on success instead of a PID.
15719 (linux_attach): Renamed from myattach.
15720 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15721 (linux_thread_alive): Renamed from mythread_alive.
15722 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15723 child dies.
15724 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15725 (regsets_store_inferior_registers): Correct error message.
15726 Add missing ``return 0''.
15727 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15728 (linux_store_registers): Renamed from store_inferior_registers.
15729 (linux_read_memory): Renamed from read_inferior_memory.
15730 (linux_write_memory): Renamed from write_inferior_memory.
15731 (linux_target_ops): New structure.
15732 (initialize_low): Call set_target_ops ().
15733 * remote-utils.c (unhexify): New function.
15734 (hexify): New function.
15735 (input_interrupt): Send signals to ``signal_pid''.
15736 * server.c (inferior_pid): Remove.
15737 (start_inferior): Update create_inferior call.
15738 (attach_inferior): Call add_inferior.
15739 (handle_query): New function.
15740 (main): Call handle_query for `q' packets.
15741 * server.h: Include "target.h". Remove obsolete prototypes.
15742 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15743
157442002-04-09 Daniel Jacobowitz <drow@mvista.com>
15745
15746 * Makefile.in: Add WARN_CFLAGS. Update configury
15747 dependencies.
15748 * configure.in: Check for <string.h>
15749 * configure: Regenerate.
15750 * config.in: Regenerate.
15751 * gdbreplay.c: Include needed system headers.
15752 (remote_open): Remove strchr prototype.
15753 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15754 * regcache.c (supply_register): Change buf argument to const void *.
15755 (supply_register_by_name): Likewise.
15756 (collect_register): Change buf argument to void *.
15757 (collect_register_by_name): Likewise.
15758 * regcache.h: Add missing prototypes.
15759 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15760 * server.c (handle_query): New function.
15761 (attached): New static variable, moved out of main.
15762 (main): Quiet longjmp clobber warnings.
15763 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15764 * utils.c (error): Remove NORETURN.
15765 (fatal): Likewise.
This page took 1.881051 seconds and 4 git commands to generate.