PR22306, Invalid free() in slurp_symtab()
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
5bfda255
YQ
12017-10-16 Yao Qi <yao.qi@linaro.org>
2
3 * configure: Regenerated.
4
9c80ecd6
SM
52017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6
7 * inferiors.h: (struct inferior_list): Remove.
8 (struct inferior_list_entry); Remove.
9 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
10 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
11 get_first_inferior): Remove.
12 (for_each_inferior, for_each_inferior_with_data, find_inferior,
13 find_inferior_id, find_inferior_in_random): Change signature.
14 * inferiors.c (all_threads): Change type to
15 std::list<thread_info *>.
16 (get_thread): Remove macro.
17 (find_inferior, find_inferior_id): Change signature, implement
18 using find_thread.
19 (find_inferior_in_random): Change signature, implement using
20 find_thread_in_random.
21 (for_each_inferior, for_each_inferior_with_data): Change
22 signature, implement using for_each_thread.
23 (add_inferior_to_list, remove_inferior): Remove.
24 (add_thread, get_first_thread, thread_of_pid,
25 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
26 (get_first_inferior, one_inferior_p, clear_inferior_list):
27 Remove.
28 (clear_inferiors, get_thread_process): Update.
29 * gdbthread.h: Include <list>.
30 (struct thread_info) <entry>: Remove field.
31 <id>: New field.
32 (all_threads): Change type to std::list<thread_info *>.
33 (get_first_inferior): Add doc.
34 (find_thread, for_each_thread, find_thread_in_random): New
35 functions.
36 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
37 * linux-arm-low.c (update_registers_callback): Update.
38 * linux-low.c (second_thread_of_pid_p): Update.
39 (kill_one_lwp_callback, linux_detach_lwp_callback,
40 delete_lwp_callback, status_pending_p_callback, same_lwp,
41 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
42 iterate_over_lwps, not_stopped_callback,
43 resume_stopped_resumed_lwps, count_events_callback,
44 select_singlestep_lwp_callback, select_event_lwp_callback,
45 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
46 suspend_and_send_sigstop_callback, wait_for_sigstop,
47 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
48 lwp_running, linux_set_resume_request, resume_status_pending_p,
49 need_step_over_p, start_step_over, linux_resume_one_thread,
50 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
51 reset_lwp_ptrace_options_callback): Update.
52 * linux-mips-low.c (update_watch_registers_callback): Update.
53 * regcache.c (regcache_invalidate_one, regcache_invalidate):
54 Update.
55 (free_register_cache_thread_one): Remove.
56 (regcache_release): Update.
57 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
58 handle_qxfer_threads_worker): Update.
59 (handle_query): Update, use list iterator.
60 (visit_actioned_threads, handle_pending_status,
61 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
62 clear_pending_status_callback, set_pending_status_callback,
63 find_status_pending_thread_callback, handle_status,
64 process_serial_event): Update.
65 * target.c (thread_search_callback): Update.
66 * thread-db.c (thread_db_get_tls_address): Update.
67 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
68 Update.
69 * win32-i386-low.c (update_debug_registers_callback): Update.
70 * win32-low.c (delete_thread_info, child_delete_thread,
71 continue_one_thread, suspend_one_thread,
72 get_child_debug_event): Adjust.
73
9179355e
SM
742017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
75
76 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
77 * inferiors.h: Include <list>.
78 (struct process_info) <entry>: Remove field.
79 <pid>: New field.
80 (pid_of): Change macro to function.
81 (ptid_of, lwpid_of): Remove macro.
82 (all_processes): Change type to std::list<process_info *>.
83 (ALL_PROCESSES): Remove macro.
84 (for_each_process, find_process): New function.
85 * inferiors.c (all_processes): Change type to
86 std::list<process_info *>.
87 (find_thread_process): Adjust.
88 (add_process): Likewise.
89 (remove_process): Likewise.
90 (find_process_pid): Likewise.
91 (get_first_process): Likewise.
92 (started_inferior_callback): Remove.
93 (have_started_inferiors_p): Adjust.
94 (attached_inferior_callback): Remove.
95 (have_attached_inferiors_p): Adjust.
96 * linux-low.c (check_zombie_leaders): Likewise.
97 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
98 (x86_linux_update_xmltarget): Adjust.
99 * server.c (handle_query): Likewise.
100 (gdb_reattached_process): Remove.
101 (handle_status): Adjust.
102 (kill_inferior_callback): Likewise.
103 (detach_or_kill_inferior): Remove.
104 (print_started_pid): Likewise.
105 (print_attached_pid): Likewise.
106 (detach_or_kill_for_exit): Update.
107 (process_serial_event): Likewise.
108 * linux-arm-low.c (arm_new_fork): Likewise.
109
c9cb8905
SM
1102017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
111
112 * dll.h: Include <list>.
113 (struct dll_info): Add constructor.
114 <entry>: Remove field.
115 (all_dlls): Change type to std::list<dll_info>.
116 * dll.c: Include <algorithm>.
117 (get_dll): Remove macro.
118 (all_dlls): Change type to std::list<dll_info *>.
119 (free_one_dll): Remove.
120 (match_dll): Likewise.
121 (loaded_dll): Adjust.
122 (unloaded_dll): Adjust to all_dlls type change, use
123 std::find_if. Inline code from match_dll.
124 (clear_dlls): Adjust to all_dlls type change.
125 * server.c (emit_dll_description): Remove.
126 (handle_qxfer_libraries): Adjust to all_dlls type change,
127 integrate emit_dll_description's functionality.
128
04ec7890
SM
1292017-10-12 Simon Marchi <simon.marchi@ericsson.com>
130
131 * linux-low.h (struct linux_target_ops) <delete_process>: New
132 field.
133 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
134 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
135 (struct linux_target_ops): Add delete_process callback.
136 * linux-arm-low.c (arm_delete_process): New.
137 (struct linux_target_ops): Add delete_process callback.
138 * linux-bfin-low.c (struct linux_target_ops): Likewise.
139 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
140 * linux-m32r-low.c (struct linux_target_ops): Likewise.
141 * linux-mips-low.c (mips_linux_delete_process): New.
142 (struct linux_target_ops): Add delete_process callback.
143 * linux-ppc-low.c (struct linux_target_ops): Likewise.
144 * linux-s390-low.c (struct linux_target_ops): Likewise.
145 * linux-sh-low.c (struct linux_target_ops): Likewise.
146 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
147 * linux-tile-low.c (struct linux_target_ops): Likewise.
148 * linux-x86-low.c (x86_linux_delete_process): New.
149 (struct linux_target_ops): Add delete_process callback.
150 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
151
466eecee
SM
1522017-10-12 Simon Marchi <simon.marchi@ericsson.com>
153
154 * linux-aarch64-low.c (the_low_target): Add thread delete
155 callback.
156 * linux-arm-low.c (arm_delete_thread): New function.
157 (the_low_target): Add thread delete callback.
158 * linux-bfin-low.c (the_low_target): Likewise.
159 * linux-crisv32-low.c (the_low_target): Likewise.
160 * linux-low.c (delete_lwp): Invoke delete_thread callback if
161 set.
162 * linux-low.h (struct linux_target_ops) <delete_thread>: New
163 field.
164 * linux-m32r-low.c (the_low_target): Add thread delete callback.
165 * linux-mips-low.c (mips_linux_delete_thread): New function.
166 (the_low_target): Add thread delete callback.
167 * linux-ppc-low.c (the_low_target): Likewise.
168 * linux-s390-low.c (the_low_target): Likewise.
169 * linux-sh-low.c (the_low_target): Likewise.
170 * linux-tic6x-low.c (the_low_target): Likewise.
171 * linux-tile-low.c (the_low_target): Likewise.
172 * linux-x86-low.c (the_low_target): Likewise.
173 * linux-xtensa-low.c (the_low_target): Likewise.
174
b79f7801
YZ
1752017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
176
177 * win32-low.c: Include "common-inferior.h".
178
bc3b087d
SDJ
1792017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
180
181 * inferiors.c (set_inferior_cwd): New function.
182 * server.c (handle_general_set): Handle QSetWorkingDir packet.
183 (handle_query): Inform that QSetWorkingDir is supported.
184 * win32-low.c (create_process): Pass the inferior's cwd to
185 CreateProcess.
186
d092c5a2
SDJ
1872017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
188
189 * inferiors.c (current_inferior_cwd): New global variable.
190 (get_inferior_cwd): New function.
191 * inferiors.h (struct process_info) <cwd>: New field.
192
7da0a886
SDJ
1932017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
194
195 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
196 (OBS): Add gdb_tilde_expand.o.
197
289a6840
SM
1982017-10-02 Simon Marchi <simon.marchi@ericsson.com>
199
200 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
201 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
202
256642e8
PA
2032017-09-29 Pedro Alves <palves@redhat.com>
204
205 * ax.c (gdb_parse_agent_expr): Constify.
206 * ax.h (gdb_parse_agent_expr): Constify.
207 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
208 Constify.
209 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
210 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
211 * remote-utils.h (read_ptid): Constify.
212 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
213 (process_point_options, process_serial_event): Constify.
214 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
215 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
216 (cmd_qtbuffer): Constify.
217
5b9ca4d4
PA
2182017-09-29 Pedro Alves <palves@redhat.com>
219
220 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
221 fails.
222
94c207e0
PA
2232017-09-29 Pedro Alves <palves@redhat.com>
224
225 * linux-low.c (handle_extended_wait): Pass parent thread instead
226 of process to thread_db_notice_clone.
227 * linux-low.h (thread_db_notice_clone): Replace parent process
228 parameter with parent thread parameter.
229 * thread-db.c (find_one_thread): Add comment.
230 (thread_db_notice_clone): Replace parent process parameter with
231 parent thread parameter. Temporarily switch to the parent thread.
232
75352e28
SDJ
2332017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
234
235 * gdbthread.h: Include "common-gdbthread.h".
236 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
237 "if" when validating the ptid.
238 * remote-utils.c: Include "gdbthread.h".
239 (prepare_resume_reply): Use "switch_to_thread".
240 * target.c (done_accessing_memory): Likewise.
241
ad339634
AA
2422017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
243
244 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
245 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
246 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
247 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
248 s390x-gs-linux64-ipa.o to ipa_obj.
249 * linux-s390-low.c (HWCAP_S390_GS): New define.
250 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
251 New functions.
252 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
253 (s390_arch_setup): Check for guarded-storage support and choose
254 appropriate tdesc.
255 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
256 init_registers_s390x_gs_linux64.
257 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
258 enum value.
259 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
260 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
261
cc4d742f
SM
2622017-09-22 Simon Marchi <simon.marchi@ericsson.com>
263
264 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
265
f6327dcb
KB
2662017-09-21 Kevin Buettner <kevinb@redhat.com>
267
268 * linux-low.h (struct lwp_info): Add new field, thread_handle.
269 (thread_db_thread_handle): Declare.
270 * linux-low.c (linux_target_ops): Initialize thread_handle.
271 * server.c (handle_qxfer_threads_worker): Add support for
272 "handle" attribute.
273 * target.h (struct target_ops): Add new function pointer,
274 thread_handle.
275 (target_thread_handle): Define.
276 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
277 field in lwp.
278 (thread_db_thread_handle): New function.
279
86299109
KB
2802017-09-21 Kevin Buettner <kevinb@redhat.com>
281
282 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
283 * linux-low.h (thread_db_notice_clone): Declare.
284 * thread-db.c (thread_db_notice_clone): New function.
285
f557a88a
PA
2862017-09-21 Pedro Alves <palves@redhat.com>
287
288 * server.c (gdb_read_memory, handle_status, process_serial_event)
289 (handle_serial_event, handle_target_event): Adjust to
290 set_desired_thread prototype change.
291 * target.c (set_desired_thread): Remove 'use_general' parameter
292 and adjust.
293 * target.h (set_desired_thread): Remove 'use_general' parameter.
294
223ffa71
TT
2952017-09-20 Tom Tromey <tom@tromey.com>
296
297 * target.c (target_terminal::terminal_state): Define.
298 (target_terminal::init): Rename from target_terminal_init.
299 (target_terminal::inferior): Rename from
300 target_terminal_inferior.
301 (target_terminal::ours): Rename from target_terminal_ours.
302 (target_terminal::ours_for_output, target_terminal::info): New.
303
04fd3ba9
SM
3042017-09-16 Simon Marchi <simon.marchi@ericsson.com>
305
306 * server.c (accumulate_file_name_length): Remove.
307 (emit_dll_description): Adjust to std::string change.
308 (handle_qxfer_libraries): Use std::string to hold document.
309
5e187554
SM
3102017-09-16 Simon Marchi <simon.marchi@ericsson.com>
311
312 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
313 return type of xml_escape_text.
314 * server.c (emit_dll_description): Likewise.
315
1526853e
SM
3162017-09-16 Simon Marchi <simon.marchi@ericsson.com>
317
318 * server.c (captured_main): Accept argument for --selftest.
319 Update run_tests call.
320 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
321 when registering selftests.
322
c4dfafab
SDJ
3232017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
324
325 * regcache.c (get_thread_regcache): Update code to use "std::vector"
326 instead of "VEC" for "target_desc.reg_defs".
327 (regcache_cpy): Likewise.
328 (registers_to_string): Likewise.
329 (registers_from_string): Likewise.
330 (find_regno): Likewise.
331 (supply_regblock): Likewise.
332 (regcache_raw_read_unsigned): Likewise.
333 * tdesc.c (init_target_desc): Likewise.
334 (tdesc_create_reg): Likewise.
335 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
336 (struct target_desc) <reg_defs>: Convert to "std::vector".
337 (target_desc): Do not initialize "reg_defs".
338 (~target_desc): Update code to use "std::vector" instead of "VEC"
339 for "target_desc.reg_defs".
340 (operator==): Likewise.
341
124aceb4
SM
3422017-09-15 Simon Marchi <simon.marchi@ericsson.com>
343
344 * inferiors.h (thread_to_gdb_id): Remove.
345 * inferiors.c (thread_to_gdb_id): Remove.
346 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
347 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
348 lynx_store_registers, lynx_read_memory, lynx_write_memory):
349 Likewise.
350 * nto-low.c (nto_fetch_registers, nto_store_registers,
351 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
352
96cde54f
SM
3532017-09-15 Simon Marchi <simon.marchi@ericsson.com>
354
355 * inferiors.h (gdb_id_to_thread_id): Remove.
356 * inferiors.c (gdb_id_to_thread_id): Remove.
357 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
358 removal. Move pid declaration closer to where it's used.
359
e8ca139e
SM
3602017-09-15 Simon Marchi <simon.marchi@ericsson.com>
361
362 * server.c (handle_detach): New function.
363 (process_serial_event): Move code out, call handle_detach.
364
f8a4e119
SM
3652017-09-15 Simon Marchi <simon.marchi@ericsson.com>
366
367 * server.c (require_running): Rename to ...
368 (require_running_or_return): ... this ...
369 (require_running_or_break): ... and this.
370 (handle_query, process_serial_event): Adjust.
371
0eb0a407
SM
3722017-09-15 Simon Marchi <simon.marchi@ericsson.com>
373
374 * linux-low.c (linux_set_resume_request): Remove unused
375 variables.
376
785922a5
SM
3772017-09-15 Simon Marchi <simon.marchi@ericsson.com>
378
379 * server.c (first_thread_of): Remove.
380 (process_serial_event): Replace usage of first_thread_of with
381 find_any_thread_of_pid.
382 * tracepoint.c (same_process_p): Remove.
383 (gdb_agent_about_to_close): Replace usage of same_process_p with
384 find_any_thread_of_pid.
385 * linux-x86-low.c (same_process_callback): Remove.
386 (x86_arch_setup_process_callback): Replace usage of
387 same_process_callback with find_any_thread_of_pid.
388 * thread-db.c (any_thread_of): Remove.
389 (switch_to_process): Replace usage of any_thread_of with
390 find_any_thread_of_pid.
391 * inferiors.c (thread_pid_matches_callback): Remove.
392 (find_thread_process): Adjust to use find_any_thread_of_pid.
393
a059f00c
SDJ
3942017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
395
396 * regcache.c (get_thread_regcache): Guard calls to "memset"
397 with "!VEC_empty".
398
cc397f3a
SDJ
3992017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
400
401 * linux-low.c (handle_extended_wait): Use
402 "allocate_target_description" instead of "XNEW".
403 * linux-x86-low.c (initialize_low_arch): Likewise.
404
22916b07
YQ
4052017-09-05 Yao Qi <yao.qi@linaro.org>
406
407 * configure.srv (srv_i386_regobj): Remove.
408 (srv_amd64_regobj): Remove.
409 (srv_regobj): Set it to "" for x86 non-linux targets.
410 * linux-x86-tdesc.c (i386_linux_read_description):
411 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
412 (init_registers_i386): Remove the declaration.
413 (tdesc_i386): Remove the declaration.
414 (lynx_i386_arch_setup): Call i386_create_target_description.
415 * nto-x86-low.c: Likewise.
416 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
417 [!__x86_64__]: include arch/i386.h.
418 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
419
38602d55
YQ
4202017-09-05 Yao Qi <yao.qi@linaro.org>
421
422 * configure.srv (srv_amd64_linux_xmlfiles): Remove
423 i386/amd64-XXX-linux from it.
424
44b886ff
YQ
4252017-09-05 Yao Qi <yao.qi@linaro.org>
426
427 * configure.srv: Empty srv_amd64_linux_regobj if $development is
428 false.
429 (ipa_amd64_linux_regobj): Remove.
430 (ipa_x32_linux_regobj): Remove.
431
b4570e4b
YQ
4322017-09-05 Yao Qi <yao.qi@linaro.org>
433
434 * Makefile.in (arch-amd64.o): New rule.
435 * configure.srv: Append arch-amd64.o.
436 * linux-amd64-ipa.c: Include common/x86-xstate.h.
437 (get_ipa_tdesc): Call amd64_linux_read_description.
438 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
439 and init_registers_amd64_XXX.
440 * linux-x86-low.c (x86_linux_read_description): Call
441 amd64_linux_read_description.
442 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
443 (initialize_low_arch): Don't call init_registers_x32_XXX and
444 init_registers_amd64_XXX.
445 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
446 and tdesc_amd64_XXX.
447 [__x86_64__] (amd64_tdesc_test): New function.
448 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
449 and init_registers_amd64_XXX.
450 * linux-x86-tdesc.c: Include arch/amd64.h.
451 (xcr0_to_tdesc_idx): New function.
452 (i386_linux_read_description): New function.
453 (amd64_get_ipa_tdesc_idx): New function.
454 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
455 (amd64_get_ipa_tdesc): Declare.
456
d1f28ea2
YQ
4572017-09-05 Yao Qi <yao.qi@linaro.org>
458
459 * configure.srv (srv_i386_linux_xmlfiles): Remove
460 i386/i386-XXX-linux.xml from it.
461
25a93583
YQ
4622017-09-05 Yao Qi <yao.qi@linaro.org>
463
464 * configure.srv: Set srv_i386_linux_regobj empty if $development
465 is false.
466 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
467 initialize_low_tdesc.
468 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
469 with #if initialize_low_tdesc.
470 * linux-x86-tdesc-selftest.c: New file.
471 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
472
5f035c07
YQ
4732017-09-05 Yao Qi <yao.qi@linaro.org>
474
475 * Makefile.in (arch-i386.o): New rule.
476 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
477 (x86_64-*-linux*): Likewise.
478 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
479 include arch/i386.h.
480 (i386_linux_read_description): Remove code and call
481 i386_create_target_description.
482 * tdesc.c (allocate_target_description): New function.
483 * tdesc.h (set_tdesc_architecture): Remove declaration.
484 (set_tdesc_osabi): Likewise.
485
0abe8a89
YQ
4862017-09-05 Yao Qi <yao.qi@linaro.org>
487
488 * linux-x86-tdesc.c: Don't include <inttypes.h>.
489 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
490 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
491 .xmltarget.
492 * server.c (get_features_xml): Call tdesc_get_features_xml.
493 * tdesc.c (set_tdesc_architecture): New function.
494 (set_tdesc_osabi): New function.
495 (tdesc_get_features_xml): New function.
496 (tdesc_create_feature): Add an argument.
497 * tdesc.h (struct target_desc) <features>: New field.
498 <arch, osabi>: New field.
499 (~target_desc): xfree features, arch, and osabi.
500 (target_desc::oerator==): Don't compare .xmltarget.
501 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
502 (set_tdesc_osabi): Likewise.
503 (tdesc_get_features_xml): Likewise.
504
0a188386
YQ
5052017-09-05 Yao Qi <yao.qi@linaro.org>
506
507 * linux-x86-tdesc.c: Include selftest.h.
508 (i386_tdesc_test): New function.
509 (initialize_low_tdesc): Call selftests::register_test.
510 * tdesc.h: Include regdef.h.
511 (target_desc): Override operator == and !=.
512
f49ff000
YQ
5132017-09-05 Yao Qi <yao.qi@linaro.org>
514
515 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
516 (ipa_obj): Likewise.
517 * linux-i386-ipa.c: Include common/x86-xstate.h
518 (get_ipa_tdesc): Call i386_linux_read_description.
519 (initialize_low_tracepoint): Don't call init_registers_XXX
520 functions, call initialize_low_tdesc instead.
521 * linux-x86-low.c (x86_linux_read_description): Call
522 i386_linux_read_description.
523 (initialize_low_arch): Don't call init_registers_i386_XXX
524 functions, call initialize_low_tdesc.
525 * linux-x86-tdesc.c: New file.
526 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
527 (i386_get_ipa_tdesc_idx): Declare.
528 (i386_get_ipa_tdesc): Declare.
529 (initialize_low_tdesc): Declare.
530
2b68ef2f
YQ
5312017-09-05 Yao Qi <yao.qi@linaro.org>
532
533 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
534 instead of 0.
535
f7000548
YQ
5362017-09-05 Yao Qi <yao.qi@linaro.org>
537
538 * Makefile.in (IPA_OBJS): Add vec-ipa.o
539 * regcache.c (get_thread_regcache): Use VEC_length.
540 (init_register_cache): Likewise.
541 (regcache_cpy): Likewise.
542 (registers_to_string): Iterate reg_defs via VEC_iterate.
543 (find_regno): Likewise.
544 (find_register_by_number): Use VEC_index.
545 (register_size): Call find_register_by_number.
546 (register_data): Call find_register_by_number.
547 (supply_regblock): Use VEC_length.
548 (regcache_raw_read_unsigned): Likewise.
549 * tdesc.c (init_target_desc): Iterate reg_defs via
550 VEC_iterate.
551 (default_description): Update initializer.
552 (copy_target_description): Don't update field num_registers.
553 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
554 <num_registers>: Remove.
555
50a421ac
SM
5562017-09-04 Simon Marchi <simon.marchi@ericsson.com>
557
558 * Makefile.in (.SECONDARY): Define target.
559
23fdd69e
SM
5602017-09-03 Simon Marchi <simon.marchi@ericsson.com>
561
562 * linux-low.c (linux_wait_1): Adjust.
563 * server.c (queue_stop_reply_callback): Adjust.
564
0a2dde4a
SDJ
5652017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
566
567 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
568 QEnvironmentUnset and QEnvironmentReset packets.
569 (handle_query): Inform remote that QEnvironmentHexEncoded,
570 QEnvironmentUnset and QEnvironmentReset are supported.
571
6afd337d
SM
5722017-08-25 Simon Marchi <simon.marchi@ericsson.com>
573
574 * inferiors.h (inferior_target_data): Rename to ...
575 (thread_target_data): ... this.
576 (inferior_regcache_data): Rename to ...
577 (thread_regcache_data): ... this.
578 (set_inferior_regcache_data): Rename to ...
579 (set_thread_regcache_data): ... this.
580 * inferiors.c (inferior_target_data): Rename to ...
581 (thread_target_data): ... this.
582 (inferior_regcache_data): Rename to ...
583 (thread_regcache_data): ... this.
584 (set_inferior_regcache_data): Rename to ...
585 (set_thread_regcache_data): ... this.
586 (free_one_thread): Update.
587 * linux-low.h (get_thread_lwp): Update.
588 * regcache.c (get_thread_regcache): Update.
589 (regcache_invalidate_thread): Update.
590 (free_register_cache_thread): Update.
591 * win32-i386-low.c (update_debug_registers_callback): Update.
592 (win32_get_current_dr): Update.
593 * win32-low.c (thread_rec): Update.
594 (delete_thread_info): Update.
595 (continue_one_thread): Update.
596 (suspend_one_thread): Update.
597
a160cc46
SM
5982017-08-24 Simon Marchi <simon.marchi@ericsson.com>
599
600 * inferiors.c (set_inferior_target_data): Remove.
601 * inferiors.h (set_inferior_target_data): Remove.
602
6d580b63
YQ
6032017-08-18 Yao Qi <yao.qi@linaro.org>
604
605 * Makefile.in (OBS): Add selftest.o.
606 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
607 * configure, config.in: Re-generated.
608 * server.c: Include common/sefltest.h.
609 (captured_main): Handle option --selftest.
610
f5a29eb0
YQ
6112017-08-09 Yao Qi <yao.qi@linaro.org>
612
613 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
614 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
615 i386-avx-mpx.o and i386-mmx.o.
616 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
617 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
618 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
619 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
620 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
621 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
622 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
623 i386/amd64-avx-mpx.xml.
624
57757c2f
YQ
6252017-08-09 Yao Qi <yao.qi@linaro.org>
626
627 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
628 and x32-avx-avx512.o.
629 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
630 i386/x32-avx-avx512.xml.
631
229d26fc
SM
6322017-07-26 Simon Marchi <simon.marchi@ericsson.com>
633
634 * tracepoint.h (enum class fast_tpoint_collect_result): New
635 enumeration.
636 (fast_tracepoint_collecting): Change return type to
637 fast_tpoint_collect_result.
638 * tracepoint.c (fast_tracepoint_collecting): Likewise.
639 * linux-low.h: Include tracepoint.h.
640 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
641 fast_tpoint_collect_result.
642 * linux-low.c (handle_tracepoints): Adjust.
643 (linux_fast_tracepoint_collecting): Change return type to
644 fast_tpoint_collect_result.
645 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
646 linux_wait_1, stuck_in_jump_pad_callback,
647 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
648 proceed_one_lwp): Adjust to type change.
649
2e1e43e1
YQ
6502017-07-10 Yao Qi <yao.qi@linaro.org>
651
652 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
653
adc764e7
YQ
6542017-06-29 Yao Qi <yao.qi@linaro.org>
655
656 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
657 Remove.
658 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
659
a206891a
SM
6602017-06-20 Simon Marchi <simon.marchi@ericsson.com>
661
662 * Makefile.in (IPA_OBJS): Sort and format one item per line.
663
9a6c7d9c
SDJ
6642017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
665
666 * linux-low.c (linux_create_inferior): Adjust code to access the
667 environment information via 'gdb_environ' class.
668 * lynx-low.c (lynx_create_inferior): Likewise.
669 * server.c (our_environ): Make it an instance of 'gdb_environ'.
670 (get_environ): Return a pointer to 'our_environ'.
671 (captured_main): Initialize 'our_environ'.
672 * server.h (get_environ): Adjust prototype.
673 * spu-low.c (spu_create_inferior): Adjust code to access the
674 environment information via 'gdb_environ' class.
675
ae3e2ccf
SM
6762017-06-17 Simon Marchi <simon.marchi@ericsson.com>
677
678 * linux-low.c (linux_read_memory, linux_write_memory): Remove
679 usage of "register" keyword.
680
3e019bdc
SM
6812017-06-17 Simon Marchi <simon.marchi@ericsson.com>
682
683 * configure: Re-generate.
684
8465943a
SM
6852017-06-17 Simon Marchi <simon.marchi@ericsson.com>
686
687 * configure: Re-generate.
688
cf0dd6f0
SM
6892017-06-17 Simon Marchi <simon.marchi@ericsson.com>
690
691 * Makefile.in (COMPILE.pre): Add "-x c++".
692
9845682b
SDJ
6932017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
694
695 * fork-child.c: Conditionally include <signal.h>.
696
aefd8b33
SDJ
6972017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
698
699 * server.c (handle_general_set): Handle new packet
700 "QStartupWithShell".
701 (handle_query): Add "QStartupWithShell" to the list of supported
702 packets.
703 (gdbserver_usage): Add help text explaining the
704 new "--startup-with-shell" and "--no-startup-with-shell" CLI
705 options.
706 (captured_main): Recognize and act upon the presence of the new
707 CLI options.
708
2090129c
SDJ
7092017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
710 Pedro Alves <palves@redhat.com>
711
712 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
713 * configure: Regenerate.
714 * configure.srv (srv_linux_obj): Add "fork-child.o" and
715 "fork-inferior.o".
716 (i[34567]86-*-lynxos*): Likewise.
717 (spu*-*-*): Likewise.
718 * fork-child.c: New file.
719 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
720 and "environ.h".
721 (linux_ptrace_fun): New function.
722 (linux_create_inferior): Adjust function prototype to reflect
723 change on "target.h". Adjust function code to use
724 "fork_inferior".
725 (linux_request_interrupt): Delete "signal_pid".
726 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
727 (lynx_ptrace_fun): New function.
728 (lynx_create_inferior): Adjust function prototype to reflect
729 change on "target.h". Adjust function code to use
730 "fork_inferior".
731 * nto-low.c (nto_create_inferior): Adjust function prototype and
732 code to reflect change on "target.h". Update comments.
733 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
734 "common-terminal.h" and "environ.h".
735 (terminal_fd): Moved to fork-child.c.
736 (old_foreground_pgrp): Likewise.
737 (restore_old_foreground_pgrp): Likewise.
738 (last_status): Make it global.
739 (last_ptid): Likewise.
740 (our_environ): New variable.
741 (startup_with_shell): Likewise.
742 (program_name): Likewise.
743 (program_argv): Rename to...
744 (program_args): ...this.
745 (wrapper_argv): New variable.
746 (start_inferior): Delete function.
747 (get_exec_wrapper): New function.
748 (get_exec_file): Likewise.
749 (get_environ): Likewise.
750 (prefork_hook): Likewise.
751 (post_fork_inferior): Likewise.
752 (postfork_hook): Likewise.
753 (postfork_child_hook): Likewise.
754 (handle_v_run): Update code to deal with arguments coming from the
755 remote host. Update calls from "start_inferior" to
756 "create_inferior".
757 (captured_main): Likewise. Initialize environment variable. Call
758 "have_job_control".
759 * server.h (post_fork_inferior): New prototype.
760 (get_environ): Likewise.
761 (last_status): Declare.
762 (last_ptid): Likewise.
763 (signal_pid): Likewise.
764 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
765 (spu_ptrace_fun): New function.
766 (spu_create_inferior): Adjust function prototype to reflect change
767 on "target.h". Adjust function code to use "fork_inferior".
768 * target.c (target_terminal_init): New function.
769 (target_terminal_inferior): Likewise.
770 (target_terminal_ours): Likewise.
771 * target.h: Include <vector>.
772 (struct target_ops) <create_inferior>: Update prototype.
773 (create_inferior): Update macro.
774 * utils.c (gdb_flush_out_err): New function.
775 * win32-low.c (win32_create_inferior): Adjust function prototype
776 and code to reflect change on "target.h".
777
043a4934
SDJ
7782017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
779
780 * inferiors.c (switch_to_thread): New function.
781
15652511
SDJ
7822017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
783
784 * Makefile.in (SFILE): Add "common/job-control.c".
785 (OBS): Add "job-control.o".
786
21ea5acd
SDJ
7872017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
788
789 * Makefile: Remove "@host_makefile_frag@".
790
e13cb306
PA
7912017-05-05 Pedro Alves <palves@redhat.com>
792
793 * configure: Regenerate.
794
c94fee56
SDJ
7952017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
796
797 * configure: Regenerate.
798
a0ff9e1a
SM
7992017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
800
801 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
802 software_single_step change of return type to
803 std::vector<CORE_ADDR>.
804 * linux-low.c (install_software_single_step_breakpoints):
805 Likewise.
806 * linux-low.h (install_software_single_step_breakpoints):
807 Likewise.
808
be628ab8
SDJ
8092017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
810
811 * remote-utils.c: Include "gdb_termios.h" instead of
812 "terminal.h".
813 * terminal.h: Delete file.
814
7c5ded6a
SDJ
8152017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
816
817 * server.c: Include <vector>.
818 <program_argv, wrapper_argv>: Convert to std::vector.
819 (start_inferior): Rewrite function to use C++.
820 (handle_v_run): Likewise. Update code that calculates the argv
821 based on the vRun packet; use C++.
822 (captured_main): Likewise.
823
436252de
SM
8242017-04-06 Simon Marchi <simon.marchi@ericsson.com>
825
826 * server.c (handle_v_cont): Initialize thread_resume::thread
827 with null_ptid.
828
9bf2a700
PA
8292017-04-05 Pedro Alves <palves@redhat.com>
830
831 * configure: Regenerate.
832
a121b7c1
PA
8332017-04-05 Pedro Alves <palves@redhat.com>
834
835 * gdbreplay.c (sync_error): Constify.
836 * linux-x86-low.c (push_opcode): Constify.
837
21c8a587
PA
8382017-04-05 Pedro Alves <palves@redhat.com>
839
840 * win32-low.c (get_child_debug_event)
841 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
842 Report TARGET_WAITKIND_SPURIOUS instead.
843
fb32b4f7
PA
8442017-04-05 Pedro Alves <palves@redhat.com>
845
846 * remote-utils.c (remote_prepare, remote_open): Constify.
847 * remote-utils.h (remote_prepare, remote_open): Constify.
848 * server.c (captured_main): Constify 'port' handling.
849
65dd1e59
SM
8502017-04-04 Simon Marchi <simon.marchi@ericsson.com>
851
852 * Makefile.in (clean): Clear .deps.
853
8fa5b777
SM
8542017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
855
856 * .gitignore: Remove generated files, replace with wildcard.
857 * (clean): Replace removal of generated files with wildcard.
858 (version.c): Replace with...
859 (version-generated.c): ...this.
860 (xml-builtin.c): Replace with...
861 (xml-builtin-generated.c): ...this.
862 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
863 (%.c: *regformats*): Replace with...
864 (%-generated.c: *regformats*): ...this.
865
a12e714b
MF
8662017-03-27 Max Filippov <jcmvbkbc@gmail.com>
867
868 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
869 (xtensa_fill_gregset): Call collect_register_by_name for
870 threadptr register.
871 (xtensa_store_gregset): Call supply_register_by_name for
872 threadptr register.
873
1a09b50a
MF
8742017-03-27 Max Filippov <jcmvbkbc@gmail.com>
875
876 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
877 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
878 (xtensa_store_gregset): Call supply_register for all registers in
879 a0_regnum..a0_regnum + C0_NREGS range.
880
1a01e7c6
SM
8812017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
882
883 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
884 (ax-ipa.o: ax.c): Remove.
885 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
886 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
887 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
888 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
889 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
890
36bc18a8
SM
8912017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
892
893 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
894 (print-utils-ipa.o: ../common/print-utils.c): Remove.
895 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
896 (errors-ipa.o: ../common/errors.c): Remove.
897 (format-ipa.o: ../common/format.c): Remove.
898 (common-utils-ipa.o: ../common/common-utils.c): Remove.
899
a8ebe3d5
SM
9002017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
901
902 * Makefile.in (%-ipa.o: %.c): New rule.
903 (tracepoint-ipa.o: tracepoint.c): Remove.
904 (utils-ipa.o: utils.c): Remove.
905 (remote-utils-ipa.o: remote-utils.c): Remove.
906 (regcache-ipa.o: regcache.c): Remove.
907 (i386-linux-ipa.o: i386-linux.c): Remove.
908 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
909 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
910 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
911 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
912 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
913 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
914 (amd64-linux-ipa.o: amd64-linux.c): Remove.
915 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
916 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
917 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
918 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
919 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
920 (aarch64-ipa.o: aarch64.c): Remove.
921 (s390-linux32-ipa.o: s390-linux32.c): Remove.
922 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
923 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
924 (s390-linux64-ipa.o: s390-linux64.c): Remove.
925 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
926 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
927 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
928 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
929 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
930 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
931 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
932 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
933 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
934 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
935 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
936 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
937 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
938 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
939 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
940 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
941 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
942 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
943 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
944 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
945 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
946 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
947 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
948 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
949 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
950 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
951 (tdesc-ipa.o: tdesc.c): Remove.
952 (x32-linux-ipa.o: x32-linux.c): Remove.
953 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
954 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
955
50cfacb7
SM
9562017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
957
958 * Makefile.in (%.o: ../arch/%.c): New rule.
959 (arm.o: ../arch/arm.c): Remove.
960 (arm-linux.o: ../arch/arm-linux.c): Remove.
961 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
962 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
963
c5a22423
SM
9642017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
965
966 * Makefile.in (%.o: ../nat/%.c): New rule.
967 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
968 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
969 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
970 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
971 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
972 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
973 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
974 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
975 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
976 (linux-personality.o: ../nat/linux-personality.c): Remove.
977 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
978 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
979 (x86-linux.o: ../nat/x86-linux.c): Remove.
980 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
981 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
982
6bda016b
SM
9832017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
984
985 * Makefile.in (%.o: ../common/%.c): New rule.
986 (signals.o: ../common/signals.c): Remove.
987 (print-utils.o: ../common/print-utils.c): Remove.
988 (rsp-low.o: ../common/rsp-low.c): Remove.
989 (common-utils.o: ../common/common-utils.c): Remove.
990 (posix-strerror.o: ../common/posix-strerror.c): Remove.
991 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
992 (vec.o: ../common/vec.c): Remove.
993 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
994 (xml-utils.o: ../common/xml-utils.c): Remove.
995 (ptid.o: ../common/ptid.c): Remove.
996 (buffer.o: ../common/buffer.c): Remove.
997 (format.o: ../common/format.c): Remove.
998 (filestuff.o: ../common/filestuff.c): Remove.
999 (agent.o: ../common/agent.c): Remove.
1000 (errors.o: ../common/errors.c): Remove.
1001 (environ.o: ../common/environ.c): Remove.
1002 (common-debug.o: ../common/common-debug.c): Remove.
1003 (cleanups.o: ../common/cleanups.c): Remove.
1004 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1005 (fileio.o: ../common/fileio.c): Remove.
1006 (common-regcache.o: ../common/common-regcache.c): Remove.
1007 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1008 (new-op.o: ../common/new-op.c): Remove.
1009 (btrace-common.o: ../common/btrace-common.c): Remove.
1010
21122961
SM
10112017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1012
1013 * Makefile.in (%.o: ../target/%.c): New rule.
1014 (waitstatus.o: ../target/waitstatus.c): Remove.
1015
c362e621
SM
10162017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1017
1018 * Makefile.in
1019 (%.c: ../regformats/%.dat,
1020 (%.c: ../regformats/arm/%.dat,
1021 (%.c: ../regformats/i386/%.dat,
1022 (%.c: ../regformats/rs6000/%.dat): New rules.
1023 (aarch64.c): Remove.
1024 (reg-arm.c): Remove.
1025 (arm-with-iwmmxt.c): Remove.
1026 (arm-with-vfpv2.c): Remove.
1027 (arm-with-vfpv3.c): Remove.
1028 (arm-with-neon.c): Remove.
1029 (reg-bfin.c): Remove.
1030 (reg-cris.c): Remove.
1031 (reg-crisv32.c): Remove.
1032 (i386.c): Remove.
1033 (i386-linux.c): Remove.
1034 (i386-avx.c): Remove.
1035 (i386-avx-linux.c): Remove.
1036 (i386-avx-avx512.c): Remove.
1037 (i386-avx-avx512-linux.c): Remove.
1038 (i386-mpx.c): Remove.
1039 (i386-mpx-linux.c): Remove.
1040 (i386-avx-mpx-avx512-pku.c): Remove.
1041 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1042 (i386-avx-mpx.c): Remove.
1043 (i386-avx-mpx-linux.c): Remove.
1044 (i386-mmx.c): Remove.
1045 (i386-mmx-linux.c): Remove.
1046 (reg-ia64.c): Remove.
1047 (reg-m32r.c): Remove.
1048 (reg-m68k.c): Remove.
1049 (reg-cf.c): Remove.
1050 (mips-linux.c): Remove.
1051 (mips-dsp-linux.c): Remove.
1052 (mips64-linux.c): Remove.
1053 (mips64-dsp-linux.c): Remove.
1054 (nios2-linux.c): Remove.
1055 (powerpc-32.c): Remove.
1056 (powerpc-32l.c): Remove.
1057 (powerpc-altivec32l.c): Remove.
1058 (powerpc-cell32l.c): Remove.
1059 (powerpc-vsx32l.c): Remove.
1060 (powerpc-isa205-32l.c): Remove.
1061 (powerpc-isa205-altivec32l.c): Remove.
1062 (powerpc-isa205-vsx32l.c): Remove.
1063 (powerpc-e500l.c): Remove.
1064 (powerpc-64l.c): Remove.
1065 (powerpc-altivec64l.c): Remove.
1066 (powerpc-cell64l.c): Remove.
1067 (powerpc-vsx64l.c): Remove.
1068 (powerpc-isa205-64l.c): Remove.
1069 (powerpc-isa205-altivec64l.c): Remove.
1070 (powerpc-isa205-vsx64l.c): Remove.
1071 (s390-linux32.c): Remove.
1072 (s390-linux32v1.c): Remove.
1073 (s390-linux32v2.c): Remove.
1074 (s390-linux64.c): Remove.
1075 (s390-linux64v1.c): Remove.
1076 (s390-linux64v2.c): Remove.
1077 (s390-te-linux64.c): Remove.
1078 (s390-vx-linux64.c): Remove.
1079 (s390-tevx-linux64.c): Remove.
1080 (s390x-linux64.c): Remove.
1081 (s390x-linux64v1.c): Remove.
1082 (s390x-linux64v2.c): Remove.
1083 (s390x-te-linux64.c): Remove.
1084 (s390x-vx-linux64.c): Remove.
1085 (s390x-tevx-linux64.c): Remove.
1086 (tic6x-c64xp-linux.c): Remove.
1087 (tic6x-c64x-linux.c): Remove.
1088 (tic6x-c62x-linux.c): Remove.
1089 (reg-sh.c): Remove.
1090 (reg-sparc64.c): Remove.
1091 (reg-spu.c): Remove.
1092 (amd64.c): Remove.
1093 (amd64-linux.c): Remove.
1094 (amd64-avx.c): Remove.
1095 (amd64-avx-linux.c): Remove.
1096 (amd64-avx-avx512.c): Remove.
1097 (amd64-avx-avx512-linux.c): Remove.
1098 (amd64-mpx.c): Remove.
1099 (amd64-mpx-linux.c): Remove.
1100 (amd64-avx-mpx-avx512-pku.c): Remove.
1101 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1102 (amd64-avx-mpx.c): Remove.
1103 (amd64-avx-mpx-linux.c): Remove.
1104 (x32.c): Remove.
1105 (x32-linux.c): Remove.
1106 (x32-avx.c): Remove.
1107 (x32-avx-linux.c): Remove.
1108 (x32-avx-avx512.c): Remove.
1109 (x32-avx-avx512-linux.c): Remove.
1110 (reg-xtensa.c): Remove.
1111 (reg-tilegx.c): Remove.
1112 (reg-tilegx32.c): Remove.
1113
1672e0d9
SDJ
11142017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1115
1116 * Makefile.in (SFILES): Add "common/environ.c".
1117 (OBJS): Add "common/environ.h".
1118
239b6d10
WT
11192017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1120
1121 * configure.ac: Check if the fs_base and gs_base members of
1122 `struct user_regs_struct' exist.
1123 * config.in: Regenerated.
1124 * configure: Likewise.
1125
694b382c
AT
11262017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1127
1128 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1129 target_read_memory.
1130 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1131 (get_next_pcs_syscall_next_pc): Likewise.
1132
7dc53023
LM
11332016-12-23 Luis Machado <lgustavo@codesourcery.com>
1134
1135 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1136 * nto-x86-low.c: Likewise.
1137
ad02e4fe
SM
11382016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1139
1140 * Makefile.in: Include disable-implicit-rules.mk.
1141
dcb07cfa
PA
11422016-11-23 Pedro Alves <palves@redhat.com>
1143
1144 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1145 (debug_vprintf): Use std::chrono::steady_clock instead of
1146 gettimeofday. Use '.' instead of ':'.
1147 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1148 (get_timestamp): Use std::chrono::steady_clock instead of
1149 gettimeofday.
1150
8629c02c
SM
11512016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1152
1153 * Makefile.in: Fix whitespace formatting.
1154
b593ecca
SM
11552016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1156
1157 * Makefile.in (SFILES, OBS): Flatten list and order
1158 alphabetically.
1159
9986ba08
PA
11602016-11-23 Pedro Alves <palves@redhat.com>
1161
1162 * event-loop.c (handle_file_event): Use warning.
1163 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1164 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1165 Use warning.
1166
4eefa7bc
PA
11672016-11-23 Pedro Alves <palves@redhat.com>
1168
1169 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1170 output.
1171 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1172 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1173 debug_printf and debug_flush for debug output.
1174 * server.c (handle_general_set): Likewise.
1175 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1176 output.
1177
5443506e
SM
11782016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1179
1180 * Makefile.in (.c.o): Replace rule with ...
1181 (%.o: %.c): ... this one.
1182
3b165252
SM
11832016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1184
1185 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1186 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1187 make.
1188 * configure.ac: Remove checks for the make program.
1189 * configure: Re-generate.
1190
0bcda685
PA
11912016-10-28 Pedro Alves <palves@redhat.com>
1192
1193 * Makefile.in (CXX_DIALECT): Get from configure.
1194 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1195 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1196 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1197 * config.in: Regenerate.
1198 * configure: Regenerate.
1199
c3805894
YQ
12002016-10-27 Yao Qi <yao.qi@linaro.org>
1201
1202 * linux-low.c (linux_supports_range_stepping): Return true if
1203 can_software_single_step return true.
1204
89342618
YQ
12052016-10-27 Yao Qi <yao.qi@linaro.org>
1206
1207 * inferiors.c (find_inferior_in_random): New function.
1208 * inferiors.h (find_inferior_in_random): Declare.
1209 * linux-low.c (linux_wait_for_event_filtered): Call
1210 find_inferior_in_random instead of find_inferior.
1211
e3652c84
YQ
12122016-10-27 Yao Qi <yao.qi@linaro.org>
1213
1214 * linux-low.c (linux_wait_1): If single-step breakpoints are
1215 inserted, remove them.
1216
5a04c4cf
PA
12172016-10-26 Pedro Alves <palves@redhat.com>
1218
1219 * linux-low.c (handle_extended_wait): Link parent/child fork
1220 threads.
1221 (linux_wait_1): Unlink them.
1222 (linux_set_resume_request): Ignore resume requests for
1223 already-resumed and unhandled fork child threads.
1224 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1225 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1226 New functions.
1227 (handle_v_requests) <vCont>: Don't call require_running.
1228 * server.h (in_queued_stop_replies): New declaration.
1229
cb93dc7f
YQ
12302016-10-24 Yao Qi <yao.qi@linaro.org>
1231
1232 PR server/20733
1233 * linux-aarch64-low.c (append_insns): Cast the return value to
1234 'uint32_t *'.
1235
a1078bea
YQ
12362016-10-10 Yao Qi <yao.qi@linaro.org>
1237
1238 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1239
1fb77080
SDJ
12402016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1241
1242 * target.c (target_supports_multi_process): New function, moved
1243 from...
1244 * target.h (target_supports_multi_process): ... here. Remove
1245 macro.
1246
39b5a3b9
TT
12472016-10-05 Tom Tromey <tom@tromey.com>
1248
1249 PR remote/20655:
1250 * tracepoint.c (handle_tracepoint_bkpts): Check
1251 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1252
c1d0b70a
YQ
12532016-10-05 Yao Qi <yao.qi@linaro.org>
1254
1255 * configure.srv: Update the path of arm-*.xml files.
1256
0a69eedb
YQ
12572016-10-05 Terry Guo <terry.guo@arm.com>
1258 Yao Qi <yao.qi@linaro.org>
1259
1260 * Makefile.in: Adjust the path of rules.
1261 * configure.srv: Update the path of xml files.
1262 * regformats/arm-with-iwmmxt.dat: Regenerated.
1263 * regformats/arm-with-neon.dat: Likewise.
1264 * regformats/arm-with-vfpv2.dat: Likewise.
1265 * regformats/arm-with-vfpv3.dat Likewise.
1266
17e16485
YQ
12672016-09-30 Yao Qi <yao.qi@linaro.org>
1268
1269 PR gdbserver/20627
1270 * target.c (target_stop_and_wait): Don't call
1271 target_continue_no_signal, use resume_stop instead.
1272
edeeb602
YQ
12732016-09-26 Yao Qi <yao.qi@linaro.org>
1274
1275 * linux-low.c (linux_wait_1): Call debug_exit.
1276
503b1c39
PA
12772016-09-23 Pedro Alves <palves@redhat.com>
1278
1279 * Makefile.in (SFILES): Add common/new-op.c.
1280 (OBS): Add common/new-op.o.
1281 (new-op.o): New rule.
1282
74172ecf
SM
12832016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1284
1285 * .gitinore: Ignore more files.
1286
fc6cda2e
YQ
12872016-09-21 Yao Qi <yao.qi@linaro.org>
1288
1289 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1290 23.
1291
bc1e6c81
SDJ
12922016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1293
1294 * server.c (start_inferior): Call target_mourn_inferior instead of
1295 mourn_inferior; pass ptid_t argument to it.
1296 (resume): Likewise.
1297 (handle_target_event): Likewise.
1298 * target.c (target_mourn_inferior): New function.
1299 * target.h (mourn_inferior): Delete macro.
1300
0e00e962
AA
13012016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1302
1303 * linux-low.c (lwp_is_stepping): New function.
1304
1d8cb77d
CL
13052016-09-06 Carl Love <cel@us.ibm.com>
1306
1307 * server.c (start_inferior): Fixed comment, requested comment change
1308 didn't get updated correctly. Removed reference to ptrace () call as
1309 it is only true on Linux systems.
1310
7313bced
CL
13112016-09-06 Carl Love <cel@us.ibm.com>
1312
1313 * server.c (start_inferior): Do not call
1314 function target_post_create_inferior () if the
1315 inferior process has already exited.
1316
cf6de44d
PA
13172016-09-05 Pedro Alves <palves@redhat.com>
1318
1319 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1320 (COMPILE.pre, CC_LD): Use CXX directly.
1321 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1322 * acinclude.m4: Don't include build-with-cxx.m4.
1323 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1324 * configure: Regenerate.
1325
c1da6748
AT
13262016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1327
1328 PR gdb/19495
1329 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1330 call writing data to own_buf.
1331
f2b9e3df
SDJ
13322016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1333
1334 * target.c (mywait): Call target_wait instead of
1335 the_target->wait.
1336 (target_wait): New function.
1337
049a8570
SDJ
13382016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1339
1340 * server.c (start_inferior): New variable 'ptid'. Replace calls
1341 to the_target->resume by target_continue{,_no_signal}, depending
1342 on the case.
1343 * target.c (target_stop_and_wait): Call target_continue_no_signal
1344 instead of the_target->resume.
1345 (target_continue): New function.
1346
3aa5cfa0
AT
13472016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1348
1349 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1350
754653a7
AZ
13512016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1352
1353 PR server/20491
1354 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1355 ps_prochandle.
1356 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1357 * linux-arm-low.c (ps_get_thread_area): Likewise.
1358 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1359 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1360 * linux-mips-low.c (ps_get_thread_area): Likewise.
1361 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1362 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1363 * linux-x86-low.c (ps_get_thread_area): Likewise.
1364 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1365
ed036b40
PA
13662016-08-19 Pedro Alves <palves@redhat.com>
1367
1368 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1369
c8ef42ee
PA
13702016-08-19 Pedro Alves <palves@redhat.com>
1371
1372 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1373 comment. Use memcpy instead of casting through unsigned long.
1374
9c235a72
PA
13752016-08-19 Pedro Alves <palves@redhat.com>
1376
1377 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1378 allocating around 0x80000000.
1379
201506da
PA
13802016-08-19 Pedro Alves <palves@redhat.com>
1381
1382 PR gdb/20415
1383 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1384 (x32-avx512-linux-ipa.o): New rules.
1385 * configure.ac (x86_64-*-linux*): New x32 check.
1386 * configure.srv (ipa_x32_linux_regobj): New.
1387 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1388 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1389 descriptions.
1390 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1391 descriptions.
1392 * configure: Regenerate.
1393
f348d89a
PA
13942016-08-09 Pedro Alves <palves@redhat.com>
1395
1396 PR gdb/18653
1397 * Makefile.in (OBS): Add signals-state-save-restore.o.
1398 (signals-state-save-restore.o): New rule.
1399 * config.in: Regenerate.
1400 * configure: Regenerate.
1401 * linux-low.c: Include "signals-state-save-restore.h".
1402 (linux_create_inferior): Call
1403 restore_original_signals_state.
1404 * server.c: Include "dispositions-save-restore.h".
1405 (captured_main): Call save_original_signals_state.
1406
1baf5149
PA
14072016-08-05 Pedro Alves <palves@redhat.com>
1408
1409 * configure: Regenerate.
1410
fcd4a73d
YQ
14112016-08-04 Yao Qi <yao.qi@linaro.org>
1412
1413 * linux-low.c (regsets_fetch_inferior_registers): Check
1414 errno is ESRCH or not.
1415
979659d0
YQ
14162016-08-02 Yao Qi <yao.qi@linaro.org>
1417
1418 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1419 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1420 (thread_db_load_search): Update.
1421 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1422 td_ta_set_event and td_ta_event_getmsg.
1423
6598661d
PA
14242016-07-26 Pedro Alves <palves@redhat.com>
1425
1426 PR server/20414
1427 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1428 of unsigned long for 64-bit registers and use uint32_t instead of
1429 unsigned int for 32-bit registers.
1430
9cf12d57
PA
14312016-07-26 Pedro Alves <palves@redhat.com>
1432
1433 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1434 to 'ptrace'.
1435
305450ed
TT
14362016-07-21 Tom Tromey <tom@tromey.com>
1437
1438 * configure: Rebuild.
1439
2583da7c
YQ
14402016-07-21 Yao Qi <yao.qi@linaro.org>
1441
1442 * mem-break.c (find_gdb_breakpoint): Cast bp to
1443 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1444
21536b36
YQ
14452016-07-21 Yao Qi <yao.qi@linaro.org>
1446
1447 * server.c (handle_v_requests): Support s and S actions
1448 if target_supports_software_single_step return true.
1449
8901d193
YQ
14502016-07-21 Yao Qi <yao.qi@linaro.org>
1451
1452 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1453 is resume_step, call maybe_hw_step.
1454 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1455 and unstop them.
1456 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1457 breakpoints or not.
1458 (proceed_one_lwp): If resume request is resume_step, install
1459 reinsert breakpoints and call maybe_hw_step.
1460
0e9a339e
YQ
14612016-07-21 Yao Qi <yao.qi@linaro.org>
1462
1463 * linux-low.c (proceed_one_lwp): Declare.
1464 (linux_resume_one_thread): Remove local variable 'step'.
1465 Lift code enqueue signal. Call proceed_one_lwp instead of
1466 linux_resume_one_lwp.
1467
4281b351
YQ
14682016-07-21 Yao Qi <yao.qi@linaro.org>
1469
1470 * linux-low.c (linux_resume_one_thread): Call
1471 enqueue_pending_signal.
1472
984a2c04
YQ
14732016-07-21 Yao Qi <yao.qi@linaro.org>
1474
1475 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1476 * inferiors.c (do_restore_current_thread_cleanup): New function.
1477 (make_cleanup_restore_current_thread): Likewise.
1478 * linux-low.c (install_software_single_step_breakpoints): Call
1479 make_cleanup_restore_current_thread. Switch current_thread to
1480 thread.
1481
bec903c9
YQ
14822016-07-21 Yao Qi <yao.qi@linaro.org>
1483
1484 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1485 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1486 (clone_one_breakpoint): Likewise.
1487 (delete_reinsert_breakpoints): Change parameter to thread.
1488 Callers updated.
1489 (has_reinsert_breakpoints): Likewise.
1490 (uninsert_reinsert_breakpoints): Likewise.
1491 (reinsert_reinsert_breakpoints): Likewise.
1492 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1493 (delete_reinsert_breakpoints): Likewise.
1494 (reinsert_reinsert_breakpoints): Likewise.
1495 (uninsert_reinsert_breakpoints): Likewise.
1496 (has_reinsert_breakpoints): Likewise.
1497
63c40ec7
YQ
14982016-07-21 Yao Qi <yao.qi@linaro.org>
1499
1500 * inferiors.c (get_thread_process): Make parameter const.
1501 * inferiors.h (get_thread_process): Update declaration.
1502 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1503 Add new parameters child_thread and parent_thread. Callers
1504 updated.
1505 * mem-break.h (clone_all_breakpoints): Update declaration.
1506
9aa76cd0
YQ
15072016-07-21 Yao Qi <yao.qi@linaro.org>
1508
1509 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1510 <command_list, handler>: Remove.
1511 (struct gdb_breakpoint): New.
1512 (struct other_breakpoint): New.
1513 (struct reinsert_breakpoint): New.
1514 (is_gdb_breakpoint): New function.
1515 (any_persistent_commands): Update command_list if
1516 is_gdb_breakpoint returns true.
1517 (set_breakpoint): Create breakpoints according to their types.
1518 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1519 (set_gdb_breakpoint_1): Likewise.
1520 (set_gdb_breakpoint): Likewise.
1521 (clear_breakpoint_conditions): Change parameter type to
1522 'struct gdb_breakpoint *'.
1523 (clear_breakpoint_commands): Likewise.
1524 (clear_breakpoint_conditions_and_commands): Likewise.
1525 (add_condition_to_breakpoint): Likewise.
1526 (add_breakpoint_condition): Likewise.
1527 (add_commands_to_breakpoint): Likewise.
1528 (check_breakpoints): Check other_breakpoint.
1529 (clone_one_breakpoint): Clone breakpopint according to its type.
1530 * mem-break.h (struct gdb_breakpoint): Declare.
1531 (set_gdb_breakpoint): Update declaration.
1532 (clear_breakpoint_conditions_and_commands): Likewise.
1533 (add_breakpoint_condition): Likewise.
1534 (add_breakpoint_commands): Likewise.
1535 * server.c (process_point_options): Change parameter type to
1536 'struct gdb_breakpoint *'.
1537
811f8301
YQ
15382016-07-21 Yao Qi <yao.qi@linaro.org>
1539
1540 * mem-break.c (set_breakpoint_at): Rename it to ...
1541 (set_breakpoint_type_at): ... it.
1542 (set_breakpoint_at): Call set_breakpoint_type_at.
1543 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1544 * mem-break.h (set_breakpoint_at): Update comments.
1545
b1c51e36
CLT
15462016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1547
1548 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1549 to buf parameter.
1550 (nios2_store_gregset): Likewise.
1551
ced2dffb
PA
15522016-07-01 Pedro Alves <palves@redhat.com>
1553 Antoine Tremblay <antoine.tremblay@ericsson.com>
1554
1555 * linux-low.c: Change interface to take the target lwp_info
1556 pointer directly and return void. Handle detaching from a zombie
1557 thread.
1558 (linux_detach_lwp_callback): New function.
1559 (linux_detach): Detach from the leader thread after detaching from
1560 the clone threads.
1561
2ac09a5b
YQ
15622016-06-28 Yao Qi <yao.qi@linaro.org>
1563
1564 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1565 for variable new_offset.
1566 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1567 (aarch64_ftrace_insn_reloc_cb): Likewise.
1568 (aarch64_ftrace_insn_reloc_tb): Likewise.
1569 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1570 PRIx64 instead of PRIx32.
1571
79e7fd4f
YQ
15722016-06-28 Yao Qi <yao.qi@linaro.org>
1573
1574 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1575 (the_low_target): Install arm_get_syscall_trapinfo.
1576
061fc021
YQ
15772016-06-28 Yao Qi <yao.qi@linaro.org>
1578
1579 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1580 function.
1581 (the_low_target): Install aarch64_get_syscall_trapinfo.
1582
4cc32bec
YQ
15832016-06-28 Yao Qi <yao.qi@linaro.org>
1584
1585 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1586 Callers updated.
1587 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1588 Remove parameter sysno.
1589 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1590 sysret.
1591
782c1122
AA
15922016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1593
1594 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1595 (s390_emit_ne_goto): Likewise.
1596 (s390_emit_lt_goto): Likewise.
1597 (s390_emit_le_goto): Likewise.
1598 (s390_emit_gt_goto): Likewise.
1599 (s390_emit_ge_goto): Likewise.
1600 (s390x_emit_eq_goto): Likewise.
1601 (s390x_emit_ne_goto): Likewise.
1602 (s390x_emit_lt_goto): Likewise.
1603 (s390x_emit_le_goto): Likewise.
1604 (s390x_emit_gt_goto): Likewise.
1605 (s390x_emit_ge_goto): Likewise.
1606 (s390_emit_ops_impl): Mark variable static.
1607 (s390x_emit_ops): Likewise.
1608
2e7b624b
YQ
16092016-06-17 Yao Qi <yao.qi@linaro.org>
1610
1611 * linux-low.c (handle_extended_wait): Call
1612 uninsert_reinsert_breakpoints for the parent process. Remove
1613 reinsert breakpoints from the child process. Reinsert them to
1614 the parent process when vfork is done.
1615 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1616 (reinsert_reinsert_breakpoints): New function.
1617 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1618 (reinsert_reinsert_breakpoints): Declare.
1619
8a81c5d7
YQ
16202016-06-17 Yao Qi <yao.qi@linaro.org>
1621
1622 * linux-low.c (handle_extended_wait): If the parent is doing
1623 step-over, remove the reinsert breakpoints from the forked child.
1624
f50bf8e5
YQ
16252016-06-17 Yao Qi <yao.qi@linaro.org>
1626
1627 * linux-low.c (unsuspend_all_lwps): Declare.
1628 (linux_low_filter_event): If thread exited, call finish_step_over.
1629 If step-over is finished, unsuspend other threads.
1630
8376a3cb
YQ
16312016-06-17 Yao Qi <yao.qi@linaro.org>
1632
1633 * linux-low.c (linux_resume_one_lwp_throw): Assert
1634 has_reinsert_breakpoints returns false.
1635 * mem-break.c (delete_disabled_breakpoints): Assert
1636 bp type isn't reinsert_breakpoint.
1637
f79b145d
YQ
16382016-06-17 Yao Qi <yao.qi@linaro.org>
1639
1640 * linux-low.c (maybe_hw_step): New function.
1641 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1642 (finish_step_over): Switch current_thread to lwp temporarily,
1643 and assert has_reinsert_breakpoints returns true.
1644 (proceed_one_lwp): Call maybe_hw_step.
1645 * mem-break.c (has_reinsert_breakpoints): New function.
1646 * mem-break.h (has_reinsert_breakpoints): Declare.
1647
0ae534d2
JT
16482016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1649
1650 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1651
fcdad592
YQ
16522016-05-17 Yao Qi <yao.qi@linaro.org>
1653
1654 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1655 instead of find_inferior.
1656
9e784964
YQ
16572016-05-05 Yao Qi <yao.qi@linaro.org>
1658
1659 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1660 Initialize res to zero.
1661
cf2ebb6e
YQ
16622016-05-05 Yao Qi <yao.qi@linaro.org>
1663
1664 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1665 to uint32_t.
1666
c1aebf87
UW
16672016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1668
1669 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1670 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1671 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1672
35fd2deb 16732016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 1674 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
1675
1676 * tracepoint.c (write_inferior_int8): New function.
1677 (cmd_qtenable_disable): Write enable flag using
1678 write_inferior_int8.
1679
484b3c32
YQ
16802016-04-25 Yao Qi <yao.qi@linaro.org>
1681
1682 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1683 (need_step_over_p): Return zero if the LWP has pending signals
1684 can be delivered on software single step target.
1685
85ba7d86
YQ
16862016-04-25 Yao Qi <yao.qi@linaro.org>
1687
1688 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1689 return instead of error.
1690
3539aa13
YQ
16912016-04-22 Yao Qi <yao.qi@linaro.org>
1692
1693 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1694 to 23.
1695
5b061e98
YQ
16962016-04-22 Yao Qi <yao.qi@linaro.org>
1697
1698 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1699 signal when stepping over breakpoint with software single
1700 step.
1701
3451269c
PA
17022016-04-21 Pedro Alves <palves@redhat.com>
1703
1704 * linux-s390-low.c (s390_collect_ptrace_register)
1705 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1706 add casts.
1707 (s390_check_regset): Use void * instead of gdb_byte *.
1708
a2358508
PA
17092016-04-20 Pedro Alves <palves@redhat.com>
1710
1711 * configure: Renegerate.
1712
6885166d
YQ
17132016-04-20 Yao Qi <yao.qi@linaro.org>
1714
1715 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1716 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1717 number 16.
1718 (arm_store_gregset): Likewise.
1719
2b863f51
WT
17202016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1721
1722 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1723 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1724 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1725 (amd64-avx-mpx-linux.c): New rules.
1726 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1727 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1728 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1729 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1730 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1731 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1732 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1733 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1734 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1735 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1736 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1737 * linux-x86-low.c (x86_linux_read_description): Add case for
1738 X86_XSTATE_AVX_MPX_MASK.
1739 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1740 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1741 init_registers_i386_avx_mpx_linux.
1742 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1743 (initialize_low_tracepoint): Call
1744 init_registers_i386_avx_mpx_linux.
1745 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1746 (initialize_low_tracepoint): Call
1747 init_registers_amd64_avx_mpx_linux.
1748 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1749 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1750 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1751 declarations.
1752
9b30624b
PA
17532016-04-18 Pedro Alves <palves@redhat.com>
1754
1755 * configure: Regenerate.
1756
45e3745e
AT
17572016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1758
1759 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1760 (aarch64_emit_sub): Likewise.
1761
2afc13ff
PA
17622016-04-12 Pedro Alves <palves@redhat.com>
1763
1764 * utils.c (prepare_to_throw_exception): Delete.
1765
6e774b13
SM
17662016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1767
1768 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1769
4dca19f8
MK
17702016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1771
1772 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1773
d0a9981f
MK
17742016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1775
1776 * linux-aarch64-ipa.c: Add <elf.h> include.
1777 * linux-ppc-ipa.c: Add <elf.h> include.
1778 * linux-s390-ipa.c: Add <elf.h> include.
1779
252db07e
MK
17802016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1781
1782 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1783 (get_raw_reg_ptr): Likewise.
1784 (get_trace_state_variable_value_ptr): Likewise.
1785 (set_trace_state_variable_value_ptr): Likewise.
1786 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1787 char *.
1788
14e2b6d9
MK
17892016-03-31 Wei-cheng Wang <cole945@gmail.com>
1790 Marcin Kościelnicki <koriakin@0x04.net>
1791
1792 PR/17221
1793 * linux-ppc-low.c (emit_insns): New function.
1794 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1795 (ppc_emit_prologue): New function.
1796 (ppc_emit_epilogue): New function.
1797 (ppc_emit_add): New function.
1798 (ppc_emit_sub): New function.
1799 (ppc_emit_mul): New function.
1800 (ppc_emit_lsh): New function.
1801 (ppc_emit_rsh_signed): New function.
1802 (ppc_emit_rsh_unsigned): New function.
1803 (ppc_emit_ext): New function.
1804 (ppc_emit_zero_ext): New function.
1805 (ppc_emit_log_not): New function.
1806 (ppc_emit_bit_and): New function.
1807 (ppc_emit_bit_or): New function.
1808 (ppc_emit_bit_xor): New function.
1809 (ppc_emit_bit_not): New function.
1810 (ppc_emit_equal): New function.
1811 (ppc_emit_less_signed): New function.
1812 (ppc_emit_less_unsigned): New function.
1813 (ppc_emit_ref): New function.
1814 (ppc_emit_const): New function.
1815 (ppc_emit_reg): New function.
1816 (ppc_emit_pop): New function.
1817 (ppc_emit_stack_flush): New function.
1818 (ppc_emit_swap): New function.
1819 (ppc_emit_stack_adjust): New function.
1820 (ppc_emit_call): New function.
1821 (ppc_emit_int_call_1): New function.
1822 (ppc_emit_void_call_2): New function.
1823 (ppc_emit_if_goto): New function.
1824 (ppc_emit_goto): New function.
1825 (ppc_emit_eq_goto): New function.
1826 (ppc_emit_ne_goto): New function.
1827 (ppc_emit_lt_goto): New function.
1828 (ppc_emit_le_goto): New function.
1829 (ppc_emit_gt_goto): New function.
1830 (ppc_emit_ge_goto): New function.
1831 (ppc_write_goto_address): New function.
1832 (ppc_emit_ops_impl): New static variable.
1833 (ppc64v1_emit_prologue): New function.
1834 (ppc64v2_emit_prologue): New function.
1835 (ppc64_emit_epilogue): New function.
1836 (ppc64_emit_add): New function.
1837 (ppc64_emit_sub): New function.
1838 (ppc64_emit_mul): New function.
1839 (ppc64_emit_lsh): New function.
1840 (ppc64_emit_rsh_signed): New function.
1841 (ppc64_emit_rsh_unsigned): New function.
1842 (ppc64_emit_ext): New function.
1843 (ppc64_emit_zero_ext): New function.
1844 (ppc64_emit_log_not): New function.
1845 (ppc64_emit_bit_and): New function.
1846 (ppc64_emit_bit_or): New function.
1847 (ppc64_emit_bit_xor): New function.
1848 (ppc64_emit_bit_not): New function.
1849 (ppc64_emit_equal): New function.
1850 (ppc64_emit_less_signed): New function.
1851 (ppc64_emit_less_unsigned): New function.
1852 (ppc64_emit_ref): New function.
1853 (ppc64_emit_const): New function.
1854 (ppc64v1_emit_reg): New function.
1855 (ppc64v2_emit_reg): New function.
1856 (ppc64_emit_pop): New function.
1857 (ppc64_emit_stack_flush): New function.
1858 (ppc64_emit_swap): New function.
1859 (ppc64v1_emit_call): New function.
1860 (ppc64v2_emit_call): New function.
1861 (ppc64v1_emit_int_call_1): New function.
1862 (ppc64v2_emit_int_call_1): New function.
1863 (ppc64v1_emit_void_call_2): New function.
1864 (ppc64v2_emit_void_call_2): New function.
1865 (ppc64_emit_if_goto): New function.
1866 (ppc64_emit_eq_goto): New function.
1867 (ppc64_emit_ne_goto): New function.
1868 (ppc64_emit_lt_goto): New function.
1869 (ppc64_emit_le_goto): New function.
1870 (ppc64_emit_gt_goto): New function.
1871 (ppc64_emit_ge_goto): New function.
1872 (ppc64v1_emit_ops_impl): New static variable.
1873 (ppc64v2_emit_ops_impl): New static variable.
1874 (ppc_emit_ops): New function.
1875 (linux_low_target): Wire in ppc_emit_ops.
1876
a2174ba4
MK
18772016-03-31 Wei-cheng Wang <cole945@gmail.com>
1878 Marcin Kościelnicki <koriakin@0x04.net>
1879
1880 PR/17221
1881 * Makefile.in: Add powerpc-*-ipa.o
1882 * configure.srv: Add ipa_obj for powerpc*-linux.
1883 * linux-ppc-ipa.c: New file.
1884 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1885 includes.
1886 (PPC_FIELD): New macro.
1887 (PPC_SEXT): New macro.
1888 (PPC_OP6): New macro.
1889 (PPC_BO): New macro.
1890 (PPC_LI): New macro.
1891 (PPC_BD): New macro.
1892 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1893 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1894 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1895 (ppc_get_thread_area): New function.
1896 (is_elfv2_inferior): New function.
1897 (gen_ds_form): New function.
1898 (GEN_STD): New macro.
1899 (GEN_STDU): New macro.
1900 (GEN_LD): New macro.
1901 (GEN_LDU): New macro.
1902 (gen_d_form): New function.
1903 (GEN_ADDI): New macro.
1904 (GEN_ADDIS): New macro.
1905 (GEN_LI): New macro.
1906 (GEN_LIS): New macro.
1907 (GEN_ORI): New macro.
1908 (GEN_ORIS): New macro.
1909 (GEN_LWZ): New macro.
1910 (GEN_STW): New macro.
1911 (GEN_STWU): New macro.
1912 (gen_xfx_form): New function.
1913 (GEN_MFSPR): New macro.
1914 (GEN_MTSPR): New macro.
1915 (GEN_MFCR): New macro.
1916 (GEN_MTCR): New macro.
1917 (GEN_SYNC): New macro.
1918 (GEN_LWSYNC): New macro.
1919 (gen_x_form): New function.
1920 (GEN_OR): New macro.
1921 (GEN_MR): New macro.
1922 (GEN_LWARX): New macro.
1923 (GEN_STWCX): New macro.
1924 (GEN_CMPW): New macro.
1925 (gen_md_form): New function.
1926 (GEN_RLDICL): New macro.
1927 (GEN_RLDICR): New macro.
1928 (gen_i_form): New function.
1929 (GEN_B): New macro.
1930 (GEN_BL): New macro.
1931 (gen_b_form): New function.
1932 (GEN_BNE): New macro.
1933 (GEN_LOAD): New macro.
1934 (GEN_STORE): New macro.
1935 (gen_limm): New function.
1936 (gen_atomic_xchg): New function.
1937 (gen_call): New function.
1938 (ppc_relocate_instruction): New function.
1939 (ppc_install_fast_tracepoint_jump_pad): New function.
1940 (ppc_get_min_fast_tracepoint_insn_len): New function.
1941 (ppc_get_ipa_tdesc_idx): New function.
1942 (the_low_target): Wire in the new functions.
1943 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1944 tdescs.
1945 * linux-ppc-tdesc.h: New file.
1946
a13c4696
MK
19472016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1948
1949 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1950 (alloc_jump_pad_buffer): New function.
1951 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1952 (alloc_jump_pad_buffer): New function.
1953 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1954 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1955 (alloc_jump_pad_buffer): New function.
1956 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1957 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1958 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1959 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1960
1cda1512
MK
19612016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1962
1963 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1964 * linux-amd64-ipa.c: Likewise.
1965 * linux-i386-ipa.c: Likewise.
1966 * linux-s390-ipa.c: Likewise.
1967 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1968 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1969 set_trace_state_variable_value_ptr.
1970 (struct ipa_sym_addresses): Likewise.
1971 (symbol_list): Likewise.
1972 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1973 accessing gdb_collect directly.
1974 (gdb_collect_ptr_type): New typedef.
1975 (get_raw_reg_ptr_type): New typedef.
1976 (get_trace_state_variable_value_ptr_type): New typedef.
1977 (set_trace_state_variable_value_ptr_type): New typedef.
1978 (gdb_collect_ptr): New global.
1979 (get_raw_reg_ptr): New global.
1980 (get_trace_state_variable_value_ptr): New global.
1981 (set_trace_state_variable_value_ptr): New global.
1982 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1983 accessing get_raw_reg directly.
1984 (get_get_tsv_func_addr): Likewise for
1985 get_trace_state_variable_value_ptr.
1986 (get_set_tsv_func_addr): Likewise for
1987 set_trace_state_variable_value_ptr.
1988 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1989
72fb5488
SM
19902016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1991
1992 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1993
28170b88
MK
19942016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1995
1996 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1997 packets.
1998 (relocate_instruction): Remove own_buf.
1999 * server.c (own_buf): Make global.
2000 (handle_v_requests): Make global.
2001 * server.h (own_buf): New declaration.
2002 (handle_v_requests): New prototype.
2003
f39e8743
MK
20042016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2005
2006 PR 18377
2007 * linux-s390-low.c (add_insns): New function.
2008 (s390_emit_prologue): New function.
2009 (s390_emit_epilogue): New function.
2010 (s390_emit_add): New function.
2011 (s390_emit_sub): New function.
2012 (s390_emit_mul): New function.
2013 (s390_emit_lsh): New function.
2014 (s390_emit_rsh_signed): New function.
2015 (s390_emit_rsh_unsigned): New function.
2016 (s390_emit_ext): New function.
2017 (s390_emit_log_not): New function.
2018 (s390_emit_bit_and): New function.
2019 (s390_emit_bit_or): New function.
2020 (s390_emit_bit_xor): New function.
2021 (s390_emit_bit_not): New function.
2022 (s390_emit_equal): New function.
2023 (s390_emit_less_signed): New function.
2024 (s390_emit_less_unsigned): New function.
2025 (s390_emit_ref): New function.
2026 (s390_emit_if_goto): New function.
2027 (s390_emit_goto): New function.
2028 (s390_write_goto_address): New function.
2029 (s390_emit_litpool): New function.
2030 (s390_emit_const): New function.
2031 (s390_emit_call): New function.
2032 (s390_emit_reg): New function.
2033 (s390_emit_pop): New function.
2034 (s390_emit_stack_flush): New function.
2035 (s390_emit_zero_ext): New function.
2036 (s390_emit_swap): New function.
2037 (s390_emit_stack_adjust): New function.
2038 (s390_emit_set_r2): New function.
2039 (s390_emit_int_call_1): New function.
2040 (s390_emit_void_call_2): New function.
2041 (s390_emit_eq_goto): New function.
2042 (s390_emit_ne_goto): New function.
2043 (s390_emit_lt_goto): New function.
2044 (s390_emit_le_goto): New function.
2045 (s390_emit_gt_goto): New function.
2046 (s390_emit_ge_goto): New function.
2047 (s390x_emit_prologue): New function.
2048 (s390x_emit_epilogue): New function.
2049 (s390x_emit_add): New function.
2050 (s390x_emit_sub): New function.
2051 (s390x_emit_mul): New function.
2052 (s390x_emit_lsh): New function.
2053 (s390x_emit_rsh_signed): New function.
2054 (s390x_emit_rsh_unsigned): New function.
2055 (s390x_emit_ext): New function.
2056 (s390x_emit_log_not): New function.
2057 (s390x_emit_bit_and): New function.
2058 (s390x_emit_bit_or): New function.
2059 (s390x_emit_bit_xor): New function.
2060 (s390x_emit_bit_not): New function.
2061 (s390x_emit_equal): New function.
2062 (s390x_emit_less_signed): New function.
2063 (s390x_emit_less_unsigned): New function.
2064 (s390x_emit_ref): New function.
2065 (s390x_emit_if_goto): New function.
2066 (s390x_emit_const): New function.
2067 (s390x_emit_call): New function.
2068 (s390x_emit_reg): New function.
2069 (s390x_emit_pop): New function.
2070 (s390x_emit_stack_flush): New function.
2071 (s390x_emit_zero_ext): New function.
2072 (s390x_emit_swap): New function.
2073 (s390x_emit_stack_adjust): New function.
2074 (s390x_emit_int_call_1): New function.
2075 (s390x_emit_void_call_2): New function.
2076 (s390x_emit_eq_goto): New function.
2077 (s390x_emit_ne_goto): New function.
2078 (s390x_emit_lt_goto): New function.
2079 (s390x_emit_le_goto): New function.
2080 (s390x_emit_gt_goto): New function.
2081 (s390x_emit_ge_goto): New function.
2082 (s390_emit_ops): New function.
2083 (struct linux_target_ops): Fill in emit_ops hook.
2084
abd9baf9
MK
20852016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2086
2087 PR 18377
2088 * Makefile.in: Add s390 IPA files.
2089 * configure.srv: Build IPA for s390.
2090 * linux-s390-ipa.c: New file.
2091 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2092 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2093 (tdesc_s390_linux32): Likewise.
2094 (init_registers_s390_linux32v1): Likewise.
2095 (tdesc_s390_linux32v1): Likewise.
2096 (init_registers_s390_linux32v2): Likewise.
2097 (tdesc_s390_linux32v2): Likewise.
2098 (init_registers_s390_linux64): Likewise.
2099 (tdesc_s390_linux64): Likewise.
2100 (init_registers_s390_linux64v1): Likewise.
2101 (tdesc_s390_linux64v1): Likewise.
2102 (init_registers_s390_linux64v2): Likewise.
2103 (tdesc_s390_linux64v2): Likewise.
2104 (init_registers_s390_te_linux64): Likewise.
2105 (tdesc_s390_te_linux64): Likewise.
2106 (init_registers_s390_vx_linux64): Likewise.
2107 (tdesc_s390_vx_linux64): Likewise.
2108 (init_registers_s390_tevx_linux64): Likewise.
2109 (tdesc_s390_tevx_linux64): Likewise.
2110 (init_registers_s390x_linux64): Likewise.
2111 (tdesc_s390x_linux64): Likewise.
2112 (init_registers_s390x_linux64v1): Likewise.
2113 (tdesc_s390x_linux64v1): Likewise.
2114 (init_registers_s390x_linux64v2): Likewise.
2115 (tdesc_s390x_linux64v2): Likewise.
2116 (init_registers_s390x_te_linux64): Likewise.
2117 (tdesc_s390x_te_linux64): Likewise.
2118 (init_registers_s390x_vx_linux64): Likewise.
2119 (tdesc_s390x_vx_linux64): Likewise.
2120 (init_registers_s390x_tevx_linux64): Likewise.
2121 (tdesc_s390x_tevx_linux64): Likewise.
2122 (have_hwcap_s390_vx): New static variable.
2123 (s390_arch_setup): Fill have_hwcap_s390_vx.
2124 (s390_get_thread_area): New function.
2125 (s390_ft_entry_gpr_esa): New const.
2126 (s390_ft_entry_gpr_zarch): New const.
2127 (s390_ft_entry_misc): New const.
2128 (s390_ft_entry_fr): New const.
2129 (s390_ft_entry_vr): New const.
2130 (s390_ft_main_31): New const.
2131 (s390_ft_main_64): New const.
2132 (s390_ft_exit_fr): New const.
2133 (s390_ft_exit_vr): New const.
2134 (s390_ft_exit_misc): New const.
2135 (s390_ft_exit_gpr_esa): New const.
2136 (s390_ft_exit_gpr_zarch): New const.
2137 (append_insns): New function.
2138 (s390_relocate_instruction): New function.
2139 (s390_install_fast_tracepoint_jump_pad): New function.
2140 (s390_get_min_fast_tracepoint_insn_len): New function.
2141 (s390_get_ipa_tdesc_idx): New function.
2142 (struct linux_target_ops): Wire in the above functions.
2143 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2144 * linux-s390-tdesc.h: New file.
2145
a4105d04
MK
21462016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2147
2148 * linux-s390-low.c (s390_supports_tracepoints): New function.
2149 (struct linux_target_ops): Fill supports_tracepoints hook.
2150
35ac8b3e
YQ
21512016-03-18 Yao Qi <yao.qi@linaro.org>
2152
2153 * linux-low.c (lwp_signal_can_be_delivered): New function.
2154 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2155
94610ec4
YQ
21562016-03-18 Yao Qi <yao.qi@linaro.org>
2157
2158 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2159 0 if signal is enqueued. Remove 'signal' from one debugging
2160 message. Move one debugging message to some lines below.
2161 Remove code setting 'signal' to 0.
2162
80aea927
YQ
21632016-03-18 Yao Qi <yao.qi@linaro.org>
2164
2165 * linux-low.c (linux_low_filter_event): Remove redundant
2166 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2167
b04fd3be
MK
21682016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2169
2170 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2171 (struct linux_target_ops): Wire in the above.
2172
c40c8d4b
YQ
21732016-03-03 Yao Qi <yao.qi@linaro.org>
2174
2175 * linux-low.c: Update comments to start_step_over.
2176
0f8288ae
YQ
21772016-03-03 Yao Qi <yao.qi@linaro.org>
2178
2179 PR server/19736
2180 * linux-low.c (handle_extended_wait): Set child suspended
2181 if event_lwp->bp_reinsert isn't zero.
2182
fdbd04a8
YQ
21832016-03-02 Yao Qi <yao.qi@linaro.org>
2184
2185 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2186 enqueue_pending_signal.
2187
6896a8fa
MK
21882016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2189
2190 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2191 is actually loaded.
2192
ab503087
MK
21932016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2194
2195 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2196 (s390_regmap_3264) [!__s390x__]: New global.
2197 (s390_collect_ptrace_register): Skip map entries containing -1.
2198 (s390_supply_ptrace_register): Ditto.
2199 (s390_fill_gprs_high): New function.
2200 (s390_store_gprs_high): New function.
2201 (s390_regsets): Add NT_S390_HIGH_GPRS.
2202 (s390_get_hwcap): Enable on 31-bit.
2203 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2204 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2205 Detect NT_S390_HIGH_GPRS.
2206 (s390_usrregs_info_3264): Enable on 31-bit.
2207 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2208 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2209
ae91f625
MK
22102016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2211
2212 PR gdb/13808
2213 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2214 * configure.srv: Ditto.
2215 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2216 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2217 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2218 (init_registers_amd64_linux): Remove prototype.
2219 (tdesc_amd64_linux): Remove declaration.
2220 (get_ipa_tdesc): New function.
2221 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2222 initialize remaining tdescs.
2223 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2224 (init_registers_i386_linux): Remove prototype.
2225 (tdesc_i386_linux): Remove declaration.
2226 (get_ipa_tdesc): New function.
2227 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2228 initialize remaining tdescs.
2229 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2230 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2231 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2232 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2233 (x86_get_ipa_tdesc_idx): New function.
2234 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2235 * linux-x86-tdesc.h: New file.
2236 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2237 (target_get_ipa_tdesc_idx): New macro.
2238 * tracepoint.c (ipa_tdesc_idx): New macro.
2239 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2240 (symbol_list): Add ipa_tdesc_idx.
2241 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2242 (ipa_tdesc): Remove.
2243 (ipa_tdesc_idx): New variable.
2244 (get_context_regcache): Use get_ipa_tdesc.
2245 (gdb_collect): Ditto.
2246 (gdb_probe): Ditto.
2247 * tracepoint.h (get_ipa_tdesc): New prototype.
2248 (ipa_tdesc): Remove.
2249
e7ad2f14
PA
22502016-02-24 Pedro Alves <palves@redhat.com>
2251
2252 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2253 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2254 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2255 Factor out common code between the USE_SIGTRAP_SIGINFO and
2256 !USE_SIGTRAP_SIGINFO blocks.
2257 (linux_low_filter_event): Call save_stop_reason instead of
2258 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2259 Update comments.
2260 (linux_wait_1): Update comments.
2261
657f9cde
WW
22622016-02-24 Wei-cheng Wang <cole945@gmail.com>
2263
2264 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2265 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2266 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2267 ppc_insert_point, ppc_remove_point.
2268
b00b61e1
MK
22692016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2270
2271 * linux-s390-low.c (s390_supports_z_point_type): New function.
2272 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2273
553cb527
YQ
22742016-02-16 Yao Qi <yao.qi@linaro.org>
2275
2276 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2277 PC. Get pc from regcache_read_pc.
2278
a5652c21
YQ
22792016-02-12 Yao Qi <yao.qi@linaro.org>
2280
2281 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2282 or linux_get_pc_32bit.
2283 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2284
ed443b61
YQ
22852016-02-12 Yao Qi <yao.qi@linaro.org>
2286
2287 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2288 arm_linux_get_next_pcs_fixup.
2289
020ecd38
MK
22902016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2291
2292 * tracepoint.c (x_tracepoint_action_download): Change
2293 write_inferior_data_ptr to write_inferior_data_pointer.
2294 (cmd_qtstart): Likewise.
2295 (write_inferior_data_ptr): Remove.
2296 (download_agent_expr): Change write_inferior_data_ptr to
2297 write_inferior_data_pointer.
2298 (download_tracepoint_1): Likewise.
2299 (download_tracepoint): Likewise.
2300 (download_trace_state_variables): Likewise.
2301
7cae9051
WW
23022016-02-11 Wei-cheng Wang <cole945@gmail.com>
2303 Marcin Kościelnicki <koriakin@0x04.net>
2304
2305 * tracepoint.c (struct tracepoint_action_ops): Remove.
2306 (struct tracepoint_action): Remove ops.
2307 (m_tracepoint_action_download, r_tracepoint_action_download)
2308 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2309 size and offset accordingly.
2310 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2311 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2312 (tracepoint_action_send, tracepoint_action_download): New functions.
2313 Helpers for trace action handlers.
2314 (add_tracepoint_action): Remove setup actions ops.
2315 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2316
9f6a71b4
YQ
23172016-02-10 Yao Qi <yao.qi@linaro.org>
2318
2319 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2320
1e94266c
SM
23212016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2322
2323 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2324 to AC_OUTPUT.
2325 * configure: Regenerate.
2326
8adce034
SM
23272016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2328
2329 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2330 void * to gdb_byte *.
2331 * linux-low.c (siginfo_fixup): Likewise.
2332 (linux_xfer_siginfo): Likewise.
2333 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2334 Likewise.
2335 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2336
93813b37
WT
23372016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2338
2339 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2340 to srv_tgtobj.
2341 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2342 to srv_tgtobj.
2343 * linux-x86-low.c [__x86_64__]: Include
2344 "nat/amd64-linux-siginfo.h".
2345 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2346 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2347 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2348 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2349 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2350 (cpt_si_fd, si_timerid, si_overrun): Move from
2351 nat/amd64-linux-siginfo.c.
2352 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2353
8424cc97
SM
23542016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2355
2356 * server.c (skip_to_semicolon): Remove.
2357 (process_point_options): Use strchrnul instead of
2358 skip_to_semicolon.
2359
4d18591b
YQ
23602016-01-26 Yao Qi <yao.qi@linaro.org>
2361
2362 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2363 * linux-low.c (install_software_single_step_breakpoints): Don't
2364 call regcache_read_pc.
2365 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2366 argument pc.
2367
d8020970
YQ
23682016-01-26 Yao Qi <yao.qi@linaro.org>
2369
2370 * linux-low.c (install_software_single_step_breakpoints): Call
2371 regcache_read_pc instead of get_pc.
2372
8b207339
YQ
23732016-01-26 Yao Qi <yao.qi@linaro.org>
2374
2375 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2376 (unblock_async_io): Rename to ...
2377 (block_unblock_async_io): ... it. New function.
2378 (enable_async_io): Don't install SIGIO handler. Unblock it
2379 instead.
2380 (disable_async_io): Don't ignore SIGIO. Block it instead.
2381 (initialize_async_io): Install SIGIO handler. Don't call
2382 unblock_async_io.
2383
18879fef
YQ
23842016-01-26 Yao Qi <yao.qi@linaro.org>
2385
2386 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2387 first character is '\003', call *the_target->request_interrupt.
2388
a0f8e08a
YQ
23892016-01-25 Yao Qi <yao.qi@linaro.org>
2390
2391 * remote-utils.c (new_thread_notify): Remove.
2392 (dead_thread_notify): Likewise.
2393 * remote-utils.h (new_thread_notify): Remove declaration.
2394 (dead_thread_notify): Likewise.
2395
cc5fd9ab
MK
23962016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2397
2398 * gdb.trace/pending.exp: Fix expected message on continue.
2399
99e8eb11
MK
24002016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2401
2402 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2403 it works properly on big-endian machines where sizeof (CORE_ADDR)
2404 != sizeof (void *).
2405
a994041d
PA
24062016-01-21 Pedro Alves <palves@redhat.com>
2407
2408 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2409 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2410 * configure: Regenerate.
2411
f7a6a40d
YQ
24122016-01-21 Yao Qi <yao.qi@linaro.org>
2413
2414 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2415 is_thumb and set it according to CPSR saved on the stack.
2416 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2417 arm_sigreturn_next_pc.
2418
6f69e520
YQ
24192016-01-18 Yao Qi <yao.qi@linaro.org>
2420
2421 * linux-low.c (linux_set_pc_64bit): New function.
2422 (linux_get_pc_64bit): New function.
2423 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2424 Declare.
2425 * linux-sparc-low.c (debug_threads): Remove declaration.
2426 (sparc_get_pc): Remove.
2427 (the_low_target): Use linux_get_pc_64bit instead of
2428 sparc_get_pc.
2429 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2430 (the_low_target): Use linux_get_pc_64bit and
2431 linux_set_pc_64bit.
2432
276d4552
YQ
24332016-01-18 Yao Qi <yao.qi@linaro.org>
2434
2435 * linux-arm-low.c (debug_threads): Remove declaration.
2436 (arm_get_pc, arm_set_pc): Remove.
2437 (the_low_target): Use linux_get_pc_32bit and
2438 linux_set_pc_32bit.
2439 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2440 (the_low_target): Use linux_get_pc_32bit and
2441 linux_set_pc_32bit.
2442 * linux-cris-low.c (debug_threads): Remove declaration.
2443 (cris_get_pc, cris_set_pc,): Remove.
2444 (the_low_target): Use linux_get_pc_32bit and
2445 linux_set_pc_32bit.
2446 * linux-crisv32-low.c (debug_threads): Remove declaration.
2447 (cris_get_pc, cris_set_pc): Remove.
2448 (the_low_target): Use linux_get_pc_32bit and
2449 linux_set_pc_32bit.
2450 * linux-low.c: Include inttypes.h.
2451 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2452 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2453 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2454 (the_low_target): Use linux_get_pc_32bit and
2455 linux_set_pc_32bit.
2456 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2457 (the_low_target): Use linux_get_pc_32bit and
2458 linux_set_pc_32bit.
2459 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2460 (the_low_target): Use linux_get_pc_32bit and
2461 linux_set_pc_32bit.
2462 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2463 (the_low_target): Use linux_get_pc_32bit and
2464 linux_set_pc_32bit.
2465 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2466 (the_low_target): Use linux_get_pc_32bit and
2467 linux_set_pc_32bit.
2468
eb0edac8
GB
24692016-01-18 Gary Benson <gbenson@redhat.com>
2470
2471 * configure.ac (AC_FUNC_FORK): New check.
2472 * config.in: Regenerate.
2473 * configure: Likewise.
2474
1b451dda
YQ
24752016-01-14 Yao Qi <yao.qi@linaro.org>
2476
2477 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2478 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2479 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2480 arm_get_next_pcs_ctor.
2481
82075af2
JS
24822016-01-12 Josh Stone <jistone@redhat.com>
2483 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2484
2485 * inferiors.h: Include "gdb_vecs.h".
2486 (struct process_info): Add syscalls_to_catch.
2487 * inferiors.c (remove_process): Free syscalls_to_catch.
2488 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2489 syscall_return stops.
2490 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2491 * server.c (handle_general_set): Handle QCatchSyscalls.
2492 (handle_query): Report support for QCatchSyscalls.
2493 * target.h (struct target_ops): Add supports_catch_syscall.
2494 (target_supports_catch_syscall): New macro.
2495 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2496 (struct lwp_info): Add syscall_state.
2497 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2498 Maintain syscall_state and syscalls_to_catch across exec.
2499 (get_syscall_trapinfo): New function, proxy to the_low_target.
2500 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2501 (linux_low_filter_event): Toggle syscall_state entry/return for
2502 syscall traps, and set it ignored for all others.
2503 (gdb_catching_syscalls_p): New function.
2504 (gdb_catch_this_syscall_p): New function.
2505 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2506 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2507 (linux_supports_catch_syscall): New function.
2508 (linux_target_ops): Install it.
2509 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2510 (the_low_target): Install it.
2511
8f13a3ce
MF
25122016-01-12 Mike Frysinger <vapier@gentoo.org>
2513
2514 * acinclude.m4: Include new ../warning.m4 file.
2515 * configure: Regenerated.
2516 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2517
5b3da067
MF
25182016-01-12 Mike Frysinger <vapier@gentoo.org>
2519
2520 * ax.c (is_goto_target): Mark static.
2521 * linux-low.c (register_addr): Likewise.
2522 (linux_fetch_registers, linux_store_registers): Likewise.
2523 * mem-break.c (any_persistent_commands): Fix old prototype.
2524 (add_commands_to_breakpoint): Mark static.
2525 * regcache.c (find_register_by_name): Delete unused func.
2526 * remote-utils.c (hex_or_minus_one): Mark static.
2527 * server.c (monitor_show_help): Mark static.
2528 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2529 handle_v_requests): Likewise.
2530
bc504a31
PA
25312016-01-12 Pedro Alves <palves@redhat.com>
2532
2533 Remove use of the registered trademark symbol throughout.
2534
5a0dd67a
YQ
25352016-01-08 Yao Qi <yao.qi@linaro.org>
2536
2537 * remote-utils.c (getpkt): If c is '\003', call target hook
2538 request_interrupt.
2539
b2ca446f
YQ
25402016-01-06 Yao Qi <yao.qi@linaro.org>
2541
2542 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2543 linux-aarch32-low.c.
2544 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2545 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2546 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2547 (thumb2_breakpoint): Declare.
2548 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2549 linux-aarch32-low.h.
2550 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2551 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2552 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2553
edd88788
JB
25542016-01-01 Joel Brobecker <brobecker@adacore.com>
2555
2556 * gdbreplay.c (gdbreplay_version): Change copyright year in
2557 version message.
2558 * server.c (gdbserver_version): Likewise.
2559
65da7f14
PP
25602015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2561
2562 * server.c (crc32_table): Delete.
2563 (crc32): Use libiberty's xcrc32 function.
2564
4abd5ed2
JB
25652015-12-22 Joel Brobecker <brobecker@adacore.com>
2566
2567 * lynx-low.c (lynx_delete_thread_callback): New function.
2568 (lynx_mourn): Properly delete our process and all of its
2569 threads. Remove call to clear_inferiors.
2570
0e50fe5c
JB
25712015-12-22 Joel Brobecker <brobecker@adacore.com>
2572
2573 * target.c (thread_search_callback): Add check that
2574 the thread_stopped target callback is not NULL before
2575 calling it.
2576
35adc03f
YQ
25772015-12-21 Yao Qi <yao.qi@linaro.org>
2578
2579 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2580 arm breakpoint.
2581
bd2b2909
AT
25822015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2583
2584 * server.c (handle_query): Call target_supports_software_single_step.
2585
7fe5e27e
AT
25862015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2587
2588 * linux-low.c (single_step): New function.
2589 (linux_resume_one_lwp_throw): Call single_step.
2590 (start_step_over): Likewise.
2591
d9311bfa
AT
25922015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2593
2594 * Makefile.in (SFILES): Append arch/arm-linux.c,
2595 arch/arm-get-next-pcs.c.
2596 (arm-linux.o): New rule.
2597 (arm-get-next-pcs.o): New rule.
2598 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2599 arm-linux.o.
2600 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2601 to linux-aarch32-low.c.
2602 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2603 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2604 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2605 (thumb2_breakpoint_len): Likewise.
2606 (arm_is_thumb_mode): Make non-static.
2607 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2608 from linux-aarch32-low.c.
2609 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2610 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2611 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2612 (thumb2_breakpoint_len): Likewise.
2613 (arm_is_thumb_mode): New declaration.
2614 * linux-arm-low.c: Include arch/arm-linux.h
2615 aarch/arm-get-next-pcs.h, sys/syscall.h.
2616 (get_next_pcs_ops): New struct.
2617 (get_next_pcs_addr_bits_remove): New function.
2618 (get_next_pcs_is_thumb): New function.
2619 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2620 (arm_sigreturn_next_pc): Likewise.
2621 (get_next_pcs_syscall_next_pc): Likewise.
2622 (arm_gdbserver_get_next_pcs): Likewise.
2623 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2624 Initialize.
2625 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2626 * server.h: Include gdb_vecs.h.
2627
68ce2059
AT
26282015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2629
2630 * Makefile.in (SFILES): Append common/common-regcache.c.
2631 (OBS): Append common-regcache.o.
2632 (common-regcache.o): New rule.
2633 * regcache.c (init_register_cache): Initialize cache to
2634 REG_UNAVAILABLE.
2635 (regcache_raw_read_unsigned): New function.
2636 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2637 register_status enum.
2638
fa5308bd
AT
26392015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2640
2641 * linux-aarch64-low.c (the_low_targets): Rename
2642 breakpoint_reinsert_addr to get_next_pcs.
2643 * linux-arm-low.c (the_low_targets): Likewise.
2644 * linux-bfin-low.c (the_low_targets): Likewise.
2645 * linux-cris-low.c (the_low_targets): Likewise.
2646 * linux-crisv32-low.c (the_low_targets): Likewise.
2647 * linux-low.c (can_software_single_step): Likewise.
2648 (install_software_single_step_breakpoints): New function.
2649 (start_step_over): Use install_software_single_step_breakpoints.
2650 * linux-low.h: New CORE_ADDR vector.
2651 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2652 get_next_pcs.
2653 * linux-mips-low.c (the_low_targets): Likewise.
2654 * linux-nios2-low.c (the_low_targets): Likewise.
2655 * linux-sparc-low.c (the_low_targets): Likewise.
2656
4a6ed09b
PA
26572015-12-17 Pedro Alves <palves@redhat.com>
2658
2659 * linux-low.c (linux_kill_one_lwp): Remove references to
2660 LinuxThreads.
2661 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2662 to 'kill'.
2663 (linux_init_signals): Delete.
2664 (initialize_low): Adjust.
2665 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2666
7544db95
PA
26672015-12-16 Pedro Alves <palves@redhat.com>
2668
2669 * configure.ac (compiler warning flags): When testing a
2670 -Wno-foo option, check whether -Wfoo works instead.
2671 * configure: Regenerate.
2672
8020350c
DB
26732015-12-11 Don Breazeal <donb@codesourcery.com>
2674
2675 * server.c (process_serial_event): Don't exit from gdbserver
2676 in remote mode if there are still active inferiors.
2677
db91f502
YQ
26782015-12-11 Yao Qi <yao.qi@linaro.org>
2679
2680 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2681 arm_breakpoint_at if the process is 32-bit.
2682
b37a6290
YQ
26832015-12-11 Yao Qi <yao.qi@linaro.org>
2684
2685 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2686 arm breakpoint.
2687
17b1509a
YQ
26882015-12-07 Yao Qi <yao.qi@linaro.org>
2689
2690 * configure.srv: Append arm.o to srv_tgtobj for
2691 aarch64*-*-linux* target.
2692 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2693 from linux-arm-low.c.
2694 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2695 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2696 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2697 (thumb2_breakpoint_len): Likewise.
2698 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2699 (arm_breakpoint_kinds): Likewise.
2700 (arm_breakpoint_kind_from_pc): Likewise.
2701 (arm_sw_breakpoint_from_kind): Likewise.
2702 (arm_breakpoint_kind_from_current_state): Likewise.
2703 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2704 (arm_sw_breakpoint_from_kind): Declare.
2705 (arm_breakpoint_kind_from_current_state): Declare.
2706 (arm_breakpoint_at): Declare.
2707 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2708 arm_sw_breakpoint_from_kind if process is 32-bit.
2709 (aarch64_breakpoint_kind_from_pc): New function.
2710 (aarch64_breakpoint_kind_from_current_state): New function.
2711 (the_low_target): Initialize fields breakpoint_kind_from_pc
2712 and breakpoint_kind_from_current_state.
2713 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2714 linux-aarch32-low.c.
2715 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2716 (arm_breakpoint, arm_breakpoint_len): Likewise.
2717 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2718 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2719 (arm_is_thumb_mode): Likewise.
2720 (arm_breakpoint_at): Likewise.
2721 (arm_breakpoint_kind_from_pc): Likewise.
2722 (arm_sw_breakpoint_from_kind): Likewise.
2723 (arm_breakpoint_kind_from_current_state): Likewise.
2724
2725 Revert:
2726 2015-08-04 Yao Qi <yao.qi@linaro.org>
2727
2728 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2729 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2730 * server.c (extended_protocol): Remove "static".
2731 * server.h (extended_protocol): Declare it.
2732
ece66d65
JS
27332015-12-04 Josh Stone <jistone@redhat.com>
2734
2735 * target.h (struct target_ops) <arch_setup>: Rename to ...
2736 (struct target_ops) <post_create_inferior>: ... this.
2737 (target_arch_setup): Rename to ...
2738 (target_post_create_inferior): ... this, calling post_create_inferior.
2739 * server.c (start_inferior): Update target_arch_setup calls to
2740 target_post_create_inferior.
2741 * linux-low.c (linux_low_ptrace_options): Forward declare.
2742 (linux_arch_setup): Update its comment for general use.
2743 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2744 (struct linux_target_ops): Use linux_post_create_inferior.
2745 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2746 to post_create_inferior.
2747 * nto-low.c (struct nto_target_ops): Likewise.
2748 * spu-low.c (struct spu_target_ops): Likewise.
2749 * win32-low.c (struct win32_target_ops): Likewise.
2750
e58c48b4
AT
27512015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2752
2753 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2754
fbec8956
AT
27552015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2756
2757 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2758 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2759 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2760 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2761 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2762 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2763 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2764 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2765 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2766 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2767 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2768 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2769
9b4c5f87
AT
27702015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2771
2772 * linux-low.c (linux_look_up_symbols): Don't call
2773 linux_supports_traceclone.
2774 * linux-low.h (thread_db_init): Remove use_events argument.
2775 * thread-db.c (thread_db_use_event): Remove global variable.
2776 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2777 (struct thread_db) <td_create_bp>: Remove field.
2778 (thread_db_create_event): Remove function.
2779 (thread_db_enable_reporting): Likewise.
2780 (find_one_thread): Don't check for thread_db_use_events.
2781 (attach_thread): Likewise.
2782 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2783 (try_thread_db_load_1): Don't check for thread_db_use_events.
2784 (thread_db_init): Remove use_events argument and thread events
2785 handling.
2786 (remove_thread_event_breakpoints): Remove function.
2787 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2788
7d00775e
AT
27892015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2790
2791 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2792 New function.
2793 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2794 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2795 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2796 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2797 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2798 Initialize.
2799 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2800 New function.
2801 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2802 * linux-low.c (can_hardware_single_step): Use
2803 supports_hardware_single_step.
2804 (can_software_single_step): New function.
2805 (start_step_over): Call can_software_single_step.
2806 (linux_supports_hardware_single_step): New function.
2807 (struct target_ops) <supports_software_single_step>: Initialize.
2808 * linux-low.h (struct linux_target_ops)
2809 <supports_hardware_single_step>: Initialize.
2810 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2811 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2812 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2813 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2814 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2815 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2816 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2817 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2818 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2819 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2820 Initialize.
2821 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2822 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2823 Initialize.
2824 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2825 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2826 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2827 New function.
2828 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2829 * target.h (struct target_ops): <supports_software_single_step>:
2830 New field.
2831 (target_supports_software_single_step): New macro.
2832
2d97cd35
AT
28332015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2834
2835 * linux-low.c (linux_wait_1): Fix pc advance condition.
2836 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2837 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2838
769ef81f
AT
28392015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2840
2841 * linux-arm-low.c (arm_is_thumb_mode): New function.
2842 (arm_breakpoint_at): Use arm_is_thumb_mode.
2843 (arm_breakpoint_kind_from_current_state): New function.
2844 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2845 Initialize.
2846 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2847 (linux_breakpoint_kind_from_current_state): New function.
2848 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2849 * linux-low.h (struct linux_target_ops)
2850 <breakpoint_kind_from_current_state>: New field.
2851 * target.h (struct target_ops): Likewise.
2852 (target_breakpoint_kind_from_current_state): New macro.
2853
1bebeeca
PA
28542015-11-30 Pedro Alves <palves@redhat.com>
2855
2856 * linux-low.c (linux_resume): Wake up the event loop before
2857 returning.
2858
a67a9fae
PA
28592015-11-30 Pedro Alves <palves@redhat.com>
2860
2861 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2862 check.
2863 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2864 to -1.
2865 * target.c (struct thread_search): New structure.
2866 (thread_search_callback): New function.
2867 (prev_general_thread): New global.
2868 (prepare_to_access_memory, done_accessing_memory): New functions.
2869 * target.h (prepare_to_access_memory, done_accessing_memory):
2870 Replace macros with function declarations.
2871
f2faf941
PA
28722015-11-30 Pedro Alves <palves@redhat.com>
2873
2874 PR 14618
2875 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2876 report TARGET_WAITKIND_NO_RESUMED.
2877 * remote-utils.c (prepare_resume_reply): Handle
2878 TARGET_WAITKIND_NO_RESUMED.
2879 * server.c (report_no_resumed): New global.
2880 (handle_query) <qSupported>: Handle "no-resumed+". Report
2881 "no-resumed+" support.
2882 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2883 return error if the client doesn't support no-resumed events.
2884 (push_stop_notification): New function.
2885 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2886 events if the client supports them.
2887
a681f9c9
PA
28882015-11-30 Pedro Alves <palves@redhat.com>
2889
2890 * linux-low.c (thread_still_has_status_pending_p): Don't check
2891 vCont;t here.
2892 (lwp_resumed): New function.
2893 (status_pending_p_callback): Return early if the LWP is not
2894 supposed to be resumed.
2895
65706a29
PA
28962015-11-30 Pedro Alves <palves@redhat.com>
2897
2898 * linux-low.c (handle_extended_wait): Assert that the LWP's
2899 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2900 thread create events, leave the new child's status pending.
2901 (linux_low_filter_event): If GDB wants to hear about thread exit
2902 events, leave the LWP marked dead and don't delete it.
2903 (linux_wait_for_event_filtered): Don't check for thread exit.
2904 (filter_exit_event): New function.
2905 (linux_wait_1): Use it, when returning an exit event.
2906 (linux_resume_one_lwp_throw): Assert that the LWP's
2907 waitstatus is TARGET_WAITKIND_IGNORE.
2908 * remote-utils.c (prepare_resume_reply): Handle
2909 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2910 * server.c (report_thread_events): New global.
2911 (handle_general_set): Handle QThreadEvents.
2912 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2913 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2914 TARGET_WAITKIND_THREAD_EXITED.
2915 * server.h (report_thread_events): Declare.
2916
56cf4bed
PA
29172015-11-30 Pedro Alves <palves@redhat.com>
2918
2919 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2920 the thread's last_resume_kind was resume_stop.
2921
500c1d85
PA
29222015-11-30 Pedro Alves <palves@redhat.com>
2923
2924 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2925 before returning.
2926
de979965
PA
29272015-11-30 Pedro Alves <palves@redhat.com>
2928
2929 * server.c (handle_v_requests): Handle vCtrlC.
2930
34c65914
PA
29312015-11-30 Pedro Alves <palves@redhat.com>
2932
2933 * gdbthread.h (find_any_thread_of_pid): Declare.
2934 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2935 functions.
2936 * server.c (handle_query): If current_thread is NULL, look for
2937 another thread of the selected process.
2938
79efa585 29392015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 2940 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
2941
2942 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2943 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2944 name in reply.
2945 * target.h (struct target_ops) <thread_name>: New field.
2946 (target_thread_name): New macro.
2947
80d82c19
JB
29482015-11-23 Joel Brobecker <brobecker@adacore.com>
2949
2950 * regcache.h (regcache_invalidate_pid): Add declaration.
2951 * regcache.c (regcache_invalidate_pid): New function, extracted
2952 from regcache_invalidate.
2953 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2954 Add trivial documentation comment.
2955 * lynx-low.c: Use regcache_invalidate_pid instead of
2956 regcache_invalidate.
2957
64da5dd5
JB
29582015-11-23 Joel Brobecker <brobecker@adacore.com>
2959
2960 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2961 and Elf64_auxv_t if the target is Android.
2962
37ce4055
DE
29632015-11-22 Doug Evans <xdje42@gmail.com>
2964
2965 * target.h: #include <sys/types.h>.
2966
06e03fff
PA
29672015-11-19 Pedro Alves <palves@redhat.com>
2968
2969 * linux-low.c (linux_process_qsupported): Change prototype.
2970 Adjust.
2971 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2972 Change prototype.
2973 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2974 and adjust to loop over all features.
2975 * server.c (handle_query) <qSupported>: Adjust to call
2976 target_process_qsupported once, passing it a vector of unprocessed
2977 features.
2978 * target.h (struct target_ops) <process_qsupported>: Change
2979 prototype.
2980 (target_process_qsupported): Adjust.
2981
9a084706
PA
29822015-11-19 Pedro Alves <palves@redhat.com>
2983
2984 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2985 mode.
2986 * configure: Regenerate.
2987
dad44a1f
PA
29882015-11-19 Pedro Alves <palves@redhat.com>
2989
2990 * configure: Regenerate.
2991
231c0592
YQ
29922015-11-19 Yao Qi <yao.qi@linaro.org>
2993
2994 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2995 type to uint32_t.
2996
6c1c9a8b
YQ
29972015-11-19 Yao Qi <yao.qi@linaro.org>
2998
2999 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3000 (struct aarch64_operand): Move enum out.
3001
9caa3311
YQ
30022015-11-19 Yao Qi <yao.qi@linaro.org>
3003
3004 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3005 struct user_fpsimd_state *.
3006 (aarch64_store_fpregset): Likewise.
3007
6a69a054
YQ
30082015-11-19 Yao Qi <yao.qi@linaro.org>
3009
3010 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3011 struct user_pt_regs *.
3012 (aarch64_store_gregset): Likewise.
3013
1798301e
PA
30142015-11-18 Pedro Alves <palves@redhat.com>
3015
3016 * Makefile.in (all_object_files): Add $IPA_OBJS.
3017
ce7715e2
PA
30182015-11-17 Pedro Alves <palves@redhat.com>
3019
3020 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3021 GDB_SIGNAL_0 and gdb_signal_to_string.
3022
c0879059
PA
30232015-11-17 Pedro Alves <palves@redhat.com>
3024
3025 * win32-low.c (handle_output_debug_string): Remove parameter.
3026 (win32_kill): Remove our_status local and adjust call to
3027 handle_output_debug_string.
3028 (get_child_debug_event): Adjust call to
3029 handle_output_debug_string.
3030
1996e237
SM
30312015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3032
3033 * linux-mips-low.c (mips_fill_gregset): Add cast.
3034 (mips_store_gregset): Likewise.
3035 (mips_fill_fpregset): Likewise.
3036 (mips_store_fpregset): Likewise.
3037
cbec665b
SM
30382015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3039
3040 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3041 priv.
3042
eb3e3c67
SM
30432015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3044
3045 * linux-mips-low.c (mips_linux_new_thread): Change type of
3046 watch_type to enum target_hw_bp_type.
3047
171de4b8
SM
30482015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3049
3050 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3051 Change return type to arm_hwbp_type.
3052
04248ead
SM
30532015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3054
3055 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3056 (arm_store_gregset): Likewise.
3057 * linux-arm-low.c (arm_get_hwcap): Likewise.
3058 (arm_read_description): Likewise.
3059
04b3479c
SM
30602015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3061
3062 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3063
2bc84e8a
SM
30642015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3065
3066 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3067 (ppc_fill_vsxregset): Likewise.
3068 (ppc_store_vsxregset): Likewise.
3069 (ppc_fill_vrregset): Likewise.
3070 (ppc_store_vrregset): Likewise.
3071 (ppc_fill_evrregset): Likewise.
3072 (ppc_store_evrregset): Likewise.
3073
e6c5bb05
SM
30742015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3075
3076 * linux-ppc-low.c (ppc_usrregs_info): Remove
3077 forward-declaration.
3078 (ppc_arch_setup): Move lower in file.
3079
7ea45d72
SM
30802015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3081
3082 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3083 (ps_pdwrite): Likewise.
3084
69291610
HW
30852015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3086
3087 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3088 to after assert checks.
3089
b42945fd
SM
30902015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3091
3092 * proc-service.c (ps_pdread): Add/adjust casts.
3093 (ps_pdwrite): Add/adjust casts.
3094
d6f85c84
SM
30952015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3096
3097 * server.c (handle_search_memory_1): Cast return value of
3098 memmem.
3099
f98cd059
SM
31002015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3101
3102 * server.c (write_qxfer_response): Change type of data to
3103 gdb_byte *.
3104
d2412fa5
PA
31052015-10-29 Pedro Alves <palves@redhat.com>
3106
3107 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3108
c17414a2
PA
31092015-10-29 Pedro Alves <palves@redhat.com>
3110
3111 * tracepoint.c (clear_installed_tracepoints): Add casts.
3112
e053fbc4
PA
31132015-10-29 Pedro Alves <palves@redhat.com>
3114
3115 * server.c (handle_v_cont, process_serial_event): Add enum
3116 gdb_signal casts to signal parsing code.
3117
add67df8
PA
31182015-10-29 Pedro Alves <palves@redhat.com>
3119
3120 * linux-low.h (NULL_REGSET): Define.
3121 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3122 * linux-arm-low.c (arm_regsets): Likewise.
3123 * linux-crisv32-low.c (cris_regsets): Likewise.
3124 * linux-m68k-low.c (m68k_regsets): Likewise.
3125 * linux-mips-low.c (mips_regsets): Likewise.
3126 * linux-nios2-low.c (nios2_regsets): Likewise.
3127 * linux-ppc-low.c (ppc_regsets): Likewise.
3128 * linux-s390-low.c (s390_regsets): Likewise.
3129 * linux-sh-low.c (sh_regsets): Likewise.
3130 * linux-sparc-low.c (sparc_regsets): Likewise.
3131 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3132 * linux-tile-low.c (tile_regsets): Likewise.
3133 * linux-x86-low.c (x86_regsets): Likewise.
3134 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3135
50bc912a
PA
31362015-10-29 Pedro Alves <palves@redhat.com>
3137
3138 * linux-low.h (NULL_REGSET): Define.
3139 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3140 * linux-arm-low.c (arm_regsets): Likewise.
3141 * linux-crisv32-low.c (cris_regsets): Likewise.
3142 * linux-m68k-low.c (m68k_regsets): Likewise.
3143 * linux-mips-low.c (mips_regsets): Likewise.
3144 * linux-nios2-low.c (nios2_regsets): Likewise.
3145 * linux-ppc-low.c (ppc_regsets): Likewise.
3146 * linux-s390-low.c (s390_regsets): Likewise.
3147 * linux-sh-low.c (sh_regsets): Likewise.
3148 * linux-sparc-low.c (sparc_regsets): Likewise.
3149 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3150 * linux-tile-low.c (tile_regsets): Likewise.
3151 * linux-x86-low.c (x86_regsets): Likewise.
3152 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3153
682b2546
DE
31542015-10-26 Doug Evans <dje@google.com>
3155
3156 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3157
963843d4
DE
31582015-10-26 Doug Evans <dje@google.com>
3159
3160 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3161
d41401ac
DE
31622015-10-26 Doug Evans <dje@google.com>
3163
3164 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3165 for debug_printf.
3166 (attach_thread, find_new_threads_callback): Ditto.
3167
3db28855
AT
31682015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3169
3170 * mem-break.h (set_breakpoint_data): Remove.
3171
fb78e89c
AT
31722015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3173
3174 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3175 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3176 (initialize_low): Remove set_breakpoint_data call.
3177 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3178 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3179 (initialize_low): Remove set_breakpoint_data call.
3180 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3181 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3182 (initialize_low): Remove set_breakpoint_data call.
3183
2e6ee069
AT
31842015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3185
3186 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3187 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3188 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3189 * target.h (target_breakpoint_kind_from_pc): New macro.
3190
1652a986
AT
31912015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3192
3193 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3194 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3195 the default breakpoint kind.
3196
abeead09
AT
31972015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3198
3199 * linux-arm-low.c (arm_supports_z_point_type): Add software
3200 breakpoint support.
3201
b0b4b501
AT
32022015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3203
3204 * linux-arm-low.c: Refactor breakpoint definitions.
3205 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3206 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3207
8689682c
AT
32082015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3209
3210 * Makefile.in: Add arm.c/o.
3211 * configure.srv: Likewise.
3212 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3213 (arm_breakpoint_kind_from_pc): New function.
3214 (arm_sw_breakpoint_from_kind): Return proper kind.
3215 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3216
27165294
AT
32172015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3218
3219 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3220 removal.
3221 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3222 (struct raw_breakpoint) <size>: Remove.
3223 (struct raw_breakpoint) <kind>: Add.
3224 (bp_size): New function.
3225 (bp_opcode): Likewise.
3226 (find_raw_breakpoint_at): Adjust for kind.
3227 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3228 (remove_memory_breakpoint): Adjust for kind call bp_size.
3229 (set_raw_breakpoint_at): Adjust for kind.
3230 (set_breakpoint): Likewise.
3231 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3232 (delete_raw_breakpoint): Adjust for kind.
3233 (delete_breakpoint): Likewise.
3234 (find_gdb_breakpoint): Likewise.
3235 (set_gdb_breakpoint_1): Likewise.
3236 (set_gdb_breakpoint): Likewise.
3237 (delete_gdb_breakpoint_1): Likewise.
3238 (delete_gdb_breakpoint): Likewise.
3239 (uninsert_raw_breakpoint): Likewise.
3240 (reinsert_raw_breakpoint): Likewise.
3241 (set_breakpoint_data): Remove.
3242 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3243 (check_mem_read): Adjust for kind call bp_size.
3244 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3245 (clone_one_breakpoint): Adjust for kind.
3246 * mem-break.h (set_gdb_breakpoint): Likewise.
3247 (delete_gdb_breakpoint): Likewise.
3248 * server.c (process_serial_event): Likewise.
3249
dd373349
AT
32502015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3251
3252 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3253 (struct linux_target_ops) <breakpoint>: Remove.
3254 (struct linux_target_ops) <breakpoint_len>: Remove.
3255 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3256 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3257 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3258 (arm_sw_breakpoint_from_kind): New function.
3259 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3260 (struct linux_target_ops) <breakpoint>: Remove.
3261 (struct linux_target_ops) <breakpoint_len>: Remove.
3262 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3263 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3264 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3265 (struct linux_target_ops) <breakpoint>: Remove.
3266 (struct linux_target_ops) <breakpoint_len>: Remove.
3267 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3268 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3269 * linux-crisv32-low.c (cris_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-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3275 and sw_breakpoint_from_kind to increment the pc.
3276 (linux_breakpoint_kind_from_pc): New function.
3277 (linux_sw_breakpoint_from_kind): New function.
3278 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3279 (initialize_low): Call breakpoint_kind_from_pc and
3280 sw_breakpoint_from_kind to replace breakpoint_data/len.
3281 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3282 New field.
3283 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3284 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3285 (struct linux_target_ops) <breakpoint>: Remove.
3286 (struct linux_target_ops) <breakpoint_len>: Remove.
3287 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3288 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3289 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3290 (struct linux_target_ops) <breakpoint>: Remove.
3291 (struct linux_target_ops) <breakpoint_len>: Remove.
3292 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3293 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3294 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3295 (struct linux_target_ops) <breakpoint>: Remove.
3296 (struct linux_target_ops) <breakpoint_len>: Remove.
3297 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3298 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3299 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3300 (struct linux_target_ops) <breakpoint>: Remove.
3301 (struct linux_target_ops) <breakpoint_len>: Remove.
3302 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3303 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3304 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3305 (struct linux_target_ops) <breakpoint>: Remove.
3306 (struct linux_target_ops) <breakpoint_len>: Remove.
3307 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3308 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3309 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3310 (struct linux_target_ops) <breakpoint>: Remove.
3311 (struct linux_target_ops) <breakpoint_len>: Remove.
3312 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3313 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3314 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3315 (struct linux_target_ops) <breakpoint>: Remove.
3316 (struct linux_target_ops) <breakpoint_len>: Remove.
3317 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3318 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3319 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3320 (struct linux_target_ops) <breakpoint>: Remove.
3321 (struct linux_target_ops) <breakpoint_len>: Remove.
3322 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3323 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3324 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3325 (struct linux_target_ops) <breakpoint>: Remove.
3326 (struct linux_target_ops) <breakpoint_len>: Remove.
3327 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3328 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3329 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3330 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3331 (struct linux_target_ops) <breakpoint>: Remove.
3332 (struct linux_target_ops) <breakpoint_len>: Remove.
3333 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3334 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3335 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3336 (struct linux_target_ops) <breakpoint>: Remove.
3337 (struct linux_target_ops) <breakpoint_len>: Remove.
3338 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3339 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3340
4cd98a19
AT
33412015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3342
3343 * linux-cris-low.c (cris_get_pc): Remove void arg.
3344
774ee6d2
AR
33452015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3346
3347 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3348 variable name.
3349
833dcd29
AR
33502015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3351
3352 * inferiors.c (thread_pid_matches_callback): New function.
3353 (find_thread_process): New function.
3354 (remove_thread): Reset current_thread.
3355 (remove_process): Assert threads have been removed first.
3356
8d689ee5
YQ
33572015-10-15 Yao Qi <yao.qi@linaro.org>
3358
3359 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3360 if it is 3.
3361 (aarch64_remove_point): Likewise.
3362 * regcache.c (regcache_register_size): New function.
3363
1c2e1515
YQ
33642015-10-12 Yao Qi <yao.qi@linaro.org>
3365
3366 * linux-aarch64-low.c: Update all callers as emit_load_store
3367 is renamed to aarch64_emit_load_store.
3368
e1c587c3
YQ
33692015-10-12 Yao Qi <yao.qi@linaro.org>
3370
3371 * linux-aarch64-low.c: Update all callers of function renaming
3372 from emit_insn to aarch64_emit_insn.
3373
b6542f81
YQ
33742015-10-12 Yao Qi <yao.qi@linaro.org>
3375
3376 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3377 arch/aarch64-insn.h.
3378 (struct aarch64_memory_operand): Likewise.
3379 (ENCODE): Likewise.
3380 (emit_insn): Move to arch/aarch64-insn.c.
3381 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3382 (emit_load_store): Move to arch/aarch64-insn.c.
3383 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3384 (can_encode_int32): Remove.
3385
246994ce
YQ
33862015-10-12 Yao Qi <yao.qi@linaro.org>
3387
3388 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3389 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3390 (aarch64_relocate_instruction): Likewise.
3391 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3392 (struct aarch64_insn_visitor): Likewise.
3393
0badd99f
YQ
33942015-10-12 Yao Qi <yao.qi@linaro.org>
3395
3396 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3397 (struct aarch64_insn_visitor): New.
3398 (struct aarch64_insn_relocation_data): New.
3399 (aarch64_ftrace_insn_reloc_b): New function.
3400 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3401 (aarch64_ftrace_insn_reloc_cb): Likewise.
3402 (aarch64_ftrace_insn_reloc_tb): Likewise.
3403 (aarch64_ftrace_insn_reloc_adr): Likewise.
3404 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3405 (aarch64_ftrace_insn_reloc_others): Likewise.
3406 (visitor): New.
3407 (aarch64_relocate_instruction): Use visitor.
3408
dfaffe9d
YQ
34092015-10-12 Yao Qi <yao.qi@linaro.org>
3410
3411 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3412 int. Add argument buf.
3413 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3414 aarch64_relocate_instruction.
3415
70b439f0
YQ
34162015-10-12 Yao Qi <yao.qi@linaro.org>
3417
3418 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3419 argument insn. Remove local variable insn. Don't call
3420 target_read_uint32.
3421 (aarch64_install_fast_tracepoint_jump_pad): Call
3422 target_read_uint32.
3423
7781c06f
YQ
34242015-09-30 Yao Qi <yao.qi@linaro.org>
3425
3426 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3427 (emit_load_store_pair): Likewise.
3428
9a3c8263
SM
34292015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3430
3431 * dll.c (match_dll): Add cast(s).
3432 (unloaded_dll): Likewise.
3433 * linux-low.c (second_thread_of_pid_p): Likewise.
3434 (delete_lwp_callback): Likewise.
3435 (count_events_callback): Likewise.
3436 (select_event_lwp_callback): Likewise.
3437 (linux_set_resume_request): Likewise.
3438 * server.c (accumulate_file_name_length): Likewise.
3439 (emit_dll_description): Likewise.
3440 (handle_qxfer_threads_worker): Likewise.
3441 (visit_actioned_threads): Likewise.
3442 * thread-db.c (any_thread_of): Likewise.
3443 * tracepoint.c (same_process_p): Likewise.
3444 (match_blocktype): Likewise.
3445 (build_traceframe_info_xml): Likewise.
3446
224c3ddb
SM
34472015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3448
3449 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3450 assignment.
3451 (gdb_unparse_agent_expr): Likewise.
3452 * hostio.c (require_data): Likewise.
3453 (handle_pread): Likewise.
3454 * linux-low.c (disable_regset): Likewise.
3455 (fetch_register): Likewise.
3456 (store_register): Likewise.
3457 (get_dynamic): Likewise.
3458 (linux_qxfer_libraries_svr4): Likewise.
3459 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3460 (set_fast_tracepoint_jump): Likewise.
3461 (uninsert_fast_tracepoint_jumps_at): Likewise.
3462 (reinsert_fast_tracepoint_jumps_at): Likewise.
3463 (validate_inserted_breakpoint): Likewise.
3464 (clone_agent_expr): Likewise.
3465 * regcache.c (init_register_cache): Likewise.
3466 * remote-utils.c (putpkt_binary_1): Likewise.
3467 (decode_M_packet): Likewise.
3468 (decode_X_packet): Likewise.
3469 (look_up_one_symbol): Likewise.
3470 (relocate_instruction): Likewise.
3471 (monitor_output): Likewise.
3472 * server.c (handle_search_memory): Likewise.
3473 (handle_qxfer_exec_file): Likewise.
3474 (handle_qxfer_libraries): Likewise.
3475 (handle_qxfer): Likewise.
3476 (handle_query): Likewise.
3477 (handle_v_cont): Likewise.
3478 (handle_v_run): Likewise.
3479 (captured_main): Likewise.
3480 * target.c (write_inferior_memory): Likewise.
3481 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3482 * tracepoint.c (init_trace_buffer): Likewise.
3483 (add_tracepoint_action): Likewise.
3484 (add_traceframe): Likewise.
3485 (add_traceframe_block): Likewise.
3486 (cmd_qtdpsrc): Likewise.
3487 (cmd_qtdv): Likewise.
3488 (cmd_qtstatus): Likewise.
3489 (response_source): Likewise.
3490 (response_tsv): Likewise.
3491 (cmd_qtnotes): Likewise.
3492 (gdb_collect): Likewise.
3493 (initialize_tracepoint): Likewise.
3494
afbe19f8
PL
34952015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3496
3497 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3498 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3499 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3500 <NOP>: New.
3501 (enum aarch64_condition_codes): New enum.
3502 (w0): New static global.
3503 (fp): Likewise.
3504 (lr): Likewise.
3505 (struct aarch64_memory_operand) <type>: New
3506 MEMORY_OPERAND_POSTINDEX type.
3507 (postindex_memory_operand): New helper function.
3508 (emit_ret): New function.
3509 (emit_load_store_pair): New function, factored out of emit_stp
3510 with support for MEMORY_OPERAND_POSTINDEX.
3511 (emit_stp): Rewrite using emit_load_store_pair.
3512 (emit_ldp): New function.
3513 (emit_load_store): Likewise.
3514 (emit_ldr): Mention post-index instruction in comment.
3515 (emit_ldrh): New function.
3516 (emit_ldrb): New function.
3517 (emit_ldrsw): Mention post-index instruction in comment.
3518 (emit_str): Likewise.
3519 (emit_subs): New function.
3520 (emit_cmp): Likewise.
3521 (emit_and): Likewise.
3522 (emit_orr): Likewise.
3523 (emit_orn): Likewise.
3524 (emit_eor): Likewise.
3525 (emit_mvn): Likewise.
3526 (emit_lslv): Likewise.
3527 (emit_lsrv): Likewise.
3528 (emit_asrv): Likewise.
3529 (emit_mul): Likewise.
3530 (emit_sbfm): Likewise.
3531 (emit_sbfx): Likewise.
3532 (emit_ubfm): Likewise.
3533 (emit_ubfx): Likewise.
3534 (emit_csinc): Likewise.
3535 (emit_cset): Likewise.
3536 (emit_nop): Likewise.
3537 (emit_ops_insns): New helper function.
3538 (emit_pop): Likewise.
3539 (emit_push): Likewise.
3540 (aarch64_emit_prologue): New function.
3541 (aarch64_emit_epilogue): Likewise.
3542 (aarch64_emit_add): Likewise.
3543 (aarch64_emit_sub): Likewise.
3544 (aarch64_emit_mul): Likewise.
3545 (aarch64_emit_lsh): Likewise.
3546 (aarch64_emit_rsh_signed): Likewise.
3547 (aarch64_emit_rsh_unsigned): Likewise.
3548 (aarch64_emit_ext): Likewise.
3549 (aarch64_emit_log_not): Likewise.
3550 (aarch64_emit_bit_and): Likewise.
3551 (aarch64_emit_bit_or): Likewise.
3552 (aarch64_emit_bit_xor): Likewise.
3553 (aarch64_emit_bit_not): Likewise.
3554 (aarch64_emit_equal): Likewise.
3555 (aarch64_emit_less_signed): Likewise.
3556 (aarch64_emit_less_unsigned): Likewise.
3557 (aarch64_emit_ref): Likewise.
3558 (aarch64_emit_if_goto): Likewise.
3559 (aarch64_emit_goto): Likewise.
3560 (aarch64_write_goto_address): Likewise.
3561 (aarch64_emit_const): Likewise.
3562 (aarch64_emit_call): Likewise.
3563 (aarch64_emit_reg): Likewise.
3564 (aarch64_emit_pop): Likewise.
3565 (aarch64_emit_stack_flush): Likewise.
3566 (aarch64_emit_zero_ext): Likewise.
3567 (aarch64_emit_swap): Likewise.
3568 (aarch64_emit_stack_adjust): Likewise.
3569 (aarch64_emit_int_call_1): Likewise.
3570 (aarch64_emit_void_call_2): Likewise.
3571 (aarch64_emit_eq_goto): Likewise.
3572 (aarch64_emit_ne_goto): Likewise.
3573 (aarch64_emit_lt_goto): Likewise.
3574 (aarch64_emit_le_goto): Likewise.
3575 (aarch64_emit_gt_goto): Likewise.
3576 (aarch64_emit_ge_got): Likewise.
3577 (aarch64_emit_ops_impl): New static global variable.
3578 (aarch64_emit_ops): New target function, return
3579 &aarch64_emit_ops_impl.
3580 (struct linux_target_ops): Install it.
3581
bb903df0
PL
35822015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3583
3584 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3585 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3586 aarch64-ipa.o.
3587 * linux-aarch64-ipa.c: New file.
3588 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3589 and endian.h.
3590 (aarch64_get_thread_area): New target method.
3591 (extract_signed_bitfield): New helper function.
3592 (aarch64_decode_ldr_literal): New function.
3593 (enum aarch64_opcodes): New enum.
3594 (struct aarch64_register): New struct.
3595 (struct aarch64_operand): New struct.
3596 (x0): New static global.
3597 (x1): Likewise.
3598 (x2): Likewise.
3599 (x3): Likewise.
3600 (x4): Likewise.
3601 (w2): Likewise.
3602 (ip0): Likewise.
3603 (sp): Likewise.
3604 (xzr): Likewise.
3605 (aarch64_register): New helper function.
3606 (register_operand): Likewise.
3607 (immediate_operand): Likewise.
3608 (struct aarch64_memory_operand): New struct.
3609 (offset_memory_operand): New helper function.
3610 (preindex_memory_operand): Likewise.
3611 (enum aarch64_system_control_registers): New enum.
3612 (ENCODE): New macro.
3613 (emit_insn): New helper function.
3614 (emit_b): New function.
3615 (emit_bcond): Likewise.
3616 (emit_cb): Likewise.
3617 (emit_tb): Likewise.
3618 (emit_blr): Likewise.
3619 (emit_stp): Likewise.
3620 (emit_ldp_q_offset): Likewise.
3621 (emit_stp_q_offset): Likewise.
3622 (emit_load_store): Likewise.
3623 (emit_ldr): Likewise.
3624 (emit_ldrsw): Likewise.
3625 (emit_str): Likewise.
3626 (emit_ldaxr): Likewise.
3627 (emit_stxr): Likewise.
3628 (emit_stlr): Likewise.
3629 (emit_data_processing_reg): Likewise.
3630 (emit_data_processing): Likewise.
3631 (emit_add): Likewise.
3632 (emit_sub): Likewise.
3633 (emit_mov): Likewise.
3634 (emit_movk): Likewise.
3635 (emit_mov_addr): Likewise.
3636 (emit_mrs): Likewise.
3637 (emit_msr): Likewise.
3638 (emit_sevl): Likewise.
3639 (emit_wfe): Likewise.
3640 (append_insns): Likewise.
3641 (can_encode_int32_in): New helper function.
3642 (aarch64_relocate_instruction): New function.
3643 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3644 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3645 (struct linux_target_ops): Install aarch64_get_thread_area,
3646 aarch64_install_fast_tracepoint_jump_pad and
3647 aarch64_get_min_fast_tracepoint_insn_len.
3648
787749ea
PL
36492015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3650
3651 * Makefile.in (aarch64-insn.o): New rule.
3652 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3653
9812b2e6
YQ
36542015-09-21 Yao Qi <yao.qi@linaro.org>
3655
3656 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3657
18fe412b
YQ
36582015-09-21 Yao Qi <yao.qi@linaro.org>
3659
3660 * tracepoint.c (max_jump_pad_size): Remove.
3661
a0cc84cd
YQ
36622015-09-18 Yao Qi <yao.qi@linaro.org>
3663
3664 * linux-aarch64-low.c: Don't include sys/uio.h.
3665 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3666
d78908cf
WW
36672015-09-16 Wei-cheng Wang <cole945@gmail.com>
3668
3669 * tracepoint.c (eval_result_type): Change prototype.
3670 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3671
d57e0d50
PA
36722015-09-15 Pedro Alves <palves@redhat.com>
3673
3674 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3675 Check whether to report exec events instead of checking whether
3676 multiprocess is enabled.
3677
5a676acc
PA
36782015-09-15 Pedro Alves <palves@redhat.com>
3679
3680 PR remote/18965
3681 * remote-utils.c (prepare_resume_reply): Merge
3682 TARGET_WAITKIND_VFORK_DONE switch case with the
3683 TARGET_WAITKIND_FORKED case.
3684
7c5d0fad
YQ
36852015-09-15 Yao Qi <yao.qi@linaro.org>
3686
3687 * server.c (handle_query): Check string comparison using
3688 "else if" instead of "if".
3689
750ce8d1
YQ
36902015-09-15 Yao Qi <yao.qi@linaro.org>
3691
3692 * server.c (vCont_supported): New global variable.
3693 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3694 matches. Append ";vContSupported+" to own_buf.
3695 (handle_v_requests): Append ";s;S" to own_buf if target supports
3696 hardware single step or vCont_supported is false.
3697 (capture_main): Set vCont_supported to zero.
3698
70b90b91
YQ
36992015-09-15 Yao Qi <yao.qi@linaro.org>
3700
3701 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3702 it to ...
3703 (linux_supports_hardware_single_step): ... New function.
3704 (linux_target_ops): Update.
3705 * lynx-low.c (lynx_target_ops): Set field
3706 supports_hardware_single_step to target_can_do_hardware_single_step.
3707 * nto-low.c (nto_target_ops): Likewise.
3708 * spu-low.c (spu_target_ops): Likewise.
3709 * win32-low.c (win32_target_ops): Likewise.
3710 * target.c (target_can_do_hardware_single_step): New function.
3711 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3712 Remove. <supports_hardware_single_step>: New field.
3713 (target_supports_conditional_breakpoints): Remove.
3714 (target_supports_hardware_single_step): New macro.
3715 (target_can_do_hardware_single_step): Declare.
3716 * server.c (handle_query): Use target_supports_hardware_single_step
3717 instead of target_supports_conditional_breakpoints.
3718
ade90bde
YQ
37192015-09-15 Yao Qi <yao.qi@linaro.org>
3720
3721 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3722 function.
3723 (struct linux_target_ops the_low_target): Install
3724 aarch64_linux_siginfo_fixup.
3725
94585166
DB
37262015-09-11 Don Breazeal <donb@codesourcery.com>
3727 Luis Machado <lgustavo@codesourcery.com>
3728
3729 * linux-low.c (linux_mourn): Static declaration.
3730 (linux_arch_setup): Move in front of
3731 handle_extended_wait.
3732 (linux_arch_setup_thread): New function.
3733 (handle_extended_wait): Handle exec events. Call
3734 linux_arch_setup_thread. Make event_lwp argument a
3735 pointer-to-a-pointer.
3736 (check_zombie_leaders): Do not check stopped threads.
3737 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3738 (linux_low_filter_event): Add lwp and thread for exec'ing
3739 non-leader thread if leader thread has been deleted.
3740 Refactor code into linux_arch_setup_thread and call it.
3741 Pass child lwp pointer by reference to handle_extended_wait.
3742 (linux_wait_for_event_filtered): Update comment.
3743 (linux_wait_1): Prevent clobbering exec event status.
3744 (linux_supports_exec_events): New function.
3745 (linux_target_ops) <supports_exec_events>: Initialize new member.
3746 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3747 new member.
3748 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3749 * server.c (report_exec_events): New global variable.
3750 (handle_query): Handle qSupported query for exec-events feature.
3751 (captured_main): Initialize report_exec_events.
3752 * server.h (report_exec_events): Declare new global variable.
3753 * target.h (struct target_ops) <supports_exec_events>: New
3754 member.
3755 (target_supports_exec_events): New macro.
3756 * win32-low.c (win32_target_ops) <supports_exec_events>:
3757 Initialize new member.
3758
0568462b
MM
37592015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3760
3761 * linux-low.c (linux_low_enable_btrace): Remove.
3762 (linux_target_ops): Replace linux_low_enable_btrace with
3763 linux_enable_btrace.
3764
39edd165
YQ
37652015-09-03 Yao Qi <yao.qi@linaro.org>
3766
3767 * linux-aarch64-low.c (aarch64_insert_point): Call
3768 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3769 returns true.
3770
1db33b5a
UW
37712015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3772
3773 * linux-low.c (check_stopped_by_breakpoint): Use
3774 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3775
ab290430
PA
37762015-08-27 Pedro Alves <palves@redhat.com>
3777
3778 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3779
8d749320
SM
37802015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3781
6711b7f8
SM
3782 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3783 the XNEW-family equivalent.
8d749320
SM
3784 (compile_bytecodes): Likewise.
3785 * dll.c (loaded_dll): Likewise.
3786 * event-loop.c (append_callback_event): Likewise.
3787 (create_file_handler): Likewise.
3788 (create_file_event): Likewise.
3789 * hostio.c (handle_open): Likewise.
3790 * inferiors.c (add_thread): Likewise.
3791 (add_process): Likewise.
3792 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3793 * linux-arm-low.c (arm_new_process): Likewise.
3794 (arm_new_thread): Likewise.
3795 * linux-low.c (add_to_pid_list): Likewise.
3796 (linux_add_process): Likewise.
3797 (handle_extended_wait): Likewise.
3798 (add_lwp): Likewise.
3799 (enqueue_one_deferred_signal): Likewise.
3800 (enqueue_pending_signal): Likewise.
3801 (linux_resume_one_lwp_throw): Likewise.
3802 (linux_resume_one_thread): Likewise.
3803 (linux_read_memory): Likewise.
3804 (linux_write_memory): Likewise.
3805 * linux-mips-low.c (mips_linux_new_process): Likewise.
3806 (mips_linux_new_thread): Likewise.
3807 (mips_add_watchpoint): Likewise.
3808 * linux-x86-low.c (initialize_low_arch): Likewise.
3809 * lynx-low.c (lynx_add_process): Likewise.
3810 * mem-break.c (set_raw_breakpoint_at): Likewise.
3811 (set_breakpoint): Likewise.
3812 (add_condition_to_breakpoint): Likewise.
3813 (add_commands_to_breakpoint): Likewise.
3814 (clone_agent_expr): Likewise.
3815 (clone_one_breakpoint): Likewise.
3816 * regcache.c (new_register_cache): Likewise.
3817 * remote-utils.c (look_up_one_symbol): Likewise.
3818 * server.c (queue_stop_reply): Likewise.
3819 (start_inferior): Likewise.
3820 (queue_stop_reply_callback): Likewise.
3821 (handle_target_event): Likewise.
3822 * spu-low.c (fetch_ppc_memory): Likewise.
3823 (store_ppc_memory): Likewise.
3824 * target.c (set_target_ops): Likewise.
3825 * thread-db.c (thread_db_load_search): Likewise.
3826 (try_thread_db_load_1): Likewise.
3827 * tracepoint.c (add_tracepoint): Likewise.
3828 (add_tracepoint_action): Likewise.
3829 (create_trace_state_variable): Likewise.
3830 (cmd_qtdpsrc): Likewise.
3831 (cmd_qtro): Likewise.
3832 (add_while_stepping_state): Likewise.
3833 * win32-low.c (child_add_thread): Likewise.
3834 (get_image_name): Likewise.
3835
ed8b7b42
YQ
38362015-08-25 Yao Qi <yao.qi@linaro.org>
3837
3838 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3839
db3cb7cb
YQ
38402015-08-25 Yao Qi <yao.qi@linaro.org>
3841
3842 * Makefile.in (aarch64-linux.o): New rule.
3843 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3844 srv_tgtobj.
3845 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3846 (aarch64_init_debug_reg_state): Make it extern.
3847 (aarch64_linux_prepare_to_resume): Remove.
3848
f6011a1c
YQ
38492015-08-25 Yao Qi <yao.qi@linaro.org>
3850
3851 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3852 lwp_arch_private_info and ptid_of_lwp.
3853
88e2cf7e
YQ
38542015-08-25 Yao Qi <yao.qi@linaro.org>
3855
3856 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3857 Find proc_info by find_process_pid. All callers updated.
3858
5e35436e
YQ
38592015-08-25 Yao Qi <yao.qi@linaro.org>
3860
3861 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3862 Remove.
3863 (debug_reg_change_callback): Remove.
3864 (aarch64_notify_debug_reg_change): Remove.
3865
4a8a7965
YQ
38662015-08-25 Yao Qi <yao.qi@linaro.org>
3867
3868 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3869 Call current_lwp_ptid.
3870
32a271ee
YQ
38712015-08-25 Yao Qi <yao.qi@linaro.org>
3872
3873 * linux-aarch64-low.c (debug_reg_change_callback): Use
3874 debug_printf.
3875
0d51c8d7
YQ
38762015-08-25 Yao Qi <yao.qi@linaro.org>
3877
3878 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3879
31a43dd5
YQ
38802015-08-25 Yao Qi <yao.qi@linaro.org>
3881
3882 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3883
8ee52567
YQ
38842015-08-25 Yao Qi <yao.qi@linaro.org>
3885
3886 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3887 the code.
3888
ff3f0f45
YQ
38892015-08-25 Yao Qi <yao.qi@linaro.org>
3890
3891 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3892 Remove.
3893 (debug_reg_change_callback): Remove argument entry and add argument
3894 lwp. Remove local variable thread. Don't print thread id in the
3895 debugging output. Don't check whether pid of thread equals to pid.
3896 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3897 iterate_over_lwps instead find_inferior.
3898
3d40fbb5
PA
38992015-08-24 Pedro Alves <palves@redhat.com>
3900
3901 * inferiors.c (get_first_process): New function.
3902 * inferiors.h (get_first_process): New declaration.
3903 * remote-utils.c (read_ptid): Default to the first process in the
3904 list, instead of to the current thread's process.
3905
438e1e42
PA
39062015-08-24 Pedro Alves <palves@redhat.com>
3907
3908 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3909 * event-loop.c: Likewise.
3910 * remote-utils.c: Likewise.
3911 * tracepoint.c: Likewise.
3912
a8c6d4fc
PA
39132015-08-24 Pedro Alves <palves@redhat.com>
3914
3915 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3916 ptid_get_lwp.
3917
99b0bb12
PA
39182015-08-21 Pedro Alves <palves@redhat.com>
3919
3920 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3921 instead of literal 1.
3922
f8904751
PA
39232015-08-21 Pedro Alves <palves@redhat.com>
3924
3925 * tdesc.c (default_description): Explicitly zero-initialize.
3926
465a859e
PA
39272015-08-21 Pedro Alves <palves@redhat.com>
3928
3929 PR gdb/18749
3930 * inferiors.c (remove_thread): Discard any pending stop reply for
3931 this thread.
3932 * server.c (remove_all_on_match_pid): Rename to ...
3933 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3934 instead of a pid.
3935 (discard_queued_stop_replies): Change parameter to a ptid. Now
3936 extern.
3937 (handle_v_kill, kill_inferior_callback, captured_main)
3938 (process_serial_event): Adjust.
3939 * server.h (discard_queued_stop_replies): Declare.
3940
f0db101d
PA
39412015-08-21 Pedro Alves <palves@redhat.com>
3942
3943 * linux-low.c (wait_for_sigstop): Always switch to no thread
3944 selected if the previously current thread dies.
3945 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3946 process instead of the current thread's.
3947 * remote-utils.c (input_interrupt): Don't check if there's no
3948 current thread.
3949 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3950 current thread to the general thread fails, error out.
3951 (handle_qxfer_auxv, handle_qxfer_libraries)
3952 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3953 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3954 (handle_query): Check if there's a thread selected instead of
3955 checking whether there's any thread in the thread list.
3956 (handle_qxfer_threads, handle_qxfer_btrace)
3957 (handle_qxfer_btrace_conf): Don't error out early if there's no
3958 thread in the thread list.
3959 (handle_v_cont, myresume): Don't set the current thread to the
3960 continue thread.
3961 (process_serial_event) <Hg handling>: Also set thread_id if the
3962 previous general thread is still alive.
3963 (process_serial_event) <g/G handling>: If setting the current
3964 thread to the general thread fails, error out.
3965 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3966 thread's lwp instead of the current thread's.
3967 * target.c (set_desired_thread): If the desired thread was not
3968 found, leave the current thread pointing to NULL. Return an int
3969 (boolean) indicating success.
3970 * target.h (set_desired_thread): Change return type to int.
3971
40045d91
MF
39722015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3973
3974 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3975 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3976 #includes.
3977 (ps_get_thread_area): New function.
3978
45face3b
GB
39792015-08-19 Gary Benson <gbenson@redhat.com>
3980
3981 * hostio.c (handle_pread): Do not attempt to read more data
3982 than hostio_reply_with_data can fit in a packet.
3983
16d5f642
JB
39842015-08-18 Joel Brobecker <brobecker@adacore.com>
3985
3986 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3987
a738da3a
MF
39882015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3989
3990 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3991
33ebda9d
PA
39922015-08-06 Pedro Alves <palves@redhat.com>
3993
3994 * tracepoint.c (expr_eval_result): Now an int.
3995
a44892be
PA
39962015-08-06 Pedro Alves <palves@redhat.com>
3997
3998 * gdbthread.h (struct regcache): Forward declare.
3999 (struct thread_info) <regcache_data>: Now a struct regcache
4000 pointer.
4001 * inferiors.c (inferior_regcache_data)
4002 (set_inferior_regcache_data): Now work with struct regcache
4003 pointers.
4004 * inferiors.h (struct regcache): Forward declare.
4005 (inferior_regcache_data, set_inferior_regcache_data): Now work
4006 with struct regcache pointers.
4007 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4008 (free_register_cache_thread): Remove struct regcache pointer
4009 casts.
4010
608a1e46
PA
40112015-08-06 Pedro Alves <palves@redhat.com>
4012
4013 * server.c (captured_main): On error, print the exception message
4014 to stderr, and if run_once is set, throw a quit.
4015
f0ce0d3a
PA
40162015-08-06 Pedro Alves <palves@redhat.com>
4017
4018 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4019 the current thread.
4020
bf47e248
PA
40212015-08-06 Pedro Alves <palves@redhat.com>
4022
4023 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4024 reading beyond the passed in buffer length.
4025
b6b9ffcc
PL
40262015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4027
4028 * tracepoint.c (symbol_list) <required>: Remove.
4029
863d01bd
PA
40302015-08-06 Pedro Alves <palves@redhat.com>
4031
4032 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4033 count if stopping and suspending threads.
4034 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4035 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4036 (linux_detach): Complete an ongoing step-over.
4037 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4038 throughout.
4039 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4040 (linux_wait_1): If passing a signal to the inferior after
4041 finishing a step-over, unsuspend and re-resume all lwps. If we
4042 see a single-step event but the thread should be continuing, don't
4043 pass the trap to gdb.
4044 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4045 internal_error instead of gdb_assert.
4046 (enqueue_pending_signal): New function.
4047 (check_ptrace_stopped_lwp_gone): Add debug output.
4048 (start_step_over): Use internal_error instead of gdb_assert.
4049 (complete_ongoing_step_over): New function.
4050 (linux_resume_one_thread): Don't resume a suspended thread.
4051 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4052 it stepping.
4053
00db26fa
PA
40542015-08-06 Pedro Alves <palves@redhat.com>
4055
4056 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4057 (linux_thread_alive): Use lwp_is_marked_dead.
4058 (extended_event_reported): Delete.
4059 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4060 instead of extended_event_reported.
4061 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4062 as well.
4063 (lwp_is_marked_dead): New function.
4064 (lwp_running): Use lwp_is_marked_dead.
4065 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4066 comment.
4067
ad071a30
PA
40682015-08-06 Pedro Alves <palves@redhat.com>
4069
4070 * linux-low.c (linux_wait_1): Move fork event output out of the
4071 !report_to_gdb check. Pass event_child->waitstatus to
4072 target_waitstatus_to_string instead of ourstatus.
4073
524b57e6
YQ
40742015-08-04 Yao Qi <yao.qi@linaro.org>
4075
4076 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4077 if current_thread is 32 bit.
4078
6085d6f6
YQ
40792015-08-04 Yao Qi <yao.qi@linaro.org>
4080
4081 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4082 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4083 * server.c (extended_protocol): Remove "static".
4084 * server.h (extended_protocol): Declare it.
4085
8a7e4587
YQ
40862015-08-04 Yao Qi <yao.qi@linaro.org>
4087
4088 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4089 both aarch64 and aarch32.
4090 (aarch64_set_pc): Likewise.
4091
3b53ae99
YQ
40922015-08-04 Yao Qi <yao.qi@linaro.org>
4093
4094 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4095 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4096 arm-with-neon.xml to srv_xmlfiles.
4097 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4098 (is_64bit_tdesc): New function.
4099 (aarch64_linux_read_description): New function.
4100 (aarch64_arch_setup): Call aarch64_linux_read_description.
4101 (regs_info): Rename to regs_info_aarch64.
4102 (aarch64_regs_info): Return right regs_info.
4103 (initialize_low_arch): Call initialize_low_arch_aarch32.
4104
bd9e6534
YQ
41052015-08-04 Yao Qi <yao.qi@linaro.org>
4106
4107 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4108 * linux-aarch32-low.c: New file.
4109 * linux-aarch32-low.h: New file.
4110 * linux-arm-low.c (arm_fill_gregset): Move it to
4111 linux-aarch32-low.c.
4112 (arm_store_gregset): Likewise.
4113 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4114 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4115 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4116 (regs_info): Rename to regs_info_arm.
4117 (arm_regs_info): Return regs_info_aarch32 if
4118 have_ptrace_getregset is 1 and target description is
4119 arm_with_neon or arm_with_vfpv3.
4120 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4121 Call initialize_low_arch_aarch32 instead.
4122
ded48a5e
YQ
41232015-08-04 Yao Qi <yao.qi@linaro.org>
4124
4125 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4126 * linux-low.c: ... here.
4127 * linux-low.h (have_ptrace_getregset): Declare it.
4128
96e9210f
PA
41292015-08-04 Pedro Alves <palves@redhat.com>
4130
4131 * thread-db.c (struct thread_db): Use new typedefs.
4132 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4133 CHK calls.
4134 (disable_thread_event_reporting): Cast result of dlsym to
4135 destination function pointer type.
4136 (thread_db_mourn): Use td_ta_delete_ftype.
4137
af60a1ef
SL
41382015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4139
4140 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4141 arch variant.
4142 (CDX_BREAKPOINT): Define for R2.
4143 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4144 (the_low_target): Add comments.
4145
e8b41681
YQ
41462015-07-30 Yao Qi <yao.qi@linaro.org>
4147
4148 * linux-arm-low.c (arm_hwcap): Remove it.
4149 (arm_read_description): New local variable arm_hwcap. Don't
4150 set arm_hwcap to zero.
4151
89abb039
YQ
41522015-07-30 Yao Qi <yao.qi@linaro.org>
4153
4154 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4155 Use regcache->tdesc instead.
4156 (arm_store_wmmxregset): Likewise.
4157 (arm_fill_vfpregset): Likewise.
4158 (arm_store_vfpregset): Likewise.
4159
deca266c
YQ
41602015-07-30 Yao Qi <yao.qi@linaro.org>
4161
4162 * linux-arm-low.c: Include arch/arm.h.
4163 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4164 (arm_store_gregset): Likewise.
4165
aa58a496
SM
41662015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4167
4168 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4169 ptrace's 4th parameter.
4170
50904b25
YQ
41712015-07-27 Yao Qi <yao.qi@linaro.org>
4172
4173 * configure.srv (case aarch64*-*-linux*): Don't set
4174 srv_linux_usrregs.
4175
5826e159
PA
41762015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4177
4178 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4179 sys/ptrace.h.
4180 * linux-arm-low.c: Likewise.
4181 * linux-cris-low.c: Likewise.
4182 * linux-crisv32-low.c: Likewise.
4183 * linux-low.c: Likewise.
4184 * linux-m68k-low.c: Likewise.
4185 * linux-mips-low.c: Likewise.
4186 * linux-nios2-low.c: Likewise.
4187 * linux-s390-low.c: Likewise.
4188 * linux-sparc-low.c: Likewise.
4189 * linux-tic6x-low.c: Likewise.
4190 * linux-tile-low.c: Likewise.
4191 * linux-x86-low.c: Likewise.
4192
54019719
PA
41932015-07-24 Pedro Alves <palves@redhat.com>
4194
4195 * config.in: Regenerate.
4196 * configure: Regenerate.
4197
eb7aa561
PA
41982015-07-24 Pedro Alves <palves@redhat.com>
4199
4200 * acinclude.m4: Include ../ptrace.m4.
4201 * configure.ac: Call GDB_AC_PTRACE.
4202 * config.in, configure: Regenerate.
4203
55d7b841
YQ
42042015-07-24 Yao Qi <yao.qi@linaro.org>
4205
4206 * linux-low.c (linux_create_inferior): Remove setting to
4207 proc->priv->new_inferior.
4208 (linux_attach): Likewise.
4209 (linux_low_filter_event): Likewise.
4210 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4211
c06cbd92
YQ
42122015-07-24 Yao Qi <yao.qi@linaro.org>
4213
4214 * linux-low.c (linux_arch_setup): New function.
4215 (linux_low_filter_event): If proc->tdesc is NULL and
4216 proc->attached is true, call the_low_target.arch_setup.
4217 Otherwise, keep status pending, and return.
4218 (linux_resume_one_lwp_throw): Don't call get_pc if
4219 thread->while_stepping isn't NULL. Don't call
4220 get_thread_regcache if proc->tdesc is NULL.
4221 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4222 (linux_target_ops): Install arch_setup.
4223 * server.c (start_inferior): Call the_target->arch_setup.
4224 * target.h (struct target_ops) <arch_setup>: New field.
4225 (target_arch_setup): New marco.
4226 * lynx-low.c (lynx_target_ops): Update.
4227 * nto-low.c (nto_target_ops): Update.
4228 * spu-low.c (spu_target_ops): Update.
4229 * win32-low.c (win32_target_ops): Update.
4230
5ae3ebba
YQ
42312015-07-24 Yao Qi <yao.qi@linaro.org>
4232
4233 * linux-low.c (linux_add_process): Don't set
4234 proc->priv->new_inferior.
4235 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4236 (linux_attach): Likewise.
4237
eb97750b
YQ
42382015-07-24 Yao Qi <yao.qi@linaro.org>
4239
4240 * server.c (start_inferior): Code refactor.
4241
51aee833
YQ
42422015-07-24 Yao Qi <yao.qi@linaro.org>
4243
4244 * server.c (process_serial_event): Set general_thread.
4245
af1b22f3
YQ
42462015-07-21 Yao Qi <yao.qi@linaro.org>
4247
4248 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4249 aarch64_linux_get_debug_reg_capacity.
4250
554717a3
YQ
42512015-07-17 Yao Qi <yao.qi@linaro.org>
4252
4253 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4254 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4255 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4256 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4257 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4258 (AARCH64_HWP_ALIGNMENT): Likewise.
4259 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4260 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4261 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4262 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4263 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4264 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4265 (struct aarch64_debug_reg_state): Likewise.
4266 (struct arch_lwp_info): Likewise.
4267 (aarch64_align_watchpoint): Likewise.
4268 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4269 (aarch64_watchpoint_length): Likewise.
4270 (aarch64_point_encode_ctrl_reg): Likewise
4271 (aarch64_point_is_aligned): Likewise.
4272 (aarch64_align_watchpoint): Likewise.
4273 (aarch64_linux_set_debug_regs):
4274 (aarch64_dr_state_insert_one_point): Likewise.
4275 (aarch64_dr_state_remove_one_point): Likewise.
4276 (aarch64_handle_breakpoint): Likewise.
4277 (aarch64_handle_aligned_watchpoint): Likewise.
4278 (aarch64_handle_unaligned_watchpoint): Likewise.
4279 (aarch64_handle_watchpoint): Likewise.
4280
c67ca4de
YQ
42812015-07-17 Yao Qi <yao.qi@linaro.org>
4282
4283 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4284 and don't aarch64_get_debug_reg_state. All callers update.
4285 (aarch64_handle_aligned_watchpoint): Likewise.
4286 (aarch64_handle_unaligned_watchpoint): Likewise.
4287 (aarch64_handle_watchpoint): Likewise.
4288 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4289 (aarch64_remove_point): Likewise.
4290
25abf979
YQ
42912015-07-17 Yao Qi <yao.qi@linaro.org>
4292
4293 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4294 debug_printf.
4295 (aarch64_handle_unaligned_watchpoint): Likewise.
4296
db1ff28b
JK
42972015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4298
4299 Revert the previous 3 commits:
4300 Move gdb_regex* to common/
4301 Move linux_find_memory_regions_full & co.
4302 gdbserver build-id attribute generator
4303
700ca40f
JK
43042015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4305 Jan Kratochvil <jan.kratochvil@redhat.com>
4306
4307 gdbserver build-id attribute generator.
4308 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4309 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4310 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4311 (find_phdr): New.
4312 (get_dynamic): Use find_pdhr to traverse program headers.
4313 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4314 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4315 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4316 (get_hex_build_id): New.
4317 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4318 to reply XML document.
4319
9904185c
JK
43202015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4321 Jan Kratochvil <jan.kratochvil@redhat.com>
4322
4323 * target.c: Include target/target-utils.h and fcntl.h.
4324 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4325 (target_fileio_read_stralloc): New functions.
4326
6e5b4429
JK
43272015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4328
4329 * Makefile.in (OBS): Add gdb_regex.o.
4330 (gdb_regex.o): New.
4331 * config.in: Rebuilt.
4332 * configure: Rebuilt.
4333
ddc98fbf
JK
43342015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4335 Jan Kratochvil <jan.kratochvil@redhat.com>
4336
4337 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4338 * Makefile.in (OBS): Add target-utils.o.
4339 (linux-maps.o, target-utils.o): New.
4340 * configure.srv (srv_linux_obj): Add linux-maps.o.
4341
e57bb7a0
PL
43422015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4343
4344 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4345 function, return 1.
4346 (the_low_target): Install it.
4347
586b02a9
PA
43482015-07-14 Pedro Alves <palves@redhat.com>
4349
4350 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4351 Instead, ignore ECHILD, and throw an error for other errnos.
4352
58c1b36c
PA
43532015-07-10 Pedro Alves <palves@redhat.com>
4354
4355 * event-loop.c (struct callback_event) <data>: Change type to
4356 gdb_client_data instance instead of gdb_client_data pointer.
4357 (append_callback_event): Adjust.
4358
421530db
PL
43592015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4360
4361 * linux-aarch64-low.c: Add comments for each linux_target_ops
4362 method. Remove comments already covered in target_ops and
4363 linux_target_ops definitions.
4364 (the_low_target): Add comments for each unimplemented method.
4365
c2d65f38
YQ
43662015-07-09 Yao Qi <yao.qi@linaro.org>
4367
4368 * linux-aarch64-low.c (aarch64_regmap): Remove.
4369 (aarch64_usrregs_info): Remove.
4370 (regs_info): Set field usrregs to NULL.
4371
b20a6524
MM
43722015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4373
4374 * linux-low.c: Include "rsp-low.h"
4375 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4376 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4377 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4378 (handle_btrace_enable_pt): New.
4379 (handle_btrace_general_set): Support "pt".
4380 (handle_btrace_conf_general_set): Support "pt:size".
4381
96c97461
PL
43822015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4383
4384 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4385 Z_PACKET_SW_BP.
4386
37d66942
PL
43872015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4388
4389 * linux-aarch64-low.c: Remove comment about endianness.
4390 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4391 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4392 memcmp.
4393
dc06243f
GB
43942015-06-24 Gary Benson <gbenson@redhat.com>
4395
4396 * linux-i386-ipa.c (stdint.h): Do not include.
4397 * lynx-i386-low.c (stdint.h): Likewise.
4398 * lynx-ppc-low.c (stdint.h): Likewise.
4399 * mem-break.c (stdint.h): Likewise.
4400 * thread-db.c (stdint.h): Likewise.
4401 * tracepoint.c (stdint.h): Likewise.
4402 * win32-low.c (stdint.h): Likewise.
4403
124e13d9
SM
44042015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4405
4406 * server.c (write_qxfer_response): Update call to
4407 remote_escape_output.
4408
909c2cda
JK
44092015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4410 Jan Kratochvil <jan.kratochvil@redhat.com>
4411
4412 Merge multiple hex conversions.
4413 * gdbreplay.c (tohex): Rename to 'fromhex'.
4414 (logchar): Use fromhex.
4415
24c05f46
JK
44162015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4417
4418 * server.c (handle_qxfer_libraries): Set `version' attribute for
4419 <library-list>.
4420
14d2069a
GB
44212015-06-10 Gary Benson <gbenson@redhat.com>
4422
4423 * target.h (struct target_ops) <multifs_open>: New field.
4424 <multifs_unlink>: Likewise.
4425 <multifs_readlink>: Likewise.
4426 * linux-low.c (nat/linux-namespaces.h): New include.
4427 (linux_target_ops): Initialize the_target->multifs_open,
4428 the_target->multifs_unlink and the_target->multifs_readlink.
4429 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4430 * hostio.c (hostio_fs_pid): New static variable.
4431 (hostio_handle_new_gdb_connection): New function.
4432 (handle_setfs): Likewise.
4433 (handle_open): Use the_target->multifs_open as appropriate.
4434 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4435 (handle_readlink): Use the_target->multifs_readlink as
4436 appropriate.
4437 (handle_vFile): Handle vFile:setfs packets.
4438 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4439 after target_handle_new_gdb_connection.
4440
4b8b5e72
GB
44412015-06-10 Gary Benson <gbenson@redhat.com>
4442
4443 * configure.ac (AC_CHECK_FUNCS): Add setns.
4444 * config.in: Regenerate.
4445 * configure: Likewise.
4446 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4447 (linux-namespaces.o): New rule.
4448 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4449
3ac2e371
GB
44502015-06-09 Gary Benson <gbenson@redhat.com>
4451
4452 * hostio.c (handle_open): Process mode argument with
4453 fileio_to_host_mode.
4454
ca9b78ce
YQ
44552015-06-01 Yao Qi <yao.qi@linaro.org>
4456
4457 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4458 * linux-x86-low.c: Likewise.
4459
bfacd19d
DB
44602015-05-28 Don Breazeal <donb@codesourcery.com>
4461
4462 * linux-low.c (handle_extended_wait): Initialize
4463 thread_info.last_resume_kind for new fork children.
4464
452003ef
PA
44652015-05-15 Pedro Alves <palves@redhat.com>
4466
4467 * target.h (target_handle_new_gdb_connection): Rewrite using if
4468 wrapped in do/while.
4469
1041a03c
JB
44702015-05-14 Joel Brobecker <brobecker@adacore.com>
4471
4472 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4473 * configure, config.in: Regenerate.
4474 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4475 Declare typedef.
4476
c269dbdb
DB
44772015-05-12 Don Breazeal <donb@codesourcery.com>
4478
4479 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4480 PTRACE_EVENT_VFORK_DONE.
4481 (linux_low_ptrace_options, extended_event_reported): Add vfork
4482 events.
4483 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4484 and "vforkdone" for RSP 'T' Stop Reply Packet.
4485 * server.h (report_vfork_events): Declare
4486 global variable.
4487
3a8a0396
DB
44882015-05-12 Don Breazeal <donb@codesourcery.com>
4489
4490 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4491 (the_low_target) <new_fork>: Initialize new member.
4492 * linux-arm-low.c (arm_new_fork): New function.
4493 (the_low_target) <new_fork>: Initialize new member.
4494 * linux-low.c (handle_extended_wait): Call new target function
4495 new_fork.
4496 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4497 * linux-mips-low.c (mips_add_watchpoint): New function
4498 extracted from mips_insert_point.
4499 (the_low_target) <new_fork>: Initialize new member.
4500 (mips_linux_new_fork): New function.
4501 (mips_insert_point): Call mips_add_watchpoint.
4502 * linux-x86-low.c (x86_linux_new_fork): New function.
4503 (the_low_target) <new_fork>: Initialize new member.
4504
de0d863e
DB
45052015-05-12 Don Breazeal <donb@codesourcery.com>
4506
4507 * linux-low.c (handle_extended_wait): Implement return value,
4508 rename argument 'event_child' to 'event_lwp', handle
4509 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4510 (linux_low_ptrace_options): New function.
4511 (linux_low_filter_event): Call linux_low_ptrace_options,
4512 use different argument fo linux_enable_event_reporting,
4513 use return value from handle_extended_wait.
4514 (extended_event_reported): New function.
4515 (linux_wait_1): Call extended_event_reported and set
4516 status to report fork events.
4517 (linux_write_memory): Add pid to debug message.
4518 (reset_lwp_ptrace_options_callback): New function.
4519 (linux_handle_new_gdb_connection): New function.
4520 (linux_target_ops): Initialize new structure member.
4521 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4522 * lynx-low.c: Initialize new structure member.
4523 * remote-utils.c (prepare_resume_reply): Implement stop reason
4524 "fork" for "T" stop message.
4525 * server.c (handle_query): Call handle_new_gdb_connection.
4526 * server.h (report_fork_events): Declare global flag.
4527 * target.h (struct target_ops) <handle_new_gdb_connection>:
4528 New member.
4529 (target_handle_new_gdb_connection): New macro.
4530 * win32-low.c: Initialize new structure member.
4531
ddcbc397
DB
45322015-05-12 Don Breazeal <donb@codesourcery.com>
4533
4534 * mem-break.c (APPEND_TO_LIST): Define macro.
4535 (clone_agent_expr): New function.
4536 (clone_one_breakpoint): New function.
4537 (clone_all_breakpoints): New function.
4538 * mem-break.h: Declare new functions.
4539
89245bc0
DB
45402015-05-12 Don Breazeal <donb@codesourcery.com>
4541
4542 * linux-low.c (linux_supports_fork_events): New function.
4543 (linux_supports_vfork_events): New function.
4544 (linux_target_ops): Initialize new structure members.
4545 (initialize_low): Call linux_check_ptrace_features.
4546 * lynx-low.c (lynx_target_ops): Initialize new structure
4547 members.
4548 * server.c (report_fork_events, report_vfork_events):
4549 New global flags.
4550 (handle_query): Add new features to qSupported packet and
4551 response.
4552 (captured_main): Initialize new global variables.
4553 * target.h (struct target_ops) <supports_fork_events>:
4554 New member.
4555 <supports_vfork_events>: New member.
4556 (target_supports_fork_events): New macro.
4557 (target_supports_vfork_events): New macro.
4558 * win32-low.c (win32_target_ops): Initialize new structure
4559 members.
4560
835205d0
GB
45612015-05-12 Gary Benson <gbenson@redhat.com>
4562
4563 * server.c (handle_qxfer_exec_file): Use current process
4564 if annex is empty.
4565
21e94bd9
SL
45662015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4567
4568 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4569 Remove HAVE_PTRACE_GETREGS conditionals.
4570 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4571 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4572
45614f15
YQ
45732015-05-08 Yao Qi <yao.qi@linaro.org>
4574
4575 * linux-low.c (linux_supports_conditional_breakpoints): New
4576 function.
4577 (linux_target_ops): Install new target method.
4578 * lynx-low.c (lynx_target_ops): Install NULL hook for
4579 supports_conditional_breakpoints.
4580 * nto-low.c (nto_target_ops): Likewise.
4581 * spu-low.c (spu_target_ops): Likewise.
4582 * win32-low.c (win32_target_ops): Likewise.
4583 * server.c (handle_query): Check
4584 target_supports_conditional_breakpoints.
4585 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4586 New field.
4587 (target_supports_conditional_breakpoints): New macro.
4588
80ad801e
PA
45892015-05-06 Pedro Alves <palves@redhat.com>
4590
4591 PR server/18081
4592 * server.c (start_inferior): If the process exits, mourn it.
4593
819843c7
GB
45942015-04-21 Gary Benson <gbenson@redhat.com>
4595
4596 * hostio.c (fileio_open_flags_to_host): Factored out to
4597 fileio_to_host_openflags in common/fileio.c. Single use
4598 updated.
4599
a2d5a9d7
MF
46002015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4601
4602 * linux-xtensa-low.c (xtensa_fill_gregset)
4603 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4604 XCHAL_HAVE_LOOP.
4605
deb44829
MF
46062015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4607
4608 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4609 (regs_info): Replace usrregs pointer with NULL.
4610
e57f1de3
GB
46112015-04-17 Gary Benson <gbenson@redhat.com>
4612
4613 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4614 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4615 * server.c (handle_qxfer_exec_file): New function.
4616 (qxfer_packets): Add exec-file entry.
4617 (handle_query): Report qXfer:exec-file:read as supported packet.
4618
62828379
RN
46192015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4620
4621 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4622
b88bb450
GB
46232015-04-09 Gary Benson <gbenson@redhat.com>
4624
4625 * hostio-errno.c (errno_to_fileio_error): Remove function.
4626 Update caller to use remote_fileio_to_fio_error.
4627
c8f4bfdd
YQ
46282015-04-09 Yao Qi <yao.qi@linaro.org>
4629
4630 * linux-low.c (linux_insert_point): Call
4631 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4632 (linux_remove_point): Call remove_memory_breakpoint if type is
4633 raw_bkpt_type_sw.
4634 * linux-x86-low.c (x86_insert_point): Don't call
4635 insert_memory_breakpoint.
4636 (x86_remove_point): Don't call remove_memory_breakpoint.
4637
41f98f02
PA
46382015-04-01 Pedro Alves <palves@redhat.com>
4639 Cleber Rosa <crosa@redhat.com>
4640
4641 * server.c (gdbserver_usage): Reorganize and extend the usage
4642 message.
4643
2bf6fb9d
PA
46442015-03-24 Pedro Alves <palves@redhat.com>
4645
4646 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4647 output. Also dump TRAP_TRACE.
4648 (linux_low_filter_event): In debug output, distinguish a
4649 resume_stop SIGSTOP from a delayed SIGSTOP.
4650
369f6daa
GB
46512015-03-24 Gary Benson <gbenson@redhat.com>
4652
4653 * linux-x86-low.c (x86_linux_new_thread): Moved to
4654 nat/x86-linux.c.
4655 (x86_linux_prepare_to_resume): Likewise.
4656
8e5d4070
GB
46572015-03-24 Gary Benson <gbenson@redhat.com>
4658
4659 * Makefile.in (x86-linux-dregs.o): New rule.
4660 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4661 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4662 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4663 (x86_linux_dr_get): Likewise.
4664 (x86_linux_dr_set): Likewise.
4665 (update_debug_registers_callback): Likewise.
4666 (x86_linux_dr_set_addr): Likewise.
4667 (x86_linux_dr_get_addr): Likewise.
4668 (x86_linux_dr_set_control): Likewise.
4669 (x86_linux_dr_get_control): Likewise.
4670 (x86_linux_dr_get_status): Likewise.
4671 (x86_linux_update_debug_registers): Likewise.
4672
2b95d440
GB
46732015-03-24 Gary Benson <gbenson@redhat.com>
4674
4675 * linux-x86-low.c (x86_linux_update_debug_registers):
4676 New function, factored out from...
4677 (x86_linux_prepare_to_resume): ...this.
4678
14b0bc68
GB
46792015-03-24 Gary Benson <gbenson@redhat.com>
4680
4681 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4682 (x86_linux_dr_set): Likewise.
4683 (update_debug_registers_callback): Likewise.
4684 (x86_linux_dr_set_addr): Likewise.
4685 (x86_linux_dr_get_addr): Likewise.
4686 (x86_linux_dr_set_control): Likewise.
4687 (x86_linux_dr_get_control): Likewise.
4688 (x86_linux_dr_get_status): Likewise.
4689 (x86_linux_prepare_to_resume): Likewise.
4690
5dfe6ca8
GB
46912015-03-24 Gary Benson <gbenson@redhat.com>
4692
4693 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4694 Use perror_with_name. Pass string through gettext.
4695 (x86_linux_dr_set): Likewise.
4696
d33472ad
GB
46972015-03-24 Gary Benson <gbenson@redhat.com>
4698
4699 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4700 (x86_linux_dr_set_addr): ...this.
4701 (x86_dr_low_get_addr): Rename to...
4702 (x86_linux_dr_get_addr): ...this.
4703 (x86_dr_low_set_control): Rename to...
4704 (x86_linux_dr_set_control): ...this.
4705 (x86_dr_low_get_control): Rename to...
4706 (x86_linux_dr_get_control): ...this.
4707 (x86_dr_low_get_status): Rename to...
4708 (x86_linux_dr_get_status): ...this.
4709 (x86_dr_low): Update with new function names.
4710
4b134ca1
GB
47112015-03-24 Gary Benson <gbenson@redhat.com>
4712
4713 * Makefile.in (x86-linux.o): New rule.
4714 * configure.srv: Add x86-linux.o to relevant targets.
4715 * linux-low.c (lwp_set_arch_private_info): New function.
4716 (lwp_arch_private_info): Likewise.
4717 * linux-x86-low.c: Include nat/x86-linux.h.
4718 (arch_lwp_info): Removed structure.
4719 (update_debug_registers_callback):
4720 Use lwp_set_debug_registers_changed.
4721 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4722 and lwp_set_debug_registers_changed.
4723 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4724
34c703da
GB
47252015-03-24 Gary Benson <gbenson@redhat.com>
4726
4727 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4728 * linux-arm-low.c (arm_new_thread): Likewise.
4729 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4730 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4731 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4732 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4733
cff068da
GB
47342015-03-24 Gary Benson <gbenson@redhat.com>
4735
4736 * linux-low.c (ptid_of_lwp): New function.
4737 (lwp_is_stopped): Likewise.
4738 (lwp_stop_reason): Likewise.
4739 * linux-x86-low.c (update_debug_registers_callback):
4740 Use lwp_is_stopped.
4741 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4742 lwp_stop_reason.
4743
b2f7c7e8
GB
47442015-03-24 Gary Benson <gbenson@redhat.com>
4745
4746 * linux-low.h (linux_stop_lwp): Remove declaration.
4747
6d4ee8c6
GB
47482015-03-24 Gary Benson <gbenson@redhat.com>
4749
4750 * linux-low.h: Include nat/linux-nat.h.
4751 * linux-low.c (iterate_over_lwps_args): New structure.
4752 (iterate_over_lwps_filter): New function.
4753 (iterate_over_lwps): Likewise.
4754 * linux-x86-low.c (update_debug_registers_callback):
4755 Update signature to what iterate_over_lwps expects.
4756 Remove PID check that iterate_over_lwps now performs.
4757 (x86_dr_low_set_addr): Use iterate_over_lwps.
4758 (x86_dr_low_set_control): Likewise.
4759
70a0bb6b
GB
47602015-03-24 Gary Benson <gbenson@redhat.com>
4761
4762 * linux-x86-low.c (x86_debug_reg_state): New function.
4763 (x86_linux_prepare_to_resume): Use the above.
4764
7b669087
GB
47652015-03-24 Gary Benson <gbenson@redhat.com>
4766
4767 * linux-low.c (current_lwp_ptid): New function.
4768 * linux-x86-low.c: Include nat/linux-nat.h.
4769 (x86_dr_low_get_addr): Use current_lwp_ptid.
4770 (x86_dr_low_get_control): Likewise.
4771 (x86_dr_low_get_status): Likewise.
4772
eef49a3d
PA
47732015-03-20 Pedro Alves <palves@redhat.com>
4774
4775 * tracepoint.c (cmd_qtstatus): Make "str" const.
4776
b2333d22
PA
47772015-03-20 Pedro Alves <palves@redhat.com>
4778
4779 * server.c (handle_general_set): Make "req_str" const.
4780
23f238d3
PA
47812015-03-19 Pedro Alves <palves@redhat.com>
4782
4783 * linux-low.c (linux_resume_one_lwp): Rename to ...
4784 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4785 instead call perror_with_name.
4786 (check_ptrace_stopped_lwp_gone): New function.
4787 (linux_resume_one_lwp): Reimplement as wrapper around
4788 linux_resume_one_lwp_throw that swallows errors if the LWP is
4789 gone.
4790
91baf43f
PA
47912015-03-19 Pedro Alves <palves@redhat.com>
4792
4793 * linux-low.c (count_events_callback, select_event_lwp_callback):
4794 No longer check whether the thread has resume_stop as last resume
4795 kind.
4796
8bf3b159
PA
47972015-03-19 Pedro Alves <palves@redhat.com>
4798
4799 * linux-low.c (count_events_callback, select_event_lwp_callback):
4800 Use the lwp's status_pending_p field, not the thread's.
4801
b90fc188
PA
48022015-03-19 Pedro Alves <palves@redhat.com>
4803
4804 * linux-low.c (select_event_lwp_callback): Update comments to
4805 no longer mention SIGTRAP.
4806
464b0089
GB
48072015-03-18 Gary Benson <gbenson@redhat.com>
4808
4809 * server.c (handle_query): Do not report vFile:fstat as supported.
4810
aa9e327f
GB
48112015-03-11 Gary Benson <gbenson@redhat.com>
4812
4813 * hostio.c (sys/types.h): New include.
4814 (sys/stat.h): Likewise.
4815 (common-remote-fileio.h): Likewise.
4816 (handle_fstat): New function.
4817 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 4818
791c0056
GB
48192015-03-11 Gary Benson <gbenson@redhat.com>
4820
4821 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4822 struct stat.st_blocks and struct stat.st_blksize.
4823 * configure: Regenerate.
4824 * config.in: Likewise.
4825 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4826 (OBS): Add common-remote-fileio.o.
4827 (common-remote-fileio.o): New rule.
4828
9a9df970
PA
48292015-03-09 Pedro Alves <palves@redhat.com>
4830
4831 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4832 'struct sockaddr' pointer in 'accept' call.
4833
9eb1356e
PA
48342015-03-09 Pedro Alves <palves@redhat.com>
4835
4836 Revert:
4837 2015-03-07 Pedro Alves <palves@redhat.com>
4838 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4839 or <winsock2.h> here. Instead include "gdb_socket.h".
4840 (remote_open): Use union gdb_sockaddr_u.
4841 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4842 or <winsock2.h> here. Instead include "gdb_socket.h".
4843 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4844 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4845 or <sys/un.h>.
4846 (init_named_socket, gdb_agent_helper_thread): Use union
4847 gdb_sockaddr_u.
4848
aac331e4
PA
48492015-03-07 Pedro Alves <palves@redhat.com>
4850
4851 * configure.ac (build_warnings): Move
4852 -Wdeclaration-after-statement to the C-specific set.
4853 * configure: Regenerate.
4854
366c75fc
PA
48552015-03-07 Pedro Alves <palves@redhat.com>
4856
4857 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4858 or <winsock2.h> here. Instead include "gdb_socket.h".
4859 (remote_open): Use union gdb_sockaddr_u.
4860 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4861 or <winsock2.h> here. Instead include "gdb_socket.h".
4862 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4863 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4864 or <sys/un.h>.
4865 (init_named_socket, gdb_agent_helper_thread): Use union
4866 gdb_sockaddr_u.
4867
492d29ea
PA
48682015-03-07 Pedro Alves <palves@redhat.com>
4869
4870 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4871 instead.
4872
60a191ed
YQ
48732015-03-06 Yao Qi <yao.qi@linaro.org>
4874
4875 * linux-aarch64-low.c (aarch64_insert_point): Use
4876 show_debug_regs as a boolean.
4877 (aarch64_remove_point): Likewise.
4878
f5771b1d
PA
48792015-03-05 Pedro Alves <palves@redhat.com>
4880
4881 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4882 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4883 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4884 * nto-low.c (nto_target_ops): Likewise.
4885 * spu-low.c (spu_target_ops): Likewise.
4886 * win32-low.c (win32_target_ops): Likewise.
4887
3e572f71
PA
48882015-03-04 Pedro Alves <palves@redhat.com>
4889
72f4393d 4890 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
4891 Decide whether a breakpoint triggered based on the SIGTRAP's
4892 siginfo.si_code.
72f4393d
L
4893 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4894 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
4895 (linux_low_filter_event): Check for breakpoints before checking
4896 watchpoints.
4897 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4898 siginfo.si_code.
72f4393d
L
4899 (linux_stopped_by_sw_breakpoint)
4900 (linux_supports_stopped_by_sw_breakpoint)
4901 (linux_stopped_by_hw_breakpoint)
4902 (linux_supports_stopped_by_hw_breakpoint): New functions.
4903 (linux_target_ops): Install new target methods.
3e572f71 4904
1ec68e26
PA
49052015-03-04 Pedro Alves <palves@redhat.com>
4906
4907 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4908 * server.c (swbreak_feature, hwbreak_feature): New globals.
4909 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4910 (captured_main): Clear swbreak_feature and hwbreak_feature.
4911 * server.h (swbreak_feature, hwbreak_feature): Declare.
4912 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4913 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4914 supports_stopped_by_hw_breakpoint>: New fields.
4915 (target_supports_stopped_by_sw_breakpoint)
4916 (target_stopped_by_sw_breakpoint)
4917 (target_supports_stopped_by_hw_breakpoint)
4918 (target_stopped_by_hw_breakpoint): Declare.
4919
15c66dd6
PA
49202015-03-04 Pedro Alves <palves@redhat.com>
4921
4922 enum lwp_stop_reason -> enum target_stop_reason
4923 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4924 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4925 (linux_wait_1, stuck_in_jump_pad_callback)
4926 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4927 (linux_stopped_by_watchpoint):
4928 * linux-low.h (enum lwp_stop_reason): Delete.
4929 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4930 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4931
98fc70d6
YQ
49322015-03-04 Yao Qi <yao.qi@linaro.org>
4933
4934 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4935
dd2ac174
GB
49362015-03-03 Gary Benson <gbenson@redhat.com>
4937
4938 * hostio.c (handle_vFile): Fix prefix lengths.
4939
d68e53f4
MM
49402015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4941
4942 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4943 ptr_bits.
4944
bf2d68ab
AA
49452015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4946
4947 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4948 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4949 (clean): Add "rm -f" for above C files.
4950 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4951 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4952 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4953 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4954 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4955 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4956 (init_registers_s390x_vx_linux64)
4957 (init_registers_s390x_tevx_linux64)
4958 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4959 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4960 declarations.
4961 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4962 (s390_store_vxrs_high): New functions.
4963 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4964 NT_S390_VXRS_HIGH.
4965 (s390_arch_setup): Add logic for selecting one of the new target
4966 descriptions. Activate the new vector regsets if applicable.
4967 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4968 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4969 and init_registers_s390x_tevx_linux64.
4970
c966a859
PA
49712015-03-01 Pedro Alves <palves@redhat.com>
4972
4973 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4974 parameter.
4975
4180215b
PA
49762015-02-27 Pedro Alves <palves@redhat.com>
4977
4978 * linux-x86-low.c (u_debugreg_offset): New function.
4979 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4980
749bab01
PA
49812015-02-27 Pedro Alves <palves@redhat.com>
4982
4983 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4984 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4985 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4986 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4987 (ps_lsetfpregs, ps_getpid)
4988 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4989 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4990 (ps_lsetxregs, ps_plog): Declare.
4991
3c14e5a3
PA
49922015-02-27 Pedro Alves <palves@redhat.com>
4993
4994 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4995 IP_AGENT_EXPORT_FUNC.
4996 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4997 IP_AGENT_EXPORT_FUNC.
4998 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4999 (IP_AGENT_EXPORT): Delete.
5000 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5001 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5002 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5003 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5004 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5005 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5006 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5007 (traceframe_read_count, traceframe_write_count)
5008 (traceframes_created, trace_state_variables, get_raw_reg)
5009 (get_trace_state_variable_value, set_trace_state_variable_value)
5010 (ust_loaded, helper_thread_id, cmd_buf): Use
5011 IPA_SYM_EXPORTED_NAME.
5012 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5013 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5014 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5015 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5016 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5017 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5018 EXTERN_C_PUSH/EXTERN_C_POP.
5019 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5020 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5021 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5022 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5023 (traceframe_write_count, traceframe_read_count)
5024 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5025 (about_to_request_buffer_space, get_trace_state_variable_value)
5026 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5027 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5028 EXTERN_C_PUSH/EXTERN_C_POP.
5029 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5030 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5031 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5032 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5033 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5034 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5035 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5036 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5037 Define.
5038 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5039 (IP_AGENT_EXPORT_VAR_DECL): Define.
5040 (tracing): Declare.
5041 (gdb_agent_get_raw_reg): Declare.
5042
fe978cb0
PA
50432015-02-27 Tom Tromey <tromey@redhat.com>
5044 Pedro Alves <palves@redhat.com>
5045
5046 Rename symbols whose names are reserved C++ keywords throughout.
5047
3bc3d82a
PA
50482015-02-27 Pedro Alves <palves@redhat.com>
5049
5050 * Makefile.in (COMPILER): New, get it from autoconf.
5051 (CXX): Get from autoconf instead.
5052 (COMPILE.pre): Use COMPILER.
5053 (CC-LD): Rename to ...
5054 (CC_LD): ... this. Use COMPILER.
5055 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5056 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5057 * acinclude.m4: Include build-with-cxx.m4.
5058 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5059 Disable -Werror by default if building in C++ mode.
5060 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5061 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5062 the C++ compiler. Save/restore CXXFLAGS too.
5063 * configure: Regenerate.
5064
07697489
PA
50652015-02-27 Pedro Alves <palves@redhat.com>
5066
5067 * acinclude.m4: Include libiberty.m4.
5068 * configure.ac: Call libiberty_INIT.
5069 * config.in, configure: Regenerate.
5070
9beb7c4e
PA
50712015-02-26 Pedro Alves <palves@redhat.com>
5072
5073 * linux-low.c (linux_wait_1): When incrementing the PC past a
5074 program breakpoint always use the_low_target.breakpoint_len as
5075 increment, rather than the maximum between that and
5076 the_low_target.decr_pc_after_break.
5077
8090aef2
PA
50782015-02-23 Pedro Alves <palves@redhat.com>
5079
5080 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5081 thread was doing a step-over; always adjust the PC if
5082 we stepped over a permanent breakpoint.
5083 (linux_wait_1): If we stepped over breakpoint that was on top of a
5084 permanent breakpoint, manually advance the PC past it.
5085
bc9540e8
PA
50862015-02-23 Pedro Alves <palves@redhat.com>
5087
5088 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5089 modes.
5090 (x86_fill_gregset, x86_store_gregset): Use it when handling
5091 $orig_eax.
5092
2db9a427
PA
50932015-02-20 Pedro Alves <palves@redhat.com>
5094
5095 * thread-db.c: Include "nat/linux-procfs.h".
5096 (thread_db_init): Skip listing new threads if the kernel supports
5097 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5098
afa8d396
PA
50992015-02-20 Pedro Alves <palves@redhat.com>
5100
5101 * linux-low.c (status_pending_p_callback): Use ptid_match.
5102
c9587f88
AT
51032015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5104
5105 PR breakpoints/16812
5106 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5107 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5108 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5109
b05ec7a5
AT
51102015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5111
5112 PR breakpoints/15956
5113 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5114
d33501a5
MM
51152015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5116
5117 * linux-low.c (linux_low_btrace_conf): Print size.
5118 * server.c (handle_btrace_conf_general_set): New.
5119 (hanle_general_set): Call handle_btrace_conf_general_set.
5120 (handle_query): Report Qbtrace-conf:bts:size as supported.
5121
f4abbc16
MM
51222015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5123
5124 * linux-low.c (linux_low_enable_btrace): Update parameters.
5125 (linux_low_btrace_conf): New.
5126 (linux_target_ops)<to_btrace_conf>: Initialize.
5127 * server.c (current_btrace_conf): New.
5128 (handle_btrace_enable): Rename to ...
5129 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5130 to target_enable_btrace. Update comment. Update users.
5131 (handle_qxfer_btrace_conf): New.
5132 (qxfer_packets): Add btrace-conf entry.
5133 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5134 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5135 (target_ops)<read_btrace_conf>: New.
5136 (target_enable_btrace): Update parameters.
5137 (target_read_btrace_conf): New.
5138
043c3577
MM
51392015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5140
5141 * server.c (handle_btrace_general_set): Remove call to
5142 target_supports_btrace.
5143 (supported_btrace_packets): New.
5144 (handle_query): Call supported_btrace_packets.
5145 * target.h: include btrace-common.h.
5146 (btrace_target_info): Removed.
5147 (supports_btrace, target_supports_btrace): Update parameters.
5148
734b0e4b
MM
51492015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5150
5151 * Makefile.in (SFILES): Add common/btrace-common.c.
5152 (OBS): Add common/btrace-common.o.
5153 (btrace-common.o): Add build rules.
5154 * linux-low: Include btrace-common.h.
5155 (linux_low_read_btrace): Use struct btrace_data. Call
5156 btrace_data_init and btrace_data_fini.
5157
d6c146e9
PA
51582015-02-06 Pedro Alves <palves@redhat.com>
5159
5160 * thread-db.c (find_new_threads_callback): Add debug output.
5161
20ba1ce6
PA
51622015-02-04 Pedro Alves <palves@redhat.com>
5163
5164 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5165 (resume_stopped_resumed_lwps): New function.
5166 (linux_wait_for_event_filtered): Use it.
5167
8cc73a39
SDJ
51682015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5169
5170 * Makefile.in (SFILES): Add linux-personality.c.
5171 (linux-personality.o): New rule.
5172 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5173 list of objects to be built.
5174 * linux-low.c: Include nat/linux-personality.h.
5175 (linux_create_inferior): Remove code to disable address space
5176 randomization (moved to ../nat/linux-personality.c). Create
5177 cleanup to disable address space randomization.
5178
fb23d554
SDJ
51792015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5180
5181 * Makefile.in (posix-strerror.o): New rule.
5182 (mingw-strerror.o): Likewise.
5183 * configure: Regenerated.
5184 * configure.ac: Source file ../common/common.host. Initialize new
5185 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5186
cdf43629
YQ
51872015-01-14 Yao Qi <yao@codesourcery.com>
5188
5189 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5190 (ppc-linux.o): New rule.
5191 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5192 * configure.ac: AC_CHECK_FUNCS(getauxval).
5193 * config.in: Re-generated.
5194 * configure: Re-generated.
5195 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5196 ppc64_64bit_inferior_p
5197
514c5338
YQ
51982015-01-14 Yao Qi <yao@codesourcery.com>
5199
5200 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5201 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5202 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5203 (PT_ORIG_R3, PT_TRAP): Likewise.
5204 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5205 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5206 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5207
3368c1e5
JB
52082015-01-10 Joel Brobecker <brobecker@adacore.com>
5209
5210 * i387-fp.c (i387_cache_to_xsave): In look over
5211 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5212 zmmh_low_space field by use of zmmh_high_space.
5213
582511be
PA
52142015-01-09 Pedro Alves <palves@redhat.com>
5215
5216 * linux-low.c (step_over_bkpt): Move higher up in the file.
5217 (handle_extended_wait): Don't store the stop_pc here.
5218 (get_stop_pc): Adjust comments and rename to ...
5219 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5220 stopped for a software breakpoint or hardware breakpoint.
5221 (thread_still_has_status_pending_p): New function.
5222 (status_pending_p_callback): Use
5223 thread_still_has_status_pending_p. If the event is no longer
5224 interesting, resume the LWP.
5225 (handle_tracepoints): Add assert.
5226 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5227 (wstatus_maybe_breakpoint): New function.
5228 (cancel_breakpoint): Delete function.
5229 (check_stopped_by_watchpoint): New function, factored out from
5230 linux_low_filter_event.
5231 (lp_status_maybe_breakpoint): Delete function.
5232 (linux_low_filter_event): Remove filter_ptid argument.
5233 Leave thread group exits pending here. Store the LWP's stop PC.
5234 Always leave events pending.
5235 (linux_wait_for_event_filtered): Pull all events out of the
5236 kernel, and leave them all pending.
5237 (count_events_callback, select_event_lwp_callback): Consider all
5238 events.
5239 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5240 (select_event_lwp): Only give preference to the stepping LWP in
5241 all-stop mode. Adjust comments.
5242 (ignore_event): New function.
5243 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5244 references to cancel_breakpoints. Adjust to renames. Also give
5245 equal priority to all LWPs that have had events in non-stop mode.
5246 If reporting a software breakpoint event, unadjust the LWP's PC.
5247 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5248 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5249 Adjust.
5250 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5251 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5252 (linux_stopped_by_watchpoint): Adjust.
5253 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5254 * linux-low.h (enum lwp_stop_reason): New.
5255 (struct lwp_info) <stop_pc>: Adjust comment.
5256 <stopped_by_watchpoint>: Delete field.
5257 <stop_reason>: New field.
5258 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5259 * mem-break.c (software_breakpoint_inserted_here)
5260 (hardware_breakpoint_inserted_here): New function.
5261 * mem-break.h (software_breakpoint_inserted_here)
5262 (hardware_breakpoint_inserted_here): Declare.
5263 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5264 (cancel_breakpoints): Delete.
5265 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5266 (upload_fast_traceframes): Remove references to
5267 cancel_breakpoints.
5268
a33e3959
PA
52692015-01-09 Pedro Alves <palves@redhat.com>
5270
5271 * thread-db.c (find_new_threads_callback): Ignore thread if the
5272 kernel thread ID is -1.
5273
8784d563
PA
52742015-01-09 Pedro Alves <palves@redhat.com>
5275
5276 * linux-low.c (linux_attach_fail_reason_string): Move to
5277 nat/linux-ptrace.c, and rename.
5278 (linux_attach_lwp): Update comment.
5279 (attach_proc_task_lwp_callback): New function.
5280 (linux_attach): Adjust to rename and use
5281 linux_proc_attach_tgid_threads.
5282 (linux_attach_fail_reason_string): Delete declaration.
5283
76f2b779
JB
52842015-01-01 Joel Brobecker <brobecker@adacore.com>
5285
5286 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5287 * server.c (gdbserver_version): Likewise.
5288
fafcc06a
SDJ
52892014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5290
5291 * remote-utils.c: Include ctype.h.
5292 (input_interrupt): Explicitly handle the case when the char
5293 received is the NUL byte. Improve the printing of non-ASCII
5294 characters.
5295
beed38b8
JB
52962014-12-16 Joel Brobecker <brobecker@adacore.com>
5297
5298 * linux-low.c (linux_low_filter_event): Update call to
5299 linux_enable_event_reporting following the addition of
5300 a new parameter to that function.
5301
bf330350
CU
53022014-12-16 Catalin Udma <catalin.udma@freescale.com>
5303
5304 PR server/17457
5305 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5306 (AARCH64_FPCR_REGNO): Likewise.
5307 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5308 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5309 (aarch64_store_fpregset): Likewise.
5310
5227d625
JB
53112014-12-15 Joel Brobecker <brobecker@adacore.com>
5312
5313 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5314 Remove FIXME comment about assumption about N.
5315
f93b65a0
JB
53162014-12-13 Joel Brobecker <brobecker@adacore.com>
5317
5318 * configure.ac: If large-file support is disabled in GDBserver,
5319 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5320 * configure: Regenerate.
5321
e5a9158d
AA
53222014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5323
5324 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5325 warning upon ENODATA from ptrace.
5326 * linux-s390-low.c (s390_store_tdb): New.
5327 (s390_regsets): Add regset for NT_S390_TDB.
5328
feea5f36
AA
53292014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5330
5331 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5332 without a fill_function.
5333 * linux-s390-low.c (s390_fill_last_break): Remove.
5334 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5335 (s390_arch_setup): Use regset's size instead of fill_function for
5336 loop end condition.
5337
098dbe61
AA
53382014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5339
5340 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5341 the regset's store function when ptrace returned an error.
5342 * regcache.c (get_thread_regcache): Invalidate register cache
5343 before fetching inferior's registers.
5344
28eef672
AA
53452014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5346
5347 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5348 while-loop as for-loop.
5349 (regsets_store_inferior_registers): Likewise.
5350
bdca27a2
YQ
53512014-11-28 Yao Qi <yao@codesourcery.com>
5352
5353 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5354 * config.in, configure: Re-generate.
5355 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5356 is defined.
5357
9c232dda
YQ
53582014-11-21 Yao Qi <yao@codesourcery.com>
5359
5360 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5361 (AC_CHECK_HEADERS): Remove malloc.h.
5362 * configure: Re-generated.
5363 * config.in: Re-generated.
5364 * server.h: Don't include alloca.h and malloc.h.
5365 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5366 Don't include malloc.h.
5367
43968415
JB
53682014-11-17 Joel Brobecker <brobecker@adacore.com>
5369
5370 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5371 corresponding ERRNO check in same block.
5372
40e91bc7
PA
53732014-11-12 Pedro Alves <palves@redhat.com>
5374
5375 * server.c (cont_thread): Update comment.
5376 (start_inferior, attach_inferior): No longer clear cont_thread.
5377 (handle_v_cont): No longer set cont_thread.
5378 (captured_main): Clear cont_thread each time a GDB connects.
5379
c2c118cf
PA
53802014-11-12 Pedro Alves <palves@redhat.com>
5381
5382 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5383 thread, and don't resume all threads if the Hc thread has exited.
5384
78708b7c
PA
53852014-11-12 Pedro Alves <palves@redhat.com>
5386
5387 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5388 the process group instead of to a specific LWP.
5389
a2abc7de
PA
53902014-10-15 Pedro Alves <palves@redhat.com>
5391
5392 PR server/17487
5393 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5394 parameter.
5395 (arm_set_thread_context): Delete.
5396 (the_low_target): Adjust.
5397 * win32-i386-low.c (debug_registers_changed)
5398 (debug_registers_used): Delete.
5399 (update_debug_registers_callback): New function.
5400 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5401 needing to update their debug registers.
5402 (win32_get_current_dr): New function.
5403 (x86_dr_low_get_addr, x86_dr_low_get_control)
5404 (x86_dr_low_get_status): Fetch the debug register from the thread
5405 record's context.
5406 (i386_initial_stuff): Adjust.
5407 (i386_get_thread_context): Remove current_event parameter. Don't
5408 clear debug_registers_changed nor copy DR values to
5409 debug_reg_state.
5410 (i386_set_thread_context): Delete.
5411 (i386_prepare_to_resume): New function.
5412 (i386_thread_added): Mark the thread as needing to update irs
5413 debug registers.
5414 (the_low_target): Remove i386_set_thread_context and install
5415 i386_prepare_to_resume.
5416 * win32-low.c (win32_get_thread_context): Adjust.
5417 (win32_set_thread_context): Use SetThreadContext
5418 directly.
5419 (win32_prepare_to_resume): New function.
5420 (win32_require_context): New function, factored out from ...
5421 (thread_rec): ... this.
5422 (continue_one_thread): Call win32_prepare_to_resume on each thread
5423 we're about to continue.
5424 (win32_resume): Call win32_prepare_to_resume on the event thread.
5425 * win32-low.h (struct win32_thread_info)
5426 <debug_registers_changed>: New field.
5427 (struct win32_target_ops): Change prototype of set_thread_context,
5428 delete set_thread_context and add prepare_to_resume.
5429 (win32_require_context): New declaration.
5430
a442d071
GB
54312014-10-08 Gary Benson <gbenson@redhat.com>
5432
5433 * server.h: Do not include common-exceptions.h.
5434
6f1947e8
GB
54352014-10-08 Gary Benson <gbenson@redhat.com>
5436
5437 * server.h: Do not include cleanups.h.
5438
63b434a4
JH
54392014-09-30 James Hogan <james.hogan@imgtec.com>
5440
5441 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5442 mips64-dsp-linux.c.
5443
c4d9ceb6
YQ
54442014-09-23 Yao Qi <yao@codesourcery.com>
5445
5446 * linux-low.c (lp_status_maybe_breakpoint): New function.
5447 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5448 (count_events_callback): Likewise.
5449 (select_event_lwp_callback): Likewise.
5450 (cancel_breakpoints_callback): Likewise.
5451
89a5711c
DB
54522014-09-19 Don Breazeal <donb@codesourcery.com>
5453
5454 * linux-low.c (handle_extended_wait): Call
5455 linux_ptrace_get_extended_event.
5456 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5457 linux_is_extended_waitstatus.
5458
bffc0964
JB
54592014-09-16 Joel Brobecker <brobecker@adacore.com>
5460
5461 * Makefile.in (CPPFLAGS): Define.
5462 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5463 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5464
0bfdf32f
GB
54652014-09-16 Gary Benson <gbenson@redhat.com>
5466
5467 * inferiors.h (current_inferior): Renamed as...
5468 (current_thread): New variable. All uses updated.
5469 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5470 (maybe_move_out_of_jump_pad): Likewise.
5471 (cancel_breakpoint): Likewise.
5472 (linux_low_filter_event): Likewise.
5473 (wait_for_sigstop): Likewise.
5474 (linux_resume_one_lwp): Likewise.
5475 (need_step_over_p): Likewise.
5476 (start_step_over): Likewise.
5477 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5478 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5479 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5480 and save_inferior as saved_thread.
5481 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5482 saved_thread.
5483 (regcache_invalidate_thread): Likewise.
5484 * remote-utils.c (prepare_resume_reply): Likewise.
5485 * thread-db.c (thread_db_get_tls_address): Likewise.
5486 (disable_thread_event_reporting): Likewise.
5487 (remove_thread_event_breakpoints): Likewise.
5488 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5489 as saved_thread.
5490 * target.h (set_desired_inferior): Renamed as...
5491 (set_desired_thread): New declaration. All uses updated.
5492 * server.c (myresume): Updated comment to reference thread instead
5493 of inferior.
5494 (handle_serial_event): Likewise.
5495 (handle_target_event): Likewise.
5496
361c8ade
GB
54972014-09-12 Tom Tromey <tromey@redhat.com>
5498 Gary Benson <gbenson@redhat.com>
5499
5500 * regcache.h: Include common-regcache.h.
5501 (regcache_read_pc): Don't declare.
5502 * regcache.c (get_thread_regcache_for_ptid): New function.
5503
bd9269f7
GB
55042014-09-11 Tom Tromey <tromey@redhat.com>
5505 Gary Benson <gbenson@redhat.com>
5506
5507 * symbol.c: New file.
5508 * Makefile.in (SFILES): Add symbol.c.
5509 (OBS): Add symbol.o.
5510
f8c1d06b
GB
55112014-09-11 Gary Benson <gbenson@redhat.com>
5512
5513 * target.c (target_stop_ptid, target_continue_ptid): New
5514 functions.
5515
721ec300
GB
55162014-09-11 Tom Tromey <tromey@redhat.com>
5517 Gary Benson <gbenson@redhat.com>
5518
5519 * target.h: Include target/target.h.
5520 * target.c (target_read_memory, target_read_uint32)
5521 (target_write_memory): New functions.
5522
c5e92cca
GB
55232014-09-11 Gary Benson <gbenson@redhat.com>
5524
5525 * server.h (debug_hw_points): Don't declare.
5526 * server.c (debug_hw_points): Don't define. Replace all uses
5527 with show_debug_regs.
5528 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5529 all uses with show_debug_regs.
5530
2e4bb98a
EBM
55312014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5532
5533 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5534 endianness into account.
5535 (ppc_supply_ptrace_register): Likewise.
5536
ac740bc7
JH
55372014-09-03 James Hogan <james.hogan@imgtec.com>
5538
5539 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5540 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5541
97ea6506
GB
55422014-09-03 Gary Benson <gbenson@redhat.com>
5543
5544 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5545 ALL_DEBUG_ADDRESS_REGISTERS.
5546
df7e5265
GB
55472014-09-02 Gary Benson <gbenson@redhat.com>
5548
5549 * i386-low.h: Renamed as...
5550 * x86-low.h: New file. All type, function and variable name
5551 prefixes changed from "i386_" to "x86_". All references updated.
5552 * i386-low.c: Renamed as...
5553 * x86-low.c: New file. All type, function and variable name
5554 prefixes changed from "i386_" to "x86_". All references updated.
5555
ed859da7
GB
55562014-09-02 Gary Benson <gbenson@redhat.com>
5557
5558 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5559 (x86_linux_new_thread): Likewise.
5560
860789c7
GB
55612014-08-29 Gary Benson <gbenson@redhat.com>
5562
5563 * server.h (setjmp.h): Do not include.
5564 (toplevel): Do not declare.
5565 (common-exceptions.h): Include.
5566 (cleanups.h): Likewise.
5567 * server.c (toplevel): Do not define.
5568 (exit_code): New static global.
5569 (detach_or_kill_for_exit_cleanup): New function.
5570 (main): New function. Original main renamed to...
5571 (captured_main): New function.
5572 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5573
ff55e1b5
GB
55742014-08-29 Gary Benson <gbenson@redhat.com>
5575
5576 * Makefile.in (SFILES): Add common/common-exceptions.c.
5577 (OBS): Add common-exceptions.o.
5578 (common-exceptions.o): New rule.
5579 * utils.c (prepare_to_throw_exception): New function.
5580
e9bcb658
GB
55812014-08-29 Gary Benson <gbenson@redhat.com>
5582
5583 * config.in: Regenerate.
5584 * configure: Likewise.
5585
e3180625
GB
55862014-08-29 Gary Benson <gbenson@redhat.com>
5587
5588 * Makefile.in (SFILES): Add common/cleanups.c.
5589 (OBS): cleanups.o.
5590 (cleanups.o): New rule.
5591
e3d6ba5d
GB
55922014-08-29 Gary Benson <gbenson@redhat.com>
5593
5594 * utils.c (internal_vwarning): New function.
5595
7096e886
GB
55962014-08-28 Gary Benson <gbenson@redhat.com>
5597
5598 * utils.h (fatal): Remove declaration.
5599 * utils.c (fatal): Remove function.
5600
14ce3192
GB
56012014-08-28 Gary Benson <gbenson@redhat.com>
5602
5603 * tracepoint.c (gdb_agent_init): Replace fatal with
5604 perror_with_name.
5605 (initialize_tracepoint): Likewise.
5606
50278d59
GB
56072014-08-28 Gary Benson <gbenson@redhat.com>
5608
5609 * remote-utils.c (remote_prepare): Replace fatal with error.
5610
aa96c426
GB
56112014-08-28 Gary Benson <gbenson@redhat.com>
5612
5613 * linux-low.c (linux_async): Replace fatal with warning.
5614 Tidy up and return.
5615 (linux_start_non_stop): Return -1 if linux_async failed.
5616
f7160e97
GB
56172014-08-28 Gary Benson <gbenson@redhat.com>
5618
5619 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5620 gdb_assert.
5621 (i386_dr_low_get_addr): Remove vague comment.
5622 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5623 gdb_assert.
5624
38e08fca
GB
56252014-08-28 Gary Benson <gbenson@redhat.com>
5626
5627 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5628 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5629 internal_error.
5630 (linux_resume_one_lwp): Likewise.
5631 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5632 gdb_assert.
5633 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5634 with internal_error.
5635 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5636 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5637 (find_register_by_name): Replace fatal with internal_error.
5638 (find_regno): Likewise.
5639 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5640 * thread-db.c (thread_db_create_event): Likewise.
5641 (thread_db_load_search): Likewise.
5642 (try_thread_db_load_1): Likewise.
5643 * tracepoint.c (get_jump_space_head): Replace fatal with
5644 internal_error.
5645 (claim_trampoline_space): Likewise.
5646 (have_fast_tracepoint_trampoline_buffer): Likewise.
5647 (cmd_qtstart): Likewise.
5648 (stop_tracing): Likewise.
5649 (fast_tracepoint_collecting): Likewise.
5650 (target_malloc): Likewise.
5651 (download_tracepoint): Likewise.
5652 (download_trace_state_variables): Replace check with gdb_assert.
5653 (upload_fast_traceframes): Replace fatal with internal_error.
5654
34abf635
GB
56552014-08-19 Tom Tromey <tromey@redhat.com>
5656 Gary Benson <gbenson@redhat.com>
5657
5658 * Makefile.in (SFILES): Add common/common-debug.c.
5659 (OBS): Add common-debug.o.
5660 (common-debug.o): New rule.
5661 * debug.h (debug_printf): Don't declare.
5662 * debug.c (debug_printf): Renamed and rewritten as...
5663 (debug_vprintf): New function.
5664
f6e94d78
GB
56652014-08-19 Gary Benson <gbenson@redhat.com>
5666
5667 * utils.h: Do not include print-utils.h.
5668
9239eeab
GB
56692014-08-19 Tom Tromey <tromey@redhat.com>
5670 Gary Benson <gbenson@redhat.com>
5671
5672 * server.h: Add static assertion.
5673 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5674
ef87c8bb
GB
56752014-08-19 Tom Tromey <tromey@redhat.com>
5676 Gary Benson <gbenson@redhat.com>
5677
5678 * Makefile.in (SFILES): Add common/errors.c.
5679 (OBS): Add errors.o.
5680 (IPA_OBS): Add errors-ipa.o.
5681 (errors.o): New rule.
5682 (errors-ipa.o): Likewise.
5683 * utils.h (perror_with_name, error, warning): Don't declare.
5684 * utils.c (warning): Renamed and rewritten as...
5685 (vwarning): New function.
5686 (error): Renamed and rewritten as...
5687 (verror): New function.
5688 (internal_error): Renamed and rewritten as...
5689 (internal_verror): New function.
5690
bb974a24
GB
56912014-08-07 Gary Benson <gbenson@redhat.com>
5692
5693 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5694 * configure: Regenerate.
5695 * config.in: Likewise.
5696 * server.h: Do not include errno.h.
5697 * event-loop.c: Likewise.
5698 * hostio-errno.c: Likewise.
5699 * linux-low.c: Likewise.
5700 * remote-utils.c: Likewise.
5701 * spu-low.c: Likewise.
5702 * utils.c: Likewise.
5703 * gdbreplay.c: Unconditionally include errno.h.
5704
6d3d12eb
GB
57052014-08-07 Gary Benson <gbenson@redhat.com>
5706
5707 * server.h: Do not include string.h.
5708 * event-loop.c: Likewise.
5709 * linux-low.c: Likewise.
5710 * regcache.c: Likewise.
5711 * remote-utils.c: Likewise.
5712 * spu-low.c: Likewise.
5713 * utils.c: Likewise.
5714
dccbb609
GB
57152014-08-07 Gary Benson <gbenson@redhat.com>
5716
5717 * server.h: Do not include gdb_assert.h.
5718
e76df0d0
GB
57192014-08-07 Gary Benson <gbenson@redhat.com>
5720
5721 * server.h: Do not include common-utils.h.
5722
4cb9c816
GB
57232014-08-07 Gary Benson <gbenson@redhat.com>
5724
5725 * server.h: Do not include ptid.h.
5726 * notif.h: Likewise.
5727
3995eeee
GB
57282014-08-07 Gary Benson <gbenson@redhat.com>
5729
5730 * server.h: Do not include gdb_locale.h.
5731
cb9f1a9b
GB
57322014-08-07 Gary Benson <gbenson@redhat.com>
5733
5734 * server.h: Do not include gdb/signals.h.
5735 * win32-low.c: Likewise.
5736
a5fceff8
GB
57372014-08-07 Gary Benson <gbenson@redhat.com>
5738
5739 * server.h: Do not include pathmax.h.
5740
b9391142
GB
57412014-08-07 Gary Benson <gbenson@redhat.com>
5742
5743 * server.h: Do not include libiberty.h.
5744 * linux-bfin-low.c: Likewise.
5745
0e443c87
GB
57462014-08-07 Gary Benson <gbenson@redhat.com>
5747
5748 * server.h: Do not include ansidecl.h.
5749
8ebb3f56
GB
57502014-08-07 Gary Benson <gbenson@redhat.com>
5751
5752 * linux-x86-low.c: Do not include stddef.h.
5753 * lynx-ppc-low.c: Likewise.
5754 * tracepoint.c: Likewise.
5755
8980bdf6
GB
57562014-08-07 Gary Benson <gbenson@redhat.com>
5757
5758 * server.h: Do not include stdarg.h.
5759 * nto-low.c: Likewise.
5760
d7096f71
GB
57612014-08-07 Gary Benson <gbenson@redhat.com>
5762
5763 * server.h: Do not include stdlib.h.
5764 * inferiors.c: Likewise.
5765 * linux-low.c: Likewise.
5766 * regcache.c: Likewise.
5767 * spu-low.c: Likewise.
5768 * tracepoint.c: Likewise.
5769 * utils.c: Likewise.
5770
d02f550d
GB
57712014-08-07 Gary Benson <gbenson@redhat.com>
5772
5773 * server.h: Do not include stdio.h.
5774 * linux-low.c: Likewise.
5775 * remote-utils.c: Likewise.
5776 * spu-low.c: Likewise.
5777 * utils.c: Likewise.
5778 * wincecompat.c: Likewise.
5779
87f6c4e3
GB
57802014-08-06 Gary Benson <gbenson@redhat.com>
5781
5782 * regcache.c (init_register_cache): Move conditionals inside if.
5783
7089dca4
GB
57842014-08-06 Gary Benson <gbenson@redhat.com>
5785
5786 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5787
462f517e
GB
57882014-07-31 Gary Benson <gbenson@redhat.com>
5789
5790 * ax.h: Do not include server.h.
5791 * gdbthread.h: Likewise.
5792 * lynx-low.h: Likewise.
5793 * notif.h: Likewise.
5794
976411d6
GB
57952014-07-30 Gary Benson <gbenson@redhat.com>
5796
5797 * server.h: Include common-defs.h.
5798 Do not include config.h or build-gnulib-gdbserver/config.h.
5799
d41f6d8e
GB
58002014-07-30 Gary Benson <gbenson@redhat.com>
5801
5802 * hostio-errno.c: Move server.h to top of includes list.
5803 * inferiors.c: Likewise.
5804 * linux-x86-low.c: Likewise.
5805 * notif.c: Include server.h.
5806
314c6a35
TT
58072014-07-24 Tom Tromey <tromey@redhat.com>
5808 Gary Benson <gbenson@redhat.com>
5809
5810 * server.h (CORE_ADDR): Now unsigned.
5811
69ff6be5
PA
58122014-07-16 Pedro Alves <palves@redhat.com>
5813
5814 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5815
ce9e3fe7
PA
58162014-07-15 Pedro Alves <palves@redhat.com>
5817
5818 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5819 copy.
5820
e76126e8
PA
58212014-07-11 Pedro Alves <palves@redhat.com>
5822
5823 * linux-low.c (kill_wait_lwp): New function, based on
5824 kill_one_lwp_callback, but use my_waitpid directly.
5825 (kill_one_lwp_callback, linux_kill): Use it.
5826
8e9db26e
PA
58272014-06-23 Pedro Alves <palves@redhat.com>
5828
5829 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5830 before setting DR0..DR3.
5831
698b3e08
GB
58322014-06-20 Gary Benson <gbenson@redhat.com>
5833
5834 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5835 * configure: Regenerated.
5836 * config.in: Likewise.
5837
125f8a3d
GB
58382014-06-20 Gary Benson <gbenson@redhat.com>
5839
5840 * Makefile.in (SFILES): Update locations for files moved
5841 from common to nat.
5842 (object file files): Reordered.
5843
42995dbd
GB
58442014-06-20 Gary Benson <gbenson@redhat.com>
5845
5846 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5847 (i386_dr_low_set_addr): Likewise.
5848 (i386_dr_low_get_addr): Likewise.
5849 (i386_dr_low_can_set_control): Likewise.
5850 (i386_dr_low_set_control): Likewise.
5851 (i386_dr_low_get_control): Likewise.
5852 (i386_dr_low_get_status): Likewise.
5853 (i386_get_debug_register_length): Likewise.
5854 * linux-x86-low.c (i386_dr_low_set_addr):
5855 Changed signature. Made static.
5856 (i386_dr_low_get_addr): Likewise.
5857 (i386_dr_low_set_control): Likewise.
5858 (i386_dr_low_get_control): Likewise.
5859 (i386_dr_low_get_status): Likewise.
5860 (i386_dr_low): New global variable.
5861 * win32-i386-low.c (i386_dr_low_set_addr):
5862 Changed signature. Made static.
5863 (i386_dr_low_get_addr): Likewise.
5864 (i386_dr_low_set_control): Likewise.
5865 (i386_dr_low_get_control): Likewise.
5866 (i386_dr_low_get_status): Likewise.
5867 (i386_dr_low): New global variable.
5868
e1d2394b
MS
58692014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5870
5871 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5872 * Makefile.in (AR, AR_FLAGS): Define.
5873 * configure: Regenerate.
5874
3a8ee006
GB
58752014-06-19 Gary Benson <gbenson@redhat.com>
5876
5877 * Makefile.in (i386-dregs.o): New rule.
5878 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5879 * i386-low.c (target.h): Remove include.
5880 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5881 (DR_CONTROL_SHIFT): Likewise.
5882 (DR_CONTROL_SIZE): Likewise.
5883 (DR_RW_EXECUTE): Likewise.
5884 (DR_RW_WRITE): Likewise.
5885 (DR_RW_READ): Likewise.
5886 (DR_RW_IORW): Likewise.
5887 (DR_LEN_1): Likewise.
5888 (DR_LEN_2): Likewise.
5889 (DR_LEN_4): Likewise.
5890 (DR_LEN_8): Likewise.
5891 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5892 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5893 (DR_ENABLE_SIZE): Likewise.
5894 (DR_LOCAL_SLOWDOWN): Likewise.
5895 (DR_GLOBAL_SLOWDOWN): Likewise.
5896 (DR_CONTROL_RESERVED): Likewise.
5897 (I386_DR_CONTROL_MASK): Likewise.
5898 (I386_DR_VACANT): Likewise.
5899 (I386_DR_LOCAL_ENABLE): Likewise.
5900 (I386_DR_GLOBAL_ENABLE): Likewise.
5901 (I386_DR_DISABLE): Likewise.
5902 (I386_DR_SET_RW_LEN): Likewise.
5903 (I386_DR_GET_RW_LEN): Likewise.
5904 (I386_DR_WATCH_HIT): Likewise.
5905 (i386_wp_op_t): Likewise.
5906 (i386_show_dr): Likewise.
5907 (i386_length_and_rw_bits): Likewise.
5908 (i386_insert_aligned_watchpoint): Likewise.
5909 (i386_remove_aligned_watchpoint): Likewise.
5910 (i386_handle_nonaligned_watchpoint): Likewise.
5911 i386_update_inferior_debug_regs(): Likewise.
5912 (i386_dr_insert_watchpoint): Likewise.
5913 (i386_dr_remove_watchpoint): Likewise.
5914 (i386_dr_region_ok_for_watchpoint): Likewise.
5915 (i386_dr_stopped_data_address): Likewise.
5916 (i386_dr_stopped_by_watchpoint): Likewise.
5917
8f26655c
GB
59182014-06-19 Gary Benson <gbenson@redhat.com>
5919
5920 * i386-low.c (i386_dr_show): Renamed to
5921 i386_show_dr and made static. All uses updated.
5922 (i386_dr_length_and_rw_bits): Renamed to
5923 i386_length_and_rw_bits and made static.
5924 All uses updated.
5925 (i386_dr_insert_aligned_watchpoint): Renamed to
5926 i386_insert_aligned_watchpoint and made static.
5927 All uses updated.
5928 (i386_dr_remove_aligned_watchpoint): Renamed to
5929 i386_remove_aligned_watchpoint and made static.
5930 All uses updated.
5931 (i386_dr_update_inferior_debug_regs): Renamed to
5932 i386_update_inferior_debug_regs and made static.
5933 All uses updated.
5934
b9228891
GB
59352014-06-18 Gary Benson <gbenson@redhat.com>
5936
5171def3
GB
5937 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5938 (i386_dr_low_can_set_control): Likewise.
5939 (i386_get_debug_register_length): Likewise.
5940 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5941 (i386_dr_low_can_set_control): Likewise.
5942 (i386_get_debug_register_length): Likewise.
5943
59442014-06-17 Gary Benson <gbenson@redhat.com>
5945
b9228891
GB
5946 * i386-low.h (i386-dregs.h): New include.
5947 (DR_FIRSTADDR): Now in i386-dregs.h.
5948 (DR_LASTADDR): Likewise.
5949 (DR_NADDR): Likewise.
5950 (DR_STATUS): Likewise.
5951 (DR_CONTROL): Likewise.
5952 (i386_debug_reg_state): Likewise.
5953 (i386_dr_insert_watchpoint): Likewise.
5954 (i386_dr_remove_watchpoint): Likewise.
5955 (i386_dr_region_ok_for_watchpoint): Likewise.
5956 (i386_dr_stopped_data_address): Likewise.
5957 (i386_dr_stopped_by_watchpoint): Likewise.
5958 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5959
4be83cc2
GB
59602014-06-18 Gary Benson <gbenson@redhat.com>
5961
5962 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5963 i386_dr_insert_watchpoint.
5964 (i386_low_remove_watchpoint): Renamed to
5965 i386_dr_remove_watchpoint.
5966 (i386_low_region_ok_for_watchpoint): Renamed to
5967 i386_dr_region_ok_for_watchpoint.
5968 (i386_low_stopped_data_address): Renamed to
5969 i386_dr_stopped_data_address.
5970 (i386_low_stopped_by_watchpoint): Renamed to
5971 i386_dr_stopped_by_watchpoint.
5972 * i386-low.c (i386_show_dr): Renamed to
5973 i386_dr_show and made nonstatic. All uses updated.
5974 (i386_length_and_rw_bits): Renamed to
5975 i386_dr_length_and_rw_bits and made nonstatic.
5976 All uses updated.
5977 (i386_insert_aligned_watchpoint): Renamed to
5978 i386_dr_insert_aligned_watchpoint and made nonstatic.
5979 All uses updated.
5980 (i386_remove_aligned_watchpoint): Renamed to
5981 i386_dr_remove_aligned_watchpoint and made nonstatic.
5982 All uses updated.
5983 (i386_update_inferior_debug_regs): Renamed to
5984 i386_dr_update_inferior_debug_regs and made nonstatic.
5985 All uses updated.
5986 (i386_low_insert_watchpoint): Renamed to
5987 i386_dr_insert_watchpoint. All uses updated.
5988 (i386_low_remove_watchpoint): Renamed to
5989 i386_dr_remove_watchpoint. All uses updated.
5990 (i386_low_region_ok_for_watchpoint): Renamed to
5991 i386_dr_region_ok_for_watchpoint. All uses updated.
5992 (i386_low_stopped_data_address): Renamed to
5993 i386_dr_stopped_data_address. All uses updated.
5994 (i386_low_stopped_by_watchpoint): Renamed to
5995 i386_dr_stopped_by_watchpoint. All uses updated.
5996
131aa0d4
GB
59972014-06-18 Gary Benson <gbenson@redhat.com>
5998
5999 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6000 (i386_dr_low_can_set_control): Likewise.
6001 (i386_insert_aligned_watchpoint): New check.
6002
d9305f7f
GB
60032014-06-18 Gary Benson <gbenson@redhat.com>
6004
6005 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6006 Renamed to state.
6007
e927c9fc
GB
60082014-06-18 Gary Benson <gbenson@redhat.com>
6009
6010 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6011 instead of fatal and error.
6012 (i386_handle_nonaligned_watchpoint): Likewise.
6013
1b6d4134
GB
60142014-06-18 Gary Benson <gbenson@redhat.com>
6015
6016 * i386-low.c (i386_get_debug_register_length): New macro.
6017 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6018 (i386_show_dr): Use debug_printf instead of fprintf. Use
6019 phex to format values.
6020
6e62758f
GB
60212014-06-18 Gary Benson <gbenson@redhat.com>
6022
6023 * i386-low.h: Comment changes.
6024 * i386-low.c: Likewise.
6025
fc6e2f03
GB
60262014-06-18 Gary Benson <gbenson@redhat.com>
6027
6028 * i386-low.c: Whitespace changes.
6029
f9d1eeed
TT
60302014-06-12 Tom Tromey <tromey@redhat.com>
6031
6032 * utils.c (freeargv): Remove.
6033
0b04e523
TT
60342014-06-12 Tom Tromey <tromey@redhat.com>
6035
6036 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6037 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6038 (parse_debug_format_options): Likewise.
6039 (gdbserver_usage): Likewise.
6040 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6041 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6042 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6043 against libiberty.
6044 ($(LIBGNU)): Depend on libiberty.
6045 (all-lib): Recurse into all subdirs.
6046 (install-only): Invoke "install" target in subdirs.
6047 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6048 targets.
6049 * configure: Rebuild.
6050 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6051 for vasprintf, vsnprintf, or gettimeofday.
6052 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6053 srv_tgtobj.
6054
270c9937
JB
60552014-06-05 Joel Brobecker <brobecker@adacore.com>
6056
6057 * development.sh: Delete.
6058 * Makefile.in (config.status): Adjust dependency on development.sh.
6059 * configure.ac: Adjust development.sh source call.
6060 * configure: Regenerate.
6061
0a261ed8
PA
60622014-06-02 Pedro Alves <palves@redhat.com>
6063
6064 * ax.c (gdb_free_agent_expr): New function.
6065 * ax.h (gdb_free_agent_expr): New declaration.
6066 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6067 list.
6068 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6069 static.
6070 (clear_breakpoint_conditions_and_commands): New function.
6071 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6072 (clear_breakpoint_conditions_and_commands): New declaration.
6073
e9dae05e
RR
60742014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6075
6076 * linux-aarch64-low.c (asm/ptrace.h): Include.
6077
5876f503
JK
60782014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6079
6080 Fix TLS access for -static -pthread.
6081 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6082 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6083 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6084
802e8e6d
PA
60852014-05-20 Pedro Alves <palves@redhat.com>
6086
6087 * linux-aarch64-low.c (aarch64_insert_point)
6088 (aarch64_remove_point): No longer check whether the type is
6089 supported here. Adjust to new interface.
6090 (the_low_target): Install aarch64_supports_z_point_type as
6091 supports_z_point_type method.
6092 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6093 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6094 instead of a Z packet char. Adjust.
6095 (arm_supports_z_point_type): New function.
6096 (arm_insert_point, arm_remove_point): Adjust to new interface.
6097 (the_low_target): Install arm_supports_z_point_type.
6098 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6099 (cris_insert_point, cris_remove_point): Adjust to new interface.
6100 Don't check whether the type is supported here.
6101 (the_low_target): Install cris_supports_z_point_type.
6102 * linux-low.c (linux_supports_z_point_type): New function.
6103 (linux_insert_point, linux_remove_point): Adjust to new interface.
6104 * linux-low.h (struct linux_target_ops) <insert_point,
6105 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6106 raw_breakpoint pointer parameter.
6107 <supports_z_point_type>: New method.
6108 * linux-mips-low.c (mips_supports_z_point_type): New function.
6109 (mips_insert_point, mips_remove_point): Adjust to new interface.
6110 Use mips_supports_z_point_type.
6111 (the_low_target): Install mips_supports_z_point_type.
6112 * linux-ppc-low.c (the_low_target): Install NULL as
6113 supports_z_point_type method.
6114 * linux-s390-low.c (the_low_target): Install NULL as
6115 supports_z_point_type method.
6116 * linux-sparc-low.c (the_low_target): Install NULL as
6117 supports_z_point_type method.
6118 * linux-x86-low.c (x86_supports_z_point_type): New function.
6119 (x86_insert_point): Adjust to new insert_point interface. Use
6120 insert_memory_breakpoint. Adjust to new
6121 i386_low_insert_watchpoint interface.
6122 (x86_remove_point): Adjust to remove_point interface. Use
6123 remove_memory_breakpoint. Adjust to new
6124 i386_low_remove_watchpoint interface.
6125 (the_low_target): Install x86_supports_z_point_type.
6126 * lynx-low.c (lynx_target_ops): Install NULL as
6127 supports_z_point_type callback.
6128 * nto-low.c (nto_supports_z_point_type): New.
6129 (nto_insert_point, nto_remove_point): Adjust to new interface.
6130 (nto_target_ops): Install nto_supports_z_point_type.
6131 * mem-break.c: Adjust intro comment.
6132 (struct raw_breakpoint) <raw_type, size>: New fields.
6133 <inserted>: Update comment.
6134 <shlib_disabled>: Delete field.
6135 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6136 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6137 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6138 (raw_bkpt_type_to_target_hw_bp_type): New function.
6139 (find_enabled_raw_code_breakpoint_at): New function.
6140 (find_raw_breakpoint_at): New type and size parameters. Use them.
6141 (insert_memory_breakpoint): New function, based off
6142 set_raw_breakpoint_at.
6143 (remove_memory_breakpoint): New function.
6144 (set_raw_breakpoint_at): Reimplement.
6145 (set_breakpoint): New, based on set_breakpoint_at.
6146 (set_breakpoint_at): Reimplement.
6147 (delete_raw_breakpoint): Go through the_target->remove_point
6148 instead of assuming memory breakpoints.
6149 (find_gdb_breakpoint_at): Delete.
6150 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6151 (find_gdb_breakpoint): New function.
6152 (set_gdb_breakpoint_at): Delete.
6153 (z_type_supported): New function.
6154 (set_gdb_breakpoint_1): New function, loosely based off
6155 set_gdb_breakpoint_at.
6156 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6157 (delete_gdb_breakpoint_at): Delete.
6158 (delete_gdb_breakpoint_1): New function, loosely based off
6159 delete_gdb_breakpoint_at.
6160 (delete_gdb_breakpoint): New function.
6161 (clear_gdb_breakpoint_conditions): Rename to ...
6162 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6163 breakpoint.
6164 (add_condition_to_breakpoint): Make static.
6165 (add_breakpoint_condition): Take a struct breakpoint pointer
6166 instead of an address. Adjust.
6167 (gdb_condition_true_at_breakpoint): Rename to ...
6168 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6169 z_type parameter.
6170 (gdb_condition_true_at_breakpoint): Reimplement.
6171 (add_breakpoint_commands): Take a struct breakpoint pointer
6172 instead of an address. Adjust.
6173 (gdb_no_commands_at_breakpoint): Rename to ...
6174 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6175 parameter. Return true if no breakpoint was found. Change debug
6176 output.
6177 (gdb_no_commands_at_breakpoint): Reimplement.
6178 (run_breakpoint_commands): Rename to ...
6179 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6180 and change return type to boolean.
6181 (run_breakpoint_commands): New function.
6182 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6183 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6184 breakpoint. Go through the_target->remove_point instead of
6185 assuming memory breakpoint.
6186 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6187 software and hardware breakpoints.
6188 (reinsert_raw_breakpoint): Go through the_target->insert_point
6189 instead of assuming memory breakpoint.
6190 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6191 software and hardware breakpoints.
6192 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6193 Check both software and hardware breakpoints.
6194 (validate_inserted_breakpoint): Assert the breakpoint is a
6195 software breakpoint. Set the inserted flag to -1 instead of
6196 setting shlib_disabled.
6197 (delete_disabled_breakpoints): Adjust.
6198 (validate_breakpoints): Only validate software breakpoints.
6199 Adjust to inserted flag change.
6200 (check_mem_read, check_mem_write): Skip breakpoint types other
6201 than software breakpoints. Adjust to inserted flag change.
6202 * mem-break.h (enum raw_bkpt_type): New enum.
6203 (raw_breakpoint, struct process_info): Forward declare.
6204 (Z_packet_to_target_hw_bp_type): Delete declaration.
6205 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6206 (set_gdb_breakpoint, delete_gdb_breakpoint)
6207 (clear_breakpoint_conditions): New declarations.
6208 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6209 (breakpoint_inserted_here): Update comment.
6210 (add_breakpoint_condition, add_breakpoint_commands): Replace
6211 address parameter with a breakpoint pointer parameter.
6212 (gdb_breakpoint_here): Update comment.
6213 (delete_gdb_breakpoint_at): Delete.
6214 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6215 * server.c (process_point_options): Take a struct breakpoint
6216 pointer instead of an address. Adjust.
6217 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6218 delete_gdb_breakpoint.
6219 * spu-low.c (spu_target_ops): Install NULL as
6220 supports_z_point_type method.
6221 * target.h: Include mem-break.h.
6222 (struct target_ops) <prepare_to_access_memory>: Update comment.
6223 <supports_z_point_type>: New field.
6224 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6225 instead of a char. Also take a raw breakpoint pointer.
6226 * win32-arm-low.c (the_low_target): Install NULL as
6227 supports_z_point_type.
6228 * win32-i386-low.c (i386_supports_z_point_type): New function.
6229 (i386_insert_point, i386_remove_point): Adjust to new interface.
6230 (the_low_target): Install i386_supports_z_point_type.
6231 * win32-low.c (win32_supports_z_point_type): New function.
6232 (win32_insert_point, win32_remove_point): Adjust to new interface.
6233 (win32_target_ops): Install win32_supports_z_point_type.
6234 * win32-low.h (struct win32_target_ops):
6235 <supports_z_point_type>: New method.
6236 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6237 instead of a char. Also take a raw breakpoint pointer.
6238
932539e3
PA
62392014-05-20 Pedro Alves <palves@redhat.com>
6240
6241 * mem-break.h: Include break-common.h.
6242 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6243 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6244 (Z_packet_to_target_hw_bp_type): New declaration.
6245 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6246 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6247 (Z_PACKET_ACCESS_WP): Delete macros.
6248 (Z_packet_to_hw_type): Delete function.
6249 * i386-low.h: Don't include break-common.h here.
6250 (Z_packet_to_hw_type): Delete declaration.
6251 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6252 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6253 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6254 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6255 * linux-aarch64-low.c: Don't include break-common.h here.
6256 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6257 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6258 (Z_packet_to_target_hw_bp_type): Delete function.
6259 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6260 function.
6261 (mips_insert_point, mips_remove_point): Use
6262 Z_packet_to_target_hw_bp_type.
6263
4ff0d3d8
PA
62642014-05-20 Pedro Alves <palves@redhat.com>
6265
6266 * linux-aarch64-low.c: Include break-common.h.
6267 (enum target_point_type): Delete.
6268 (Z_packet_to_point_type): Rename to ...
6269 (Z_packet_to_target_hw_bp_type): ... this, and return a
6270 target_hw_bp_type instead.
6271 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6272 instead of an enum target_point_type.
6273 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6274 breakpoint type.
6275 (aarch64_dr_state_insert_one_point)
6276 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6277 (aarch64_handle_aligned_watchpoint)
6278 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6279 Take an enum target_hw_bp_type instead of an enum
6280 target_point_type.
6281 (aarch64_supports_z_point_type): New function.
6282 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6283 use Z_packet_to_target_hw_bp_type.
6284
786dc519
JB
62852014-05-20 Joel Brobecker <brobecker@adacore.com>
6286
6287 * configure.ac: Only use -Werror by default when DEVELOPMENT
6288 is true.
6289 * configure: Regenerate.
6290
9e0aa64f
JK
62912014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6292
6293 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6294 * linux-x86-low.c (X86_64_USER_REGS): New.
6295 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6296
2b577b92
YQ
62972014-04-28 Yao Qi <yao@codesourcery.com>
6298
6299 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6300 name.
6301
94611da2
PA
63022014-04-25 Pedro Alves <palves@redhat.com>
6303
6304 PR server/16255
6305 * linux-low.c (linux_attach_fail_reason_string): New function.
6306 (linux_attach_lwp): Delete.
6307 (linux_attach_lwp_1): Rename to ...
6308 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6309 argument. Remove "initial" parameter. Return int instead of
6310 void. Don't error or warn here.
6311 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6312 failure to attach to the tgid. Call warning when failing to
6313 attach to an lwp.
6314 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6315 argument. Remove "initial" parameter. Return int instead of
6316 void. Don't error or warn here.
6317 (linux_attach_fail_reason_string): New declaration.
6318 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6319 interface change. Use linux_attach_fail_reason_string.
6320
01f9f808
MS
63212014-04-24 Michael Sturm <michael.sturm@mintel.com>
6322 Walfred Tedeschi <walfred.tedeschi@intel.com>
6323
6324 * Makefile.in: Added rules to handle new files
6325 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6326 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6327 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6328 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6329 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6330 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6331 x32-avx512-linux.o.
6332 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6333 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6334 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6335 i386/x32-avx512.xml.
6336 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6337 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6338 i386/x32-avx512-linux.xml.
6339 * i387-fp.c (num_avx512_k_registers): New constant for number
6340 of K registers.
6341 (num_avx512_zmmh_low_registers): New constant for number of
6342 lower ZMM registers (0-15).
6343 (num_avx512_zmmh_high_registers): New constant for number of
6344 higher ZMM registers (16-31).
6345 (num_avx512_ymmh_registers): New contant for number of higher
6346 YMM registers (ymm16-31 added by avx521 on x86_64).
6347 (num_avx512_xmm_registers): New constant for number of higher
6348 XMM registers (xmm16-31 added by AVX512 on x86_64).
6349 (struct i387_xsave): Add space for AVX512 registers.
6350 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6351 Add code to handle AVX512 registers.
6352 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6353 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6354 prototypei from generated file.
6355 (tdesc_amd64_avx512_linux): Likewise.
6356 (init_registers_x32_avx512_linux): Likewise.
6357 (tdesc_x32_avx512_linux): Likewise.
6358 (init_registers_i386_avx512_linux): Likewise.
6359 (tdesc_i386_avx512_linux): Likewise.
6360 (x86_64_regmap): Add AVX512 registers.
6361 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6362 mask.
6363 (initialize_low_arch): Add code to initialize AVX512 registers.
6364
51aa91f9
PA
63652014-04-23 Pedro Alves <palves@redhat.com>
6366
6367 * mem-break.c (find_gdb_breakpoint_at): Make static.
6368 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6369
a4165e94
PA
63702014-04-23 Pedro Alves <palves@redhat.com>
6371
6372 * i386-low.c: Don't include break-common.h here.
6373 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6374 prototype to take target_hw_bp_type as argument instead of a Z
6375 packet char.
6376 * i386-low.h: Include break-common.h here.
6377 (Z_packet_to_hw_type): Declare.
6378 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6379 prototypes.
6380 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6381 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6382 (x86_remove_point): Convert the packet number to a
6383 target_hw_bp_type before calling i386_low_remove_watchpoint.
6384 * win32-i386-low.c (i386_insert_point): Convert the packet number
6385 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6386 (i386_remove_point): Convert the packet number to a
6387 target_hw_bp_type before calling i386_low_remove_watchpoint.
6388
b8acf843
PA
63892014-04-23 Pedro Alves <palves@redhat.com>
6390
6391 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6392
d708bcd1
PA
63932014-04-10 Pedro Alves <palves@redhat.com>
6394
6395 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6396 Check if the condition or command is NULL before checking if the
6397 breakpoint is known. On success, return true.
6398 * mem-break.h (add_breakpoint_condition): Document return.
6399 (add_breakpoint_commands): Add describing comment.
6400 * server.c (skip_to_semicolon): New function.
6401 (process_point_options): Use it.
6402
2eec7d5b
PA
64032014-04-09 Pedro Alves <palves@redhat.com>
6404
6405 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6406 to lwpid_of.
6407
fa96cb38
PA
64082014-02-27 Pedro Alves <palves@redhat.com>
6409
6410 PR 12702
6411 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6412 macros.
6413 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6414 output.
6415 (last_thread_of_process_p): Take a PID argument instead of a
6416 thread pointer.
6417 (linux_wait_for_lwp): Delete.
6418 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6419 functions.
6420 (linux_low_filter_event): New function, party factored out from
6421 linux_wait_for_event.
6422 (linux_wait_for_event): Rename to ...
6423 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6424 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6425 sigsuspend. Check for zombie leaders.
6426 (linux_wait_for_event): Reimplement as wrapper around
6427 linux_wait_for_event_filtered.
6428 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6429 a normal or signal exit is seen, it's the whole process exiting.
6430 (wait_for_sigstop): No longer a for_each_inferior callback.
6431 Rewrite on top of linux_wait_for_event_filtered.
6432 (stop_all_lwps): Call wait_for_sigstop directly.
6433 * server.c (resume, handle_target_event): Handle
6434 TARGET_WAITKIND_NO_RESUMED.
6435
d763de10
JB
64362014-02-26 Joel Brobecker <brobecker@adacore.com>
6437
6438 * win32-low.c (psapi_get_dll_name,
6439 * win32_CreateToolhelp32Snapshot): Delete.
6440 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6441 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6442 Delete.
6443 (handle_load_dll): Add function description.
6444 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6445
850a0f76
JB
64462014-02-26 Joel Brobecker <brobecker@adacore.com>
6447
6448 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6449 Add comment.
6450 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6451 base address when calling win32_add_one_solib.
6452 (handle_load_dll): Delete local variable load_addr.
6453 Remove 0x1000 offset applied to DLL base address when calling
6454 win32_add_one_solib.
6455 (handle_unload_dll): Add comment.
6456
f25b3fc3
JB
64572014-02-26 Joel Brobecker <brobecker@adacore.com>
6458
6459 * win32-low.c (win32_add_all_dlls): Renames
6460 win32_ensure_ntdll_loaded. Rewrite function documentation.
6461 Adjust implementation to always load all DLLs.
6462 Add 0x1000 offset to DLL base address when calling
6463 win32_add_one_solib.
6464 (child_initialization_done): New static global.
6465 (do_initial_child_stuff): Set child_initialization_done to
6466 zero during child initialization, and 1 after. Replace call
6467 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6468 Add comment.
6469 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6470 (handle_unload_dll): Add function documentation.
6471 (get_child_debug_event): Ignore load and unload DLL events
6472 during child initialization.
6473
d86d4aaf
DE
64742014-02-20 Doug Evans <dje@google.com>
6475
3bc32da3 6476 Remove global all_lwps.
d86d4aaf
DE
6477 * inferiors.h (ptid_of): Move here from linux-low.h.
6478 (pid_of, lwpid_of): Ditto.
6479 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6480 parameter is a struct thread_info * now.
6481 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6482 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6483 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6484 directly.
6485 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6486 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6487 * linux-arm-low.c (update_registers_callback): Update, "entry"
6488 parameter is a struct thread_info * now.
6489 Fetch lwpid from current_inferior directly.
6490 (arm_insert_point): Pass &all_threads to find_inferior instead of
6491 &all_lwps.
6492 (arm_remove_point): Ditto.
6493 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6494 (arm_prepare_to_resume): Fetch pid from thread.
6495 (arm_read_description): Fetch lwpid from current_inferior directly.
6496 * linux-low.c (all_lwps): Delete.
6497 (delete_lwp): Delete call to remove_inferior.
6498 (handle_extended_wait): Fetch lwpid from thread.
6499 (add_lwp): Don't set lwp->entry.id. Remove call to
6500 add_inferior_to_list.
6501 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6502 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6503 (kill_one_lwp_callback): Ditto.
6504 (linux_kill): Don't dereference NULL pointer.
6505 Fetch ptid,lwpid from thread.
6506 (get_detach_signal): Fetch ptid from thread.
6507 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6508 Simplify call to regcache_invalidate_thread.
6509 (delete_lwp_callback): Update, "entry" parameter is a
6510 struct thread_info * now. Fetch pid from thread.
6511 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6512 (status_pending_p_callback): Update, "entry" parameter is a
6513 struct thread_info * now. Fetch ptid from thread.
6514 (find_lwp_pid): Update, "entry" parameter is a
6515 struct thread_info * now.
6516 (linux_wait_for_lwp): Fetch pid from thread.
6517 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6518 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6519 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6520 (dequeue_one_deferred_signal): Ditto.
6521 (cancel_breakpoint): Fetch ptid from current_inferior.
6522 (linux_wait_for_event): Pass &all_threads to find_inferior,
6523 not &all_lwps. Fetch ptid, lwpid from thread.
6524 (count_events_callback): Update, "entry" parameter is a
6525 struct thread_info * now.
6526 (select_singlestep_lwp_callback): Ditto.
6527 (select_event_lwp_callback): Ditto.
6528 (cancel_breakpoints_callback): Ditto.
6529 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6530 not &all_lwps.
6531 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6532 (unsuspend_one_lwp): Update, "entry" parameter is a
6533 struct thread_info * now.
6534 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6535 not &all_lwps.
6536 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6537 Fetch lwpid from thread, not lwp.
6538 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6539 Pass &all_threads to find_inferior, not &all_lwps.
6540 (send_sigstop): Fetch lwpid from thread, not lwp.
6541 (send_sigstop_callback): Update, "entry" parameter is a
6542 struct thread_info * now.
6543 (suspend_and_send_sigstop_callback): Ditto.
6544 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6545 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6546 struct thread_info * now.
6547 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6548 from thread, lwp.
6549 (lwp_running): Update, "entry" parameter is a
6550 struct thread_info * now.
6551 (stop_all_lwps): Fetch ptid from thread.
6552 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6553 (linux_resume_one_lwp): Fetch lwpid from thread.
6554 (linux_set_resume_request): Update, "entry" parameter is a
6555 struct thread_info * now. Fetch pid, lwpid from thread.
6556 (resume_status_pending_p): Update, "entry" parameter is a
6557 struct thread_info * now.
6558 (need_step_over_p): Ditto. Fetch lwpid from thread.
6559 (start_step_over): Fetch lwpid from thread.
6560 (linux_resume_one_thread): Update, "entry" parameter is a
6561 struct thread_info * now. Fetch lwpid from thread.
6562 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6563 (proceed_one_lwp): Update, "entry" parameter is a
6564 struct thread_info * now. Fetch lwpid from thread.
6565 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6566 struct thread_info * now.
6567 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6568 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6569 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6570 directly.
6571 (regsets_store_inferior_registers): Ditto.
6572 (fetch_register, store_register): Ditto.
6573 (linux_read_memory, linux_write_memory): Ditto.
6574 (linux_request_interrupt): Ditto.
6575 (linux_read_auxv): Ditto.
6576 (linux_xfer_siginfo): Ditto.
6577 (linux_qxfer_spu): Ditto.
6578 (linux_qxfer_libraries_svr4): Ditto.
6579 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6580 moved to inferiors.h.
6581 (get_lwp): Delete.
6582 (get_thread_lwp): Update.
6583 (struct lwp_info): Delete member "entry". Simplify comment for
6584 member "thread".
6585 (all_lwps): Delete.
6586 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6587 current_inferior directly.
6588 (update_watch_registers_callback): Update, "entry" parameter is a
6589 struct thread_info * now. Fetch pid from thread.
6590 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6591 (mips_insert_point): Fetch lwpid from current_inferior.
6592 Pass &all_threads to find_inferior, not &all_lwps.
6593 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6594 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6595 directly.
6596 (mips_stopped_data_address): Ditto.
6597 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6598 directly.
6599 * linux-tile-low.c (tile_arch_setup): Ditto.
6600 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6601 (update_debug_registers_callback): Update, "entry" parameter is a
6602 struct thread_info * now. Fetch pid from thread.
6603 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6604 Pass &all_threads to find_inferior, not &all_lwps.
6605 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6606 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6607 Pass &all_threads to find_inferior, not &all_lwps.
6608 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6609 (i386_dr_low_get_status): Ditto.
6610 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6611 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6612 (x86_linux_read_description): Ditto.
6613 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6614
3b8361aa
DE
66152014-02-20 Doug Evans <dje@google.com>
6616
6617 * inferiors.c (get_first_inferior): Fix buglet.
6618
f7667f0d
DE
66192014-02-19 Doug Evans <dje@google.com>
6620
6621 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6622 * inferiors.c (add_thread): Change result type to struct thread_info *.
6623 All callers updated.
6624 (add_lwp): Call add_thread here instead of in callers.
6625 All callers updated.
6626 * linux-low.h (get_lwp_thread): Rewrite.
6627 (struct lwp_info): New member "thread".
6628
b3312d80
DE
66292014-02-19 Doug Evans <dje@google.com>
6630
6631 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6632 All callers updated.
6633
ecc6f45c
DE
66342014-02-19 Doug Evans <dje@google.com>
6635
6636 * inferiors.c (add_thread): Fix whitespace.
6637
649ebbca
DE
66382014-02-19 Doug Evans <dje@google.com>
6639
6640 * dll.c (clear_dlls): Replace accessing list implemention details
6641 with API function.
6642 * gdbthread.h (get_first_thread): Declare.
6643 * inferiors.c (for_each_inferior_with_data): New function.
6644 (get_first_thread): New function.
6645 (find_thread_ptid): Simplify.
6646 (get_first_inferior): New function.
6647 (clear_list): Delete.
6648 (one_inferior_p): New function.
6649 (clear_inferior_list): New function.
6650 (clear_inferiors): Update.
6651 * inferiors.h (for_each_inferior_with_data): Declare.
6652 (clear_inferior_list): Declare.
6653 (one_inferior_p): Declare.
6654 (get_first_inferior): Declare.
6655 * linux-low.c (linux_wait_for_event): Replace accessing list
6656 implemention details with API function.
6657 * server.c (target_running): Ditto.
6658 (accumulate_file_name_length): New function.
6659 (emit_dll_description): New function.
6660 (handle_qxfer_libraries): Replace accessing list implemention
6661 details with API function.
6662 (handle_qxfer_threads_worker): New function.
6663 (handle_qxfer_threads_proper): Replace accessing list implemention
6664 details with API function.
6665 (handle_query): Ditto.
6666 (visit_actioned_threads_callback_ftype): New typedef.
6667 (visit_actioned_threads_data): New struct.
6668 (visit_actioned_threads): Rewrite to be find_inferior callback.
6669 (resume): Call find_inferior.
6670 (handle_status): Replace accessing list implemention
6671 details with API function.
6672 (process_serial_event): Replace accessing list implemention details
6673 with API function.
6674 * target.c (set_desired_inferior): Replace accessing list implemention
6675 details with API function.
6676 * tracepoint.c (same_process_p): New function.
6677 (gdb_agent_about_to_close): Replace accessing list implemention
6678 details with API function.
6679 * win32-low.c (child_delete_thread): Replace accessing list
6680 implemention details with API function.
6681 (match_dll_by_basename): New function.
6682 (dll_is_loaded_by_basename): New function.
6683 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6684 details call to dll_is_loaded_by_basename.
6685
80894984
DE
66862014-02-19 Doug Evans <dje@google.com>
6687
6688 * dll.h (struct dll_info): Add comment.
6689 * gdbthread.h (struct thread_info): Add comment.
6690 (current_ptid): Simplify.
6691 * inferiors.c (add_process): Update.
6692 (remove_process): Update.
6693 * inferiors.h (struct process_info): Rename member "head" to "entry".
6694 * linux-low.c (delete_lwp): Update.
6695 (add_lwp): Update.
6696 (last_thread_of_process_p): Update.
6697 (kill_one_lwp_callback, linux_kill): Update.
6698 (status_pending_p_callback): Update.
6699 (wait_for_sigstop): Update. Simplify read of ptid.
6700 (start_step_over): Update.
6701 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6702 (get_lwp_thread): Update.
6703 (struct lwp_info): Rename member "head" to "entry".
6704 * regcache.h (inferior_list_entry): Delete.
6705 * server.c (kill_inferior_callback): Update.
6706 (detach_or_kill_inferior_callback): Update.
6707 (print_started_pid): Update.
6708 (print_attached_pid): Update.
6709 (process_serial_event): Simplify read of ptid.
6710 * thread-db.c (thread_db_create_event): Update.
6711 (thread_db_get_tls_address): Update.
6712 * win32-low.c (current_inferior_ptid): Simplify.
6713
46917d26
TT
67142014-02-19 Tom Tromey <tromey@redhat.com>
6715
6716 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6717 argument.
6718 (target_supports_btrace): Update.
6719
0759a81e
YQ
67202014-02-14 Yao Qi <yao@codesourcery.com>
6721
6722 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6723 (rsp-low-ipa.o): New target.
6724
a7191e8b
TT
67252014-02-12 Tom Tromey <tromey@redhat.com>
6726
6727 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6728 convert_ascii_to_int.
6729 * regcache.c (registers_to_string): Likewise.
6730 * remote-utils.c (decode_M_packet): Likewise.
6731 * server.c (process_serial_event): Likewise.
6732
ff0e980e
TT
67332014-02-12 Tom Tromey <tromey@redhat.com>
6734
6735 * server.c (handle_query, handle_v_run): Use hex2bin, not
6736 unhexify.
6737 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6738
e9371aff
TT
67392014-02-12 Tom Tromey <tromey@redhat.com>
6740
6741 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6742 convert_int_to_ascii.
6743 * regcache.c (registers_to_string, collect_register_as_string):
6744 Likewise.
6745 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6746 Likewise.
6747 * server.c (process_serial_event): Likewise.
6748 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6749 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6750
971dc0b8
TT
67512014-02-12 Tom Tromey <tromey@redhat.com>
6752
6753 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6754 bin2hex, not hexify.
6755 * tracepoint.c (cmd_qtstatus): Likewise.
6756
0a822afb
TT
67572014-02-12 Tom Tromey <tromey@redhat.com>
6758
6759 * remote-utils.c (monitor_output): Pass explicit length to
6760 hexify.
6761
9c3d6531
TT
67622014-02-12 Tom Tromey <tromey@redhat.com>
6763
6764 * tracepoint.c: Include rsp-low.h.
6765 * server.c: Include rsp-low.h.
6766 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6767 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6768 declare.
6769 * remote-utils.c: Include rsp-low.h.
6770 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6771 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6772 (convert_int_to_ascii, convert_ascii_to_int): Move to
6773 common/rsp-low.c.
6774 * regcache.c: Include rsp-low.h.
6775 * ax.c: Include rsp-low.h.
6776 * Makefile.in (SFILES): Add common/rsp-low.c.
6777 (OBS): Add rsp-low.o.
6778 (rsp-low.o): New target.
6779
01fd3ea5
TT
67802014-02-12 Tom Tromey <tromey@redhat.com>
6781
6782 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6783 Include print-utils.h.
6784 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6785 (plongest, thirty_two, phex_nz): Remove.
6786 * Makefile.in (SFILES): Add common/print-utils.c.
6787 (OBS): Add print-utils.o.
6788 (print-utils-ipa.o): New target.
6789 (print-utils.o): New target.
6790 (IPA_OBJS): Add print-utils-ipa.o.
6791
e99dc820
TT
67922014-02-06 Tom Tromey <tromey@redhat.com>
6793
6794 * Makefile.in (SFILES): Fix indentation.
6795
ee1e2d4f
DE
67962014-02-05 Doug Evans <dje@google.com>
6797
6798 * linux-low.c (linux_wait_for_event): Improve comment.
6799 (linux_wait_1): Keep current_inferior in sync with event_child.
6800
f5a02773
DE
68012014-01-22 Doug Evans <dje@google.com>
6802
6803 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6804
87ce2a04
DE
68052014-01-22 Doug Evans <dje@google.com>
6806
6807 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6808 * configure: Regenerate.
6809 * config.in: Regenerate.
6810 * Makefile.in (SFILES): Add debug.c.
6811 (OBS): Add debug.o.
6812 * debug.c: New file.
6813 * debug.h: New file.
6814 * linux-aarch64-low.c (*): Update all debugging printfs to use
6815 debug_printf instead of fprintf.
6816 * linux-arm-low.c (*): Ditto.
6817 * linux-cris-low.c (*): Ditto.
6818 * linux-crisv32-low.c (*): Ditto.
6819 * linux-m32r-low.c (*): Ditto.
6820 * linux-sparc-low.c (*): Ditto.
6821 * linux-x86.c (*): Ditto.
6822 * linux-low.c (*): Ditto.
6823 (linux_wait_1): Add calls to debug_enter, debug_exit.
6824 (linux_wait): Remove redundant debugging printf.
6825 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6826 (linux_resume, unstop_all_lwps): Ditto.
6827 * mem-break.c (*): Update all debugging printfs to use
6828 debug_printf instead of fprintf.
6829 * remote-utils.c (*): Ditto.
6830 * thread-db.c (*): Ditto.
6831 * server.c #include <ctype.h>, "gdb_vecs.h".
6832 (debug_threads): Moved to debug.c.
6833 (*): Update all debugging printfs to use debug_printf instead of
6834 fprintf.
6835 (start_inferior): Replace call to fflush with call to debug_flush.
6836 (monitor_show_help): Mention set debug-format.
6837 (parse_debug_format_options): New function.
6838 (handle_monitor_command): Handle "monitor set debug-format".
6839 (gdbserver_usage): Mention --debug-format.
6840 (main): Parse --debug-format.
6841 * server.h (debug_threads): Declaration moved to debug.h.
6842 #include "debug.h".
6843 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6844 trace_debug_1 that uses debug_printf.
6845 (tracepoint_look_up_symbols): Update all debugging printfs to use
6846 debug_printf instead of fprintf.
6847
e671835b
BS
68482014-01-20 Baruch Siach <baruch@tkos.co.il>
6849
6850 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6851 sys/ptrace.h.
6852
b5737fa9
PA
68532014-01-17 Pedro Alves <palves@redhat.com>
6854
ea38d2a9 6855 PR build/16445
c7faa97a
PA
6856 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6857 defined after including gdb_proc_service.h.
b5737fa9 6858
40ed484e
DE
68592014-01-16 Doug Evans <dje@google.com>
6860
6861 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6862 (match_dll): Use it.
6863
969c39fb
MM
68642014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6865
6866 * target.h (target_ops) <read_btrace>: Change parameters and
6867 return type to allow error reporting.
6868 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6869 trace reading errors on.
6870 * linux-low.c (linux_low_read_btrace): Pass trace reading
6871 errors on.
6872 (linux_low_disable_btrace): New.
6873
ab7f45ba
DE
68742014-01-15 Doug Evans <dje@google.com>
6875
6876 * inferiors.c (thread_id_to_gdb_id): Delete.
6877 * inferiors.h (thread_id_to_gdb_id): Delete.
6878
66af0f44
EZ
68792014-01-13 Eli Zaretskii <eliz@gnu.org>
6880
6881 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6882 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6883 versions.
6884
9939e131
PA
68852014-01-08 Pedro Alves <palves@redhat.com>
6886
6887 * server.c (handle_status): Don't discard previous queued stop
6888 replies or thread's pending status here.
6889 (main) <disconnection>: Do it here instead.
6890
b7ea362b
PA
68912014-01-08 Pedro Alves <palves@redhat.com>
6892
6893 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6894 * server.c (visit_actioned_threads, handle_pending_status): New
6895 function.
6896 (handle_v_cont): Factor out parts to ...
6897 (resume): ... this new function. If in all-stop, and a thread
6898 being resumed has a pending status, report it without actually
6899 resuming.
6900 (myresume): Adjust to use the new 'resume' function.
6901 (clear_pending_status_callback, set_pending_status_callback)
6902 (find_status_pending_thread_callback): New functions.
6903 (handle_status): Handle the case of multiple threads having
6904 interesting statuses to report. Report threads' real last signal
6905 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6906 with an interesting thread to report the status for, instead of
6907 always reporting the status of the first thread.
6908
28498c42
JB
69092014-01-01 Joel Brobecker <brobecker@adacore.com>
6910
6911 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6912 * gdbreplay.c (gdbreplay_version): Likewise.
6913
f45c82da
YZ
69142013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6915
6916 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6917 iov.iov_len with the real length in use.
6918
379a5e2d
JB
69192013-12-13 Joel Brobecker <brobecker@adacore.com>
6920
6921 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6922 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6923 for all targets that use win32-low.c.
6924 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6925 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6926
4210d83e
PA
69272013-12-13 Pedro Alves <palves@redhat.com>
6928
6929 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6930 if equal to TARGET_WAITKIND_LOADED.
6931 * win32-low.c (cached_status): New static global.
6932 (win32_wait): Add declaration.
6933 (do_initial_child_stuff): Flush all initial pending debug events
6934 up to the initial breakpoint.
6935 (win32_wait): If CACHED_STATUS was set, return that instead
6936 of doing a real wait. Remove the code resuming the execution
6937 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6938 during the initial phase. Also remove the code changing
6939 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6940 TARGET_WAITKIND_STOPPED.
6941
e7f0d979
YQ
69422013-12-11 Yao Qi <yao@codesourcery.com>
6943
6944 * notif.c (handle_notif_ack): Return 0 if no notification
6945 matches.
6946
ebcf782c
DE
69472013-11-20 Doug Evans <dje@google.com>
6948
6949 * linux-low.c (linux_set_resume_request): Fix comment.
6950
20ad9378
DE
69512013-11-20 Doug Evans <dje@google.com>
6952
6953 * linux-low.c (resume_status_pending_p): Tweak comment.
6954
a196ebeb
WT
69552013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6956
6957 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6958 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6959 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6960 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6961 (srv_amd64_regobj): Add amd64-mpx.o.
6962 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6963 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6964 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6965 * i387-fp.c (num_pl_bnd_register) Added constant.
6966 (num_pl_bnd_cfg_registers) Added constant.
6967 (struct i387_xsave) Added reserved area and MPX fields.
6968 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6969 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6970 function.
6971 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6972 (init_registers_amd64_mpx_linux): Declare new function.
6973 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6974 (x86_64_regmap): Add MPX registers.
6975 (x86_linux_read_description): Add MPX case.
6976 (initialize_low_arch): Initialize MPX targets.
6977
0080a2f6
TT
69782013-11-18 Tom Tromey <tromey@redhat.com>
6979
6980 * configure: Rebuild.
6981 * configure.ac: Don't check for stdlib.h.
6982 * gdbreplay.c: Unconditionally include stdlib.h.
6983
2978b111
TT
69842013-11-18 Tom Tromey <tromey@redhat.com>
6985
6986 * config.in: Rebuild.
6987 * configure: Rebuild.
6988 * configure.ac: Don't use AC_HEADER_DIRENT.
6989
a3d08894
TT
69902013-11-18 Tom Tromey <tromey@redhat.com>
6991
6992 * server.h: Don't check HAVE_STRING_H.
6993 * gdbreplay.c: Don't check HAVE_STRING_H.
6994 * configure: Rebuild.
6995
0a5dd17d
TT
69962013-11-18 Tom Tromey <tromey@redhat.com>
6997
6998 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6999 LIBGNU.
7000
1bd2f0ba
TT
70012013-11-08 Tom Tromey <tromey@redhat.com>
7002
7003 * configure, config.in: Rebuild.
7004 * configure.ac: Remove unused configury.
7005
3266f10b
TT
70062013-11-08 Tom Tromey <tromey@redhat.com>
7007
7008 * acinclude.m4: Include common.m4, codeset.m4.
7009 * configure, config.in: Rebuild.
7010 * configure.ac: Use GDB_AC_COMMON.
7011
6682d959
AA
70122013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7013
7014 * linux-s390-low.c (HWCAP_S390_TE): New define.
7015 (s390_arch_setup): Consider the TE field in the HWCAP for
7016 determining 'have_regset_tdb'.
7017
fd0a4d76
SDJ
70182013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7019
7020 PR gdb/16014
7021 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7022 call to sizeof.
7023
1a3d890b
PA
70242013-10-02 Pedro Alves <palves@redhat.com>
7025
7026 * server.c (process_serial_event): Don't output "GDBserver
7027 exiting" if GDB is connected through stdio.
7028 * target.c (mywait): Likewise, be silent if GDB is connected
7029 through stdio.
7030
97ad4581
JB
70312013-10-01 Joel Brobecker <brobecker@adacore.com>
7032
7033 * lynx-low.c (lynx_add_threads_after_attach): New function.
7034 (lynx_attach): Remove call to add_thread. Add call to
7035 lynx_add_threads_after_attach instead.
7036
5b4e221c
MF
70372013-09-28 Mike Frysinger <vapier@gentoo.org>
7038
7039 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7040 * config.in, configure: Regenerated.
7041
ee47b2f8
YQ
70422013-09-18 Yao Qi <yao@codesourcery.com>
7043
7044 PR server/15959
7045 * server.c (start_inferior): Clear 'resume_info'.
7046
d6707650 70472013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7048
d6707650
JW
7049 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7050 for each register.
7051
9243dd0e 70522013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7053
9243dd0e
JW
7054 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7055 linux-tile-low.o to srv_tgtobj.
7056
c623a6ef
WN
70572013-09-16 Will Newton <will.newton@linaro.org>
7058
7059 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7060 out regs.
7061
fb71d39e
PA
70622013-09-06 Pedro Alves <palves@redhat.com>
7063
7064 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7065 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7066 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7067 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7068 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7069 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7070
8e7e9910
PA
70712013-09-06 Pedro Alves <palves@redhat.com>
7072
7073 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7074 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7075
7c3a12ca
PA
70762013-09-06 Pedro Alves <palves@redhat.com>
7077
7078 * linux-amd64-ipa.c: Include tracepoint.h.
7079 * linux-i386-ipa.c: Include tracepoint.h.
7080
8eb3d7b6
RW
70812013-09-06 Ricard Wanderlof <ricardw@axis.com>
7082
7083 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7084 (ps_get_thread_area): New function.
7085
eddddb9d
RW
70862013-09-06 Ricard Wanderlof <ricardw@axis.com>
7087
7088 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7089 (initialize_low_arch): Call init_registers_crisv32 rather than
7090 init_register_crisv32.
7091
533b0600
PA
70922013-09-05 Pedro Alves <palves@redhat.com>
7093
7094 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7095 to ...
7096 * hostio.h: ... this new file.
7097 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7098 win32-low.c: Include hostio.h.
7099
0ce3d3b5
PA
71002013-09-05 Pedro Alves <palves@redhat.com>
7101
7102 * server.h (gdb_client_data, handler_func, callback_handler_func)
7103 (delete_file_handler, add_file_handler, append_callback_event)
7104 (delete_callback_event, start_event_loop, initialize_event_loop):
7105 Move to event-loop.h and include it.
7106 * event-loop.h: New file.
7107
799cdc37
PA
71082013-09-05 Pedro Alves <palves@redhat.com>
7109
7110 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7111 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7112 (loaded_dll, unloaded_dll): Move to ...
7113 * dll.h: ... this new file.
7114 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7115
6a6bbd9d
PA
71162013-09-05 Pedro Alves <palves@redhat.com>
7117
7118 * server.h (current_process, get_thread_process, all_processes)
7119 (add_inferior_to_list, for_each_inferior, current_inferior)
7120 (remove_inferior, add_process, remove_process, find_process_pid)
7121 (have_started_inferiors_p, have_attached_inferiors_p)
7122 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7123 (clear_inferiors, find_inferior, find_inferior_id)
7124 (inferior_target_data, set_inferior_target_data)
7125 (inferior_regcache_data, set_inferior_regcache_data): Move to
7126 inferiors.h, and include it.
7127 * inferiors.h: New file.
7128
f699aaba
PA
71292013-09-05 Pedro Alves <palves@redhat.com>
7130
7131 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7132 Move ...
72f4393d 7133 * ax.h: ... here.
f699aaba 7134
c144c7a0
PA
71352013-09-05 Pedro Alves <palves@redhat.com>
7136
7137 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7138 tracepoint.h.
7139 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7140 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7141 (handle_tracepoint_general_set, handle_tracepoint_query)
7142 (tracepoint_finished_step, tracepoint_was_hit)
7143 (release_while_stepping_state_list, current_traceframe)
7144 (in_readonly_region, traceframe_read_mem)
7145 (fetch_traceframe_registers, traceframe_read_sdata)
7146 (traceframe_read_info, struct fast_tpoint_collect_status)
7147 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7148 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7149 (supply_fast_tracepoint_registers)
7150 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7151 (ipa_tdesc, claim_trampoline_space)
7152 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7153 (agent_mem_read, agent_get_trace_state_variable_value)
7154 (agent_set_trace_state_variable_value, agent_tsv_read)
7155 (agent_mem_read_string, get_raw_reg_func_addr)
7156 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7157 * tracepoint.h: ... this new file.
7158
ff42e6ab
PA
71592013-09-05 Pedro Alves <palves@redhat.com>
7160
7161 * server.h (perror_with_name, error, fatal, warning, paddress)
7162 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7163 include it.
7164 * utils.h: New file.
7165
541af0f4
PA
71662013-09-05 Pedro Alves <palves@redhat.com>
7167
7168 * server.h (remote_debug, noack_mode, transport_is_reliable)
7169 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7170 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7171 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7172 (write_enn, initialize_async_io, enable_async_io)
7173 (disable_async_io, check_remote_input_interrupt_request)
7174 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7175 (dead_thread_notify, prepare_resume_reply)
7176 (decode_address_to_semicolon, decode_address, decode_m_packet)
7177 (decode_M_packet, decode_X_packet, decode_xfer_write)
7178 (decode_search_memory_packet, unhexify, hexify)
7179 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7180 (look_up_one_symbol, relocate_instruction)
7181 (monitor_output): Move to remote-utils.h, and include it.
7182 * remote-utils.h: New file.
7183
eebdf26b
PA
71842013-09-05 Pedro Alves <palves@redhat.com>
7185
7186 * server.h (_): Delete.
7187
3aafd2ff
PA
71882013-09-02 Pedro Alves <palves@redhat.com>
7189
7190 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7191 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7192 allocated.
7193 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7194
cee83bcb
PM
71952013-09-02 Pierre Muller <muller@sourceware.org>
7196
7197 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7198 or WriteProcessMemory complete successfully and handle
7199 ERROR_PARTIAL_COPY error.
7200
9a13b2fa
PA
72012013-09-02 Pedro Alves <palves@redhat.com>
7202
7203 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7204 error instead of EIO.
7205
602e3198
JK
72062013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7207
7208 PR server/15604
7209 * linux-low.c: Include filestuff.h.
7210 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7211 * lynx-low.c: Include filestuff.h.
7212 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7213 * server.c: Include filestuff.h.
7214 (main): Call notice_open_fds.
7215 * spu-low.c: Include filestuff.h.
7216 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7217
96d7229d
LM
72182013-08-22 Luis Machado <lgustavo@codesourcery.com>
7219
7220 * Makefile.in: Explain why ../target and ../nat are not
7221 listed as include file search paths.
7222 (linux-waitpid.o): New object file rule.
7223 * configure.srv (srv_native_linux_obj): New variable.
7224 Replace all occurrences of linux native object files with
7225 $srv_native_linux_obj.
7226 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7227 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7228 (linux_enable_event_reporting): Remove declaration.
7229 (my_waitpid): Moved to common/linux-waitpid.c.
7230 (linux_wait_for_event): Pass ptid when calling
7231 linux_enable_event_reporting.
7232 (linux_supports_tracefork_flag): Remove.
7233 (linux_enable_event_reporting): Likewise.
7234 (linux_tracefork_grandchild): Remove.
7235 (STACK_SIZE): Moved to common/linux-ptrace.c.
7236 (linux_tracefork_child): Remove.
7237 (linux_test_for_tracefork): Remove.
7238 (linux_look_up_symbols): Call linux_supports_traceclone.
7239 (initialize_low): Remove call to linux_test_for_tracefork.
7240 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7241 common/linux-ptrace.h.
7242 (PTRACE_TYPE_ARG4): Likewise.
7243 Include linux-ptrace.h.
7244
32940073
PA
72452013-08-21 Pedro Alves <palves@redhat.com>
7246
7247 * config.in: Renegerate.
7248
33b60d58 72492013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 7250
33b60d58
LM
7251 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7252 (SFILES): Remove $(srcdir)/common/target-common.c and
7253 add $(srcdir)/target/waitstatus.c.
7254 (OBS): Remove target-common.o and add waitstatus.o.
7255 (server_h): Remove $(srcdir)/../common/target-common.h and
7256 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7257 and $(srcdir)/../target/waitstatus.h.
7258 (target-common.o): Remove.
7259 (waitstatus.o): New target object file.
7260 * target.h: Do not include target-common.h and
7261 include target/resume.h, target/wait.h and
7262 target/waitstatus.h.
7263
b8e1b30e
LM
72642013-08-13 Luis Machado <lgustavo@codesourcery.com>
7265
7266 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7267 to PTRACE_TYPE_ARG3.
7268 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7269 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7270 PTRACE_TYPE_ARG4.
7271 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7272 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7273
7a60ad40
YQ
72742013-07-27 Jie Zhang <jie@codesourcery.com>
7275 Daniel Jacobowitz <dan@codesourcery.com>
7276 Yao Qi <yao@codesourcery.com>
7277
7278 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7279 (mips-linux-watch.o): New rule.
7280 (mips_linux_watch_h): New variable.
7281 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7282 srv_tgtobj.
7283 * linux-mips-low.c: Include mips-linux-watch.h.
7284 (struct arch_process_info, struct arch_lwp_info): New.
7285 (update_watch_registers_callback): New function.
7286 (mips_linux_new_process, mips_linux_new_thread) New functions.
7287 (mips_linux_prepare_to_resume, mips_insert_point): New
7288 functions.
7289 (mips_remove_point, mips_stopped_by_watchpoint): New
7290 functions.
7291 (rsp_bp_type_to_target_hw_bp_type): New function.
7292 (mips_stopped_data_address): New function.
7293 (the_low_target): Add watchpoint support functions.
7294
de6f69ad
YQ
72952013-07-27 Yao Qi <yao@codesourcery.com>
7296
7297 * i386-low.c: Include break-common.h.
7298 (enum target_hw_bp_type): Remove.
7299
3360c0bf
LM
73002013-07-24 Luis Machado <lgustavo@codesourcery.com>
7301
7302 * Makefile.in (SFILES): /common/target-common.c.
7303 (OBS): Add target-common.o.
7304 (server_h): Add $(srcdir)/../common/target-common.h.
7305 (target-common.o): New target.
7306 * server.c (queue_stop_reply_callback): Free
7307 status string after use.
7308 * target.c (target_waitstatus_to_string): Remove.
7309 * target.h: Include target-common.h.
7310 (resume_kind): Likewise.
7311 (target_waitkind): Likewise.
7312 (target_waitstatus): Likewise.
7313 (TARGET_WNOHANG): Likewise.
7314
bd885420
YQ
73152013-07-04 Yao Qi <yao@codesourcery.com>
7316
7317 * Makefile.in (host_alias): Use @host_noncanonical@.
7318 (target_alias): Use @target_noncanonical@.
7319 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7320 ACX_NONCANONICAL_HOST.
7321 * configure: Regenerated.
7322
7323 Revert:
7324 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7325
7326 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7327 * configure: Rebuild.
7328 * Makefile.in (version_host, version_target): Get from configure.
7329 (version.c): Use $(version_host) and $(version_target).
7330
17ef446e
PA
73312013-07-03 Pedro Alves <palves@redhat.com>
7332
7333 * Makefile.in (config.status): Depend on development.sh.
7334 * acinclude.m4: Include libmcheck.m4.
7335 * configure: Regenerate.
7336
7a9a7487
MG
73372013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7338
7339 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7340 attribute inside the parentheses.
7341 (winapi_DebugSetProcessKillOnExit): Ditto.
7342 (winapi_DebugBreakProcess): Ditto.
7343 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 7344
49b64de6
MG
73452013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7346
7347 * notif.h (notif_event): Add a dummy member to avoid compiler
7348 errors.
7349
d5749ee7
PA
73502013-07-01 Pedro Alves <palves@redhat.com>
7351
7352 * hostio.c (HOSTIO_PATH_MAX): Define.
7353 (require_filename, handle_open, handle_unlink, handle_readlink):
7354 Use it.
7355
d8d2a3ee
PA
73562013-07-01 Pedro Alves <palves@redhat.com>
7357
7358 * server.h: Include "pathmax.h".
7359 * linux-low.c: Don't include sys/param.h.
7360 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7361 MAXPATHLEN.
7362 * win32-low.c: Don't include sys/param.h.
7363 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7364
bc7dea8d
PA
73652013-07-01 Pedro Alves <palves@redhat.com>
7366
7367 * event-loop.c: Don't check HAVE_UNISTD_H before including
7368 <unistd.h>.
7369 * gdbreplay.c: Likewise.
7370 * remote-utils.c: Likewise.
7371 * server.c: Likewise.
7372 * configure.ac: Don't check for unistd.h.
7373 * configure: Regenerate.
7374
d6c2da54
TT
73752013-06-28 Tom Tromey <tromey@redhat.com>
7376
7377 * Makefile.in (version.c): Use version.in, not
7378 common/version.in.
7379
257b6bec
MG
73802013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7381
7382 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7383 * configure: Rebuild.
7384 * Makefile.in (version_host, version_target): Get from configure.
7385 (version.c): Use $(version_host) and $(version_target).
7386
86ebe149
DK
73872013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7388
7389 Fix trace-status to output user name without trailing colon.
7390 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7391
f30aa5af
DK
73922013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7393
7394 Fix trace-status to output proper start-time and stop-time.
7395 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7396 output start time and stop time in hex as gdb expects.
7397
28a93511
YQ
73982013-06-26 Pedro Alves <pedro@codesourcery.com>
7399
7400 * tracepoint.c (build_traceframe_info_xml): Output trace state
7401 variables present in the trace buffer.
7402
01208463
TT
74032013-06-24 Tom Tromey <tromey@redhat.com>
7404
7405 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7406 create-version.sh.
7407 (version.o): Remove.
7408 * gdbreplay.c: Include version.h.
7409 (version, host_name): Don't declare.
7410 * server.h: Include version.h.
7411 (version, host_name): Don't declare.
7412
760256f9
PA
74132013-06-12 Pedro Alves <palves@redhat.com>
7414
7415 * linux-x86-low.c (linux_is_elf64): Delete global.
7416 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7417 with local linux_pid_exe_is_elf_64_file use.
7418
030031ee
PA
74192013-06-11 Pedro Alves <palves@redhat.com>
7420
7421 * linux-low.c (regset_disabled, disable_regset): New functions.
7422 (regsets_fetch_inferior_registers)
7423 (regsets_store_inferior_registers): Use them.
7424 (initialize_regsets_info); Don't allocate the disabled_regsets
7425 array here.
7426 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7427 comment.
7428
5da6eb0a
PA
74292013-06-11 Pedro Alves <palves@redhat.com>
7430
7431 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7432 xmalloc.
7433
7e5aaa09
PA
74342013-06-11 Pedro Alves <palves@redhat.com>
7435
7436 * linux-x86-low.c (initialize_low_arch): Call
7437 init_registers_x32_avx_linux.
7438
d878444c
JK
74392013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7440
7441 Fix compatibility with Android Bionic.
7442 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7443 it is not empty.
7444
3aee8918
PA
74452013-06-07 Pedro Alves <palves@redhat.com>
7446
5f2b57b5 7447 PR server/14823
3aee8918
PA
7448 * Makefile.in (OBS): Add tdesc.o.
7449 (IPA_OBJS): Add tdesc-ipa.o.
7450 (tdesc-ipa.o): New rule.
7451 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7452 interface.
7453 * linux-low.c (new_inferior): Delete.
7454 (disabled_regsets, num_regsets): Delete.
7455 (linux_add_process): Adjust to set the new per-process
7456 new_inferior flag.
7457 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7458 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7459 was a stop. When calling arch_setup, switch the current inferior
7460 to the thread that got an event.
7461 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7462 (regsets_fetch_inferior_registers)
7463 (regsets_store_inferior_registers): New regsets_info parameter.
7464 Adjust to use it.
7465 (linux_register_in_regsets): New regs_info parameter. Adjust to
7466 use it.
7467 (register_addr, fetch_register, store_register): New usrregs_info
7468 parameter. Adjust to use it.
7469 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7470 parameter regs_info. Adjust to use it.
7471 (linux_fetch_registers): Get the current inferior's regs_info, and
7472 adjust to use it.
7473 (linux_store_registers): Ditto.
7474 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7475 (initialize_low): Don't initialize the target_regsets here. Call
7476 initialize_low_arch.
7477 * linux-low.h (target_regsets): Delete declaration.
7478 (struct regsets_info): New.
7479 (struct usrregs_info): New.
7480 (struct regs_info): New.
7481 (struct process_info_private) <new_inferior>: New field.
7482 (struct linux_target_ops): Delete the num_regs, regmap, and
7483 regset_bitmap fields. New field regs_info.
7484 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7485 * i387-fp.c (num_xmm_registers): Delete.
7486 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7487 calls to new interface.
7488 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7489 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7490 Infer the number of xmm registers from the regcache's target
7491 description.
7492 * i387-fp.h (num_xmm_registers): Delete.
7493 * inferiors.c (add_thread): Don't install the thread's regcache
7494 here.
7495 * proc-service.c (gregset_info): Fetch the current inferior's
7496 regs_info. Adjust to use it.
7497 * regcache.c: Include tdesc.h.
7498 (register_bytes, reg_defs, num_registers)
7499 (gdbserver_expedite_regs): Delete.
7500 (get_thread_regcache): If the thread doesn't have a regcache yet,
7501 create one, instead of aborting gdbserver.
7502 (regcache_invalidate_one): Rename to ...
7503 (regcache_invalidate_thread): ... this.
7504 (regcache_invalidate_one): New.
7505 (regcache_invalidate): Only invalidate registers of the current
7506 process.
7507 (init_register_cache): Add target_desc parameter, and use it.
7508 (new_register_cache): Ditto. Assert the target description has a
7509 non zero registers_size.
7510 (regcache_cpy): Add assertions. Adjust.
7511 (realloc_register_cache, set_register_cache): Delete.
7512 (registers_to_string, registers_from_string): Adjust.
7513 (find_register_by_name, find_regno, find_register_by_number)
7514 (register_cache_size): Add target_desc parameter, and use it.
7515 (free_register_cache_thread, free_register_cache_thread_one)
7516 (regcache_release, register_cache_size): New.
7517 (register_size): Add target_desc parameter, and use it.
7518 (register_data, supply_register, supply_register_zeroed)
7519 (supply_regblock, supply_register_by_name, collect_register)
7520 (collect_register_as_string, collect_register_by_name): Adjust.
7521 * regcache.h (struct target_desc): Forward declare.
7522 (struct regcache) <tdesc>: New field.
7523 (init_register_cache, new_register_cache): Add target_desc
7524 parameter.
7525 (regcache_invalidate_thread): Declare.
7526 (regcache_invalidate_one): Delete declaration.
7527 (regcache_release): Declare.
7528 (find_register_by_number, register_cache_size, register_size)
7529 (find_regno): Add target_desc parameter.
7530 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7531 declarations.
7532 * remote-utils.c: Include tdesc.h.
7533 (outreg, prepare_resume_reply): Adjust.
7534 * server.c: Include tdesc.h.
7535 (gdbserver_xmltarget): Delete declaration.
7536 (get_features_xml, process_serial_event): Adjust.
7537 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7538 declare.
7539 (struct process_info) <tdesc>: New field.
7540 (ipa_tdesc): Declare.
7541 * tdesc.c: New file.
7542 * tdesc.h: New file.
7543 * tracepoint.c: Include tdesc.h.
7544 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7545 (get_context_regcache): Adjust to pass ipa_tdesc down.
7546 (do_action_at_tracepoint): Adjust to get the register cache size
7547 from the context regcache's description.
7548 (traceframe_walk_blocks): Adjust to get the register cache size
7549 from the current trace frame's description.
7550 (traceframe_get_pc): Adjust to get current trace frame's
7551 description and pass it down.
7552 (gdb_collect): Adjust to get the register cache size from the
7553 IPA's description.
7554 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7555 (gdbserver_xmltarget): Delete.
7556 (initialize_low_tracepoint): Set the ipa's target description.
7557 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7558 (initialize_low_tracepoint): Set the ipa's target description.
7559 * linux-x86-low.c: Include tdesc.h.
7560 [__x86_64__] (is_64bit_tdesc): New.
7561 (ps_get_thread_area, x86_get_thread_area): Use it.
7562 (i386_cannot_store_register): Rename to ...
7563 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7564 (i386_cannot_fetch_register): Rename to ...
7565 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7566 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7567 to new interface.
7568 (target_regsets): Rename to ...
7569 (x86_regsets): ... this.
7570 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7571 interface.
7572 (x86_siginfo_fixup): Use is_64bit_tdesc.
7573 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7574 (tdesc_x32_avx_linux, tdesc_x32_linux)
7575 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7576 Declare.
7577 (x86_linux_update_xmltarget): Delete.
7578 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7579 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7580 (AMD64_LINUX_USER64_CS): New.
7581 (x86_linux_read_description): New, based on
7582 x86_linux_update_xmltarget.
7583 (same_process_callback): New.
7584 (x86_arch_setup_process_callback): New.
7585 (x86_linux_update_xmltarget): New.
7586 (x86_regsets_info): New.
7587 (amd64_linux_regs_info): New.
7588 (i386_linux_usrregs_info): New.
7589 (i386_linux_regs_info): New.
7590 (x86_linux_regs_info): New.
7591 (x86_arch_setup): Reimplement.
7592 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7593 (x86_emit_ops): Ditto.
7594 (the_low_target): Adjust. Install x86_linux_regs_info,
7595 x86_cannot_fetch_register, and x86_cannot_store_register.
7596 (initialize_low_arch): New.
7597 * linux-ia64-low.c (tdesc_ia64): Declare.
7598 (ia64_fetch_register): Adjust.
7599 (ia64_usrregs_info, regs_info): New globals.
7600 (ia64_regs_info): New function.
7601 (the_low_target): Adjust.
7602 (initialize_low_arch): New function.
7603 * linux-sparc-low.c (tdesc_sparc64): Declare.
7604 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7605 Adjust.
7606 (sparc_arch_setup): New function.
7607 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7608 (the_low_target): Adjust.
7609 (initialize_low_arch): New function.
7610 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7611 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7612 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7613 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7614 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7615 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7616 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7617 (tdesc_powerpc_isa205_vsx64l): Declare.
7618 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7619 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7620 (ppc_set_pc, ppc_get_hwcap): Adjust.
7621 (ppc_usrregs_info): Forward declare.
7622 (!__powerpc64__) ppc_regmap_adjusted: New global.
7623 (ppc_arch_setup): Adjust to the current process'es target
7624 description.
7625 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7626 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7627 (ppc_store_evrregset): Adjust.
7628 (target_regsets): Rename to ...
7629 (ppc_regsets): ... this, and make static.
7630 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7631 (ppc_regs_info): New function.
7632 (the_low_target): Adjust.
7633 (initialize_low_arch): New function.
7634 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7635 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7636 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7637 (tdesc_s390x_linux64v2): Declare.
7638 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7639 (s390_fill_gregset, s390_store_last_break): Adjust.
7640 (target_regsets): Rename to ...
7641 (s390_regsets): ... this, and make static.
7642 (s390_get_pc, s390_set_pc): Adjust.
7643 (s390_get_hwcap): New target_desc parameter, and use it.
7644 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7645 (s390_arch_setup): Adjust to set the current process'es target
7646 description. Don't adjust the regmap.
7647 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7648 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7649 (regs_info_3264): New globals.
7650 (s390_regs_info): New function.
7651 (the_low_target): Adjust.
7652 (initialize_low_arch): New function.
7653 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7654 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7655 [__mips64] (init_registers_mips_linux)
7656 (init_registers_mips_dsp_linux): Delete defines.
7657 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7658 (have_dsp): New global.
7659 (mips_read_description): New, based on mips_arch_setup.
7660 (mips_arch_setup): Reimplement.
7661 (get_usrregs_info): New function.
7662 (mips_cannot_fetch_register, mips_cannot_store_register)
7663 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7664 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7665 (target_regsets): Rename to ...
7666 (mips_regsets): ... this, and make static.
7667 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7668 (dsp_regs_info, regs_info): New globals.
7669 (mips_regs_info): New function.
7670 (the_low_target): Adjust.
7671 (initialize_low_arch): New function.
7672 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7673 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7674 Declare.
7675 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7676 (arm_read_description): New, with bits factored from
7677 arm_arch_setup.
7678 (arm_arch_setup): Reimplement.
7679 (target_regsets): Rename to ...
7680 (arm_regsets): ... this, and make static.
7681 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7682 (arm_regs_info): New function.
7683 (the_low_target): Adjust.
7684 (initialize_low_arch): New function.
7685 * linux-m68k-low.c (tdesc_m68k): Declare.
7686 (target_regsets): Rename to ...
7687 (m68k_regsets): ... this, and make static.
7688 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7689 (m68k_regs_info): New function.
7690 (m68k_arch_setup): New function.
7691 (the_low_target): Adjust.
7692 (initialize_low_arch): New function.
7693 * linux-sh-low.c (tdesc_sharch): Declare.
7694 (target_regsets): Rename to ...
7695 (sh_regsets): ... this, and make static.
7696 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7697 (sh_regs_info, sh_arch_setup): New functions.
7698 (the_low_target): Adjust.
7699 (initialize_low_arch): New function.
7700 * linux-bfin-low.c (tdesc_bfin): Declare.
7701 (bfin_arch_setup): New function.
7702 (bfin_usrregs_info, regs_info): New globals.
7703 (bfin_regs_info): New function.
7704 (the_low_target): Adjust.
7705 (initialize_low_arch): New function.
7706 * linux-cris-low.c (tdesc_cris): Declare.
7707 (cris_arch_setup): New function.
7708 (cris_usrregs_info, regs_info): New globals.
7709 (cris_regs_info): New function.
7710 (the_low_target): Adjust.
7711 (initialize_low_arch): New function.
7712 * linux-cris-low.c (tdesc_crisv32): Declare.
7713 (cris_arch_setup): New function.
7714 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7715 (cris_regs_info): New function.
7716 (the_low_target): Adjust.
7717 (initialize_low_arch): New function.
7718 * linux-m32r-low.c (tdesc_m32r): Declare.
7719 (m32r_arch_setup): New function.
7720 (m32r_usrregs_info, regs_info): New globals.
7721 (m32r_regs_info): Adjust.
7722 (initialize_low_arch): New function.
7723 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7724 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7725 (tic6x_usrregs_info): Forward declare.
7726 (tic6x_read_description): New function, based on ...
7727 (tic6x_arch_setup): ... this. Reimplement.
7728 (target_regsets): Rename to ...
7729 (tic6x_regsets): ... this, and make static.
7730 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7731 (tic6x_regs_info): New function.
7732 (the_low_target): Adjust.
7733 (initialize_low_arch): New function.
7734 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7735 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7736 (target_regsets): Rename to ...
7737 (xtensa_regsets): ... this, and make static.
7738 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7739 globals.
7740 (xtensa_arch_setup, xtensa_regs_info): New functions.
7741 (the_low_target): Adjust.
7742 (initialize_low_arch): New function.
7743 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7744 (nios2_arch_setup): Set the current process'es tdesc.
7745 (target_regsets): Rename to ...
7746 (nios2_regsets): ... this.
7747 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7748 (nios2_regs_info): New function.
7749 (the_low_target): Adjust.
7750 (initialize_low_arch): New function.
a261b8f5
PA
7751 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7752 (aarch64_arch_setup): Set the current process'es tdesc.
7753 (target_regsets): Rename to ...
7754 (aarch64_regsets): ... this.
7755 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7756 (aarch64_regs_info): New function.
7757 (the_low_target): Adjust.
7758 (initialize_low_arch): New function.
3aee8918
PA
7759 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7760 globals.
7761 (target_regsets): Rename to ...
7762 (tile_regsets): ... this.
7763 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7764 (tile_regs_info): New function.
7765 (tile_arch_setup): Set the current process'es tdesc.
7766 (the_low_target): Adjust.
7767 (initialize_low_arch): New function.
7768 * spu-low.c (tdesc_spu): Declare.
7769 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7770 * win32-arm-low.c (tdesc_arm): Declare.
7771 (arm_arch_setup): New function.
7772 (the_low_target): Install arm_arch_setup instead of
7773 init_registers_arm.
7774 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7775 (init_windows_x86): Rename to ...
7776 (i386_arch_setup): ... this. Set `win32_tdesc'.
7777 (the_low_target): Adjust.
7778 * win32-low.c (win32_tdesc): New global.
7779 (child_add_thread): Don't create the thread cache here.
7780 (do_initial_child_stuff): Set the new process'es tdesc.
7781 * win32-low.h (struct target_desc): Forward declare.
7782 (win32_tdesc): Declare.
7783 * lynx-i386-low.c (tdesc_i386): Declare global.
7784 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7785 * lynx-low.c (lynx_tdesc): New global.
7786 (lynx_add_process): Set the new process'es tdesc.
7787 * lynx-low.h (struct target_desc): Forward declare.
7788 (lynx_tdesc): Declare global.
7789 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7790 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7791 * nto-low.c (nto_tdesc): New global.
7792 (do_attach): Set the new process'es tdesc.
7793 * nto-low.h (struct target_desc): Forward declare.
7794 (nto_tdesc): Declare.
7795 * nto-x86-low.c (tdesc_i386): Declare.
7796 (nto_x86_arch_setup): Set `nto_tdesc'.
7797
b1fbec62
GB
77982013-06-04 Gary Benson <gbenson@redhat.com>
7799
7800 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7801 to qSupported response when appropriate.
7802 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7803 with nonzero-length annex.
7804 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7805 arguments supplied in annex.
7806
d1ec4ce7
DE
78072013-05-31 Doug Evans <dje@google.com>
7808
ac44adcb 7809 PR server/15594
d1ec4ce7
DE
7810 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7811 64 bits in 64-cross-32 environment.
7812
9b25f2d3
PA
78132013-05-28 Pedro Alves <palves@redhat.com>
7814
7815 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7816 (aarch64-without-fpu.c): Delete rule.
7817 * configure.srv (aarch64*-*-linux*): Remove references to
7818 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7819 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7820 declaration.
7821
6740dc9c
PA
78222013-05-24 Pedro Alves <palves@redhat.com>
7823
7824 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7825 instead of strchr/decode_address. Error if the range isn't split
7826 with a ','. Don't assume there's be a ':' in the action.
7827
c2d6af84
PA
78282013-05-23 Yao Qi <yao@codesourcery.com>
7829 Pedro Alves <palves@redhat.com>
7830
7831 * linux-low.c (lwp_in_step_range): New function.
7832 (linux_wait_1): If the thread was range stepping and stopped
7833 outside the stepping range, report the stop to GDB. Otherwise,
7834 continue stepping. Add range stepping debug output.
7835 (linux_set_resume_request): Copy the step range from the resume
7836 request to the lwp.
7837 (linux_supports_range_stepping): New.
7838 (linux_target_ops) <supports_range_stepping>: Set to
7839 linux_supports_range_stepping.
7840 * linux-low.h (struct linux_target_ops)
7841 <supports_range_stepping>: New field.
7842 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7843 * linux-x86-low.c (x86_supports_range_stepping): New.
7844 (the_low_target) <supports_range_stepping>: Set to
7845 x86_supports_range_stepping.
7846 * server.c (handle_v_cont): Handle 'r' action.
7847 (handle_v_requests): Append ";r" if the target supports range
7848 stepping.
7849 * target.h (struct thread_resume) <step_range_start,
7850 step_range_end>: New fields.
7851 (struct target_ops) <supports_range_stepping>:
7852 New field.
7853 (target_supports_range_stepping): New macro.
7854
58794e1a
JB
78552013-05-17 Joel Brobecker <brobecker@adacore.com>
7856
7857 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7858 confusion in comment.
7859
d631c5a7
JB
78602013-05-17 Joel Brobecker <brobecker@adacore.com>
7861
7862 * lynx-low.c (struct process_info_private): New type.
7863 (lynx_add_process): New function.
7864 (lynx_create_inferior, lynx_attach): Replace calls to
7865 add_process by calls to lynx_add_process.
7866 (lynx_resume): If PTID is null, then try using
7867 current_process()->private->last_wait_event_ptid.
7868 Add comments.
7869 (lynx_clear_inferiors): Delete. The contents of that function
7870 has been inlined in lynx_mourn;
7871 (lynx_wait_1): Save the ptid in the process's private data.
7872 (lynx_mourn): Free the process' private data. Replace call
7873 to lynx_clear_inferiors by call to clear_inferiors.
7874
96f7a20f
YQ
78752013-05-17 Yao Qi <yao@codesourcery.com>
7876
7877 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7878 the right place.
7879
db0dfaa0
LM
78802013-05-16 Luis Machado <lgustavo@codesourcery.com>
7881
7882 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7883 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7884 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7885 PT_TEXT_END_ADDR guards. Update comments.
7886 (linux_target_op) <read_offsets>: Conditionally define to
7887 linux_read_offsets if the target is UCLIBC and if it defines
7888 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7889
68f5f838
SL
78902013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7891 Andrew Jenner <andrew@codesourcery.com>
7892
7893 * Makefile.in (SFILES): Add linux-nios2-low.c.
7894 (clean): Add action to delete nios2-linux.c.
7895 (nios2-linux.c): New rule.
7896 * configure.srv: Add nios2*-*-linux*.
7897 * linux-nios2-low.c: New.
7898
1ebff1fd
HAQ
78992013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7900
7901 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7902
f6150862
HZ
79032013-04-25 Hui Zhu <hui@codesourcery.com>
7904
7905 PR gdb/15186
f6150862
HZ
7906 * ax.c (ax_printf): Add fflush.
7907
614c279d
TT
79082013-04-22 Tom Tromey <tromey@redhat.com>
7909
7910 * Makefile.in (SFILES): Add filestuff.c.
7911 (OBS): Add filestuff.o.
7912 (filestuff.o): New target.
7913 * config.in, configure: Rebuild.
7914 * configure.ac: Check for fdwalk, pipe2.
7915
7d4e5717
PA
79162013-04-17 Pedro Alves <palves@redhat.com>
7917
7918 * configure.ac (USE_THREAD_DB): Delete variable.
7919 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7920 Don't AC_SUBST USE_THREAD_DB.
7921 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7922 * config.in, configure: Regenerate.
7923
d5c93e41
PA
79242013-04-16 Pedro Alves <palves@redhat.com>
7925
7926 * linux-low.h (struct lwp_info) <thread_known>: Move under
7927 the USE_THREAD_DB #ifdef.
7928
04f5fe89
PA
79292013-04-16 Pedro Alves <palves@redhat.com>
7930
7931 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7932 (linux-low.o): Delete rule.
7933 * linux-low.h: Always include "gdb_thread_db.h" instead of
7934 conditionally including thread_db.h.
7935 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7936 HAVE_THREAD_DB_H.
7937
480b27bf
JK
79382013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7939
7940 * Makefile.in (install-only): Fix make install regression.
7941
43662968
JK
79422013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7943
7944 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7945 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7946 installation.
7947 * gdbserver.1: Remove.
7948
3e74e146
PA
79492013-03-22 Pedro Alves <palves@redhat.com>
7950
7951 * linux-low.c (handle_extended_wait): Don't call
7952 linux_enable_event_reporting.
7953
a8347a2a
TT
79542013-03-15 Tony Theodore <tonyt@logyst.com>
7955
7956 PR build/9098:
7957 * Makefile.in (SHELL): Use @SHELL@.
7958
eeb56fa7
SDJ
79592013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7960
7961 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7962 compiler warning.
7963
4fa7e2ff
JB
79642013-03-13 Joel Brobecker <brobecker@adacore.com>
7965
7966 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7967 Remove extraneous NULL element.
7968
8ddb1965
YQ
79692013-03-13 Yao Qi <yao@codesourcery.com>
7970
7971 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7972 'V' block in trace frame.
7973
9accd112
MM
79742013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7975
7976 * target.h (struct target_ops): Add btrace ops.
7977 (target_supports_btrace): New macro.
7978 (target_enable_btrace): New macro.
7979 (target_disable_btrace): New macro.
7980 (target_read_btrace): New macro.
7981 * gdbthread.h (struct thread_info): Add btrace field.
7982 * server.c: Include btrace-common.h.
7983 (handle_btrace_general_set): New function.
7984 (handle_btrace_enable): New function.
7985 (handle_btrace_disable): New function.
7986 (handle_general_set): Call handle_btrace_general_set.
7987 (handle_qxfer_btrace): New function.
7988 (struct qxfer qxfer_packets[]): Add btrace entry.
7989 * inferiors.c (remove_thread): Disable btrace.
7990 * linux-low: Include linux-btrace.h.
7991 (linux_low_enable_btrace): New function.
7992 (linux_low_read_btrace): New function.
7993 (linux_target_ops): Add btrace ops.
7994 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7995 Add srv_linux_btrace=yes.
7996 (x86_64-*-linux*): Add linux-btrace.o.
7997 Add srv_linux_btrace=yes.
7998 * configure.ac: Define HAVE_LINUX_BTRACE.
7999 * config.in: Regenerated.
8000 * configure: Regenerated.
8001
5cc22e4c
MM
80022013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8003
8004 * server.c (handle_qxfer): Preserve error message if -3 is
8005 returned.
8006 (qxfer): Document the -3 return value.
8007
7c97f91e
MM
80082013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8009
8010 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8011 (linux_btrace_h): New variable.
8012 (linux-btrace.o): New rule.
8013
be9a119c 80142013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
8015 Hafiz Abid Qadeer <abidh@codesourcery.com>
8016
8017 * tracepoint.c (trace_buffer_size): New global.
8018 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8019 (init_trace_buffer): Change to one-argument function. Allocate
8020 trace buffer memory.
8021 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8022 handle QTBuffer:size packet.
8023 (cmd_bigqtbuffer_size): New function.
8024 (initialize_tracepoint): Call init_trace_buffer with
8025 DEFAULT_TRACE_BUFFER_SIZE.
8026 * server.c (handle_query): Add QTBuffer:size in the
8027 supported packets.
8028
e64f7499
YQ
80292013-03-07 Yao Qi <yao@codesourcery.com>
8030
8031 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8032 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8033 of -1.
8034 (cmd_qtsp): Adjust condition. Do post increment.
8035 Set cur_action and cur_step_action back to 0.
8036
f0ae6fc3
PA
80372013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8038
8039 PR server/15236
8040 * linux-low.c (linux_write_memory): Return early success if LEN is
8041 zero.
8042
b5b0b0af
CV
80432013-03-05 Corinna Vinschen <vinschen@redhat.de>
8044
334ad4a8 8045 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 8046
589bc927
TT
80472013-02-28 Tom Tromey <tromey@redhat.com>
8048
8049 * configure.ac: Invoke AC_SYS_LARGEFILE.
8050 * configure, config.in: Rebuild.
8051
dfe07582
CV
80522013-02-28 Corinna Vinschen <vinschen@redhat.com>
8053
8054 * win32-low.c: Throughout, fix format strings and casts of
8055 printf-like functions to avoid type related warnings on all
8056 platforms.
8057 (get_child_debug_event): Print dwDebugEventCode as hex since
8058 that's how it's usually documented.
8059
736cd585
YQ
80602013-02-28 Yao Qi <yao@codesourcery.com>
8061
8062 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8063 pulongest.
8064
e1f58301
JW
80652013-02-27 Jiong Wang <jiwang@tilera.com>
8066
8067 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8068 (reg-tilegx32.c): New rule.
8069 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8070 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8071 different register info initializer according to elf class.
8072 (init_registers_tilgx32): New function. The tilegx32 register info
8073 initializer.
8074 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8075 (tile_store_gregset): Likewise.
8076
d171ca78
YQ
80772013-02-27 Yao Qi <yao@codesourcery.com>
8078
8079 * server.c (process_point_options): Print debug message when
8080 debug_threads is true.
8081
282bbdf3
YQ
80822013-02-26 Yao Qi <yao@codesourcery.com>
8083
8084 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8085
aca22551
PA
80862013-02-19 Pedro Alves <palves@redhat.com>
8087 Kai Tietz <ktietz@redhat.com>
8088
8089 PR gdb/15161
8090
8091 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8092 instead of strtoul to extract address from packet.
8093 (process_serial_event) <'z'>: Likewise.
8094
4f3cee1c
YQ
80952013-02-18 Yao Qi <yao@codesourcery.com>
8096
8097 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8098
8e1d55a3
PA
80992013-02-14 Pedro Alves <palves@redhat.com>
8100
8101 Plug memory leak.
8102
8103 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8104 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8105
458820da
PA
81062013-02-14 Pedro Alves <palves@redhat.com>
8107
8108 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8109
baea0dae
PA
81102013-02-14 Pedro Alves <palves@redhat.com>
8111
8112 * tracepoint.c (save_string): Delete.
8113 (add_tracepoint_action): Use savestring instead of save_string.
8114
0b1afbb3
PA
81152013-02-12 Pedro Alves <palves@redhat.com>
8116
8117 * linux-xtensa-low.c: Ditto.
8118 * xtensa-xtregs.c: Ditto.
8119
8a4ac37e
PA
81202013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8121
8122 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8123 thread_db.
8124
148de6bb
MS
81252013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8126
8127 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8128 aarch64_num_wp_regs and aarch64_num_bp_regs to
8129 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8130
55fac6e0
MS
81312013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8132
8133 * linux-aarch64-low.c (ps_get_thread_area): Replace
8134 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8135
176eb98c
MS
81362013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8137 Marcus Shawcroft <marcus.shawcroft@arm.com>
8138 Nigel Stephens <nigel.stephens@arm.com>
8139 Yufeng Zhang <yufeng.zhang@arm.com>
8140
8141 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8142 (aarch64.c, aarch64-without-fpu.c): New targets.
8143 * configure.srv (aarch64*-*-linux*): New.
8144 * linux-aarch64-low.c: New file.
8145
56f7af9c
MS
81462013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8147
43aaf8b6 8148 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
8149 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8150 (dequeue_one_deferred_signal, linux_resume_one_thread)
8151 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8152 (linux_tracefork_grandchild, linux_test_for_tracefork)
8153 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8154 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8155 where the argument is 0.
8156
60f662b0
YQ
81572013-01-25 Yao Qi <yao@codesourcery.com>
8158
8159 * event-loop.c: Include "queue.h".
8160 (gdb_event_p): New typedef.
8161 (struct gdb_event) <next_event>: Remove.
8162 (event_queue): Change to QUEUE(gdb_event_p).
8163 (async_queue_event): Remove.
8164 (gdb_event_xfree): New.
8165 (initialize_event_loop): New.
8166 (process_event): Use API from QUEUE.
8167 (wait_for_event): Likewise.
8168 * server.c (main): Call initialize_event_loop.
8169 * server.h (initialize_event_loop): Declare.
8170
5ae4861a
YQ
81712013-01-18 Yao Qi <yao@codesourcery.com>
8172
8173 * ax.h (struct eval_agent_expr_context): New.
8174 (gdb_eval_agent_expr): Update declaration.
8175 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8176 TFRAME. Add new argument CTX.
8177 * server.h (struct eval_agent_expr_context): Declare.
8178 (agent_mem_read, agent_tsv_read): Update declaration.
8179 (agent_mem_read_string): Likewise.
8180 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8181 (add_traceframe_block): Add new argument TPOINT.
8182 Increase TPOINT->traceframe_usage.
8183 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8184 eval_tracepoint_agent_expr.
8185 (condition_true_at_tracepoint): Likewise.
8186 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8187 (agent_mem_read_string, agent_tsv_read): Likewise.
8188
85e00e85
YQ
81892013-01-16 Yao Qi <yao@codesourcery.com>
8190
8191 * linux-low.c (linux_resume_one_lwp): Don't check
8192 'lwp->bp_reinsert != 0'.
8193
4039cf45
JB
81942013-01-07 Joel Brobecker <brobecker@adacore.com>
8195 Pedro Alves <palves@redhat.com>
8196
8197 * lynx-low.c (ptrace_request_to_str): Define a temporary
8198 macro and use it to simplify this function's implementation.
8199
9044dee2
JB
82002013-01-07 Joel Brobecker <brobecker@adacore.com>
8201
8202 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8203 sets errno.
8204
e6352c8f
JB
82052013-01-07 Joel Brobecker <brobecker@adacore.com>
8206
8207 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8208
50681a27
JB
82092013-01-07 Joel Brobecker <brobecker@adacore.com>
8210
8211 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8212
3f6e77ef
JB
82132013-01-07 Joel Brobecker <brobecker@adacore.com>
8214
8215 * lynx-low.c (lynx_resume): Use the resume_info parameter
8216 to determine the ptid for the lynx_ptrace call, unless
8217 it is equal to minus_one_ptid, in which case we use the
8218 ptid of the current_inferior.
8219 (lynx_wait_1): After having received a thread create/exit
8220 event, resume the inferior's execution using the signaling
8221 thread's ptid, rather than the old ptid.
8222
7fda33ae
JB
82232013-01-07 Joel Brobecker <brobecker@adacore.com>
8224
8225 * lynx-low.c (lynx_resume): Delete variable ret.
8226
b9786c74
JB
82272013-01-01 Joel Brobecker <brobecker@adacore.com>
8228
8229 * gdbreplay.c (gdbreplay_version): Update copyright year.
8230 * server.c (gdbserver_version): Likewise.
8231
8b93d60f
JB
82322012-12-17 Joel Brobecker <brobecker@adacore.com>
8233
8234 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8235 new thread.
8236
037335a7
JB
82372012-12-17 Joel Brobecker <brobecker@adacore.com>
8238
8239 * lynx-low.c (ptrace_request_to_str): Add handling for
8240 PTRACE_GETTRACESIG.
8241
52d4cbd8
JB
82422012-12-17 Joel Brobecker <brobecker@adacore.com>
8243
8244 * lynx-low.c (lynx_attach): Delete variable new_process.
8245
ab8f6ca9
JB
82462012-12-17 Joel Brobecker <brobecker@adacore.com>
8247
8248 * lynx-low.c (lynx_create_inferior): Delete variable
8249 new_process.
8250
78cbc024
JB
82512012-12-17 Joel Brobecker <brobecker@adacore.com>
8252
8253 * lynx-low.c (ptrace_request_to_str): Do not handle
8254 PTRACE_GETTHREADLIST if this macro does not exist.
8255
14a00470
YQ
82562012-12-15 Yao Qi <yao@codesourcery.com>
8257
8258 * Makefile.in (OBS): Add notif.o.
8259 * notif.c, notif.h: New.
8260 * server.c: Include "notif.h".
8261 (struct vstop_notif) <next>: Remove.
8262 <base>: New field.
8263 (queue_stop_reply): Update.
8264 (push_event, send_next_stop_reply): Remove.
8265 (discard_queued_stop_replies): Update.
8266 (notif_stop): New variable.
8267 (handle_v_stopped): Remove.
8268 (handle_v_requests): Don't call handle_v_stopped. Call
8269 handle_ack_notif instead.
8270 (queue_stop_reply_callback): Call notif_event_enque instead
8271 of queue_stop_reply.
8272 (handle_status): Don't call send_next_stop_reply, call
8273 notif_write_event instead.
8274 (kill_inferior_callback): Likewise.
8275 (detach_or_kill_inferior_callback): Likewise.
8276 (main): Call initialize_notif.
8277 (process_serial_event): Call QUEUE_is_empty.
8278 (handle_target_event): Call notif_push instead of push event.
8279 * server.h (push_event): Remove declaration.
8280
61c125b9
TT
82812012-12-10 Tom Tromey <tromey@redhat.com>
8282
8283 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8284 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8285 macros.
8286 (.c.o): Rewrite.
8287 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8288 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8289 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8290 (amd64-linux-ipa.o, ax.o): Rewrite.
8291 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8292 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8293 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8294 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8295 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8296 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8297 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8298 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8299 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8300 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8301 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8302 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8303 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8304 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8305 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8306 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8307 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8308 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8309 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8310 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8311 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8312 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8313 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8314 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8315 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8316 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8317 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8318 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8319 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8320 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8321 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8322 (reg-tilegx.o): Remove.
8323 (all_object_files): New macro.
8324 Include .deps files.
8325 * aclocal.m4, configure: Rebuild.
8326 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8327 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8328 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8329
e90e9ad9
TT
83302012-12-05 Tom Tromey <tromey@redhat.com>
8331
8332 PR gdb/14917:
8333 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8334
02d403bf 83352012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
8336
8337 * configure.ac: Check for linux/perf_event.h.
8338 * config.in: Regenerated.
8339 * configure: Regenerated.
8340
0270a750
PA
83412012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8342
8343 * hostio.c (handle_readlink): Decrease buffer size
8344 parameter passed to readlink by one byte.
8345
8c29b58e
YQ
83462012-11-26 Yao Qi <yao@codesourcery.com>
8347
8348 * configure.ac (build_warnings): Append '-Wempty-body'.
8349 * configure: Regenerated.
8350 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8351 body.
8352
8bdce1ff
PM
83532012-11-15 Pierre Muller <muller@sourceware.org>
8354
8355 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8356 * config.in: Regenerate.
8357 * configure: Regenerate.
8358 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8359 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8360 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8361 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8362 header.
8363 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8364 instead of <sys/wait.h> header.
8365 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8366
02d403bf 83672012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
8368
8369 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8370 (various make rules): Remove -DGDBSERVER
8371
fbd5db48
YQ
83722012-11-09 Yao Qi <yao@codesourcery.com>
8373
8374 * spu-low.c (current_ptid): Move it to ..
8375 * gdbthread.h: ... here. New.
8376 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8377 * server.c (myresume, process_serial_event): Likewise.
8378 * thread-db.c (thread_db_find_new_threads): Likewise.
8379 * tracepoint.c (run_inferior_command): Likewise.
8380
b3dc46ff
AB
83812012-10-01 Andrew Burgess <aburgess@broadcom.com>
8382
8383 * server.c (handle_search_memory_1): Include access length in
8384 warning message.
8385
07c04788
HPN
83862012-09-05 Michael Brandt <michael.brandt@axis.com>
8387
8388 * linux-crisv32-low.c: Fix compile errors.
8389
918d227b
YQ
83902012-09-04 Yao Qi <yao@codesourcery.com>
8391
8392 * tracepoint.c (cmd_qtsv): Adjust debug message.
8393 Don't check CUR_TPOINT.
8394
18c1b81a
YQ
83952012-08-28 Yao Qi <yao@codesourcery.com>
8396
8397 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8398 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8399 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8400 Remove declarations of xmalloc, xreallloc, xstrdup and
8401 freeargv.
8402 * Makefile.in (libiberty_h): New.
8403 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8404 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8405
dc82f37b
YQ
84062012-08-23 Yao Qi <yao@codesourcery.com>
8407
8408 * server.h: Remove declaration of 'xsnprintf'.
8409
406b1477
KS
84102012-08-22 Keith Seitz <keiths@redhat.com>
8411
8412 * server.h: Include build-gnulib-gbserver/config.h.
8413 * gdbreplay.c: Likewise.
8414
e6712ff1
DE
84152012-08-08 Doug Evans <dje@google.com>
8416
8417 * Makefile.in (SFILES): Add gdb_vecs.c.
8418 (OBS): Add gdb_vecs.o.
8419 (gdb_vecs_h, host_defs_h): New variables.
8420 (thread-db.o): Add $(gdb_vecs_h) dependency.
8421 (gdb_vecs.o): New rule.
8422 * thread-db.c: #include "gdb_vecs.h".
8423 (thread_db_load_search): Use a vector to iterate over path elements.
8424 Handle text appearing after "$pdir".
8425
8426 * configure.ac: Add check for strstr.
8427 * config.in: Regenerate.
8428 * configure: Regenerate.
8429
7c3270ae
UW
84302012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8431
8432 * hostio.c (handle_pread): If pread fails, fall back to attempting
8433 lseek/read.
8434 (handle_pwrite): Likewise for pwrite.
8435
b62e2b27
UW
84362012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8437
8438 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8439 between unsupported TYPE and unimplementable ADDR/LEN combination.
8440 (arm_insert_point): Act on new return value.
8441
78a99e91
PA
84422012-07-31 Pedro Alves <palves@redhat.com>
8443
8444 * server.c (process_point_options): Only skip tokens if we find
8445 one that is unrecognized. Don't treat 'X' specially while
8446 skipping unrecognized tokens.
8447
fcf303ab
UW
84482012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8449
8450 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8451 to 4-byte-align HW breakpoint addresses for Thumb.
8452
7255706c
YQ
84532012-07-27 Yao Qi <yao@codesourcery.com>
8454
8455 PR remote/14161.
8456
8457 * server.h: Declare gdb_agent_about_to_close.
8458 * target.c (kill_inferior): Include "agent.h".
8459 New. Send command 'kill'.
8460 * target.h (kill_inferior): Removed macro.
8461 * tracepoint.c (gdb_agent_about_to_close): New.
8462 (gdb_agent_helper_thread): Handle command 'close'.
8463 Wait endlessly until the inferior stops.
8464 Install gdb_agent_remove_socket to atexit hook.
8465 (agent_socket_name): New static variable.
8466 (gdb_agent_socket_init): Replace local variable 'name' with
8467 'agent_socket_name'.
8468 (gdb_agent_remove_socket): New.
8469
5a3f286f
YQ
84702012-07-27 Yao Qi <yao@codesourcery.com>
8471
8472 * server.c (process_point_options): Stop at 'X' when parsing.
8473
961bd387
ME
84742012-07-19 Michael Eager <eager@eagercon.com>
8475
a261b8f5 8476 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
8477 to hw_execute.
8478 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8479 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8480 hardware breakpoint.
8481
aa7c7447
JK
84822012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8483
8484 * gdbserver/linux-low.c (initialize_low): Call
8485 linux_ptrace_init_warnings.
8486
7f216e7c
DE
84872012-07-02 Doug Evans <dje@google.com>
8488
8489 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8490 pointer to int.
8491
d3ce09f5
SS
84922012-07-02 Stan Shebs <stan@codesourcery.com>
8493
8494 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8495 (ax.o): Add it to build rule.
8496 (ax-ipa.o): Ditto.
8497 (OBS): Add format.o.
8498 (IPA_OBS): Add format.o.
8499 * server.c (handle_query): Claim support for breakpoint commands.
8500 (process_point_options): Add command case.
8501 (process_serial_event): Leave running if there are printfs in
8502 effect.
8503 * mem-break.h (any_persistent_commands): Declare.
8504 (add_breakpoint_commands): Declare.
8505 (gdb_no_commands_at_breakpoint): Declare.
8506 (run_breakpoint_commands): Declare.
8507 * mem-break.c (struct point_command_list): New struct.
8508 (struct breakpoint): New field command_list.
8509 (any_persistent_commands): New function.
8510 (add_commands_to_breakpoint): New function.
8511 (add_breakpoint_commands): New function.
8512 (gdb_no_commands_at_breakpoint): New function.
8513 (run_breakpoint_commands): New function.
8514 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8515 locally.
8516 * ax.c: Include format.h.
8517 (ax_printf): New function.
8518 (gdb_eval_agent_expr): Add printf opcode.
8519
2f8f6aed
YQ
85202012-06-13 Yao Qi <yao@codesourcery.com>
8521
8522 * server.c (start_inferior): Remove duplicated writes to fields
8523 'last_resume_kind' and 'last_status' of 'current_inferior'.
8524
0c9070b3
YQ
85252012-06-12 Yao Qi <yao@codesourcery.com>
8526 Pedro Alves <palves@redhat.com>
8527
8528 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8529 comment.
8530 * server.c (handle_v_cont): Extend comment.
8531
c52daf70
YQ
85322012-06-11 Yao Qi <yao@codesourcery.com>
8533
8534 * linux-low.c (linux_attach): Add 'static'.
8535
d38bbb0a
YQ
85362012-06-06 Yao Qi <yao@codesourcery.com>
8537
8538 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8539
89dc0afd
JK
85402012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8541
8542 Fix gcc -flto compilation warning.
8543 * server.c (main): Make variable multi_mode and attach volatile.
8544
75f62ce7
TJB
85452012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8546
8547 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8548 if the platform doesn't know about it.
8549
65f479b6
PA
85502012-05-30 Jeff Kenton <jkenton@tilera.com>
8551
8552 * Makefile.in (SFILES): Add linux-tile-low.c.
8553 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8554 * configure.srv: Handle tilegx-*-linux*.
8555 * linux-tile-low.c: New file.
8556
0c5bf5a9
JK
85572012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8558
8559 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8560
a493e3e2
PA
85612012-05-24 Pedro Alves <palves@redhat.com>
8562
8563 PR gdb/7205
8564
43aaf8b6 8565 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 8566
2ea28649
PA
85672012-05-24 Pedro Alves <palves@redhat.com>
8568
8569 PR gdb/7205
8570
8571 Replace target_signal with gdb_signal throughout.
8572
8d409d16
MR
85732012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8574
8575 * linux-low.c (linux_store_registers): Avoid the copying sequence
8576 when no data has been retrieved by ptrace.
8577
23512c01
MGD
85782012-05-22 Will Deacon <will.deacon@arm.com>
8579
8580 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8581 Include asm/ptrace.h.
8582 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8583 already defined.
8584
4934b29e
MR
85852012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8586
8587 * linux-low.c (linux_store_registers): Don't re-retrieve data
8588 with ptrace that has already been obtained from /proc. Always
8589 copy any data retrieved with ptrace to the buffer supplied.
8590
bde24c0a
PA
85912012-05-11 Yao Qi <yao@codesourcery.com>
8592 Pedro Alves <palves@redhat.com>
8593
8594 * linux-low.c (enum stopping_threads_kind): New.
8595 (stopping_threads): Change type to `enum stopping_threads_kind'.
8596 (handle_extended_wait): If stopping and suspending threads, leave
8597 the new_lwp suspended too.
8598 (linux_wait_for_event): Adjust.
8599 (stop_all_lwps): Set `stopping_threads' to
8600 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8601 whether we're suspending threads or just stopping them. Assert no
8602 recursion happens.
8603
623b6bdf
YQ
86042012-04-29 Yao Qi <yao@codesourcery.com>
8605
8606 * server.h: Move some code to ...
8607 * gdbthread.h: ... here. New.
8608 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8609 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8610 (nto-low.o, win32-low.o): Likewise.
8611 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8612 * regcache.c, remote-utils.c, server.c: Likewise.
8613 * target.c, tracepoint.c, win32-low.c: Likewise.
8614
f15f9948
TJB
86152012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8616
8617 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8618 (PTRACE_ARG4_TYPE): Likewise.
8619 (PTRACE_XFER_TYPE): Likewise.
8620 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8621 ptrace to PTRACE_ARG3_TYPE.
8622 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8623 (PTRACE_ARG4_TYPE): Likewise.
8624 (PTRACE_XFER_TYPE): Likewise.
8625 (linux_detach_one_lwp): Cast fourth argument of
8626 ptrace to long then PTRACE_ARG4_TYPE.
8627 (regsets_fetch_inferior_registers): Cast third argument of
8628 ptrace to long then PTRACE_ARG3_TYPE.
8629 (regsets_store_inferior_registers): Likewise.
8630
38ea300a
PA
86312012-04-20 Pedro Alves <palves@redhat.com>
8632
8633 * configure: Regenerate.
8634
c971b7fa
PA
86352012-04-19 Pedro Alves <palves@redhat.com>
8636
43aaf8b6 8637 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 8638 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
8639 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8640 (all, install-only, uninstall, clean-info, all-lib, clean): No
8641 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8642 (maintainer-clean realclean distclean): Use subdir_do.
8643 (subdir_do): New.
8644 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 8645 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
8646 * acinclude.m4: Include acx_configure_dir.m4.
8647 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8648 calls. Call AC_PROG_RANLIB. Configure gnulib using
8649 ACX_CONFIGURE_DIR.
8650 (GNULIB): New.
8651 (GNULIB_STDINT_H): Adjust.
8652 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8653 * gdbreplay.c: Include build-gnulib/config.h.
8654 * server.h: Likewise.
8655 * aclocal.m4: Regenerate.
8656 * config.in: Regenerate.
8657 * configure: Regenerate.
c971b7fa 8658
809277f8
PA
86592012-04-19 Pedro Alves <palves@redhat.com>
8660
8661 * Makefile.in (LIBGNU, INCGNU): Adjust.
8662 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8663 (all, install-only, uninstall, clean-info, all-lib, clean)
8664 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8665 * configure.ac: Adjust AC_OUTPUT output.
8666 * aclocal.m4: Regenerate.
8667 * configure: Regenerate.
8668
fd9bb8b8
PA
86692012-04-19 Pedro Alves <palves@redhat.com>
8670
8671 * Makefile.in (generated_files): New.
8672 (server_h): Remove the explicit dependency on config.h, and depend
8673 on $generated_files.
8674
1c298c66
PA
86752012-04-19 Pedro Alves <palves@redhat.com>
8676
8677 * Makefile.in (INCGNU): Add -Ignulib.
8678
57c4b50b
PA
86792012-04-19 Pedro Alves <palves@redhat.com>
8680
8681 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8682 (INCGNU): ... this, and spell out -I here.
8683 (GNULIB_LIB): Rename to ...
8684 (LIBGNU): ... this.
8685 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8686
1030e047
PA
86872012-04-19 Pedro Alves <palves@redhat.com>
8688
8689 * config.in: Regenerate.
8690
447d4319
PA
86912012-04-19 Pedro Alves <palves@redhat.com>
8692
8693 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8694 * server.h (memmem): Remove declaration.
8695 * config.in: Regenerate.
8696 * configure: Regenerate.
8697
aad9eab9
YQ
86982012-04-19 Yao Qi <yao@codesourcery.com>
8699
8700 * Makefile.in (SFILES): Add common/vec.c.
8701 (OBS): Add vec.o.
8702 (vec.o): New rule.
8703
3e10640f
YQ
87042012-04-19 Yao Qi <yao@codesourcery.com>
8705
8706 * remote-utils.c (prepare_resume_reply): Replace with macro
8707 target_core_of_thread.
8708 * server.c (handle_qxfer_threads_proper): Likewise.
8709 * target.h (traget_core_of_thread): New macro.
8710
71622373
PA
87112012-04-18 Pedro Alves <palves@redhat.com>
8712
8713 * aclocal.m4: Regenerate.
8714 * configure: Regenerate.
8715
80d26939
YQ
87162012-04-16 Yao Qi <yao@codesourcery.com>
8717
8718 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8719 duplicated on address.
8720
42476b70
YQ
87212012-04-16 Yao Qi <yao@codesourcery.com>
8722
8723 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8724 (struct tracepoint_action_ops) <send>: New field.
8725 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8726 (agent_expr_send, x_tracepoint_action_send): New.
8727 (l_tracepoint_action_send): New.
8728 (cmd_qtdp): Download and install tracepoint
8729 according to `use_agent'.
8730 (run_inferior_command): Add one more parameter `len'.
8731 Update callers.
8732 (tracepoint_send_agent): New.
8733 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8734
7bc83639
YQ
87352012-04-16 Yao Qi <yao@codesourcery.com>
8736
8737 * tracepoint.c (download_tracepoints): Moved to ...
8738 (cmd_qtstart): ... here.
8739
5f18041e
YQ
87402012-04-14 Yao Qi <yao@codesourcery.com>
8741
8742 * tracepoint.c: Include inttypes.h.
8743 (struct collect_memory_action): Use sized types.
8744 (struct tracepoint): Likewise.
8745 (cmd_qtdp, stop_tracing): Update print specifiers.
8746 (cmd_qtp, response_tracepoint): Likewise.
8747 (collect_data_at_tracepoint): Likewise.
8748 (collect_data_at_step): Likewise.
8749
55a8c076
YQ
87502012-04-14 Yao Qi <yao@codesourcery.com>
8751
8752 Import gnulib module inttypes.
8753 * aclocal.m4, config.in, configure: Regenerated.
8754
dc750257
YQ
87552012-04-14 Yao Qi <yao@codesourcery.com>
8756
8757 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8758 Makefile and config.status at last.
8759
0ab5faf9
YQ
87602012-04-13 Yao Qi <yao@codesourcery.com>
8761
8762 * tracepoint.c: Include stdint.h unconditionally.
8763
18f5fd81
TJB
87642012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8765
8766 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8767 on BFD_HAVE_SYS_PROCFS_TYPE.
8768 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8769 * configure: Regenerate.
8770 * config.in: Likewise.
8771
4d47af5c
L
87722012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8773
8774 * Makefile.in (clean): Also remove x32.c x32-linux.c
8775 x32-avx.c x32-avx-linux.c.
8776 (x32.o): New target.
8777 (x32.c): Likewise.
8778 (x32-linux.o): Likewise.
8779 (x32-linux.c): Likewise.
8780 (x32-avx.o): Likewise.
8781 (x32-avx.c): Likewise.
8782 (x32-avx-linux.o): Likewise.
8783 (x32-avx-linux.c): Likewise.
8784
8785 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8786 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8787 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8788 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8789 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8790 i386/x32-avx-linux.xml.
8791
8792 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8793 (init_registers_x32_avx_linux): Likwise.
8794 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8795 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8796
ecedbe58
PA
87972012-04-13 Pedro Alves <palves@redhat.com>
8798
8799 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8800 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8801 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8802 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8803 the sub-make.
8804
c92b5177
L
88052012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8806
8807 * linux-x86-low.c (compat_x32_clock_t): New.
8808 (compat_x32_siginfo_t): Likewise.
8809 (compat_x32_siginfo_from_siginfo): Likewise.
8810 (siginfo_from_compat_x32_siginfo): Likewise.
8811 (linux_is_elf64): Likewise.
8812 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8813 and siginfo_from_compat_x32_siginfo for x32.
8814 (x86_arch_setup): Set linux_is_elf64.
8815
214d508e
L
88162012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8817
8818 PR gdb/13969
8819 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8820 e_machine field.
8821 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8822 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8823 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8824 compatible with process.
8825
c9a1864a
YQ
88262012-04-12 Yao Qi <yao@codesourcery.com>
8827
8828 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8829 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8830 (install-only, install-info, clean): Handle sub dir gnulib.
8831 (all-lib, am--refresh): New targets.
8832 (memmem.o): Remove target.
8833 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8834 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8835 (AC_REPLACE_FUNCS): Remove memmem.
8836 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8837 (AC_OUTPUT): Generate Makefile in gnulib/.
8838 * aclocal.m4, config.in, configure: Regenerated.
8839
367ba2c2
MR
88402012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8841
8842 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8843
9d236627
PA
88442012-04-05 Pedro Alves <palves@redhat.com>
8845
8846 -Werror=strict-aliasing
8847
8848 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8849 pointer.
8850
111217b3
PA
88512012-04-04 Pedro Alves <palves@redhat.com>
8852
8853 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8854 (sparc_store_gregset_from_stack, sparc_store_gregset)
8855 (sparc_breakpoint_at): Fix formatting.
8856
8365dcf5
TJB
88572012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8858
8859 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8860 are available.
8861 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8862 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8863 * config.in: Regenerate.
8864 * configure: Likewise.
8865
689cc2ae
PA
88662012-03-29 Pedro Alves <palves@redhat.com>
8867
8868 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8869 Correct ptrace arguments.
8870
c14dfd32
PA
88712012-03-28 Pedro Alves <palves@redhat.com>
8872
8873 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8874 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8875 (IA64_FR1_REGNUM): New defines.
8876 (ia64_fetch_register): New.
8877 (the_low_target): Install it.
8878 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8879 field.
8880 * linux-low.c (linux_fetch_registers): Try the
8881 the_low_target.fetch_register hook first.
8882
8883 * linux-arm-low.c (the_low_target): Adjust.
8884 * linux-bfin-low.c (the_low_target): Adjust.
8885 * linux-cris-low.c (the_low_target): Adjust.
8886 * linux-crisv32-low.c (the_low_target): Adjust.
8887 * linux-m32r-low.c (the_low_target): Adjust.
8888 * linux-m68k-low.c (the_low_target): Adjust.
8889 * linux-mips-low.c (the_low_target): Adjust.
8890 * linux-ppc-low.c (the_low_target): Adjust.
8891 * linux-s390-low.c (the_low_target): Adjust.
8892 * linux-sh-low.c (the_low_target): Adjust.
8893 * linux-sparc-low.c (the_low_target): Adjust.
8894 * linux-tic6x-low.c (the_low_target): Adjust.
8895 * linux-x86-low.c (the_low_target): Adjust.
8896 * linux-xtensa-low.c (the_low_target): Adjust.
8897
63c88e13
PA
88982012-03-26 Pedro Alves <palves@redhat.com>
8899
8900 * server.c (handle_qxfer_libraries): Don't bail early if
8901 the_target->qxfer_libraries_svr4 is not NULL.
8902
fb723180
PA
89032012-03-26 Pedro Alves <palves@redhat.com>
8904
8905 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8906
0afae3cf
PA
89072012-03-23 Pedro Alves <palves@redhat.com>
8908
8909 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8910 "library-list-svr4" element's start tag when the the DSO list is
8911 empty.
8912
485f1ee4
PA
89132012-03-23 Pedro Alves <palves@redhat.com>
8914
8915 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8916 a variable whose type size is the same as the inferior's pointer
8917 size.
8918
a5362b9a
TS
89192012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8920
8921 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8922 struct siginfo.
8923 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8924 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8925 * linux-low.h: Include <signal.h>.
8926 (struct siginfo): Remove forward declaration.
8927 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8928 struct siginfo.
8929
d226c142
MF
89302012-03-21 Mike Frysinger <vapier@gentoo.org>
8931
8932 * .gitignore: Ignore more files.
8933
122f36ef
PA
89342012-03-19 Pedro Alves <palves@redhat.com>
8935 Jan Kratochvil <jan.kratochvil@redhat.com>
8936
8937 * server.c (cont_thread, general_thread): Add describing comments.
8938 (start_inferior): Clear `cont_thread'.
8939 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8940 of a process.
8941
fc3e5175
YQ
89422012-03-15 Yao Qi <yao@codesourcery.com>
8943
8944 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8945 handling to ...
8946 (cmd_qtdp): ... here.
8947
8d0d92cd
YQ
89482012-03-15 Yao Qi <yao@codesourcery.com>
8949
8950 * tracepoint.c (struct tracepoint_action_ops): New.
8951 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8952 (m_tracepoint_action_download): New.
8953 (r_tracepoint_action_download): New.
8954 (x_tracepoint_action_download): New.
8955 (l_tracepoint_action_download): New.
8956 (add_tracepoint_action): Install `action->ops' according type.
8957 (download_tracepoint_1): Move code `download' function pointer
8958 of various tracepoint_action_ops.
8959
87b0bb13
JK
89602012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8961
8962 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8963 linux_ptrace_attach_warnings.
8964
5f572dec
JK
89652012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8966
8967 * Makefile.in (linux-ptrace.o): New.
8968 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8969 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8970 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8971 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8972 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8973 of these targets.
8974 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8975
f4647387
YQ
89762012-03-08 Yao Qi <yao@codesourcery.com>
8977 Pedro Alves <palves@redhat.com>
8978
8979 Fix PR server/13392.
8980 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8981 offset of JMP insn.
8982 * tracepoint.c (remove_tracepoint): New.
8983 (cmd_qtdp): Call remove_tracepoint when failed to install.
8984
9b224c5e
PA
89852012-03-07 Pedro Alves <palves@redhat.com>
8986
8987 * linux-low.c (get_detach_signal): New.
8988 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8989 Pass on pending signals to PTRACE_DETACH. Check the result of the
8990 ptrace call.
8991 * server.c (program_signals, program_signals_p): New.
8992 (handle_general_set): Handle QProgramSignals.
8993 * server.h (program_signals, program_signals_p): Declare.
8994
e237a7e2
JK
89952012-03-05 Pedro Alves <palves@redhat.com>
8996 Jan Kratochvil <jan.kratochvil@redhat.com>
8997
8998 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8999 New comment why.
9000
5808517f
YQ
90012012-03-03 Yao Qi <yao@codesourcery.com>
9002
9003 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9004 agent_look_up_symbols.
9005
58b4daa5
YQ
90062012-03-03 Yao Qi <yao@codesourcery.com>
9007
9008 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9009 (linux-x86-low.o): Likewise.
9010 * server.h: Remove in_process_agent_loaded.
9011 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9012 common/agent.c.
9013 Update callers.
9014
8ffcbaaf
YQ
90152012-03-03 Yao Qi <yao@codesourcery.com>
9016
9017 * tracepoint.c (gdb_agent_capability): New global.
9018 (in_process_agent_loaded_ust): Renamed to
9019 `in_process_agent_supports_ust'.
9020 Update callers.
9021 (in_process_agent_supports_ust): Call agent_capability_check.
9022 (clear_installed_tracepoints): Assert that agent supports
9023 agent.
9024
d1feda86
YQ
90252012-03-03 Yao Qi <yao@codesourcery.com>
9026
9027 * linux-low.c (linux_supports_agent): New.
9028 (linux_target_ops): Initialize field `supports_agent' with
9029 linux_supports_agent.
9030 * target.h (struct target_ops) <supports_agent>: New.
9031 (target_supports_agent): New macro.
9032 * server.c (handle_general_set): Handle packet 'QAgent'.
9033 (handle_query): Send `QAgent+'.
9034 * Makefile.in (server.o): Depends on agent.h.
9035
2fa291ac
YQ
90362012-03-03 Yao Qi <yao@codesourcery.com>
9037
9038 * Makefile.in (OBS): Add agent.o.
9039 Add new rule for agent.o.
9040 Track dependence of tracepoint.c on agent.h.
9041 * tracepoint.c (run_inferior_command_1):
9042 (run_inferior_command): Call agent_run_command.
9043 (gdb_ust_connect_sync_socket): Deleted. Move it to
9044 common/agent.c.
9045 (resume_thread, stop_thread): Likewise.
9046 (gdb_ust_socket_init): Renamed to ...
9047 (gdb_agent_socket_init): ... New.
9048 (gdb_ust_thread): Renamed to ...
9049 (gdb_agent_helper_thread): ... New.
9050 (gdb_ust_init): Move some code to ...
9051 (gdb_agent_init): ... here. New.
9052 [HAVE_UST]: Call gdb_ust_init.
9053 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9054 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9055 * config.in, configure: Regenerated.
9056
05044653
PA
90572012-03-02 Pedro Alves <palves@redhat.com>
9058
9059 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9060 * linux-low.c (struct simple_pid_list): New.
9061 (stopped_pids): New a struct simple_pid_list pointer.
9062 (add_to_pid_list, pull_pid_from_list): New.
9063 (handle_extended_wait): Don't assume the first signal new children
9064 report is SIGSTOP. Adjust call to pull_pid_from_list.
9065 (linux_wait_for_lwp): Adjust.
9066
8d00225b
YQ
90672012-03-02 Yao Qi <yao@codesourcery.com>
9068
9069 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9070 debug log.
9071
19560ba5
YQ
90722012-03-02 Yao Qi <yao@codesourcery.com>
9073
9074 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9075 `stop_pc' and `tpoint'. Update caller.
9076
1faeff08
MR
90772012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9078
9079 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9080 * linux-low.c (use_linux_regsets): New macro.
9081 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9082 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9083 (linux_register_in_regsets): New function.
9084 (usr_fetch_inferior_registers): Skip registers covered by
9085 regsets.
9086 (usr_store_inferior_registers): Likewise.
9087 (usr_fetch_inferior_registers): New macro.
9088 (usr_store_inferior_registers): Likewise.
9089 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9090 (linux_store_registers): Likewise.
9091 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9092 prototype.
9093 (init_registers_mips64_dsp_linux): Likewise.
9094 (init_registers_mips_linux): New macro.
9095 (init_registers_mips_dsp_linux): Likewise.
9096 (mips_dsp_num_regs): Likewise.
9097 (DSP_BASE, DSP_CONTROL): New fallback macros.
9098 (mips_base_regs): New macro.
9099 (mips_regmap): Use it. Fix the size.
9100 (mips_dsp_regmap): New variable.
9101 (mips_dsp_regset_bitmap): Likewise.
9102 (mips_arch_setup): New function.
9103 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9104 than mips_regmap.
9105 (mips_cannot_store_register): Likewise.
9106 (the_low_target): Update .arch_setup, .num_regs and .regmap
9107 initializers. Add .regset_bitmap initializer.
9108 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9109 initializer.
9110 * linux-bfin-low.c (the_low_target): Likewise.
9111 * linux-cris-low.c (the_low_target): Likewise.
9112 * linux-crisv32-low.c (the_low_target): Likewise.
9113 * linux-ia64-low.c (the_low_target): Likewise.
9114 * linux-m32r-low.c (the_low_target): Likewise.
9115 * linux-m68k-low.c (the_low_target): Likewise.
9116 * linux-ppc-low.c (the_low_target): Likewise.
9117 * linux-s390-low.c (the_low_target): Likewise.
9118 * linux-sh-low.c (the_low_target): Likewise.
9119 * linux-sparc-low.c (the_low_target): Likewise.
9120 * linux-tic6x-low.c (the_low_target): Likewise.
9121 * linux-x86-low.c (the_low_target): Likewise.
9122 * linux-xtensa-low.c (the_low_target): Likewise.
9123 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9124 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9125 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9126 srv_xmlfiles.
9127 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9128 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9129
c03e6ccc
YQ
91302012-02-29 Yao Qi <yao@codesourcery.com>
9131 Pedro Alves <palves@redhat.com>
9132
9133 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9134 `step_over_finished' is true.
9135
644cebc9
PA
91362012-02-27 Pedro Alves <palves@redhat.com>
9137
9138 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9139 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9140
c14d7ab2
PA
91412012-02-27 Pedro Alves <palves@redhat.com>
9142
9143 PR server/9684
9144 * linux-low.c (pid_is_stopped): New.
9145 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9146
412c89dd
LM
91472012-02-25 Luis Machado <lgustavo@codesourcery.com>
9148
9149 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9150 of conditions.
9151
b745defe
MR
91522012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9153
9154 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9155
9f3a5c85
LM
91562012-02-24 Luis Machado <lgustavo@codesourcery>
9157
9158 * server.c (handle_query): Advertise support for target-side
9159 breakpoint condition evaluation.
9160 (process_point_options): New function.
9161 (process_serial_event): When inserting a breakpoint, check for
9162 a target-side condition that should be evaluated.
9163
9164 * mem-break.c: Include regcache.h and ax.h.
9165 (point_cond_list_t): New data structure.
9166 (breakpoint) <cond_list>: New field.
9167 (find_gdb_breakpoint_at): Make non-static.
9168 (delete_gdb_breakpoint_at): Clear any target-side
9169 conditions.
9170 (clear_gdb_breakpoint_conditions): New function.
9171 (add_condition_to_breakpoint): Likewise.
9172 (add_breakpoint_condition): Likewise.
9173 (gdb_condition_true_at_breakpoint): Likewise.
9174 (gdb_breakpoint_here): Return result directly instead
9175 of going through a local variable.
9176
9177 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9178 (clear_gdb_breakpoint_conditions): Likewise.
9179 (add_breakpoint_condition): Likewise.
9180 (gdb_condition_true_at_breakpoint): Likewise.
9181
9182 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9183 (need_step_over_p): Take target-side breakpoint condition into
9184 consideration.
9185
5e1dc496
LM
91862012-02-24 Luis Machado <lgustavo@codesourcery>
9187
9188 * server.h: Include tracepoint.h.
9189 (agent_mem_read, agent_get_trace_state_variable_value,
9190 agent_set_trace_state_variable_value,
9191 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9192 get_set_tsv_func_addr): New prototypes.
9193
9194 * ax.h: New include file.
9195 * ax.c: New source file.
9196
9197 * tracepoint.c: Include ax.h.
9198 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9199 agent_expr, eval_result_type): Move to ax.h.
9200 (parse_agent_expr): Rename to ...
9201 (gdb_parse_agent_expr): ... this, make it non-static and move
9202 to ax.h.
9203 (unparse_agent_expr) Rename to ...
9204 (gdb_unparse_agent_expr): ... this, make it non-static and move
9205 to ax.h.
9206 (eval_agent_expr): Rename to ...
9207 (eval_tracepoint_agent_expr): ... this.
9208 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9209 forward declarations.
9210 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9211 (agent_get_trace_state_variable_value): New function.
9212 (agent_set_trace_state_variable_value): New function.
9213 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9214 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9215 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9216 (condition_true_at_tracepoint): Likewise.
9217 (parse_agent_expr): Rename to ...
9218 (gdb_parse_agent_expr): ... this and move to ax.c.
9219 (unparse_agent_expr): Rename to ...
9220 (gdb_unparse_agent_expr): ... this and move to ax.c.
9221 (gdb_agent_op_name): Move to ax.c.
9222 (eval_agent_expr): Rename to ...
9223 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9224 and move to ax.c.
9225 (eval_tracepoint_agent_expr): New function.
9226 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 9227 non-static.
5e1dc496
LM
9228 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9229 ax.c.
9230 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9231 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9232 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9233 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9234 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9235 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9236 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9237 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9238 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9239 (compile_bytecodes): Remove forward declaration.
9240 (is_goto_target): Move to ax.c.
9241 (compile_bytecodes): Move to ax.c and call
9242 agent_get_trace_state_variable_value (...) and
9243 agent_set_trace_state_variable_value (...).
9244
9245 * Makefile.in: Update ax.c and IPA dependencies.
9246
277e4e52
PA
92472012-02-24 Pedro Alves <palves@redhat.com>
9248
9249 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9250 (cmd_bigqtbuffer_circular): ... this. Only handle
9251 'QTBuffer:circular:'.
9252 (handle_tracepoint_general_set): Adjust.
9253
bf4c19f7
YQ
92542012-02-16 Yao Qi <yao@codesourcery.com>
9255
9256 * inferiors.c: Move code to ...
9257 * dll.c: .... here. New.
9258 * server.h: Declare clear_dlls.
9259 * Makefile.in (SFILES): Add dll.c.
9260 (OBS): Add dll.o
9261 (dll.o): New rule.
9262
d73f2619
YQ
92632012-02-11 Yao Qi <yao@codesourcery.com>
9264
9265 * server.c: (handle_monitor_command): Add a new parameter
9266 `own_buf'.
9267 (handle_query): Update caller.
9268
f8255c2a
JB
92692012-02-09 Joel Brobecker <brobecker@adacore.com>
9270
9271 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9272 * configure, config.in: Regenerate.
9273 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9274 is not defined.
9275
da84f473
PA
92762012-02-02 Pedro Alves <palves@redhat.com>
9277
9278 Try SIGKILL first, then PTRACE_KILL.
9279 * linux-low.c (linux_kill_one_lwp): New.
9280 (linux_kill_one_lwp): Rename to ...
9281 (kill_one_lwp_callback): ... this. Use the new
9282 linux_kill_one_lwp.
9283
e886a173
PA
92842012-02-02 Pedro Alves <palves@redhat.com>
9285
9286 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9287 inferior.
9288
be07f1a2
PA
92892012-01-27 Pedro Alves <palves@redhat.com>
9290
9291 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9292 (elf_64_file_p): Make static.
9293 (linux_pid_exe_is_elf_64_file): New.
9294 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9295 Delete declarations.
9296 (linux_pid_exe_is_elf_64_file): Declare.
9297 * linux-x86-low.c (x86_arch_setup): Use
9298 linux_pid_exe_is_elf_64_file.
9299
d8301ad1
JK
93002012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9301
9302 * linux-low.c (linux_wait_for_event_1): Rename to ...
9303 (linux_wait_for_event): ... here and merge it with former
9304 linux_wait_for_event - new variable wait_ptid, use it.
9305 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9306
01b17894
PA
93072012-01-23 Pedro Alves <palves@redhat.com>
9308
9309 * server.c (main): Avoid yet another case of infinite loop while
9310 detaching/killing after a longjmp.
9311
e825046f
JK
93122012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9313
9314 Code cleanup.
9315 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9316
b9e7b9c3
UW
93172012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9318
9319 * hostio.c (handle_readlink): New function.
9320 (handle_vFile): Call it to handle "vFile:readlink" packets.
9321
901f9912
UW
93222012-01-20 Pedro Alves <palves@redhat.com>
9323 Ulrich Weigand <ulrich.weigand@linaro.org>
9324
9325 * server.c (handle_v_requests): Only support vAttach and vRun to
9326 start multiple processes when in extended protocol mode.
9327
fc1ab1a0
PA
93282012-01-17 Pedro Alves <palves@redhat.com>
9329
9330 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9331 memalign plus mprotect to allocate the scratch buffer.
9332
7d5d4e98
PA
93332012-01-13 Pedro Alves <palves@redhat.com>
9334
9335 * server.c (attach_inferior): Clear `cont_thread'.
9336
f128d5e9
PA
93372012-01-13 Pedro Alves <palves@redhat.com>
9338
9339 * server.c (main): Avoid infinite loop while detaching/killing
9340 after a longjmp.
9341
06db92f0
DE
93422012-01-09 Doug Evans <dje@google.com>
9343
9344 * server.c (start_inferior): Set last_ptid in --wrapper case.
9345
32d92999
YQ
93462012-01-06 Yao Qi <yao@codesourcery.com>
9347
9348 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9349 defined.
9350 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9351
5e0a92a9
YQ
93522012-01-04 Yao Qi <yao@codesourcery.com>
9353
9354 * tracepoint.c (cmd_qtdp): Print debug message
9355 for static tracepoint.
9356
ae639e8c
YQ
93572012-01-04 Yao Qi <yao@codesourcery.com>
9358
9359 * tracepoint.c (trace_vdebug): Differentiate debug message
9360 between gdbserver and IPA.
9361
f72429c5
YQ
93622012-01-03 Yao Qi <yao@codesourcery.com>
9363
9364 * tracepoint.c (tracepoint_was_hit): Don't collect for
9365 static tracepoint.
9366
12c3e59c
JB
93672012-01-02 Joel Brobecker <brobecker@adacore.com>
9368
9369 * terminal.h: Reformat copyright header.
9370
67827812
JB
93712012-01-02 Joel Brobecker <brobecker@adacore.com>
9372
9373 * server.c (gdbserver_version): Update copyright year.
9374 * gdbreplay.c (gdbreplay_version): Likewise.
9375
3e52c33d
JK
93762011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9377
9378 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9379
9380 Revert:
9381 2011-12-18 Hui Zhu <teawater@gmail.com>
9382 * linux-low.c (linux_create_inferior): Save return value to ret.
9383
66f1260e
HZ
93842011-12-18 Hui Zhu <teawater@gmail.com>
9385
9386 * linux-low.c (linux_create_inferior): Save return value to ret.
9387
e77616d7
DE
93882011-12-16 Doug Evans <dje@google.com>
9389
e7b06c57
DE
9390 * linux-low.c (linux_create_inferior): If stdio connection,
9391 redirect stdin from /dev/null, stdout to stderr.
9392 * remote-utils.c (remote_is_stdio): New static global.
9393 (remote_connection_is_stdio): New function.
9394 (remote_prepare): Handle stdio connection.
9395 (remote_open): Ditto.
9396 (remote_close): Don't close stdin for stdio connections.
9397 (read_prim,write_prim): New functions. Replace all calls to
9398 read/write to these.
9399 * server.c (main): Watch for "-" argument. Move call to
9400 remote_prepare before start_inferior.
9401 * server.h (STDIO_CONNECTION_NAME): New macro.
9402 (remote_connection_is_stdio): Declare.
9403
e77616d7
DE
9404 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9405 in debugging output.
9406
82067193
YQ
94072011-12-15 Yao Qi <yao@codesourcery.com>
9408
9409 * tracepoint.c: Include sys/syscall.h.
9410 (gdb_ust_thread): Remove preprocessor conditional.
9411
82bfbe7e
PA
94122011-12-14 Pedro Alves <pedro@codesourcery.com>
9413
9414 * linux-low.c (linux_detach_one_lwp): Call
9415 the_low_target.prepare_to_resume before detaching.
9416
712c6575
YQ
94172011-12-14 Yao Qi <yao@codesourcery.com>
9418
9419 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9420 of write.
9421
d54d1edf
YQ
94222011-12-14 Yao Qi <yao@codesourcery.com>
9423
9424 * i386-low.c (i386_low_stopped_data_address): Initialize local
9425 variable `control'.
9426
6210a125
PA
94272011-12-13 Pedro Alves <pedro@codesourcery.com>
9428
9429 PR remote/13492
9430
9431 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9432 DR_CONTROL unless necessary. Extend comments.
9433 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9434 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9435
2ece8244
YQ
94362011-12-13 Yao Qi <yao@codesourcery.com>
9437
9438 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9439 macros.
9440 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9441
784867a5
JK
94422011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9443
9444 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9445 Print new debug message for such case.
9446
6bf36717
JK
94472011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9448
9449 Fix overlapping memcpy.
9450 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9451 the read_inferior_memory transfer.
9452 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9453 write_inferior_memory transfer.
9454 (set_fast_tracepoint_jump): New variable buf. Use it for the
9455 read_inferior_memory and write_inferior_memory transfers.
9456 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9457 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9458 Use it for the write_inferior_memory transfer.
9459 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9460 buffers.
9461
50275556
MR
94622011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9463
9464 * linux-low.c (fetch_register, store_register): Make code
9465 consistent, fix formatting.
9466
7325beb4
MR
94672011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9468
9469 * linux-low.c (usr_store_inferior_registers): Factor out code
9470 to handle individual registers into...
9471 (store_register): ... this new function.
9472
c642a434
UW
94732011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9474
9475 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9476 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9477 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9478 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9479 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9480 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9481 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9482 (srv_xmlfiles): Add new XML files.
9483
9484 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9485 and <sys/uio.h>.
9486 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9487 (init_registers_s390_linux32v1): Add prototype.
9488 (init_registers_s390_linux32v2): Likewise.
9489 (init_registers_s390_linux64v1): Likewise.
9490 (init_registers_s390_linux64v2): Likewise.
9491 (init_registers_s390x_linux64v1): Likewise.
9492 (init_registers_s390x_linux64v2): Likewise.
9493 (s390_num_regs): Increment to 52.
9494 (s390_regmap): Add orig_r2 register.
9495 (s390_num_regs_3264): Increment to 68.
9496 (s390_regmap_3264): Add orig_r2 register.
9497 (s390_collect_ptrace_register): Handle orig_r2 register.
9498 (s390_supply_ptrace_register): Likewise.
9499 (s390_fill_last_break): New function.
9500 (s390_store_last_break): Likewise.
9501 (s390_fill_system_call): New function.
9502 (s390_store_system_call): Likewise.
9503 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9504 register sets.
9505 (s390_check_regset): New function.
9506 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9507 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9508 Update target_regsets for available register sets.
9509
2268b414
JK
95102011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9511 Jan Kratochvil <jan.kratochvil@redhat.com>
9512
9513 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9514 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9515 New.
9516 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9517 * linux-low.h (struct process_info_private): New member r_debug.
9518 * server.c (handle_qxfer_libraries): Call
9519 the_target->qxfer_libraries_svr4.
9520 (handle_qxfer_libraries_svr4): New function.
9521 (qxfer_packets): New entry "libraries-svr4".
9522 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9523 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9524 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9525 PACKET_qXfer_libraries_svr4.
9526
d6db1fab
UW
95272011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9528
9529 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9530 PSW address/mask between 8-byte and 16-byte formats.
9531 (s390_supply_ptrace_register): Likewise.
9532 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9533 basic addressing mode bit.
9534
242f5f1c
SS
95352011-11-24 Stan Shebs <stan@codesourcery.com>
9536
9537 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9538
f196051f
SS
95392011-11-17 Stan Shebs <stan@codesourcery.com>
9540
9541 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9542 (tracing_start_time): New global.
9543 (tracing_stop_time): New global.
9544 (tracing_user_name): New global.
9545 (tracing_notes): New global.
9546 (tracing_stop_note): New global.
9547 (cmd_qtstart): Set traceframe_usage, start_time.
9548 (stop_tracing): Set stop_time.
9549 (cmd_qtstatus): Report additional status.
9550 (cmd_qtp): New function.
9551 (handle_tracepoint_query): Call it.
9552 (cmd_qtnotes): New function.
9553 (handle_tracepoint_general_set): Call it.
9554 (get_timestamp): Rename from tsv_get_timestamp.
9555
405f8e94
SS
95562011-11-14 Stan Shebs <stan@codesourcery.com>
9557 Kwok Cheung Yeung <kcy@codesourcery.com>
9558
9559 * linux-x86-low.c (small_jump_insn): New.
9560 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9561 trampoline and error message, build a trampoline and issue a small
9562 jump instruction to it.
9563 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9564 trampoline and error message.
9565 (x86_get_min_fast_tracepoint_insn_len): New.
9566 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9567 * linux-low.h (struct linux_target_ops): Add arguments to
9568 install_fast_tracepoint_jump_pad operation, add new operation.
9569 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9570 arguments.
9571 (linux_get_min_fast_tracepoint_insn_len): New function.
9572 (linux_target_op): Add new operation.
9573 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9574 (gdb_trampoline_buffer_end): Ditto.
9575 (gdb_trampoline_buffer_error): Ditto.
9576 (struct ipa_sym_addresses): Add fields for new IPA variables.
9577 (symbol_list): Add entries for new IPA variables.
9578 (struct tracepoint): Add fields to hold the address range of the
9579 trampoline used by the tracepoint.
9580 (trampoline_buffer_head): New static variable.
9581 (trampoline_buffer_tail): Ditto.
9582 (claim_trampoline_space): New function.
9583 (have_fast_tracepoint_trampoline_buffer): New function.
9584 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9585 structure.
9586 (install_fast_tracepoint): Ditto, also add error buffer argument.
9587 (cmd_qtminftpilen): New function.
9588 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9589 (fast_tracepoint_from_trampoline_address): New function.
9590 (fast_tracepoint_collecting): Handle trampoline as part of jump
9591 pad space.
9592 (set_trampoline_buffer_space): New function.
9593 (initialize_tracepoint): Initialize new IPA variables.
9594 * target.h (struct target_ops): Add arguments to
9595 install_fast_tracepoint_jump_pad operation, add new
9596 get_min_fast_tracepoint_insn_len operation.
9597 (target_get_min_fast_tracepoint_insn_len): New.
9598 (install_fast_tracepoint_jump_pad): Add arguments.
9599 * server.h (IPA_BUFSIZ): Define.
9600 * linux-i386-ipa.c: Include extra header files.
9601 (initialize_fast_tracepoint_trampoline_buffer): New function.
9602 (initialize_low_tracepoint): Call it.
9603 * server.h (set_trampoline_buffer_space): Declare.
9604 (claim_trampoline_space): Ditto.
9605 (have_fast_tracepoint_trampoline_buffer): Ditto.
9606
1e4d1764
YQ
96072011-11-14 Yao Qi <yao@codesourcery.com>
9608
9609 * server.c (handle_query): Handle InstallInTrace for qSupported.
9610 * tracepoint.c (add_tracepoint): Sort list.
9611 (install_tracepoint, download_tracepoint): New.
9612 (cmd_qtdp): Call them to install and download tracepoints.
9613 (sort_tracepoints): Removed.
9614 (cmd_qtstart): Update.
9615
5c73ff4e
YQ
96162011-11-14 Yao Qi <yao@codesourcery.com>
9617
9618 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9619 * mem-break.h: Declare.
9620 * tracepoint.c (cmd_qtstart): Move some code to ...
9621 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9622 New.
9623 (download_tracepoints): Move some code to ...
9624 (download_tracepoint_1): ... here. New.
9625
86a30030
YQ
96262011-11-08 Yao Qi <yao@codesourcery.com>
9627
9628 * remote-utils.c (relocate_instruction): A comment fix.
9629
8d26e50c
JB
96302011-11-07 Joel Brobecker <brobecker@adacore.com>
9631
9632 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9633 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9634 dr_status_mirror and dr_control_mirror from debug_reg_state.
9635 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9636 (i386_initial_stuff): Remove use of deleted globals.
9637 (i386_get_thread_context, i386_set_thread_context,
9638 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9639 from debug_reg_state.
9640
a59306a3
YQ
96412011-11-05 Yao Qi <yao@codesourcery.com>
9642
9643 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9644 address as TPOINT's.
9645
3065dfb6
SS
96462011-11-02 Stan Shebs <stan@codesourcery.com>
9647
9648 * tracepoint.c (agent_mem_read_string): New function.
9649 (eval_agent_expr): Call it for tracenz.
9650 * server.c (handle_query): Report support for tracenz.
9651
fd0d8c7c
YQ
96522011-11-02 Yao Qi <yao@codesourcery.com>
9653
9654 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9655
609086b1
YQ
96562011-11-02 Yao Qi <yao@codesourcery.com>
9657
9658 * target.h: Fix a typo in comment.
9659
b9fd1791
PA
96602011-10-31 Pedro Alves <pedro@codesourcery.com>
9661
9662 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9663 clobber the breakpoints' shadows with fast tracepoint jumps.
9664 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9665 * target.c (write_inferior_memory): Also pass MYADDR down to
9666 check_mem_write.
9667
03583c20
UW
96682011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9669
9670 * configure.ac: Check support for personality routine.
9671 * configure: Regenerate.
9672 * config.in: Likewise.
9673 * linux-low.c: Include <sys/personality.h>.
9674 Define ADDR_NO_RANDOMIZE if necessary.
9675 (linux_create_inferior): Disable address space randomization when
9676 forking inferior, if requested.
9677 (linux_supports_disable_randomization): New function.
9678 (linux_target_ops): Install it.
9679 * server.h (disable_randomization): Declare.
9680 * server.c (disable_randomization): New global variable.
9681 (handle_general_set): Handle QDisableRandomization.
9682 (handle_query): Likewise for qSupported.
9683 (main): Support --disable-randomization and --no-disable-randomization
9684 command line arguments.
9685 * target.h (struct target_ops): Add supports_disable_randomization.
9686 (target_supports_disable_randomization): New macro.
9687
723b724b
MF
96882011-09-29 Mike Frysinger <vapier@gentoo.org>
9689
9690 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9691 ifdef check.
9692 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9693 [!PT_GETDSBT] (target_loadmap): New definition.
9694 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9695 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9696 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9697 and PT_GETDSBT to LINUX_LOADMAP.
9698 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9699 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9700
55329a5c 97012011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
9702
9703 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9704 (arm_linux_hwbp_cap): New static variable.
9705 (arm_linux_get_hwbp_cap): Replace by ...
9706 (arm_linux_init_hwbp_cap): ... this new function.
9707 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9708 (arm_linux_get_hw_watchpoint_count): Likewise.
9709 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9710 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9711 (arm_prepare_to_resume): Use perror_with_name instead of error.
9712
55329a5c 97132011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
9714
9715 * linux-arm-low.c: Include <signal.h>.
9716 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9717 (struct arm_linux_hwbp_cap): New data type.
9718 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9719 (struct arm_linux_hw_breakpoint): New data type.
9720 (MAX_BPTS, MAX_WPTS): Define.
9721 (struct arch_process_info, struct arch_lwp_info): New data types.
9722 (arm_linux_get_hwbp_cap): New function.
9723 (arm_linux_get_hw_breakpoint_count): Likewise.
9724 (arm_linux_get_hw_watchpoint_count): Likewise.
9725 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9726 (arm_hwbp_control_initialize): Likewise.
9727 (arm_hwbp_control_is_enabled): Likewise.
9728 (arm_hwbp_control_is_initialized): Likewise.
9729 (arm_hwbp_control_disable): Likewise.
9730 (arm_linux_hw_breakpoint_equal): Likewise.
9731 (arm_linux_hw_point_initialize): Likewise.
9732 (struct update_registers_data): New data structure.
9733 (update_registers_callback: New function.
9734 (arm_insert_point): Likewise.
9735 (arm_remove_point): Likewise.
9736 (arm_stopped_by_watchpoint): Likewise.
9737 (arm_stopped_data_address): Likewise.
9738 (arm_new_process): Likewise.
9739 (arm_new_thread): Likewise.
9740 (arm_prepare_to_resume): Likewise.
9741 (the_low_target): Register arm_insert_point, arm_remove_point,
9742 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9743 arm_new_thread, and arm_prepare_to_resume.
9744
6b9801d4
SS
97452011-09-15 Stan Shebs <stan@codesourcery.com>
9746
9747 * server.h (struct emit_ops): Add compare-goto fields.
9748 * tracepoint.c (gdb_agent_op_sizes): New table.
9749 (emit_eq_goto): New function.
9750 (emit_ne_goto): New function.
9751 (emit_lt_goto): New function.
9752 (emit_le_goto): New function.
9753 (emit_gt_goto): New function.
9754 (emit_ge_goto): New function.
9755 (is_goto_target): New function.
9756 (compile_bytecodes): Recognize special cases of compare-goto
9757 combinations and call specialized emitters for them.
9758 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9759 (amd64_emit_ne_goto): New function.
9760 (amd64_emit_lt_goto): New function.
9761 (amd64_emit_le_goto): New function.
9762 (amd64_emit_gt_goto): New function.
9763 (amd64_emit_ge_goto): New function.
9764 (amd64_emit_ops): Add the new functions.
9765 (i386_emit_eq_goto): New function.
9766 (i386_emit_ne_goto): New function.
9767 (i386_emit_lt_goto): New function.
9768 (i386_emit_le_goto): New function.
9769 (i386_emit_gt_goto): New function.
9770 (i386_emit_ge_goto): New function.
9771 (i386_emit_ops): Add the new functions.
9772
bf15cbda
SS
97732011-09-08 Stan Shebs <stan@codesourcery.com>
9774
9775 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9776 (i386_emit_epilogue): Restore %ebx.
9777
943ca1dd
JZ
97782011-08-31 Jie Zhang <jzhang918@gmail.com>
9779
9780 * server.c (step_thread): Remove definition.
9781 (process_serial_event): Don't handle Hs.
9782 * server.h (step_thread): Remove declaration.
9783 * target.c (set_desired_inferior): Remove use of step_thread.
9784
e3deef73
LM
97852011-08-24 Luis Machado <lgustavo@codesourcery.com>
9786
9787 * linux-low.c: Include linux-procfs.h.
9788 (linux_attach_lwp_1): Update comments.
9789 (linux_attach): Scan for existing threads when attaching to a
9790 process that is the tgid.
9791 * Makefile.in: Update dependencies.
9792
13da1c97
LM
97932011-08-24 Luis Machado <lgustavo@codesourcery.com>
9794
9795 * configure.srv: Add linux-procfs.o dependencies.
9796
881127c9
YQ
97972011-08-14 Yao Qi <yao@codesourcery.com>
9798
9799 * target.h (struct target_ops): Fix indent.
9800 * win32-low.c (win32_target_ops): Fix comment.
9801
58dbd541
YQ
98022011-08-14 Andrew Jenner <andrew@codesourcery.com>
9803 Yao Qi <yao@codesourcery.com>
9804
9805 * Makefile.in (clean): Remove tic6x-*.c files.
9806 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9807 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9808 (tic6x-c64xp-linux.c): Likewise.
9809 * configure.srv: Add support for tic6x-*-uclinux.
9810 * linux-tic6x-low.c: New.
9811 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9812
78d85199
YQ
98132011-08-14 Andrew Stubbs <ams@codesourcery.com>
9814 Yao Qi <yao@codesourcery.com>
9815
9816 * target.h (struct target_ops): Add read_loadmap.
9817 * linux-low.c (struct target_loadseg): New type.
9818 (struct target_loadmap): New type.
9819 (linux_read_loadmap): New function.
9820 (linux_target_ops): Add linux_read_loadmap.
9821 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
9822 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9823 to NULL.
78d85199 9824
a959a88d
EZ
98252011-08-05 Eli Zaretskii <eliz@gnu.org>
9826
9827 * win32-low.c: Include <stdint.h>.
9828
1ced966e
PA
98292011-07-22 Pedro Alves <pedro@codesourcery.com>
9830
9831 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9832 to the inferior here.
9833 (i386_remove_aligned_watchpoint): Ditto.
9834 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9835 fit part of the watchpoint in the debug registers.
9836 (i386_update_inferior_debug_regs): New.
9837 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9838 registers, and only update the inferior on success.
9839 (i386_low_remove_watchpoint): Ditto.
9840
d26e3629
KY
98412011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9842
9843 * linux-low.c (compare_ints, unique, list_threads, show_process,
9844 linux_core_of_thread): Delete.
9845 (linux_target_ops): Change linux_core_of_thread to
9846 linux_common_core_of_thread.
9847 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9848 * utils.c (malloc_failure): Change type of argument.
9849 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9850 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9851 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9852 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9853 (IPA_OBJS): Add common-utils-ipa.o.
9854 (ptid_h, linux_osdata_h): New macros.
9855 (server_h): Add common/common-utils.h, common/xml-utils.h,
9856 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9857 common/ptid.h.
9858 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9859 ptid.o, buffer.o): New rules.
9860 (linux-low.o): Add common/linux-osdata.h as a dependency.
9861 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9862 * configure.ac: Add AC_HEADER_DIRENT check.
9863 * config.in: Regenerate.
9864 * configure: Regenerate.
9865 * remote-utils.c (xml_escape_text): Delete.
9866 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9867 buffer_xml_printf): Move to common/buffer.c.
9868 * server.c (main): Remove call to initialize_inferiors.
9869 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9870 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9871 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9872 internal_error, gdb_assert, gdb_assert_fail): Delete.
9873 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9874 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9875 common/buffer.h.
9876 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9877 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9878 initialize_inferiors): Delete.
9879
2275a1a7
PA
98802011-07-20 Pedro Alves <pedro@codesourcery.com>
9881
9882 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9883 symbol error.
9884
0a5b1e09
PA
98852011-05-31 Pedro Alves <pedro@codesourcery.com>
9886
9887 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9888 assertion.
9889 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9890
6938fd34
YQ
98912011-05-26 Yao Qi <yao@codesourcery.com>
9892
9893 * Makefile.in (thread-db.o): Track dependence to
9894 common/gdb_thread_db.h.
9895 * thread-db.c: include gdb_thread_db.h from right place.
9896
b481f9e0
TT
98972011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9898
9899 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9900 __FILE__ and __LINE__ to internal_error.
9901
98a5dd13
DE
99022011-05-13 Doug Evans <dje@google.com>
9903
9904 * thread-db.c (try_thread_db_load_from_sdir): New function.
9905 (try_thread_db_load_from_dir): New function.
9906 (thread_db_load_search): Handle $sdir, ignore $pdir.
9907 Remove trying of system directories if search of
9908 libthread-db-search-path fails, that is now done via $sdir.
9909
d248b706
KY
99102011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9911
9912 * server.c (handle_query): Add EnableDisableTracepoints to the list
9913 of supported features.
43aaf8b6 9914 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 9915 tracepoints.
43aaf8b6
PA
9916 (cmd_qtenable_disable): New.
9917 (cmd_qtstart): Install tracepoints even if disabled.
9918 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9919 receiving a QTEnable or QTDisable packet.
9920 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9921 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9922 tracepoints.
9923 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 9924
84e578fb
DE
99252011-05-10 Doug Evans <dje@google.com>
9926
9927 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9928
71f55dd8
DE
99292011-05-04 Doug Evans <dje@google.com>
9930
9931 * linux-low.c (linux_join): Skip process lookup.
9932 * spu-low.c (spu_join): Ditto.
9933 * server.c (join_inferiors_callback): Delete.
9934 (process_serial_event): For 'D' packet (detach) call join_inferior
9935 directly.
9936
4d393d60
JM
99372011-05-04 Joseph Myers <joseph@codesourcery.com>
9938
9939 * README: Don't mention xscale*-*-linux*.
9940 * configure.srv (xscale*-*-linux*): Don't handle target.
9941
b00ad6ff
NF
99422011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9943
9944 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9945 casting pointers.
9946 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9947 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9948 (i386_emit_void_call_2): Likewise.
9949
af96c192
YQ
99502011-04-26 Yao Qi <yao@codesourcery.com>
9951
43aaf8b6
PA
9952 * linux-low.c: Move common macros to linux-ptrace.h.
9953 Include linux-ptrace.h.
af96c192
YQ
9954 * Makefile.in (linux_ptrace_h): New.
9955 (linux-low.o): Depends on linux-ptrace.h.
9956
03f2bd59
JK
99572011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9958
9959 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9960 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9961 (remote_prepare): New function with most of the TCP code from ...
9962 (remote_open): ... here. Detect PORT here unconditionally. Move also
9963 setting transport_is_reliable.
9964 * server.c (run_once): New variable.
9965 (gdbserver_usage): Document it.
9966 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9967 the first run if RUN_ONCE.
9968 * server.h (run_once, remote_prepare): New declarations.
9969
7a9dd1b2
TT
99702011-04-19 Tom Tromey <tromey@redhat.com>
9971
9972 * win32-low.c (handle_load_dll): Remove duplicate "the".
9973
81239425
PM
99742011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9975
9976 Remove support for old Cygwin 1.5 versions.
9977 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9978 function to avoid warning.
9979 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9980 warning.
9981
9e0627f1
PM
99822011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9983
9984 * gdbserver/server.h (Macro _): Define it if not available.
9985
588eebee
MS
99862011-03-14 Michael Snyder <msnyder@vmware.com>
9987
348af9f7 9988 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 9989
43f70d4c
JB
99902011-03-10 Joel Brobecker <brobecker@adacore.com>
9991
9992 * Makefile.in (maintainer-clean realclean distclean): Remove
9993 "make ... subdir_do" command.
9994
348af9f7
MS
99952011-03-10 Michael Snyder <msnyder@vmware.com>
9996
9997 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9998
9999 * server.c (handle_v_run): Free alloced buffer on early return.
10000
e637a4f5
YQ
100012011-03-09 Yao Qi <yao@codesourcery.com>
10002
10003 Revert:
10004 2011-03-04 Yao Qi <yao@codesourcery.com>
10005
10006 * Makefile.in: Remove GNU make feature --directory.
10007
10008 2011-03-05 Yao Qi <yao@codesourcery.com>
10009
10010 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10011 (subdir_do): New make target. Copied from gdb/Makefile.
10012 (maintainer-clean, realclean, distclean, clean): Call corresponding
10013 make targets in common/Makefile.
10014
10015 2011-02-11 Yao Qi <yao@codesourcery.com>
10016
10017 * configure.ac: Call AC_PROG_RANLIB.
10018 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10019 * configure: Regenerate.
10020
e6edda56
JK
100212011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10022
10023 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10024
e5141119
JB
100252011-03-06 Yao Qi <yao@codesourcery.com>
10026
10027 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10028
64794aa4
JB
100292011-03-05 Yao Qi <yao@codesourcery.com>
10030
10031 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10032 (subdir_do): New make target. Copied from gdb/Makefile.
10033 (maintainer-clean, realclean, distclean, clean): Call corresponding
10034 make targets in common/Makefile.
10035
7a762829
YQ
100362011-03-04 Yao Qi <yao@codesourcery.com>
10037
10038 * Makefile.in: Remove GNU make feature --directory.
10039
348af9f7
MS
100402011-03-04 Michael Snyder <msnyder@vmware.com>
10041
10042 * server.c (queue_stop_reply): Call xmalloc not malloc.
10043
100442011-03-02 Michael Snyder <msnyder@vmware.com>
10045
10046 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10047
9f72fee2
MS
100482011-02-28 Michael Snyder <msnyder@vmware.com>
10049
588eebee
MS
10050 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10051 (cmd_qtframe): Ditto.
10052 (cmd_qtbuffer): Ditto.
10053 (cmd_bigqtbuffer): Ditto.
10054
9f72fee2
MS
10055 * utils.c (decimal2str): Initialize 'width' to nine, then
10056 don't mess with it.
10057
8040bd49
UW
100582011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10059
10060 * hostio.c (require_data): Free *data, not data.
10061
7e52cbd0
JK
100622011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10063
10064 * hostio.c (require_data): Use free, not xfree.
10065
9130f83e
MS
100662011-02-27 Michael Snyder <msnyder@vmware.com>
10067
4b812f4e
MS
10068 * server.c (handle_query): Discard unused value.
10069
9130f83e
MS
10070 * hostio.c (require_data): Free malloc memory before returning
10071 error.
10072
69d37113
MS
100732011-02-26 Michael Snyder <msnyder@vmware.com>
10074
10075 * linux-low.c (list_threads): Call closedir for dirent.
10076
35f5825a
MS
100772011-02-27 Michael Snyder <msnyder@vmware.com>
10078
2a589cef
MS
10079 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10080 a case statement falls through.
10081
0adea5f7
MS
10082 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10083
35f5825a
MS
10084 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10085 in comparison.
10086
238f1c74
MS
100872011-02-26 Michael Snyder <msnyder@vmware.com>
10088
10089 * utils.c (decimal2str): Eliminate dead code and dead param.
10090 (pulongest): Drop dead param from call to decimal2str.
10091 (plongest): Ditto.
10092
633ff500
JB
100932011-02-24 Joel Brobecker <brobecker@adacore.com>
10094
10095 Revert the following patch (not approved yet):
10096 2011-02-21 Hui Zhu <teawater@gmail.com>
10097 * tracepoint.c (tp_printf): New function.
10098 (eval_agent_expr): Handle gdb_agent_op_printf.
10099
f9c6ff72
HZ
101002011-02-21 Hui Zhu <teawater@gmail.com>
10101
10102 * tracepoint.c (tp_printf): New function.
10103 (eval_agent_expr): Handle gdb_agent_op_printf.
10104
94d5e490
TT
101052011-02-18 Tom Tromey <tromey@redhat.com>
10106
10107 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10108 (tracepoint.o): Likewise.
10109 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10110 (gdb_agent_op_names): Likewise.
10111
c7f96d2b
TT
101122011-02-18 Tom Tromey <tromey@redhat.com>
10113
10114 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10115 gdb_agent_op_rot>: New constants.
10116 (gdb_agent_op_names): Add pick and roll.
10117 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10118 cases.
10119
0feedb2c
JK
101202011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10121
10122 * aclocal.m4: Regenerated with aclocal-1.11.1.
10123
b3b9301e
PA
101242011-02-14 Pedro Alves <pedro@codesourcery.com>
10125
10126 * server.c (handle_qxfer_traceframe_info): New.
10127 (qxfer_packets): Register "traceframe-info".
10128 (handle_query): Report support for qXfer:traceframe-info:read+.
10129 * tracepoint.c (match_blocktype): New.
10130 (traceframe_find_block_type): Rename to ...
10131 (traceframe_walk_blocks): ... this. Add callback filter argument,
10132 and use it.
10133 (traceframe_find_block_type): New, reimplemented on top of
10134 traceframe_walk_blocks.
10135 (build_traceframe_info_xml): New.
10136 (traceframe_read_info): New.
10137 * server.h (traceframe_read_info): Declare.
10138
4f3e6fb7
YQ
101392011-02-11 Yao Qi <yao@codesourcery.com>
10140
10141 * configure.ac: Call AC_PROG_RANLIB.
10142 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10143 * configure: Regenerate.
10144
764880b7
PA
101452011-02-07 Pedro Alves <pedro@codesourcery.com>
10146
10147 * server.c (gdb_read_memory): Change return semantics to allow
10148 partial transfers.
10149 (handle_search_memory_1): Adjust.
10150 (process_serial_event) <'m' packet>: Handle partial transfers.
10151 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10152
1c79eb8a
PA
101532011-01-28 Pedro Alves <pedro@codesourcery.com>
10154
10155 * regcache.c (init_register_cache): Initialize
10156 regcache->register_status.
10157 (free_register_cache): Release regcache->register_status.
10158 (regcache_cpy): Copy register_status.
10159 (registers_to_string): Print 'x's for unavailable registers.
10160 (supply_register): Mark the register's status valid or
10161 unavailable, depending on whether a buffer was passed in or not.
10162 (supply_register_zeroed): New.
10163 (supply_regblock): Mark the registers' status valid or
10164 unavailable, depending on whether a buffer was passed in or not.
10165 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10166 (struct regcache): New `register_status' field.
10167 (supply_register_zeroed): Declare.
10168 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10169 supply_register_zeroed, rather than passing a NULL buffer to
10170 supply_register.
10171 * tracepoint.c (fetch_traceframe_registers): Update comment.
10172
85724a0e
PA
101732011-01-28 Pedro Alves <pedro@codesourcery.com>
10174
10175 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10176 buffer explicit.
10177
d08aafef
PA
101782011-01-25 Pedro Alves <pedro@codesourcery.com>
10179
10180 * server.h (decode_xfer_write): Change prototype.
10181 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10182 and don't extract the annex here.
10183 * server.c (decode_xfer_read): Remove `annex' parameter,
10184 and don't extract the annex here.
10185 (decode_xfer): New.
10186 (struct qxfer): New.
10187 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10188 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10189 (handle_qxfer_statictrace): New functions, abstracted out from
10190 handle_query, and made to use the struct qxfer interface.
10191 (handle_threads_qxfer_proper): Rename to ...
10192 (handle_qxfer_threads_proper): ... this.
10193 (handle_threads_qxfer): Rename to ...
10194 (handle_qxfer_threads): ... this. Adjust.
10195 (qxfer_packets): New array.
10196 (handle_qxfer): New function.
10197 (handle_query): Use handle_qxfer.
10198
493e2a69
MS
101992011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10200
10201 * gdbreplay.c: Shorten lines of >= 80 columns.
10202 * linux-low.c: Ditto.
10203 * linux-ppc-low.c: Ditto.
10204 * linux-s390-low.c: Ditto.
10205 * linux-sparc-low.c: Ditto.
10206 * linux-x86-low.c: Ditto.
10207 * linux-xtensa-low.c: Ditto.
10208 * mem-break.c: Ditto.
10209 * nto-low.c: Ditto.
10210 * regcache.h: Ditto.
10211 * remote-utils.c: Ditto.
10212 * server.c: Ditto.
10213 * server.h: Ditto.
10214 * thread-db.c: Ditto.
10215 * tracepoint.c: Ditto.
10216 * utils.c: Ditto.
10217 * win32-low.h: Ditto.
10218
44944448
JB
102192011-01-05 Joel Brobecker <brobecker@adacore.com>
10220
10221 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10222 update.
10223
71ce852c
JB
102242011-01-01 Joel Brobecker <brobecker@adacore.com>
10225
10226 * server.c (gdbserver_version): Update copyright year in version
10227 output.
10228 * gdbreplay.c (gdbreplay_version): Ditto.
10229
eb826dc6
MF
102302010-12-29 Jie Zhang <jie.zhang@analog.com>
10231
10232 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10233 * linux-bfin-low.c: New file.
10234 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10235 PT_DATA_ADDR for BFIN targets.
10236 * Makefile.in (SFILES): Add linux-bfin-low.c.
10237 (clean): Remove reg-bfin.c.
10238 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10239 * README: Mention supported Blackfin targets.
10240
39ab222a
MF
102412010-12-23 Mike Frysinger <vapier@gentoo.org>
10242
10243 * .gitignore: New file.
10244
a1f2ce7d
MF
102452010-11-16 Mike Frysinger <vapier@gentoo.org>
10246
10247 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10248
f474844c
JZ
102492010-10-22 Jie Zhang <jie@codesourcery.com>
10250
10251 * Makefile.in: Add FLAGS_TO_PASS variable.
10252 (install): Remove dependency of install-only and recursively
10253 invoke make for install-only.
10254
f1048712
DE
102552010-10-04 Doug Evans <dje@google.com>
10256
10257 * Makefile.in (uninstall): Use $(DESTDIR).
10258
b53a1623
PA
102592010-09-24 Pedro Alves <pedro@codesourcery.com>
10260
e6ee044d
PA
10261 PR gdb/11842
10262
b53a1623
PA
10263 * linux-x86-low.c (compat_siginfo_from_siginfo)
10264 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10265 si_code is < 0. Check for si_code == SI_TIMER before checking for
10266 si_code < 0.
10267
fa1bd1e4
JB
102682010-09-13 Joel Brobecker <brobecker@adacore.com>
10269
10270 * lynx-i386-low.c: New file.
10271 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10272
47fac8f8
JB
102732010-09-13 Joel Brobecker <brobecker@adacore.com>
10274
10275 * lynx-low.c (ptrace_request_to_str): Remove handling for
10276 request values that have been removed in LynxOS 5.x.
10277
1adfc54d
JB
102782010-09-13 Joel Brobecker <brobecker@adacore.com>
10279
10280 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10281 <ptrace.h>
10282
c2a66c29
NS
102832010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10284
10285 * configure.ac: Add --enable-inprocess-agent option.
10286 * configure: Rebuilt.
10287
32fcada3
YQ
102882010-09-06 Yao Qi <yao@codesourcery.com>
10289
10290 * linux-low.c (linux_kill): Remove unused variable.
10291 (linux_stabilize_threads): Likewise.
10292 * server.c (start_inferior): Likewise.
10293 (queue_stop_reply_callback): Likewise.
10294 * tracepoint.c (do_action_at_tracepoint): Likewise.
10295
0cccb683
YQ
102962010-09-06 Yao Qi <yao@codesourcery.com>
10297
10298 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10299 on return.
10300
423ec54c
JK
103012010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10302
10303 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10304
12ac6819
PA
103052010-09-06 Pedro Alves <pedro@codesourcery.com>
10306
10307 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10308 "$(IPA_DEPFILES)".
10309
8ed54b31
JB
103102010-09-01 Joel Brobecker <brobecker@adacore.com>
10311
10312 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10313 gdbserver/lynx-ppc-low.c: New files.
10314 * Makefile.in (lynx_low_h): New variable.
10315 (lynx-low.o, lynx-ppc-low.o): New rules.
10316 * configure.ac: On LynxOS, link with -lnetinet.
10317 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10318 * configure: regenerate.
10319
bb0116a4
JB
103202010-09-01 Joel Brobecker <brobecker@adacore.com>
10321
10322 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10323 * configure.ac: Add check for vasprintf and vsnprintf.
10324 * configure, config.in: Regenerate.
10325 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10326
a778ab81 103272010-09-01 Joel Brobecker <brobecker@adacore.com>
10328
10329 * gdbreplay.c: Move include of alloca.h up, next to include of
10330 malloc.h.
10331 * server.h: Add include of malloc.h.
10332 * mem-break.c: Remove include of malloc.h.
10333 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10334
8b034a19 103352010-09-01 Joel Brobecker <brobecker@adacore.com>
10336
10337 * Makefile.in (memmem.o): Build with -Wno-error.
10338
103392010-09-01 Joel Brobecker <brobecker@adacore.com>
10340
10341 * utils.c (xsnprintf): Make non-static.
10342 * server.h: Add xsnprintf declaration.
10343 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10344 replace calls to snprintf by calls to xsnprintf throughout.
10345
103462010-09-01 Joel Brobecker <brobecker@adacore.com>
10347
10348 * configure.ac: Add configure check for alloca.
10349 * configure, config.in: Regenerate.
10350 * server.h: Include alloca.h if it exists.
10351 * gdbreplay.c: Include alloca.h if it exists.
10352
1a981360
PA
103532010-08-28 Pedro Alves <pedro@codesourcery.com>
10354
10355 * linux-low.c (__SIGRTMIN): Define if not already defined.
10356 (linux_create_inferior): Check for __ANDROID__ rather than
10357 __SIGRTMIN.
10358 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10359 are already deferred.
10360 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10361 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10362 stopped and already has a pending signal to report.
10363 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10364 a pending signal to report or is moving out of a jump pad.
10365 (linux_init_signals): Check for __ANDROID__ rather than
10366 __SIGRTMIN.
10367
b4d51a55
PA
103682010-08-28 Pedro Alves <pedro@codesourcery.com>
10369
10370 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10371 debug_threads check. Avoid a linear search when not doing debug
10372 output.
10373
ec48365d
PA
103742010-08-27 Pedro Alves <pedro@codesourcery.com>
10375
10376 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10377 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10378 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10379 (process_event): Change local fd's type to gdb_fildes_t.
10380 (create_file_handler): Adjust prototype.
10381 (delete_file_handler): Adjust prototype.
10382 (handle_file_event): Adjust prototype. Use pfildes.
10383 (create_file_event): Adjsut prototype.
10384 * remote-utils.c (remote_desc, listen_desc): Change type to
10385 gdb_fildes_t.
10386 * server.h: New gdb_fildes_t typedef.
10387 [USE_WIN32API]: Include winsock2.h.
10388 (delete_file_handler, add_file_handler): Adjust prototypes.
10389 (pfildes): Declare.
10390 * utils.c (pfildes): New.
10391
854d88f0
PA
103922010-08-27 Pedro Alves <pedro@codesourcery.com>
10393
10394 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10395 * configure: Regenerate.
10396
0146f85b
PA
103972010-08-27 Pedro Alves <pedro@codesourcery.com>
10398
10399 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10400 (linux_done_accessing_memory): ... this.
10401 (linux_target_ops): Adjust.
10402 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10403 * nto-low.c (nto_target_ops): Adjust comment.
10404 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10405 * spu-low.c (spu_target_ops): Adjust comment.
10406 * target.h (target_ops): Rename unprepare_to_access_memory field
10407 to done_accessing_memory.
10408 (unprepare_to_access_memory): Rename to ...
10409 (done_accessing_memory): ... this.
10410
90d74c30
PA
104112010-08-26 Pedro Alves <pedro@codesourcery.com>
10412
10413 * linux-low.c (linux_prepare_to_access_memory): New.
10414 (linux_unprepare_to_access_memory): New.
10415 (linux_target_ops): Install them.
10416 * server.c (read_memory): Rename to ...
10417 (gdb_read_memory): ... this. Use
10418 prepare_to_access_memory/prepare_to_access_memory.
10419 (write_memory): Rename to ...
10420 (gdb_write_memory): ... this. Use
10421 prepare_to_access_memory/prepare_to_access_memory.
10422 (handle_search_memory_1): Adjust.
10423 (process_serial_event): Adjust.
10424 * target.h (struct target_ops): New fields
10425 prepare_to_access_memory and unprepare_to_access_memory.
10426 (prepare_to_access_memory, unprepare_to_access_memory): New.
10427 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10428 prepare_to_access_memory/prepare_to_access_memory.
10429 * nto-low.c (nto_target_ops): Adjust.
10430 * spu-low.c (spu_target_ops): Adjust.
10431 * win32-low.c (win32_target_ops): Adjust.
10432
fd467969
PA
104332010-08-26 Pedro Alves <pedro@codesourcery.com>
10434
10435 * Makefile.in (WARN_CFLAGS): Get it from configure.
10436 (WERROR_CFLAGS): New.
10437 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10438 * configure.ac: Introduce --enable-werror, which adds -Werror to
10439 the compiler command line. Enabled by default. Disable with
10440 --disable-werror. Add -Wdeclaration-after-statement
10441 Wpointer-arith and -Wformat-nonliteral to warning flags.
10442 * configure: Regenerate.
10443
331e2f5f
PA
104442010-08-26 Pedro Alves <pedro@codesourcery.com>
10445
10446 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10447
e581f2b4
PA
104482010-08-26 Pedro Alves <pedro@codesourcery.com>
10449
10450 * gdbreplay.c (remote_error): New.
10451 (gdbchar): New.
10452 (expect): Use gdbchar. Check for error reading from GDB.
10453 Clarify sync error output.
10454 (play): Check for errors writing to GDB.
10455 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10456 * remote-utils.c (getpkt): Check for errors writing to the remote
10457 descriptor.
10458
3c11dd79
PA
104592010-08-25 Pedro Alves <pedro@codesourcery.com>
10460
10461 * linux-low.c (linux_wait_1): Move non-debugging code out of
10462 `debug_threads' control.
10463
d20a8ad9
PA
104642010-08-25 Pedro Alves <pedro@codesourcery.com>
10465
10466 * linux-low.c (linux_wait_1): Don't set last_status here.
10467 * server.c (push_event, queue_stop_reply_callback): Assert we're
10468 not pushing a TARGET_WAITKIND_IGNORE event.
10469 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10470 (myresume, handle_target_event): Set the thread's last_resume_kind
10471 and last_status from the target returned status.
10472
964e4306
PA
104732010-08-25 Pedro Alves <pedro@codesourcery.com>
10474
10475 PR threads/10729
10476
10477 * linux-x86-low.c (update_debug_registers_callback): New.
10478 (i386_dr_low_set_addr): Use it.
10479 (i386_dr_low_get_addr): New.
10480 (i386_dr_low_set_control): Use update_debug_registers_callback.
10481 (i386_dr_low_get_control): New.
10482 (i386_dr_low_get_status): Adjust.
10483 * linux-low.c (linux_stop_lwp): New.
10484 * linux-low.h (linux_stop_lwp): Declare.
10485
10486 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10487 argument instead of a i386_debug_reg_state.
10488 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10489 a i386_debug_reg_state.
10490 (i386_insert_aligned_watchpoint): Adjust.
10491 (i386_remove_aligned_watchpoint): Adjust.
10492 (i386_low_stopped_data_address): Read the debug registers from the
10493 inferior instead of from the mirrors.
10494 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10495 (i386_dr_low_get_addr): Declare.
10496 (i386_dr_low_get_control): Declare.
10497 (i386_dr_low_get_status): Change prototype.
10498
10499 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10500 (i386_dr_low_get_addr): New.
10501 (i386_dr_low_get_control): New.
10502 (i386_dr_low_get_status): Adjust prototype. Return
10503 dr_status_mirror.
10504 (i386_initial_stuff): Clear dr_status_mirror and
10505 dr_control_mirror.
10506 (i386_get_thread_context): Adjust.
10507 (i386_set_thread_context): Adjust.
10508 (i386_thread_added): Adjust.
10509
5f21a75b
PA
105102010-08-24 Pedro Alves <pedro@codesourcery.com>
10511
10512 * linux-low.h (linux_thread_area): Delete declaration.
10513
3e4c1235
TS
105142010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10515
10516 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10517 after its termination.
10518
1971b033
PA
105192010-08-09 Pedro Alves <pedro@codesourcery.com>
10520
10521 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10522 (gdb_wants_all_stopped): Delete.
10523 (linux_wait_1): Don't call them.
10524 * server.c (handle_v_cont): Tag all threads as want-stopped.
10525 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10526 stopped as "client-wants-stopped".
10527
310444ac
PA
105282010-07-31 Pedro Alves <pedro@codesourcery.com>
10529
10530 * Makefile.in (signals_h): New.
10531 (server_h): Depend on it.
10532 (server.o): Don't depend on $(signals_def).
10533 (signals.o): Depend on $(signals_def).
10534
a19cae16
JK
105352010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10536
10537 * Makefile.in (signals_def): New.
10538 (server_h): Append include/gdb/signals.h and signals_def.
10539 (server.o): Append signals_def.
10540
30d50328
JK
105412010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10542
10543 * server.c (handle_target_event): Use target_signal_to_host for
10544 resume_info.sig initialization.
10545 * target.h (struct thread_resume) <sig>: New comment.
10546
5c3216e2
OS
105472010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10548
c6f46ca0
OS
10549 * server.c (handle_query): strcpy() the returned string from paddress()
10550 instead of sprintf().
5c3216e2
OS
10551 * utils.c (paddress): Return phex_nz().
10552
6bd31874
JB
105532010-07-07 Joel Brobecker <brobecker@adacore.com>
10554
10555 * server.c (handle_v_cont): Call mourn_inferior if process
10556 just exited.
10557 (myresume): Likewise.
10558
0fb4aa4b
PA
105592010-07-01 Pedro Alves <pedro@codesourcery.com>
10560
10561 Static tracepoints, and integration with UST.
10562
10563 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10564 * mem-break.c (uninsert_all_breakpoints)
10565 (reinsert_all_breakpoints): New.
10566 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10567 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10568 (gdb_agent_ust_loaded, helper_thread_id)
10569 (gdb_agent_helper_thread_id): New macros.
10570 (struct ipa_sym_addresses): Add addr_ust_loaded,
10571 addr_helper_thread_id, addr_cmd_buf.
10572 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10573 (in_process_agent_loaded_ust): New.
10574 (write_e_ust_not_loaded): New.
10575 (maybe_write_ipa_ust_not_loaded): New.
10576 (struct collect_static_trace_data_action): New.
10577 (enum tracepoint_type) <static_tracepoint>: New.
10578 (struct tracepoint) <handle>: Mention static tracepoints.
10579 (struct static_tracepoint_ctx): New.
10580 (CMD_BUF_SIZE): New.
10581 (add_tracepoint_action): Handle static tracepoint actions.
10582 (unprobe_marker_at): New.
10583 (clear_installed_tracepoints): Handle static tracepoints.
10584 (cmd_qtdp): Handle static tracepoints.
10585 (probe_marker_at): New.
10586 (cmd_qtstart): Handle static tracepoints.
10587 (response_tracepoint): Handle static tracepoints.
10588 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10589 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10590 (get_context_regcache): Handle static tracepoints.
10591 (do_action_at_tracepoint): Handle static tracepoint actions.
10592 (traceframe_find_block_type): Handle static trace data blocks.
10593 (traceframe_read_sdata): New.
10594 (download_tracepoints): Download static tracepoint actions.
10595 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10596 (GDB_PROBE_NAME): New.
10597 (ust_ops): New.
10598 (GET_UST_SYM): New.
10599 (USTF): New.
10600 (dlsym_ust): New.
10601 (ust_marker_to_static_tracepoint): New.
10602 (gdb_probe): New.
10603 (collect_ust_data_at_tracepoint): New.
10604 (gdb_ust_probe): New.
10605 (UNIX_PATH_MAX, SOCK_DIR): New.
10606 (gdb_ust_connect_sync_socket): New.
10607 (resume_thread, stop_thread): New.
10608 (run_inferior_command): New.
10609 (init_named_socket): New.
10610 (gdb_ust_socket_init): New.
10611 (cstr_to_hexstr): New.
10612 (next_st): New.
10613 (first_marker, next_marker): New.
10614 (response_ust_marker): New.
10615 (cmd_qtfstm, cmd_qtsstm): New.
10616 (unprobe_marker_at, probe_marker_at): New.
10617 (cmd_qtstmat, gdb_ust_thread): New.
10618 (gdb_ust_init): New.
10619 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10620 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10621 (ST_REGENTRY): New.
10622 (x86_64_st_collect_regmap): New.
10623 (X86_64_NUM_ST_COLLECT_GREGS): New.
10624 (AMD64_RIP_REGNUM): New.
10625 (supply_static_tracepoint_registers): New.
10626 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10627 (ST_REGENTRY): New.
10628 (i386_st_collect_regmap): New.
10629 (i386_NUM_ST_COLLECT_GREGS): New.
10630 (supply_static_tracepoint_registers): New.
10631 * server.c (handle_query): Handle qXfer:statictrace:read.
10632 <qSupported>: Report support for StaticTracepoints, and
10633 qXfer:statictrace:read features.
10634 * server.h (traceframe_read_sdata)
10635 (supply_static_tracepoint_registers): Declare.
10636 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10637 (unpack_varlen_hex): Include in IPA build.
10638 * Makefile.in (ustlibs, ustinc): New.
10639 (IPA_OBJS): Add remote-utils-ipa.o.
10640 ($(IPA_LIB)): Link -ldl and -lpthread.
10641 (UST_CFLAGS): New.
10642 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10643 * config.in, configure: Regenerate.
10644
9e4344e5
PA
106452010-06-20 Ian Lance Taylor <iant@google.com>
10646 Pedro Alves <pedro@codesourcery.com>
10647
10648 * linux-x86-low.c (always_true): Delete.
10649 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10650 trying to fool the compiler with always_true.
10651
c6beb2cb
PA
106522010-06-20 Pedro Alves <pedro@codesourcery.com>
10653
10654 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10655 conditions in gdbserver.
10656
d2ed6730
UW
106572010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10658
10659 * spu-low.c (spu_read_memory): Wrap around local store limit.
10660 (spu_write_memory): Likewise.
10661
4e29fb54
PA
106622010-06-15 Pedro Alves <pedro@codesourcery.com>
10663
10664 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10665 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10666 LONGEST uses.
10667 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10668 uses.
10669 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10670 uses with LONGEST uses.
10671
6a271cae
PA
106722010-06-14 Stan Shebs <stan@codesourcery.com>
10673 Pedro Alves <pedro@codesourcery.com>
10674
10675 Bytecode compiler.
10676
10677 * linux-x86-low.c: Include limits.h.
10678 (add_insns): New.
10679 (always_true): New.
10680 (EMIT_ASM): New.
10681 (EMIT_ASM32): New.
10682 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10683 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10684 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10685 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10686 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10687 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10688 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10689 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10690 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10691 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10692 (amd64_emit_void_call_2): New.
10693 (amd64_emit_ops): New.
10694 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10695 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10696 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10697 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10698 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10699 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10700 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10701 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10702 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10703 (i386_emit_stack_adjust, i386_emit_int_call_1)
10704 (i386_emit_void_call_2): New.
10705 (i386_emit_ops): New.
10706 (x86_emit_ops): New.
10707 (the_low_target): Install x86_emit_ops.
10708 * server.h (struct emit_ops): New.
10709 (get_raw_reg_func_addr): Declare.
10710 (current_insn_ptr, emit_error): Declare.
10711 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10712 (set_trace_state_variable_value): New defines.
10713 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10714 addr_get_trace_state_variable_value and
10715 addr_set_trace_state_variable_value.
10716 (symbol_list): New fields for get_raw_reg,
10717 get_trace_state_variable_value and set_trace_state_variable_value.
10718 (condfn): New typedef.
10719 (struct tracepoint): New field `compiled_cond'.
10720 (do_action_at_tracepoint): Clear compiled_cond.
10721 (get_trace_state_variable_value, set_trace_state_variable_value):
10722 Export in the IPA.
10723 (condition_true_at_tracepoint): If there's a compiled condition,
10724 run that.
10725 (current_insn_ptr, emit_error): New globals.
10726 (struct bytecode_address): New.
10727 (get_raw_reg_func_addr): New.
10728 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10729 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10730 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10731 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10732 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10733 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10734 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10735 (compile_tracepoint_condition, compile_bytecodes): New.
10736 * target.h (emit_ops): Forward declare.
10737 (struct target_ops): New field emit_ops.
10738 (target_emit_ops): New.
10739 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10740 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10741 * linux-low.c (linux_emit_ops): New.
10742 (linux_target_ops): Install it.
10743 * linux-low.h (struct linux_target_ops): New field emit_ops.
10744
92b72907
UW
107452010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10746
10747 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10748 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10749
fa593d66
PA
107502010-06-01 Pedro Alves <pedro@codesourcery.com>
10751 Stan Shebs <stan@codesourcery.com>
10752
10753 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10754 (all): Depend on $(extra_libraries).
10755 (install-only): Install the IPA.
10756 (IPA_OBJS, IPA_LIB): New.
10757 (clean): Remove the IPA lib.
10758 (IPAGENT_CFLAGS): New.
10759 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10760 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10761 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10762 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10763 * configure.ac: Check for atomic builtins support in the compiler.
10764 (IPA_DEPFILES, extra_libraries): Define.
10765 * configure.srv (ipa_obj): Add description.
10766 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10767 (i[34567]86-*-linux*): Set ipa_obj.
10768 (x86_64-*-linux*): Set ipa_obj.
10769 * linux-low.c (stabilizing_threads): New.
10770 (supports_fast_tracepoints): New.
10771 (linux_detach): Stabilize threads before detaching.
10772 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10773 the lwp is either not stabilizing, or is moving out of a jump pad.
10774 (linux_fast_tracepoint_collecting): New.
10775 (maybe_move_out_of_jump_pad): New.
10776 (enqueue_one_deferred_signal): New.
10777 (dequeue_one_deferred_signal): New.
10778 (linux_wait_for_event_1): If moving out of a jump pad, defer
10779 pending signals to later.
10780 (linux_stabilize_threads): New.
10781 (linux_wait_1): Check if threads need moving out of jump pads, and
10782 do it if so.
10783 (stuck_in_jump_pad_callback): New.
10784 (move_out_of_jump_pad_callback): New.
10785 (lwp_running): New.
10786 (linux_resume_one_lwp): Handle moving out of jump pads.
10787 (linux_set_resume_request): Dequeue deferred signals.
10788 (need_step_over_p): Also step over fast tracepoint jumps.
10789 (start_step_over): Also uninsert fast tracepoint jumps.
10790 (finish_step_over): Also reinsert fast tracepoint jumps.
10791 (linux_install_fast_tracepoint_jump): New.
10792 (linux_target_ops): Install linux_stabilize_threads and
10793 linux_install_fast_tracepoint_jump_pad.
10794 * linux-low.h (linux_target_ops) <get_thread_area,
10795 install_fast_tracepoint_jump_pad>: New fields.
10796 (struct lwp_info) <collecting_fast_tracepoint,
10797 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10798 (linux_get_thread_area): Declare.
10799 * linux-x86-low.c (jump_insn): New.
10800 (x86_get_thread_area): New.
10801 (append_insns): New.
10802 (push_opcode): New.
10803 (amd64_install_fast_tracepoint_jump_pad): New.
10804 (i386_install_fast_tracepoint_jump_pad): New.
10805 (x86_install_fast_tracepoint_jump_pad): New.
10806 (the_low_target): Install x86_get_thread_area and
10807 x86_install_fast_tracepoint_jump_pad.
10808 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10809 (struct fast_tracepoint_jump): New.
10810 (fast_tracepoint_jump_insn): New.
10811 (fast_tracepoint_jump_shadow): New.
10812 (find_fast_tracepoint_jump_at): New.
10813 (fast_tracepoint_jump_here): New.
10814 (delete_fast_tracepoint_jump): New.
10815 (set_fast_tracepoint_jump): New.
10816 (uninsert_fast_tracepoint_jumps_at): New.
10817 (reinsert_fast_tracepoint_jumps_at): New.
10818 (set_breakpoint_at): Use write_inferior_memory.
10819 (uninsert_raw_breakpoint): Use write_inferior_memory.
10820 (check_mem_read): Mask out fast tracepoint jumps.
10821 (check_mem_write): Mask out fast tracepoint jumps.
10822 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10823 (set_fast_tracepoint_jump): Declare.
10824 (delete_fast_tracepoint_jump)
10825 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10826 (reinsert_fast_tracepoint_jumps_at): Declare.
10827 * regcache.c: Don't compile many functions when building the
10828 in-process agent library.
10829 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10830 the register buffer in the heap.
10831 (free_register_cache): If the register buffer isn't owned by the
10832 regcache, don't free it.
10833 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10834 pre-existing register caches.
10835 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10836 type.
10837 (convert_ascii_to_int): : Constify `from' parameter type.
10838 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10839 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10840 the needed buffer in-place.
10841 (relocate_instruction): New.
10842 * server.c (handle_query) <qSymbols>: If the target supports
10843 tracepoints, give it a chance of looking up symbols. Report
10844 support for fast tracepoints.
10845 (handle_status): Stabilize threads.
10846 (process_serial_event): Adjust.
10847 * server.h (struct fast_tracepoint_jump): Forward declare.
10848 (struct process_info) <fast_tracepoint_jumps>: New field.
10849 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10850 (decode_X_packet, decode_M_packet): Adjust.
10851 (relocate_instruction): Declare.
10852 (in_process_agent_loaded): Declare.
10853 (tracepoint_look_up_symbols): Declare.
10854 (struct fast_tpoint_collect_status): Declare.
10855 (fast_tracepoint_collecting): Declare.
10856 (force_unlock_trace_buffer): Declare.
10857 (handle_tracepoint_bkpts): Declare.
10858 (initialize_low_tracepoint)
10859 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10860 * target.h (struct target_ops) <stabilize_threads,
10861 install_fast_tracepoint_jump_pad>: New fields.
10862 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10863 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10864 [HAVE_STDINT_H]: Include stdint.h.
10865 (trace_debug_1): Rename to ...
10866 (trace_vdebug): ... this.
10867 (trace_debug): Rename to ...
10868 (trace_debug_1): ... this. Add `level' parameter.
10869 (trace_debug): New.
10870 (ATTR_USED, ATTR_NOINLINE): New.
10871 (IP_AGENT_EXPORT): New.
10872 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10873 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10874 (about_to_request_buffer_space, trace_buffer_is_full)
10875 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10876 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10877 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10878 (traceframe_write_count, traceframes_created)
10879 (trace_state_variables)
10880 New renaming defines.
10881 (struct ipa_sym_addresses): New.
10882 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10883 (symbol_list): New.
10884 (ipa_sym_addrs): New.
10885 (all_tracepoint_symbols_looked_up): New.
10886 (in_process_agent_loaded): New.
10887 (write_e_ipa_not_loaded): New.
10888 (maybe_write_ipa_not_loaded): New.
10889 (tracepoint_look_up_symbols): New.
10890 (debug_threads) [IN_PROCESS_AGENT]: New.
10891 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10892 (UNKNOWN_SIDE_EFFECTS): New.
10893 (stop_tracing): New.
10894 (flush_trace_buffer): New.
10895 (stop_tracing_bkpt): New.
10896 (flush_trace_buffer_bkpt): New.
10897 (read_inferior_integer): New.
10898 (read_inferior_uinteger): New.
10899 (read_inferior_data_pointer): New.
10900 (write_inferior_data_pointer): New.
10901 (write_inferior_integer): New.
10902 (write_inferior_uinteger): New.
10903 (struct collect_static_trace_data_action): Delete.
10904 (enum tracepoint_type): New.
10905 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
10906 <actions_str, step_actions, step_actions_str>: Only include in
10907 GDBserver.
fa593d66
PA
10908 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10909 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10910 (tracepoints): Use IP_AGENT_EXPORT.
10911 (last_tracepoint): Don't include in the IPA.
10912 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10913 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10914 (alloced_trace_state_variables): New.
10915 (trace_state_variables): Use IP_AGENT_EXPORT.
10916 (traceframe_t): Delete unused variable.
10917 (circular_trace_buffer): Don't include in the IPA.
10918 (trace_buffer_start): Delete.
10919 (struct trace_buffer_control): New.
10920 (trace_buffer_free): Delete.
10921 (struct ipa_trace_buffer_control): New.
10922 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10923 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10924 New.
10925 (trace_buffer_ctrl): New.
10926 (TRACE_BUFFER_CTRL_CURR): New.
10927 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10928 Reimplement as macros.
10929 (trace_buffer_wrap): Delete.
10930 (traceframe_write_count, traceframe_read_count)
10931 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10932 (struct tracepoint_hit_ctx) <type>: New field.
10933 (struct fast_tracepoint_ctx): New.
10934 (memory_barrier): New.
10935 (cmpxchg): New.
10936 (record_tracepoint_error): Update atomically in the IPA.
10937 (clear_inferior_trace_buffer): New.
10938 (about_to_request_buffer_space): New.
10939 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10940 updating the same buffer.
10941 (add_tracepoint): Default the tracepoint's type to trap
10942 tracepoint, and orig_size to -1.
10943 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10944 internal variables.
10945 (create_trace_state_variable): New parameter `gdb'. Handle it.
10946 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10947 (cmd_qtdp): Handle fast tracepoints.
10948 (cmd_qtdv): Adjust.
10949 (max_jump_pad_size): New.
10950 (gdb_jump_pad_head): New.
10951 (get_jump_space_head): New.
10952 (claim_jump_space): New.
10953 (sort_tracepoints): New.
10954 (MAX_JUMP_SIZE): New.
10955 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10956 IPA.
10957 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10958 support. Upload fast traceframes, and delete internal IPA
10959 breakpoints.
10960 (stop_tracing_handler): New.
10961 (flush_trace_buffer_handler): New.
10962 (cmd_qtstop): Upload fast tracepoints.
10963 (response_tracepoint): Handle fast tracepoints.
10964 (tracepoint_finished_step): Upload fast traceframes. Set the
10965 tracepoint hit context's tracepoint type.
10966 (handle_tracepoint_bkpts): New.
10967 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10968 type. Add comment about fast tracepoints.
10969 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10970 non-existing action_str field.
10971 (get_context_regcache): Handle fast tracepoints.
10972 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10973 to the regcache.
10974 (fast_tracepoint_from_jump_pad_address): New.
10975 (fast_tracepoint_from_ipa_tpoint_address): New.
10976 (collecting_t): New.
10977 (force_unlock_trace_buffer): New.
10978 (fast_tracepoint_collecting): New.
10979 (collecting): New.
10980 (gdb_collect): New.
10981 (write_inferior_data_ptr): New.
10982 (target_tp_heap): New.
10983 (target_malloc): New.
10984 (download_agent_expr): New.
10985 (UALIGN): New.
10986 (download_tracepoints): New.
10987 (download_trace_state_variables): New.
10988 (upload_fast_traceframes): New.
10989 (IPA_FIRST_TRACEFRAME): New.
10990 (IPA_NEXT_TRACEFRAME_1): New.
10991 (IPA_NEXT_TRACEFRAME): New.
10992 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10993 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10994 (gdb_jump_pad_buffer_end): New.
10995 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10996 (initialize_tracepoint): Adjust.
10997 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10998 buffer. Initialize the low module.
10999 * utils.c (PREFIX, TOOLNAME): New.
11000 (malloc_failure): Use PREFIX.
11001 (error): In the IPA, an error causes an exit.
11002 (fatal, warning): Use PREFIX.
11003 (internal_error): Use TOOLNAME.
11004 (NUMCELLS): Increase to 10.
11005 * configure, config.in: Regenerate.
11006
d149dd1d
PA
110072010-06-01 Pedro Alves <pedro@codesourcery.com>
11008
11009 * server.c (handle_query) <qSupported>: Do two passes over the
11010 qSupported string to avoid nesting strtok.
11011
f6528abd
JK
110122010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11013
11014 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11015 (CDEPS): New.
11016 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11017 -Wl,--dynamic-list.
11018 * configure: Regenerate.
11019 * proc-service.list: New.
11020
ca2a87a0
JK
110212010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11022
11023 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11024 New comment.
11025
363a6e9f
OS
110262010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11027
11028 * gdbreplay.c (remote_open): Check error return from socket() call by
11029 its equality to -1 not by it being negative.
11030 * remote-utils.c (remote_open): Likewise.
11031
d23b6cb1
PA
110322010-05-23 Pedro Alves <pedro@codesourcery.com>
11033
11034 * config.h: Regenerate.
11035
28d3cf85
MK
110362010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11037
11038 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11039 doesn't provide PTRACE_GET_THREAD_AREA.
11040
fea36a59
MK
110412010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11042
11043 * linux-m68k-low.c: Include <asm/ptrace.h>
11044 (ps_get_thread_area): Implement.
11045
24b066ba
DE
110462010-05-03 Doug Evans <dje@google.com>
11047
11048 * event-loop.c (struct callback_event): New struct.
11049 (callback_list): New global.
11050 (append_callback_event, delete_callback_event): New functions.
11051 (process_callback): New function.
11052 (start_event_loop): Call it.
11053 * remote-utils.c (NOT_SCHEDULED): Define.
11054 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11055 moved out of readchar.
11056 (readchar): Rewrite. Call reschedule before returning.
11057 (reset_readchar): New function.
11058 (remote_close): Call it.
11059 (process_remaining, reschedule): New functions.
11060 * server.h (callback_handler_func): New typedef.
11061 (append_callback_event, delete_callback_event): Declare.
11062
9836d6ea
PA
110632010-05-03 Pedro Alves <pedro@codesourcery.com>
11064
11065 * proc-service.c (ps_pglobal_lookup): Use
11066 thread_db_look_up_one_symbol.
11067 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11068 parameter. Use it instead of all_symbols_looked_up.
11069 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11070 field.
11071 (all_symbols_looked_up): Don't declare.
11072 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11073 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11074 field.
11075 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11076 Set all_symbols_looked_up here.
11077 (thread_db_look_up_one_symbol): New.
11078 (thread_db_get_tls_address): Adjust.
11079 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11080 thread_db object on the heap, and tentatively set it in the
11081 process structure.
11082 (thread_db_init): Don't set all_symbols_looked_up here.
11083 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11084
7984d532
PA
110852010-05-03 Pedro Alves <pedro@codesourcery.com>
11086
11087 * linux-low.c (linux_kill, linux_detach): Adjust.
11088 (status_pending_p_callback): Remove redundant statement. Check
11089 for !TARGET_WAITIKIND_IGNORE, instead of
11090 TARGET_WAITKIND_STOPPED.
11091 (handle_tracepoints): Make sure LWP is locked. Adjust.
11092 (linux_wait_for_event_1): Adjust.
11093 (linux_cancel_breakpoints): New.
11094 (unsuspend_one_lwp): New.
11095 (unsuspend_all_lwps): New.
11096 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11097 (send_sigstop_callback): Change return type to int, add new
11098 `except' parameter and handle it.
11099 (suspend_and_send_sigstop_callback): New.
11100 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11101 pass them down. If SUSPEND, also increment the lwp's suspend
11102 count.
11103 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11104 (need_step_over_p): Don't consider suspended LWPs.
11105 (start_step_over): Adjust.
11106 (proceed_one_lwp): Change return type to int, add new `except'
11107 parameter and handle it.
11108 (unsuspend_and_proceed_one_lwp): New.
11109 (proceed_all_lwps): Use find_inferior instead of
11110 for_each_inferior.
11111 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11112 also decrement the suspend count of LWPs. Pass `except' down,
11113 instead of hacking its suspend count.
11114 (linux_pause_all): Add `freeze' parameter. Adjust.
11115 (linux_unpause_all): New.
11116 (linux_target_ops): Install linux_unpause_all.
11117 * server.c (handle_status): Adjust.
11118 * target.h (struct target_ops): New fields `unpause_all' and
11119 `cancel_breakpoints'. Add new parameter to `pause_all'.
11120 (pause_all): Add new `freeze' parameter.
11121 (unpause_all): New.
11122 (cancel_breakpoints): New.
11123 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11124 cancel breakpoints.
11125 (cmd_qtstart): Pause threads.
11126 (stop_tracing): Pause threads, and cancel breakpoints.
11127 * win32-low.c (win32_target_ops): Adjust.
11128
e471f25b
PA
111292010-05-03 Pedro Alves <pedro@codesourcery.com>
11130
11131 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11132 the inferior right away from here...
11133 (linux_wait_1): ... to here, and adjust to check the thread's
11134 last_resume_kind instead of the lwp's step or stop_expected flags.
11135
1915ef4f
PA
111362010-05-02 Pedro Alves <pedro@codesourcery.com>
11137
11138 * README: Use consistent `GDB' and `GDBserver' spellings.
11139
f9e39928
PA
111402010-05-02 Pedro Alves <pedro@codesourcery.com>
11141
11142 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11143 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11144 (linux_detach_one_lwp): Assume the lwp is stopped.
11145 (any_thread_of): Delete.
11146 (linux_detach): Stop all lwps here. Don't blindly delete all
11147 breakpoints.
11148 (delete_lwp_callback): New.
11149 (linux_mourn): Delete all lwps of the process that is gone.
11150 (linux_wait_1): Don't delete the last lwp of the process here.
11151 * mem-break.h (mark_breakpoints_out): Declare.
11152 * mem-break.c (mark_breakpoints_out): New.
11153 (free_all_breakpoints): Use it.
11154 * server.c (handle_target_event): If the process is gone, mark
11155 breakpoints out.
11156 * thread-db.c (struct thread_db) <create_bp>: New field.
11157 (thread_db_enable_reporting): Fix prototype. Store a thread event
11158 breakpoint reference in the thread_db struct.
11159 (thread_db_load_search): Clear the thread_db object.
11160 (try_thread_db_load_1): Ditto.
11161 (switch_to_process): New.
11162 (disable_thread_event_reporting): Use it.
11163 (remove_thread_event_breakpoints): New.
11164 (thread_db_detach, thread_db_mourn): Use it.
11165
1e7fc18c
PA
111662010-05-01 Pedro Alves <pedro@codesourcery.com>
11167
11168 * linux-low.c (linux_enable_event_reporting): New.
11169 (linux_wait_for_event_1, handle_extended_wait): Use it.
11170
02fc4de7
PA
111712010-04-30 Pedro Alves <pedro@codesourcery.com>
11172
11173 * linux-low.c (linux_kill_one_lwp, linux_kill)
11174 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11175 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11176 SIGSTOP even if the LWP is stopped.
11177 (send_sigstop_callback): New.
11178 (stop_all_lwps): Use send_sigstop_callback instead.
11179 (linux_resume_one_thread): Adjust.
11180 (proceed_one_lwp): Still proceed an LWP that the client has
11181 requested to stop, if we haven't reported it as stopped yet. Make
11182 sure that LWPs the client want stopped, have a pending SIGSTOP.
11183
bc3b5632
DE
111842010-04-26 Doug Evans <dje@google.com>
11185
ae1ada35
DE
11186 * server.c (handle_general_set): Make static.
11187
bc3b5632
DE
11188 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11189 Print received char after testing for error/eof instead of before.
11190 (input_interrupt): Tweak comment.
11191
65730243
DE
111922010-04-23 Doug Evans <dje@google.com>
11193
11194 * server.c (start_inferior): Print inferior argv if --debug.
11195
a8ae7dc0
AR
111962010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11197
11198 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11199 * nto-x86-low.c: Include server.h
11200
1c07cc19
PM
112012010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11202
11203 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11204 be consistent with other sources of this directory.
11205 (init_registers_amd64): Correct name of source file of this function
11206 in the comment.
11207
e0a61e09
PM
112082010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11209
11210 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11211 64-bit executables.
11212
54709339
PM
112132010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11214
11215 * win32-i386-low.c: Add 64-bit support.
11216 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11217 (init_registers_amd64): Declare.
11218 (mappings): Add 64-bit version of array.
11219 (init_windows_x86): New function.
11220 (the_low_target): Change init_arch field to init_windows_x86.
11221
e8f0053d
PM
112222010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11223
11224 * win32-low.c: Adapt to support also 64-bit architecture.
11225 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11226 (get_image_name): Use SIZE_T type for local variable `done'.
11227 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11228 (toolhelp_get_dll_name): Idem.
11229 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11230 Use uintptr_t typecast to avoid warning.
11231 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11232 (handle_exception): Use phex_nz to avoid warning.
11233 (win32_wait): Remove unused local variable `process'.
11234
c481e77e
PM
112352010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11236
11237 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11238 `amd64-avx.o'.
11239
12ea4b69
PM
112402010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11241
11242 * configure.ac: Use `ws2_32' library for srv_mingw.
11243 * configure: Regenerate.
11244 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11245 * remote-utils.c: Likewise.
11246
f6d1620c
L
112472010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11248
11249 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11250 if __x86_64__ is defined.
11251
8e642873
PM
112522010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11253
11254 * configure: Regenerate.
11255
711e434b
PM
112562010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11257
11258 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11259 * target.h (target_ops): New get_tib_address field.
11260 * win32-low.h (win32_thread_info): Add thread_local_base field.
11261 * win32-low.c (child_add_thread): Add tlb argument.
11262 Set thread_local_base field to TLB.
11263 (get_child_debug_event): Adapt to child_add_thread change.
11264 (win32_get_tib_address): New function.
11265 (win32_target_ops): Set get_tib_address field to
11266 win32_get_tib_address.
11267 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11268
505106cd
PA
112692010-04-12 Pedro Alves <pedro@codesourcery.com>
11270
505106cd
PA
11271 * linux-low.c (linux_mourn): Also remove the process.
11272 * server.c (handle_target_event): Don't remove the process here.
11273 * nto-low.c (nto_mourn): New.
11274 (nto_target_ops): Install it.
11275 * spu-low.c (spu_mourn): New.
11276 (spu_target_ops): Install it.
11277 * win32-low.c (win32_mourn): New.
11278 (win32_target_ops): Install it.
11279
e8470a06
PA
112802010-04-12 Pedro Alves <pedro@codesourcery.com>
11281
11282 * server.h (buffer_xml_printf): Remove redundant `;'.
11283
45ba0d02
PA
112842010-04-12 Pedro Alves <pedro@codesourcery.com>
11285
11286 * regcache.c (set_register_cache): Invalidate regcaches before
11287 changing the register cache layout.
11288 (regcache_invalidate_one): Allow a NULL regcache.
11289 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11290 regcaches before changing the register cache layout or the target
11291 regsets.
11292
59e04013
L
112932010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11294
11295 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11296 variable warning on Linux/x86-64.
11297
8336d594
PA
112982010-04-11 Pedro Alves <pedro@codesourcery.com>
11299
11300 GDBserver disconnected tracing support.
11301
11302 * linux-low.c (linux_remove_process): Delete.
11303 (add_lwp): Don't set last_resume_kind here.
11304 (linux_kill): Use `mourn'.
11305 (linux_detach): Use `thread_db_detach', and `mourn'.
11306 (linux_mourn): New.
11307 (linux_attach_lwp_1): Adjust comment.
11308 (linux_attach): last_resume_kind moved the thread_info; adjust.
11309 (status_pending_p_callback): Adjust.
11310 (linux_wait_for_event_1): Adjust.
11311 (count_events_callback, select_singlestep_lwp_callback)
11312 (select_event_lwp_callback, cancel_breakpoints_callback)
11313 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11314 (proceed_one_lwp): Adjust.
11315 (linux_async): Add debug output.
11316 (linux_thread_stopped): New.
11317 (linux_pause_all): New.
11318 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11319 linux_pause_all.
11320 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11321 (thread_db_free): Delete declaration.
11322 (thread_db_detach, thread_db_mourn): Declare.
11323 * thread-db.c (thread_db_init): Use thread_db_mourn.
11324 (thread_db_free): Delete, split in two.
11325 (disable_thread_event_reporting): New.
11326 (thread_db_detach): New.
11327 (thread_db_mourn): New.
11328
11329 * server.h (struct thread_info) <last_resume_kind>: New field.
11330 <attached>: Add comment.
11331 <gdb_detached>: New field.
11332 (handler_func): Change return type to int.
11333 (handle_serial_event, handle_target_event): Ditto.
11334 (gdb_connected): Declare.
11335 (tracing): Delete.
11336 (disconnected_tracing): Declare.
11337 (stop_tracing): Declare.
11338
11339 * server.c (handle_query) <qSupported>: Report support for
11340 disconnected tracing.
11341 (queue_stop_reply_callback): Account for running threads.
11342 (gdb_wants_thread_stopped): New.
11343 (gdb_wants_all_threads_stopped): New.
11344 (gdb_reattached_process): New.
11345 (handle_status): Clear the `gdb_detached' flag of all processes.
11346 In all-stop, stop all threads.
11347 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11348 (process_serial_event): If the remote connection breaks, or if an
11349 exit was forced with "monitor exit", force an event loop exit.
11350 Handle disconnected tracing on detach.
11351 (handle_serial_event): Adjust.
11352 (handle_target_event): If GDB isn't connected, forward events back
11353 to the inferior, unless the last process exited, in which case,
11354 exit gdbserver. Adjust interface.
11355
11356 * remote-utils.c (remote_open): Don't block in accept. Instead
11357 register an event loop source on the listen socket file
11358 descriptor. Refactor bits into ...
11359 (listen_desc): ... this new global.
11360 (gdb_connected): ... this new function.
11361 (enable_async_notification): ... this new function.
11362 (handle_accept_event): ... this new function.
11363 (remote_close): Clear remote_desc.
11364
11365 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11366
11367 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11368 New fields.
11369 (mourn_inferior): Define.
11370 (target_process_qsupported): Avoid the dangling else problem.
11371 (thread_stopped): Define.
11372 (pause_all): Define.
11373 (target_waitstatus_to_string): Declare.
11374 * target.c (target_waitstatus_to_string): New.
11375
11376 * tracepoint.c (tracing): Make extern.
11377 (disconnected_tracing): New.
11378 (stop_tracing): Make extern. Handle tracing stops due to GDB
11379 disconnecting.
11380 (cmd_qtdisconnected): New.
11381 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11382 (handle_tracepoint_general_set): Handle QTDisconnected.
11383
11384 * event-loop.c (event_handler_func): Change return type to int.
11385 (process_event): Bail out if the event handler wants the event
11386 loop to stop.
11387 (handle_file_event): Ditto.
11388 (start_event_loop): Bail out if the event handler wants the event
11389 loop to stop.
11390
11391 * nto-low.c (nto_target_ops): Adjust.
11392 * spu-low.c (spu_wait): Don't remove the process here.
11393 (spu_target_ops): Adjust.
11394 * win32-low.c (win32_wait): Don't remove the process here.
11395 (win32_target_ops): Adjust.
11396
5d267c4c
PA
113972010-04-11 Pedro Alves <pedro@codesourcery.com>
11398
11399 * regcache.c (realloc_register_cache): Invalidate inferior's
11400 regcache before recreating it.
11401
623ccd72
PA
114022010-04-09 Pedro Alves <pedro@codesourcery.com>
11403
11404 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11405
219f2f23
PA
114062010-04-09 Stan Shebs <stan@codesourcery.com>
11407 Pedro Alves <pedro@codesourcery.com>
11408
11409 * server.h (LONGEST): New.
11410 (struct thread_info) <while_stepping>: New field.
11411 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11412 Declare.
11413 (initialize_tracepoint, handle_tracepoint_general_set)
11414 (handle_tracepoint_query, tracepoint_finished_step)
11415 (tracepoint_was_hit, release_while_stepping_state_list):
11416 (current_traceframe): Declare.
11417 * server.c (handle_general_set): Handle tracepoint packets.
11418 (read_memory): New.
11419 (write_memory): New.
11420 (handle_search_memory_1): Use read_memory.
11421 (handle_query): Report support for conditional tracepoints, trace
11422 state variables, and tracepoint sources. Handle tracepoint
11423 queries.
11424 (main): Initialize the tracepoints module.
11425 (process_serial_event): Handle traceframe reads/writes.
11426
11427 * linux-low.c (handle_tracepoints): New.
11428 (linux_wait_1): Call it.
11429 (linux_resume_one_lwp): Handle while-stepping.
11430 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11431 (linux_target_ops): Install them.
11432 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11433 New field.
11434 * linux-x86-low.c (x86_supports_tracepoints): New.
11435 (the_low_target). Install it.
11436
11437 * mem-break.h (delete_breakpoint): Declare.
11438 * mem-break.c (delete_breakpoint): Make external.
11439
11440 * target.h (struct target_ops): Add `supports_tracepoints',
11441 `read_pc', and `write_pc' fields.
11442 (target_supports_tracepoints): Define.
11443 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11444 (phex_nz): New.
11445
11446 * regcache.h (struct regcache) <registers_owned>: New field.
11447 (init_register_cache, regcache_cpy): Declare.
11448 (regcache_read_pc, regcache_write_pc): Declare.
11449 (register_cache_size): Declare.
11450 (supply_regblock): Declare.
11451 * regcache.c (init_register_cache): New.
11452 (new_register_cache): Use it.
11453 (regcache_cpy): New.
11454 (register_cache_size): New.
11455 (supply_regblock): New.
11456 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 11457
219f2f23
PA
11458 * tracepoint.c: New.
11459
11460 * Makefile.in (OBS): Add tracepoint.o.
11461 (tracepoint.o): New rule.
11462
3a13a53b
L
114632010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11464
11465 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11466 (i386-mmx.o): New.
11467 (i386-mmx.c): Likewise.
11468 (i386-mmx-linux.o): Likewise.
11469 (i386-mmx-linux.c): Likewise.
11470
11471 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11472 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11473 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11474 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11475
11476 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11477 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11478 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11479
1570b33e
L
114802010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11481
11482 * Makefile.in (clean): Updated.
11483 (i386-avx.o): New.
11484 (i386-avx.c): Likewise.
11485 (i386-avx-linux.o): Likewise.
11486 (i386-avx-linux.c): Likewise.
11487 (amd64-avx.o): Likewise.
11488 (amd64-avx.c): Likewise.
11489 (amd64-avx-linux.o): Likewise.
11490 (amd64-avx-linux.c): Likewise.
11491
11492 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11493 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11494 (srv_amd64_regobj): Add amd64-avx.o.
11495 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11496 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11497 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11498 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11499 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11500 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11501 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11502
11503 * i387-fp.c: Include "i386-xstate.h".
11504 (i387_xsave): New.
11505 (i387_cache_to_xsave): Likewise.
11506 (i387_xsave_to_cache): Likewise.
11507 (x86_xcr0): Likewise.
11508
11509 * i387-fp.h (i387_cache_to_xsave): Likewise.
11510 (i387_xsave_to_cache): Likewise.
11511 (x86_xcr0): Likewise.
11512
11513 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11514 * linux-crisv32-low.c (target_regsets): Likewise.
11515 * linux-m68k-low.c (target_regsets): Likewise.
11516 * linux-mips-low.c (target_regsets): Likewise.
11517 * linux-ppc-low.c (target_regsets): Likewise.
11518 * linux-s390-low.c (target_regsets): Likewise.
11519 * linux-sh-low.c (target_regsets): Likewise.
11520 * linux-sparc-low.c (target_regsets): Likewise.
11521 * linux-xtensa-low.c (target_regsets): Likewise.
11522
11523 * linux-low.c: Include <sys/uio.h>.
11524 (regsets_fetch_inferior_registers): Support nt_type.
11525 (regsets_store_inferior_registers): Likewise.
11526 (linux_process_qsupported): New.
11527 (linux_target_ops): Add linux_process_qsupported.
11528
11529 * linux-low.h (regset_info): Add nt_type.
11530 (linux_target_ops): Add process_qsupported.
11531
11532 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11533 and <sys/uio.h>.
11534 (init_registers_i386_avx_linux): New.
11535 (init_registers_amd64_avx_linux): Likewise.
11536 (xmltarget_i386_linux_no_xml): Likewise.
11537 (xmltarget_amd64_linux_no_xml): Likewise.
11538 (PTRACE_GETREGSET): Likewise.
11539 (PTRACE_SETREGSET): Likewise.
11540 (x86_fill_xstateregset): Likewise.
11541 (x86_store_xstateregset): Likewise.
11542 (use_xml): Likewise.
11543 (x86_linux_update_xmltarget): Likewise.
11544 (x86_linux_process_qsupported): Likewise.
11545 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11546 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11547 init_registers_i386_linux here. Call
11548 x86_linux_update_xmltarget.
11549 (the_low_target): Add x86_linux_process_qsupported.
11550
11551 * server.c (handle_query): Call target_process_qsupported.
11552
11553 * target.h (target_ops): Add process_qsupported.
11554 (target_process_qsupported): New.
11555
fc7238bb
PA
115562010-04-03 Pedro Alves <pedro@codesourcery.com>
11557
11558 * inferiors.c (add_thread): Set last_status kind to
11559 TARGET_WAITKIND_IGNORE.
11560 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11561 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11562 (linux_wait_1): Move `thread' local definition to block that uses
11563 it. Don't NULL initialize `event_child'.
11564 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11565 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11566 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11567
bdabb078
PA
115682010-04-01 Pedro Alves <pedro@codesourcery.com>
11569
11570 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11571 an extended waitstatus, or by a watchpoint.
11572 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11573 thread was stepping or has been stopped by a watchpoint.
11574
d3bbe7a0
PA
115752010-04-01 Pedro Alves <pedro@codesourcery.com>
11576
11577 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11578 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11579 of another, then delete the previous, and validate all
11580 breakpoints.
11581 (validate_inserted_breakpoint): New.
11582 (delete_disabled_breakpoints): New.
11583 (validate_breakpoints): New.
11584 (check_mem_read): Validate breakpoints before trusting their
11585 shadow. Delete disabled breakpoints.
11586 (check_mem_write): Validate breakpoints before trusting they
11587 should be inserted. Delete disabled breakpoints.
11588 * mem-break.h (validate_breakpoints):
11589 * server.c (handle_query): Validate breakpoints when we see a
11590 qSymbol query.
11591
8b07ae33
PA
115922010-04-01 Pedro Alves <pedro@codesourcery.com>
11593
11594 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11595 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11596 if we could tell there's a GDB breakpoint at stop_pc.
11597 (need_step_over_p): Don't do a step over if we find a GDB
11598 breakpoint at the resume PC.
11599
11600 * mem-break.c (struct raw_breakpoint): New.
11601 (enum bkpt_type): New type `gdb_breakpoint'.
11602 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11603 fields. New field `raw'.
11604 (find_raw_breakpoint_at): New.
11605 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11606 breakpoint instead.
11607 (set_breakpoint_at): Adjust.
11608 (delete_raw_breakpoint): New.
11609 (release_breakpoint): New.
11610 (delete_breakpoint): Rename to...
11611 (delete_breakpoint_1): ... this. Add proc parameter. Use
11612 release_breakpoint. Return ENOENT.
11613 (delete_breakpoint): Reimplement.
11614 (find_breakpoint_at): Delete.
11615 (find_gdb_breakpoint_at): New.
11616 (delete_breakpoint_at): Delete.
11617 (set_gdb_breakpoint_at): New.
11618 (delete_gdb_breakpoint_at): New.
11619 (gdb_breakpoint_here): New.
11620 (set_reinsert_breakpoint): Use release_breakpoint.
11621 (uninsert_breakpoint): Rename to ...
11622 (uninsert_raw_breakpoint): ... this.
11623 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11624 (reinsert_raw_breakpoint): Change parameter type to
11625 raw_breakpoint.
11626 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11627 instead.
11628 (check_breakpoints): Adjust. Use release_breakpoint.
11629 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11630 (breakpoint_inserted_here): Ditto.
11631 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11632 Don't trust the breakpoint's shadow if it is not inserted.
11633 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11634 (delete_all_breakpoints): Adjust.
11635 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11636 use delete_breakpoint_1.
11637
11638 * mem-break.h (breakpoints_supported): Delete declaration.
11639 (set_gdb_breakpoint_at): Declare.
11640 (gdb_breakpoint_here): Declare.
11641 (delete_breakpoint_at): Delete.
11642 (delete_gdb_breakpoint_at): Declare.
11643
11644 * server.h (struct raw_breakpoint): Forward declare.
11645 (struct process_info): New field `raw_breakpoints'.
11646
11647 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11648 breakpoints.
11649
6bf5e0ba
PA
116502010-03-24 Pedro Alves <pedro@codesourcery.com>
11651
11652 * linux-low.c (status_pending_p_callback): Fix comment.
11653 (linux_wait_for_event_1): Move most of the internal breakpoint
11654 handling from here...
11655 (linux_wait_1): ... to here.
11656 (count_events_callback): New.
11657 (select_singlestep_lwp_callback): New.
11658 (select_event_lwp_callback): New.
11659 (cancel_breakpoints_callback): New.
11660 (select_event_lwp): New.
11661 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11662 priority to all LWPs that have had events that should be reported
11663 to the client. Cancel breakpoints when about to reporting the
11664 event to the client, not while stopping lwps. No longer cancel
11665 finished single-steps here.
11666 (cancel_finished_single_step): Delete.
11667 (cancel_finished_single_steps): Delete.
11668
414a389f
PA
116692010-03-24 Pedro Alves <pedro@codesourcery.com>
11670
11671 * mem-break.c (enum bkpt_type): New.
11672 (struct breakpoint): New field `type'.
11673 (set_breakpoint_at): Change return type to struct breakpoint
11674 pointer. Set type to `other_breakpoint' by default.
11675 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11676 in the breakpoint list.
11677 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11678 (reinsert_breakpoint): Rename to ...
11679 (reinsert_raw_breakpoint): ... this.
11680 (reinsert_breakpoints_at): Adjust.
11681 * mem-break.h (struct breakpoint): Declare.
11682 (set_breakpoint_at): Change return type to struct breakpoint
11683 pointer.
11684
2280c721
PA
116852010-03-24 Pedro Alves <pedro@codesourcery.com>
11686
11687 * server.c (handle_query): Assign, not compare.
11688
d50171e4
PA
116892010-03-24 Pedro Alves <pedro@codesourcery.com>
11690
11691 Teach linux gdbserver to step-over-breakpoints.
11692
11693 * linux-low.c (can_hardware_single_step): New.
11694 (supports_breakpoints): New.
11695 (handle_extended_wait): If stopping threads, read the stop pc of
11696 the new cloned LWP.
11697 (get_pc): New.
11698 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11699 low target doesn't support retrieving the PC.
11700 (add_lwp): Set last_resume_kind to resume_continue.
11701 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11702 (linux_attach): Don't clear stop_expected. Set the lwp's
11703 last_resume_kind to resume_stop.
11704 (linux_detach_one_lwp): Don't check for removed breakpoints.
11705 (check_removed_breakpoint): Delete.
11706 (status_pending_p): Rename to ...
11707 (status_pending_p_callback): ... this. Don't check for removed
11708 breakpoints. Don't consider threads that are stopped from GDB's
11709 perspective.
11710 (linux_wait_for_lwp): Always read the stop_pc here.
11711 (cancel_breakpoint): New.
11712 (step_over_bkpt): New global.
11713 (linux_wait_for_event_1): Implement stepping over breakpoints.
11714 (gdb_wants_lwp_stopped): New.
11715 (gdb_wants_all_stopped): New.
11716 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11717 single-step traps here. Store the thread's last reported target
11718 wait status.
11719 (send_sigstop): Don't clear stop_expected. Always set it,
11720 instead.
11721 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11722 (cancel_finished_single_step): New.
11723 (cancel_finished_single_steps): New.
11724 (wait_for_sigstop): Don't cancel finished single-step traps here.
11725 (linux_resume_one_lwp): Don't check for removed breakpoints.
11726 Don't set `step' on non-hardware step archs.
11727 (linux_set_resume_request): Ignore resume_stop requests if already
11728 stopping or stopped. Set the lwp's last_resume_kind.
11729 (resume_status_pending_p): Don't check for removed breakpoints.
11730 (need_step_over_p): New.
11731 (start_step_over): New.
11732 (finish_step_over): New.
11733 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11734 requests. Clear the thread's last reported target waitstatus.
11735 Don't use the `suspended' flag. Don't consider pending breakpoints.
11736 (linux_resume): Start a step-over if necessary.
11737 (proceed_one_lwp): New.
11738 (proceed_all_lwps): New.
11739 (unstop_all_lwps): New.
11740 * linux-low.h (struct lwp_info): Rewrite comment for the
11741 `suspended' flag. Add the `stop_pc' field. Delete the
11742 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11743 Add `'last_resume_kind' and `need_step_over' fields.
11744 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11745 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11746 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11747 (set_raw_breakpoint_at): New.
11748 (set_breakpoint_at): Rewrite to use it.
11749 (reinsert_breakpoint_handler): Delete.
11750 (set_reinsert_breakpoint): New.
11751 (reinsert_breakpoint_by_bp): Delete.
11752 (delete_reinsert_breakpoints): New.
11753 (uninsert_breakpoint): Rewrite.
11754 (uninsert_breakpoints_at): New.
11755 (reinsert_breakpoint): Rewrite.
11756 (reinsert_breakpoints_at): New.
11757 (check_breakpoints): Rewrite.
11758 (breakpoint_here): New.
11759 (breakpoint_inserted_here): New.
11760 (check_mem_read): Adjust.
11761 * mem-break.h (breakpoints_supported, breakpoint_here)
11762 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11763 (reinsert_breakpoint_by_bp): Delete declaration.
11764 (delete_reinsert_breakpoints): Declare.
11765 (reinsert_breakpoint): Delete declaration.
11766 (reinsert_breakpoints_at): Declare.
11767 (uninsert_breakpoint): Delete declaration.
11768 (uninsert_breakpoints_at): Declare.
11769 (check_breakpoints): Adjust prototype.
11770 * server.h: Adjust include order.
11771 (struct thread_info): Declare here. Add a `last_status' field.
11772
30ba68cb
MS
117732010-03-23 Michael Snyder <msnyder@vmware.com>
11774
11775 * server.c (crc32): New function.
11776 (handle_query): Add handling for 'qCRC:' request.
11777
b9a881c2
PA
117782010-03-23 Pedro Alves <pedro@codesourcery.com>
11779
11780 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11781 lwp had been stopped by a watchpoint.
11782
e92d13d5
PA
117832010-03-16 Pedro Alves <pedro@codesourcery.com>
11784
11785 * server.h (internal_error): Declare.
11786 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11787 * utils.c (internal_error): New function.
11788
64daa791
AS
117892010-03-15 Andreas Schwab <schwab@redhat.com>
11790
11791 * configure.srv: Fix typo setting srv_regobj.
11792
f52cd8cd
PA
117932010-03-15 Pedro Alves <pedro@codesourcery.com>
11794
11795 * linux-low.c (fetch_register): Avoid passing a non string literal
11796 format to `error'.
11797 (usr_store_inferior_registers): Ditto.
11798
93ae6fdc
PA
117992010-03-14 Pedro Alves <pedro@codesourcery.com>
11800
11801 * linux-low.c (linux_write_memory): Bail out early if peeking
11802 memory failed.
11803
c3adc08c
PA
118042010-03-14 Pedro Alves <pedro@codesourcery.com>
11805
11806 * linux-low.h (struct lwp_info): New fields
11807 `stopped_by_watchpoint' and `stopped_data_address'.
11808 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11809 here, and cache them in the lwp object.
11810 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11811 directly.
11812 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11813 field.
11814 (linux_stopped_by_watchpoint): Rewrite.
11815 (linux_stopped_data_address): Rewrite.
11816
bce522a2
PA
118172010-03-06 Simo Melenius <simo.melenius@iki.fi>
11818
11819 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11820 switching the current inferior, not before.
11821
90884b2b
L
118222010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11823
11824 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11825 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11826 i386-linux.c and amd64-linux.c.
11827 (reg-i386.o): Removed.
11828 (reg-i386.c): Likewise.
11829 (reg-i386-linux.o): Likewise.
11830 (reg-i386-linux.c): Likewise.
11831 (reg-x86-64.o): Likewise.
11832 (reg-x86-64.c): Likewise.
11833 (reg-x86-64-linux.o): Likewise.
11834 (reg-x86-64-linux.c): Likewise.
11835 (i386.o): New.
11836 (i386.c): Likewise.
11837 (i386-linux.o): Likewise.
11838 (i386-linux.c): Likewise.
11839 (amd64.o): Likewise.
11840 (amd64.c): Likewise.
11841 (amd64-linux.o): Likewise.
11842 (amd64-linux.c): Likewise.
11843
11844 * configure.srv (srv_i386_regobj): New.
11845 (srv_i386_linux_regobj): Likewise.
11846 (srv_amd64_regobj): Likewise.
11847 (srv_amd64_linux_regobj): Likewise.
11848 (srv_i386_32bit_xmlfiles): Likewise.
11849 (srv_i386_64bit_xmlfiles): Likewise.
11850 (srv_i386_xmlfiles): Likewise.
11851 (srv_amd64_xmlfiles): Likewise.
11852 (srv_i386_linux_xmlfiles): Likewise.
11853 (srv_amd64_linux_xmlfiles): Likewise.
11854 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11855 srv_xmlfiles to $srv_i386_xmlfiles.
11856 (i[34567]86-*-mingw32ce*): Likewise.
11857 (i[34567]86-*-mingw*): Likewise.
11858 (i[34567]86-*-nto*): Likewise.
11859 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11860 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11861 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11862 (x86_64-*-linux*): Likewise.
11863
11864 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11865 (init_registers_amd64_linux): New.
11866 (x86_arch_setup): Replace init_registers_x86_64_linux with
11867 init_registers_amd64_linux.
11868
193f13e6
MK
118692010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11870
11871 * configure.ac: Check for libdl. If it is not available link against
11872 static libthread_db.
11873 * configure: Regenerate.
11874
85d721b8
PA
118752010-02-22 Pedro Alves <pedro@codesourcery.com>
11876
11877 PR9605
11878
11879 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11880 handing a read watchpoint.
11881 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11882
6076632b
DE
118832010-02-12 Doug Evans <dje@google.com>
11884
11885 * linux-low.c (linux_supports_tracefork_flag): Document.
11886 (linux_look_up_symbols): Add comment.
11887
3327ccf7
L
118882010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11889
11890 * regcache.c (supply_register): Clear regcache if buf is NULL.
11891
0718675c 118922010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 11893 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
11894
11895 * inferiors.c (find_inferior): Add function documentation.
11896 (unloaded_dll): Handle the case where the unloaded dll has not
11897 been previously registered in the dll list.
11898
177321bd
DJ
118992010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11900
11901 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11902 (thumb2_breakpoint): New.
11903 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11904
2b009048
DJ
119052010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11906
11907 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11908 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11909 breakpoints.
11910
3be029c7
PA
119112010-01-21 Pedro Alves <pedro@codesourcery.com>
11912
11913 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11914
18f5de3b
JK
119152010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11916
11917 * linux-s390-low.c (s390_collect_ptrace_register)
11918 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11919
3743bb4f
DE
119202010-01-21 Doug Evans <dje@google.com>
11921
14ce3065
DE
11922 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11923 (PTRACE_ARG4_TYPE): New macro.
11924 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11925 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11926 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11927 (usr_store_inferior_registers): Ditto.
11928 (linux_read_memory, linux_write_memory): Ditto.
11929 (linux_test_for_tracefork): Ditto.
11930
3743bb4f
DE
11931 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11932 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11933
8b315be5
PA
119342010-01-21 Pedro Alves <pedro@codesourcery.com>
11935
11936 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11937 target.
11938
85492558
PA
119392010-01-21 Pedro Alves <pedro@codesourcery.com>
11940
11941 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11942 prototype to take a regcache. Adjust.
11943
442ea881
PA
119442010-01-20 Pedro Alves <pedro@codesourcery.com>
11945
11946 * regcache.h (struct thread_info): Forward declare.
11947 (struct regcache): New.
11948 (new_register_cache): Adjust prototype.
11949 (get_thread_regcache): Declare.
11950 (free_register_cache): Adjust prototype.
11951 (registers_to_string, registers_from_string): Ditto.
11952 (supply_register, supply_register_by_name, collect_register)
11953 (collect_register_as_string, collect_register_by_name): Ditto.
11954 * regcache.c (struct inferior_regcache_data): Delete.
11955 (get_regcache): Rename to ...
11956 (get_thread_regcache): ... this. Adjust. Switch inferior before
11957 fetching registers.
11958 (regcache_invalidate_one): Adjust.
11959 (regcache_invalidate): Fix prototype.
11960 (new_register_cache): Return the new register cache.
11961 (free_register_cache): Change prototype.
11962 (realloc_register_cache): Adjust.
11963 (registers_to_string): Change prototype to take a regcache. Adjust.
11964 (registers_from_string): Ditto.
11965 (register_data): Ditto.
11966 (supply_register): Ditto.
11967 (supply_register_by_name): Ditto.
11968 (collect_register): Ditto.
11969 (collect_register_as_string): Ditto.
11970 (collect_register_by_name): Ditto.
11971 * server.c (process_serial_event): Adjust.
11972 * linux-low.h (regset_fill_func, regset_store_func): Change
11973 prototype.
11974 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11975 Change prototype.
11976 * linux-low.c (get_stop_pc): Adjust.
11977 (check_removed_breakpoint): Adjust.
11978 (linux_wait_for_event): Adjust.
11979 (linux_resume_one_lwp): Adjust.
11980 (fetch_register): Add regcache parameter. Adjust.
11981 (usr_store_inferior_registers): Ditto.
11982 (regsets_fetch_inferior_registers): Ditto.
11983 (regsets_store_inferior_registers): Ditto.
11984 (linux_fetch_registers, linux_store_registers): Ditto.
11985 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11986 regcache. Adjust.
43aaf8b6
PA
11987 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11988 Ditto.
442ea881
PA
11989 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11990 prototype to take a regcache.
11991 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11992 * remote-utils.c (convert_ascii_to_int, outreg)
11993 (prepare_resume_reply): Change prototype to take a regcache.
11994 Adjust.
11995 * target.h (struct target_ops) <fetch_registers, store_registers>:
11996 Change prototype to take a regcache.
11997 (fetch_inferior_registers, store_inferior_registers): Change
11998 prototype to take a regcache. Adjust.
11999 * proc-service.c (ps_lgetregs): Adjust.
12000 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12001 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12002 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12003 take a regcache. Adjust.
12004 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12005 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12006 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12007 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12008 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12009 (cris_cannot_fetch_register):
12010 (cris_breakpoint_at): Change prototype to take a regcache.
12011 Adjust.
12012 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12013 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12014 to take a regcache. Adjust.
12015 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12016 Adjust.
12017 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12018 take a regcache. Adjust.
12019 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12020 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12021 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12022 * linux-mips-low.c (mips_get_pc):
12023 (mips_set_pc): Change prototype to take a regcache. Adjust.
12024 (mips_reinsert_addr): Adjust.
12025 (mips_collect_register): Change prototype to take a regcache.
12026 Adjust.
12027 (mips_supply_register):
12028 (mips_collect_register_32bit, mips_supply_register_32bit)
12029 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12030 (mips_store_fpregset): Ditto.
43aaf8b6
PA
12031 * linux-ppc-low.c (ppc_supply_ptrace_register)
12032 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
12033 (parse_spufs_run): Adjust.
12034 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12035 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12036 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12037 take a regcache. Adjust.
12038 * linux-s390-low.c (s390_collect_ptrace_register)
12039 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12040 (s390_set_pc): Change prototype to take a regcache. Adjust.
12041 (s390_arch_setup): Adjust.
12042 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12043 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12044 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12045 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12046 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12047 regcache. Adjust.
12048 (sparc_breakpoint_at): Adjust.
12049 * linux-xtensa-low.c (xtensa_fill_gregset):
12050 (xtensa_store_gregset):
12051 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12052 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12053 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12054 prototype to take a regcache. Adjust.
12055 * win32-arm-low.c (arm_fetch_inferior_register)
12056 (arm_store_inferior_register): Change prototype to take a
12057 regcache. Adjust.
12058 * win32-i386-low.c (i386_fetch_inferior_register)
12059 (i386_store_inferior_register): Change prototype to take a
12060 regcache. Adjust.
12061 * win32-low.c (child_fetch_inferior_registers)
12062 (child_store_inferior_registers): Change prototype to take a
12063 regcache. Adjust.
12064 (win32_wait): Adjust.
12065 (win32_fetch_inferior_registers): Change prototype to take a
12066 regcache. Adjust.
12067 (win32_store_inferior_registers): Adjust.
12068 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12069 store_inferior_register>: Change prototype to take a regcache.
12070
60c3d7b0
DE
120712010-01-20 Doug Evans <dje@google.com>
12072
12073 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12074 #ifdef.
12075 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 12076 (W_STOPCODE): Provide definition if missing.
60c3d7b0 12077
dc146f7c
VP
120782010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12079
12080 * linux-low.c (linux_core_of_thread): New.
12081 (compare_ints, show_process, list_threads): New.
12082 (linux_qxfer_osdata): Report threads and cores.
12083 (linux_target_op): Register linux_core_of_thread.
12084 * remote-utils.c (prepare_resume_reply): Report the core.
12085 (buffer_xml_printf): Support %d specifier.
12086 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12087 New.
12088 (handle_query): Handle qXfer:threads. Announce availability
12089 thereof.
12090 * target.h (struct target_ops): New field core_of_thread.
12091
7803799a
UW
120922010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12093
12094 * Makefile.in (clean): Remove new generated files.
12095 (reg-s390.o, reg-s390.c): Remove rules.
12096 (reg-s390x.o, reg-s390x.c): Likewise.
12097 (s390-linux32.o, s390-linux32.c): Add rules.
12098 (s390-linux64.o, s390-linux64.c): Likewise.
12099 (s390x-linux64.o, s390x-linux64.c): Likewise.
12100 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12101 * linux-s390-low.c: Include <elf.h>.
12102 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12103 (init_registers_s390): Remove prototype.
12104 (init_registers_s390x): Likewise.
12105 (init_registers_s390_linux32): Add prototype.
12106 (init_registers_s390_linux64): Likewise.
12107 (init_registers_s390x_linux64): Likewise.
12108 (s390_num_regs_3264): New define.
12109 (s390_regmap_3264): New global variable.
12110 (s390_cannot_fetch_register): Remove obsolete check.
12111 (s390_cannot_store_register): Likewise.
12112 (s390_collect_ptrace_register): Handle upper/lower register halves.
12113 (s390_supply_ptrace_register): Likewise.
12114 (s390_fill_gregset): Update to register number changes.
12115 (s390_get_hwcap): New routine.
12116 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12117 Install appropriate regmap and register set.
12118
6e7ffa39
JB
121192010-01-01 Joel Brobecker <brobecker@adacore.com>
12120
12121 * server.c (gdbserver_version): Update copyright year to 2010.
12122 * gdbreplay.c (gdbreplay_version): Likewise.
12123
957f3f49
DE
121242009-12-28 Doug Evans <dje@google.com>
12125
12126 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12127 elf/external.h. Include <elf.h> instead but only if necessary.
12128
ca5c370d
PA
121292009-12-28 Pedro Alves <pedro@codesourcery.com>
12130
12131 * linux-low.c (linux_remove_process): Remove `detaching'
12132 parameter. Don't release/detach from thread_db here.
12133 (linux_kill): Release/detach from thread_db here, ...
12134 (linux_detach): ... and here, before actually detaching.
12135 (linux_wait_1): ... and here, when a process exits.
12136 * thread-db.c (any_thread_of): New.
12137 (thread_db_free): Switch the current inferior to a thread of the
12138 passed in process.
12139
4ee62156
DE
121402009-12-21 Doug Evans <dje@google.com>
12141
d90e6a88
DE
12142 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12143
c5f62d5f
DE
12144 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12145 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12146 warning ifndef __NR_tkill. Move setting of errno there too.
12147 Delete unnecessary resetting of errno after syscall.
12148 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12149
10e86dd7
DE
12150 * configure.ac: Check for dladdr.
12151 * config.in: Regenerate.
12152 * configure: Regenerate.
12153 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12154 (try_thread_db_load): Update.
12155
4ee62156
DE
12156 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12157
00f515da
DE
121582009-12-18 Doug Evans <dje@google.com>
12159
e9464885
DE
12160 * event-loop.c: Include unistd.h if it exists.
12161
07d4f67e
DE
12162 * linux-low.c (my_waitpid): Move definition away from being in
12163 between linux_tracefork_child/linux_test_for_tracefork.
12164
00f515da
DE
12165 * gdb_proc_service.h (psaddr_t): Fix type.
12166 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12167 signature to match glibc.
12168
1de1badb
DE
121692009-12-16 Doug Evans <dje@google.com>
12170
12171 * linux-low.c (linux_read_memory): Fix argument to read.
12172
aeeb81d1
PA
121732009-11-26 Pedro Alves <pedro@codesourcery.com>
12174
12175 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12176 events, don't leave current_inferior pointing at null.
12177
10357975
PA
121782009-11-26 Pedro Alves <pedro@codesourcery.com>
12179
12180 * win32-low.c (LOG): Delete.
12181 (OUTMSG): Output to stderr.
12182 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12183 on compile time LOG macro.
12184 (win32_wait): Fix debug output.
12185
cf6e3471
PA
121862009-11-26 Pedro Alves <pedro@codesourcery.com>
12187
12188 * win32-low.c (win32_add_one_solib): If the dll name is
12189 "ntdll.dll", prepend the system directory to the dll path.
12190
0c85e18e
MK
121912009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12192
12193 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12194
9ac544ce 121952009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 12196 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
12197
12198 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12199 * configure.ac: Check for __mcoldfire__ and set
12200 gdb_cv_m68k_is_coldfire.
12201 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12202 reg-cf.o and reg-m68k.o.
12203 * configure: Regenerated.
12204
fd7dd3e6
PA
122052009-11-16 Pedro Alves <pedro@codesourcery.com>
12206
12207 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12208 Pass it to thread_db_free.
12209 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12210 proper `detaching' argument to linux_remove_process.
12211 * linux-low.h (thread_db_free): Add `detaching' parameter.
12212 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12213 to thread_db_free.
12214 (thread_db_free): Add `detaching' parameter. Only
12215 call td_ta_clear_event if detaching from process.
12216
75aa492e
MK
122172009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12218
12219 * thread-db.c (thread_db_free): Fix typo.
12220
21e1bee4
PP
122212009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12222
12223 PR gdb/10838
12224 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12225
8838b45e
NS
122262009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12227
12228 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12229 with an i686 compiler.
12230 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12231 needed.
12232 * configure: Rebuilt.
12233
8a35fb51
SL
122342009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12235
12236 PR gdb/10783
12237
12238 * server.c (handle_search_memory_1): Correct read_addr initialization
12239 in loop for searching subsequent chunks.
12240
96f15937
PP
122412009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12242
12243 * configure.ac: New --with-libthread-db option.
12244 * thread-db.c: Allow direct dependence on libthread_db.
12245 (thread_db_free): Adjust.
12246 * config.in: Regenerate.
12247 * configure: Likewise.
889bf7c5 12248
5f7d1694
PP
122492009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12250
12251 PR gdb/10757
12252 * thread-db.c (attach_thread): New function.
12253 (maybe_attach_thread): Return success/failure.
12254 (find_new_threads_callback): Adjust.
889bf7c5
PA
12255 (thread_db_find_new_threads): Loop until no new threads.
12256
88e3b899
PA
122572009-10-13 Pedro Alves <pedro@codesourcery.com>
12258
12259 * proc-service.c (ps_lgetregs): Formatting.
12260
cdbfd419
PP
122612009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12262
12263 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12264 * configure.ac: Adjust.
12265 * linux-low.h (struct process_info_private): Move members to struct
12266 thread_db.
12267 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12268 * linux-low.c (linux_remove_process): Adjust.
12269 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12270 * server.c (handle_query): Move code ...
12271 (handle_monitor_command): ... here. New function.
12272 * target.h (struct target_ops): New member.
12273 * thread-db.c (struct thread_db): New.
12274 (libthread_db_search_path): New variable.
12275 (thread_db_create_event, thread_db_enable_reporting)
12276 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12277 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12278 (try_thread_db_load_1, dladdr_to_soname): New functions.
12279 (try_thread_db_load, thread_db_load_search): New functions.
12280 (thread_db_init): Search for libthread_db.
12281 (thread_db_free): New function.
12282 (thread_db_handle_monitor_command): Likewise.
12283 * config.in: Regenerate.
12284 * configure: Regenerate.
889bf7c5 12285
4168d2d6
UW
122862009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12287
12288 * spu-low.c (spu_kill): Wait for inferior to terminate.
12289 Call clear_inferiors.
12290 (spu_detach): Call clear_inferiors.
12291
81ecdfbb
RW
122922009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12293
12294 * aclocal.m4: Regenerate.
12295 * config.in: Likewise.
12296 * configure: Likewise.
12297
0b9ff2c0
UW
122982009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12299
12300 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12301 (parse_spufs_run): New function.
12302 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12303 (ppc_breakpoint_at): Handle SPU breakpoints.
12304
efcbbd14
UW
123052009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12306
12307 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12308 (SPUFS_MAGIC): Define.
12309 (spu_enumerate_spu_ids): New function.
12310 (linux_qxfer_spu): New function.
12311 (linux_target_ops): Install linux_qxfer_spu.
12312
f4d9bade
UW
123132009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12314
12315 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12316 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12317 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12318 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12319 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12320 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12321 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12322 (init_registers_powerpc_cell32l): Add prototype.
12323 (init_registers_powerpc_cell64l): Likewise.
12324 (ppc_arch_setup): Detect Cell/B.E. architecture.
12325
96e946ca
RW
123262009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12327
12328 * Makefile.in (datarootdir): New variable.
12329
58d6951d
DJ
123302009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12331
12332 * linux-low.c (linux_write_memory): Update debugging output.
12333 * Makefile.in (clean): Add new descriptions.
12334 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12335 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12336 * configure.srv: Add new files for arm*-*-linux*.
12337 * linux-arm-low.c: Add new declarations.
12338 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12339 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12340 (HWCAP_VFPv3D16): New.
12341 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12342 instead of __IWMMXT__.
12343 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12344 (arm_arch_setup): New.
12345 (target_regsets): Remove #ifdef. Add VFP regset.
12346 (the_low_target): Use arm_arch_setup.
12347
12b42a12
DJ
123482009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12349
12350 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12351 the main thread again.
12352
ac8c974e
AR
123532009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12354
12355 Adding Neutrino gdbserver.
12356 * configure: Regenerated.
12357 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12358 * configure.srv (i[34567]86-*-nto*): New target.
12359 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12360 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12361 (nto_comctrl) [__QNX__]: New function.
12362 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12363
4424e0c3 123642009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
12365
12366 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12367 srv_tgtobj.
12368
912cf4ba
PA
123692009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12370 Pedro Alves <pedro@codesourcery.com>
12371
12372 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12373 don't support CONTEXT_EXTENDED_REGISTERS.
12374 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12375 (the_low_target): Install them.
12376 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12377 failing with ERROR_PIPE_NOT_CONNECTED.
12378
aa5ca48f
DE
123792009-06-30 Doug Evans <dje@google.com>
12380 Pierre Muller <muller@ics.u-strasbg.fr>
12381
12382 Add h/w watchpoint support to x86-linux, win32-i386.
12383 * Makefile.in (SFILES): Add i386-low.c
12384 (i386_low_h): Define.
12385 (i386-low.o): Add dependencies.
12386 (linux-x86-low.o): Add i386-low.h dependency.
12387 (win32-i386-low.o): Ditto.
12388 * i386-low.c: New file.
12389 * i386-low.h: New file.
12390 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12391 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12392 * linux-low.c (linux_add_process): Initialize arch_private.
12393 (linux_remove_process): Free arch_private.
12394 (add_lwp): Initialize arch_private.
12395 (delete_lwp): Free arch_private.
12396 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12397 provided.
12398 * linux-low.h (process_info_private): New member arch_private.
12399 (lwp_info): New member arch_private.
12400 (linux_target_ops): New members new_process, new_thread,
12401 prepare_to_resume.
12402 (ptid_of): New macro.
12403 * linux-x86-low.c: Include stddef.h, i386-low.h.
12404 (arch_process_info): New struct.
12405 (arch_lwp_info): New struct.
12406 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12407 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12408 (i386_dr_low_get_status): New function.
12409 (x86_insert_point, x86_remove_point): New functions.
12410 (x86_stopped_by_watchpoint): New function.
12411 (x86_stopped_data_address): New function.
12412 (x86_linux_new_process, x86_linux_new_thread): New functions.
12413 (x86_linux_prepare_to_resume): New function.
12414 (the_low_target): Add entries for insert_point, remove_point,
12415 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12416 prepare_to_resume.
12417 * server.c (debug_hw_points): New global.
12418 (monitor_show_help): Document set debug-hw-points.
12419 (handle_query): Process "set debug-hw-points".
12420 * server.h (debug_hw_points): Declare.
12421 (paddress): Declare.
12422 * utils.c (NUMCELLS, CELLSIZE): New macros.
12423 (get_sell, xsnprintf, paddress): New functions.
12424 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12425 remove_point, stopped_by_watchpoint, stopped_data_address.
12426 * win32-i386-low.c: Include i386-low.h.
12427 (debug_reg_state): Replaces dr.
12428 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12429 (i386_dr_low_get_status): New function.
12430 (i386_insert_point, i386_remove_point): New functions.
12431 (i386_stopped_by_watchpoint): New function.
12432 (i386_stopped_data_address): New function.
12433 (i386_initial_stuff): Update.
12434 (get_thread_context,set_thread_context,i386_thread_added): Update.
12435 (the_low_target): Add entries for insert_point,
12436 remove_point, stopped_by_watchpoint, stopped_data_address.
12437 * win32-low.c (win32_insert_watchpoint): New function.
12438 (win32_remove_watchpoint): New function.
12439 (win32_stopped_by_watchpoint): New function.
12440 (win32_stopped_data_address): New function.
12441 (win32_target_ops): Add entries for insert_watchpoint,
12442 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12443 * win32-low.h (win32_target_ops): New members insert_point,
12444 remove_point, stopped_by_watchpoint, stopped_data_address.
12445
d993e290
PA
124462009-06-25 Pedro Alves <pedro@codesourcery.com>
12447
12448 * server.c (process_serial_event): Re-return unsupported, not
12449 error, if the type isn't recognized. Re-allow supporting only
12450 insert or remove packets. Also call require_running for
12451 breakpoints. Add missing break statement to default case. Tidy.
12452 * target.h (struct target_ops): Rename insert_watchpoint to
12453 insert_point, and remove_watchpoint to remove_point.
12454
12455 * linux-low.h (struct linux_target_ops): Likewise.
12456 * linux-low.c (linux_insert_watchpoint): Rename to ...
12457 (linux_insert_point): ... this. Adjust.
12458 (linux_remove_watchpoint): Rename to ...
12459 (linux_remove_point): ... this. Adjust.
12460 (linux_target_ops): Adjust.
12461 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12462 (cris_insert_point): ... this.
12463 (cris_remove_watchpoint): Rename to ...
12464 (cris_remove_point): ... this.
12465 (the_low_target): Adjust.
12466
0f54c268
PM
124672009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12468
12469 * server.c (handle_v_kill): Pass signal_pid to
12470 kill_inferior if multi_process is zero.
12471
c6314022
AR
124722009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12473
12474 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12475 * target.h (target_ops): Comment for *_watchpoint to make it clear
12476 the functions can get types '0' and '1'.
12477
4463ce24
AR
124782009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12479
12480 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12481 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12482 * regcache.c (get_regcache): Likewise.
12483 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12484 * win32-low.c (child_fetch_inferior_registers): Remove check for
12485 regno 0.
12486
cf8fd78b
PA
124872009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12488 Pedro Alves <pedro@codesourcery.com>
12489
12490 * target.h (struct target_ops) <supports_multi_process>: New
12491 callback.
12492 (target_supports_multi_process): New.
12493 * server.c (handle_query): Even if GDB reports support, only
12494 enable multi-process if the target also supports it. Report
12495 multi-process support only if the target backend supports it.
12496 * linux-low.c (linux_supports_multi_process): New function.
12497 (linux_target_ops): Install it as target_supports_multi_process
12498 callback.
12499
47c0c975
DE
125002009-05-24 Doug Evans <dje@google.com>
12501
e09875d4
DE
12502 Global renaming of find_thread_pid to find_thread_ptid.
12503 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12504 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12505 All callers updated.
12506
e27d73f6
DE
12507 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12508 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12509 directly.
12510
47c0c975
DE
12511 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12512 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12513 (linux_resume_one_lwp): Ditto.
12514
2acc282a
DE
125152009-05-23 Doug Evans <dje@google.com>
12516
12517 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12518 from struct inferior_list_entry * to struct lwp_info *.
12519 All callers updated.
12520
9f1036c1
DE
125212009-05-13 Doug Evans <dje@google.com>
12522
12523 * linux-x86-low.c: Don't include assert.h.
12524 (x86_siginfo_fixup): Use fatal, not assert.
12525 (x86_arch_setup): Fix comment.
12526
d0722149
DE
125272009-05-12 Doug Evans <dje@google.com>
12528
12529 Biarch support for i386/amd64 gdbserver.
12530 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12531 Add linux-x86-low.c.
12532 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12533 (linux-x86-low.o): Add.
12534 * linux-x86-64-low.c: Delete.
12535 * linux-i386-low.c: Delete.
12536 * linux-x86-low.c: New file.
12537 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12538 linux-x86-low.o.
12539 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12540 linux-x86-low.o.
12541 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12542 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12543 (linux_child_pid_to_exec_file): New function.
12544 (elf_64_header_p, elf_64_file_p): New functions.
12545 (siginfo_fixup): New function.
12546 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12547 give target a chance to convert layout.
12548 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12549 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12550
fdeb2a12
DE
125512009-05-07 Doug Evans <dje@google.com>
12552
12553 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12554 (regsets_store_inferior_registers): Ditto.
12555
a6dbe5df
PA
125562009-05-06 Pedro Alves <pedro@codesourcery.com>
12557
12558 PR server/10048
12559
12560 * linux-low.c (must_set_ptrace_flags): Delete.
12561 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12562 of the global.
12563 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12564 `lwp->must_set_ptrace_flags' instead.
ba42693b 12565 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
12566 (linux_wait_1): ... not here.
12567
5091eb23
DE
125682009-04-30 Doug Evans <dje@google.com>
12569
9f767825
DE
12570 * inferiors.c (started_inferior_callback): New function.
12571 (attached_inferior_callback): New function.
12572 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12573 * server.c (print_started_pid, print_attached_pid): New functions.
12574 (detach_or_kill_for_exit): New function.
12575 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12576 * server.h (have_started_inferiors_p): Declare.
12577 (have_attached_inferiors_p): Declare.
12578
5091eb23
DE
12579 * inferiors.c (remove_process): Fix memory leak, free process.
12580 * linux-low.c (linux_remove_process): New function.
12581 (linux_kill): Call it instead of remove_process.
12582 (linux_detach, linux_wait_1): Ditto.
12583
155c8968
PA
125842009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12585
12586 * configure.srv: Add x86 Windows CE target.
12587
7fe519cb
UW
125882009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12589
12590 * inferiors.c (get_thread_process): Make global.
12591 * server.h (get_thread_process): Add prototype.
12592 * thread-db.c (find_one_thread): Use get_thread_process
12593 instead of current_process.
12594 (thread_db_get_tls_address): Do not crash if called when
12595 thread layer is not yet initialized.
12596
5472f405
UW
125972009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12598
12599 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12600 * spu-low.c (current_tid): Rename to ...
12601 (current_ptid): ... this.
12602 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12603 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12604 ptid_get_lwp (current_ptid) instead of current_tid.
12605 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12606 instead of current_tid. Use find_process_pid to verify pid
12607 argument is valid. Pass proper argument to remove_process.
12608 (spu_thread_alive): Compare current_ptid instead of current_tid.
12609 (spu_resume): Likewise.
12610
55ac2b99
PA
126112009-04-02 Pedro Alves <pedro@codesourcery.com>
12612
12613 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12614 variable.
12615
95954743
PA
126162009-04-01 Pedro Alves <pedro@codesourcery.com>
12617
12618 Implement the multiprocess extensions, and add linux multiprocess
12619 support.
12620
12621 * server.h (ULONGEST): Declare.
12622 (struct ptid, ptid_t): New.
12623 (minus_one_ptid, null_ptid): Declare.
12624 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12625 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12626 (struct inferior_list_entry): Change `id' type from unsigned from
12627 to ptid_t.
12628 (struct sym_cache, struct breakpoint, struct
12629 process_info_private): Forward declare.
12630 (struct process_info): Declare.
12631 (current_process): Declare.
12632 (all_processes): Declare.
12633 (initialize_inferiors): Declare.
12634 (add_thread): Adjust to use ptid_t.
12635 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12636 (add_process, remove_process, find_thread_pid): Declare.
12637 (find_inferior_id): Adjust to use ptid_t.
12638 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12639 (multi_process): Declare.
12640 (push_event): Adjust to use ptid_t.
12641 (read_ptid, write_ptid): Declare.
12642 (prepare_resume_reply): Adjust to use ptid_t.
12643 (clear_symbol_cache): Declare.
12644 * inferiors.c (all_processes): New.
12645 (null_ptid, minus_one_ptid): New.
12646 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12647 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12648 (add_thread): Change unsigned long to ptid. Remove gdb_id
12649 parameter. Adjust.
12650 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12651 (gdb_id_to_thread): Rename to ...
12652 (find_thread_pid): ... this. Change unsigned long to ptid.
12653 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12654 (loaded_dll, pull_pid_from_list): Adjust.
12655 (add_process, remove_process, find_process_pid)
12656 (get_thread_process, current_process, initialize_inferiors): New.
12657 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12658 (struct target_waitstatus) <related_pid>: Ditto.
12659 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12660 return type to int.
12661 (struct target_ops) <join>: Add `pid' argument.
12662 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12663 (struct target_ops) <wait>: Add `ptid' field. Change return type
12664 to ptid.
12665 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12666 (mywait): Add `ptid' argument. Change return type to ptid_t.
12667 (target_pid_to_str): Declare.
12668 * target.c (set_desired_inferior): Adjust to use ptids.
12669 (mywait): Add new `ptid' argument. Adjust.
12670 (target_pid_to_str): New.
12671 * mem-break.h (free_all_breakpoints): Declare.
12672 * mem-break.c (breakpoints): Delelete.
12673 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12674 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12675 to use per-process breakpoint list.
12676 (free_all_breakpoints): New.
12677 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12678 (symbol_cache, all_symbols_looked_up): Delete.
12679 (hexchars): New.
12680 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12681 read_ptid): New.
12682 (prepare_resume_reply): Change ptid argument's type from unsigned
12683 long to ptid_t. Adjust. Implement W;process and X;process.
12684 (free_sym_cache, clear_symbol_cache): New.
12685 (look_up_one_symbol): Adjust to per-process symbol cache. *
12686 * server.c (cont_thread, general_thread, step_thread): Change type
12687 to ptid_t.
12688 (attached): Delete.
12689 (multi_process): New.
12690 (last_ptid): Change type to ptid_t.
12691 (struct vstop_notif) <ptid>: Change type to ptid_t.
12692 (queue_stop_reply, push_event): Change `ptid' argument's type to
12693 ptid_t.
12694 (discard_queued_stop_replies): Add `pid' argument.
12695 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12696 changes. Don't reference the `attached' global.
12697 (attach_inferior): Adjust to mywait interface changes.
12698 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12699 features. Handle and report "multiprocess+". Handle
12700 "qAttached:PID".
12701 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12702 changes.
12703 (handle_v_kill): New.
12704 (handle_v_stopped): Adjust to use target_pid_to_str.
12705 (handle_v_requests): Allow multiple attaches and runs when
12706 multiprocess extensions are in effect. Handle "vKill".
12707 (myresume): Adjust to use ptids.
12708 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12709 (handle_status): Adjust to discard_queued_stop_replies interface
12710 change.
12711 (first_thread_of, kill_inferior_callback)
12712 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12713 (main): Call initialize_inferiors. Adjust to use ptids, killing
12714 and detaching from all inferiors. Handle multiprocess packet
12715 variants.
12716 * linux-low.h: Include gdb_proc_service.h.
12717 (struct process_info_private): New.
12718 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12719 <lwpid_of>: Use ptid_get_lwp.
12720 (get_lwp_thread): Adjust.
12721 (struct lwp_info): Add `dead' member.
12722 (find_lwp_pid): Declare.
12723 * linux-low.c (thread_db_active): Delete.
12724 (new_inferior): Adjust comment.
12725 (inferior_pid): Delete.
12726 (linux_add_process): New.
12727 (handle_extended_wait): Adjust.
12728 (add_lwp): Change unsigned long to ptid.
12729 (linux_create_inferior): Add process to processes table. Adjust
12730 to use ptids. Don't set new_inferior here.
12731 (linux_attach_lwp): Rename to ...
12732 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12733 it. Adjust to use ptids.
12734 (linux_attach_lwp): New.
12735 (linux_attach): Add process to processes table. Don't set
12736 new_inferior here.
12737 (struct counter): New.
12738 (second_thread_of_pid_p, last_thread_of_process_p): New.
12739 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12740 multiple processes.
12741 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12742 processes. Remove process from process table.
12743 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12744 to multiple processes.
12745 (any_thread_of): New.
12746 (linux_detach): Add `pid' argument, and handle it. Remove process
12747 from processes table.
12748 (linux_join): Add `pid' argument. Handle it.
12749 (linux_thread_alive): Change unsighed long argument to ptid_t.
12750 Consider dead lwps as not being alive.
12751 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12752 threads we're not interested in.
12753 (same_lwp, find_lwp_pid): New.
12754 (linux_wait_for_lwp): Change `pid' argument's type from int to
12755 ptid_t. Adjust.
12756 (linux_wait_for_event): Rename to ...
12757 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12758 from int to ptid_t. Adjust.
12759 (linux_wait_for_event): New.
12760 (linux_wait_1): Add `ptid' argument. Change return type to
12761 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12762 that exit from the process table.
12763 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12764 Adjust.
12765 (mark_lwp_dead): New.
12766 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12767 stopping all threads, mark its main lwp as dead.
12768 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12769 ptids.
12770 (fetch_register, usr_store_inferior_registers)
12771 (regsets_fetch_inferior_registers)
12772 (regsets_store_inferior_registers, linux_read_memory)
12773 (linux_write_memory): Inline `inferior_pid'.
12774 (linux_look_up_symbols): Adjust to use per-process
12775 `thread_db_active'.
12776 (linux_request_interrupt): Adjust to use ptids.
12777 (linux_read_auxv): Inline `inferior_pid'.
12778 (initialize_low): Don't reference thread_db_active.
12779 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12780 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12781 (ps_getpid): Return the pid of the current inferior.
12782 * thread-db.c (proc_handle, thread_agent): Delete.
12783 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12784 per-process data.
12785 (find_one_thread): Change argument type to ptid_t. Adjust to
12786 per-process data.
12787 (maybe_attach_thread): Adjust to per-process data and ptids.
12788 (thread_db_find_new_threads): Ditto.
12789 (thread_db_init): Ditto.
12790 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12791 processes table. Adjust to use ptids.
12792 (spu_kill, spu_detach): Adjust interface. Remove process from
12793 processes table.
12794 (spu_join, spu_thread_alive): Adjust interface.
12795 (spu_wait): Adjust interface. Remove process from processes
12796 table. Adjust to use ptids.
12797 * win32-low.c (current_inferior_tid): Delete.
12798 (current_inferior_ptid): New.
12799 (debug_event_ptid): New.
12800 (thread_rec): Take a ptid. Adjust.
12801 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12802 (child_delete_thread): Ditto.
12803 (do_initial_child_stuff): Add `attached' argument. Add process to
12804 processes table.
12805 (child_fetch_inferior_registers, child_store_inferior_registers):
12806 Adjust.
12807 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12808 (win32_attach): Pass 1 to do_initial_child_stuff.
12809 (win32_kill): Adjust interface. Remove process from processes
12810 table.
12811 (win32_detach): Ditto.
12812 (win32_join): Adjust interface.
12813 (win32_thread_alive): Take a ptid.
12814 (win32_resume): Adjust to use ptids.
12815 (get_child_debug_event): Ditto.
12816 (win32_wait): Adjust interface. Remove exiting process from
12817 processes table.
12818
bd99dc85
PA
128192009-04-01 Pedro Alves <pedro@codesourcery.com>
12820
12821 Non-stop mode support.
12822
12823 * server.h (non_stop): Declare.
12824 (gdb_client_data, handler_func): Declare.
12825 (delete_file_handler, add_file_handler, start_event_loop):
12826 Declare.
12827 (handle_serial_event, handle_target_event, push_event)
12828 (putpkt_notif): Declare.
12829 * target.h (enum resume_kind): New.
12830 (struct thread_resume): Replace `step' field by `kind' field.
12831 (TARGET_WNOHANG): Define.
12832 (struct target_ops) <wait>: Add `options' argument.
12833 <supports_non_stop, async, start_non_stop>: New fields.
12834 (target_supports_non_stop, target_async): New.
12835 (start_non_stop): Declare.
12836 (mywait): Add `options' argument.
12837 * target.c (mywait): Add `options' argument. Print child exit
12838 notifications here.
12839 (start_non_stop): New.
12840 * server.c (non_stop, own_buf, mem_buf): New globals.
12841 (struct vstop_notif): New.
12842 (notif_queue): New global.
12843 (queue_stop_reply, push_event, discard_queued_stop_replies)
12844 (send_next_stop_reply): New.
12845 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12846 interface changes.
12847 (attach_inferior): In non-stop mode, don't wait for the target
12848 here.
12849 (handle_general_set): Handle QNonStop.
12850 (handle_query): When handling qC, return the current general
12851 thread, instead of the first thread of the list.
12852 (handle_query): If the backend supports non-stop mode, include
12853 QNonStop+ in the qSupported query response.
12854 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12855 and non-stop mode.
12856 (handle_v_attach, handle_v_run): Handle non-stop mode.
12857 (handle_v_stopped): New.
12858 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12859 (myresume): Adjust to use resume_kind. Handle non-stop.
12860 (queue_stop_reply_callback): New.
12861 (handle_status): Handle non-stop mode.
12862 (main): Clear non_stop flag on reconnection. Use the event-loop.
12863 Refactor serial protocol handling from here ...
12864 (process_serial_event): ... to this new function. When GDB
12865 selects any thread, select one here. In non-stop mode, wait until
12866 GDB acks all pending events before exiting.
12867 (handle_serial_event, handle_target_event): New.
12868 * remote-utils.c (remote_open): Install remote_desc in the event
12869 loop.
12870 (remote_close): Remove remote_desc from the event loop.
12871 (putpkt_binary): Rename to...
12872 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12873 (putpkt_binary): New as wrapper around putpkt_binary_1.
12874 (putpkt_notif): New.
12875 (prepare_resume_reply): In non-stop mode, don't change the
12876 general_thread.
12877 * event-loop.c: New.
12878 * Makefile.in (OBJ): Add event-loop.o.
12879 (event-loop.o): New rule.
12880
12881 * linux-low.h (pid_of): Moved here.
12882 (lwpid_of): New.
12883 (get_lwp_thread): Use lwpid_of.
12884 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12885 * linux-low.c (pid_of): Delete.
12886 (inferior_pid): Use lwpid_of.
12887 (linux_event_pipe): New.
12888 (target_is_async_p): New.
12889 (delete_lwp): New.
12890 (handle_extended_wait): Use lwpid_of.
12891 (add_lwp): Don't set lwpid field.
12892 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12893 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12894 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12895 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12896 first. Adjust to linux_wait_for_event interface changes. Use
12897 lwpid_of.
12898 (linux_detach): Don't delete the main lwp here.
12899 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12900 (status_pending_p): Don't consider explicitly suspended lwps.
12901 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12902 pointer. Add OPTIONS argument. Change return type to int. Use
12903 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12904 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12905 pointer. Add status pointer argument. Return a pid instead of a
12906 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12907 changes. In non-stop mode, don't switch to a random thread.
12908 (linux_wait): Rename to...
12909 (linux_wait_1): ... this. Add target_options argument, and handle
12910 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12911 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12912 clean exit and signal exit code. Don't stop all threads in
12913 non-stop mode. In all-stop mode, only stop all threads when
12914 reporting a stop to GDB. Handle explicit thread stop requests.
12915 (async_file_flush, async_file_mark): New.
12916 (linux_wait): New.
12917 (send_sigstop): Use lwpid_of.
12918 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12919 interface changes. In non-stop mode, don't switch to a random
12920 thread.
12921 (linux_resume_one_lwp): Use lwpid_of.
12922 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12923 (linux_resume_one_thread): ... this. Handle resume_stop. In
12924 non-stop mode, don't look for pending flag in all threads.
12925 (resume_status_pending_p): Don't consider explicitly suspended
12926 threads.
12927 (my_waitpid): Reimplement. Emulate __WALL.
12928 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12929 Use lwpid_of.
12930 (sigchld_handler, linux_supports_non_stop, linux_async)
12931 (linux_start_non_stop): New.
12932 (linux_target_ops): Register linux_supports_non_stop, linux_async
12933 and linux_start_non_stop.
12934 (initialize_low): Install SIGCHLD handler.
12935 * thread-db.c (thread_db_create_event, find_one_thread)
12936 (thread_db_get_tls_address): Use lwpid_of.
12937 * win32-low.c (win32_detach): Adjust to use resume_kind.
12938 (win32_wait): Add `options' argument.
12939 * spu-low.c (spu_resume): Adjust to use resume_kind.
12940 (spu_wait): Add `options' argument.
12941
5b1c542e
PA
129422009-04-01 Pedro Alves <pedro@codesourcery.com>
12943
12944 Decouple target code from remote protocol.
12945
12946 * target.h (enum target_waitkind): New.
12947 (struct target_waitstatus): New.
12948 (struct target_ops) <wait>: Return an unsigned long. Take a
12949 target_waitstatus pointer instead of a char pointer.
12950 (mywait): Likewise.
12951 * target.c (mywait): Change prototype to return an unsigned long.
12952 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12953 * server.h (thread_from_wait, old_thread_from_wait): Delete
12954 declarations.
12955 (prepare_resume_reply): Change prototype to take a
12956 target_waitstatus.
12957 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12958 (last_status, last_ptid): New.
12959 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12960 pid instead of a signal.
12961 (attach_inferior): Remove "status" and "signal" parameters.
12962 Adjust.
12963 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12964 not as an address.
12965 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12966 (handle_v_requests, myresume): Remove "status" and "signal"
12967 parameters. Adjust.
12968 (handle_status): New.
12969 (main): Delete local `status'. Adjust.
12970 * remote-utils.c: Include target.h.
12971 (prepare_resume_reply): Change prototype to take a
12972 target_waitstatus. Adjust.
12973
12974 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12975 interface.
12976 * spu-low.c (spu_wait): Adjust.
12977 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12978 Delete.
12979 (win32_wait): Adjust.
12980
2bd7c093
PA
129812009-04-01 Pedro Alves <pedro@codesourcery.com>
12982
12983 * target.h (struct thread_resume): Delete leave_stopped member.
12984 (struct target_ops): Add a `n' argument to the `resume' callback.
12985 * server.c (start_inferior): Adjust.
12986 (handle_v_cont, myresume): Adjust.
12987 * linux-low.c (check_removed_breakpoint): Adjust to resume
12988 interface change, and to removed leave_stopped field.
12989 (resume_ptr): Delete.
12990 (struct thread_resume_array): New.
12991 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12992 resume interface change.
12993 (linux_continue_one_thread, linux_queue_one_thread)
12994 (resume_status_pending_p): Check if the resume field is NULL
12995 instead of checking the leave_stopped member.
12996 (linux_resume): Adjust to the target resume interface change.
12997 * spu-low.c (spu_resume): Adjust to the target resume interface
12998 change.
12999 * win32-low.c (win32_detach, win32_resume): Ditto.
13000
c35fafde
PA
130012009-04-01 Pedro Alves <pedro@codesourcery.com>
13002
13003 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13004 flag.
13005 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13006 pending.
13007 (linux_continue_one_thread): Only preserve the stepping flag if
13008 there's a pending breakpoint.
13009
0a59d50b
PA
130102009-03-31 Pedro Alves <pedro@codesourcery.com>
13011
13012 * server.c (main): After the inferior having exited, call
13013 remote_close before exiting gdbserver.
13014
f04c6d38
TJB
130152009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13016
13017 Fix size of FPSCR in Power 7 processors.
13018 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13019 (PPC_FEATURE_HAS_DFP): New #define.
13020 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13021 size of the FPSCR.
13022
78e5cee6
PA
130232009-03-23 Pedro Alves <pedro@codesourcery.com>
13024
13025 * server.c (handle_query) Whitespace and formatting.
13026
1b3f6016
PA
130272009-03-22 Pedro Alves <pedro@codesourcery.com>
13028
13029 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13030 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13031 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13032 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13033 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13034 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13035 Makefile.in, configure.ac: Fix whitespace throughout.
13036 * configure: Regenerate.
13037
a07b2135
PA
130382009-03-22 Pedro Alves <pedro@codesourcery.com>
13039
13040 * inferiors.c (find_inferior): Make it safe for the callback
13041 function to delete the currently iterated inferior.
13042
67cc2626
PA
130432009-03-22 Pedro Alves <pedro@codesourcery.com>
13044
13045 * Makefile.in (linuw_low_h): Move higher.
13046 (thread-db.o): Depend on $(linux_low_h).
13047
54a0b537
PA
130482009-03-17 Pedro Alves <pedro@codesourcery.com>
13049
13050 Rename "process" to "lwp" throughout.
13051
13052 * linux-low.c (all_processes): Rename to...
13053 (all_lwps): ... this.
13054 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13055 (add_process): Rename to ...
13056 (add_lwp): ... this. Adjust.
13057 (linux_create_inferior): Adjust.
13058 (linux_attach_lwp): Adjust.
13059 (linux_attach): Adjust.
13060 (linux_kill_one_process): Rename to ...
13061 (linux_kill_one_lwp): ... this. Adjust.
13062 (linux_kill): Adjust.
13063 (linux_detach_one_process): Rename to ...
13064 (linux_detach_one_lwp): ... this. Adjust.
13065 (linux_detach): Adjust.
13066 (check_removed_breakpoint): Adjust.
13067 (status_pending_p): Adjust.
13068 (linux_wait_for_process): Rename to ...
13069 (linux_wait_for_lwp): ... this. Adjust.
13070 (linux_wait_for_event): Adjust.
13071 (send_sigstop): Adjust.
13072 (wait_for_sigstop): Adjust.
13073 (stop_all_processes): Rename to ...
13074 (stop_all_lwps): ... this.
13075 (linux_resume_one_process): Rename to ...
13076 (linux_resume_one_lwp): ... this. Adjust.
13077 (linux_set_resume_request, linux_continue_one_thread)
13078 (linux_queue_one_thread, resume_status_pending_p)
13079 (usr_store_inferior_registers, regsets_store_inferior_registers)
13080 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13081 Adjust.
13082 * linux-low.h (get_process): Rename to ...
13083 (get_lwp): ... this. Adjust.
13084 (get_thread_process): Rename to ...
13085 (get_thread_lwp): ... this. Adjust.
13086 (get_process_thread): Rename to ...
13087 (get_lwp_thread): ... this. Adjust.
13088 (struct process_info): Rename to ...
13089 (struct lwp_info): ... this.
13090 (all_processes): Rename to ...
13091 (all_lwps): ... this.
13092 * proc-service.c (ps_lgetregs): Adjust.
13093 * thread-db.c (thread_db_create_event, find_one_thread)
13094 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13095
0b16c5cf
PA
130962009-03-14 Pedro Alves <pedro@codesourcery.com>
13097
13098 * server.c (handle_query): Handle "qAttached".
13099
32de4b9d
NS
131002009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13101
13102 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13103 GPLv3, update license URL.
13104
2aecd87f
DE
131052009-03-01 Doug Evans <dje@google.com>
13106
93efd302 13107 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
13108 (server_h): Add gdb_signals.h.
13109 (signals.o): Update.
13110 * server.h (target_signal_from_host,target_signal_to_host_p)
13111 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13112
86b1f9c5
PM
131132009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13114
13115 * remote-utils.c (getpkt): Also generate remote-debug
13116 information if noack_mode is set.
13117
4aa995e1
PA
131182009-02-06 Pedro Alves <pedro@codesourcery.com>
13119
13120 * server.c (handle_query): Report qXfer:siginfo:read and
13121 qXfer:siginfo:write as supported and handle them.
13122 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13123 * linux-low.c (linux_xfer_siginfo): New.
13124 (linux_target_ops): Set it.
13125
62709adf
PA
131262009-01-26 Pedro Alves <pedro@codesourcery.com>
13127
13128 * server.c (gdbserver_usage): Mention --remote-debug.
13129 (main): Accept '--remote-debug' switch.
13130
aef93bd7
DE
131312009-01-18 Doug Evans <dje@google.com>
13132
13133 * regcache.c (new_register_cache): No need to check result of xcalloc.
13134 * server.c (handle_search_memory): Back out calls to xmalloc,
13135 result is checked and error is returned to user upon failure.
13136 (handle_query): Ditto. Add more checks for result of malloc.
13137 (handle_v_cont): Check result of malloc, report error back to
13138 user upon failure.
13139 (handle_v_run): Ditto. Call freeargv.
13140 * server.h (freeargv): Declare.
13141 * utils.c (freeargv): New fn.
13142
54363045
DE
131432009-01-15 Doug Evans <dje@google.com>
13144
f626972c
DE
13145 * gdbreplay.c (perror_with_name): Make arg const char *.
13146 * server.h (target_signal_to_name): Make return type const char *.
0842e787 13147 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 13148 * utils.c (perror_with_name): Make arg const char *.
54363045 13149
18aae699
PA
131502009-01-14 Pedro Alves <pedro@codesourcery.com>
13151
13152 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13153 when handling a EXIT_PROCESS_DEBUG_EVENT.
13154
ff703abe
JB
131552009-01-06 Joel Brobecker <brobecker@adacore.com>
13156
13157 * gdbreplay.c (gdbreplay_version): Update copyright year.
13158 * server.c (gdbserver_version): Likewise.
13159
f21cc1a2 131602009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
13161
13162 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 13163 (handle_extended_wait): Improve comment.
0e21c1ec 13164
bca929d3
DE
131652008-12-13 Doug Evans <dje@google.com>
13166
13167 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13168 * server.h (ATTR_MALLOC): New macro.
13169 (xmalloc,xcalloc,xstrdup): Declare.
13170 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13171 * inferiors.c: Ditto.
13172 * linux-low.c: Ditto.
13173 * mem-break.c: Ditto.
13174 * regcache.c: Ditto.
13175 * remote-utils.c: Ditto.
13176 * server.c: Ditto.
13177 * target.c: Ditto.
13178 * win32-low.c: Ditto.
13179
97438e3f
DE
131802008-12-12 Doug Evans <dje@google.com>
13181
896c7fbb
DE
13182 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13183 in debugging printf.
13184
97438e3f
DE
13185 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13186
e3b886f8
DE
131872008-12-09 Doug Evans <dje@google.com>
13188
13189 * linux-low.h (struct process_info): Delete member tid, unused.
13190 * thread-db.c (find_one_thread): Update.
13191 (maybe_attach_thread): Update.
13192
07e059b5
VP
131932008-12-02 Pedro Alves <pedro@codesourcery.com>
13194
889bf7c5
PA
13195 * target.h (struct target_ops): Add qxfer_osdata member.
13196 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13197 and dirent.h.
13198 (linux_qxfer_osdata): New functions.
13199 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13200 callback.
13201 * server.c (handle_query): Handle "qXfer:osdata:read:".
13202 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13203 (buffer_xml_printf): New functions.
13204 * server.h (struct buffer): New.
13205 (buffer_grow_str, buffer_grow_str0): New macros.
13206 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13207 (buffer_xml_printf): Declare.
07e059b5 13208
4cab47ab
DE
132092008-11-24 Doug Evans <dje@google.com>
13210
13211 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13212
f142445f
DJ
132132008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13214
13215 * server.c (handle_v_run): Always use the supplied argument list.
13216
d0107bb6 132172008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 13218
d0107bb6
BW
13219 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13220 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 13221
2c4ad781
TJB
132222008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13223
13224 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13225 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13226 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13227 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13228 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13229 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13230 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13231 XML target descriptions.
13232 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13233 when inferior is running on an ISA 2.05 or later processor. Add
13234 special case to return offset for full 64-bit slot of FPSCR when
13235 in 32-bits.
13236
dfb64f85
DJ
132372008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13238
13239 * Makefile.in (SFILES, clean): Added sparc64 files.
13240 (reg-sparc64.o, reg-sparc64.c): New.
13241 * configure.srv (sparc*-*-linux*): New configuration.
13242 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13243 syscall arguments for SPARC.
13244 (regsets_store_inferior_registers): Likewise.
13245 * linux-sparc-low.c: New file.
13246
66b6e1dd
DE
132472008-10-21 Doug Evans <dje@google.com>
13248
13249 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13250 (READLINE_DIR,READLINE_DEP): Delete.
13251 (INTERNAL_CFLAGS): Update.
13252 (LINTFLAGS): Update.
13253
9b710a42
PA
132542008-10-10 Pedro Alves <pedro@codesourcery.com>
13255
13256 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13257 whole argv from the last run, not just argv[0].
13258
5822d809
PA
132592008-09-08 Pedro Alves <pedro@codesourcery.com>
13260
13261 * regcache.c (new_register_cache): Return NULL if the register
13262 cache size isn't known yet.
13263 (free_register_cache): Avoid dereferencing a NULL regcache.
13264
74aac56f
DJ
132652008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13266
13267 * configure.srv: Merge MIPS and MIPS64.
13268
400b20f5
MR
132692008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13270
13271 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13272
677c5bb1
LM
132732008-08-18 Luis Machado <luisgpm@br.ibm.com>
13274
13275 * Makefile.in: Add required vsx dependencies.
13276
13277 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13278 Declare init_registers_powerpc_vsx32l.
13279 Declare init_registers_powerpc_vsx64l.
13280 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13281 (ppc_arch_setup): Check for VSX in hwcap.
13282 (ppc_fill_vsxregset): New function.
13283 (ppc_store_vsxregset): New function.
13284 Add new VSX entry in regset_info target_regsets.
13285
13286 * configure.srv: Add new VSX dependencies.
13287
a6f3e723
SL
132882008-08-12 Pedro Alves <pedro@codesourcery.com>
13289
13290 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13291 (remote_open): Set or clear transport_is_reliable.
13292 (putpkt_binary): Don't expect acks in noack mode.
13293 (getpkt): Don't send ack/nac in noack mode.
13294 * server.c (handle_general_set): Handle QStartNoAckMode.
13295 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13296 qSupported.
13297 (main): Reset noack_mode on every connection.
13298 * server.h (noack_mode): Declare.
13299
a417dc56
RW
133002008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13301
13302 * Makefile.in (GDBREPLAY_OBS): New variable.
13303 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13304
3221518c
UW
133052008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13306 Daniel Jacobowitz <dan@codesourcery.com>
13307
13308 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13309 (usr_store_inferior_registers): Likewise.
13310 (regsets_store_inferior_registers): Likewise.
13311
ec56be1b
PA
133122008-07-31 Rolf Jansen <rj@surtec.com>
13313 Pedro Alves <pedro@codesourcery.com>
13314
13315 * configure.ac: Check for memmem declaration.
13316 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13317 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13318 (disable_packet_qfThreadInfo): Unconditionally compile.
13319 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13320 * configure, config.in: Regenerate.
13321
2fe5e3ff
DE
133222008-07-28 Doug Kwan <dougkwan@google.com>
13323
13324 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13325 (linux_write_memory): Remove declaration of errno.
13326
836acd6d
UW
133272008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13328
13329 * linux-low.c (handle_extended_wait): Do not use "status"
13330 variable uninitialized.
13331
aeba519e
PA
133322008-07-07 Pedro Alves <pedro@codesourcery.com>
13333
13334 * server.c (handle_v_attach): Inhibit reporting dll changes.
13335
db42f210
PA
133362008-06-27 Pedro Alves <pedro@codesourcery.com>
13337
13338 * remote-utils.c (prepare_resume_reply): If requested, don't
13339 output "thread:TID" in the T stop reply.
13340
13341 * server.c (disable_packet_vCont, disable_packet_Tthread)
13342 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13343 (handle_query): If requested, disable support for qC, qfThreadInfo
13344 and qsThreadInfo.
13345 (handle_v_requests): If requested, disable support for vCont.
13346 (gdbserver_show_disableable): New.
13347 (main): Handle --disable-packet and --disable-packet=LIST.
13348
13349 * server.h (disable_packet_vCont, disable_packet_Tthread)
13350 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13351
8e4c5421
CD
133522008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13353
13354 * server.c (gdbserver_usage): Mention --version.
13355
6e23a804
DJ
133562008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13357
13358 * Makefile.in (gdbreplay.o): New rule.
13359
90aa6a40
JM
133602008-06-06 Joseph Myers <joseph@codesourcery.com>
13361
13362 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13363 message, not gdbserver.
13364
c16158bc 133652008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
13366 Nathan Sidwell <nathan@codesourcery.com>
13367 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
13368
13369 * acinclude.m4: Include ../../config/acx.m4.
13370 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13371 * configure, config.in: Regenerate.
13372 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13373 * server.c (gdbserver_version): Print PKGVERSION.
13374 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13375 (main): Adjust gdbserver_usage calls.
13376 * gdbreplay.c (version, host_name): Add declarations.
13377 (gdbreplay_version, gdbreplay_usage): New.
13378 (main): Accept --version and --help options.
13379
aeb75bf5
DJ
133802008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13381
13382 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13383 (arm_breakpoint_at): Handle Thumb.
13384 (the_low_target): Add comment.
13385
76b233dd
UW
133862008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13387
13388 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13389
08388c79
DE
133902008-05-09 Doug Evans <dje@google.com>
13391
a3c83fae
DE
13392 * server.h (decode_search_memory_packet): Declare.
13393 * remote-utils.c (decode_search_memory_packet): New fn.
13394 * server.c (handle_search_memory_1): New fn.
08388c79
DE
13395 (handle_search_memory): New fn.
13396 (handle_query): Process qSearch:memory packets.
13397
bb9c3d36
UW
133982008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13399
13400 * regcache.c (registers_length): Remove.
13401 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13402 full register packet.
13403 * regcache.h (registers_length): Remove prototype.
13404 * server.h (PBUFSIZ): Define to 16384.
13405
7284e1be
UW
134062008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13407
13408 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13409 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13410 powerpc-64l.o, and powerpc-altivec64l.o.
13411 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13412 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13413 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13414 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13415 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13416 to srv_xmlfiles.
13417
13418 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13419 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13420 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13421 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13422 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13423 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13424 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13425 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13426 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13427 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13428 (clean): Update.
13429
13430 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13431 (init_registers_powerpc_32l): ... this new prototype.
13432 (init_registers_powerpc_32): Remove, replace by ...
13433 (init_registers_powerpc_altivec32l): ... this new prototype.
13434 (init_registers_powerpc_e500): Remove, replace by ...
13435 (init_registers_powerpc_e500l): ... this new prototype.
13436 (init_registers_ppc64): Remove, replace by ...
13437 (init_registers_powerpc_64l): ... this new prototype.
13438 (init_registers_powerpc_64): Remove, replace by ...
13439 (init_registers_powerpc_altivec64l): ... this new prototype.
13440 (ppc_num_regs): Set to 73.
13441 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13442 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13443 (ppc_cannot_store_register): Handle orig_r3 and trap.
13444 (ppc_arch_setup): Update init_registers_... calls.
13445 (ppc_fill_gregset): Handle orig_r3 and trap.
13446
13447 * inferiors.c (clear_inferiors): Reset current_inferior.
13448
fdc59709
PB
134492008-04-23 Paolo Bonzini <bonzini@gnu.org>
13450
889bf7c5
PA
13451 * acinclude.m4: Add override.m4.
13452 * configure: Regenerate.
fdc59709 13453
c9b2f845
UW
134542008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13455
13456 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13457 initial call to init_register_ppc64.
13458
550512b8
UW
134592008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13460
43aaf8b6
PA
13461 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13462 single powerpc*-*-linux* case.
550512b8
UW
13463 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13464
b6430ec3
UW
134652008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13466
13467 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 13468 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
13469 from reg_xmlfiles.
13470 * linux-ppc-low.c: Include <elf.h>.
13471 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13472 (ppc_hwcap): New global variable.
13473 (ppc_regmap): Remove __SPE__ #ifdef sections.
13474 (ppc_regmap_e500): New global variable.
13475 (ppc_cannot_store_register): Update __SPE__ special case.
13476 (ppc_get_hwcap): New function.
13477 (ppc_arch_setup): Use it to determine whether inferior supports
13478 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13479 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13480 Do not access registers if target does not support AltiVec.
13481 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13482 Do not access registers if target does not support SPE.
13483 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13484
52fa2412
UW
134852008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13486
13487 * linux-low.c (disabled_regsets, num_regsets): New.
13488 (use_regsets_p): Delete.
13489 (linux_wait_for_process): Clear disabled_regsets.
13490 (regsets_fetch_inferior_registers): Check and set it.
13491 (regsets_store_inferior_registers): Likewise.
13492 (linux_fetch_registers, linux_store_registers): Do not use
13493 use_regsets_p.
13494 (initialize_low): Allocate disabled_regsets.
13495
e28b3332
DJ
134962008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13497
13498 * Makefile.in (LIBOBJS): New.
13499 (OBS): Use LIBOBJS.
13500 (memmem.o): New rule.
13501 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13502 * configure: Regenerated.
13503
4536995d
UW
135042008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13505
13506 * server.c (handle_query): Never return "unsupported" for
13507 qXfer:features:read queries.
13508
221c031f
UW
135092008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13510
13511 * server.c (get_features_xml): Fix inverted condition.
13512 (handle_query): Always support qXfer:feature:read.
13513
ccd213ac
DJ
135142008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13515
13516 * server.c (wrapper_argv): New.
13517 (start_inferior): Handle wrapper_argv. If set, expect an extra
13518 trap.
13519 (gdbserver_usage): Document --wrapper.
13520 (main): Parse --wrapper.
13521
6fe305f7
UW
135222008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13523
13524 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13525 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13526 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13527 (ppc_set_pc): Likewise.
13528 (ppc_arch_setup): New function.
13529 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13530 of collect_register.
889bf7c5 13531 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 13532
5b0a002e
UW
135332008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13534
13535 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13536 instead of linux-ppc64-low.o.
13537 * linux-ppc64-low.c: Remove file.
13538 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13539 (linux-ppc64-low.o): Remove rule.
13540
13541 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13542 (init_registers_powerpc_64): Likewise.
13543 (ppc_regmap): Conditionally define depending on __powerpc64__.
13544 (ppc_cannot_store_register): Do not special-case "fpscr" when
13545 compiled on __powerpc64__.
13546 (ppc_collect_ptrace_register): New function.
13547 (ppc_supply_ptrace_register): New function.
13548 (ppc_breakpoint): Change type to "unsigned int".
13549 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13550 (the_low_target): Conditionally provide initializers for the
889bf7c5 13551 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
13552 collect_ptrace_register and supply_ptrace_register members.
13553
9b4b61c8
UW
135542008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13555
13556 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13557 * server.c (gdbserver_xmltarget): Define.
13558 (get_features_xml): Use it to replace "target.xml" and arch_string.
13559
13560 * configure.srv: Remove srv_xmltarget. Add XML files that were
13561 mentioned there to srv_xmlfiles instead. Remove conditional tests
13562 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13563 srv_xmlfiles and srv_regobj to include all possible choices.
13564 * configure.ac (srv_xmltarget): Remove.
13565 (srv_xmlfiles): Do not add "target.xml".
13566 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13567 checks for supplementary target information.
13568 * configure: Regenerate.
13569 * Makefile.in (XML_TARGET): Remove.
13570 (target.xml): Remove rule.
13571 (clean): Do not clean up target.xml.
13572 (.PRECIOUS): Do not mention target.xml.
13573
13574 * target.h (struct target_ops): Remove arch_string member.
13575 * linux-low.c (linux_arch_string): Remove.
13576 (linux_target_ops): Remove arch_string initializer.
13577 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13578 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13579 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13580 * spu-low.c (spu_arch_string): Remove.
13581 (spu_target_ops): Remove arch_string initializer.
13582 * win32-low.c (win32_arch_string): Remove.
13583 (win32_target_ops): Remove arch_string initializer.
13584 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13585 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13586 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13587
ee1a7ae4
UW
135882008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13589
13590 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13591 by collect_ptrace_register and supply_ptrace_register hooks.
13592 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13593 instead of checking for the_low_target.left_pad_xfer.
13594 (usr_store_inferior_registers): Use collect_ptrace_register callback
13595 instead of checking for the_low_target.left_pad_xfer.
13596
13597 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13598 (s390_supply_ptrace_register): Likewise.
13599 (s390_fill_gregset): Call s390_collect_ptrace_register.
13600 (the_low_target): Update.
13601
13602 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13603 (ppc_supply_ptrace_register): Likewise.
13604 (the_low_target): Update.
13605
13606 * linux-i386-low.c (the_low_target): Update.
13607 * linux-x86-64-low.c (the_low_target): Update.
13608
d61ddec4
UW
136092008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13610
13611 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13612 reg-s390.o and reg-s390x.o.
13613
13614 * linux-low.c (new_inferior): New global variable.
13615 (linux_create_inferior, linux_attach): Set it.
13616 (linux_wait_for_process): Call the_low_target.arch_setup after the
13617 target has stopped for the first time.
13618 (initialize_low): Do not call the_low_target.arch_setup.
13619
13620 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13621 (s390_set_pc): Likewise.
13622 (s390_arch_setup): New function.
13623 (the_low_target): Use s390_arch_setup as arch_setup routine.
13624
13625 * regcache.c (realloc_register_cache): New function.
13626 (set_register_cache): Call it for each existing regcache.
13627
d05b4ac3
UW
136282008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13629
13630 * server.h (init_registers): Remove prototype.
13631
13632 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13633 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13634 instead of init_registers ().
13635 * linux-arm-low.c (init_registers_arm): Add prototype.
13636 (init_registers_arm_with_iwmmxt): Likewise.
13637 (the_low_target): Add initializer for arch_setup field.
13638 * linux-cris-low.c (init_registers_cris): Add prototype.
13639 (the_low_target): Add initializer for arch_setup field.
13640 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13641 (the_low_target): Add initializer for arch_setup field.
13642 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13643 (the_low_target): Add initializer for arch_setup field.
13644 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13645 (the_low_target): Add initializer for arch_setup field.
13646 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13647 (the_low_target): Add initializer for arch_setup field.
13648 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13649 (the_low_target): Add initializer for arch_setup field.
13650 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13651 (init_registers_mips64_linux): Likewise.
13652 (the_low_target): Add initializer for arch_setup field.
13653 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13654 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13655 (the_low_target): Add initializer for arch_setup field.
13656 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13657 (init_registers_powerpc_64): Likewise.
13658 (the_low_target): Add initializer for arch_setup field.
13659 * linux-s390-low.c (init_registers_s390): Add prototype.
13660 (init_registers_s390x): Likewise.
13661 (the_low_target): Add initializer for arch_setup field.
13662 * linux-sh-low.c (init_registers_sh): Add prototype.
13663 (the_low_target): Add initializer for arch_setup field.
13664 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13665 (the_low_target): Add initializer for arch_setup field.
13666 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13667 (the_low_target): Add initializer for arch_setup field.
13668
13669 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13670 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13671 instead of init_registers ().
13672 * win32-arm-low.c (init_registers_arm): Add prototype.
13673 (the_low_target): Add initializer for arch_setup field.
13674 * win32-i386-low.c (init_registers_i386): Add prototype.
13675 (the_low_target): Add initializer for arch_setup field.
13676
13677 * spu-low.c (init_registers_spu): Add prototype.
13678 (initialize_low): Call initialie_registers_spu () instead of
13679 initialize_registers ().
13680
fd96d250
PA
136812008-02-19 Pedro Alves <pedro@codesourcery.com>
13682
13683 * server.c (handle_v_requests): When handling the vRun and vAttach
13684 packets, if already debugging a process, don't kill it. Return an
13685 error instead.
13686
d41b6bb4
DJ
136872008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13688
13689 * server.c (handle_query): Correct length check.
13690
5ac588cf
PA
136912008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13692
13693 * win32-low.c (do_initial_child_stuff): Add process handle
13694 parameter. Set current_process_handle and current_process_id from the
13695 parameters. Clear globals.
13696 (win32_create_inferior): Don't set current_process_handle and
13697 current_process_id here. Instead pass them on the call to
13698 do_initial_child_stuff.
13699 (win32_attach): Likewise.
13700 (win32_clear_inferiors): New.
13701 (win32_kill): Don't close the current process handle or the
13702 current thread handle here. Instead call win32_clear_inferiors.
13703 (win32_detach): Don't open a new handle to the process. Call
13704 win32_clear_inferiors.
13705 (win32_join): Don't rely on current_process_handle; open a new
13706 handle using the process id.
13707 (win32_wait): Call win32_clear_inferiors when the inferior process
13708 has exited.
13709
ecd7ecbc
DJ
137102008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13711
13712 * server.c (monitor_show_help): Add "exit".
13713
1525d545
MG
137142008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13715
ecd7ecbc 13716 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
13717 (clean): Add reg-xtensa.c.
13718 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
13719 * configure.srv (xtensa*-*-linux*) New target.
13720 * linux-xtensa-low.c: New.
13721 * xtensa-xtregs.c: New.
1525d545 13722
59a016f0
PA
137232008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13724
13725 * hostio.c: Don't include errno.h.
13726 (errno_to_fileio_errno): Move to hostio-errno.
13727 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13728 error number outputting to the target->hostio_last_error callback.
13729 (hostio_packet_error): Use FILEIO_EINVAL directly.
13730 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13731 calls to hostio_error.
13732 * hostio-errno.c: New.
13733 * server.h (hostio_last_error_from_errno): Declare.
13734 * target.h (target_ops): Add hostio_last_error member.
13735 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13736 as hostio_last_error handler.
889bf7c5 13737 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
13738 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13739 (wince_hostio_last_error): New functions.
13740 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13741 as hostio_last_error handler.
13742 (win32_target_ops) [!_WIN32_WCE]: Register
13743 hostio_last_error_from_errno as hostio_last_error handler.
13744 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13745 (hostio-errno.o): New rule.
13746 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13747 * configure.srv (srv_hostio_err_objs): New variable. Default to
13748 hostio-errno.o.
13749 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13750 * configure: Regenerate.
13751
2d717e4f
DJ
137522008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13753
13754 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13755 (linux_kill, linux_detach): Clean up the process list.
13756 * remote-utils.c (remote_open): Improve port number parsing.
13757 (putpkt_binary, input_interrupt): Only send interrupts if the target
13758 is running.
13759 * server.c (extended_protocol): Make static.
13760 (attached): Define earlier.
13761 (exit_requested, response_needed, program_argv): New variables.
13762 (target_running): New.
13763 (start_inferior): Clear attached here.
13764 (attach_inferior): Set attached here.
13765 (require_running): Define.
13766 (handle_query): Use require_running and target_running. Implement
13767 "monitor exit".
13768 (handle_v_attach, handle_v_run): New.
13769 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13770 (gdbserver_usage): Update.
13771 (main): Redo argument parsing. Handle --debug and --multi. Handle
13772 --attach along with other options or after the port. Save
13773 program_argv. Support no initial program. Resynchronize
13774 communication with GDB after an error. Handle "monitor exit".
13775 Use require_running and target_running. Always allow the extended
13776 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13777 restart in extended mode.
13778 * README: Refer to the GDB manual. Update --attach usage.
13779
7407e2de
AS
137802007-12-20 Andreas Schwab <schwab@suse.de>
13781
13782 * linux-low.c (STACK_SIZE): Define.
13783 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13784 (linux_test_for_tracefork): Likewise.
13785
b65d95c5
DJ
137862007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13787
13788 * linux-low.c (linux_wait_for_event): Update messages. Do not
13789 reinsert auto-delete breakpoints.
13790 * mem-break.c (struct breakpoint): Change return type of handler to
13791 int.
13792 (set_breakpoint_at): Update handler type.
13793 (reinsert_breakpoint_handler): Return 1 instead of calling
13794 delete_breakpoint.
13795 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13796 setting a new one.
13797 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13798 * mem-break.h (set_breakpoint_at): Update handler type.
13799 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13800 * win32-low.c (auto_delete_breakpoint): New.
13801 (get_child_debug_event): Use it.
13802
4e799345
DJ
138032007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13804
13805 * configure.ac: Check for pread and pwrite.
13806 * hostio.c (handle_pread): Fall back to lseek and read.
13807 (handle_pwrite): Fall back to lseek and write.
13808 * config.in, configure: Regenerated.
13809
27524b67
DJ
138102007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13811
13812 * server.c (myresume): Add own_buf argument.
13813 (main): Update calls.
13814
a20d5e98
DJ
138152007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13816
13817 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13818 * remote-utils.c (remote_open): Do not call disable_async_io.
13819 (block_async_io): Delete.
13820 (unblock_async_io): Make static.
13821 (initialize_async_io): New.
13822 * server.c (handle_v_cont): Handle async I/O here.
13823 (myresume): Likewise. Move other common resume tasks here...
13824 (main): ... from here. Call initialize_async_io. Disable async
13825 I/O before the main loop.
13826 * server.h (initialize_async_io): Declare.
13827 (block_async_io, unblock_async_io): Delete prototypes.
13828 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13829
b79d787e
DJ
138302007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13831
13832 * remote-utils.c (readchar): Allow binary data in received messages.
13833
d97903b2
PA
138342007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13835
13836 * win32-low.c (attaching): New global.
13837 (win32_create_inferior): Clear the `attaching' global.
13838 (win32_attach): Set the `attaching' global.
13839 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13840 attaching. Only set a breakpoint at the entry point if not
13841 attaching.
13842
311de423
PA
138432007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13844
13845 * server.c (main): Don't report dll events on the initial
13846 connection on attaches.
13847
6c2d16d2
PA
138482007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13849
13850 * server.c (main): Relax numerical bases supported for the pid of
13851 the --attach command line argument.
13852
5ca906e6
PA
138532007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13854
13855 * win32-low.c (win32_attach): Call OpenProcess before
13856 DebugActiveProcess, not after. Add last error output to error
13857 call.
13858
9c6c8194
PA
138592007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13860
13861 * win32-low.c (win32_get_thread_context)
13862 (win32_set_thread_context): New functions.
13863 (thread_rec): Use win32_get_thread_context.
13864 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13865 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13866 field.
13867
4d5d1aaa
PA
138682007-12-03 Leo Zayas
13869 Pedro Alves <pedro_alves@portugalmail.pt>
13870
13871 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13872 global variables.
13873 (child_add_thread): Minor cleanup.
13874 (child_continue): Resume artificially suspended threads before
13875 calling ContinueDebugEvent.
13876 (suspend_one_thread): New.
13877 (fake_breakpoint_event): New.
13878 (get_child_debug_event): Change return type to int. Check here if
13879 gdb sent an interrupt request. If a soft interrupt was requested,
13880 fake a breakpoint event. Return 0 if there is no event to handle,
13881 and 1 otherwise.
13882 (win32_wait): Don't check here if gdb sent an interrupt request.
13883 Ensure there is a valid event to handle.
13884 (win32_request_interrupt): Add soft interruption method as last
13885 resort.
13886
c436e841
PA
138872007-12-03 Leo Zayas
13888 Pedro Alves <pedro_alves@portugalmail.pt>
13889
13890 * win32-low.h (win32_thread_info): Add descriptions to the
13891 structure members. Replace `suspend_count' counter by a
13892 `suspended' flag.
13893 * win32-low.c (thread_rec): Update condition of when to get the
13894 context from the inferior. Rely on ContextFlags being set if it
13895 has already been retrieved. Only suspend the inferior thread if
13896 we haven't already. Warn if that fails.
13897 (continue_one_thread): s/suspend_count/suspended/. Only call
13898 ResumeThread once. Warn if that fails.
13899
e7b5fa67
PA
139002007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13901
13902 * win32-low.c (win32_wait): Don't read from the inferior when it
13903 has already exited.
13904
a385171d
PA
139052007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13906
13907 * Makefile.in (win32_low_h): New variable.
13908 (win32-low.o): Add dependency on $(win32_low_h).
13909 (win32-arm-low.o, win32-i386-low.o): New rules.
13910
f80c84b3
DJ
139112007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13912
13913 * hostio.c: Correct copyright year.
13914
a6b151f1
DJ
139152007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13916
13917 * Makefile.in (OBS): Add hostio.o.
13918 (hostio.o): New rule.
13919 * server.h (handle_vFile): Declare.
13920 * hostio.c: New file.
13921 * server.c (handle_v_requests): Take packet_len and new_packet_len
13922 for binary packets. Call handle_vFile.
13923 (main): Update call to handle_v_requests.
13924
f9387fc3
DJ
139252007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13926
13927 * linux-low.c: Include <sched.h>.
13928
51c2684e
DJ
139292007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13930
13931 * linux-low.c (linux_tracefork_grandchild): New.
13932 (linux_tracefork_child): Use clone.
13933 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13934
75f83163
JB
139352007-10-31 Joel Brobecker <brobecker@adacore.com>
13936
13937 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13938
da5898ce
DJ
139392007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13940
13941 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13942
24a09b5f
DJ
139432007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13944
13945 * inferiors.c (change_inferior_id): Delete.
13946 (add_pid_to_list, pull_pid_from_list): New.
13947 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13948 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13949 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13950 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13951 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13952 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13953 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13954 (using_threads): Always set to 1.
13955 (handle_extended_wait): New.
13956 (add_process): Do not set TID.
13957 (linux_create_inferior): Set must_set_ptrace_flags.
13958 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13959 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13960 (linux_thread_alive): Rename TID argument to LWPID.
13961 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13962 (linux_wait_for_event): Do not use TID or check using_threads. Update
13963 call to dead_thread_notify. Call handle_extended_wait.
13964 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13965 (send_sigstop): Delete sigstop_sent.
13966 (wait_for_sigstop): Avoid TID.
13967 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13968 (linux_test_for_tracefork): New.
13969 (linux_lookup_signals): Use thread_db_active and
13970 linux_supports_tracefork_flag.
13971 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13972 * linux-low.h (get_process_thread): Avoid TID.
13973 (struct process_ifo): Move thread_known and tid to the end. Remove
13974 sigstop_sent.
13975 (linux_attach_lwp, thread_db_init): Update prototypes.
13976 * server.h (change_inferior_id): Delete prototype.
13977 (add_pid_to_list, pull_pid_from_list): New prototypes.
13978 * thread-db.c (thread_db_use_events): New.
13979 (find_first_thread): Rename to...
13980 (find_one_thread): ...this. Update callers and messages. Do not
13981 call fatal. Check thread_db_use_events. Do not call
13982 change_inferior_id or new_thread_notify.
13983 (maybe_attach_thread): Update. Do not call new_thread_notify.
13984 (thread_db_init): Set thread_db_use_events. Check use_events.
13985 * utils.c (fatal, warning): Correct message prefix.
13986
30ed0a8f
DJ
139872007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13988
13989 * Makefile.in (clean): Remove new files.
13990 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13991 (powerpc-64.o, powerpc-64.c): New rules.
13992 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13993 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13994 with SPE.
13995 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13996 SPE targets.
13997 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13998 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13999 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14000 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14001 (target_regsets): Add AltiVec and SPE register sets.
14002 * configure.ac: Check for AltiVec and SPE.
14003 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14004 (ppc_fill_vrregset, ppc_store_vrregset): New.
14005 (target_regsets): Add AltiVec register set.
14006 * configure: Regenerated.
14007
fd462a61
DJ
140082007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14009
14010 * linux-low.c (O_LARGEFILE): Define.
14011 (linux_read_memory): Use /proc/PID/mem.
14012 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14013 * configure, config.in: Regenerated.
14014
69f223ed
DJ
140152007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14016
14017 * linux-low.c (linux_wait_for_event): Do not pass signals while
14018 single-stepping.
14019
aec18585
PA
140202007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14021
14022 * win32-low.c (create_process): New.
14023 (win32_create_inferior): Use create_process instead of
14024 CreateProcess. If create_process failed retry appending an ".exe"
14025 suffix. Store the GetLastError result immediatelly after
14026 create_process calls and use it on the call to error.
14027
34d86ddd
PA
140282007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14029
14030 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14031
5a0e3bd0
JB
140322007-08-23 Joel Brobecker <brobecker@adacore.com>
14033
14034 * configure.ac: Switch license to GPLv3.
14035
f88c79e6
MS
140362007-08-01 Michael Snyder <msnyder@access-company.com>
14037
14038 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14039
6b3d9b83
PA
140402007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14041
14042 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14043 typedef.
14044 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14045 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14046 CloseToolhelp32Snapshot.
14047 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14048 CloseToolhelp32Snapshot.
14049
c588c53c
MS
140502007-07-27 Michael Snyder <michael.snyder@access-company.com>
14051
14052 * server.c (main): Check for inferior exit before main loop.
14053
aa0403d9
PA
140542007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14055
14056 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14057 instead of on tmp_desc.
14058
255e7678
DJ
140592007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14060 Daniel Jacobowitz <dan@codesourcery.com>
14061
14062 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14063 (add_thread): Minor cleanups.
14064 (clear_inferiors): Move lower in the file. Clear the DLL
14065 list.
14066 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14067 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14068 (xml_escape_text): New.
14069 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14070 for qSupported.
14071 (handle_v_cont): Report errors.
14072 (gdbserver_version): Update.
14073 (main): Correct size of own_buf. Do not report initial DLL events.
14074 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14075 (unloaded_dll, xml_escape_text): New.
14076 * win32-low.c (enum target_waitkind): Update comments.
14077 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14078 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14079 (win32_EnumProcessModules, win32_GetModuleInformation)
14080 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14081 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14082 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14083 (win32_Module32First, win32_Module32Next, load_toolhelp)
14084 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14085 (get_child_debug_event): Handle DLL events.
14086 (win32_wait): Likewise.
14087
0d37add9
DJ
140882007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14089
14090 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14091 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14092
45e2715e
PA
140932007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14094
14095 * win32-low.c (handle_output_debug_string): Ignore event if not
14096 waiting.
14097
c5674cf1
PA
140982007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14099
14100 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14101
2bbe3cc1
DJ
141022007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14103
14104 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14105
ae13219e
DJ
141062007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14107
14108 * inferiors.c (change_inferior_id): Add comment.
14109 * linux-low.c (check_removed_breakpoint): Add an early
14110 prototype. Improve debug output.
14111 (linux_attach): Doc update.
14112 (linux_detach_one_process, linux_detach): Clean up before releasing
14113 each process.
14114 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14115 * linux-low.h (struct process_info): Doc improvement.
14116 * mem-break.c (delete_all_breakpoints): New.
14117 * mem-break.h (delete_all_breakpoints): New prototype.
14118 * thread-db.c (find_first_thread): New.
14119 (thread_db_create_event): Call it instead of
14120 thread_db_find_new_threads. Clean up unused variables.
14121 (maybe_attach_thread): Remove first thread handling.
14122 (thread_db_find_new_threads): Use find_first_thread.
14123 (thread_db_get_tls_address): Likewise.
14124
4105de34
DJ
141252007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14126
14127 * thread-db.c (thread_db_find_new_threads): Add prototype.
14128 (thread_db_create_event): Check for the main thread before adding
14129 a new thread.
14130 (maybe_attach_thread): Only enable event reporting if TID == 0.
14131 (thread_db_get_tls_address): Check for new threads.
14132
2b876972
DJ
141332007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14134
14135 * linux-low.c (linux_create_inferior): Try execv before execvp.
14136 * spu-low.c (spu_create_inferior): Likewise.
14137
7a245884
DJ
141382007-06-13 Mike Frysinger <vapier@gentoo.org>
14139
14140 * linux-low.c (linux_create_inferior): Change execv to execvp.
14141 * spu-low.c (spu_create_inferior): Likewies.
14142
117ce543
DJ
141432007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14144
14145 * Makefile.in (clean): Clean new files instead of deleted ones.
14146 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14147 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14148 rules.
14149 * configure.srv: Specify XML files and new regformats for MIPS and
14150 MIPS64 GNU/Linux.
14151 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14152 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14153 an entry for the restart register.
14154 (mips_cannot_fetch_register, mips_cannot_store_register)
14155 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14156 register names to match the XML descriptions.
14157 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14158 restart register instead of $0.
14159
0e7f50da
UW
141602007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14161 Markus Deuling <deuling@de.ibm.com>
14162
14163 * remote-utils.c (decode_xfer_write): New function.
14164 * server.h (decode_xfer_write): Add prototype.
14165 * server.c (handle_query): Add PACKET_LEN argument. Support
14166 qXfer:spu:read and qXfer:spu:write packets.
14167 (main): Pass packet_len to handle_query.
14168 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14169 * target.h (target_ops): Add qxfer_spu.
14170
374c1d38
UW
141712007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14172
14173 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14174 accessing non-seekable spufs files.
14175
bb63802a
UW
141762007-05-16 Markus Deuling <deuling@de.ibm.com>
14177
889bf7c5 14178 * server.c (handle_query): Add reply for qC packet.
bb63802a 14179
7390519e
PA
141802007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14181 Leo Zayas <lerele@champenstudios@com>
14182
14183 * server.h (check_remote_input_interrupt_request): New function.
14184 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14185 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14186 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14187 (check_remote_input_interrupt_request): New function.
14188 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 14189 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
14190 winapi_GenerateConsoleCtrlEvent): New typedefs.
14191 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14192 to 250 ms.
14193 (win32_wait): Check for remote interrupt request
14194 with check_remote_input_interrupt_request.
14195 (win32_request_interrupt): New function.
14196 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14197
34b34921
PA
141982007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14199
14200 * win32-low.c (debug_registers_changed,
14201 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14202 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14203 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14204 (thread_rec): Get context using the low target.
14205 (child_add_thread): Call thread_added on the low target,
14206 which does the same thing.
14207 (regptr): Delete.
14208 (do_initial_child_stuff): Remove debug registers references.
14209 Set context using the low target. Resume threads after
14210 setting the contexts.
14211 (child_continue): Remove dead variable. Remove debug
14212 registers references.
14213 (child_fetch_inferior_registers): Go through the low target.
14214 (do_child_store_inferior_registers): Remove.
14215 (child_store_inferior_registers): Go through the low target.
14216 (win32_resume): Remove debug registers references.
14217 Set context using the low target.
14218 (handle_exception): Change return type to void. Don't record
14219 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14220 first chance exception.
889bf7c5 14221 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
14222 goto loop. Always return after waiting for debug event.
14223 (win32_wait): Convert to switch statement. Handle spurious
14224 events.
14225
14226 * win32-i386-low.c (debug_registers_changed,
14227 debug_registers_used): New.
14228 (initial_stuff): Rename to ...
14229 (i386_initial_stuff): ... this. Clear debug registers
14230 state variables.
14231 (store_debug_registers): Delete.
14232 (i386_get_thread_context): New.
14233 (load_debug_registers): Delete.
14234 (i386_set_thread_context): New.
14235 (i386_thread_added): New.
14236 (single_step): Rename to ...
14237 (i386_single_step): ... this.
14238 (do_fetch_inferior_registers): Rename to ...
14239 (i386_fetch_inferior_register): ... this.
14240 (i386_store_inferior_register): New.
14241 (the_low_target): Adapt to new interface.
14242
14243 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14244 (arm_get_thread_context): New.
14245 (arm_set_thread_context): New.
14246 (regptr): New.
14247 (do_fetch_inferior_registers): Rename to ...
14248 (arm_fetch_inferior_register): ... this.
14249 (arm_store_inferior_register): New.
14250 (arm_wince_breakpoint): Reimplement as unsigned long.
14251 (arm_wince_breakpoint_len): Define.
14252 (the_low_target): Adapt to new interface.
14253
14254 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14255 load_debug_registers. Add get_thread_context, set_thread_context,
14256 thread_added and store_inferior_register. Rename
14257 fetch_inferior_registers to fetch_inferior_register.
14258 (regptr): Remove declaration.
14259
dd6953e1
PA
142602007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14261
14262 * linux-low.c (linux_detach): Change return type to int. Return 0.
14263 * spu-low.c (spu_detach): Likewise.
14264
444d6139
PA
142652007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14266
14267 * target.h (target_ops): Change return type of detach to int.
14268 Add join.
14269 (join_inferior): New.
14270 * server.c (main): Don't skip detach support on mingw32.
14271 If the inferior doesn't support detaching return error.
14272 Call join_inferior instead of using waitpid.
14273 * linux-low.c (linux_join): New.
14274 (linux_target_op): Add linux_join.
14275 * spu-low.c (spu_join): New.
14276 (spu_target_ops): Add spu_join.
14277 * win32-low.c (win32_detach): Adapt to new interface.
14278 Reopen current_process_handle before detaching. Issue a child
14279 resume before detaching.
14280 (win32_join): New.
14281 (win32_target_op): Add win32_join.
14282
1d5315fe
PA
142832007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14284
14285 * win32-low.c (win32-attach): Fix return value.
14286 * target.h (target_ops): Describe ATTACH return values.
14287
bf914831
PA
142882007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14289
14290 * win32-low.c (GETPROCADDRESS): Define.
14291 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14292 (winapi_DebugSetProcessKillOnExit): Likewise.
14293 (win32_create_inferior): Force usage of ansi CreateProcessA.
14294 (win32_attach): Use GETPROCADDRESS.
14295 (win32_detach): Likewise.
14296
f72f3e60
PA
142972007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14298
14299 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14300
ed50f18f
PA
143012007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14302
14303 * win32-low.c: Commit leftover changes from 2007-03-29.
14304
0c2ead7e
DJ
143052007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14306
14307 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14308 fields short instead of int. Add explicit padding.
14309 (i387_cache_to_fsave): Remove unnecessary casts.
14310 (i387_fsave_to_cache): Doc fix.
14311 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14312
73725ff3
DJ
143132007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14314
14315 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14316 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14317
d99f33d8
PA
143182007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14319
14320 * configure.srv (arm*-*-mingw32ce*): Move near the other
14321 arm targets.
14322
68070c10
PA
143232007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14324
2482afc6 14325 * configure.ac: Add errno checking.
68070c10
PA
14326 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14327 sys/file.h and malloc.h.
14328 (AC_CHECK_DECLS): Add perror.
14329 (srv_mingwce): Handle.
2482afc6 14330 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
14331 win32-i386-low.o to srv_tgtobj.
14332 (i[34567]86-*-mingw*): Likewise.
14333 (arm*-*-mingw32ce*): Add case.
14334 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14335 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14336 [__MINGW32CE__] (strerror): New function.
14337 [__MINGW32CE__] (errno): Define to GetLastError.
14338 [__MINGW32CE__] (COUNTOF): New macro.
14339 (remote_open): Remove extra close call.
14340 * mem-break.c (delete_breakpoint_at): New function.
14341 * mem-break.h (delete_breakpoint_at): Declare.
14342 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14343 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14344 [USE_WIN32API] (read, write): Add char* casts.
14345 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14346 * server.h: Include wincecompat.h on Windows CE.
14347 [HAVE_ERRNO_H]: Check.
14348 (perror): Declare if not declared.
14349 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14350 (perror_with_name): Remove errno declaration.
14351 * wincecompat.h: New.
14352 * wincecompat.c: New.
14353 * win32-low.h: New.
14354 * win32-arm-low.c: New.
14355 * win32-i386-low.c: New.
14356 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14357 (OUTMSG2): Make it safe.
14358 (_T): New macro.
14359 (COUNTOF): New macro.
14360 (NUM_REGS): Get it from the low target.
14361 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14362 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14363 (thread_rec): Let low target handle debug registers.
14364 (child_add_thread): Likewise.
14365 (child_init_thread_list): Likewise.
14366 (continue_one_thread): Likewise.
14367 (regptr): New.
14368 (do_child_fetch_inferior_registers): Move to ...
14369 * win32-i386-low.c: ... here, and rename to ...
14370 (do_fetch_inferior_registers): ... this.
889bf7c5 14371 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
14372 Go through the low target.
14373 (do_child_store_inferior_registers): Use regptr.
14374 (strwinerror): New function.
14375 (win32_create_inferior): Handle Windows CE.
14376 Use strwinerror instead of strerror on Windows error
14377 codes. Add program to the error output.
14378 Don't close the main thread handle on Windows CE.
14379 (win32_attach): Use coredll.dll on Windows CE.
14380 (win32_kill): Close current process and current
14381 thread handles.
14382 (win32_detach): Use coredll.dll on Windows CE.
14383 (win32_resume): Let low target handle debug registers, and
14384 step request.
14385 (handle_exception): Add/Remove initial breakpoint. Avoid
14386 non-existant WSTOPSIG on Windows CE.
14387 (win32_read_inferior_memory): Cast to remove warning.
14388 (win32_arch_string): Go through the low target.
14389 (initialize_low): Call set_breakpoint_data with the low
14390 target's breakpoint.
14391 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14392 FOP_REGNUM, mappings): Move to ...
14393 * win32-i386-low.c: ... here.
14394 * win32-low.c (win32_thread_info): Move to ...
14395 * win32-low.h: ... here.
14396 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14397 win32-arm-low.c and wincecompat.c.
14398 (all:): Add $EXEEXT.
14399 (install-only:): Likewise.
14400 (gdbserver:): Likewise.
14401 (gdbreplay:): Likewise.
14402 * config.in: Regenerate.
14403 * configure: Regenerate.
14404
41093d81
PA
144052007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14406
14407 * win32-low.c: Rename typedef thread_info to
14408 win32_thread_info throughout.
14409
544afa54
PA
144102007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14411
14412 * win32-i386-low.c: Rename to ...
14413 * win32-low.c: ... this.
14414 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14415 * Makefile.in: Likewise.
14416
bce7165d
PA
144172007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14418
14419 * remote-utils.c (monitor_output): Constify msg parameter.
14420 * server.h (monitor_output): Likewise.
14421 * win32-i386-low.c (handle_output_debug_string): New.
14422 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14423 handle_output_debug_string.
14424 (get_child_debug_event): Likewise.
14425
506c7aa0
DJ
144262007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14427
14428 * server.c (main): Correct strtoul check.
14429
42c81e2a
DJ
144302007-03-27 Jon Ringle <jon@ringle.org>
14431
14432 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14433
9453113a
DJ
144342007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14435
14436 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14437
64a69107
DJ
144382007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14439
14440 * terminal.h: Check HAVE_SGTTY_H.
14441
144422007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
14443
14444 * remote-utils.c (remote_open): Print out the assigned port number.
14445
c74d0ad8
DJ
144462007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14447
14448 * remote-utils.c (monitor_output): New function.
14449 * server.c (debug_threads): Define here.
14450 (monitor_show_help): New function.
14451 (handle_query): Handle qRcmd.
14452 (main): Do not handle 'd' packet.
14453 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14454 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14455 of debug_threads.
14456
de7c3b4a
PA
144572007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14458
14459 * Makefile.in (EXEEXT): New.
14460 (clean): Use $(EXEEXT).
14461
ef57601b
PA
144622007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14463
14464 * target.h (target_ops): Rename send_signal to request_interrupt,
14465 and remove enum target_signal parameter.
14466 * linux-low.c (linux_request_interrupt): Rename from
14467 linux_send_signal, and always send SIGINT.
14468 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14469 and always send SIGINT.
14470 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14471 of send_signal.
14472 (input_interrupt): Likewise.
14473
820f2bda
PA
144742007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14475
14476 * server.c (get_features_xml): Check if target implemented
14477 arch_string.
14478 * win32-i386-low.c (win32_arch_string): New.
14479 (win32_target_ops): Add win32_arch_string as arch_string member.
14480
ab39bf24
UW
144812007-02-22 Markus Deuling <deuling@de.ibm.com>
14482
14483 * spu-low.c (spu_arch_string): New.
14484 (spu_target_ops): Add spu_arch_string.
14485
61ff6e04
DJ
144862007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14487
14488 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14489 * configure.ac: Do not check for terminal.h.
14490 * configure, config.in: Regenerated.
14491
fb1e4ffc
DJ
144922007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14493
14494 * Makefile.in (OBS): Add $(XML_BUILTIN).
14495 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14496 (clean): Update.
14497 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14498 (arm-with-iwmmxt.c): New.
14499 * config.in, configure: Regenerate.
14500 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14501 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14502 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14503 (arm*-*-linux*): Add iWMMXt and regset support.
14504 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14505 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14506 (arm_store_wmmxregset, target_regsets): New.
14507 * server.c (get_features_xml): Take annex argument. Check builtin
14508 XML documents.
14509 (handle_query): Handle multiple annexes.
14510
0f48aa01
DJ
145112007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14512
14513 * remote-utils.c [USE_WIN32API] (read, write): Define.
14514 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14515 write.
14516
23181151
DJ
145172007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14518
14519 * linux-i386-low.c (the_low_target): Set arch_string.
14520 * linux-x86-64-low.c (the_low_target): Likewise.
14521 * linux-low.c (linux_arch_string): New.
14522 (linux_target_ops): Add it.
14523 * linux-low.h (struct linux_target_ops): Add arch_string.
14524 * server.c (write_qxfer_response): Use const void * for DATA.
14525 (get_features_xml): New.
14526 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14527 * target.h (struct target_ops): Add arch_string method.
14528
9d606399
DJ
145292007-01-03 Denis Pilat <denis.pilat@st.com>
14530 Daniel Jacobowitz <dan@codesourcery.com>
14531
14532 * linux-low.c (linux_kill): Handle being called with no threads.
14533 * win32-i386-low.c (win32_kill): Likewise.
14534 (get_child_debug_event): Clear current_process_handle.
14535
145362006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
14537 Daniel Jacobowitz <dan@codesourcery.com>
14538
14539 * remote-utils.c (remote_open): Check the type of specified
14540 serial port devices before opening them.
14541 * server.c (main): Kill the inferior if an error occurs during
14542 the first remote_open.
14543
a5e13d24
DJ
145442006-12-05 Markus Deuling <deuling@de.ibm.com>
14545
14546 * README: Update supported targets.
14547
186947f7
DJ
145482006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14549
14550 * Makefile.in (clean): Remove reg-mips64.c.
14551 (reg-mips64.c, reg-mips64.o): New rules.
14552 * configure.srv: Handle mips64. Include regset support for mips.
14553 * linux-mips-low.c (union mips_register): New.
14554 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14555 (mips_breakpoint, mips_breakpoint_at): Use int.
14556 (mips_collect_register, mips_supply_register)
14557 (mips_collect_register_32bit, mips_supply_register_32bit)
14558 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14559 (mips_store_fpregset, target_regsets): New.
14560 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14561
a13e2c95
UW
145622006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14563
14564 * configure.srv: Add target "spu*-*-*".
14565 * Makefile.in (clean): Remove reg-spu.c.
14566 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14567 * spu-low.c: New file.
14568
cb7283db
DJ
145692006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14570
14571 * configure.ac: Correct td_thr_tls_get_addr test.
14572 * configure: Regenerated.
14573
89be2091
DJ
145742006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14575
14576 * linux-low.c (linux_wait_for_event): Reformat. Use the
14577 pass_signals array.
14578 * remote-utils.c (decode_address_to_semicolon): New.
14579 * server.c (pass_signals, handle_general_set): New.
14580 (handle_query): Mention QPassSignals for qSupported.
14581 (main): Call handle_general_set.
14582 * server.h (pass_signals, decode_address_to_semicolon): New.
14583
000ef4f0
DJ
145842006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14585
14586 * server.c (handle_query): Correct error handling for read_auxv.
14587
b7149293
UW
145882005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14589
14590 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14591 and srv_linux_thread_db to yes.
14592 * linux-s390-low.c (s390_fill_gregset): New function.
14593 (target_regsets): Define data structure.
14594
dae5f5cf
DJ
145952006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14596
14597 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14598 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14599 * config.in, configure: Regenerated.
14600 * inferiors.c (gdb_id_to_thread): New function.
14601 (gdb_id_to_thread_id): Use it.
14602 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14603 * linux-low.h (struct process_info): Add th member.
14604 (thread_db_get_tls_address): New prototype.
14605 * remote-utils.c (decode_address): Make non-static.
14606 * server.c (handle_query): Handle qGetTLSAddr.
14607 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14608 * target.h (struct target_ops): Add get_tls_address.
14609 * thread-db.c (maybe_attach_thread): Save the thread handle.
14610 (thread_db_get_tls_address): New.
14611
32ca6d61
DJ
146122006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14613
14614 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14615 (linux_resume_one_process): Take a siginfo_t *. Update all
14616 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14617 (struct pending_signals): Add a siginfo_t.
14618 (linux_wait_for_process): Always set last_status.
14619 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14620 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14621 * linux-low.h (struct process_info): Add last_status.
14622
5ffff7c1
DJ
146232006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14624
14625 * remote-utils.c (try_rle): New function.
14626 (putpkt_binary): Use it.
14627
8695c747
DJ
146282006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14629
14630 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14631 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14632 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14633 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14634 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14635 point registers.
14636
290fadea
RS
146372006-08-08 Richard Sandiford <richard@codesourcery.com>
14638
14639 * server.c (terminal_fd): New variable.
14640 (old_foreground_pgrp): Likewise.
14641 (restore_old_foreground_pgrp): New function.
14642 (start_inferior): Record the terminal file descriptor in terminal_fd
14643 and its original foreground group in old_foreground_pgrp. Register
14644 restore_old_foreground_pgrp with atexit().
14645
9f2e1e63
DJ
146462006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14647
14648 * server.c (handle_query): Correct qPart to qXfer.
14649
b80864fb
DJ
146502006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14651
14652 * configure.ac: Check for more headers which are missing on
14653 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14654 * configure.srv: Add Cygwin and mingw32.
14655 * remote-utils.c: Don't include headers unconditionally which
14656 are missing on mingw32. Include <winsock.h> for mingw32.
14657 (remote_open): Adjust for mingw32 support. Flush
14658 standard error after writing to it.
14659 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14660 (unblock_async_io, enable_async_io, disable_async_io)
14661 (readchar, getpkt): Update for Winsock support.
14662 (prepare_resume_reply): Expect a protocol signal number.
14663 * server.c: Disable <sys/wait.h> on mingw32.
14664 (start_inferior): Adjust for mingw32 support. Flush
14665 standard error after writing to it.
14666 (attach_inferior): Likewise. Use protocol signal
14667 numbers.
14668 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14669 and names.
14670 * win32-i386-low.c: New file.
14671 * Makefile.in (XM_CLIBS): Set.
14672 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14673 (win32-i386-low.o): New dependency rule.
14674 * linux-low.c (linux_wait): Use target signal numbers.
14675 * target.h (struct target_ops): Doc fix.
14676 * server.h (target_signal_to_name): New prototype.
14677 * gdbreplay.c: Don't include headers unconditionally which
14678 are missing on mingw32. Include <winsock.h> for mingw32.
14679 (remote_close, remote_open): Adjust for Winsock support.
14680 * configure, config.in: Regenerated.
14681
0876f84a
DJ
146822006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14683
14684 * server.c (decode_xfer_read, write_qxfer_response): New.
14685 (handle_query): Take a packet length argument. Handle
14686 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14687 the qSupported response.
14688 (main): Update call to handle_query.
14689
01f9e8fa
DJ
146902006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14691
14692 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14693 (putpkt_binary): Renamed from putpkt and adjusted for binary
14694 data.
14695 (putpkt): New wrapper for putpkt_binary.
14696 (readchar): Don't mask off the high bit.
14697 (decode_X_packet): New function.
14698 * server.c (main): Call putpkt_binary if a handler sets the packet
14699 length. Save the length of the incoming packet. Handle 'X'.
14700 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14701
be2a5f71
DJ
147022006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14703
14704 * server.c (handle_query): Handle qSupported.
14705
ea025f5f
DJ
147062006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14707
14708 * remote-utils.c (all_symbols_looked_up): New variable.
14709 (look_up_one_symbol): Check it.
14710 * server.h (look_up_one_symbol): New declaration.
14711 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14712
9308fc88
DJ
147132006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14714
14715 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 14716 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
14717 (PTRACE_GET_THREAD_AREA): Define.
14718 (ps_get_thread_area): New function.
14719
52fb6437
NS
147202006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14721
14722 * configure.srv (m68k*-*-uclinux*): New target.
14723 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14724 (linux_resume_one_process): Remove extraneous cast.
14725 (linux_read_offsets): New.
14726 (linux_target_op): Add linux_read_offsets on mmuless systems.
14727 * server.c (handle_query): Add qOffsets logic.
14728 * target.h (struct target_ops): Add read_offsets.
14729
21b0f40c
DJ
147302006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14731
14732 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14733 (PTRACE_GET_THREAD_AREA): Define.
14734 (ps_get_thread_area): New function.
14735 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14736 (linux-x86-64-low.o): Update.
14737
0050a760
DJ
147382006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14739
14740 * configure.ac: Remove checks for prfpregset_t.
14741 * gdb_proc_service.h: New file.
14742 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14743 new "gdb_proc_service.h".
14744 * proc-service.c: Likewise.
14745 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14746 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14747 * Makefile.in (gdb_proc_service_h): Updated.
14748 * configure, config.in: Regenerated.
14749
b92a518e
DJ
147502006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14751
14752 * remote-utils.c (prepare_resume_reply): Move declaration
14753 of gdb_id_from_wait to the top of the block.
14754
545587ee
DJ
147552006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14756
14757 * linux-low.c (regsets_store_inferior_registers): Read the regset
14758 from the target before filling it.
14759
9db87ebd
DJ
147602006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14761
14762 * server.c (attach_inferior): Return SIGTRAP for a successful
14763 attach.
14764
dd24457d
DJ
147652006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14766
14767 * Makefile.in (OBS): Add version.o.
14768 (STAGESTUFF): Delete.
14769 (version.o): Add dependencies.
14770 (version.c): Replace rule.
14771 (clean): Remove version.c.
14772 * server.c (gdbserver_version): New.
14773 (gdbserver_usage): Use printf.
14774 (main): Handle --version and --help.
14775 * server.h (version, host_name): Add declarations.
14776
6f0f660e
EZ
147772005-12-23 Eli Zaretskii <eliz@gnu.org>
14778
889bf7c5
PA
14779 * linux-arm-low.c:
14780 * linux-arm-low.c:
14781 * inferiors.c:
14782 * i387-fp.h:
14783 * i387-fp.c:
14784 * gdbreplay.c:
14785 * regcache.c:
14786 * proc-service.c:
14787 * mem-break.h:
14788 * mem-break.c:
14789 * linux-x86-64-low.c:
14790 * linux-sh-low.c:
14791 * linux-s390-low.c:
14792 * linux-ppc64-low.c:
14793 * linux-ppc-low.c:
14794 * linux-mips-low.c:
14795 * linux-m68k-low.c:
14796 * linux-m32r-low.c:
14797 * linux-low.h:
14798 * linux-low.c:
14799 * linux-ia64-low.c:
14800 * linux-i386-low.c:
14801 * linux-crisv32-low.c:
14802 * thread-db.c:
14803 * terminal.h:
14804 * target.h:
14805 * target.c:
14806 * server.h:
14807 * server.c:
14808 * remote-utils.c:
14809 * regcache.h:
14810 * utils.c:
14811 * Makefile.in:
14812 * configure.ac:
6f0f660e
EZ
14813 * gdbserver.1: Add (C) after Copyright. Update the FSF
14814 address.
14815
9d1fb177
DJ
148162005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14817
14818 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14819 (arm_breakpoint_at): Recognize both breakpoints.
14820 (the_low_target): Use the correct breakpoint instruction.
14821
011a70c2
DJ
148222005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14823
14824 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14825 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14826 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14827 (the_low_target): Update.
14828
7fb85e41
AS
148292005-10-25 Andreas Schwab <schwab@suse.de>
14830
14831 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14832
14833 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14834 (ia64_num_regs): Reduce to 462.
14835
3db0444b
DJ
148362005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14837
14838 * acinclude.m4: Correct quoting.
14839 * aclocal.m4: Regenerated.
14840
14841 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14842 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14843 (thread_db_init): Call thread_db_err_str.
14844 * configure.ac: Check for TD_VERSION.
14845 * config.in, configure: Regenerated.
14846
bee0189a
DJ
148472005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14848
14849 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14850
e9d25b98
DJ
148512005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14852
14853 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14854 is not available. Define HAVE_PTRACE_GETREGS if it is.
14855 * config.in, configure: Regenerated.
14856 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14857 * linux-i386-low.c, linux-m68k-low.c: Update to use
14858 HAVE_PTRACE_GETREGS.
14859 * linux-low.c (regsets_fetch_inferior_registers)
14860 (regsets_store_inferior_registers): Only return 0 if we processed
14861 GENERAL_REGS.
14862 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14863 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14864
a06660f7
DJ
148652005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14866
14867 * inferiors.c (struct thread_info): Add gdb_id.
14868 (add_thread): Add gdb_id argument.
14869 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14870 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14871 calls to add_thread.
14872 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14873 * server.c (handle_query): Use thread_to_gdb_id.
14874 (handle_v_cont, main): Use gdb_id_to_thread_id.
14875 * server.h (add_thread): Update prototype.
14876 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14877 prototypes.
14878
5a1f5858
DJ
148792005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14880
14881 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14882 left-padded registers.
14883 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14884 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14885
e122f1f5
SE
148862005-07-01 Steve Ellcey <sje@cup.hp.com>
14887
14888 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14889 * configure: Regenerate.
14890 * config.in: Regenerate.
14891 * server.h (NEED_DECLARATION_STRERROR):
14892 Replace with !HAVE_DECL_STRERROR.
14893
d592fa2f
DJ
148942005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14895
14896 * linux-low.c (linux_wait, linux_send_signal): Don't test
14897 an unsigned long variable for > 0 if it could be MAX_ULONG.
14898 * server.c (myresume): Likewise.
14899 * target.c (set_desired_inferior): Likewise.
14900
ccbd4912
MK
149012005-06-13 Mark Kettenis <kettenis@gnu.org>
14902
14903 * configure.ac: Simplify and improve check for socklen_t.
14904 * configure, config.in: Regenerate.
14905
f450004a
DJ
149062005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14907
14908 * acconfig.h: Remove.
14909 * configure.ac: Add a test for socklen_t. Use three-argument
14910 AC_DEFINE throughout.
14911 * config.in: Regenerated using autoheader 2.59.
14912 * configure: Regenerated.
14913
14914 * gdbreplay.c (socklen_t): Provide a default.
14915 (remote_open): Use socklen_t.
14916 * remote-utils.c (socklen_t): Provide a default.
14917 (remote_open): Use socklen_t.
14918 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14919 unsigned char.
14920
14921 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14922 char for buffers.
14923 * linux-low.c (linux_read_memory, linux_write_memory)
14924 (linux_read_auxv): Likewise.
14925 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14926 (check_mem_write): Likewise.
14927 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14928 Likewise.
14929 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14930 (registers_from_string, register_data): Likewise.
14931 * server.c (handle_query, main): Likewise.
14932 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14933 (decode_M_packet): Likewise.
14934 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14935 * target.h (struct target_ops): Update read_memory, write_memory,
14936 and read_auxv.
14937 (read_inferior_memory, write_inferior_memory): Update.
14938 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14939 to unsigned char *.
14940 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14941 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14942 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14943 linux-s390-low.c, linux-sh-low.c: Update for changes in
14944 read_inferior_memory and the_low_target->breakpoint.
14945
eee84df1
DJ
149462005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14947
14948 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14949 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14950 * configure.srv: Add powerpc64-*-linux*.
14951 * linux-ppc64-low.c: New file.
14952
45b134e5
OF
149532005-05-23 Orjan Friberg <orjanf@axis.com>
14954
14955 * linux-cris-low.c: New file with support for CRIS.
14956 * linux-crisv32-low.c: Ditto for CRISv32.
14957 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14958 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 14959 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
14960 reg-crisv32.o, and reg-crisv32.c to make rules.
14961 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14962 recognized targets.
14963
48d93c75
UW
149642005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14965
14966 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14967 of sizeof (PTRACE_XFER_TYPE).
14968 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14969
e013ee27
OF
149702005-05-12 Orjan Friberg <orjanf@axis.com>
14971
889bf7c5 14972 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
14973 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14974 pointers for hardware watchpoint support.
14975 * linux-low.h (struct linux_target_ops): Ditto.
14976 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14977 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14978 to linux_target_ops.
14979 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14980 reply packet.
14981 * server.c (main): Recognize 'Z' and 'z' packets.
14982
b0ded00b
UW
149832005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14984
14985 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14986 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14987 (the_low_target): Add new members.
14988
8643e2ad
DJ
149892005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14990
14991 * proc-service.c (ps_lgetregs): Search all_processes instead of
14992 all_threads.
14993
fc620387
DJ
149942005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14995
14996 * server.c (start_inferior): Change return type to int.
14997 (attach_inferior): Change sigptr to int *.
14998 (handle_v_cont, handle_v_requests): Change signal to int *.
14999 (main): Change signal to int.
15000
150012005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
15002
15003 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15004 * configure.srv: Add m32r*-*-linux*.
15005 * linux-m32r-low.c: New file.
15006
e0e76420
DJ
150072005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15008
15009 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15010
a1928bad
DJ
150112005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15012
15013 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15014 Take unsigned long arguments for PIDs.
15015 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15016 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15017 (wait_for_sigstop, linux_resume_one_process)
15018 (regsets_fetch_inferior_registers, linux_send_signal)
15019 (linux_read_auxv): Likewise. Update the types of variables holding
15020 PIDs. Update format string specifiers.
15021 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15022 * remote-utils.c (prepare_resume_reply): Likewise.
15023 * server.c (cont_thread, general_thread, step_thread)
15024 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15025 unsigned long.
15026 (handle_query): Update format specifiers.
15027 (handle_v_cont, main): Use strtoul for thread IDs.
15028 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15029 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15030 (general_thread, step_thread, thread_from_wait)
15031 (old_thread_from_wait): Update.
15032 * target.h (struct thread_resume): Use unsigned long for THREAD.
15033 (struct target_ops): Use unsigned long for arguments to attach and
15034 thread_alive.
15035
dcdb98d2
DJ
150362005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15037
15038 * acinclude.m4: Include bfd/bfd.m4 directly.
15039 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15040 <agriffis@toolchain.org>.
15041 * aclocal.m4, configure: Regenerated.
15042
bec39cab
AC
150432005-01-07 Andrew Cagney <cagney@gnu.org>
15044
15045 * configure.ac: Rename configure.in, require autoconf 2.59.
15046 * configure: Re-generate.
15047
434c4c77
DJ
150482004-12-08 Daniel Jacobowitz <dan@debian.org>
15049
15050 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15051 LIBS when finished.
15052 * aclocal.m4: Regenerated.
15053 * configure: Regenerated.
15054
db1d3e1b
AS
150552004-11-21 Andreas Schwab <schwab@suse.de>
15056
15057 * linux-m68k-low.c (m68k_num_gregs): Define.
15058 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15059 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15060 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15061 (m68k_breakpoint_at): New. Add to the_low_target.
15062
15063 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15064 srv_linux_thread_db to yes.
15065
43360365
JB
150662004-10-20 Joel Brobecker <brobecker@gnat.com>
15067
15068 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15069 (ARCH_SET_FS): Likewise.
15070 (ARCH_GET_FS): Likewise.
15071 (ARCH_GET_GS): Likewise.
15072
fd500816
DJ
150732004-10-16 Daniel Jacobowitz <dan@debian.org>
15074
15075 * linux-i386-low.c (ps_get_thread_area): New.
15076 * linux-x86-64-low.c (ps_get_thread_area): New.
15077 * linux-low.c: Include <sys/syscall.h>.
15078 (linux_kill_one_process): Don't kill the first thread here.
15079 (linux_kill): Kill the first thread here.
15080 (kill_lwp): New function.
15081 (send_sigstop, linux_send_signal): Use it.
15082 * proc-service.c: Clean up #ifdefs.
15083 (fpregset_info): Delete.
15084 (ps_lgetregs): Update and enable implementation.
15085 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15086 implementations.
15087 * remote-utils.c (struct sym_cache, symbol_cache): New.
15088 (input_interrupt): Print a clearer message.
15089 (async_io_enabled): New variable.
15090 (enable_async_io, disable_async_io): Use it. Update comments.
15091 (look_up_one_symbol): Use the symbol cache.
15092 * thread-db.c (thread_db_look_up_symbols): New function.
15093 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15094
f6de3c42
DJ
150952004-10-16 Daniel Jacobowitz <dan@debian.org>
15096
15097 * configure.in: Test for -rdynamic.
15098 * configure: Regenerated.
15099 * Makefile (INTERNAL_LDFLAGS): New.
15100 (gdbserver, gdbreplay): Use it.
15101
2c0fc042
AC
151022004-09-02 Andrew Cagney <cagney@gnu.org>
15103
15104 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15105
075b3282
DJ
151062004-03-23 Daniel Jacobowitz <drow@mvista.com>
15107
15108 * linux-low.c (linux_wait): Clear all_processes list also.
15109
fa6a77dc
DJ
151102004-03-12 Daniel Jacobowitz <drow@mvista.com>
15111
15112 * linux-low.c: Include <errno.h>. Remove extern declaration of
15113 errno.
15114
6d782a97
DJ
151152004-03-12 Daniel Jacobowitz <drow@mvista.com>
15116
15117 * gdbreplay.c, server.h, utils.c: Update copyright years.
15118
3a7fb99b
DJ
151192004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15120
15121 * server.c (main): Print child status or termination signal from
15122 variable 'signal', not 'sig'.
15123
c3e735a6
DJ
151242004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15125
15126 * linux-low.c (linux_read_memory): Change return type to
15127 int. Check for and return error from ptrace().
15128 * target.c (read_inferior_memory): Change return type to int. Pass
15129 back return status from the_target->read_memory().
15130 * target.h (struct target_ops): Adapt *read_memory() prototype.
15131 Update comment.
15132 (read_inferior_memory): Adapt prototype.
15133 * server.c (main): Return an error packet if
15134 read_inferior_memory() returns an error.
15135
a59d1c82
DJ
151362004-03-04 Daniel Jacobowitz <drow@mvista.com>
15137
15138 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15139 Unify with other clean targets.
15140
dc3f8883
DJ
151412004-02-29 Daniel Jacobowitz <drow@mvista.com>
15142
15143 * server.c (handle_v_cont): Call set_desired_inferior.
15144
89a208da
DJ
151452004-02-29 Daniel Jacobowitz <drow@mvista.com>
15146
15147 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15148
62ea82f5
DJ
151492004-02-29 Daniel Jacobowitz <drow@mvista.com>
15150
15151 * linux-low.c (linux_wait): Unblock async I/O.
15152 (linux_resume): Block and enable async I/O.
15153 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15154 * server.h (block_async_io, unblock_async_io): Add prototypes.
15155
6910d122
DJ
151562004-02-29 Daniel Jacobowitz <drow@mvista.com>
15157
15158 * remote-utils.c (remote_open): Print a status notice after
15159 opening a TCP port.
15160 * server.c (attach_inferior): Print a status notice after
15161 attaching.
15162
151632004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
15164
15165 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15166
c89dc5d4
DJ
151672004-02-26 Daniel Jacobowitz <drow@mvista.com>
15168
15169 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15170 error packet.
15171 * server.c, target.h: Update copyright years.
15172
4b8dad4a
RM
151732004-02-25 Roland McGrath <roland@redhat.com>
15174
15175 * target.h (struct target_ops): New member `read_auxv'.
15176 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15177 * linux-low.c (linux_read_auxv): New function.
15178 (linux_target_ops): Initialize `read_auxv' member to that.
15179
d7446758
JB
151802004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15181
15182 Committed by Jim Blandy <jimb@redhat.com>.
15183
15184 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 15185 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
15186 instead of GPR_SIZE to distiguish s390 and s390x targets.
15187
5544ad89
DJ
151882004-01-31 Daniel Jacobowitz <drow@mvista.com>
15189
15190 * linux-low.c: Update copyright year.
15191 (check_removed_breakpoint): Clear pending_is_breakpoint.
15192 (linux_set_resume_request, linux_queue_one_thread)
15193 (resume_status_pending_p): New functions.
15194 (linux_continue_one_thread): Use process->resume.
15195 (linux_resume): Only resume threads if there are no pending events.
15196 * linux-low.h (struct process_info): Add resume request
15197 pointer.
15198
2a68b70e
DJ
151992004-01-30 Daniel Jacobowitz <drow@mvista.com>
15200
15201 * regcache.c (new_register_cache): Clear the allocated register
15202 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15203
64386c31
DJ
152042003-10-13 Daniel Jacobowitz <drow@mvista.com>
15205
15206 * linux-low.c (linux_resume): Take a struct thread_resume *
15207 argument.
15208 (linux_wait): Update call.
15209 (resume_ptr): New static variable.
15210 (linux_continue_one_thread): Renamed from
15211 linux_continue_one_process. Use resume_ptr.
15212 (linux_resume): Use linux_continue_one_thread.
15213 * server.c (handle_v_cont, handle_v_requests): New functions.
15214 (myresume): New function.
15215 (main): Handle 'v' case.
15216 * target.h (struct thread_resume): New type.
15217 (struct target_ops): Change argument of "resume" to struct
15218 thread_resume *.
15219 (myresume): Delete macro.
15220
c938e9b0
L
152212003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15222
15223 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15224 (uninstall): Support DESTDIR.
15225
7f313d07
BC
15226Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15227
15228 * configure.srv: Add xscale*linux copy of arm*linux entry.
15229
3b2fc2ea
DJ
152302003-07-24 Daniel Jacobowitz <drow@mvista.com>
15231
15232 * linux-arm-low.c (arm_reinsert_addr): New function.
15233 (the_low_target): Add arm_reinsert_addr.
15234
1c0a559e
MK
152352003-07-08 Mark Kettenis <kettenis@gnu.org>
15236
15237 * mem-break.c: Remove whitespace at end of file.
15238
43d5792c
DJ
152392003-06-28 Daniel Jacobowitz <drow@mvista.com>
15240
15241 * configure.in: Check whether we need to prototype strerror.
15242 * server.h: Optionally prototype strerror.
15243 * gdbreplay.c (perror_with_name): Use strerror.
15244 * linux-low.c (linux_attach_lwp): Use strerror.
15245 * utils.c (perror_with_name): Use strerror.
15246 * config.in, configure: Regenerated.
15247
c8a86edf
DJ
152482003-06-28 Daniel Jacobowitz <drow@mvista.com>
15249
15250 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15251 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15252
73d37363
DJ
152532003-06-20 Daniel Jacobowitz <drow@mvista.com>
15254
15255 * Makefile.in (SFILES): Update.
15256 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15257 low-sun3.c: Remove files.
15258
6ad8ae5c
DJ
152592003-06-17 Daniel Jacobowitz <drow@mvista.com>
15260
15261 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15262 (linux_detach_one_process, linux_detach): New functions.
15263 (linux_target_ops): Add linux_detach.
15264 * server.c (main): Handle 'D' packet.
15265 * target.h (struct target_ops): Add "detach" member.
15266 (detach_inferior): Define.
15267
1581182a
MK
152682003-06-13 Mark Kettenis <kettenis@gnu.org>
15269
15270 From Kelley Cook <kelleycook@wideopenwest.com>:
15271 * configure.srv: Accept i[34567]86 variants.
15272
e5379b03
DJ
152732003-06-05 Daniel Jacobowitz <drow@mvista.com>
15274
15275 * linux-low.c (linux_wait_for_event): Correct comment typos.
15276 (linux_resume_one_process): Call check_removed_breakpoint.
15277 (linux_send_signal): New function.
15278 (linux_target_ops): Add linux_send_signal.
15279 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15280 of kill.
15281 * target.h (struct target_ops): Add send_signal.
15282
2ff29de4
JB
152832003-05-29 Jim Blandy <jimb@redhat.com>
15284
15285 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15286 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15287 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15288 away part of the register's value.
15289
254787d4
DJ
152902003-03-26 Daniel Jacobowitz <drow@mvista.com>
15291
15292 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15293 (linux_wait_for_event, linux_init_signals): Likewise.
15294
94e10508
DJ
152952003-03-17 Daniel Jacobowitz <drow@mvista.com>
15296
15297 * configure.in: Check for stdlib.h.
15298 * configure: Regenerated.
15299 * config.in: Regenerated.
15300
4c0711e0
DJ
153012003-01-04 Andreas Schwab <schwab@suse.de>
15302
15303 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15304
ef66e766
AC
153052003-01-02 Andrew Cagney <ac131313@redhat.com>
15306
15307 * Makefile.in: Remove obsolete code.
15308
a1358604
DJ
153092002-11-20 Daniel Jacobowitz <drow@mvista.com>
15310
15311 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15312 defined(PT_FPR0_HI).
15313
23ce3b1c
DJ
153142002-11-17 Stuart Hughes <seh@zee2.com>
15315
15316 * linux-arm-low.c (arm_num_regs): Increase.
15317 (arm_regmap): Include status register.
15318
153192002-11-17 Daniel Jacobowitz <drow@mvista.com>
15320
15321 * linux-low.c (register_addr): Remove incorrect -1 check.
15322
a9fa9f7d
DJ
153232002-08-29 Daniel Jacobowitz <drow@mvista.com>
15324
15325 * linux-low.c (linux_create_inferior): Call setpgid. Return
15326 the new PID.
15327 (unstopped_p, linux_signal_pid): Remove.
15328 (linux_target_ops): Remove linux_signal_pid.
15329 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15330 global instead of target method.
15331 * target.h (struct target_ops): Remove signal_pid. Update comment
15332 for create_inferior.
15333 * server.c (signal_pid): New variable.
15334 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 15335 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
15336 (attach_inferior): Set signal_pid.
15337
17574093
DJ
153382002-08-23 Daniel Jacobowitz <drow@mvista.com>
15339
15340 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15341
153422002-08-20 Jim Blandy <jimb@redhat.com>
15343
15344 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15345 default for this.
15346
153472002-08-01 Andrew Cagney <cagney@redhat.com>
15348
15349 * Makefile.in: Make chill references obsolete.
15350
153512002-07-24 Kevin Buettner <kevinb@redhat.com>
15352
15353 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15354 * configure: Regenerate.
15355 * config.in: Regenerate.
15356
153572002-07-09 David O'Brien <obrien@FreeBSD.org>
15358
15359 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15360 (perror_with_name, remote_close, remote_open, expect, play): Static.
15361
153622002-07-04 Michal Ludvig <mludvig@suse.cz>
15363
4b8dad4a 15364 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
15365 byte offsets instead of an array of indexes.
15366 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15367
153682002-06-13 Daniel Jacobowitz <drow@mvista.com>
15369
15370 * regcache.c: Add comment.
15371
153722002-06-11 Daniel Jacobowitz <drow@mvista.com>
15373
15374 * thread-db.c: New file.
15375 * proc-service.c: New file.
15376 * acinclude.m4: New file.
15377 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15378 proc-service.o, and thread-db.o.
15379 (linux-low.o): Add USE_THREAD_DB.
15380 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15381 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15382 * aclocal.m4: Regenerated.
15383 * config.in: Regenerated.
15384 * configure: Regenerated.
15385 * configure.in: Check for proc_service.h, sys/procfs.h,
15386 thread_db.h, and linux/elf.h headrs.
15387 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15388 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15389 Check for -lthread_db and thread support.
15390 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15391 PowerPC, and SuperH.
15392 * i387-fp.c: Constify arguments.
15393 * i387-fp.h: Likewise.
15394 * inferiors.c: (struct thread_info): Renamed from
15395 `struct inferior_info'. Remove PID member. Use generic inferior
15396 list header. All uses updated.
15397 (inferiors, signal_pid): Removed.
15398 (all_threads): New variable.
15399 (get_thread): Define.
15400 (add_inferior_to_list): New function.
15401 (for_each_inferior): New function.
15402 (change_inferior_id): New function.
15403 (add_inferior): Removed.
15404 (remove_inferior): New function.
15405 (add_thread): New function.
15406 (free_one_thread): New function.
15407 (remove_thread): New function.
15408 (clear_inferiors): Use for_each_inferior and free_one_thread.
15409 (find_inferior): New function.
15410 (find_inferior_id): New function.
15411 (inferior_target_data): Update argument type.
15412 (set_inferior_target_data): Likewise.
15413 (inferior_regcache_data): Likewise.
15414 (set_inferior_regcache_data): Likewise.
15415 * linux-low.c (linux_bp_reinsert): Remove.
15416 (all_processes, stopping_threads, using_thrads)
15417 (struct pending_signals, debug_threads, pid_of): New.
15418 (inferior_pid): Replace with macro.
15419 (struct inferior_linux_data): Remove.
15420 (get_stop_pc, add_process): New functions.
15421 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15422 Use add_process and add_thread.
15423 (linux_attach_lwp): New function, based on old linux_attach. Use
15424 add_process and add_thread. Set stop_expected for new threads.
15425 (linux_attach): New function.
15426 (linux_kill_one_process): New function.
15427 (linux_kill): Kill all LWPs.
15428 (linux_thread_alive): Use find_inferior_id.
15429 (check_removed_breakpoints, status_pending_p): New functions.
15430 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15431 Update. Use WNOHANG. Wait for cloned processes also. Update process
15432 struct for the found process.
15433 (linux_wait_for_event): New function.
15434 (linux_wait): Use it. Support LWPs.
15435 (send_sigstop, wait_for_sigstop, stop_all_processes)
15436 (linux_resume_one_process, linux_continue_one_process): New functions.
15437 (linux_resume): Support LWPs.
15438 (REGISTER_RAW_SIZE): Remove.
15439 (fetch_register): Use register_size instead. Call supply_register.
15440 (usr_store_inferior_registers): Likewise. Call collect_register.
15441 Fix recursive case.
15442 (regsets_fetch_inferior_registers): Improve error message.
15443 (regsets_store_inferior_registers): Add debugging.
15444 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15445 (unstopped_p, linux_signal_pid): New functions.
15446 (linux_target_ops): Add linux_signal_pid.
15447 (linux_init_signals): New function.
15448 (initialize_low): Call it. Initialize using_threads.
15449 * regcache.c (inferior_regcache_data): Add valid
15450 flag.
15451 (get_regcache): Fetch registers lazily. Add fetch argument
15452 and update all callers.
15453 (regcache_invalidate_one, regcache_invalidate): New
15454 functions.
15455 (new_register_cache): Renamed from create_register_cache.
15456 Return the new regcache.
15457 (free_register_cache): Change argument to a void *.
15458 (registers_to_string, registers_from_string): Call get_regcache
15459 with fetch flag set.
15460 (register_data): Make static. Pass fetch flag to get_regcache.
15461 (supply_register): Call get_regcache with fetch flag clear.
15462 (collect_register): Call get_regcache with fetch flag set.
15463 (collect_register_as_string): New function.
15464 * regcache.h: Update.
15465 * remote-utils.c (putpkt): Flush after debug output and use
15466 stderr.
15467 Handle input interrupts while waiting for an ACK.
15468 (input_interrupt): Use signal_pid method.
15469 (getpkt): Flush after debug output and use stderr.
15470 (outreg): Use collect_register_as_string.
15471 (new_thread_notify, dead_thread_notify): New functions.
15472 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15473 and general_thread.
15474 (look_up_one_symbol): Flush after debug output.
15475 * server.c (step_thread, server_waiting): New variables.
15476 (start_inferior): Don't use signal_pid. Update call to mywait.
15477 (attach_inferior): Update call to mywait.
15478 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15479 (main): Don't fetch/store registers explicitly. Use
15480 set_desired_inferior. Support proposed ``Hs'' packet. Update
15481 calls to mywait.
15482 * server.h: Update.
15483 (struct inferior_list, struct_inferior_list_entry): New.
15484 * target.c (set_desired_inferior): New.
15485 (write_inferior_memory): Constify.
15486 (mywait): New function.
15487 * target.h: Update.
15488 (struct target_ops): New signal_pid method.
15489 (mywait): Removed macro, added prototype.
15490
15491 * linux-low.h (regset_func): Removed.
15492 (regset_fill_func, regset_store_func): New.
15493 (enum regset_type): New.
15494 (struct regset_info): Add type field. Use new operation types.
15495 (struct linux_target_ops): stop_pc renamed to get_pc.
15496 Add decr_pc_after_break and breakpoint_at.
15497 (get_process, get_thread_proess, get_process_thread)
15498 (strut process_info, all_processes, linux_attach_lwp)
15499 (thread_db_init): New.
15500
15501 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15502 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15503 (the_low_target): Add new members.
15504 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15505 (i386_store_fpxregset): Constify.
15506 (target_regsets): Add new kind identifier.
15507 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15508 (i386_set_pc): Add debugging.
15509 (i386_breakpoint_at): New function.
15510 (the_low_target): Add new members.
15511 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15512 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15513 (mips_breakpoint_at): New.
15514 (the_low_target): Add new members.
15515 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15516 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15517 (the_low_target): Add new members.
15518 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15519 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15520 (the_low_target): Add new members.
15521 * linux-x86-64-low.c (target_regsets): Add new kind
15522 identifier.
15523
155242002-05-15 Daniel Jacobowitz <drow@mvista.com>
15525
15526 From Martin Pool <mbp@samba.org>:
15527 * server.c (gdbserver_usage): New function.
15528 (main): Call it.
15529
155302002-05-14 Daniel Jacobowitz <drow@mvista.com>
15531
15532 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15533 stop_at -> stop_pc.
15534
155352002-05-04 Andrew Cagney <ac131313@redhat.com>
15536
15537 * Makefile.in: Remove obsolete code.
15538
155392002-04-24 Michal Ludvig <mludvig@suse.cz>
15540
15541 * linux-low.c (regsets_fetch_inferior_registers),
15542 (regsets_store_inferior_registers): Removed cast to int from
15543 ptrace() calls.
15544 * regcache.h: Added declaration of struct inferior_info.
15545
155462002-04-20 Daniel Jacobowitz <drow@mvista.com>
15547
15548 * inferiors.c (struct inferior_info): Add regcache_data.
15549 (add_inferior): Call create_register_cache.
15550 (clear_inferiors): Call free_register_cache.
15551 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15552 * regcache.c (struct inferior_regcache_data): New.
15553 (registers): Remove.
15554 (get_regcache): New function.
15555 (create_register_cache, free_register_cache): New functions.
15556 (set_register_cache): Don't initialize the register cache here.
15557 (registers_to_string, registers_from_string, register_data): Call
15558 get_regcache.
15559 * regcache.h: Add prototypes.
15560 * server.h: Likewise.
15561
155622002-04-20 Daniel Jacobowitz <drow@mvista.com>
15563
15564 * mem-break.c: New file.
15565 * mem-break.h: New file.
15566 * Makefile.in: Add mem-break.o rule; update server.h
15567 dependencies.
15568 * inferiors.c (struct inferior_info): Add target_data
15569 member.
15570 (clear_inferiors): Free target_data member if set.
15571 (inferior_target_data, set_inferior_target_data): New functions.
15572 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15573 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15574 * linux-low.c (linux_bp_reinsert): New variable.
15575 (struct inferior_linux_data): New.
15576 (linux_create_inferior): Use set_inferior_target_data.
15577 (linux_attach): Likewise. Call add_inferior.
15578 (linux_wait_for_one_inferior): New function.
15579 (linux_wait): Call it.
15580 (linux_write_memory): Add const.
15581 (initialize_low): Call set_breakpoint_data.
15582 * linux-low.h (struct linux_target_ops): Add breakpoint
15583 handling members.
15584 * server.c (attach_inferior): Remove extra add_inferior
15585 call.
15586 * server.h: Include mem-break.h. Update inferior.c
15587 prototypes.
15588 * target.c (read_inferior_memory)
15589 (write_inferior_memory): New functions.
15590 * target.h (read_inferior_memory)
15591 (write_inferior_memory): Change macros to prototypes.
15592 (struct target_ops): Update comments. Add const to write_memory
15593 definition.
15594
155952002-04-11 Daniel Jacobowitz <drow@mvista.com>
15596
15597 * linux-low.c (usr_store_inferior_registers): Support
15598 registers which are allowed to fail to store.
15599 * linux-low.h (linux_target_ops): Likewise.
15600 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15601 (ppc_cannot_store_register): FPSCR may not be storable.
15602
156032002-04-09 Daniel Jacobowitz <drow@mvista.com>
15604
15605 * server.h: Include <string.h> if HAVE_STRING_H.
15606 * ChangeLog: Correct paths in last ChangeLog entry.
15607
156082002-04-09 Daniel Jacobowitz <drow@mvista.com>
15609
15610 * linux-low.h: Remove obsolete prototypes.
15611 (struct linux_target_ops): New.
15612 (extern the_low_target): New.
15613 * linux-low.c (num_regs, regmap): Remove declarations.
15614 (register_addr): Use the_low_target explicitly.
15615 (fetch_register): Likewise.
15616 (usr_fetch_inferior_registers): Likewise.
15617 (usr_store_inferior_registers): Likewise.
15618 * linux-arm-low.c (num_regs): Remove.
15619 (arm_num_regs): Define.
15620 (arm_regmap): Renamed from regmap, made static.
15621 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15622 made static.
15623 (arm_cannot_store_register): Renamed from cannot_store_register,
15624 made static.
15625 (the_low_target): New.
15626 * linux-i386-low.c (num_regs): Remove.
15627 (i386_num_regs): Define.
15628 (i386_regmap): Renamed from regmap, made static.
15629 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15630 made static.
15631 (i386_cannot_store_register): Renamed from cannot_store_register,
15632 made static.
15633 (the_low_target): New.
15634 * linux-ia64-low.c (num_regs): Remove.
15635 (ia64_num_regs): Define.
15636 (ia64_regmap): Renamed from regmap, made static.
15637 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15638 made static.
15639 (ia64_cannot_store_register): Renamed from cannot_store_register,
15640 made static.
15641 (the_low_target): New.
15642 * linux-m68k-low.c (num_regs): Remove.
15643 (m68k_num_regs): Define.
15644 (m68k_regmap): Renamed from regmap, made static.
15645 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15646 made static.
15647 (m68k_cannot_store_register): Renamed from cannot_store_register,
15648 made static.
15649 (the_low_target): New.
15650 * linux-mips-low.c (num_regs): Remove.
15651 (mips_num_regs): Define.
15652 (mips_regmap): Renamed from regmap, made static.
15653 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15654 made static.
15655 (mips_cannot_store_register): Renamed from cannot_store_register,
15656 made static.
15657 (the_low_target): New.
15658 * linux-ppc-low.c (num_regs): Remove.
15659 (ppc_num_regs): Define.
15660 (ppc_regmap): Renamed from regmap, made static.
15661 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15662 made static.
15663 (ppc_cannot_store_register): Renamed from cannot_store_register,
15664 made static.
15665 (the_low_target): New.
15666 * linux-s390-low.c (num_regs): Remove.
15667 (s390_num_regs): Define.
15668 (s390_regmap): Renamed from regmap, made static.
15669 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15670 made static.
15671 (s390_cannot_store_register): Renamed from cannot_store_register,
15672 made static.
15673 (the_low_target): New.
15674 * linux-sh-low.c (num_regs): Remove.
15675 (sh_num_regs): Define.
15676 (sh_regmap): Renamed from regmap, made static.
15677 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15678 made static.
15679 (sh_cannot_store_register): Renamed from cannot_store_register,
15680 made static.
15681 (the_low_target): New.
15682 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15683 (the_low_target): New.
15684
156852002-04-09 Daniel Jacobowitz <drow@mvista.com>
15686
15687 * Makefile.in: Add stamp-h target.
15688 * configure.in: Create stamp-h.
15689 * configure: Regenerated.
15690
156912002-04-09 Daniel Jacobowitz <drow@mvista.com>
15692
15693 * inferiors.c: New file.
15694 * target.c: New file.
15695 * target.h: New file.
15696 * Makefile.in: Add target.o and inferiors.o. Update
15697 dependencies.
15698 * linux-low.c (inferior_pid): New static variable,
15699 moved from server.c.
15700 (linux_create_inferior): Renamed from create_inferior.
15701 Call add_inferior. Return 0 on success instead of a PID.
15702 (linux_attach): Renamed from myattach.
15703 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15704 (linux_thread_alive): Renamed from mythread_alive.
15705 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15706 child dies.
15707 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15708 (regsets_store_inferior_registers): Correct error message.
15709 Add missing ``return 0''.
15710 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15711 (linux_store_registers): Renamed from store_inferior_registers.
15712 (linux_read_memory): Renamed from read_inferior_memory.
15713 (linux_write_memory): Renamed from write_inferior_memory.
15714 (linux_target_ops): New structure.
15715 (initialize_low): Call set_target_ops ().
15716 * remote-utils.c (unhexify): New function.
15717 (hexify): New function.
15718 (input_interrupt): Send signals to ``signal_pid''.
15719 * server.c (inferior_pid): Remove.
15720 (start_inferior): Update create_inferior call.
15721 (attach_inferior): Call add_inferior.
15722 (handle_query): New function.
15723 (main): Call handle_query for `q' packets.
15724 * server.h: Include "target.h". Remove obsolete prototypes.
15725 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15726
157272002-04-09 Daniel Jacobowitz <drow@mvista.com>
15728
15729 * Makefile.in: Add WARN_CFLAGS. Update configury
15730 dependencies.
15731 * configure.in: Check for <string.h>
15732 * configure: Regenerate.
15733 * config.in: Regenerate.
15734 * gdbreplay.c: Include needed system headers.
15735 (remote_open): Remove strchr prototype.
15736 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15737 * regcache.c (supply_register): Change buf argument to const void *.
15738 (supply_register_by_name): Likewise.
15739 (collect_register): Change buf argument to void *.
15740 (collect_register_by_name): Likewise.
15741 * regcache.h: Add missing prototypes.
15742 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15743 * server.c (handle_query): New function.
15744 (attached): New static variable, moved out of main.
15745 (main): Quiet longjmp clobber warnings.
15746 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15747 * utils.c (error): Remove NORETURN.
15748 (fatal): Likewise.
This page took 2.587753 seconds and 4 git commands to generate.