]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
common-utils-selftests.c: Add ATTRIBUTE_PRINTF
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
cc628f3d
AH
12017-10-25 Alan Hayward <alan.hayward@arm.com>
2
3 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
4 with REGNO.
5 (aarch64_store_gregset): Likewise.
6 (aarch64_fill_fpregset): Likewise.
7 (aarch64_store_fpregset): Likewise.
8
4d3bb80e
SM
92017-10-21 Simon Marchi <simon.marchi@ericsson.com>
10
11 * gdbthread.h (find_thread, for_each_thread): New functions.
12 * inferiors.c (thread_of_pid): Remove.
13 (find_any_thread_of_pid): Use find_thread.
14 * linux-low.c (num_lwps): Use for_each_thread.
15
7a7cdfa0
YQ
162017-10-17 Yao Qi <yao.qi@linaro.org>
17
18 * Makefile.in: Remove one rule.
19 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
20
e675d170
YQ
212017-10-17 Yao Qi <yao.qi@linaro.org>
22
23 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
24 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
25
7eb4e0f9
YQ
262017-10-17 Yao Qi <yao.qi@linaro.org>
27
28 * configure.srv: Rename arm.o with arch/arm.o.
29
60d6cfc9
YQ
302017-10-17 Yao Qi <yao.qi@linaro.org>
31
32 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
33 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
34 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
35 (arch-i386.o, arch-amd64.o): Remove rules.
36 (arch/%.o): New rule.
37 Update POSTCOMPILE and COMPILE.pre.
38 * configure.ac: Invoke AC_CONFIG_COMMANDS.
39 * configure: Re-generated.
40 * configure.srv: Replace arch-i386.o with arch/i386.o.
41 Replace arch-amd64.o with arch/amd64.o.
42
5bfda255
YQ
432017-10-16 Yao Qi <yao.qi@linaro.org>
44
45 * configure: Regenerated.
46
9c80ecd6
SM
472017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
48
49 * inferiors.h: (struct inferior_list): Remove.
50 (struct inferior_list_entry); Remove.
51 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
52 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
53 get_first_inferior): Remove.
54 (for_each_inferior, for_each_inferior_with_data, find_inferior,
55 find_inferior_id, find_inferior_in_random): Change signature.
56 * inferiors.c (all_threads): Change type to
57 std::list<thread_info *>.
58 (get_thread): Remove macro.
59 (find_inferior, find_inferior_id): Change signature, implement
60 using find_thread.
61 (find_inferior_in_random): Change signature, implement using
62 find_thread_in_random.
63 (for_each_inferior, for_each_inferior_with_data): Change
64 signature, implement using for_each_thread.
65 (add_inferior_to_list, remove_inferior): Remove.
66 (add_thread, get_first_thread, thread_of_pid,
67 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
68 (get_first_inferior, one_inferior_p, clear_inferior_list):
69 Remove.
70 (clear_inferiors, get_thread_process): Update.
71 * gdbthread.h: Include <list>.
72 (struct thread_info) <entry>: Remove field.
73 <id>: New field.
74 (all_threads): Change type to std::list<thread_info *>.
75 (get_first_inferior): Add doc.
76 (find_thread, for_each_thread, find_thread_in_random): New
77 functions.
78 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
79 * linux-arm-low.c (update_registers_callback): Update.
80 * linux-low.c (second_thread_of_pid_p): Update.
81 (kill_one_lwp_callback, linux_detach_lwp_callback,
82 delete_lwp_callback, status_pending_p_callback, same_lwp,
83 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
84 iterate_over_lwps, not_stopped_callback,
85 resume_stopped_resumed_lwps, count_events_callback,
86 select_singlestep_lwp_callback, select_event_lwp_callback,
87 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
88 suspend_and_send_sigstop_callback, wait_for_sigstop,
89 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
90 lwp_running, linux_set_resume_request, resume_status_pending_p,
91 need_step_over_p, start_step_over, linux_resume_one_thread,
92 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
93 reset_lwp_ptrace_options_callback): Update.
94 * linux-mips-low.c (update_watch_registers_callback): Update.
95 * regcache.c (regcache_invalidate_one, regcache_invalidate):
96 Update.
97 (free_register_cache_thread_one): Remove.
98 (regcache_release): Update.
99 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
100 handle_qxfer_threads_worker): Update.
101 (handle_query): Update, use list iterator.
102 (visit_actioned_threads, handle_pending_status,
103 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
104 clear_pending_status_callback, set_pending_status_callback,
105 find_status_pending_thread_callback, handle_status,
106 process_serial_event): Update.
107 * target.c (thread_search_callback): Update.
108 * thread-db.c (thread_db_get_tls_address): Update.
109 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
110 Update.
111 * win32-i386-low.c (update_debug_registers_callback): Update.
112 * win32-low.c (delete_thread_info, child_delete_thread,
113 continue_one_thread, suspend_one_thread,
114 get_child_debug_event): Adjust.
115
9179355e
SM
1162017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
117
118 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
119 * inferiors.h: Include <list>.
120 (struct process_info) <entry>: Remove field.
121 <pid>: New field.
122 (pid_of): Change macro to function.
123 (ptid_of, lwpid_of): Remove macro.
124 (all_processes): Change type to std::list<process_info *>.
125 (ALL_PROCESSES): Remove macro.
126 (for_each_process, find_process): New function.
127 * inferiors.c (all_processes): Change type to
128 std::list<process_info *>.
129 (find_thread_process): Adjust.
130 (add_process): Likewise.
131 (remove_process): Likewise.
132 (find_process_pid): Likewise.
133 (get_first_process): Likewise.
134 (started_inferior_callback): Remove.
135 (have_started_inferiors_p): Adjust.
136 (attached_inferior_callback): Remove.
137 (have_attached_inferiors_p): Adjust.
138 * linux-low.c (check_zombie_leaders): Likewise.
139 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
140 (x86_linux_update_xmltarget): Adjust.
141 * server.c (handle_query): Likewise.
142 (gdb_reattached_process): Remove.
143 (handle_status): Adjust.
144 (kill_inferior_callback): Likewise.
145 (detach_or_kill_inferior): Remove.
146 (print_started_pid): Likewise.
147 (print_attached_pid): Likewise.
148 (detach_or_kill_for_exit): Update.
149 (process_serial_event): Likewise.
150 * linux-arm-low.c (arm_new_fork): Likewise.
151
c9cb8905
SM
1522017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
153
154 * dll.h: Include <list>.
155 (struct dll_info): Add constructor.
156 <entry>: Remove field.
157 (all_dlls): Change type to std::list<dll_info>.
158 * dll.c: Include <algorithm>.
159 (get_dll): Remove macro.
160 (all_dlls): Change type to std::list<dll_info *>.
161 (free_one_dll): Remove.
162 (match_dll): Likewise.
163 (loaded_dll): Adjust.
164 (unloaded_dll): Adjust to all_dlls type change, use
165 std::find_if. Inline code from match_dll.
166 (clear_dlls): Adjust to all_dlls type change.
167 * server.c (emit_dll_description): Remove.
168 (handle_qxfer_libraries): Adjust to all_dlls type change,
169 integrate emit_dll_description's functionality.
170
04ec7890
SM
1712017-10-12 Simon Marchi <simon.marchi@ericsson.com>
172
173 * linux-low.h (struct linux_target_ops) <delete_process>: New
174 field.
175 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
176 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
177 (struct linux_target_ops): Add delete_process callback.
178 * linux-arm-low.c (arm_delete_process): New.
179 (struct linux_target_ops): Add delete_process callback.
180 * linux-bfin-low.c (struct linux_target_ops): Likewise.
181 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
182 * linux-m32r-low.c (struct linux_target_ops): Likewise.
183 * linux-mips-low.c (mips_linux_delete_process): New.
184 (struct linux_target_ops): Add delete_process callback.
185 * linux-ppc-low.c (struct linux_target_ops): Likewise.
186 * linux-s390-low.c (struct linux_target_ops): Likewise.
187 * linux-sh-low.c (struct linux_target_ops): Likewise.
188 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
189 * linux-tile-low.c (struct linux_target_ops): Likewise.
190 * linux-x86-low.c (x86_linux_delete_process): New.
191 (struct linux_target_ops): Add delete_process callback.
192 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
193
466eecee
SM
1942017-10-12 Simon Marchi <simon.marchi@ericsson.com>
195
196 * linux-aarch64-low.c (the_low_target): Add thread delete
197 callback.
198 * linux-arm-low.c (arm_delete_thread): New function.
199 (the_low_target): Add thread delete callback.
200 * linux-bfin-low.c (the_low_target): Likewise.
201 * linux-crisv32-low.c (the_low_target): Likewise.
202 * linux-low.c (delete_lwp): Invoke delete_thread callback if
203 set.
204 * linux-low.h (struct linux_target_ops) <delete_thread>: New
205 field.
206 * linux-m32r-low.c (the_low_target): Add thread delete callback.
207 * linux-mips-low.c (mips_linux_delete_thread): New function.
208 (the_low_target): Add thread delete callback.
209 * linux-ppc-low.c (the_low_target): Likewise.
210 * linux-s390-low.c (the_low_target): Likewise.
211 * linux-sh-low.c (the_low_target): Likewise.
212 * linux-tic6x-low.c (the_low_target): Likewise.
213 * linux-tile-low.c (the_low_target): Likewise.
214 * linux-x86-low.c (the_low_target): Likewise.
215 * linux-xtensa-low.c (the_low_target): Likewise.
216
b79f7801
YZ
2172017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
218
219 * win32-low.c: Include "common-inferior.h".
220
bc3b087d
SDJ
2212017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
222
223 * inferiors.c (set_inferior_cwd): New function.
224 * server.c (handle_general_set): Handle QSetWorkingDir packet.
225 (handle_query): Inform that QSetWorkingDir is supported.
226 * win32-low.c (create_process): Pass the inferior's cwd to
227 CreateProcess.
228
d092c5a2
SDJ
2292017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
230
231 * inferiors.c (current_inferior_cwd): New global variable.
232 (get_inferior_cwd): New function.
233 * inferiors.h (struct process_info) <cwd>: New field.
234
7da0a886
SDJ
2352017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
236
237 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
238 (OBS): Add gdb_tilde_expand.o.
239
289a6840
SM
2402017-10-02 Simon Marchi <simon.marchi@ericsson.com>
241
242 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
243 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
244
256642e8
PA
2452017-09-29 Pedro Alves <palves@redhat.com>
246
247 * ax.c (gdb_parse_agent_expr): Constify.
248 * ax.h (gdb_parse_agent_expr): Constify.
249 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
250 Constify.
251 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
252 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
253 * remote-utils.h (read_ptid): Constify.
254 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
255 (process_point_options, process_serial_event): Constify.
256 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
257 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
258 (cmd_qtbuffer): Constify.
259
5b9ca4d4
PA
2602017-09-29 Pedro Alves <palves@redhat.com>
261
262 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
263 fails.
264
94c207e0
PA
2652017-09-29 Pedro Alves <palves@redhat.com>
266
267 * linux-low.c (handle_extended_wait): Pass parent thread instead
268 of process to thread_db_notice_clone.
269 * linux-low.h (thread_db_notice_clone): Replace parent process
270 parameter with parent thread parameter.
271 * thread-db.c (find_one_thread): Add comment.
272 (thread_db_notice_clone): Replace parent process parameter with
273 parent thread parameter. Temporarily switch to the parent thread.
274
75352e28
SDJ
2752017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
276
277 * gdbthread.h: Include "common-gdbthread.h".
278 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
279 "if" when validating the ptid.
280 * remote-utils.c: Include "gdbthread.h".
281 (prepare_resume_reply): Use "switch_to_thread".
282 * target.c (done_accessing_memory): Likewise.
283
ad339634
AA
2842017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
285
286 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
287 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
288 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
289 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
290 s390x-gs-linux64-ipa.o to ipa_obj.
291 * linux-s390-low.c (HWCAP_S390_GS): New define.
292 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
293 New functions.
294 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
295 (s390_arch_setup): Check for guarded-storage support and choose
296 appropriate tdesc.
297 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
298 init_registers_s390x_gs_linux64.
299 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
300 enum value.
301 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
302 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
303
cc4d742f
SM
3042017-09-22 Simon Marchi <simon.marchi@ericsson.com>
305
306 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
307
f6327dcb
KB
3082017-09-21 Kevin Buettner <kevinb@redhat.com>
309
310 * linux-low.h (struct lwp_info): Add new field, thread_handle.
311 (thread_db_thread_handle): Declare.
312 * linux-low.c (linux_target_ops): Initialize thread_handle.
313 * server.c (handle_qxfer_threads_worker): Add support for
314 "handle" attribute.
315 * target.h (struct target_ops): Add new function pointer,
316 thread_handle.
317 (target_thread_handle): Define.
318 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
319 field in lwp.
320 (thread_db_thread_handle): New function.
321
86299109
KB
3222017-09-21 Kevin Buettner <kevinb@redhat.com>
323
324 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
325 * linux-low.h (thread_db_notice_clone): Declare.
326 * thread-db.c (thread_db_notice_clone): New function.
327
f557a88a
PA
3282017-09-21 Pedro Alves <palves@redhat.com>
329
330 * server.c (gdb_read_memory, handle_status, process_serial_event)
331 (handle_serial_event, handle_target_event): Adjust to
332 set_desired_thread prototype change.
333 * target.c (set_desired_thread): Remove 'use_general' parameter
334 and adjust.
335 * target.h (set_desired_thread): Remove 'use_general' parameter.
336
223ffa71
TT
3372017-09-20 Tom Tromey <tom@tromey.com>
338
339 * target.c (target_terminal::terminal_state): Define.
340 (target_terminal::init): Rename from target_terminal_init.
341 (target_terminal::inferior): Rename from
342 target_terminal_inferior.
343 (target_terminal::ours): Rename from target_terminal_ours.
344 (target_terminal::ours_for_output, target_terminal::info): New.
345
04fd3ba9
SM
3462017-09-16 Simon Marchi <simon.marchi@ericsson.com>
347
348 * server.c (accumulate_file_name_length): Remove.
349 (emit_dll_description): Adjust to std::string change.
350 (handle_qxfer_libraries): Use std::string to hold document.
351
5e187554
SM
3522017-09-16 Simon Marchi <simon.marchi@ericsson.com>
353
354 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
355 return type of xml_escape_text.
356 * server.c (emit_dll_description): Likewise.
357
1526853e
SM
3582017-09-16 Simon Marchi <simon.marchi@ericsson.com>
359
360 * server.c (captured_main): Accept argument for --selftest.
361 Update run_tests call.
362 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
363 when registering selftests.
364
c4dfafab
SDJ
3652017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
366
367 * regcache.c (get_thread_regcache): Update code to use "std::vector"
368 instead of "VEC" for "target_desc.reg_defs".
369 (regcache_cpy): Likewise.
370 (registers_to_string): Likewise.
371 (registers_from_string): Likewise.
372 (find_regno): Likewise.
373 (supply_regblock): Likewise.
374 (regcache_raw_read_unsigned): Likewise.
375 * tdesc.c (init_target_desc): Likewise.
376 (tdesc_create_reg): Likewise.
377 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
378 (struct target_desc) <reg_defs>: Convert to "std::vector".
379 (target_desc): Do not initialize "reg_defs".
380 (~target_desc): Update code to use "std::vector" instead of "VEC"
381 for "target_desc.reg_defs".
382 (operator==): Likewise.
383
124aceb4
SM
3842017-09-15 Simon Marchi <simon.marchi@ericsson.com>
385
386 * inferiors.h (thread_to_gdb_id): Remove.
387 * inferiors.c (thread_to_gdb_id): Remove.
388 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
389 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
390 lynx_store_registers, lynx_read_memory, lynx_write_memory):
391 Likewise.
392 * nto-low.c (nto_fetch_registers, nto_store_registers,
393 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
394
96cde54f
SM
3952017-09-15 Simon Marchi <simon.marchi@ericsson.com>
396
397 * inferiors.h (gdb_id_to_thread_id): Remove.
398 * inferiors.c (gdb_id_to_thread_id): Remove.
399 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
400 removal. Move pid declaration closer to where it's used.
401
e8ca139e
SM
4022017-09-15 Simon Marchi <simon.marchi@ericsson.com>
403
404 * server.c (handle_detach): New function.
405 (process_serial_event): Move code out, call handle_detach.
406
f8a4e119
SM
4072017-09-15 Simon Marchi <simon.marchi@ericsson.com>
408
409 * server.c (require_running): Rename to ...
410 (require_running_or_return): ... this ...
411 (require_running_or_break): ... and this.
412 (handle_query, process_serial_event): Adjust.
413
0eb0a407
SM
4142017-09-15 Simon Marchi <simon.marchi@ericsson.com>
415
416 * linux-low.c (linux_set_resume_request): Remove unused
417 variables.
418
785922a5
SM
4192017-09-15 Simon Marchi <simon.marchi@ericsson.com>
420
421 * server.c (first_thread_of): Remove.
422 (process_serial_event): Replace usage of first_thread_of with
423 find_any_thread_of_pid.
424 * tracepoint.c (same_process_p): Remove.
425 (gdb_agent_about_to_close): Replace usage of same_process_p with
426 find_any_thread_of_pid.
427 * linux-x86-low.c (same_process_callback): Remove.
428 (x86_arch_setup_process_callback): Replace usage of
429 same_process_callback with find_any_thread_of_pid.
430 * thread-db.c (any_thread_of): Remove.
431 (switch_to_process): Replace usage of any_thread_of with
432 find_any_thread_of_pid.
433 * inferiors.c (thread_pid_matches_callback): Remove.
434 (find_thread_process): Adjust to use find_any_thread_of_pid.
435
a059f00c
SDJ
4362017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
437
438 * regcache.c (get_thread_regcache): Guard calls to "memset"
439 with "!VEC_empty".
440
cc397f3a
SDJ
4412017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
442
443 * linux-low.c (handle_extended_wait): Use
444 "allocate_target_description" instead of "XNEW".
445 * linux-x86-low.c (initialize_low_arch): Likewise.
446
22916b07
YQ
4472017-09-05 Yao Qi <yao.qi@linaro.org>
448
449 * configure.srv (srv_i386_regobj): Remove.
450 (srv_amd64_regobj): Remove.
451 (srv_regobj): Set it to "" for x86 non-linux targets.
452 * linux-x86-tdesc.c (i386_linux_read_description):
453 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
454 (init_registers_i386): Remove the declaration.
455 (tdesc_i386): Remove the declaration.
456 (lynx_i386_arch_setup): Call i386_create_target_description.
457 * nto-x86-low.c: Likewise.
458 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
459 [!__x86_64__]: include arch/i386.h.
460 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
461
38602d55
YQ
4622017-09-05 Yao Qi <yao.qi@linaro.org>
463
464 * configure.srv (srv_amd64_linux_xmlfiles): Remove
465 i386/amd64-XXX-linux from it.
466
44b886ff
YQ
4672017-09-05 Yao Qi <yao.qi@linaro.org>
468
469 * configure.srv: Empty srv_amd64_linux_regobj if $development is
470 false.
471 (ipa_amd64_linux_regobj): Remove.
472 (ipa_x32_linux_regobj): Remove.
473
b4570e4b
YQ
4742017-09-05 Yao Qi <yao.qi@linaro.org>
475
476 * Makefile.in (arch-amd64.o): New rule.
477 * configure.srv: Append arch-amd64.o.
478 * linux-amd64-ipa.c: Include common/x86-xstate.h.
479 (get_ipa_tdesc): Call amd64_linux_read_description.
480 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
481 and init_registers_amd64_XXX.
482 * linux-x86-low.c (x86_linux_read_description): Call
483 amd64_linux_read_description.
484 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
485 (initialize_low_arch): Don't call init_registers_x32_XXX and
486 init_registers_amd64_XXX.
487 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
488 and tdesc_amd64_XXX.
489 [__x86_64__] (amd64_tdesc_test): New function.
490 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
491 and init_registers_amd64_XXX.
492 * linux-x86-tdesc.c: Include arch/amd64.h.
493 (xcr0_to_tdesc_idx): New function.
494 (i386_linux_read_description): New function.
495 (amd64_get_ipa_tdesc_idx): New function.
496 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
497 (amd64_get_ipa_tdesc): Declare.
498
d1f28ea2
YQ
4992017-09-05 Yao Qi <yao.qi@linaro.org>
500
501 * configure.srv (srv_i386_linux_xmlfiles): Remove
502 i386/i386-XXX-linux.xml from it.
503
25a93583
YQ
5042017-09-05 Yao Qi <yao.qi@linaro.org>
505
506 * configure.srv: Set srv_i386_linux_regobj empty if $development
507 is false.
508 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
509 initialize_low_tdesc.
510 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
511 with #if initialize_low_tdesc.
512 * linux-x86-tdesc-selftest.c: New file.
513 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
514
5f035c07
YQ
5152017-09-05 Yao Qi <yao.qi@linaro.org>
516
517 * Makefile.in (arch-i386.o): New rule.
518 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
519 (x86_64-*-linux*): Likewise.
520 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
521 include arch/i386.h.
522 (i386_linux_read_description): Remove code and call
523 i386_create_target_description.
524 * tdesc.c (allocate_target_description): New function.
525 * tdesc.h (set_tdesc_architecture): Remove declaration.
526 (set_tdesc_osabi): Likewise.
527
0abe8a89
YQ
5282017-09-05 Yao Qi <yao.qi@linaro.org>
529
530 * linux-x86-tdesc.c: Don't include <inttypes.h>.
531 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
532 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
533 .xmltarget.
534 * server.c (get_features_xml): Call tdesc_get_features_xml.
535 * tdesc.c (set_tdesc_architecture): New function.
536 (set_tdesc_osabi): New function.
537 (tdesc_get_features_xml): New function.
538 (tdesc_create_feature): Add an argument.
539 * tdesc.h (struct target_desc) <features>: New field.
540 <arch, osabi>: New field.
541 (~target_desc): xfree features, arch, and osabi.
542 (target_desc::oerator==): Don't compare .xmltarget.
543 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
544 (set_tdesc_osabi): Likewise.
545 (tdesc_get_features_xml): Likewise.
546
0a188386
YQ
5472017-09-05 Yao Qi <yao.qi@linaro.org>
548
549 * linux-x86-tdesc.c: Include selftest.h.
550 (i386_tdesc_test): New function.
551 (initialize_low_tdesc): Call selftests::register_test.
552 * tdesc.h: Include regdef.h.
553 (target_desc): Override operator == and !=.
554
f49ff000
YQ
5552017-09-05 Yao Qi <yao.qi@linaro.org>
556
557 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
558 (ipa_obj): Likewise.
559 * linux-i386-ipa.c: Include common/x86-xstate.h
560 (get_ipa_tdesc): Call i386_linux_read_description.
561 (initialize_low_tracepoint): Don't call init_registers_XXX
562 functions, call initialize_low_tdesc instead.
563 * linux-x86-low.c (x86_linux_read_description): Call
564 i386_linux_read_description.
565 (initialize_low_arch): Don't call init_registers_i386_XXX
566 functions, call initialize_low_tdesc.
567 * linux-x86-tdesc.c: New file.
568 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
569 (i386_get_ipa_tdesc_idx): Declare.
570 (i386_get_ipa_tdesc): Declare.
571 (initialize_low_tdesc): Declare.
572
2b68ef2f
YQ
5732017-09-05 Yao Qi <yao.qi@linaro.org>
574
575 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
576 instead of 0.
577
f7000548
YQ
5782017-09-05 Yao Qi <yao.qi@linaro.org>
579
580 * Makefile.in (IPA_OBJS): Add vec-ipa.o
581 * regcache.c (get_thread_regcache): Use VEC_length.
582 (init_register_cache): Likewise.
583 (regcache_cpy): Likewise.
584 (registers_to_string): Iterate reg_defs via VEC_iterate.
585 (find_regno): Likewise.
586 (find_register_by_number): Use VEC_index.
587 (register_size): Call find_register_by_number.
588 (register_data): Call find_register_by_number.
589 (supply_regblock): Use VEC_length.
590 (regcache_raw_read_unsigned): Likewise.
591 * tdesc.c (init_target_desc): Iterate reg_defs via
592 VEC_iterate.
593 (default_description): Update initializer.
594 (copy_target_description): Don't update field num_registers.
595 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
596 <num_registers>: Remove.
597
50a421ac
SM
5982017-09-04 Simon Marchi <simon.marchi@ericsson.com>
599
600 * Makefile.in (.SECONDARY): Define target.
601
23fdd69e
SM
6022017-09-03 Simon Marchi <simon.marchi@ericsson.com>
603
604 * linux-low.c (linux_wait_1): Adjust.
605 * server.c (queue_stop_reply_callback): Adjust.
606
0a2dde4a
SDJ
6072017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
608
609 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
610 QEnvironmentUnset and QEnvironmentReset packets.
611 (handle_query): Inform remote that QEnvironmentHexEncoded,
612 QEnvironmentUnset and QEnvironmentReset are supported.
613
6afd337d
SM
6142017-08-25 Simon Marchi <simon.marchi@ericsson.com>
615
616 * inferiors.h (inferior_target_data): Rename to ...
617 (thread_target_data): ... this.
618 (inferior_regcache_data): Rename to ...
619 (thread_regcache_data): ... this.
620 (set_inferior_regcache_data): Rename to ...
621 (set_thread_regcache_data): ... this.
622 * inferiors.c (inferior_target_data): Rename to ...
623 (thread_target_data): ... this.
624 (inferior_regcache_data): Rename to ...
625 (thread_regcache_data): ... this.
626 (set_inferior_regcache_data): Rename to ...
627 (set_thread_regcache_data): ... this.
628 (free_one_thread): Update.
629 * linux-low.h (get_thread_lwp): Update.
630 * regcache.c (get_thread_regcache): Update.
631 (regcache_invalidate_thread): Update.
632 (free_register_cache_thread): Update.
633 * win32-i386-low.c (update_debug_registers_callback): Update.
634 (win32_get_current_dr): Update.
635 * win32-low.c (thread_rec): Update.
636 (delete_thread_info): Update.
637 (continue_one_thread): Update.
638 (suspend_one_thread): Update.
639
a160cc46
SM
6402017-08-24 Simon Marchi <simon.marchi@ericsson.com>
641
642 * inferiors.c (set_inferior_target_data): Remove.
643 * inferiors.h (set_inferior_target_data): Remove.
644
6d580b63
YQ
6452017-08-18 Yao Qi <yao.qi@linaro.org>
646
647 * Makefile.in (OBS): Add selftest.o.
648 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
649 * configure, config.in: Re-generated.
650 * server.c: Include common/sefltest.h.
651 (captured_main): Handle option --selftest.
652
f5a29eb0
YQ
6532017-08-09 Yao Qi <yao.qi@linaro.org>
654
655 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
656 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
657 i386-avx-mpx.o and i386-mmx.o.
658 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
659 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
660 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
661 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
662 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
663 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
664 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
665 i386/amd64-avx-mpx.xml.
666
57757c2f
YQ
6672017-08-09 Yao Qi <yao.qi@linaro.org>
668
669 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
670 and x32-avx-avx512.o.
671 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
672 i386/x32-avx-avx512.xml.
673
229d26fc
SM
6742017-07-26 Simon Marchi <simon.marchi@ericsson.com>
675
676 * tracepoint.h (enum class fast_tpoint_collect_result): New
677 enumeration.
678 (fast_tracepoint_collecting): Change return type to
679 fast_tpoint_collect_result.
680 * tracepoint.c (fast_tracepoint_collecting): Likewise.
681 * linux-low.h: Include tracepoint.h.
682 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
683 fast_tpoint_collect_result.
684 * linux-low.c (handle_tracepoints): Adjust.
685 (linux_fast_tracepoint_collecting): Change return type to
686 fast_tpoint_collect_result.
687 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
688 linux_wait_1, stuck_in_jump_pad_callback,
689 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
690 proceed_one_lwp): Adjust to type change.
691
2e1e43e1
YQ
6922017-07-10 Yao Qi <yao.qi@linaro.org>
693
694 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
695
adc764e7
YQ
6962017-06-29 Yao Qi <yao.qi@linaro.org>
697
698 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
699 Remove.
700 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
701
a206891a
SM
7022017-06-20 Simon Marchi <simon.marchi@ericsson.com>
703
704 * Makefile.in (IPA_OBJS): Sort and format one item per line.
705
9a6c7d9c
SDJ
7062017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
707
708 * linux-low.c (linux_create_inferior): Adjust code to access the
709 environment information via 'gdb_environ' class.
710 * lynx-low.c (lynx_create_inferior): Likewise.
711 * server.c (our_environ): Make it an instance of 'gdb_environ'.
712 (get_environ): Return a pointer to 'our_environ'.
713 (captured_main): Initialize 'our_environ'.
714 * server.h (get_environ): Adjust prototype.
715 * spu-low.c (spu_create_inferior): Adjust code to access the
716 environment information via 'gdb_environ' class.
717
ae3e2ccf
SM
7182017-06-17 Simon Marchi <simon.marchi@ericsson.com>
719
720 * linux-low.c (linux_read_memory, linux_write_memory): Remove
721 usage of "register" keyword.
722
3e019bdc
SM
7232017-06-17 Simon Marchi <simon.marchi@ericsson.com>
724
725 * configure: Re-generate.
726
8465943a
SM
7272017-06-17 Simon Marchi <simon.marchi@ericsson.com>
728
729 * configure: Re-generate.
730
cf0dd6f0
SM
7312017-06-17 Simon Marchi <simon.marchi@ericsson.com>
732
733 * Makefile.in (COMPILE.pre): Add "-x c++".
734
9845682b
SDJ
7352017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
736
737 * fork-child.c: Conditionally include <signal.h>.
738
aefd8b33
SDJ
7392017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
740
741 * server.c (handle_general_set): Handle new packet
742 "QStartupWithShell".
743 (handle_query): Add "QStartupWithShell" to the list of supported
744 packets.
745 (gdbserver_usage): Add help text explaining the
746 new "--startup-with-shell" and "--no-startup-with-shell" CLI
747 options.
748 (captured_main): Recognize and act upon the presence of the new
749 CLI options.
750
2090129c
SDJ
7512017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
752 Pedro Alves <palves@redhat.com>
753
754 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
755 * configure: Regenerate.
756 * configure.srv (srv_linux_obj): Add "fork-child.o" and
757 "fork-inferior.o".
758 (i[34567]86-*-lynxos*): Likewise.
759 (spu*-*-*): Likewise.
760 * fork-child.c: New file.
761 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
762 and "environ.h".
763 (linux_ptrace_fun): New function.
764 (linux_create_inferior): Adjust function prototype to reflect
765 change on "target.h". Adjust function code to use
766 "fork_inferior".
767 (linux_request_interrupt): Delete "signal_pid".
768 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
769 (lynx_ptrace_fun): New function.
770 (lynx_create_inferior): Adjust function prototype to reflect
771 change on "target.h". Adjust function code to use
772 "fork_inferior".
773 * nto-low.c (nto_create_inferior): Adjust function prototype and
774 code to reflect change on "target.h". Update comments.
775 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
776 "common-terminal.h" and "environ.h".
777 (terminal_fd): Moved to fork-child.c.
778 (old_foreground_pgrp): Likewise.
779 (restore_old_foreground_pgrp): Likewise.
780 (last_status): Make it global.
781 (last_ptid): Likewise.
782 (our_environ): New variable.
783 (startup_with_shell): Likewise.
784 (program_name): Likewise.
785 (program_argv): Rename to...
786 (program_args): ...this.
787 (wrapper_argv): New variable.
788 (start_inferior): Delete function.
789 (get_exec_wrapper): New function.
790 (get_exec_file): Likewise.
791 (get_environ): Likewise.
792 (prefork_hook): Likewise.
793 (post_fork_inferior): Likewise.
794 (postfork_hook): Likewise.
795 (postfork_child_hook): Likewise.
796 (handle_v_run): Update code to deal with arguments coming from the
797 remote host. Update calls from "start_inferior" to
798 "create_inferior".
799 (captured_main): Likewise. Initialize environment variable. Call
800 "have_job_control".
801 * server.h (post_fork_inferior): New prototype.
802 (get_environ): Likewise.
803 (last_status): Declare.
804 (last_ptid): Likewise.
805 (signal_pid): Likewise.
806 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
807 (spu_ptrace_fun): New function.
808 (spu_create_inferior): Adjust function prototype to reflect change
809 on "target.h". Adjust function code to use "fork_inferior".
810 * target.c (target_terminal_init): New function.
811 (target_terminal_inferior): Likewise.
812 (target_terminal_ours): Likewise.
813 * target.h: Include <vector>.
814 (struct target_ops) <create_inferior>: Update prototype.
815 (create_inferior): Update macro.
816 * utils.c (gdb_flush_out_err): New function.
817 * win32-low.c (win32_create_inferior): Adjust function prototype
818 and code to reflect change on "target.h".
819
043a4934
SDJ
8202017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
821
822 * inferiors.c (switch_to_thread): New function.
823
15652511
SDJ
8242017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
825
826 * Makefile.in (SFILE): Add "common/job-control.c".
827 (OBS): Add "job-control.o".
828
21ea5acd
SDJ
8292017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
830
831 * Makefile: Remove "@host_makefile_frag@".
832
e13cb306
PA
8332017-05-05 Pedro Alves <palves@redhat.com>
834
835 * configure: Regenerate.
836
c94fee56
SDJ
8372017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
838
839 * configure: Regenerate.
840
a0ff9e1a
SM
8412017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
842
843 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
844 software_single_step change of return type to
845 std::vector<CORE_ADDR>.
846 * linux-low.c (install_software_single_step_breakpoints):
847 Likewise.
848 * linux-low.h (install_software_single_step_breakpoints):
849 Likewise.
850
be628ab8
SDJ
8512017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
852
853 * remote-utils.c: Include "gdb_termios.h" instead of
854 "terminal.h".
855 * terminal.h: Delete file.
856
7c5ded6a
SDJ
8572017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
858
859 * server.c: Include <vector>.
860 <program_argv, wrapper_argv>: Convert to std::vector.
861 (start_inferior): Rewrite function to use C++.
862 (handle_v_run): Likewise. Update code that calculates the argv
863 based on the vRun packet; use C++.
864 (captured_main): Likewise.
865
436252de
SM
8662017-04-06 Simon Marchi <simon.marchi@ericsson.com>
867
868 * server.c (handle_v_cont): Initialize thread_resume::thread
869 with null_ptid.
870
9bf2a700
PA
8712017-04-05 Pedro Alves <palves@redhat.com>
872
873 * configure: Regenerate.
874
a121b7c1
PA
8752017-04-05 Pedro Alves <palves@redhat.com>
876
877 * gdbreplay.c (sync_error): Constify.
878 * linux-x86-low.c (push_opcode): Constify.
879
21c8a587
PA
8802017-04-05 Pedro Alves <palves@redhat.com>
881
882 * win32-low.c (get_child_debug_event)
883 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
884 Report TARGET_WAITKIND_SPURIOUS instead.
885
fb32b4f7
PA
8862017-04-05 Pedro Alves <palves@redhat.com>
887
888 * remote-utils.c (remote_prepare, remote_open): Constify.
889 * remote-utils.h (remote_prepare, remote_open): Constify.
890 * server.c (captured_main): Constify 'port' handling.
891
65dd1e59
SM
8922017-04-04 Simon Marchi <simon.marchi@ericsson.com>
893
894 * Makefile.in (clean): Clear .deps.
895
8fa5b777
SM
8962017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
897
898 * .gitignore: Remove generated files, replace with wildcard.
899 * (clean): Replace removal of generated files with wildcard.
900 (version.c): Replace with...
901 (version-generated.c): ...this.
902 (xml-builtin.c): Replace with...
903 (xml-builtin-generated.c): ...this.
904 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
905 (%.c: *regformats*): Replace with...
906 (%-generated.c: *regformats*): ...this.
907
a12e714b
MF
9082017-03-27 Max Filippov <jcmvbkbc@gmail.com>
909
910 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
911 (xtensa_fill_gregset): Call collect_register_by_name for
912 threadptr register.
913 (xtensa_store_gregset): Call supply_register_by_name for
914 threadptr register.
915
1a09b50a
MF
9162017-03-27 Max Filippov <jcmvbkbc@gmail.com>
917
918 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
919 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
920 (xtensa_store_gregset): Call supply_register for all registers in
921 a0_regnum..a0_regnum + C0_NREGS range.
922
1a01e7c6
SM
9232017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
924
925 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
926 (ax-ipa.o: ax.c): Remove.
927 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
928 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
929 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
930 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
931 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
932
36bc18a8
SM
9332017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
934
935 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
936 (print-utils-ipa.o: ../common/print-utils.c): Remove.
937 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
938 (errors-ipa.o: ../common/errors.c): Remove.
939 (format-ipa.o: ../common/format.c): Remove.
940 (common-utils-ipa.o: ../common/common-utils.c): Remove.
941
a8ebe3d5
SM
9422017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
943
944 * Makefile.in (%-ipa.o: %.c): New rule.
945 (tracepoint-ipa.o: tracepoint.c): Remove.
946 (utils-ipa.o: utils.c): Remove.
947 (remote-utils-ipa.o: remote-utils.c): Remove.
948 (regcache-ipa.o: regcache.c): Remove.
949 (i386-linux-ipa.o: i386-linux.c): Remove.
950 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
951 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
952 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
953 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
954 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
955 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
956 (amd64-linux-ipa.o: amd64-linux.c): Remove.
957 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
958 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
959 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
960 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
961 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
962 (aarch64-ipa.o: aarch64.c): Remove.
963 (s390-linux32-ipa.o: s390-linux32.c): Remove.
964 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
965 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
966 (s390-linux64-ipa.o: s390-linux64.c): Remove.
967 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
968 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
969 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
970 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
971 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
972 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
973 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
974 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
975 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
976 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
977 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
978 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
979 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
980 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
981 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
982 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
983 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
984 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
985 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
986 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
987 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
988 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
989 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
990 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
991 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
992 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
993 (tdesc-ipa.o: tdesc.c): Remove.
994 (x32-linux-ipa.o: x32-linux.c): Remove.
995 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
996 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
997
50cfacb7
SM
9982017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
999
1000 * Makefile.in (%.o: ../arch/%.c): New rule.
1001 (arm.o: ../arch/arm.c): Remove.
1002 (arm-linux.o: ../arch/arm-linux.c): Remove.
1003 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1004 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1005
c5a22423
SM
10062017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1007
1008 * Makefile.in (%.o: ../nat/%.c): New rule.
1009 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1010 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1011 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1012 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1013 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1014 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1015 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1016 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1017 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1018 (linux-personality.o: ../nat/linux-personality.c): Remove.
1019 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1020 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1021 (x86-linux.o: ../nat/x86-linux.c): Remove.
1022 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1023 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1024
6bda016b
SM
10252017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1026
1027 * Makefile.in (%.o: ../common/%.c): New rule.
1028 (signals.o: ../common/signals.c): Remove.
1029 (print-utils.o: ../common/print-utils.c): Remove.
1030 (rsp-low.o: ../common/rsp-low.c): Remove.
1031 (common-utils.o: ../common/common-utils.c): Remove.
1032 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1033 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1034 (vec.o: ../common/vec.c): Remove.
1035 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1036 (xml-utils.o: ../common/xml-utils.c): Remove.
1037 (ptid.o: ../common/ptid.c): Remove.
1038 (buffer.o: ../common/buffer.c): Remove.
1039 (format.o: ../common/format.c): Remove.
1040 (filestuff.o: ../common/filestuff.c): Remove.
1041 (agent.o: ../common/agent.c): Remove.
1042 (errors.o: ../common/errors.c): Remove.
1043 (environ.o: ../common/environ.c): Remove.
1044 (common-debug.o: ../common/common-debug.c): Remove.
1045 (cleanups.o: ../common/cleanups.c): Remove.
1046 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1047 (fileio.o: ../common/fileio.c): Remove.
1048 (common-regcache.o: ../common/common-regcache.c): Remove.
1049 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1050 (new-op.o: ../common/new-op.c): Remove.
1051 (btrace-common.o: ../common/btrace-common.c): Remove.
1052
21122961
SM
10532017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1054
1055 * Makefile.in (%.o: ../target/%.c): New rule.
1056 (waitstatus.o: ../target/waitstatus.c): Remove.
1057
c362e621
SM
10582017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1059
1060 * Makefile.in
1061 (%.c: ../regformats/%.dat,
1062 (%.c: ../regformats/arm/%.dat,
1063 (%.c: ../regformats/i386/%.dat,
1064 (%.c: ../regformats/rs6000/%.dat): New rules.
1065 (aarch64.c): Remove.
1066 (reg-arm.c): Remove.
1067 (arm-with-iwmmxt.c): Remove.
1068 (arm-with-vfpv2.c): Remove.
1069 (arm-with-vfpv3.c): Remove.
1070 (arm-with-neon.c): Remove.
1071 (reg-bfin.c): Remove.
1072 (reg-cris.c): Remove.
1073 (reg-crisv32.c): Remove.
1074 (i386.c): Remove.
1075 (i386-linux.c): Remove.
1076 (i386-avx.c): Remove.
1077 (i386-avx-linux.c): Remove.
1078 (i386-avx-avx512.c): Remove.
1079 (i386-avx-avx512-linux.c): Remove.
1080 (i386-mpx.c): Remove.
1081 (i386-mpx-linux.c): Remove.
1082 (i386-avx-mpx-avx512-pku.c): Remove.
1083 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1084 (i386-avx-mpx.c): Remove.
1085 (i386-avx-mpx-linux.c): Remove.
1086 (i386-mmx.c): Remove.
1087 (i386-mmx-linux.c): Remove.
1088 (reg-ia64.c): Remove.
1089 (reg-m32r.c): Remove.
1090 (reg-m68k.c): Remove.
1091 (reg-cf.c): Remove.
1092 (mips-linux.c): Remove.
1093 (mips-dsp-linux.c): Remove.
1094 (mips64-linux.c): Remove.
1095 (mips64-dsp-linux.c): Remove.
1096 (nios2-linux.c): Remove.
1097 (powerpc-32.c): Remove.
1098 (powerpc-32l.c): Remove.
1099 (powerpc-altivec32l.c): Remove.
1100 (powerpc-cell32l.c): Remove.
1101 (powerpc-vsx32l.c): Remove.
1102 (powerpc-isa205-32l.c): Remove.
1103 (powerpc-isa205-altivec32l.c): Remove.
1104 (powerpc-isa205-vsx32l.c): Remove.
1105 (powerpc-e500l.c): Remove.
1106 (powerpc-64l.c): Remove.
1107 (powerpc-altivec64l.c): Remove.
1108 (powerpc-cell64l.c): Remove.
1109 (powerpc-vsx64l.c): Remove.
1110 (powerpc-isa205-64l.c): Remove.
1111 (powerpc-isa205-altivec64l.c): Remove.
1112 (powerpc-isa205-vsx64l.c): Remove.
1113 (s390-linux32.c): Remove.
1114 (s390-linux32v1.c): Remove.
1115 (s390-linux32v2.c): Remove.
1116 (s390-linux64.c): Remove.
1117 (s390-linux64v1.c): Remove.
1118 (s390-linux64v2.c): Remove.
1119 (s390-te-linux64.c): Remove.
1120 (s390-vx-linux64.c): Remove.
1121 (s390-tevx-linux64.c): Remove.
1122 (s390x-linux64.c): Remove.
1123 (s390x-linux64v1.c): Remove.
1124 (s390x-linux64v2.c): Remove.
1125 (s390x-te-linux64.c): Remove.
1126 (s390x-vx-linux64.c): Remove.
1127 (s390x-tevx-linux64.c): Remove.
1128 (tic6x-c64xp-linux.c): Remove.
1129 (tic6x-c64x-linux.c): Remove.
1130 (tic6x-c62x-linux.c): Remove.
1131 (reg-sh.c): Remove.
1132 (reg-sparc64.c): Remove.
1133 (reg-spu.c): Remove.
1134 (amd64.c): Remove.
1135 (amd64-linux.c): Remove.
1136 (amd64-avx.c): Remove.
1137 (amd64-avx-linux.c): Remove.
1138 (amd64-avx-avx512.c): Remove.
1139 (amd64-avx-avx512-linux.c): Remove.
1140 (amd64-mpx.c): Remove.
1141 (amd64-mpx-linux.c): Remove.
1142 (amd64-avx-mpx-avx512-pku.c): Remove.
1143 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1144 (amd64-avx-mpx.c): Remove.
1145 (amd64-avx-mpx-linux.c): Remove.
1146 (x32.c): Remove.
1147 (x32-linux.c): Remove.
1148 (x32-avx.c): Remove.
1149 (x32-avx-linux.c): Remove.
1150 (x32-avx-avx512.c): Remove.
1151 (x32-avx-avx512-linux.c): Remove.
1152 (reg-xtensa.c): Remove.
1153 (reg-tilegx.c): Remove.
1154 (reg-tilegx32.c): Remove.
1155
1672e0d9
SDJ
11562017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1157
1158 * Makefile.in (SFILES): Add "common/environ.c".
1159 (OBJS): Add "common/environ.h".
1160
239b6d10
WT
11612017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1162
1163 * configure.ac: Check if the fs_base and gs_base members of
1164 `struct user_regs_struct' exist.
1165 * config.in: Regenerated.
1166 * configure: Likewise.
1167
694b382c
AT
11682017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1169
1170 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1171 target_read_memory.
1172 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1173 (get_next_pcs_syscall_next_pc): Likewise.
1174
7dc53023
LM
11752016-12-23 Luis Machado <lgustavo@codesourcery.com>
1176
1177 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1178 * nto-x86-low.c: Likewise.
1179
ad02e4fe
SM
11802016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1181
1182 * Makefile.in: Include disable-implicit-rules.mk.
1183
dcb07cfa
PA
11842016-11-23 Pedro Alves <palves@redhat.com>
1185
1186 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1187 (debug_vprintf): Use std::chrono::steady_clock instead of
1188 gettimeofday. Use '.' instead of ':'.
1189 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1190 (get_timestamp): Use std::chrono::steady_clock instead of
1191 gettimeofday.
1192
8629c02c
SM
11932016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1194
1195 * Makefile.in: Fix whitespace formatting.
1196
b593ecca
SM
11972016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1198
1199 * Makefile.in (SFILES, OBS): Flatten list and order
1200 alphabetically.
1201
9986ba08
PA
12022016-11-23 Pedro Alves <palves@redhat.com>
1203
1204 * event-loop.c (handle_file_event): Use warning.
1205 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1206 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1207 Use warning.
1208
4eefa7bc
PA
12092016-11-23 Pedro Alves <palves@redhat.com>
1210
1211 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1212 output.
1213 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1214 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1215 debug_printf and debug_flush for debug output.
1216 * server.c (handle_general_set): Likewise.
1217 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1218 output.
1219
5443506e
SM
12202016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1221
1222 * Makefile.in (.c.o): Replace rule with ...
1223 (%.o: %.c): ... this one.
1224
3b165252
SM
12252016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1226
1227 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1228 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1229 make.
1230 * configure.ac: Remove checks for the make program.
1231 * configure: Re-generate.
1232
0bcda685
PA
12332016-10-28 Pedro Alves <palves@redhat.com>
1234
1235 * Makefile.in (CXX_DIALECT): Get from configure.
1236 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1237 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1238 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1239 * config.in: Regenerate.
1240 * configure: Regenerate.
1241
c3805894
YQ
12422016-10-27 Yao Qi <yao.qi@linaro.org>
1243
1244 * linux-low.c (linux_supports_range_stepping): Return true if
1245 can_software_single_step return true.
1246
89342618
YQ
12472016-10-27 Yao Qi <yao.qi@linaro.org>
1248
1249 * inferiors.c (find_inferior_in_random): New function.
1250 * inferiors.h (find_inferior_in_random): Declare.
1251 * linux-low.c (linux_wait_for_event_filtered): Call
1252 find_inferior_in_random instead of find_inferior.
1253
e3652c84
YQ
12542016-10-27 Yao Qi <yao.qi@linaro.org>
1255
1256 * linux-low.c (linux_wait_1): If single-step breakpoints are
1257 inserted, remove them.
1258
5a04c4cf
PA
12592016-10-26 Pedro Alves <palves@redhat.com>
1260
1261 * linux-low.c (handle_extended_wait): Link parent/child fork
1262 threads.
1263 (linux_wait_1): Unlink them.
1264 (linux_set_resume_request): Ignore resume requests for
1265 already-resumed and unhandled fork child threads.
1266 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1267 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1268 New functions.
1269 (handle_v_requests) <vCont>: Don't call require_running.
1270 * server.h (in_queued_stop_replies): New declaration.
1271
cb93dc7f
YQ
12722016-10-24 Yao Qi <yao.qi@linaro.org>
1273
1274 PR server/20733
1275 * linux-aarch64-low.c (append_insns): Cast the return value to
1276 'uint32_t *'.
1277
a1078bea
YQ
12782016-10-10 Yao Qi <yao.qi@linaro.org>
1279
1280 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1281
1fb77080
SDJ
12822016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1283
1284 * target.c (target_supports_multi_process): New function, moved
1285 from...
1286 * target.h (target_supports_multi_process): ... here. Remove
1287 macro.
1288
39b5a3b9
TT
12892016-10-05 Tom Tromey <tom@tromey.com>
1290
1291 PR remote/20655:
1292 * tracepoint.c (handle_tracepoint_bkpts): Check
1293 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1294
c1d0b70a
YQ
12952016-10-05 Yao Qi <yao.qi@linaro.org>
1296
1297 * configure.srv: Update the path of arm-*.xml files.
1298
0a69eedb
YQ
12992016-10-05 Terry Guo <terry.guo@arm.com>
1300 Yao Qi <yao.qi@linaro.org>
1301
1302 * Makefile.in: Adjust the path of rules.
1303 * configure.srv: Update the path of xml files.
1304 * regformats/arm-with-iwmmxt.dat: Regenerated.
1305 * regformats/arm-with-neon.dat: Likewise.
1306 * regformats/arm-with-vfpv2.dat: Likewise.
1307 * regformats/arm-with-vfpv3.dat Likewise.
1308
17e16485
YQ
13092016-09-30 Yao Qi <yao.qi@linaro.org>
1310
1311 PR gdbserver/20627
1312 * target.c (target_stop_and_wait): Don't call
1313 target_continue_no_signal, use resume_stop instead.
1314
edeeb602
YQ
13152016-09-26 Yao Qi <yao.qi@linaro.org>
1316
1317 * linux-low.c (linux_wait_1): Call debug_exit.
1318
503b1c39
PA
13192016-09-23 Pedro Alves <palves@redhat.com>
1320
1321 * Makefile.in (SFILES): Add common/new-op.c.
1322 (OBS): Add common/new-op.o.
1323 (new-op.o): New rule.
1324
74172ecf
SM
13252016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1326
1327 * .gitinore: Ignore more files.
1328
fc6cda2e
YQ
13292016-09-21 Yao Qi <yao.qi@linaro.org>
1330
1331 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1332 23.
1333
bc1e6c81
SDJ
13342016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1335
1336 * server.c (start_inferior): Call target_mourn_inferior instead of
1337 mourn_inferior; pass ptid_t argument to it.
1338 (resume): Likewise.
1339 (handle_target_event): Likewise.
1340 * target.c (target_mourn_inferior): New function.
1341 * target.h (mourn_inferior): Delete macro.
1342
0e00e962
AA
13432016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1344
1345 * linux-low.c (lwp_is_stepping): New function.
1346
1d8cb77d
CL
13472016-09-06 Carl Love <cel@us.ibm.com>
1348
1349 * server.c (start_inferior): Fixed comment, requested comment change
1350 didn't get updated correctly. Removed reference to ptrace () call as
1351 it is only true on Linux systems.
1352
7313bced
CL
13532016-09-06 Carl Love <cel@us.ibm.com>
1354
1355 * server.c (start_inferior): Do not call
1356 function target_post_create_inferior () if the
1357 inferior process has already exited.
1358
cf6de44d
PA
13592016-09-05 Pedro Alves <palves@redhat.com>
1360
1361 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1362 (COMPILE.pre, CC_LD): Use CXX directly.
1363 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1364 * acinclude.m4: Don't include build-with-cxx.m4.
1365 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1366 * configure: Regenerate.
1367
c1da6748
AT
13682016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1369
1370 PR gdb/19495
1371 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1372 call writing data to own_buf.
1373
f2b9e3df
SDJ
13742016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1375
1376 * target.c (mywait): Call target_wait instead of
1377 the_target->wait.
1378 (target_wait): New function.
1379
049a8570
SDJ
13802016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1381
1382 * server.c (start_inferior): New variable 'ptid'. Replace calls
1383 to the_target->resume by target_continue{,_no_signal}, depending
1384 on the case.
1385 * target.c (target_stop_and_wait): Call target_continue_no_signal
1386 instead of the_target->resume.
1387 (target_continue): New function.
1388
3aa5cfa0
AT
13892016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1390
1391 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1392
754653a7
AZ
13932016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1394
1395 PR server/20491
1396 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1397 ps_prochandle.
1398 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1399 * linux-arm-low.c (ps_get_thread_area): Likewise.
1400 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1401 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1402 * linux-mips-low.c (ps_get_thread_area): Likewise.
1403 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1404 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1405 * linux-x86-low.c (ps_get_thread_area): Likewise.
1406 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1407
ed036b40
PA
14082016-08-19 Pedro Alves <palves@redhat.com>
1409
1410 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1411
c8ef42ee
PA
14122016-08-19 Pedro Alves <palves@redhat.com>
1413
1414 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1415 comment. Use memcpy instead of casting through unsigned long.
1416
9c235a72
PA
14172016-08-19 Pedro Alves <palves@redhat.com>
1418
1419 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1420 allocating around 0x80000000.
1421
201506da
PA
14222016-08-19 Pedro Alves <palves@redhat.com>
1423
1424 PR gdb/20415
1425 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1426 (x32-avx512-linux-ipa.o): New rules.
1427 * configure.ac (x86_64-*-linux*): New x32 check.
1428 * configure.srv (ipa_x32_linux_regobj): New.
1429 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1430 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1431 descriptions.
1432 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1433 descriptions.
1434 * configure: Regenerate.
1435
f348d89a
PA
14362016-08-09 Pedro Alves <palves@redhat.com>
1437
1438 PR gdb/18653
1439 * Makefile.in (OBS): Add signals-state-save-restore.o.
1440 (signals-state-save-restore.o): New rule.
1441 * config.in: Regenerate.
1442 * configure: Regenerate.
1443 * linux-low.c: Include "signals-state-save-restore.h".
1444 (linux_create_inferior): Call
1445 restore_original_signals_state.
1446 * server.c: Include "dispositions-save-restore.h".
1447 (captured_main): Call save_original_signals_state.
1448
1baf5149
PA
14492016-08-05 Pedro Alves <palves@redhat.com>
1450
1451 * configure: Regenerate.
1452
fcd4a73d
YQ
14532016-08-04 Yao Qi <yao.qi@linaro.org>
1454
1455 * linux-low.c (regsets_fetch_inferior_registers): Check
1456 errno is ESRCH or not.
1457
979659d0
YQ
14582016-08-02 Yao Qi <yao.qi@linaro.org>
1459
1460 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1461 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1462 (thread_db_load_search): Update.
1463 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1464 td_ta_set_event and td_ta_event_getmsg.
1465
6598661d
PA
14662016-07-26 Pedro Alves <palves@redhat.com>
1467
1468 PR server/20414
1469 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1470 of unsigned long for 64-bit registers and use uint32_t instead of
1471 unsigned int for 32-bit registers.
1472
9cf12d57
PA
14732016-07-26 Pedro Alves <palves@redhat.com>
1474
1475 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1476 to 'ptrace'.
1477
305450ed
TT
14782016-07-21 Tom Tromey <tom@tromey.com>
1479
1480 * configure: Rebuild.
1481
2583da7c
YQ
14822016-07-21 Yao Qi <yao.qi@linaro.org>
1483
1484 * mem-break.c (find_gdb_breakpoint): Cast bp to
1485 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1486
21536b36
YQ
14872016-07-21 Yao Qi <yao.qi@linaro.org>
1488
1489 * server.c (handle_v_requests): Support s and S actions
1490 if target_supports_software_single_step return true.
1491
8901d193
YQ
14922016-07-21 Yao Qi <yao.qi@linaro.org>
1493
1494 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1495 is resume_step, call maybe_hw_step.
1496 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1497 and unstop them.
1498 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1499 breakpoints or not.
1500 (proceed_one_lwp): If resume request is resume_step, install
1501 reinsert breakpoints and call maybe_hw_step.
1502
0e9a339e
YQ
15032016-07-21 Yao Qi <yao.qi@linaro.org>
1504
1505 * linux-low.c (proceed_one_lwp): Declare.
1506 (linux_resume_one_thread): Remove local variable 'step'.
1507 Lift code enqueue signal. Call proceed_one_lwp instead of
1508 linux_resume_one_lwp.
1509
4281b351
YQ
15102016-07-21 Yao Qi <yao.qi@linaro.org>
1511
1512 * linux-low.c (linux_resume_one_thread): Call
1513 enqueue_pending_signal.
1514
984a2c04
YQ
15152016-07-21 Yao Qi <yao.qi@linaro.org>
1516
1517 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1518 * inferiors.c (do_restore_current_thread_cleanup): New function.
1519 (make_cleanup_restore_current_thread): Likewise.
1520 * linux-low.c (install_software_single_step_breakpoints): Call
1521 make_cleanup_restore_current_thread. Switch current_thread to
1522 thread.
1523
bec903c9
YQ
15242016-07-21 Yao Qi <yao.qi@linaro.org>
1525
1526 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1527 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1528 (clone_one_breakpoint): Likewise.
1529 (delete_reinsert_breakpoints): Change parameter to thread.
1530 Callers updated.
1531 (has_reinsert_breakpoints): Likewise.
1532 (uninsert_reinsert_breakpoints): Likewise.
1533 (reinsert_reinsert_breakpoints): Likewise.
1534 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1535 (delete_reinsert_breakpoints): Likewise.
1536 (reinsert_reinsert_breakpoints): Likewise.
1537 (uninsert_reinsert_breakpoints): Likewise.
1538 (has_reinsert_breakpoints): Likewise.
1539
63c40ec7
YQ
15402016-07-21 Yao Qi <yao.qi@linaro.org>
1541
1542 * inferiors.c (get_thread_process): Make parameter const.
1543 * inferiors.h (get_thread_process): Update declaration.
1544 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1545 Add new parameters child_thread and parent_thread. Callers
1546 updated.
1547 * mem-break.h (clone_all_breakpoints): Update declaration.
1548
9aa76cd0
YQ
15492016-07-21 Yao Qi <yao.qi@linaro.org>
1550
1551 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1552 <command_list, handler>: Remove.
1553 (struct gdb_breakpoint): New.
1554 (struct other_breakpoint): New.
1555 (struct reinsert_breakpoint): New.
1556 (is_gdb_breakpoint): New function.
1557 (any_persistent_commands): Update command_list if
1558 is_gdb_breakpoint returns true.
1559 (set_breakpoint): Create breakpoints according to their types.
1560 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1561 (set_gdb_breakpoint_1): Likewise.
1562 (set_gdb_breakpoint): Likewise.
1563 (clear_breakpoint_conditions): Change parameter type to
1564 'struct gdb_breakpoint *'.
1565 (clear_breakpoint_commands): Likewise.
1566 (clear_breakpoint_conditions_and_commands): Likewise.
1567 (add_condition_to_breakpoint): Likewise.
1568 (add_breakpoint_condition): Likewise.
1569 (add_commands_to_breakpoint): Likewise.
1570 (check_breakpoints): Check other_breakpoint.
1571 (clone_one_breakpoint): Clone breakpopint according to its type.
1572 * mem-break.h (struct gdb_breakpoint): Declare.
1573 (set_gdb_breakpoint): Update declaration.
1574 (clear_breakpoint_conditions_and_commands): Likewise.
1575 (add_breakpoint_condition): Likewise.
1576 (add_breakpoint_commands): Likewise.
1577 * server.c (process_point_options): Change parameter type to
1578 'struct gdb_breakpoint *'.
1579
811f8301
YQ
15802016-07-21 Yao Qi <yao.qi@linaro.org>
1581
1582 * mem-break.c (set_breakpoint_at): Rename it to ...
1583 (set_breakpoint_type_at): ... it.
1584 (set_breakpoint_at): Call set_breakpoint_type_at.
1585 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1586 * mem-break.h (set_breakpoint_at): Update comments.
1587
b1c51e36
CLT
15882016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1589
1590 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1591 to buf parameter.
1592 (nios2_store_gregset): Likewise.
1593
ced2dffb
PA
15942016-07-01 Pedro Alves <palves@redhat.com>
1595 Antoine Tremblay <antoine.tremblay@ericsson.com>
1596
1597 * linux-low.c: Change interface to take the target lwp_info
1598 pointer directly and return void. Handle detaching from a zombie
1599 thread.
1600 (linux_detach_lwp_callback): New function.
1601 (linux_detach): Detach from the leader thread after detaching from
1602 the clone threads.
1603
2ac09a5b
YQ
16042016-06-28 Yao Qi <yao.qi@linaro.org>
1605
1606 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1607 for variable new_offset.
1608 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1609 (aarch64_ftrace_insn_reloc_cb): Likewise.
1610 (aarch64_ftrace_insn_reloc_tb): Likewise.
1611 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1612 PRIx64 instead of PRIx32.
1613
79e7fd4f
YQ
16142016-06-28 Yao Qi <yao.qi@linaro.org>
1615
1616 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1617 (the_low_target): Install arm_get_syscall_trapinfo.
1618
061fc021
YQ
16192016-06-28 Yao Qi <yao.qi@linaro.org>
1620
1621 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1622 function.
1623 (the_low_target): Install aarch64_get_syscall_trapinfo.
1624
4cc32bec
YQ
16252016-06-28 Yao Qi <yao.qi@linaro.org>
1626
1627 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1628 Callers updated.
1629 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1630 Remove parameter sysno.
1631 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1632 sysret.
1633
782c1122
AA
16342016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1635
1636 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1637 (s390_emit_ne_goto): Likewise.
1638 (s390_emit_lt_goto): Likewise.
1639 (s390_emit_le_goto): Likewise.
1640 (s390_emit_gt_goto): Likewise.
1641 (s390_emit_ge_goto): Likewise.
1642 (s390x_emit_eq_goto): Likewise.
1643 (s390x_emit_ne_goto): Likewise.
1644 (s390x_emit_lt_goto): Likewise.
1645 (s390x_emit_le_goto): Likewise.
1646 (s390x_emit_gt_goto): Likewise.
1647 (s390x_emit_ge_goto): Likewise.
1648 (s390_emit_ops_impl): Mark variable static.
1649 (s390x_emit_ops): Likewise.
1650
2e7b624b
YQ
16512016-06-17 Yao Qi <yao.qi@linaro.org>
1652
1653 * linux-low.c (handle_extended_wait): Call
1654 uninsert_reinsert_breakpoints for the parent process. Remove
1655 reinsert breakpoints from the child process. Reinsert them to
1656 the parent process when vfork is done.
1657 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1658 (reinsert_reinsert_breakpoints): New function.
1659 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1660 (reinsert_reinsert_breakpoints): Declare.
1661
8a81c5d7
YQ
16622016-06-17 Yao Qi <yao.qi@linaro.org>
1663
1664 * linux-low.c (handle_extended_wait): If the parent is doing
1665 step-over, remove the reinsert breakpoints from the forked child.
1666
f50bf8e5
YQ
16672016-06-17 Yao Qi <yao.qi@linaro.org>
1668
1669 * linux-low.c (unsuspend_all_lwps): Declare.
1670 (linux_low_filter_event): If thread exited, call finish_step_over.
1671 If step-over is finished, unsuspend other threads.
1672
8376a3cb
YQ
16732016-06-17 Yao Qi <yao.qi@linaro.org>
1674
1675 * linux-low.c (linux_resume_one_lwp_throw): Assert
1676 has_reinsert_breakpoints returns false.
1677 * mem-break.c (delete_disabled_breakpoints): Assert
1678 bp type isn't reinsert_breakpoint.
1679
f79b145d
YQ
16802016-06-17 Yao Qi <yao.qi@linaro.org>
1681
1682 * linux-low.c (maybe_hw_step): New function.
1683 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1684 (finish_step_over): Switch current_thread to lwp temporarily,
1685 and assert has_reinsert_breakpoints returns true.
1686 (proceed_one_lwp): Call maybe_hw_step.
1687 * mem-break.c (has_reinsert_breakpoints): New function.
1688 * mem-break.h (has_reinsert_breakpoints): Declare.
1689
0ae534d2
JT
16902016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1691
1692 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1693
fcdad592
YQ
16942016-05-17 Yao Qi <yao.qi@linaro.org>
1695
1696 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1697 instead of find_inferior.
1698
9e784964
YQ
16992016-05-05 Yao Qi <yao.qi@linaro.org>
1700
1701 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1702 Initialize res to zero.
1703
cf2ebb6e
YQ
17042016-05-05 Yao Qi <yao.qi@linaro.org>
1705
1706 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1707 to uint32_t.
1708
c1aebf87
UW
17092016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1710
1711 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1712 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1713 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1714
35fd2deb 17152016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 1716 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
1717
1718 * tracepoint.c (write_inferior_int8): New function.
1719 (cmd_qtenable_disable): Write enable flag using
1720 write_inferior_int8.
1721
484b3c32
YQ
17222016-04-25 Yao Qi <yao.qi@linaro.org>
1723
1724 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1725 (need_step_over_p): Return zero if the LWP has pending signals
1726 can be delivered on software single step target.
1727
85ba7d86
YQ
17282016-04-25 Yao Qi <yao.qi@linaro.org>
1729
1730 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1731 return instead of error.
1732
3539aa13
YQ
17332016-04-22 Yao Qi <yao.qi@linaro.org>
1734
1735 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1736 to 23.
1737
5b061e98
YQ
17382016-04-22 Yao Qi <yao.qi@linaro.org>
1739
1740 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1741 signal when stepping over breakpoint with software single
1742 step.
1743
3451269c
PA
17442016-04-21 Pedro Alves <palves@redhat.com>
1745
1746 * linux-s390-low.c (s390_collect_ptrace_register)
1747 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1748 add casts.
1749 (s390_check_regset): Use void * instead of gdb_byte *.
1750
a2358508
PA
17512016-04-20 Pedro Alves <palves@redhat.com>
1752
1753 * configure: Renegerate.
1754
6885166d
YQ
17552016-04-20 Yao Qi <yao.qi@linaro.org>
1756
1757 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1758 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1759 number 16.
1760 (arm_store_gregset): Likewise.
1761
2b863f51
WT
17622016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1763
1764 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1765 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1766 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1767 (amd64-avx-mpx-linux.c): New rules.
1768 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1769 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1770 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1771 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1772 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1773 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1774 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1775 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1776 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1777 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1778 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1779 * linux-x86-low.c (x86_linux_read_description): Add case for
1780 X86_XSTATE_AVX_MPX_MASK.
1781 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1782 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1783 init_registers_i386_avx_mpx_linux.
1784 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1785 (initialize_low_tracepoint): Call
1786 init_registers_i386_avx_mpx_linux.
1787 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1788 (initialize_low_tracepoint): Call
1789 init_registers_amd64_avx_mpx_linux.
1790 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1791 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1792 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1793 declarations.
1794
9b30624b
PA
17952016-04-18 Pedro Alves <palves@redhat.com>
1796
1797 * configure: Regenerate.
1798
45e3745e
AT
17992016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1800
1801 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1802 (aarch64_emit_sub): Likewise.
1803
2afc13ff
PA
18042016-04-12 Pedro Alves <palves@redhat.com>
1805
1806 * utils.c (prepare_to_throw_exception): Delete.
1807
6e774b13
SM
18082016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1809
1810 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1811
4dca19f8
MK
18122016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1813
1814 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1815
d0a9981f
MK
18162016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1817
1818 * linux-aarch64-ipa.c: Add <elf.h> include.
1819 * linux-ppc-ipa.c: Add <elf.h> include.
1820 * linux-s390-ipa.c: Add <elf.h> include.
1821
252db07e
MK
18222016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1823
1824 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1825 (get_raw_reg_ptr): Likewise.
1826 (get_trace_state_variable_value_ptr): Likewise.
1827 (set_trace_state_variable_value_ptr): Likewise.
1828 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1829 char *.
1830
14e2b6d9
MK
18312016-03-31 Wei-cheng Wang <cole945@gmail.com>
1832 Marcin Kościelnicki <koriakin@0x04.net>
1833
1834 PR/17221
1835 * linux-ppc-low.c (emit_insns): New function.
1836 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1837 (ppc_emit_prologue): New function.
1838 (ppc_emit_epilogue): New function.
1839 (ppc_emit_add): New function.
1840 (ppc_emit_sub): New function.
1841 (ppc_emit_mul): New function.
1842 (ppc_emit_lsh): New function.
1843 (ppc_emit_rsh_signed): New function.
1844 (ppc_emit_rsh_unsigned): New function.
1845 (ppc_emit_ext): New function.
1846 (ppc_emit_zero_ext): New function.
1847 (ppc_emit_log_not): New function.
1848 (ppc_emit_bit_and): New function.
1849 (ppc_emit_bit_or): New function.
1850 (ppc_emit_bit_xor): New function.
1851 (ppc_emit_bit_not): New function.
1852 (ppc_emit_equal): New function.
1853 (ppc_emit_less_signed): New function.
1854 (ppc_emit_less_unsigned): New function.
1855 (ppc_emit_ref): New function.
1856 (ppc_emit_const): New function.
1857 (ppc_emit_reg): New function.
1858 (ppc_emit_pop): New function.
1859 (ppc_emit_stack_flush): New function.
1860 (ppc_emit_swap): New function.
1861 (ppc_emit_stack_adjust): New function.
1862 (ppc_emit_call): New function.
1863 (ppc_emit_int_call_1): New function.
1864 (ppc_emit_void_call_2): New function.
1865 (ppc_emit_if_goto): New function.
1866 (ppc_emit_goto): New function.
1867 (ppc_emit_eq_goto): New function.
1868 (ppc_emit_ne_goto): New function.
1869 (ppc_emit_lt_goto): New function.
1870 (ppc_emit_le_goto): New function.
1871 (ppc_emit_gt_goto): New function.
1872 (ppc_emit_ge_goto): New function.
1873 (ppc_write_goto_address): New function.
1874 (ppc_emit_ops_impl): New static variable.
1875 (ppc64v1_emit_prologue): New function.
1876 (ppc64v2_emit_prologue): New function.
1877 (ppc64_emit_epilogue): New function.
1878 (ppc64_emit_add): New function.
1879 (ppc64_emit_sub): New function.
1880 (ppc64_emit_mul): New function.
1881 (ppc64_emit_lsh): New function.
1882 (ppc64_emit_rsh_signed): New function.
1883 (ppc64_emit_rsh_unsigned): New function.
1884 (ppc64_emit_ext): New function.
1885 (ppc64_emit_zero_ext): New function.
1886 (ppc64_emit_log_not): New function.
1887 (ppc64_emit_bit_and): New function.
1888 (ppc64_emit_bit_or): New function.
1889 (ppc64_emit_bit_xor): New function.
1890 (ppc64_emit_bit_not): New function.
1891 (ppc64_emit_equal): New function.
1892 (ppc64_emit_less_signed): New function.
1893 (ppc64_emit_less_unsigned): New function.
1894 (ppc64_emit_ref): New function.
1895 (ppc64_emit_const): New function.
1896 (ppc64v1_emit_reg): New function.
1897 (ppc64v2_emit_reg): New function.
1898 (ppc64_emit_pop): New function.
1899 (ppc64_emit_stack_flush): New function.
1900 (ppc64_emit_swap): New function.
1901 (ppc64v1_emit_call): New function.
1902 (ppc64v2_emit_call): New function.
1903 (ppc64v1_emit_int_call_1): New function.
1904 (ppc64v2_emit_int_call_1): New function.
1905 (ppc64v1_emit_void_call_2): New function.
1906 (ppc64v2_emit_void_call_2): New function.
1907 (ppc64_emit_if_goto): New function.
1908 (ppc64_emit_eq_goto): New function.
1909 (ppc64_emit_ne_goto): New function.
1910 (ppc64_emit_lt_goto): New function.
1911 (ppc64_emit_le_goto): New function.
1912 (ppc64_emit_gt_goto): New function.
1913 (ppc64_emit_ge_goto): New function.
1914 (ppc64v1_emit_ops_impl): New static variable.
1915 (ppc64v2_emit_ops_impl): New static variable.
1916 (ppc_emit_ops): New function.
1917 (linux_low_target): Wire in ppc_emit_ops.
1918
a2174ba4
MK
19192016-03-31 Wei-cheng Wang <cole945@gmail.com>
1920 Marcin Kościelnicki <koriakin@0x04.net>
1921
1922 PR/17221
1923 * Makefile.in: Add powerpc-*-ipa.o
1924 * configure.srv: Add ipa_obj for powerpc*-linux.
1925 * linux-ppc-ipa.c: New file.
1926 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1927 includes.
1928 (PPC_FIELD): New macro.
1929 (PPC_SEXT): New macro.
1930 (PPC_OP6): New macro.
1931 (PPC_BO): New macro.
1932 (PPC_LI): New macro.
1933 (PPC_BD): New macro.
1934 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1935 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1936 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1937 (ppc_get_thread_area): New function.
1938 (is_elfv2_inferior): New function.
1939 (gen_ds_form): New function.
1940 (GEN_STD): New macro.
1941 (GEN_STDU): New macro.
1942 (GEN_LD): New macro.
1943 (GEN_LDU): New macro.
1944 (gen_d_form): New function.
1945 (GEN_ADDI): New macro.
1946 (GEN_ADDIS): New macro.
1947 (GEN_LI): New macro.
1948 (GEN_LIS): New macro.
1949 (GEN_ORI): New macro.
1950 (GEN_ORIS): New macro.
1951 (GEN_LWZ): New macro.
1952 (GEN_STW): New macro.
1953 (GEN_STWU): New macro.
1954 (gen_xfx_form): New function.
1955 (GEN_MFSPR): New macro.
1956 (GEN_MTSPR): New macro.
1957 (GEN_MFCR): New macro.
1958 (GEN_MTCR): New macro.
1959 (GEN_SYNC): New macro.
1960 (GEN_LWSYNC): New macro.
1961 (gen_x_form): New function.
1962 (GEN_OR): New macro.
1963 (GEN_MR): New macro.
1964 (GEN_LWARX): New macro.
1965 (GEN_STWCX): New macro.
1966 (GEN_CMPW): New macro.
1967 (gen_md_form): New function.
1968 (GEN_RLDICL): New macro.
1969 (GEN_RLDICR): New macro.
1970 (gen_i_form): New function.
1971 (GEN_B): New macro.
1972 (GEN_BL): New macro.
1973 (gen_b_form): New function.
1974 (GEN_BNE): New macro.
1975 (GEN_LOAD): New macro.
1976 (GEN_STORE): New macro.
1977 (gen_limm): New function.
1978 (gen_atomic_xchg): New function.
1979 (gen_call): New function.
1980 (ppc_relocate_instruction): New function.
1981 (ppc_install_fast_tracepoint_jump_pad): New function.
1982 (ppc_get_min_fast_tracepoint_insn_len): New function.
1983 (ppc_get_ipa_tdesc_idx): New function.
1984 (the_low_target): Wire in the new functions.
1985 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1986 tdescs.
1987 * linux-ppc-tdesc.h: New file.
1988
a13c4696
MK
19892016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1990
1991 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1992 (alloc_jump_pad_buffer): New function.
1993 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1994 (alloc_jump_pad_buffer): New function.
1995 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1996 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1997 (alloc_jump_pad_buffer): New function.
1998 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1999 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2000 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2001 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2002
1cda1512
MK
20032016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2004
2005 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2006 * linux-amd64-ipa.c: Likewise.
2007 * linux-i386-ipa.c: Likewise.
2008 * linux-s390-ipa.c: Likewise.
2009 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2010 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2011 set_trace_state_variable_value_ptr.
2012 (struct ipa_sym_addresses): Likewise.
2013 (symbol_list): Likewise.
2014 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2015 accessing gdb_collect directly.
2016 (gdb_collect_ptr_type): New typedef.
2017 (get_raw_reg_ptr_type): New typedef.
2018 (get_trace_state_variable_value_ptr_type): New typedef.
2019 (set_trace_state_variable_value_ptr_type): New typedef.
2020 (gdb_collect_ptr): New global.
2021 (get_raw_reg_ptr): New global.
2022 (get_trace_state_variable_value_ptr): New global.
2023 (set_trace_state_variable_value_ptr): New global.
2024 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2025 accessing get_raw_reg directly.
2026 (get_get_tsv_func_addr): Likewise for
2027 get_trace_state_variable_value_ptr.
2028 (get_set_tsv_func_addr): Likewise for
2029 set_trace_state_variable_value_ptr.
2030 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2031
72fb5488
SM
20322016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2033
2034 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2035
28170b88
MK
20362016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2037
2038 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2039 packets.
2040 (relocate_instruction): Remove own_buf.
2041 * server.c (own_buf): Make global.
2042 (handle_v_requests): Make global.
2043 * server.h (own_buf): New declaration.
2044 (handle_v_requests): New prototype.
2045
f39e8743
MK
20462016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2047
2048 PR 18377
2049 * linux-s390-low.c (add_insns): New function.
2050 (s390_emit_prologue): New function.
2051 (s390_emit_epilogue): New function.
2052 (s390_emit_add): New function.
2053 (s390_emit_sub): New function.
2054 (s390_emit_mul): New function.
2055 (s390_emit_lsh): New function.
2056 (s390_emit_rsh_signed): New function.
2057 (s390_emit_rsh_unsigned): New function.
2058 (s390_emit_ext): New function.
2059 (s390_emit_log_not): New function.
2060 (s390_emit_bit_and): New function.
2061 (s390_emit_bit_or): New function.
2062 (s390_emit_bit_xor): New function.
2063 (s390_emit_bit_not): New function.
2064 (s390_emit_equal): New function.
2065 (s390_emit_less_signed): New function.
2066 (s390_emit_less_unsigned): New function.
2067 (s390_emit_ref): New function.
2068 (s390_emit_if_goto): New function.
2069 (s390_emit_goto): New function.
2070 (s390_write_goto_address): New function.
2071 (s390_emit_litpool): New function.
2072 (s390_emit_const): New function.
2073 (s390_emit_call): New function.
2074 (s390_emit_reg): New function.
2075 (s390_emit_pop): New function.
2076 (s390_emit_stack_flush): New function.
2077 (s390_emit_zero_ext): New function.
2078 (s390_emit_swap): New function.
2079 (s390_emit_stack_adjust): New function.
2080 (s390_emit_set_r2): New function.
2081 (s390_emit_int_call_1): New function.
2082 (s390_emit_void_call_2): New function.
2083 (s390_emit_eq_goto): New function.
2084 (s390_emit_ne_goto): New function.
2085 (s390_emit_lt_goto): New function.
2086 (s390_emit_le_goto): New function.
2087 (s390_emit_gt_goto): New function.
2088 (s390_emit_ge_goto): New function.
2089 (s390x_emit_prologue): New function.
2090 (s390x_emit_epilogue): New function.
2091 (s390x_emit_add): New function.
2092 (s390x_emit_sub): New function.
2093 (s390x_emit_mul): New function.
2094 (s390x_emit_lsh): New function.
2095 (s390x_emit_rsh_signed): New function.
2096 (s390x_emit_rsh_unsigned): New function.
2097 (s390x_emit_ext): New function.
2098 (s390x_emit_log_not): New function.
2099 (s390x_emit_bit_and): New function.
2100 (s390x_emit_bit_or): New function.
2101 (s390x_emit_bit_xor): New function.
2102 (s390x_emit_bit_not): New function.
2103 (s390x_emit_equal): New function.
2104 (s390x_emit_less_signed): New function.
2105 (s390x_emit_less_unsigned): New function.
2106 (s390x_emit_ref): New function.
2107 (s390x_emit_if_goto): New function.
2108 (s390x_emit_const): New function.
2109 (s390x_emit_call): New function.
2110 (s390x_emit_reg): New function.
2111 (s390x_emit_pop): New function.
2112 (s390x_emit_stack_flush): New function.
2113 (s390x_emit_zero_ext): New function.
2114 (s390x_emit_swap): New function.
2115 (s390x_emit_stack_adjust): New function.
2116 (s390x_emit_int_call_1): New function.
2117 (s390x_emit_void_call_2): New function.
2118 (s390x_emit_eq_goto): New function.
2119 (s390x_emit_ne_goto): New function.
2120 (s390x_emit_lt_goto): New function.
2121 (s390x_emit_le_goto): New function.
2122 (s390x_emit_gt_goto): New function.
2123 (s390x_emit_ge_goto): New function.
2124 (s390_emit_ops): New function.
2125 (struct linux_target_ops): Fill in emit_ops hook.
2126
abd9baf9
MK
21272016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2128
2129 PR 18377
2130 * Makefile.in: Add s390 IPA files.
2131 * configure.srv: Build IPA for s390.
2132 * linux-s390-ipa.c: New file.
2133 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2134 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2135 (tdesc_s390_linux32): Likewise.
2136 (init_registers_s390_linux32v1): Likewise.
2137 (tdesc_s390_linux32v1): Likewise.
2138 (init_registers_s390_linux32v2): Likewise.
2139 (tdesc_s390_linux32v2): Likewise.
2140 (init_registers_s390_linux64): Likewise.
2141 (tdesc_s390_linux64): Likewise.
2142 (init_registers_s390_linux64v1): Likewise.
2143 (tdesc_s390_linux64v1): Likewise.
2144 (init_registers_s390_linux64v2): Likewise.
2145 (tdesc_s390_linux64v2): Likewise.
2146 (init_registers_s390_te_linux64): Likewise.
2147 (tdesc_s390_te_linux64): Likewise.
2148 (init_registers_s390_vx_linux64): Likewise.
2149 (tdesc_s390_vx_linux64): Likewise.
2150 (init_registers_s390_tevx_linux64): Likewise.
2151 (tdesc_s390_tevx_linux64): Likewise.
2152 (init_registers_s390x_linux64): Likewise.
2153 (tdesc_s390x_linux64): Likewise.
2154 (init_registers_s390x_linux64v1): Likewise.
2155 (tdesc_s390x_linux64v1): Likewise.
2156 (init_registers_s390x_linux64v2): Likewise.
2157 (tdesc_s390x_linux64v2): Likewise.
2158 (init_registers_s390x_te_linux64): Likewise.
2159 (tdesc_s390x_te_linux64): Likewise.
2160 (init_registers_s390x_vx_linux64): Likewise.
2161 (tdesc_s390x_vx_linux64): Likewise.
2162 (init_registers_s390x_tevx_linux64): Likewise.
2163 (tdesc_s390x_tevx_linux64): Likewise.
2164 (have_hwcap_s390_vx): New static variable.
2165 (s390_arch_setup): Fill have_hwcap_s390_vx.
2166 (s390_get_thread_area): New function.
2167 (s390_ft_entry_gpr_esa): New const.
2168 (s390_ft_entry_gpr_zarch): New const.
2169 (s390_ft_entry_misc): New const.
2170 (s390_ft_entry_fr): New const.
2171 (s390_ft_entry_vr): New const.
2172 (s390_ft_main_31): New const.
2173 (s390_ft_main_64): New const.
2174 (s390_ft_exit_fr): New const.
2175 (s390_ft_exit_vr): New const.
2176 (s390_ft_exit_misc): New const.
2177 (s390_ft_exit_gpr_esa): New const.
2178 (s390_ft_exit_gpr_zarch): New const.
2179 (append_insns): New function.
2180 (s390_relocate_instruction): New function.
2181 (s390_install_fast_tracepoint_jump_pad): New function.
2182 (s390_get_min_fast_tracepoint_insn_len): New function.
2183 (s390_get_ipa_tdesc_idx): New function.
2184 (struct linux_target_ops): Wire in the above functions.
2185 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2186 * linux-s390-tdesc.h: New file.
2187
a4105d04
MK
21882016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2189
2190 * linux-s390-low.c (s390_supports_tracepoints): New function.
2191 (struct linux_target_ops): Fill supports_tracepoints hook.
2192
35ac8b3e
YQ
21932016-03-18 Yao Qi <yao.qi@linaro.org>
2194
2195 * linux-low.c (lwp_signal_can_be_delivered): New function.
2196 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2197
94610ec4
YQ
21982016-03-18 Yao Qi <yao.qi@linaro.org>
2199
2200 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2201 0 if signal is enqueued. Remove 'signal' from one debugging
2202 message. Move one debugging message to some lines below.
2203 Remove code setting 'signal' to 0.
2204
80aea927
YQ
22052016-03-18 Yao Qi <yao.qi@linaro.org>
2206
2207 * linux-low.c (linux_low_filter_event): Remove redundant
2208 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2209
b04fd3be
MK
22102016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2211
2212 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2213 (struct linux_target_ops): Wire in the above.
2214
c40c8d4b
YQ
22152016-03-03 Yao Qi <yao.qi@linaro.org>
2216
2217 * linux-low.c: Update comments to start_step_over.
2218
0f8288ae
YQ
22192016-03-03 Yao Qi <yao.qi@linaro.org>
2220
2221 PR server/19736
2222 * linux-low.c (handle_extended_wait): Set child suspended
2223 if event_lwp->bp_reinsert isn't zero.
2224
fdbd04a8
YQ
22252016-03-02 Yao Qi <yao.qi@linaro.org>
2226
2227 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2228 enqueue_pending_signal.
2229
6896a8fa
MK
22302016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2231
2232 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2233 is actually loaded.
2234
ab503087
MK
22352016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2236
2237 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2238 (s390_regmap_3264) [!__s390x__]: New global.
2239 (s390_collect_ptrace_register): Skip map entries containing -1.
2240 (s390_supply_ptrace_register): Ditto.
2241 (s390_fill_gprs_high): New function.
2242 (s390_store_gprs_high): New function.
2243 (s390_regsets): Add NT_S390_HIGH_GPRS.
2244 (s390_get_hwcap): Enable on 31-bit.
2245 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2246 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2247 Detect NT_S390_HIGH_GPRS.
2248 (s390_usrregs_info_3264): Enable on 31-bit.
2249 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2250 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2251
ae91f625
MK
22522016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2253
2254 PR gdb/13808
2255 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2256 * configure.srv: Ditto.
2257 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2258 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2259 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2260 (init_registers_amd64_linux): Remove prototype.
2261 (tdesc_amd64_linux): Remove declaration.
2262 (get_ipa_tdesc): New function.
2263 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2264 initialize remaining tdescs.
2265 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2266 (init_registers_i386_linux): Remove prototype.
2267 (tdesc_i386_linux): Remove declaration.
2268 (get_ipa_tdesc): New function.
2269 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2270 initialize remaining tdescs.
2271 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2272 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2273 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2274 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2275 (x86_get_ipa_tdesc_idx): New function.
2276 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2277 * linux-x86-tdesc.h: New file.
2278 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2279 (target_get_ipa_tdesc_idx): New macro.
2280 * tracepoint.c (ipa_tdesc_idx): New macro.
2281 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2282 (symbol_list): Add ipa_tdesc_idx.
2283 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2284 (ipa_tdesc): Remove.
2285 (ipa_tdesc_idx): New variable.
2286 (get_context_regcache): Use get_ipa_tdesc.
2287 (gdb_collect): Ditto.
2288 (gdb_probe): Ditto.
2289 * tracepoint.h (get_ipa_tdesc): New prototype.
2290 (ipa_tdesc): Remove.
2291
e7ad2f14
PA
22922016-02-24 Pedro Alves <palves@redhat.com>
2293
2294 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2295 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2296 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2297 Factor out common code between the USE_SIGTRAP_SIGINFO and
2298 !USE_SIGTRAP_SIGINFO blocks.
2299 (linux_low_filter_event): Call save_stop_reason instead of
2300 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2301 Update comments.
2302 (linux_wait_1): Update comments.
2303
657f9cde
WW
23042016-02-24 Wei-cheng Wang <cole945@gmail.com>
2305
2306 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2307 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2308 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2309 ppc_insert_point, ppc_remove_point.
2310
b00b61e1
MK
23112016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2312
2313 * linux-s390-low.c (s390_supports_z_point_type): New function.
2314 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2315
553cb527
YQ
23162016-02-16 Yao Qi <yao.qi@linaro.org>
2317
2318 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2319 PC. Get pc from regcache_read_pc.
2320
a5652c21
YQ
23212016-02-12 Yao Qi <yao.qi@linaro.org>
2322
2323 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2324 or linux_get_pc_32bit.
2325 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2326
ed443b61
YQ
23272016-02-12 Yao Qi <yao.qi@linaro.org>
2328
2329 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2330 arm_linux_get_next_pcs_fixup.
2331
020ecd38
MK
23322016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2333
2334 * tracepoint.c (x_tracepoint_action_download): Change
2335 write_inferior_data_ptr to write_inferior_data_pointer.
2336 (cmd_qtstart): Likewise.
2337 (write_inferior_data_ptr): Remove.
2338 (download_agent_expr): Change write_inferior_data_ptr to
2339 write_inferior_data_pointer.
2340 (download_tracepoint_1): Likewise.
2341 (download_tracepoint): Likewise.
2342 (download_trace_state_variables): Likewise.
2343
7cae9051
WW
23442016-02-11 Wei-cheng Wang <cole945@gmail.com>
2345 Marcin Kościelnicki <koriakin@0x04.net>
2346
2347 * tracepoint.c (struct tracepoint_action_ops): Remove.
2348 (struct tracepoint_action): Remove ops.
2349 (m_tracepoint_action_download, r_tracepoint_action_download)
2350 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2351 size and offset accordingly.
2352 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2353 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2354 (tracepoint_action_send, tracepoint_action_download): New functions.
2355 Helpers for trace action handlers.
2356 (add_tracepoint_action): Remove setup actions ops.
2357 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2358
9f6a71b4
YQ
23592016-02-10 Yao Qi <yao.qi@linaro.org>
2360
2361 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2362
1e94266c
SM
23632016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2364
2365 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2366 to AC_OUTPUT.
2367 * configure: Regenerate.
2368
8adce034
SM
23692016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2370
2371 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2372 void * to gdb_byte *.
2373 * linux-low.c (siginfo_fixup): Likewise.
2374 (linux_xfer_siginfo): Likewise.
2375 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2376 Likewise.
2377 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2378
93813b37
WT
23792016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2380
2381 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2382 to srv_tgtobj.
2383 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2384 to srv_tgtobj.
2385 * linux-x86-low.c [__x86_64__]: Include
2386 "nat/amd64-linux-siginfo.h".
2387 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2388 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2389 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2390 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2391 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2392 (cpt_si_fd, si_timerid, si_overrun): Move from
2393 nat/amd64-linux-siginfo.c.
2394 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2395
8424cc97
SM
23962016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2397
2398 * server.c (skip_to_semicolon): Remove.
2399 (process_point_options): Use strchrnul instead of
2400 skip_to_semicolon.
2401
4d18591b
YQ
24022016-01-26 Yao Qi <yao.qi@linaro.org>
2403
2404 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2405 * linux-low.c (install_software_single_step_breakpoints): Don't
2406 call regcache_read_pc.
2407 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2408 argument pc.
2409
d8020970
YQ
24102016-01-26 Yao Qi <yao.qi@linaro.org>
2411
2412 * linux-low.c (install_software_single_step_breakpoints): Call
2413 regcache_read_pc instead of get_pc.
2414
8b207339
YQ
24152016-01-26 Yao Qi <yao.qi@linaro.org>
2416
2417 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2418 (unblock_async_io): Rename to ...
2419 (block_unblock_async_io): ... it. New function.
2420 (enable_async_io): Don't install SIGIO handler. Unblock it
2421 instead.
2422 (disable_async_io): Don't ignore SIGIO. Block it instead.
2423 (initialize_async_io): Install SIGIO handler. Don't call
2424 unblock_async_io.
2425
18879fef
YQ
24262016-01-26 Yao Qi <yao.qi@linaro.org>
2427
2428 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2429 first character is '\003', call *the_target->request_interrupt.
2430
a0f8e08a
YQ
24312016-01-25 Yao Qi <yao.qi@linaro.org>
2432
2433 * remote-utils.c (new_thread_notify): Remove.
2434 (dead_thread_notify): Likewise.
2435 * remote-utils.h (new_thread_notify): Remove declaration.
2436 (dead_thread_notify): Likewise.
2437
cc5fd9ab
MK
24382016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2439
2440 * gdb.trace/pending.exp: Fix expected message on continue.
2441
99e8eb11
MK
24422016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2443
2444 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2445 it works properly on big-endian machines where sizeof (CORE_ADDR)
2446 != sizeof (void *).
2447
a994041d
PA
24482016-01-21 Pedro Alves <palves@redhat.com>
2449
2450 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2451 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2452 * configure: Regenerate.
2453
f7a6a40d
YQ
24542016-01-21 Yao Qi <yao.qi@linaro.org>
2455
2456 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2457 is_thumb and set it according to CPSR saved on the stack.
2458 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2459 arm_sigreturn_next_pc.
2460
6f69e520
YQ
24612016-01-18 Yao Qi <yao.qi@linaro.org>
2462
2463 * linux-low.c (linux_set_pc_64bit): New function.
2464 (linux_get_pc_64bit): New function.
2465 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2466 Declare.
2467 * linux-sparc-low.c (debug_threads): Remove declaration.
2468 (sparc_get_pc): Remove.
2469 (the_low_target): Use linux_get_pc_64bit instead of
2470 sparc_get_pc.
2471 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2472 (the_low_target): Use linux_get_pc_64bit and
2473 linux_set_pc_64bit.
2474
276d4552
YQ
24752016-01-18 Yao Qi <yao.qi@linaro.org>
2476
2477 * linux-arm-low.c (debug_threads): Remove declaration.
2478 (arm_get_pc, arm_set_pc): Remove.
2479 (the_low_target): Use linux_get_pc_32bit and
2480 linux_set_pc_32bit.
2481 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2482 (the_low_target): Use linux_get_pc_32bit and
2483 linux_set_pc_32bit.
2484 * linux-cris-low.c (debug_threads): Remove declaration.
2485 (cris_get_pc, cris_set_pc,): Remove.
2486 (the_low_target): Use linux_get_pc_32bit and
2487 linux_set_pc_32bit.
2488 * linux-crisv32-low.c (debug_threads): Remove declaration.
2489 (cris_get_pc, cris_set_pc): Remove.
2490 (the_low_target): Use linux_get_pc_32bit and
2491 linux_set_pc_32bit.
2492 * linux-low.c: Include inttypes.h.
2493 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2494 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2495 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2496 (the_low_target): Use linux_get_pc_32bit and
2497 linux_set_pc_32bit.
2498 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2499 (the_low_target): Use linux_get_pc_32bit and
2500 linux_set_pc_32bit.
2501 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2502 (the_low_target): Use linux_get_pc_32bit and
2503 linux_set_pc_32bit.
2504 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2505 (the_low_target): Use linux_get_pc_32bit and
2506 linux_set_pc_32bit.
2507 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2508 (the_low_target): Use linux_get_pc_32bit and
2509 linux_set_pc_32bit.
2510
eb0edac8
GB
25112016-01-18 Gary Benson <gbenson@redhat.com>
2512
2513 * configure.ac (AC_FUNC_FORK): New check.
2514 * config.in: Regenerate.
2515 * configure: Likewise.
2516
1b451dda
YQ
25172016-01-14 Yao Qi <yao.qi@linaro.org>
2518
2519 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2520 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2521 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2522 arm_get_next_pcs_ctor.
2523
82075af2
JS
25242016-01-12 Josh Stone <jistone@redhat.com>
2525 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2526
2527 * inferiors.h: Include "gdb_vecs.h".
2528 (struct process_info): Add syscalls_to_catch.
2529 * inferiors.c (remove_process): Free syscalls_to_catch.
2530 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2531 syscall_return stops.
2532 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2533 * server.c (handle_general_set): Handle QCatchSyscalls.
2534 (handle_query): Report support for QCatchSyscalls.
2535 * target.h (struct target_ops): Add supports_catch_syscall.
2536 (target_supports_catch_syscall): New macro.
2537 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2538 (struct lwp_info): Add syscall_state.
2539 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2540 Maintain syscall_state and syscalls_to_catch across exec.
2541 (get_syscall_trapinfo): New function, proxy to the_low_target.
2542 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2543 (linux_low_filter_event): Toggle syscall_state entry/return for
2544 syscall traps, and set it ignored for all others.
2545 (gdb_catching_syscalls_p): New function.
2546 (gdb_catch_this_syscall_p): New function.
2547 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2548 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2549 (linux_supports_catch_syscall): New function.
2550 (linux_target_ops): Install it.
2551 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2552 (the_low_target): Install it.
2553
8f13a3ce
MF
25542016-01-12 Mike Frysinger <vapier@gentoo.org>
2555
2556 * acinclude.m4: Include new ../warning.m4 file.
2557 * configure: Regenerated.
2558 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2559
5b3da067
MF
25602016-01-12 Mike Frysinger <vapier@gentoo.org>
2561
2562 * ax.c (is_goto_target): Mark static.
2563 * linux-low.c (register_addr): Likewise.
2564 (linux_fetch_registers, linux_store_registers): Likewise.
2565 * mem-break.c (any_persistent_commands): Fix old prototype.
2566 (add_commands_to_breakpoint): Mark static.
2567 * regcache.c (find_register_by_name): Delete unused func.
2568 * remote-utils.c (hex_or_minus_one): Mark static.
2569 * server.c (monitor_show_help): Mark static.
2570 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2571 handle_v_requests): Likewise.
2572
bc504a31
PA
25732016-01-12 Pedro Alves <palves@redhat.com>
2574
2575 Remove use of the registered trademark symbol throughout.
2576
5a0dd67a
YQ
25772016-01-08 Yao Qi <yao.qi@linaro.org>
2578
2579 * remote-utils.c (getpkt): If c is '\003', call target hook
2580 request_interrupt.
2581
b2ca446f
YQ
25822016-01-06 Yao Qi <yao.qi@linaro.org>
2583
2584 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2585 linux-aarch32-low.c.
2586 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2587 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2588 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2589 (thumb2_breakpoint): Declare.
2590 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2591 linux-aarch32-low.h.
2592 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2593 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2594 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2595
edd88788
JB
25962016-01-01 Joel Brobecker <brobecker@adacore.com>
2597
2598 * gdbreplay.c (gdbreplay_version): Change copyright year in
2599 version message.
2600 * server.c (gdbserver_version): Likewise.
2601
65da7f14
PP
26022015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2603
2604 * server.c (crc32_table): Delete.
2605 (crc32): Use libiberty's xcrc32 function.
2606
4abd5ed2
JB
26072015-12-22 Joel Brobecker <brobecker@adacore.com>
2608
2609 * lynx-low.c (lynx_delete_thread_callback): New function.
2610 (lynx_mourn): Properly delete our process and all of its
2611 threads. Remove call to clear_inferiors.
2612
0e50fe5c
JB
26132015-12-22 Joel Brobecker <brobecker@adacore.com>
2614
2615 * target.c (thread_search_callback): Add check that
2616 the thread_stopped target callback is not NULL before
2617 calling it.
2618
35adc03f
YQ
26192015-12-21 Yao Qi <yao.qi@linaro.org>
2620
2621 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2622 arm breakpoint.
2623
bd2b2909
AT
26242015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2625
2626 * server.c (handle_query): Call target_supports_software_single_step.
2627
7fe5e27e
AT
26282015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2629
2630 * linux-low.c (single_step): New function.
2631 (linux_resume_one_lwp_throw): Call single_step.
2632 (start_step_over): Likewise.
2633
d9311bfa
AT
26342015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2635
2636 * Makefile.in (SFILES): Append arch/arm-linux.c,
2637 arch/arm-get-next-pcs.c.
2638 (arm-linux.o): New rule.
2639 (arm-get-next-pcs.o): New rule.
2640 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2641 arm-linux.o.
2642 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2643 to linux-aarch32-low.c.
2644 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2645 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2646 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2647 (thumb2_breakpoint_len): Likewise.
2648 (arm_is_thumb_mode): Make non-static.
2649 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2650 from linux-aarch32-low.c.
2651 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2652 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2653 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2654 (thumb2_breakpoint_len): Likewise.
2655 (arm_is_thumb_mode): New declaration.
2656 * linux-arm-low.c: Include arch/arm-linux.h
2657 aarch/arm-get-next-pcs.h, sys/syscall.h.
2658 (get_next_pcs_ops): New struct.
2659 (get_next_pcs_addr_bits_remove): New function.
2660 (get_next_pcs_is_thumb): New function.
2661 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2662 (arm_sigreturn_next_pc): Likewise.
2663 (get_next_pcs_syscall_next_pc): Likewise.
2664 (arm_gdbserver_get_next_pcs): Likewise.
2665 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2666 Initialize.
2667 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2668 * server.h: Include gdb_vecs.h.
2669
68ce2059
AT
26702015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2671
2672 * Makefile.in (SFILES): Append common/common-regcache.c.
2673 (OBS): Append common-regcache.o.
2674 (common-regcache.o): New rule.
2675 * regcache.c (init_register_cache): Initialize cache to
2676 REG_UNAVAILABLE.
2677 (regcache_raw_read_unsigned): New function.
2678 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2679 register_status enum.
2680
fa5308bd
AT
26812015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2682
2683 * linux-aarch64-low.c (the_low_targets): Rename
2684 breakpoint_reinsert_addr to get_next_pcs.
2685 * linux-arm-low.c (the_low_targets): Likewise.
2686 * linux-bfin-low.c (the_low_targets): Likewise.
2687 * linux-cris-low.c (the_low_targets): Likewise.
2688 * linux-crisv32-low.c (the_low_targets): Likewise.
2689 * linux-low.c (can_software_single_step): Likewise.
2690 (install_software_single_step_breakpoints): New function.
2691 (start_step_over): Use install_software_single_step_breakpoints.
2692 * linux-low.h: New CORE_ADDR vector.
2693 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2694 get_next_pcs.
2695 * linux-mips-low.c (the_low_targets): Likewise.
2696 * linux-nios2-low.c (the_low_targets): Likewise.
2697 * linux-sparc-low.c (the_low_targets): Likewise.
2698
4a6ed09b
PA
26992015-12-17 Pedro Alves <palves@redhat.com>
2700
2701 * linux-low.c (linux_kill_one_lwp): Remove references to
2702 LinuxThreads.
2703 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2704 to 'kill'.
2705 (linux_init_signals): Delete.
2706 (initialize_low): Adjust.
2707 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2708
7544db95
PA
27092015-12-16 Pedro Alves <palves@redhat.com>
2710
2711 * configure.ac (compiler warning flags): When testing a
2712 -Wno-foo option, check whether -Wfoo works instead.
2713 * configure: Regenerate.
2714
8020350c
DB
27152015-12-11 Don Breazeal <donb@codesourcery.com>
2716
2717 * server.c (process_serial_event): Don't exit from gdbserver
2718 in remote mode if there are still active inferiors.
2719
db91f502
YQ
27202015-12-11 Yao Qi <yao.qi@linaro.org>
2721
2722 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2723 arm_breakpoint_at if the process is 32-bit.
2724
b37a6290
YQ
27252015-12-11 Yao Qi <yao.qi@linaro.org>
2726
2727 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2728 arm breakpoint.
2729
17b1509a
YQ
27302015-12-07 Yao Qi <yao.qi@linaro.org>
2731
2732 * configure.srv: Append arm.o to srv_tgtobj for
2733 aarch64*-*-linux* target.
2734 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2735 from linux-arm-low.c.
2736 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2737 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2738 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2739 (thumb2_breakpoint_len): Likewise.
2740 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2741 (arm_breakpoint_kinds): Likewise.
2742 (arm_breakpoint_kind_from_pc): Likewise.
2743 (arm_sw_breakpoint_from_kind): Likewise.
2744 (arm_breakpoint_kind_from_current_state): Likewise.
2745 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2746 (arm_sw_breakpoint_from_kind): Declare.
2747 (arm_breakpoint_kind_from_current_state): Declare.
2748 (arm_breakpoint_at): Declare.
2749 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2750 arm_sw_breakpoint_from_kind if process is 32-bit.
2751 (aarch64_breakpoint_kind_from_pc): New function.
2752 (aarch64_breakpoint_kind_from_current_state): New function.
2753 (the_low_target): Initialize fields breakpoint_kind_from_pc
2754 and breakpoint_kind_from_current_state.
2755 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2756 linux-aarch32-low.c.
2757 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2758 (arm_breakpoint, arm_breakpoint_len): Likewise.
2759 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2760 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2761 (arm_is_thumb_mode): Likewise.
2762 (arm_breakpoint_at): Likewise.
2763 (arm_breakpoint_kind_from_pc): Likewise.
2764 (arm_sw_breakpoint_from_kind): Likewise.
2765 (arm_breakpoint_kind_from_current_state): Likewise.
2766
2767 Revert:
2768 2015-08-04 Yao Qi <yao.qi@linaro.org>
2769
2770 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2771 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2772 * server.c (extended_protocol): Remove "static".
2773 * server.h (extended_protocol): Declare it.
2774
ece66d65
JS
27752015-12-04 Josh Stone <jistone@redhat.com>
2776
2777 * target.h (struct target_ops) <arch_setup>: Rename to ...
2778 (struct target_ops) <post_create_inferior>: ... this.
2779 (target_arch_setup): Rename to ...
2780 (target_post_create_inferior): ... this, calling post_create_inferior.
2781 * server.c (start_inferior): Update target_arch_setup calls to
2782 target_post_create_inferior.
2783 * linux-low.c (linux_low_ptrace_options): Forward declare.
2784 (linux_arch_setup): Update its comment for general use.
2785 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2786 (struct linux_target_ops): Use linux_post_create_inferior.
2787 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2788 to post_create_inferior.
2789 * nto-low.c (struct nto_target_ops): Likewise.
2790 * spu-low.c (struct spu_target_ops): Likewise.
2791 * win32-low.c (struct win32_target_ops): Likewise.
2792
e58c48b4
AT
27932015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2794
2795 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2796
fbec8956
AT
27972015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2798
2799 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2800 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2801 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2802 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2803 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2804 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2805 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2806 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2807 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2808 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2809 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2810 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2811
9b4c5f87
AT
28122015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2813
2814 * linux-low.c (linux_look_up_symbols): Don't call
2815 linux_supports_traceclone.
2816 * linux-low.h (thread_db_init): Remove use_events argument.
2817 * thread-db.c (thread_db_use_event): Remove global variable.
2818 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2819 (struct thread_db) <td_create_bp>: Remove field.
2820 (thread_db_create_event): Remove function.
2821 (thread_db_enable_reporting): Likewise.
2822 (find_one_thread): Don't check for thread_db_use_events.
2823 (attach_thread): Likewise.
2824 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2825 (try_thread_db_load_1): Don't check for thread_db_use_events.
2826 (thread_db_init): Remove use_events argument and thread events
2827 handling.
2828 (remove_thread_event_breakpoints): Remove function.
2829 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2830
7d00775e
AT
28312015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2832
2833 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2834 New function.
2835 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2836 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2837 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2838 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2839 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2840 Initialize.
2841 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2842 New function.
2843 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2844 * linux-low.c (can_hardware_single_step): Use
2845 supports_hardware_single_step.
2846 (can_software_single_step): New function.
2847 (start_step_over): Call can_software_single_step.
2848 (linux_supports_hardware_single_step): New function.
2849 (struct target_ops) <supports_software_single_step>: Initialize.
2850 * linux-low.h (struct linux_target_ops)
2851 <supports_hardware_single_step>: Initialize.
2852 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2853 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2854 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2855 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2856 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2857 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2858 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2859 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2860 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2861 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2862 Initialize.
2863 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2864 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2865 Initialize.
2866 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2867 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2868 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2869 New function.
2870 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2871 * target.h (struct target_ops): <supports_software_single_step>:
2872 New field.
2873 (target_supports_software_single_step): New macro.
2874
2d97cd35
AT
28752015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2876
2877 * linux-low.c (linux_wait_1): Fix pc advance condition.
2878 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2879 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2880
769ef81f
AT
28812015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2882
2883 * linux-arm-low.c (arm_is_thumb_mode): New function.
2884 (arm_breakpoint_at): Use arm_is_thumb_mode.
2885 (arm_breakpoint_kind_from_current_state): New function.
2886 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2887 Initialize.
2888 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2889 (linux_breakpoint_kind_from_current_state): New function.
2890 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2891 * linux-low.h (struct linux_target_ops)
2892 <breakpoint_kind_from_current_state>: New field.
2893 * target.h (struct target_ops): Likewise.
2894 (target_breakpoint_kind_from_current_state): New macro.
2895
1bebeeca
PA
28962015-11-30 Pedro Alves <palves@redhat.com>
2897
2898 * linux-low.c (linux_resume): Wake up the event loop before
2899 returning.
2900
a67a9fae
PA
29012015-11-30 Pedro Alves <palves@redhat.com>
2902
2903 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2904 check.
2905 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2906 to -1.
2907 * target.c (struct thread_search): New structure.
2908 (thread_search_callback): New function.
2909 (prev_general_thread): New global.
2910 (prepare_to_access_memory, done_accessing_memory): New functions.
2911 * target.h (prepare_to_access_memory, done_accessing_memory):
2912 Replace macros with function declarations.
2913
f2faf941
PA
29142015-11-30 Pedro Alves <palves@redhat.com>
2915
2916 PR 14618
2917 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2918 report TARGET_WAITKIND_NO_RESUMED.
2919 * remote-utils.c (prepare_resume_reply): Handle
2920 TARGET_WAITKIND_NO_RESUMED.
2921 * server.c (report_no_resumed): New global.
2922 (handle_query) <qSupported>: Handle "no-resumed+". Report
2923 "no-resumed+" support.
2924 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2925 return error if the client doesn't support no-resumed events.
2926 (push_stop_notification): New function.
2927 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2928 events if the client supports them.
2929
a681f9c9
PA
29302015-11-30 Pedro Alves <palves@redhat.com>
2931
2932 * linux-low.c (thread_still_has_status_pending_p): Don't check
2933 vCont;t here.
2934 (lwp_resumed): New function.
2935 (status_pending_p_callback): Return early if the LWP is not
2936 supposed to be resumed.
2937
65706a29
PA
29382015-11-30 Pedro Alves <palves@redhat.com>
2939
2940 * linux-low.c (handle_extended_wait): Assert that the LWP's
2941 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2942 thread create events, leave the new child's status pending.
2943 (linux_low_filter_event): If GDB wants to hear about thread exit
2944 events, leave the LWP marked dead and don't delete it.
2945 (linux_wait_for_event_filtered): Don't check for thread exit.
2946 (filter_exit_event): New function.
2947 (linux_wait_1): Use it, when returning an exit event.
2948 (linux_resume_one_lwp_throw): Assert that the LWP's
2949 waitstatus is TARGET_WAITKIND_IGNORE.
2950 * remote-utils.c (prepare_resume_reply): Handle
2951 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2952 * server.c (report_thread_events): New global.
2953 (handle_general_set): Handle QThreadEvents.
2954 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2955 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2956 TARGET_WAITKIND_THREAD_EXITED.
2957 * server.h (report_thread_events): Declare.
2958
56cf4bed
PA
29592015-11-30 Pedro Alves <palves@redhat.com>
2960
2961 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2962 the thread's last_resume_kind was resume_stop.
2963
500c1d85
PA
29642015-11-30 Pedro Alves <palves@redhat.com>
2965
2966 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2967 before returning.
2968
de979965
PA
29692015-11-30 Pedro Alves <palves@redhat.com>
2970
2971 * server.c (handle_v_requests): Handle vCtrlC.
2972
34c65914
PA
29732015-11-30 Pedro Alves <palves@redhat.com>
2974
2975 * gdbthread.h (find_any_thread_of_pid): Declare.
2976 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2977 functions.
2978 * server.c (handle_query): If current_thread is NULL, look for
2979 another thread of the selected process.
2980
79efa585 29812015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 2982 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
2983
2984 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2985 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2986 name in reply.
2987 * target.h (struct target_ops) <thread_name>: New field.
2988 (target_thread_name): New macro.
2989
80d82c19
JB
29902015-11-23 Joel Brobecker <brobecker@adacore.com>
2991
2992 * regcache.h (regcache_invalidate_pid): Add declaration.
2993 * regcache.c (regcache_invalidate_pid): New function, extracted
2994 from regcache_invalidate.
2995 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2996 Add trivial documentation comment.
2997 * lynx-low.c: Use regcache_invalidate_pid instead of
2998 regcache_invalidate.
2999
64da5dd5
JB
30002015-11-23 Joel Brobecker <brobecker@adacore.com>
3001
3002 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3003 and Elf64_auxv_t if the target is Android.
3004
37ce4055
DE
30052015-11-22 Doug Evans <xdje42@gmail.com>
3006
3007 * target.h: #include <sys/types.h>.
3008
06e03fff
PA
30092015-11-19 Pedro Alves <palves@redhat.com>
3010
3011 * linux-low.c (linux_process_qsupported): Change prototype.
3012 Adjust.
3013 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3014 Change prototype.
3015 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3016 and adjust to loop over all features.
3017 * server.c (handle_query) <qSupported>: Adjust to call
3018 target_process_qsupported once, passing it a vector of unprocessed
3019 features.
3020 * target.h (struct target_ops) <process_qsupported>: Change
3021 prototype.
3022 (target_process_qsupported): Adjust.
3023
9a084706
PA
30242015-11-19 Pedro Alves <palves@redhat.com>
3025
3026 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3027 mode.
3028 * configure: Regenerate.
3029
dad44a1f
PA
30302015-11-19 Pedro Alves <palves@redhat.com>
3031
3032 * configure: Regenerate.
3033
231c0592
YQ
30342015-11-19 Yao Qi <yao.qi@linaro.org>
3035
3036 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3037 type to uint32_t.
3038
6c1c9a8b
YQ
30392015-11-19 Yao Qi <yao.qi@linaro.org>
3040
3041 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3042 (struct aarch64_operand): Move enum out.
3043
9caa3311
YQ
30442015-11-19 Yao Qi <yao.qi@linaro.org>
3045
3046 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3047 struct user_fpsimd_state *.
3048 (aarch64_store_fpregset): Likewise.
3049
6a69a054
YQ
30502015-11-19 Yao Qi <yao.qi@linaro.org>
3051
3052 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3053 struct user_pt_regs *.
3054 (aarch64_store_gregset): Likewise.
3055
1798301e
PA
30562015-11-18 Pedro Alves <palves@redhat.com>
3057
3058 * Makefile.in (all_object_files): Add $IPA_OBJS.
3059
ce7715e2
PA
30602015-11-17 Pedro Alves <palves@redhat.com>
3061
3062 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3063 GDB_SIGNAL_0 and gdb_signal_to_string.
3064
c0879059
PA
30652015-11-17 Pedro Alves <palves@redhat.com>
3066
3067 * win32-low.c (handle_output_debug_string): Remove parameter.
3068 (win32_kill): Remove our_status local and adjust call to
3069 handle_output_debug_string.
3070 (get_child_debug_event): Adjust call to
3071 handle_output_debug_string.
3072
1996e237
SM
30732015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3074
3075 * linux-mips-low.c (mips_fill_gregset): Add cast.
3076 (mips_store_gregset): Likewise.
3077 (mips_fill_fpregset): Likewise.
3078 (mips_store_fpregset): Likewise.
3079
cbec665b
SM
30802015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3081
3082 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3083 priv.
3084
eb3e3c67
SM
30852015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3086
3087 * linux-mips-low.c (mips_linux_new_thread): Change type of
3088 watch_type to enum target_hw_bp_type.
3089
171de4b8
SM
30902015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3091
3092 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3093 Change return type to arm_hwbp_type.
3094
04248ead
SM
30952015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3096
3097 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3098 (arm_store_gregset): Likewise.
3099 * linux-arm-low.c (arm_get_hwcap): Likewise.
3100 (arm_read_description): Likewise.
3101
04b3479c
SM
31022015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3103
3104 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3105
2bc84e8a
SM
31062015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3107
3108 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3109 (ppc_fill_vsxregset): Likewise.
3110 (ppc_store_vsxregset): Likewise.
3111 (ppc_fill_vrregset): Likewise.
3112 (ppc_store_vrregset): Likewise.
3113 (ppc_fill_evrregset): Likewise.
3114 (ppc_store_evrregset): Likewise.
3115
e6c5bb05
SM
31162015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3117
3118 * linux-ppc-low.c (ppc_usrregs_info): Remove
3119 forward-declaration.
3120 (ppc_arch_setup): Move lower in file.
3121
7ea45d72
SM
31222015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3123
3124 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3125 (ps_pdwrite): Likewise.
3126
69291610
HW
31272015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3128
3129 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3130 to after assert checks.
3131
b42945fd
SM
31322015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3133
3134 * proc-service.c (ps_pdread): Add/adjust casts.
3135 (ps_pdwrite): Add/adjust casts.
3136
d6f85c84
SM
31372015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3138
3139 * server.c (handle_search_memory_1): Cast return value of
3140 memmem.
3141
f98cd059
SM
31422015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3143
3144 * server.c (write_qxfer_response): Change type of data to
3145 gdb_byte *.
3146
d2412fa5
PA
31472015-10-29 Pedro Alves <palves@redhat.com>
3148
3149 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3150
c17414a2
PA
31512015-10-29 Pedro Alves <palves@redhat.com>
3152
3153 * tracepoint.c (clear_installed_tracepoints): Add casts.
3154
e053fbc4
PA
31552015-10-29 Pedro Alves <palves@redhat.com>
3156
3157 * server.c (handle_v_cont, process_serial_event): Add enum
3158 gdb_signal casts to signal parsing code.
3159
add67df8
PA
31602015-10-29 Pedro Alves <palves@redhat.com>
3161
3162 * linux-low.h (NULL_REGSET): Define.
3163 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3164 * linux-arm-low.c (arm_regsets): Likewise.
3165 * linux-crisv32-low.c (cris_regsets): Likewise.
3166 * linux-m68k-low.c (m68k_regsets): Likewise.
3167 * linux-mips-low.c (mips_regsets): Likewise.
3168 * linux-nios2-low.c (nios2_regsets): Likewise.
3169 * linux-ppc-low.c (ppc_regsets): Likewise.
3170 * linux-s390-low.c (s390_regsets): Likewise.
3171 * linux-sh-low.c (sh_regsets): Likewise.
3172 * linux-sparc-low.c (sparc_regsets): Likewise.
3173 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3174 * linux-tile-low.c (tile_regsets): Likewise.
3175 * linux-x86-low.c (x86_regsets): Likewise.
3176 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3177
50bc912a
PA
31782015-10-29 Pedro Alves <palves@redhat.com>
3179
3180 * linux-low.h (NULL_REGSET): Define.
3181 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3182 * linux-arm-low.c (arm_regsets): Likewise.
3183 * linux-crisv32-low.c (cris_regsets): Likewise.
3184 * linux-m68k-low.c (m68k_regsets): Likewise.
3185 * linux-mips-low.c (mips_regsets): Likewise.
3186 * linux-nios2-low.c (nios2_regsets): Likewise.
3187 * linux-ppc-low.c (ppc_regsets): Likewise.
3188 * linux-s390-low.c (s390_regsets): Likewise.
3189 * linux-sh-low.c (sh_regsets): Likewise.
3190 * linux-sparc-low.c (sparc_regsets): Likewise.
3191 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3192 * linux-tile-low.c (tile_regsets): Likewise.
3193 * linux-x86-low.c (x86_regsets): Likewise.
3194 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3195
682b2546
DE
31962015-10-26 Doug Evans <dje@google.com>
3197
3198 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3199
963843d4
DE
32002015-10-26 Doug Evans <dje@google.com>
3201
3202 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3203
d41401ac
DE
32042015-10-26 Doug Evans <dje@google.com>
3205
3206 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3207 for debug_printf.
3208 (attach_thread, find_new_threads_callback): Ditto.
3209
3db28855
AT
32102015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3211
3212 * mem-break.h (set_breakpoint_data): Remove.
3213
fb78e89c
AT
32142015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3215
3216 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3217 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3218 (initialize_low): Remove set_breakpoint_data call.
3219 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3220 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3221 (initialize_low): Remove set_breakpoint_data call.
3222 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3223 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3224 (initialize_low): Remove set_breakpoint_data call.
3225
2e6ee069
AT
32262015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3227
3228 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3229 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3230 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3231 * target.h (target_breakpoint_kind_from_pc): New macro.
3232
1652a986
AT
32332015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3234
3235 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3236 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3237 the default breakpoint kind.
3238
abeead09
AT
32392015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3240
3241 * linux-arm-low.c (arm_supports_z_point_type): Add software
3242 breakpoint support.
3243
b0b4b501
AT
32442015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3245
3246 * linux-arm-low.c: Refactor breakpoint definitions.
3247 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3248 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3249
8689682c
AT
32502015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3251
3252 * Makefile.in: Add arm.c/o.
3253 * configure.srv: Likewise.
3254 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3255 (arm_breakpoint_kind_from_pc): New function.
3256 (arm_sw_breakpoint_from_kind): Return proper kind.
3257 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3258
27165294
AT
32592015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3260
3261 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3262 removal.
3263 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3264 (struct raw_breakpoint) <size>: Remove.
3265 (struct raw_breakpoint) <kind>: Add.
3266 (bp_size): New function.
3267 (bp_opcode): Likewise.
3268 (find_raw_breakpoint_at): Adjust for kind.
3269 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3270 (remove_memory_breakpoint): Adjust for kind call bp_size.
3271 (set_raw_breakpoint_at): Adjust for kind.
3272 (set_breakpoint): Likewise.
3273 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3274 (delete_raw_breakpoint): Adjust for kind.
3275 (delete_breakpoint): Likewise.
3276 (find_gdb_breakpoint): Likewise.
3277 (set_gdb_breakpoint_1): Likewise.
3278 (set_gdb_breakpoint): Likewise.
3279 (delete_gdb_breakpoint_1): Likewise.
3280 (delete_gdb_breakpoint): Likewise.
3281 (uninsert_raw_breakpoint): Likewise.
3282 (reinsert_raw_breakpoint): Likewise.
3283 (set_breakpoint_data): Remove.
3284 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3285 (check_mem_read): Adjust for kind call bp_size.
3286 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3287 (clone_one_breakpoint): Adjust for kind.
3288 * mem-break.h (set_gdb_breakpoint): Likewise.
3289 (delete_gdb_breakpoint): Likewise.
3290 * server.c (process_serial_event): Likewise.
3291
dd373349
AT
32922015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3293
3294 * linux-aarch64-low.c (aarch64_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-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3300 (arm_sw_breakpoint_from_kind): New function.
3301 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3302 (struct linux_target_ops) <breakpoint>: Remove.
3303 (struct linux_target_ops) <breakpoint_len>: Remove.
3304 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3305 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3306 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3307 (struct linux_target_ops) <breakpoint>: Remove.
3308 (struct linux_target_ops) <breakpoint_len>: Remove.
3309 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3310 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3311 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3312 (struct linux_target_ops) <breakpoint>: Remove.
3313 (struct linux_target_ops) <breakpoint_len>: Remove.
3314 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3315 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3316 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3317 and sw_breakpoint_from_kind to increment the pc.
3318 (linux_breakpoint_kind_from_pc): New function.
3319 (linux_sw_breakpoint_from_kind): New function.
3320 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3321 (initialize_low): Call breakpoint_kind_from_pc and
3322 sw_breakpoint_from_kind to replace breakpoint_data/len.
3323 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3324 New field.
3325 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3326 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3327 (struct linux_target_ops) <breakpoint>: Remove.
3328 (struct linux_target_ops) <breakpoint_len>: Remove.
3329 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3330 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3331 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3332 (struct linux_target_ops) <breakpoint>: Remove.
3333 (struct linux_target_ops) <breakpoint_len>: Remove.
3334 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3335 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3336 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3337 (struct linux_target_ops) <breakpoint>: Remove.
3338 (struct linux_target_ops) <breakpoint_len>: Remove.
3339 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3340 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3341 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3342 (struct linux_target_ops) <breakpoint>: Remove.
3343 (struct linux_target_ops) <breakpoint_len>: Remove.
3344 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3345 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3346 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3347 (struct linux_target_ops) <breakpoint>: Remove.
3348 (struct linux_target_ops) <breakpoint_len>: Remove.
3349 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3350 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3351 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3352 (struct linux_target_ops) <breakpoint>: Remove.
3353 (struct linux_target_ops) <breakpoint_len>: Remove.
3354 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3355 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3356 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3357 (struct linux_target_ops) <breakpoint>: Remove.
3358 (struct linux_target_ops) <breakpoint_len>: Remove.
3359 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3360 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3361 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3362 (struct linux_target_ops) <breakpoint>: Remove.
3363 (struct linux_target_ops) <breakpoint_len>: Remove.
3364 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3365 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3366 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3367 (struct linux_target_ops) <breakpoint>: Remove.
3368 (struct linux_target_ops) <breakpoint_len>: Remove.
3369 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3370 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3371 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3372 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3373 (struct linux_target_ops) <breakpoint>: Remove.
3374 (struct linux_target_ops) <breakpoint_len>: Remove.
3375 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3376 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3377 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3378 (struct linux_target_ops) <breakpoint>: Remove.
3379 (struct linux_target_ops) <breakpoint_len>: Remove.
3380 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3381 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3382
4cd98a19
AT
33832015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3384
3385 * linux-cris-low.c (cris_get_pc): Remove void arg.
3386
774ee6d2
AR
33872015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3388
3389 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3390 variable name.
3391
833dcd29
AR
33922015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3393
3394 * inferiors.c (thread_pid_matches_callback): New function.
3395 (find_thread_process): New function.
3396 (remove_thread): Reset current_thread.
3397 (remove_process): Assert threads have been removed first.
3398
8d689ee5
YQ
33992015-10-15 Yao Qi <yao.qi@linaro.org>
3400
3401 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3402 if it is 3.
3403 (aarch64_remove_point): Likewise.
3404 * regcache.c (regcache_register_size): New function.
3405
1c2e1515
YQ
34062015-10-12 Yao Qi <yao.qi@linaro.org>
3407
3408 * linux-aarch64-low.c: Update all callers as emit_load_store
3409 is renamed to aarch64_emit_load_store.
3410
e1c587c3
YQ
34112015-10-12 Yao Qi <yao.qi@linaro.org>
3412
3413 * linux-aarch64-low.c: Update all callers of function renaming
3414 from emit_insn to aarch64_emit_insn.
3415
b6542f81
YQ
34162015-10-12 Yao Qi <yao.qi@linaro.org>
3417
3418 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3419 arch/aarch64-insn.h.
3420 (struct aarch64_memory_operand): Likewise.
3421 (ENCODE): Likewise.
3422 (emit_insn): Move to arch/aarch64-insn.c.
3423 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3424 (emit_load_store): Move to arch/aarch64-insn.c.
3425 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3426 (can_encode_int32): Remove.
3427
246994ce
YQ
34282015-10-12 Yao Qi <yao.qi@linaro.org>
3429
3430 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3431 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3432 (aarch64_relocate_instruction): Likewise.
3433 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3434 (struct aarch64_insn_visitor): Likewise.
3435
0badd99f
YQ
34362015-10-12 Yao Qi <yao.qi@linaro.org>
3437
3438 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3439 (struct aarch64_insn_visitor): New.
3440 (struct aarch64_insn_relocation_data): New.
3441 (aarch64_ftrace_insn_reloc_b): New function.
3442 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3443 (aarch64_ftrace_insn_reloc_cb): Likewise.
3444 (aarch64_ftrace_insn_reloc_tb): Likewise.
3445 (aarch64_ftrace_insn_reloc_adr): Likewise.
3446 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3447 (aarch64_ftrace_insn_reloc_others): Likewise.
3448 (visitor): New.
3449 (aarch64_relocate_instruction): Use visitor.
3450
dfaffe9d
YQ
34512015-10-12 Yao Qi <yao.qi@linaro.org>
3452
3453 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3454 int. Add argument buf.
3455 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3456 aarch64_relocate_instruction.
3457
70b439f0
YQ
34582015-10-12 Yao Qi <yao.qi@linaro.org>
3459
3460 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3461 argument insn. Remove local variable insn. Don't call
3462 target_read_uint32.
3463 (aarch64_install_fast_tracepoint_jump_pad): Call
3464 target_read_uint32.
3465
7781c06f
YQ
34662015-09-30 Yao Qi <yao.qi@linaro.org>
3467
3468 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3469 (emit_load_store_pair): Likewise.
3470
9a3c8263
SM
34712015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3472
3473 * dll.c (match_dll): Add cast(s).
3474 (unloaded_dll): Likewise.
3475 * linux-low.c (second_thread_of_pid_p): Likewise.
3476 (delete_lwp_callback): Likewise.
3477 (count_events_callback): Likewise.
3478 (select_event_lwp_callback): Likewise.
3479 (linux_set_resume_request): Likewise.
3480 * server.c (accumulate_file_name_length): Likewise.
3481 (emit_dll_description): Likewise.
3482 (handle_qxfer_threads_worker): Likewise.
3483 (visit_actioned_threads): Likewise.
3484 * thread-db.c (any_thread_of): Likewise.
3485 * tracepoint.c (same_process_p): Likewise.
3486 (match_blocktype): Likewise.
3487 (build_traceframe_info_xml): Likewise.
3488
224c3ddb
SM
34892015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3490
3491 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3492 assignment.
3493 (gdb_unparse_agent_expr): Likewise.
3494 * hostio.c (require_data): Likewise.
3495 (handle_pread): Likewise.
3496 * linux-low.c (disable_regset): Likewise.
3497 (fetch_register): Likewise.
3498 (store_register): Likewise.
3499 (get_dynamic): Likewise.
3500 (linux_qxfer_libraries_svr4): Likewise.
3501 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3502 (set_fast_tracepoint_jump): Likewise.
3503 (uninsert_fast_tracepoint_jumps_at): Likewise.
3504 (reinsert_fast_tracepoint_jumps_at): Likewise.
3505 (validate_inserted_breakpoint): Likewise.
3506 (clone_agent_expr): Likewise.
3507 * regcache.c (init_register_cache): Likewise.
3508 * remote-utils.c (putpkt_binary_1): Likewise.
3509 (decode_M_packet): Likewise.
3510 (decode_X_packet): Likewise.
3511 (look_up_one_symbol): Likewise.
3512 (relocate_instruction): Likewise.
3513 (monitor_output): Likewise.
3514 * server.c (handle_search_memory): Likewise.
3515 (handle_qxfer_exec_file): Likewise.
3516 (handle_qxfer_libraries): Likewise.
3517 (handle_qxfer): Likewise.
3518 (handle_query): Likewise.
3519 (handle_v_cont): Likewise.
3520 (handle_v_run): Likewise.
3521 (captured_main): Likewise.
3522 * target.c (write_inferior_memory): Likewise.
3523 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3524 * tracepoint.c (init_trace_buffer): Likewise.
3525 (add_tracepoint_action): Likewise.
3526 (add_traceframe): Likewise.
3527 (add_traceframe_block): Likewise.
3528 (cmd_qtdpsrc): Likewise.
3529 (cmd_qtdv): Likewise.
3530 (cmd_qtstatus): Likewise.
3531 (response_source): Likewise.
3532 (response_tsv): Likewise.
3533 (cmd_qtnotes): Likewise.
3534 (gdb_collect): Likewise.
3535 (initialize_tracepoint): Likewise.
3536
afbe19f8
PL
35372015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3538
3539 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3540 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3541 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3542 <NOP>: New.
3543 (enum aarch64_condition_codes): New enum.
3544 (w0): New static global.
3545 (fp): Likewise.
3546 (lr): Likewise.
3547 (struct aarch64_memory_operand) <type>: New
3548 MEMORY_OPERAND_POSTINDEX type.
3549 (postindex_memory_operand): New helper function.
3550 (emit_ret): New function.
3551 (emit_load_store_pair): New function, factored out of emit_stp
3552 with support for MEMORY_OPERAND_POSTINDEX.
3553 (emit_stp): Rewrite using emit_load_store_pair.
3554 (emit_ldp): New function.
3555 (emit_load_store): Likewise.
3556 (emit_ldr): Mention post-index instruction in comment.
3557 (emit_ldrh): New function.
3558 (emit_ldrb): New function.
3559 (emit_ldrsw): Mention post-index instruction in comment.
3560 (emit_str): Likewise.
3561 (emit_subs): New function.
3562 (emit_cmp): Likewise.
3563 (emit_and): Likewise.
3564 (emit_orr): Likewise.
3565 (emit_orn): Likewise.
3566 (emit_eor): Likewise.
3567 (emit_mvn): Likewise.
3568 (emit_lslv): Likewise.
3569 (emit_lsrv): Likewise.
3570 (emit_asrv): Likewise.
3571 (emit_mul): Likewise.
3572 (emit_sbfm): Likewise.
3573 (emit_sbfx): Likewise.
3574 (emit_ubfm): Likewise.
3575 (emit_ubfx): Likewise.
3576 (emit_csinc): Likewise.
3577 (emit_cset): Likewise.
3578 (emit_nop): Likewise.
3579 (emit_ops_insns): New helper function.
3580 (emit_pop): Likewise.
3581 (emit_push): Likewise.
3582 (aarch64_emit_prologue): New function.
3583 (aarch64_emit_epilogue): Likewise.
3584 (aarch64_emit_add): Likewise.
3585 (aarch64_emit_sub): Likewise.
3586 (aarch64_emit_mul): Likewise.
3587 (aarch64_emit_lsh): Likewise.
3588 (aarch64_emit_rsh_signed): Likewise.
3589 (aarch64_emit_rsh_unsigned): Likewise.
3590 (aarch64_emit_ext): Likewise.
3591 (aarch64_emit_log_not): Likewise.
3592 (aarch64_emit_bit_and): Likewise.
3593 (aarch64_emit_bit_or): Likewise.
3594 (aarch64_emit_bit_xor): Likewise.
3595 (aarch64_emit_bit_not): Likewise.
3596 (aarch64_emit_equal): Likewise.
3597 (aarch64_emit_less_signed): Likewise.
3598 (aarch64_emit_less_unsigned): Likewise.
3599 (aarch64_emit_ref): Likewise.
3600 (aarch64_emit_if_goto): Likewise.
3601 (aarch64_emit_goto): Likewise.
3602 (aarch64_write_goto_address): Likewise.
3603 (aarch64_emit_const): Likewise.
3604 (aarch64_emit_call): Likewise.
3605 (aarch64_emit_reg): Likewise.
3606 (aarch64_emit_pop): Likewise.
3607 (aarch64_emit_stack_flush): Likewise.
3608 (aarch64_emit_zero_ext): Likewise.
3609 (aarch64_emit_swap): Likewise.
3610 (aarch64_emit_stack_adjust): Likewise.
3611 (aarch64_emit_int_call_1): Likewise.
3612 (aarch64_emit_void_call_2): Likewise.
3613 (aarch64_emit_eq_goto): Likewise.
3614 (aarch64_emit_ne_goto): Likewise.
3615 (aarch64_emit_lt_goto): Likewise.
3616 (aarch64_emit_le_goto): Likewise.
3617 (aarch64_emit_gt_goto): Likewise.
3618 (aarch64_emit_ge_got): Likewise.
3619 (aarch64_emit_ops_impl): New static global variable.
3620 (aarch64_emit_ops): New target function, return
3621 &aarch64_emit_ops_impl.
3622 (struct linux_target_ops): Install it.
3623
bb903df0
PL
36242015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3625
3626 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3627 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3628 aarch64-ipa.o.
3629 * linux-aarch64-ipa.c: New file.
3630 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3631 and endian.h.
3632 (aarch64_get_thread_area): New target method.
3633 (extract_signed_bitfield): New helper function.
3634 (aarch64_decode_ldr_literal): New function.
3635 (enum aarch64_opcodes): New enum.
3636 (struct aarch64_register): New struct.
3637 (struct aarch64_operand): New struct.
3638 (x0): New static global.
3639 (x1): Likewise.
3640 (x2): Likewise.
3641 (x3): Likewise.
3642 (x4): Likewise.
3643 (w2): Likewise.
3644 (ip0): Likewise.
3645 (sp): Likewise.
3646 (xzr): Likewise.
3647 (aarch64_register): New helper function.
3648 (register_operand): Likewise.
3649 (immediate_operand): Likewise.
3650 (struct aarch64_memory_operand): New struct.
3651 (offset_memory_operand): New helper function.
3652 (preindex_memory_operand): Likewise.
3653 (enum aarch64_system_control_registers): New enum.
3654 (ENCODE): New macro.
3655 (emit_insn): New helper function.
3656 (emit_b): New function.
3657 (emit_bcond): Likewise.
3658 (emit_cb): Likewise.
3659 (emit_tb): Likewise.
3660 (emit_blr): Likewise.
3661 (emit_stp): Likewise.
3662 (emit_ldp_q_offset): Likewise.
3663 (emit_stp_q_offset): Likewise.
3664 (emit_load_store): Likewise.
3665 (emit_ldr): Likewise.
3666 (emit_ldrsw): Likewise.
3667 (emit_str): Likewise.
3668 (emit_ldaxr): Likewise.
3669 (emit_stxr): Likewise.
3670 (emit_stlr): Likewise.
3671 (emit_data_processing_reg): Likewise.
3672 (emit_data_processing): Likewise.
3673 (emit_add): Likewise.
3674 (emit_sub): Likewise.
3675 (emit_mov): Likewise.
3676 (emit_movk): Likewise.
3677 (emit_mov_addr): Likewise.
3678 (emit_mrs): Likewise.
3679 (emit_msr): Likewise.
3680 (emit_sevl): Likewise.
3681 (emit_wfe): Likewise.
3682 (append_insns): Likewise.
3683 (can_encode_int32_in): New helper function.
3684 (aarch64_relocate_instruction): New function.
3685 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3686 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3687 (struct linux_target_ops): Install aarch64_get_thread_area,
3688 aarch64_install_fast_tracepoint_jump_pad and
3689 aarch64_get_min_fast_tracepoint_insn_len.
3690
787749ea
PL
36912015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3692
3693 * Makefile.in (aarch64-insn.o): New rule.
3694 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3695
9812b2e6
YQ
36962015-09-21 Yao Qi <yao.qi@linaro.org>
3697
3698 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3699
18fe412b
YQ
37002015-09-21 Yao Qi <yao.qi@linaro.org>
3701
3702 * tracepoint.c (max_jump_pad_size): Remove.
3703
a0cc84cd
YQ
37042015-09-18 Yao Qi <yao.qi@linaro.org>
3705
3706 * linux-aarch64-low.c: Don't include sys/uio.h.
3707 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3708
d78908cf
WW
37092015-09-16 Wei-cheng Wang <cole945@gmail.com>
3710
3711 * tracepoint.c (eval_result_type): Change prototype.
3712 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3713
d57e0d50
PA
37142015-09-15 Pedro Alves <palves@redhat.com>
3715
3716 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3717 Check whether to report exec events instead of checking whether
3718 multiprocess is enabled.
3719
5a676acc
PA
37202015-09-15 Pedro Alves <palves@redhat.com>
3721
3722 PR remote/18965
3723 * remote-utils.c (prepare_resume_reply): Merge
3724 TARGET_WAITKIND_VFORK_DONE switch case with the
3725 TARGET_WAITKIND_FORKED case.
3726
7c5d0fad
YQ
37272015-09-15 Yao Qi <yao.qi@linaro.org>
3728
3729 * server.c (handle_query): Check string comparison using
3730 "else if" instead of "if".
3731
750ce8d1
YQ
37322015-09-15 Yao Qi <yao.qi@linaro.org>
3733
3734 * server.c (vCont_supported): New global variable.
3735 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3736 matches. Append ";vContSupported+" to own_buf.
3737 (handle_v_requests): Append ";s;S" to own_buf if target supports
3738 hardware single step or vCont_supported is false.
3739 (capture_main): Set vCont_supported to zero.
3740
70b90b91
YQ
37412015-09-15 Yao Qi <yao.qi@linaro.org>
3742
3743 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3744 it to ...
3745 (linux_supports_hardware_single_step): ... New function.
3746 (linux_target_ops): Update.
3747 * lynx-low.c (lynx_target_ops): Set field
3748 supports_hardware_single_step to target_can_do_hardware_single_step.
3749 * nto-low.c (nto_target_ops): Likewise.
3750 * spu-low.c (spu_target_ops): Likewise.
3751 * win32-low.c (win32_target_ops): Likewise.
3752 * target.c (target_can_do_hardware_single_step): New function.
3753 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3754 Remove. <supports_hardware_single_step>: New field.
3755 (target_supports_conditional_breakpoints): Remove.
3756 (target_supports_hardware_single_step): New macro.
3757 (target_can_do_hardware_single_step): Declare.
3758 * server.c (handle_query): Use target_supports_hardware_single_step
3759 instead of target_supports_conditional_breakpoints.
3760
ade90bde
YQ
37612015-09-15 Yao Qi <yao.qi@linaro.org>
3762
3763 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3764 function.
3765 (struct linux_target_ops the_low_target): Install
3766 aarch64_linux_siginfo_fixup.
3767
94585166
DB
37682015-09-11 Don Breazeal <donb@codesourcery.com>
3769 Luis Machado <lgustavo@codesourcery.com>
3770
3771 * linux-low.c (linux_mourn): Static declaration.
3772 (linux_arch_setup): Move in front of
3773 handle_extended_wait.
3774 (linux_arch_setup_thread): New function.
3775 (handle_extended_wait): Handle exec events. Call
3776 linux_arch_setup_thread. Make event_lwp argument a
3777 pointer-to-a-pointer.
3778 (check_zombie_leaders): Do not check stopped threads.
3779 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3780 (linux_low_filter_event): Add lwp and thread for exec'ing
3781 non-leader thread if leader thread has been deleted.
3782 Refactor code into linux_arch_setup_thread and call it.
3783 Pass child lwp pointer by reference to handle_extended_wait.
3784 (linux_wait_for_event_filtered): Update comment.
3785 (linux_wait_1): Prevent clobbering exec event status.
3786 (linux_supports_exec_events): New function.
3787 (linux_target_ops) <supports_exec_events>: Initialize new member.
3788 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3789 new member.
3790 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3791 * server.c (report_exec_events): New global variable.
3792 (handle_query): Handle qSupported query for exec-events feature.
3793 (captured_main): Initialize report_exec_events.
3794 * server.h (report_exec_events): Declare new global variable.
3795 * target.h (struct target_ops) <supports_exec_events>: New
3796 member.
3797 (target_supports_exec_events): New macro.
3798 * win32-low.c (win32_target_ops) <supports_exec_events>:
3799 Initialize new member.
3800
0568462b
MM
38012015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3802
3803 * linux-low.c (linux_low_enable_btrace): Remove.
3804 (linux_target_ops): Replace linux_low_enable_btrace with
3805 linux_enable_btrace.
3806
39edd165
YQ
38072015-09-03 Yao Qi <yao.qi@linaro.org>
3808
3809 * linux-aarch64-low.c (aarch64_insert_point): Call
3810 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3811 returns true.
3812
1db33b5a
UW
38132015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3814
3815 * linux-low.c (check_stopped_by_breakpoint): Use
3816 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3817
ab290430
PA
38182015-08-27 Pedro Alves <palves@redhat.com>
3819
3820 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3821
8d749320
SM
38222015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3823
6711b7f8
SM
3824 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3825 the XNEW-family equivalent.
8d749320
SM
3826 (compile_bytecodes): Likewise.
3827 * dll.c (loaded_dll): Likewise.
3828 * event-loop.c (append_callback_event): Likewise.
3829 (create_file_handler): Likewise.
3830 (create_file_event): Likewise.
3831 * hostio.c (handle_open): Likewise.
3832 * inferiors.c (add_thread): Likewise.
3833 (add_process): Likewise.
3834 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3835 * linux-arm-low.c (arm_new_process): Likewise.
3836 (arm_new_thread): Likewise.
3837 * linux-low.c (add_to_pid_list): Likewise.
3838 (linux_add_process): Likewise.
3839 (handle_extended_wait): Likewise.
3840 (add_lwp): Likewise.
3841 (enqueue_one_deferred_signal): Likewise.
3842 (enqueue_pending_signal): Likewise.
3843 (linux_resume_one_lwp_throw): Likewise.
3844 (linux_resume_one_thread): Likewise.
3845 (linux_read_memory): Likewise.
3846 (linux_write_memory): Likewise.
3847 * linux-mips-low.c (mips_linux_new_process): Likewise.
3848 (mips_linux_new_thread): Likewise.
3849 (mips_add_watchpoint): Likewise.
3850 * linux-x86-low.c (initialize_low_arch): Likewise.
3851 * lynx-low.c (lynx_add_process): Likewise.
3852 * mem-break.c (set_raw_breakpoint_at): Likewise.
3853 (set_breakpoint): Likewise.
3854 (add_condition_to_breakpoint): Likewise.
3855 (add_commands_to_breakpoint): Likewise.
3856 (clone_agent_expr): Likewise.
3857 (clone_one_breakpoint): Likewise.
3858 * regcache.c (new_register_cache): Likewise.
3859 * remote-utils.c (look_up_one_symbol): Likewise.
3860 * server.c (queue_stop_reply): Likewise.
3861 (start_inferior): Likewise.
3862 (queue_stop_reply_callback): Likewise.
3863 (handle_target_event): Likewise.
3864 * spu-low.c (fetch_ppc_memory): Likewise.
3865 (store_ppc_memory): Likewise.
3866 * target.c (set_target_ops): Likewise.
3867 * thread-db.c (thread_db_load_search): Likewise.
3868 (try_thread_db_load_1): Likewise.
3869 * tracepoint.c (add_tracepoint): Likewise.
3870 (add_tracepoint_action): Likewise.
3871 (create_trace_state_variable): Likewise.
3872 (cmd_qtdpsrc): Likewise.
3873 (cmd_qtro): Likewise.
3874 (add_while_stepping_state): Likewise.
3875 * win32-low.c (child_add_thread): Likewise.
3876 (get_image_name): Likewise.
3877
ed8b7b42
YQ
38782015-08-25 Yao Qi <yao.qi@linaro.org>
3879
3880 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3881
db3cb7cb
YQ
38822015-08-25 Yao Qi <yao.qi@linaro.org>
3883
3884 * Makefile.in (aarch64-linux.o): New rule.
3885 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3886 srv_tgtobj.
3887 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3888 (aarch64_init_debug_reg_state): Make it extern.
3889 (aarch64_linux_prepare_to_resume): Remove.
3890
f6011a1c
YQ
38912015-08-25 Yao Qi <yao.qi@linaro.org>
3892
3893 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3894 lwp_arch_private_info and ptid_of_lwp.
3895
88e2cf7e
YQ
38962015-08-25 Yao Qi <yao.qi@linaro.org>
3897
3898 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3899 Find proc_info by find_process_pid. All callers updated.
3900
5e35436e
YQ
39012015-08-25 Yao Qi <yao.qi@linaro.org>
3902
3903 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3904 Remove.
3905 (debug_reg_change_callback): Remove.
3906 (aarch64_notify_debug_reg_change): Remove.
3907
4a8a7965
YQ
39082015-08-25 Yao Qi <yao.qi@linaro.org>
3909
3910 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3911 Call current_lwp_ptid.
3912
32a271ee
YQ
39132015-08-25 Yao Qi <yao.qi@linaro.org>
3914
3915 * linux-aarch64-low.c (debug_reg_change_callback): Use
3916 debug_printf.
3917
0d51c8d7
YQ
39182015-08-25 Yao Qi <yao.qi@linaro.org>
3919
3920 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3921
31a43dd5
YQ
39222015-08-25 Yao Qi <yao.qi@linaro.org>
3923
3924 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3925
8ee52567
YQ
39262015-08-25 Yao Qi <yao.qi@linaro.org>
3927
3928 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3929 the code.
3930
ff3f0f45
YQ
39312015-08-25 Yao Qi <yao.qi@linaro.org>
3932
3933 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3934 Remove.
3935 (debug_reg_change_callback): Remove argument entry and add argument
3936 lwp. Remove local variable thread. Don't print thread id in the
3937 debugging output. Don't check whether pid of thread equals to pid.
3938 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3939 iterate_over_lwps instead find_inferior.
3940
3d40fbb5
PA
39412015-08-24 Pedro Alves <palves@redhat.com>
3942
3943 * inferiors.c (get_first_process): New function.
3944 * inferiors.h (get_first_process): New declaration.
3945 * remote-utils.c (read_ptid): Default to the first process in the
3946 list, instead of to the current thread's process.
3947
438e1e42
PA
39482015-08-24 Pedro Alves <palves@redhat.com>
3949
3950 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3951 * event-loop.c: Likewise.
3952 * remote-utils.c: Likewise.
3953 * tracepoint.c: Likewise.
3954
a8c6d4fc
PA
39552015-08-24 Pedro Alves <palves@redhat.com>
3956
3957 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3958 ptid_get_lwp.
3959
99b0bb12
PA
39602015-08-21 Pedro Alves <palves@redhat.com>
3961
3962 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3963 instead of literal 1.
3964
f8904751
PA
39652015-08-21 Pedro Alves <palves@redhat.com>
3966
3967 * tdesc.c (default_description): Explicitly zero-initialize.
3968
465a859e
PA
39692015-08-21 Pedro Alves <palves@redhat.com>
3970
3971 PR gdb/18749
3972 * inferiors.c (remove_thread): Discard any pending stop reply for
3973 this thread.
3974 * server.c (remove_all_on_match_pid): Rename to ...
3975 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3976 instead of a pid.
3977 (discard_queued_stop_replies): Change parameter to a ptid. Now
3978 extern.
3979 (handle_v_kill, kill_inferior_callback, captured_main)
3980 (process_serial_event): Adjust.
3981 * server.h (discard_queued_stop_replies): Declare.
3982
f0db101d
PA
39832015-08-21 Pedro Alves <palves@redhat.com>
3984
3985 * linux-low.c (wait_for_sigstop): Always switch to no thread
3986 selected if the previously current thread dies.
3987 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3988 process instead of the current thread's.
3989 * remote-utils.c (input_interrupt): Don't check if there's no
3990 current thread.
3991 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3992 current thread to the general thread fails, error out.
3993 (handle_qxfer_auxv, handle_qxfer_libraries)
3994 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3995 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3996 (handle_query): Check if there's a thread selected instead of
3997 checking whether there's any thread in the thread list.
3998 (handle_qxfer_threads, handle_qxfer_btrace)
3999 (handle_qxfer_btrace_conf): Don't error out early if there's no
4000 thread in the thread list.
4001 (handle_v_cont, myresume): Don't set the current thread to the
4002 continue thread.
4003 (process_serial_event) <Hg handling>: Also set thread_id if the
4004 previous general thread is still alive.
4005 (process_serial_event) <g/G handling>: If setting the current
4006 thread to the general thread fails, error out.
4007 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4008 thread's lwp instead of the current thread's.
4009 * target.c (set_desired_thread): If the desired thread was not
4010 found, leave the current thread pointing to NULL. Return an int
4011 (boolean) indicating success.
4012 * target.h (set_desired_thread): Change return type to int.
4013
40045d91
MF
40142015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4015
4016 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4017 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4018 #includes.
4019 (ps_get_thread_area): New function.
4020
45face3b
GB
40212015-08-19 Gary Benson <gbenson@redhat.com>
4022
4023 * hostio.c (handle_pread): Do not attempt to read more data
4024 than hostio_reply_with_data can fit in a packet.
4025
16d5f642
JB
40262015-08-18 Joel Brobecker <brobecker@adacore.com>
4027
4028 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4029
a738da3a
MF
40302015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4031
4032 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4033
33ebda9d
PA
40342015-08-06 Pedro Alves <palves@redhat.com>
4035
4036 * tracepoint.c (expr_eval_result): Now an int.
4037
a44892be
PA
40382015-08-06 Pedro Alves <palves@redhat.com>
4039
4040 * gdbthread.h (struct regcache): Forward declare.
4041 (struct thread_info) <regcache_data>: Now a struct regcache
4042 pointer.
4043 * inferiors.c (inferior_regcache_data)
4044 (set_inferior_regcache_data): Now work with struct regcache
4045 pointers.
4046 * inferiors.h (struct regcache): Forward declare.
4047 (inferior_regcache_data, set_inferior_regcache_data): Now work
4048 with struct regcache pointers.
4049 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4050 (free_register_cache_thread): Remove struct regcache pointer
4051 casts.
4052
608a1e46
PA
40532015-08-06 Pedro Alves <palves@redhat.com>
4054
4055 * server.c (captured_main): On error, print the exception message
4056 to stderr, and if run_once is set, throw a quit.
4057
f0ce0d3a
PA
40582015-08-06 Pedro Alves <palves@redhat.com>
4059
4060 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4061 the current thread.
4062
bf47e248
PA
40632015-08-06 Pedro Alves <palves@redhat.com>
4064
4065 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4066 reading beyond the passed in buffer length.
4067
b6b9ffcc
PL
40682015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4069
4070 * tracepoint.c (symbol_list) <required>: Remove.
4071
863d01bd
PA
40722015-08-06 Pedro Alves <palves@redhat.com>
4073
4074 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4075 count if stopping and suspending threads.
4076 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4077 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4078 (linux_detach): Complete an ongoing step-over.
4079 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4080 throughout.
4081 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4082 (linux_wait_1): If passing a signal to the inferior after
4083 finishing a step-over, unsuspend and re-resume all lwps. If we
4084 see a single-step event but the thread should be continuing, don't
4085 pass the trap to gdb.
4086 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4087 internal_error instead of gdb_assert.
4088 (enqueue_pending_signal): New function.
4089 (check_ptrace_stopped_lwp_gone): Add debug output.
4090 (start_step_over): Use internal_error instead of gdb_assert.
4091 (complete_ongoing_step_over): New function.
4092 (linux_resume_one_thread): Don't resume a suspended thread.
4093 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4094 it stepping.
4095
00db26fa
PA
40962015-08-06 Pedro Alves <palves@redhat.com>
4097
4098 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4099 (linux_thread_alive): Use lwp_is_marked_dead.
4100 (extended_event_reported): Delete.
4101 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4102 instead of extended_event_reported.
4103 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4104 as well.
4105 (lwp_is_marked_dead): New function.
4106 (lwp_running): Use lwp_is_marked_dead.
4107 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4108 comment.
4109
ad071a30
PA
41102015-08-06 Pedro Alves <palves@redhat.com>
4111
4112 * linux-low.c (linux_wait_1): Move fork event output out of the
4113 !report_to_gdb check. Pass event_child->waitstatus to
4114 target_waitstatus_to_string instead of ourstatus.
4115
524b57e6
YQ
41162015-08-04 Yao Qi <yao.qi@linaro.org>
4117
4118 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4119 if current_thread is 32 bit.
4120
6085d6f6
YQ
41212015-08-04 Yao Qi <yao.qi@linaro.org>
4122
4123 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4124 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4125 * server.c (extended_protocol): Remove "static".
4126 * server.h (extended_protocol): Declare it.
4127
8a7e4587
YQ
41282015-08-04 Yao Qi <yao.qi@linaro.org>
4129
4130 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4131 both aarch64 and aarch32.
4132 (aarch64_set_pc): Likewise.
4133
3b53ae99
YQ
41342015-08-04 Yao Qi <yao.qi@linaro.org>
4135
4136 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4137 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4138 arm-with-neon.xml to srv_xmlfiles.
4139 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4140 (is_64bit_tdesc): New function.
4141 (aarch64_linux_read_description): New function.
4142 (aarch64_arch_setup): Call aarch64_linux_read_description.
4143 (regs_info): Rename to regs_info_aarch64.
4144 (aarch64_regs_info): Return right regs_info.
4145 (initialize_low_arch): Call initialize_low_arch_aarch32.
4146
bd9e6534
YQ
41472015-08-04 Yao Qi <yao.qi@linaro.org>
4148
4149 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4150 * linux-aarch32-low.c: New file.
4151 * linux-aarch32-low.h: New file.
4152 * linux-arm-low.c (arm_fill_gregset): Move it to
4153 linux-aarch32-low.c.
4154 (arm_store_gregset): Likewise.
4155 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4156 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4157 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4158 (regs_info): Rename to regs_info_arm.
4159 (arm_regs_info): Return regs_info_aarch32 if
4160 have_ptrace_getregset is 1 and target description is
4161 arm_with_neon or arm_with_vfpv3.
4162 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4163 Call initialize_low_arch_aarch32 instead.
4164
ded48a5e
YQ
41652015-08-04 Yao Qi <yao.qi@linaro.org>
4166
4167 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4168 * linux-low.c: ... here.
4169 * linux-low.h (have_ptrace_getregset): Declare it.
4170
96e9210f
PA
41712015-08-04 Pedro Alves <palves@redhat.com>
4172
4173 * thread-db.c (struct thread_db): Use new typedefs.
4174 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4175 CHK calls.
4176 (disable_thread_event_reporting): Cast result of dlsym to
4177 destination function pointer type.
4178 (thread_db_mourn): Use td_ta_delete_ftype.
4179
af60a1ef
SL
41802015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4181
4182 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4183 arch variant.
4184 (CDX_BREAKPOINT): Define for R2.
4185 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4186 (the_low_target): Add comments.
4187
e8b41681
YQ
41882015-07-30 Yao Qi <yao.qi@linaro.org>
4189
4190 * linux-arm-low.c (arm_hwcap): Remove it.
4191 (arm_read_description): New local variable arm_hwcap. Don't
4192 set arm_hwcap to zero.
4193
89abb039
YQ
41942015-07-30 Yao Qi <yao.qi@linaro.org>
4195
4196 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4197 Use regcache->tdesc instead.
4198 (arm_store_wmmxregset): Likewise.
4199 (arm_fill_vfpregset): Likewise.
4200 (arm_store_vfpregset): Likewise.
4201
deca266c
YQ
42022015-07-30 Yao Qi <yao.qi@linaro.org>
4203
4204 * linux-arm-low.c: Include arch/arm.h.
4205 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4206 (arm_store_gregset): Likewise.
4207
aa58a496
SM
42082015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4209
4210 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4211 ptrace's 4th parameter.
4212
50904b25
YQ
42132015-07-27 Yao Qi <yao.qi@linaro.org>
4214
4215 * configure.srv (case aarch64*-*-linux*): Don't set
4216 srv_linux_usrregs.
4217
5826e159
PA
42182015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4219
4220 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4221 sys/ptrace.h.
4222 * linux-arm-low.c: Likewise.
4223 * linux-cris-low.c: Likewise.
4224 * linux-crisv32-low.c: Likewise.
4225 * linux-low.c: Likewise.
4226 * linux-m68k-low.c: Likewise.
4227 * linux-mips-low.c: Likewise.
4228 * linux-nios2-low.c: Likewise.
4229 * linux-s390-low.c: Likewise.
4230 * linux-sparc-low.c: Likewise.
4231 * linux-tic6x-low.c: Likewise.
4232 * linux-tile-low.c: Likewise.
4233 * linux-x86-low.c: Likewise.
4234
54019719
PA
42352015-07-24 Pedro Alves <palves@redhat.com>
4236
4237 * config.in: Regenerate.
4238 * configure: Regenerate.
4239
eb7aa561
PA
42402015-07-24 Pedro Alves <palves@redhat.com>
4241
4242 * acinclude.m4: Include ../ptrace.m4.
4243 * configure.ac: Call GDB_AC_PTRACE.
4244 * config.in, configure: Regenerate.
4245
55d7b841
YQ
42462015-07-24 Yao Qi <yao.qi@linaro.org>
4247
4248 * linux-low.c (linux_create_inferior): Remove setting to
4249 proc->priv->new_inferior.
4250 (linux_attach): Likewise.
4251 (linux_low_filter_event): Likewise.
4252 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4253
c06cbd92
YQ
42542015-07-24 Yao Qi <yao.qi@linaro.org>
4255
4256 * linux-low.c (linux_arch_setup): New function.
4257 (linux_low_filter_event): If proc->tdesc is NULL and
4258 proc->attached is true, call the_low_target.arch_setup.
4259 Otherwise, keep status pending, and return.
4260 (linux_resume_one_lwp_throw): Don't call get_pc if
4261 thread->while_stepping isn't NULL. Don't call
4262 get_thread_regcache if proc->tdesc is NULL.
4263 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4264 (linux_target_ops): Install arch_setup.
4265 * server.c (start_inferior): Call the_target->arch_setup.
4266 * target.h (struct target_ops) <arch_setup>: New field.
4267 (target_arch_setup): New marco.
4268 * lynx-low.c (lynx_target_ops): Update.
4269 * nto-low.c (nto_target_ops): Update.
4270 * spu-low.c (spu_target_ops): Update.
4271 * win32-low.c (win32_target_ops): Update.
4272
5ae3ebba
YQ
42732015-07-24 Yao Qi <yao.qi@linaro.org>
4274
4275 * linux-low.c (linux_add_process): Don't set
4276 proc->priv->new_inferior.
4277 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4278 (linux_attach): Likewise.
4279
eb97750b
YQ
42802015-07-24 Yao Qi <yao.qi@linaro.org>
4281
4282 * server.c (start_inferior): Code refactor.
4283
51aee833
YQ
42842015-07-24 Yao Qi <yao.qi@linaro.org>
4285
4286 * server.c (process_serial_event): Set general_thread.
4287
af1b22f3
YQ
42882015-07-21 Yao Qi <yao.qi@linaro.org>
4289
4290 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4291 aarch64_linux_get_debug_reg_capacity.
4292
554717a3
YQ
42932015-07-17 Yao Qi <yao.qi@linaro.org>
4294
4295 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4296 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4297 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4298 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4299 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4300 (AARCH64_HWP_ALIGNMENT): Likewise.
4301 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4302 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4303 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4304 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4305 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4306 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4307 (struct aarch64_debug_reg_state): Likewise.
4308 (struct arch_lwp_info): Likewise.
4309 (aarch64_align_watchpoint): Likewise.
4310 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4311 (aarch64_watchpoint_length): Likewise.
4312 (aarch64_point_encode_ctrl_reg): Likewise
4313 (aarch64_point_is_aligned): Likewise.
4314 (aarch64_align_watchpoint): Likewise.
4315 (aarch64_linux_set_debug_regs):
4316 (aarch64_dr_state_insert_one_point): Likewise.
4317 (aarch64_dr_state_remove_one_point): Likewise.
4318 (aarch64_handle_breakpoint): Likewise.
4319 (aarch64_handle_aligned_watchpoint): Likewise.
4320 (aarch64_handle_unaligned_watchpoint): Likewise.
4321 (aarch64_handle_watchpoint): Likewise.
4322
c67ca4de
YQ
43232015-07-17 Yao Qi <yao.qi@linaro.org>
4324
4325 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4326 and don't aarch64_get_debug_reg_state. All callers update.
4327 (aarch64_handle_aligned_watchpoint): Likewise.
4328 (aarch64_handle_unaligned_watchpoint): Likewise.
4329 (aarch64_handle_watchpoint): Likewise.
4330 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4331 (aarch64_remove_point): Likewise.
4332
25abf979
YQ
43332015-07-17 Yao Qi <yao.qi@linaro.org>
4334
4335 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4336 debug_printf.
4337 (aarch64_handle_unaligned_watchpoint): Likewise.
4338
db1ff28b
JK
43392015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4340
4341 Revert the previous 3 commits:
4342 Move gdb_regex* to common/
4343 Move linux_find_memory_regions_full & co.
4344 gdbserver build-id attribute generator
4345
700ca40f
JK
43462015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4347 Jan Kratochvil <jan.kratochvil@redhat.com>
4348
4349 gdbserver build-id attribute generator.
4350 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4351 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4352 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4353 (find_phdr): New.
4354 (get_dynamic): Use find_pdhr to traverse program headers.
4355 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4356 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4357 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4358 (get_hex_build_id): New.
4359 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4360 to reply XML document.
4361
9904185c
JK
43622015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4363 Jan Kratochvil <jan.kratochvil@redhat.com>
4364
4365 * target.c: Include target/target-utils.h and fcntl.h.
4366 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4367 (target_fileio_read_stralloc): New functions.
4368
6e5b4429
JK
43692015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4370
4371 * Makefile.in (OBS): Add gdb_regex.o.
4372 (gdb_regex.o): New.
4373 * config.in: Rebuilt.
4374 * configure: Rebuilt.
4375
ddc98fbf
JK
43762015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4377 Jan Kratochvil <jan.kratochvil@redhat.com>
4378
4379 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4380 * Makefile.in (OBS): Add target-utils.o.
4381 (linux-maps.o, target-utils.o): New.
4382 * configure.srv (srv_linux_obj): Add linux-maps.o.
4383
e57bb7a0
PL
43842015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4385
4386 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4387 function, return 1.
4388 (the_low_target): Install it.
4389
586b02a9
PA
43902015-07-14 Pedro Alves <palves@redhat.com>
4391
4392 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4393 Instead, ignore ECHILD, and throw an error for other errnos.
4394
58c1b36c
PA
43952015-07-10 Pedro Alves <palves@redhat.com>
4396
4397 * event-loop.c (struct callback_event) <data>: Change type to
4398 gdb_client_data instance instead of gdb_client_data pointer.
4399 (append_callback_event): Adjust.
4400
421530db
PL
44012015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4402
4403 * linux-aarch64-low.c: Add comments for each linux_target_ops
4404 method. Remove comments already covered in target_ops and
4405 linux_target_ops definitions.
4406 (the_low_target): Add comments for each unimplemented method.
4407
c2d65f38
YQ
44082015-07-09 Yao Qi <yao.qi@linaro.org>
4409
4410 * linux-aarch64-low.c (aarch64_regmap): Remove.
4411 (aarch64_usrregs_info): Remove.
4412 (regs_info): Set field usrregs to NULL.
4413
b20a6524
MM
44142015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4415
4416 * linux-low.c: Include "rsp-low.h"
4417 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4418 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4419 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4420 (handle_btrace_enable_pt): New.
4421 (handle_btrace_general_set): Support "pt".
4422 (handle_btrace_conf_general_set): Support "pt:size".
4423
96c97461
PL
44242015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4425
4426 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4427 Z_PACKET_SW_BP.
4428
37d66942
PL
44292015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4430
4431 * linux-aarch64-low.c: Remove comment about endianness.
4432 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4433 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4434 memcmp.
4435
dc06243f
GB
44362015-06-24 Gary Benson <gbenson@redhat.com>
4437
4438 * linux-i386-ipa.c (stdint.h): Do not include.
4439 * lynx-i386-low.c (stdint.h): Likewise.
4440 * lynx-ppc-low.c (stdint.h): Likewise.
4441 * mem-break.c (stdint.h): Likewise.
4442 * thread-db.c (stdint.h): Likewise.
4443 * tracepoint.c (stdint.h): Likewise.
4444 * win32-low.c (stdint.h): Likewise.
4445
124e13d9
SM
44462015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4447
4448 * server.c (write_qxfer_response): Update call to
4449 remote_escape_output.
4450
909c2cda
JK
44512015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4452 Jan Kratochvil <jan.kratochvil@redhat.com>
4453
4454 Merge multiple hex conversions.
4455 * gdbreplay.c (tohex): Rename to 'fromhex'.
4456 (logchar): Use fromhex.
4457
24c05f46
JK
44582015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4459
4460 * server.c (handle_qxfer_libraries): Set `version' attribute for
4461 <library-list>.
4462
14d2069a
GB
44632015-06-10 Gary Benson <gbenson@redhat.com>
4464
4465 * target.h (struct target_ops) <multifs_open>: New field.
4466 <multifs_unlink>: Likewise.
4467 <multifs_readlink>: Likewise.
4468 * linux-low.c (nat/linux-namespaces.h): New include.
4469 (linux_target_ops): Initialize the_target->multifs_open,
4470 the_target->multifs_unlink and the_target->multifs_readlink.
4471 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4472 * hostio.c (hostio_fs_pid): New static variable.
4473 (hostio_handle_new_gdb_connection): New function.
4474 (handle_setfs): Likewise.
4475 (handle_open): Use the_target->multifs_open as appropriate.
4476 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4477 (handle_readlink): Use the_target->multifs_readlink as
4478 appropriate.
4479 (handle_vFile): Handle vFile:setfs packets.
4480 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4481 after target_handle_new_gdb_connection.
4482
4b8b5e72
GB
44832015-06-10 Gary Benson <gbenson@redhat.com>
4484
4485 * configure.ac (AC_CHECK_FUNCS): Add setns.
4486 * config.in: Regenerate.
4487 * configure: Likewise.
4488 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4489 (linux-namespaces.o): New rule.
4490 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4491
3ac2e371
GB
44922015-06-09 Gary Benson <gbenson@redhat.com>
4493
4494 * hostio.c (handle_open): Process mode argument with
4495 fileio_to_host_mode.
4496
ca9b78ce
YQ
44972015-06-01 Yao Qi <yao.qi@linaro.org>
4498
4499 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4500 * linux-x86-low.c: Likewise.
4501
bfacd19d
DB
45022015-05-28 Don Breazeal <donb@codesourcery.com>
4503
4504 * linux-low.c (handle_extended_wait): Initialize
4505 thread_info.last_resume_kind for new fork children.
4506
452003ef
PA
45072015-05-15 Pedro Alves <palves@redhat.com>
4508
4509 * target.h (target_handle_new_gdb_connection): Rewrite using if
4510 wrapped in do/while.
4511
1041a03c
JB
45122015-05-14 Joel Brobecker <brobecker@adacore.com>
4513
4514 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4515 * configure, config.in: Regenerate.
4516 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4517 Declare typedef.
4518
c269dbdb
DB
45192015-05-12 Don Breazeal <donb@codesourcery.com>
4520
4521 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4522 PTRACE_EVENT_VFORK_DONE.
4523 (linux_low_ptrace_options, extended_event_reported): Add vfork
4524 events.
4525 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4526 and "vforkdone" for RSP 'T' Stop Reply Packet.
4527 * server.h (report_vfork_events): Declare
4528 global variable.
4529
3a8a0396
DB
45302015-05-12 Don Breazeal <donb@codesourcery.com>
4531
4532 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4533 (the_low_target) <new_fork>: Initialize new member.
4534 * linux-arm-low.c (arm_new_fork): New function.
4535 (the_low_target) <new_fork>: Initialize new member.
4536 * linux-low.c (handle_extended_wait): Call new target function
4537 new_fork.
4538 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4539 * linux-mips-low.c (mips_add_watchpoint): New function
4540 extracted from mips_insert_point.
4541 (the_low_target) <new_fork>: Initialize new member.
4542 (mips_linux_new_fork): New function.
4543 (mips_insert_point): Call mips_add_watchpoint.
4544 * linux-x86-low.c (x86_linux_new_fork): New function.
4545 (the_low_target) <new_fork>: Initialize new member.
4546
de0d863e
DB
45472015-05-12 Don Breazeal <donb@codesourcery.com>
4548
4549 * linux-low.c (handle_extended_wait): Implement return value,
4550 rename argument 'event_child' to 'event_lwp', handle
4551 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4552 (linux_low_ptrace_options): New function.
4553 (linux_low_filter_event): Call linux_low_ptrace_options,
4554 use different argument fo linux_enable_event_reporting,
4555 use return value from handle_extended_wait.
4556 (extended_event_reported): New function.
4557 (linux_wait_1): Call extended_event_reported and set
4558 status to report fork events.
4559 (linux_write_memory): Add pid to debug message.
4560 (reset_lwp_ptrace_options_callback): New function.
4561 (linux_handle_new_gdb_connection): New function.
4562 (linux_target_ops): Initialize new structure member.
4563 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4564 * lynx-low.c: Initialize new structure member.
4565 * remote-utils.c (prepare_resume_reply): Implement stop reason
4566 "fork" for "T" stop message.
4567 * server.c (handle_query): Call handle_new_gdb_connection.
4568 * server.h (report_fork_events): Declare global flag.
4569 * target.h (struct target_ops) <handle_new_gdb_connection>:
4570 New member.
4571 (target_handle_new_gdb_connection): New macro.
4572 * win32-low.c: Initialize new structure member.
4573
ddcbc397
DB
45742015-05-12 Don Breazeal <donb@codesourcery.com>
4575
4576 * mem-break.c (APPEND_TO_LIST): Define macro.
4577 (clone_agent_expr): New function.
4578 (clone_one_breakpoint): New function.
4579 (clone_all_breakpoints): New function.
4580 * mem-break.h: Declare new functions.
4581
89245bc0
DB
45822015-05-12 Don Breazeal <donb@codesourcery.com>
4583
4584 * linux-low.c (linux_supports_fork_events): New function.
4585 (linux_supports_vfork_events): New function.
4586 (linux_target_ops): Initialize new structure members.
4587 (initialize_low): Call linux_check_ptrace_features.
4588 * lynx-low.c (lynx_target_ops): Initialize new structure
4589 members.
4590 * server.c (report_fork_events, report_vfork_events):
4591 New global flags.
4592 (handle_query): Add new features to qSupported packet and
4593 response.
4594 (captured_main): Initialize new global variables.
4595 * target.h (struct target_ops) <supports_fork_events>:
4596 New member.
4597 <supports_vfork_events>: New member.
4598 (target_supports_fork_events): New macro.
4599 (target_supports_vfork_events): New macro.
4600 * win32-low.c (win32_target_ops): Initialize new structure
4601 members.
4602
835205d0
GB
46032015-05-12 Gary Benson <gbenson@redhat.com>
4604
4605 * server.c (handle_qxfer_exec_file): Use current process
4606 if annex is empty.
4607
21e94bd9
SL
46082015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4609
4610 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4611 Remove HAVE_PTRACE_GETREGS conditionals.
4612 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4613 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4614
45614f15
YQ
46152015-05-08 Yao Qi <yao.qi@linaro.org>
4616
4617 * linux-low.c (linux_supports_conditional_breakpoints): New
4618 function.
4619 (linux_target_ops): Install new target method.
4620 * lynx-low.c (lynx_target_ops): Install NULL hook for
4621 supports_conditional_breakpoints.
4622 * nto-low.c (nto_target_ops): Likewise.
4623 * spu-low.c (spu_target_ops): Likewise.
4624 * win32-low.c (win32_target_ops): Likewise.
4625 * server.c (handle_query): Check
4626 target_supports_conditional_breakpoints.
4627 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4628 New field.
4629 (target_supports_conditional_breakpoints): New macro.
4630
80ad801e
PA
46312015-05-06 Pedro Alves <palves@redhat.com>
4632
4633 PR server/18081
4634 * server.c (start_inferior): If the process exits, mourn it.
4635
819843c7
GB
46362015-04-21 Gary Benson <gbenson@redhat.com>
4637
4638 * hostio.c (fileio_open_flags_to_host): Factored out to
4639 fileio_to_host_openflags in common/fileio.c. Single use
4640 updated.
4641
a2d5a9d7
MF
46422015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4643
4644 * linux-xtensa-low.c (xtensa_fill_gregset)
4645 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4646 XCHAL_HAVE_LOOP.
4647
deb44829
MF
46482015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4649
4650 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4651 (regs_info): Replace usrregs pointer with NULL.
4652
e57f1de3
GB
46532015-04-17 Gary Benson <gbenson@redhat.com>
4654
4655 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4656 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4657 * server.c (handle_qxfer_exec_file): New function.
4658 (qxfer_packets): Add exec-file entry.
4659 (handle_query): Report qXfer:exec-file:read as supported packet.
4660
62828379
RN
46612015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4662
4663 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4664
b88bb450
GB
46652015-04-09 Gary Benson <gbenson@redhat.com>
4666
4667 * hostio-errno.c (errno_to_fileio_error): Remove function.
4668 Update caller to use remote_fileio_to_fio_error.
4669
c8f4bfdd
YQ
46702015-04-09 Yao Qi <yao.qi@linaro.org>
4671
4672 * linux-low.c (linux_insert_point): Call
4673 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4674 (linux_remove_point): Call remove_memory_breakpoint if type is
4675 raw_bkpt_type_sw.
4676 * linux-x86-low.c (x86_insert_point): Don't call
4677 insert_memory_breakpoint.
4678 (x86_remove_point): Don't call remove_memory_breakpoint.
4679
41f98f02
PA
46802015-04-01 Pedro Alves <palves@redhat.com>
4681 Cleber Rosa <crosa@redhat.com>
4682
4683 * server.c (gdbserver_usage): Reorganize and extend the usage
4684 message.
4685
2bf6fb9d
PA
46862015-03-24 Pedro Alves <palves@redhat.com>
4687
4688 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4689 output. Also dump TRAP_TRACE.
4690 (linux_low_filter_event): In debug output, distinguish a
4691 resume_stop SIGSTOP from a delayed SIGSTOP.
4692
369f6daa
GB
46932015-03-24 Gary Benson <gbenson@redhat.com>
4694
4695 * linux-x86-low.c (x86_linux_new_thread): Moved to
4696 nat/x86-linux.c.
4697 (x86_linux_prepare_to_resume): Likewise.
4698
8e5d4070
GB
46992015-03-24 Gary Benson <gbenson@redhat.com>
4700
4701 * Makefile.in (x86-linux-dregs.o): New rule.
4702 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4703 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4704 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4705 (x86_linux_dr_get): Likewise.
4706 (x86_linux_dr_set): Likewise.
4707 (update_debug_registers_callback): Likewise.
4708 (x86_linux_dr_set_addr): Likewise.
4709 (x86_linux_dr_get_addr): Likewise.
4710 (x86_linux_dr_set_control): Likewise.
4711 (x86_linux_dr_get_control): Likewise.
4712 (x86_linux_dr_get_status): Likewise.
4713 (x86_linux_update_debug_registers): Likewise.
4714
2b95d440
GB
47152015-03-24 Gary Benson <gbenson@redhat.com>
4716
4717 * linux-x86-low.c (x86_linux_update_debug_registers):
4718 New function, factored out from...
4719 (x86_linux_prepare_to_resume): ...this.
4720
14b0bc68
GB
47212015-03-24 Gary Benson <gbenson@redhat.com>
4722
4723 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4724 (x86_linux_dr_set): Likewise.
4725 (update_debug_registers_callback): Likewise.
4726 (x86_linux_dr_set_addr): Likewise.
4727 (x86_linux_dr_get_addr): Likewise.
4728 (x86_linux_dr_set_control): Likewise.
4729 (x86_linux_dr_get_control): Likewise.
4730 (x86_linux_dr_get_status): Likewise.
4731 (x86_linux_prepare_to_resume): Likewise.
4732
5dfe6ca8
GB
47332015-03-24 Gary Benson <gbenson@redhat.com>
4734
4735 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4736 Use perror_with_name. Pass string through gettext.
4737 (x86_linux_dr_set): Likewise.
4738
d33472ad
GB
47392015-03-24 Gary Benson <gbenson@redhat.com>
4740
4741 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4742 (x86_linux_dr_set_addr): ...this.
4743 (x86_dr_low_get_addr): Rename to...
4744 (x86_linux_dr_get_addr): ...this.
4745 (x86_dr_low_set_control): Rename to...
4746 (x86_linux_dr_set_control): ...this.
4747 (x86_dr_low_get_control): Rename to...
4748 (x86_linux_dr_get_control): ...this.
4749 (x86_dr_low_get_status): Rename to...
4750 (x86_linux_dr_get_status): ...this.
4751 (x86_dr_low): Update with new function names.
4752
4b134ca1
GB
47532015-03-24 Gary Benson <gbenson@redhat.com>
4754
4755 * Makefile.in (x86-linux.o): New rule.
4756 * configure.srv: Add x86-linux.o to relevant targets.
4757 * linux-low.c (lwp_set_arch_private_info): New function.
4758 (lwp_arch_private_info): Likewise.
4759 * linux-x86-low.c: Include nat/x86-linux.h.
4760 (arch_lwp_info): Removed structure.
4761 (update_debug_registers_callback):
4762 Use lwp_set_debug_registers_changed.
4763 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4764 and lwp_set_debug_registers_changed.
4765 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4766
34c703da
GB
47672015-03-24 Gary Benson <gbenson@redhat.com>
4768
4769 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4770 * linux-arm-low.c (arm_new_thread): Likewise.
4771 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4772 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4773 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4774 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4775
cff068da
GB
47762015-03-24 Gary Benson <gbenson@redhat.com>
4777
4778 * linux-low.c (ptid_of_lwp): New function.
4779 (lwp_is_stopped): Likewise.
4780 (lwp_stop_reason): Likewise.
4781 * linux-x86-low.c (update_debug_registers_callback):
4782 Use lwp_is_stopped.
4783 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4784 lwp_stop_reason.
4785
b2f7c7e8
GB
47862015-03-24 Gary Benson <gbenson@redhat.com>
4787
4788 * linux-low.h (linux_stop_lwp): Remove declaration.
4789
6d4ee8c6
GB
47902015-03-24 Gary Benson <gbenson@redhat.com>
4791
4792 * linux-low.h: Include nat/linux-nat.h.
4793 * linux-low.c (iterate_over_lwps_args): New structure.
4794 (iterate_over_lwps_filter): New function.
4795 (iterate_over_lwps): Likewise.
4796 * linux-x86-low.c (update_debug_registers_callback):
4797 Update signature to what iterate_over_lwps expects.
4798 Remove PID check that iterate_over_lwps now performs.
4799 (x86_dr_low_set_addr): Use iterate_over_lwps.
4800 (x86_dr_low_set_control): Likewise.
4801
70a0bb6b
GB
48022015-03-24 Gary Benson <gbenson@redhat.com>
4803
4804 * linux-x86-low.c (x86_debug_reg_state): New function.
4805 (x86_linux_prepare_to_resume): Use the above.
4806
7b669087
GB
48072015-03-24 Gary Benson <gbenson@redhat.com>
4808
4809 * linux-low.c (current_lwp_ptid): New function.
4810 * linux-x86-low.c: Include nat/linux-nat.h.
4811 (x86_dr_low_get_addr): Use current_lwp_ptid.
4812 (x86_dr_low_get_control): Likewise.
4813 (x86_dr_low_get_status): Likewise.
4814
eef49a3d
PA
48152015-03-20 Pedro Alves <palves@redhat.com>
4816
4817 * tracepoint.c (cmd_qtstatus): Make "str" const.
4818
b2333d22
PA
48192015-03-20 Pedro Alves <palves@redhat.com>
4820
4821 * server.c (handle_general_set): Make "req_str" const.
4822
23f238d3
PA
48232015-03-19 Pedro Alves <palves@redhat.com>
4824
4825 * linux-low.c (linux_resume_one_lwp): Rename to ...
4826 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4827 instead call perror_with_name.
4828 (check_ptrace_stopped_lwp_gone): New function.
4829 (linux_resume_one_lwp): Reimplement as wrapper around
4830 linux_resume_one_lwp_throw that swallows errors if the LWP is
4831 gone.
4832
91baf43f
PA
48332015-03-19 Pedro Alves <palves@redhat.com>
4834
4835 * linux-low.c (count_events_callback, select_event_lwp_callback):
4836 No longer check whether the thread has resume_stop as last resume
4837 kind.
4838
8bf3b159
PA
48392015-03-19 Pedro Alves <palves@redhat.com>
4840
4841 * linux-low.c (count_events_callback, select_event_lwp_callback):
4842 Use the lwp's status_pending_p field, not the thread's.
4843
b90fc188
PA
48442015-03-19 Pedro Alves <palves@redhat.com>
4845
4846 * linux-low.c (select_event_lwp_callback): Update comments to
4847 no longer mention SIGTRAP.
4848
464b0089
GB
48492015-03-18 Gary Benson <gbenson@redhat.com>
4850
4851 * server.c (handle_query): Do not report vFile:fstat as supported.
4852
aa9e327f
GB
48532015-03-11 Gary Benson <gbenson@redhat.com>
4854
4855 * hostio.c (sys/types.h): New include.
4856 (sys/stat.h): Likewise.
4857 (common-remote-fileio.h): Likewise.
4858 (handle_fstat): New function.
4859 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 4860
791c0056
GB
48612015-03-11 Gary Benson <gbenson@redhat.com>
4862
4863 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4864 struct stat.st_blocks and struct stat.st_blksize.
4865 * configure: Regenerate.
4866 * config.in: Likewise.
4867 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4868 (OBS): Add common-remote-fileio.o.
4869 (common-remote-fileio.o): New rule.
4870
9a9df970
PA
48712015-03-09 Pedro Alves <palves@redhat.com>
4872
4873 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4874 'struct sockaddr' pointer in 'accept' call.
4875
9eb1356e
PA
48762015-03-09 Pedro Alves <palves@redhat.com>
4877
4878 Revert:
4879 2015-03-07 Pedro Alves <palves@redhat.com>
4880 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4881 or <winsock2.h> here. Instead include "gdb_socket.h".
4882 (remote_open): Use union gdb_sockaddr_u.
4883 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4884 or <winsock2.h> here. Instead include "gdb_socket.h".
4885 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4886 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4887 or <sys/un.h>.
4888 (init_named_socket, gdb_agent_helper_thread): Use union
4889 gdb_sockaddr_u.
4890
aac331e4
PA
48912015-03-07 Pedro Alves <palves@redhat.com>
4892
4893 * configure.ac (build_warnings): Move
4894 -Wdeclaration-after-statement to the C-specific set.
4895 * configure: Regenerate.
4896
366c75fc
PA
48972015-03-07 Pedro Alves <palves@redhat.com>
4898
4899 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4900 or <winsock2.h> here. Instead include "gdb_socket.h".
4901 (remote_open): Use union gdb_sockaddr_u.
4902 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4903 or <winsock2.h> here. Instead include "gdb_socket.h".
4904 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4905 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4906 or <sys/un.h>.
4907 (init_named_socket, gdb_agent_helper_thread): Use union
4908 gdb_sockaddr_u.
4909
492d29ea
PA
49102015-03-07 Pedro Alves <palves@redhat.com>
4911
4912 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4913 instead.
4914
60a191ed
YQ
49152015-03-06 Yao Qi <yao.qi@linaro.org>
4916
4917 * linux-aarch64-low.c (aarch64_insert_point): Use
4918 show_debug_regs as a boolean.
4919 (aarch64_remove_point): Likewise.
4920
f5771b1d
PA
49212015-03-05 Pedro Alves <palves@redhat.com>
4922
4923 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4924 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4925 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4926 * nto-low.c (nto_target_ops): Likewise.
4927 * spu-low.c (spu_target_ops): Likewise.
4928 * win32-low.c (win32_target_ops): Likewise.
4929
3e572f71
PA
49302015-03-04 Pedro Alves <palves@redhat.com>
4931
72f4393d 4932 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
4933 Decide whether a breakpoint triggered based on the SIGTRAP's
4934 siginfo.si_code.
72f4393d
L
4935 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4936 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
4937 (linux_low_filter_event): Check for breakpoints before checking
4938 watchpoints.
4939 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4940 siginfo.si_code.
72f4393d
L
4941 (linux_stopped_by_sw_breakpoint)
4942 (linux_supports_stopped_by_sw_breakpoint)
4943 (linux_stopped_by_hw_breakpoint)
4944 (linux_supports_stopped_by_hw_breakpoint): New functions.
4945 (linux_target_ops): Install new target methods.
3e572f71 4946
1ec68e26
PA
49472015-03-04 Pedro Alves <palves@redhat.com>
4948
4949 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4950 * server.c (swbreak_feature, hwbreak_feature): New globals.
4951 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4952 (captured_main): Clear swbreak_feature and hwbreak_feature.
4953 * server.h (swbreak_feature, hwbreak_feature): Declare.
4954 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4955 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4956 supports_stopped_by_hw_breakpoint>: New fields.
4957 (target_supports_stopped_by_sw_breakpoint)
4958 (target_stopped_by_sw_breakpoint)
4959 (target_supports_stopped_by_hw_breakpoint)
4960 (target_stopped_by_hw_breakpoint): Declare.
4961
15c66dd6
PA
49622015-03-04 Pedro Alves <palves@redhat.com>
4963
4964 enum lwp_stop_reason -> enum target_stop_reason
4965 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4966 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4967 (linux_wait_1, stuck_in_jump_pad_callback)
4968 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4969 (linux_stopped_by_watchpoint):
4970 * linux-low.h (enum lwp_stop_reason): Delete.
4971 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4972 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4973
98fc70d6
YQ
49742015-03-04 Yao Qi <yao.qi@linaro.org>
4975
4976 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4977
dd2ac174
GB
49782015-03-03 Gary Benson <gbenson@redhat.com>
4979
4980 * hostio.c (handle_vFile): Fix prefix lengths.
4981
d68e53f4
MM
49822015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4983
4984 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4985 ptr_bits.
4986
bf2d68ab
AA
49872015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4988
4989 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4990 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4991 (clean): Add "rm -f" for above C files.
4992 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4993 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4994 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4995 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4996 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4997 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4998 (init_registers_s390x_vx_linux64)
4999 (init_registers_s390x_tevx_linux64)
5000 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5001 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5002 declarations.
5003 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5004 (s390_store_vxrs_high): New functions.
5005 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5006 NT_S390_VXRS_HIGH.
5007 (s390_arch_setup): Add logic for selecting one of the new target
5008 descriptions. Activate the new vector regsets if applicable.
5009 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5010 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5011 and init_registers_s390x_tevx_linux64.
5012
c966a859
PA
50132015-03-01 Pedro Alves <palves@redhat.com>
5014
5015 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5016 parameter.
5017
4180215b
PA
50182015-02-27 Pedro Alves <palves@redhat.com>
5019
5020 * linux-x86-low.c (u_debugreg_offset): New function.
5021 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5022
749bab01
PA
50232015-02-27 Pedro Alves <palves@redhat.com>
5024
5025 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5026 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5027 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5028 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5029 (ps_lsetfpregs, ps_getpid)
5030 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5031 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5032 (ps_lsetxregs, ps_plog): Declare.
5033
3c14e5a3
PA
50342015-02-27 Pedro Alves <palves@redhat.com>
5035
5036 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5037 IP_AGENT_EXPORT_FUNC.
5038 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5039 IP_AGENT_EXPORT_FUNC.
5040 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5041 (IP_AGENT_EXPORT): Delete.
5042 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5043 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5044 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5045 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5046 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5047 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5048 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5049 (traceframe_read_count, traceframe_write_count)
5050 (traceframes_created, trace_state_variables, get_raw_reg)
5051 (get_trace_state_variable_value, set_trace_state_variable_value)
5052 (ust_loaded, helper_thread_id, cmd_buf): Use
5053 IPA_SYM_EXPORTED_NAME.
5054 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5055 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5056 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5057 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5058 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5059 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5060 EXTERN_C_PUSH/EXTERN_C_POP.
5061 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5062 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5063 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5064 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5065 (traceframe_write_count, traceframe_read_count)
5066 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5067 (about_to_request_buffer_space, get_trace_state_variable_value)
5068 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5069 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5070 EXTERN_C_PUSH/EXTERN_C_POP.
5071 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5072 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5073 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5074 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5075 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5076 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5077 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5078 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5079 Define.
5080 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5081 (IP_AGENT_EXPORT_VAR_DECL): Define.
5082 (tracing): Declare.
5083 (gdb_agent_get_raw_reg): Declare.
5084
fe978cb0
PA
50852015-02-27 Tom Tromey <tromey@redhat.com>
5086 Pedro Alves <palves@redhat.com>
5087
5088 Rename symbols whose names are reserved C++ keywords throughout.
5089
3bc3d82a
PA
50902015-02-27 Pedro Alves <palves@redhat.com>
5091
5092 * Makefile.in (COMPILER): New, get it from autoconf.
5093 (CXX): Get from autoconf instead.
5094 (COMPILE.pre): Use COMPILER.
5095 (CC-LD): Rename to ...
5096 (CC_LD): ... this. Use COMPILER.
5097 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5098 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5099 * acinclude.m4: Include build-with-cxx.m4.
5100 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5101 Disable -Werror by default if building in C++ mode.
5102 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5103 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5104 the C++ compiler. Save/restore CXXFLAGS too.
5105 * configure: Regenerate.
5106
07697489
PA
51072015-02-27 Pedro Alves <palves@redhat.com>
5108
5109 * acinclude.m4: Include libiberty.m4.
5110 * configure.ac: Call libiberty_INIT.
5111 * config.in, configure: Regenerate.
5112
9beb7c4e
PA
51132015-02-26 Pedro Alves <palves@redhat.com>
5114
5115 * linux-low.c (linux_wait_1): When incrementing the PC past a
5116 program breakpoint always use the_low_target.breakpoint_len as
5117 increment, rather than the maximum between that and
5118 the_low_target.decr_pc_after_break.
5119
8090aef2
PA
51202015-02-23 Pedro Alves <palves@redhat.com>
5121
5122 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5123 thread was doing a step-over; always adjust the PC if
5124 we stepped over a permanent breakpoint.
5125 (linux_wait_1): If we stepped over breakpoint that was on top of a
5126 permanent breakpoint, manually advance the PC past it.
5127
bc9540e8
PA
51282015-02-23 Pedro Alves <palves@redhat.com>
5129
5130 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5131 modes.
5132 (x86_fill_gregset, x86_store_gregset): Use it when handling
5133 $orig_eax.
5134
2db9a427
PA
51352015-02-20 Pedro Alves <palves@redhat.com>
5136
5137 * thread-db.c: Include "nat/linux-procfs.h".
5138 (thread_db_init): Skip listing new threads if the kernel supports
5139 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5140
afa8d396
PA
51412015-02-20 Pedro Alves <palves@redhat.com>
5142
5143 * linux-low.c (status_pending_p_callback): Use ptid_match.
5144
c9587f88
AT
51452015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5146
5147 PR breakpoints/16812
5148 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5149 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5150 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5151
b05ec7a5
AT
51522015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5153
5154 PR breakpoints/15956
5155 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5156
d33501a5
MM
51572015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5158
5159 * linux-low.c (linux_low_btrace_conf): Print size.
5160 * server.c (handle_btrace_conf_general_set): New.
5161 (hanle_general_set): Call handle_btrace_conf_general_set.
5162 (handle_query): Report Qbtrace-conf:bts:size as supported.
5163
f4abbc16
MM
51642015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5165
5166 * linux-low.c (linux_low_enable_btrace): Update parameters.
5167 (linux_low_btrace_conf): New.
5168 (linux_target_ops)<to_btrace_conf>: Initialize.
5169 * server.c (current_btrace_conf): New.
5170 (handle_btrace_enable): Rename to ...
5171 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5172 to target_enable_btrace. Update comment. Update users.
5173 (handle_qxfer_btrace_conf): New.
5174 (qxfer_packets): Add btrace-conf entry.
5175 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5176 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5177 (target_ops)<read_btrace_conf>: New.
5178 (target_enable_btrace): Update parameters.
5179 (target_read_btrace_conf): New.
5180
043c3577
MM
51812015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5182
5183 * server.c (handle_btrace_general_set): Remove call to
5184 target_supports_btrace.
5185 (supported_btrace_packets): New.
5186 (handle_query): Call supported_btrace_packets.
5187 * target.h: include btrace-common.h.
5188 (btrace_target_info): Removed.
5189 (supports_btrace, target_supports_btrace): Update parameters.
5190
734b0e4b
MM
51912015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5192
5193 * Makefile.in (SFILES): Add common/btrace-common.c.
5194 (OBS): Add common/btrace-common.o.
5195 (btrace-common.o): Add build rules.
5196 * linux-low: Include btrace-common.h.
5197 (linux_low_read_btrace): Use struct btrace_data. Call
5198 btrace_data_init and btrace_data_fini.
5199
d6c146e9
PA
52002015-02-06 Pedro Alves <palves@redhat.com>
5201
5202 * thread-db.c (find_new_threads_callback): Add debug output.
5203
20ba1ce6
PA
52042015-02-04 Pedro Alves <palves@redhat.com>
5205
5206 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5207 (resume_stopped_resumed_lwps): New function.
5208 (linux_wait_for_event_filtered): Use it.
5209
8cc73a39
SDJ
52102015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5211
5212 * Makefile.in (SFILES): Add linux-personality.c.
5213 (linux-personality.o): New rule.
5214 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5215 list of objects to be built.
5216 * linux-low.c: Include nat/linux-personality.h.
5217 (linux_create_inferior): Remove code to disable address space
5218 randomization (moved to ../nat/linux-personality.c). Create
5219 cleanup to disable address space randomization.
5220
fb23d554
SDJ
52212015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5222
5223 * Makefile.in (posix-strerror.o): New rule.
5224 (mingw-strerror.o): Likewise.
5225 * configure: Regenerated.
5226 * configure.ac: Source file ../common/common.host. Initialize new
5227 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5228
cdf43629
YQ
52292015-01-14 Yao Qi <yao@codesourcery.com>
5230
5231 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5232 (ppc-linux.o): New rule.
5233 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5234 * configure.ac: AC_CHECK_FUNCS(getauxval).
5235 * config.in: Re-generated.
5236 * configure: Re-generated.
5237 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5238 ppc64_64bit_inferior_p
5239
514c5338
YQ
52402015-01-14 Yao Qi <yao@codesourcery.com>
5241
5242 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5243 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5244 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5245 (PT_ORIG_R3, PT_TRAP): Likewise.
5246 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5247 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5248 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5249
3368c1e5
JB
52502015-01-10 Joel Brobecker <brobecker@adacore.com>
5251
5252 * i387-fp.c (i387_cache_to_xsave): In look over
5253 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5254 zmmh_low_space field by use of zmmh_high_space.
5255
582511be
PA
52562015-01-09 Pedro Alves <palves@redhat.com>
5257
5258 * linux-low.c (step_over_bkpt): Move higher up in the file.
5259 (handle_extended_wait): Don't store the stop_pc here.
5260 (get_stop_pc): Adjust comments and rename to ...
5261 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5262 stopped for a software breakpoint or hardware breakpoint.
5263 (thread_still_has_status_pending_p): New function.
5264 (status_pending_p_callback): Use
5265 thread_still_has_status_pending_p. If the event is no longer
5266 interesting, resume the LWP.
5267 (handle_tracepoints): Add assert.
5268 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5269 (wstatus_maybe_breakpoint): New function.
5270 (cancel_breakpoint): Delete function.
5271 (check_stopped_by_watchpoint): New function, factored out from
5272 linux_low_filter_event.
5273 (lp_status_maybe_breakpoint): Delete function.
5274 (linux_low_filter_event): Remove filter_ptid argument.
5275 Leave thread group exits pending here. Store the LWP's stop PC.
5276 Always leave events pending.
5277 (linux_wait_for_event_filtered): Pull all events out of the
5278 kernel, and leave them all pending.
5279 (count_events_callback, select_event_lwp_callback): Consider all
5280 events.
5281 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5282 (select_event_lwp): Only give preference to the stepping LWP in
5283 all-stop mode. Adjust comments.
5284 (ignore_event): New function.
5285 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5286 references to cancel_breakpoints. Adjust to renames. Also give
5287 equal priority to all LWPs that have had events in non-stop mode.
5288 If reporting a software breakpoint event, unadjust the LWP's PC.
5289 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5290 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5291 Adjust.
5292 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5293 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5294 (linux_stopped_by_watchpoint): Adjust.
5295 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5296 * linux-low.h (enum lwp_stop_reason): New.
5297 (struct lwp_info) <stop_pc>: Adjust comment.
5298 <stopped_by_watchpoint>: Delete field.
5299 <stop_reason>: New field.
5300 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5301 * mem-break.c (software_breakpoint_inserted_here)
5302 (hardware_breakpoint_inserted_here): New function.
5303 * mem-break.h (software_breakpoint_inserted_here)
5304 (hardware_breakpoint_inserted_here): Declare.
5305 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5306 (cancel_breakpoints): Delete.
5307 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5308 (upload_fast_traceframes): Remove references to
5309 cancel_breakpoints.
5310
a33e3959
PA
53112015-01-09 Pedro Alves <palves@redhat.com>
5312
5313 * thread-db.c (find_new_threads_callback): Ignore thread if the
5314 kernel thread ID is -1.
5315
8784d563
PA
53162015-01-09 Pedro Alves <palves@redhat.com>
5317
5318 * linux-low.c (linux_attach_fail_reason_string): Move to
5319 nat/linux-ptrace.c, and rename.
5320 (linux_attach_lwp): Update comment.
5321 (attach_proc_task_lwp_callback): New function.
5322 (linux_attach): Adjust to rename and use
5323 linux_proc_attach_tgid_threads.
5324 (linux_attach_fail_reason_string): Delete declaration.
5325
76f2b779
JB
53262015-01-01 Joel Brobecker <brobecker@adacore.com>
5327
5328 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5329 * server.c (gdbserver_version): Likewise.
5330
fafcc06a
SDJ
53312014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5332
5333 * remote-utils.c: Include ctype.h.
5334 (input_interrupt): Explicitly handle the case when the char
5335 received is the NUL byte. Improve the printing of non-ASCII
5336 characters.
5337
beed38b8
JB
53382014-12-16 Joel Brobecker <brobecker@adacore.com>
5339
5340 * linux-low.c (linux_low_filter_event): Update call to
5341 linux_enable_event_reporting following the addition of
5342 a new parameter to that function.
5343
bf330350
CU
53442014-12-16 Catalin Udma <catalin.udma@freescale.com>
5345
5346 PR server/17457
5347 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5348 (AARCH64_FPCR_REGNO): Likewise.
5349 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5350 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5351 (aarch64_store_fpregset): Likewise.
5352
5227d625
JB
53532014-12-15 Joel Brobecker <brobecker@adacore.com>
5354
5355 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5356 Remove FIXME comment about assumption about N.
5357
f93b65a0
JB
53582014-12-13 Joel Brobecker <brobecker@adacore.com>
5359
5360 * configure.ac: If large-file support is disabled in GDBserver,
5361 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5362 * configure: Regenerate.
5363
e5a9158d
AA
53642014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5365
5366 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5367 warning upon ENODATA from ptrace.
5368 * linux-s390-low.c (s390_store_tdb): New.
5369 (s390_regsets): Add regset for NT_S390_TDB.
5370
feea5f36
AA
53712014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5372
5373 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5374 without a fill_function.
5375 * linux-s390-low.c (s390_fill_last_break): Remove.
5376 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5377 (s390_arch_setup): Use regset's size instead of fill_function for
5378 loop end condition.
5379
098dbe61
AA
53802014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5381
5382 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5383 the regset's store function when ptrace returned an error.
5384 * regcache.c (get_thread_regcache): Invalidate register cache
5385 before fetching inferior's registers.
5386
28eef672
AA
53872014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5388
5389 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5390 while-loop as for-loop.
5391 (regsets_store_inferior_registers): Likewise.
5392
bdca27a2
YQ
53932014-11-28 Yao Qi <yao@codesourcery.com>
5394
5395 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5396 * config.in, configure: Re-generate.
5397 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5398 is defined.
5399
9c232dda
YQ
54002014-11-21 Yao Qi <yao@codesourcery.com>
5401
5402 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5403 (AC_CHECK_HEADERS): Remove malloc.h.
5404 * configure: Re-generated.
5405 * config.in: Re-generated.
5406 * server.h: Don't include alloca.h and malloc.h.
5407 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5408 Don't include malloc.h.
5409
43968415
JB
54102014-11-17 Joel Brobecker <brobecker@adacore.com>
5411
5412 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5413 corresponding ERRNO check in same block.
5414
40e91bc7
PA
54152014-11-12 Pedro Alves <palves@redhat.com>
5416
5417 * server.c (cont_thread): Update comment.
5418 (start_inferior, attach_inferior): No longer clear cont_thread.
5419 (handle_v_cont): No longer set cont_thread.
5420 (captured_main): Clear cont_thread each time a GDB connects.
5421
c2c118cf
PA
54222014-11-12 Pedro Alves <palves@redhat.com>
5423
5424 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5425 thread, and don't resume all threads if the Hc thread has exited.
5426
78708b7c
PA
54272014-11-12 Pedro Alves <palves@redhat.com>
5428
5429 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5430 the process group instead of to a specific LWP.
5431
a2abc7de
PA
54322014-10-15 Pedro Alves <palves@redhat.com>
5433
5434 PR server/17487
5435 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5436 parameter.
5437 (arm_set_thread_context): Delete.
5438 (the_low_target): Adjust.
5439 * win32-i386-low.c (debug_registers_changed)
5440 (debug_registers_used): Delete.
5441 (update_debug_registers_callback): New function.
5442 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5443 needing to update their debug registers.
5444 (win32_get_current_dr): New function.
5445 (x86_dr_low_get_addr, x86_dr_low_get_control)
5446 (x86_dr_low_get_status): Fetch the debug register from the thread
5447 record's context.
5448 (i386_initial_stuff): Adjust.
5449 (i386_get_thread_context): Remove current_event parameter. Don't
5450 clear debug_registers_changed nor copy DR values to
5451 debug_reg_state.
5452 (i386_set_thread_context): Delete.
5453 (i386_prepare_to_resume): New function.
5454 (i386_thread_added): Mark the thread as needing to update irs
5455 debug registers.
5456 (the_low_target): Remove i386_set_thread_context and install
5457 i386_prepare_to_resume.
5458 * win32-low.c (win32_get_thread_context): Adjust.
5459 (win32_set_thread_context): Use SetThreadContext
5460 directly.
5461 (win32_prepare_to_resume): New function.
5462 (win32_require_context): New function, factored out from ...
5463 (thread_rec): ... this.
5464 (continue_one_thread): Call win32_prepare_to_resume on each thread
5465 we're about to continue.
5466 (win32_resume): Call win32_prepare_to_resume on the event thread.
5467 * win32-low.h (struct win32_thread_info)
5468 <debug_registers_changed>: New field.
5469 (struct win32_target_ops): Change prototype of set_thread_context,
5470 delete set_thread_context and add prepare_to_resume.
5471 (win32_require_context): New declaration.
5472
a442d071
GB
54732014-10-08 Gary Benson <gbenson@redhat.com>
5474
5475 * server.h: Do not include common-exceptions.h.
5476
6f1947e8
GB
54772014-10-08 Gary Benson <gbenson@redhat.com>
5478
5479 * server.h: Do not include cleanups.h.
5480
63b434a4
JH
54812014-09-30 James Hogan <james.hogan@imgtec.com>
5482
5483 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5484 mips64-dsp-linux.c.
5485
c4d9ceb6
YQ
54862014-09-23 Yao Qi <yao@codesourcery.com>
5487
5488 * linux-low.c (lp_status_maybe_breakpoint): New function.
5489 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5490 (count_events_callback): Likewise.
5491 (select_event_lwp_callback): Likewise.
5492 (cancel_breakpoints_callback): Likewise.
5493
89a5711c
DB
54942014-09-19 Don Breazeal <donb@codesourcery.com>
5495
5496 * linux-low.c (handle_extended_wait): Call
5497 linux_ptrace_get_extended_event.
5498 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5499 linux_is_extended_waitstatus.
5500
bffc0964
JB
55012014-09-16 Joel Brobecker <brobecker@adacore.com>
5502
5503 * Makefile.in (CPPFLAGS): Define.
5504 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5505 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5506
0bfdf32f
GB
55072014-09-16 Gary Benson <gbenson@redhat.com>
5508
5509 * inferiors.h (current_inferior): Renamed as...
5510 (current_thread): New variable. All uses updated.
5511 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5512 (maybe_move_out_of_jump_pad): Likewise.
5513 (cancel_breakpoint): Likewise.
5514 (linux_low_filter_event): Likewise.
5515 (wait_for_sigstop): Likewise.
5516 (linux_resume_one_lwp): Likewise.
5517 (need_step_over_p): Likewise.
5518 (start_step_over): Likewise.
5519 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5520 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5521 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5522 and save_inferior as saved_thread.
5523 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5524 saved_thread.
5525 (regcache_invalidate_thread): Likewise.
5526 * remote-utils.c (prepare_resume_reply): Likewise.
5527 * thread-db.c (thread_db_get_tls_address): Likewise.
5528 (disable_thread_event_reporting): Likewise.
5529 (remove_thread_event_breakpoints): Likewise.
5530 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5531 as saved_thread.
5532 * target.h (set_desired_inferior): Renamed as...
5533 (set_desired_thread): New declaration. All uses updated.
5534 * server.c (myresume): Updated comment to reference thread instead
5535 of inferior.
5536 (handle_serial_event): Likewise.
5537 (handle_target_event): Likewise.
5538
361c8ade
GB
55392014-09-12 Tom Tromey <tromey@redhat.com>
5540 Gary Benson <gbenson@redhat.com>
5541
5542 * regcache.h: Include common-regcache.h.
5543 (regcache_read_pc): Don't declare.
5544 * regcache.c (get_thread_regcache_for_ptid): New function.
5545
bd9269f7
GB
55462014-09-11 Tom Tromey <tromey@redhat.com>
5547 Gary Benson <gbenson@redhat.com>
5548
5549 * symbol.c: New file.
5550 * Makefile.in (SFILES): Add symbol.c.
5551 (OBS): Add symbol.o.
5552
f8c1d06b
GB
55532014-09-11 Gary Benson <gbenson@redhat.com>
5554
5555 * target.c (target_stop_ptid, target_continue_ptid): New
5556 functions.
5557
721ec300
GB
55582014-09-11 Tom Tromey <tromey@redhat.com>
5559 Gary Benson <gbenson@redhat.com>
5560
5561 * target.h: Include target/target.h.
5562 * target.c (target_read_memory, target_read_uint32)
5563 (target_write_memory): New functions.
5564
c5e92cca
GB
55652014-09-11 Gary Benson <gbenson@redhat.com>
5566
5567 * server.h (debug_hw_points): Don't declare.
5568 * server.c (debug_hw_points): Don't define. Replace all uses
5569 with show_debug_regs.
5570 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5571 all uses with show_debug_regs.
5572
2e4bb98a
EBM
55732014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5574
5575 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5576 endianness into account.
5577 (ppc_supply_ptrace_register): Likewise.
5578
ac740bc7
JH
55792014-09-03 James Hogan <james.hogan@imgtec.com>
5580
5581 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5582 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5583
97ea6506
GB
55842014-09-03 Gary Benson <gbenson@redhat.com>
5585
5586 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5587 ALL_DEBUG_ADDRESS_REGISTERS.
5588
df7e5265
GB
55892014-09-02 Gary Benson <gbenson@redhat.com>
5590
5591 * i386-low.h: Renamed as...
5592 * x86-low.h: New file. All type, function and variable name
5593 prefixes changed from "i386_" to "x86_". All references updated.
5594 * i386-low.c: Renamed as...
5595 * x86-low.c: New file. All type, function and variable name
5596 prefixes changed from "i386_" to "x86_". All references updated.
5597
ed859da7
GB
55982014-09-02 Gary Benson <gbenson@redhat.com>
5599
5600 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5601 (x86_linux_new_thread): Likewise.
5602
860789c7
GB
56032014-08-29 Gary Benson <gbenson@redhat.com>
5604
5605 * server.h (setjmp.h): Do not include.
5606 (toplevel): Do not declare.
5607 (common-exceptions.h): Include.
5608 (cleanups.h): Likewise.
5609 * server.c (toplevel): Do not define.
5610 (exit_code): New static global.
5611 (detach_or_kill_for_exit_cleanup): New function.
5612 (main): New function. Original main renamed to...
5613 (captured_main): New function.
5614 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5615
ff55e1b5
GB
56162014-08-29 Gary Benson <gbenson@redhat.com>
5617
5618 * Makefile.in (SFILES): Add common/common-exceptions.c.
5619 (OBS): Add common-exceptions.o.
5620 (common-exceptions.o): New rule.
5621 * utils.c (prepare_to_throw_exception): New function.
5622
e9bcb658
GB
56232014-08-29 Gary Benson <gbenson@redhat.com>
5624
5625 * config.in: Regenerate.
5626 * configure: Likewise.
5627
e3180625
GB
56282014-08-29 Gary Benson <gbenson@redhat.com>
5629
5630 * Makefile.in (SFILES): Add common/cleanups.c.
5631 (OBS): cleanups.o.
5632 (cleanups.o): New rule.
5633
e3d6ba5d
GB
56342014-08-29 Gary Benson <gbenson@redhat.com>
5635
5636 * utils.c (internal_vwarning): New function.
5637
7096e886
GB
56382014-08-28 Gary Benson <gbenson@redhat.com>
5639
5640 * utils.h (fatal): Remove declaration.
5641 * utils.c (fatal): Remove function.
5642
14ce3192
GB
56432014-08-28 Gary Benson <gbenson@redhat.com>
5644
5645 * tracepoint.c (gdb_agent_init): Replace fatal with
5646 perror_with_name.
5647 (initialize_tracepoint): Likewise.
5648
50278d59
GB
56492014-08-28 Gary Benson <gbenson@redhat.com>
5650
5651 * remote-utils.c (remote_prepare): Replace fatal with error.
5652
aa96c426
GB
56532014-08-28 Gary Benson <gbenson@redhat.com>
5654
5655 * linux-low.c (linux_async): Replace fatal with warning.
5656 Tidy up and return.
5657 (linux_start_non_stop): Return -1 if linux_async failed.
5658
f7160e97
GB
56592014-08-28 Gary Benson <gbenson@redhat.com>
5660
5661 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5662 gdb_assert.
5663 (i386_dr_low_get_addr): Remove vague comment.
5664 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5665 gdb_assert.
5666
38e08fca
GB
56672014-08-28 Gary Benson <gbenson@redhat.com>
5668
5669 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5670 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5671 internal_error.
5672 (linux_resume_one_lwp): Likewise.
5673 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5674 gdb_assert.
5675 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5676 with internal_error.
5677 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5678 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5679 (find_register_by_name): Replace fatal with internal_error.
5680 (find_regno): Likewise.
5681 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5682 * thread-db.c (thread_db_create_event): Likewise.
5683 (thread_db_load_search): Likewise.
5684 (try_thread_db_load_1): Likewise.
5685 * tracepoint.c (get_jump_space_head): Replace fatal with
5686 internal_error.
5687 (claim_trampoline_space): Likewise.
5688 (have_fast_tracepoint_trampoline_buffer): Likewise.
5689 (cmd_qtstart): Likewise.
5690 (stop_tracing): Likewise.
5691 (fast_tracepoint_collecting): Likewise.
5692 (target_malloc): Likewise.
5693 (download_tracepoint): Likewise.
5694 (download_trace_state_variables): Replace check with gdb_assert.
5695 (upload_fast_traceframes): Replace fatal with internal_error.
5696
34abf635
GB
56972014-08-19 Tom Tromey <tromey@redhat.com>
5698 Gary Benson <gbenson@redhat.com>
5699
5700 * Makefile.in (SFILES): Add common/common-debug.c.
5701 (OBS): Add common-debug.o.
5702 (common-debug.o): New rule.
5703 * debug.h (debug_printf): Don't declare.
5704 * debug.c (debug_printf): Renamed and rewritten as...
5705 (debug_vprintf): New function.
5706
f6e94d78
GB
57072014-08-19 Gary Benson <gbenson@redhat.com>
5708
5709 * utils.h: Do not include print-utils.h.
5710
9239eeab
GB
57112014-08-19 Tom Tromey <tromey@redhat.com>
5712 Gary Benson <gbenson@redhat.com>
5713
5714 * server.h: Add static assertion.
5715 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5716
ef87c8bb
GB
57172014-08-19 Tom Tromey <tromey@redhat.com>
5718 Gary Benson <gbenson@redhat.com>
5719
5720 * Makefile.in (SFILES): Add common/errors.c.
5721 (OBS): Add errors.o.
5722 (IPA_OBS): Add errors-ipa.o.
5723 (errors.o): New rule.
5724 (errors-ipa.o): Likewise.
5725 * utils.h (perror_with_name, error, warning): Don't declare.
5726 * utils.c (warning): Renamed and rewritten as...
5727 (vwarning): New function.
5728 (error): Renamed and rewritten as...
5729 (verror): New function.
5730 (internal_error): Renamed and rewritten as...
5731 (internal_verror): New function.
5732
bb974a24
GB
57332014-08-07 Gary Benson <gbenson@redhat.com>
5734
5735 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5736 * configure: Regenerate.
5737 * config.in: Likewise.
5738 * server.h: Do not include errno.h.
5739 * event-loop.c: Likewise.
5740 * hostio-errno.c: Likewise.
5741 * linux-low.c: Likewise.
5742 * remote-utils.c: Likewise.
5743 * spu-low.c: Likewise.
5744 * utils.c: Likewise.
5745 * gdbreplay.c: Unconditionally include errno.h.
5746
6d3d12eb
GB
57472014-08-07 Gary Benson <gbenson@redhat.com>
5748
5749 * server.h: Do not include string.h.
5750 * event-loop.c: Likewise.
5751 * linux-low.c: Likewise.
5752 * regcache.c: Likewise.
5753 * remote-utils.c: Likewise.
5754 * spu-low.c: Likewise.
5755 * utils.c: Likewise.
5756
dccbb609
GB
57572014-08-07 Gary Benson <gbenson@redhat.com>
5758
5759 * server.h: Do not include gdb_assert.h.
5760
e76df0d0
GB
57612014-08-07 Gary Benson <gbenson@redhat.com>
5762
5763 * server.h: Do not include common-utils.h.
5764
4cb9c816
GB
57652014-08-07 Gary Benson <gbenson@redhat.com>
5766
5767 * server.h: Do not include ptid.h.
5768 * notif.h: Likewise.
5769
3995eeee
GB
57702014-08-07 Gary Benson <gbenson@redhat.com>
5771
5772 * server.h: Do not include gdb_locale.h.
5773
cb9f1a9b
GB
57742014-08-07 Gary Benson <gbenson@redhat.com>
5775
5776 * server.h: Do not include gdb/signals.h.
5777 * win32-low.c: Likewise.
5778
a5fceff8
GB
57792014-08-07 Gary Benson <gbenson@redhat.com>
5780
5781 * server.h: Do not include pathmax.h.
5782
b9391142
GB
57832014-08-07 Gary Benson <gbenson@redhat.com>
5784
5785 * server.h: Do not include libiberty.h.
5786 * linux-bfin-low.c: Likewise.
5787
0e443c87
GB
57882014-08-07 Gary Benson <gbenson@redhat.com>
5789
5790 * server.h: Do not include ansidecl.h.
5791
8ebb3f56
GB
57922014-08-07 Gary Benson <gbenson@redhat.com>
5793
5794 * linux-x86-low.c: Do not include stddef.h.
5795 * lynx-ppc-low.c: Likewise.
5796 * tracepoint.c: Likewise.
5797
8980bdf6
GB
57982014-08-07 Gary Benson <gbenson@redhat.com>
5799
5800 * server.h: Do not include stdarg.h.
5801 * nto-low.c: Likewise.
5802
d7096f71
GB
58032014-08-07 Gary Benson <gbenson@redhat.com>
5804
5805 * server.h: Do not include stdlib.h.
5806 * inferiors.c: Likewise.
5807 * linux-low.c: Likewise.
5808 * regcache.c: Likewise.
5809 * spu-low.c: Likewise.
5810 * tracepoint.c: Likewise.
5811 * utils.c: Likewise.
5812
d02f550d
GB
58132014-08-07 Gary Benson <gbenson@redhat.com>
5814
5815 * server.h: Do not include stdio.h.
5816 * linux-low.c: Likewise.
5817 * remote-utils.c: Likewise.
5818 * spu-low.c: Likewise.
5819 * utils.c: Likewise.
5820 * wincecompat.c: Likewise.
5821
87f6c4e3
GB
58222014-08-06 Gary Benson <gbenson@redhat.com>
5823
5824 * regcache.c (init_register_cache): Move conditionals inside if.
5825
7089dca4
GB
58262014-08-06 Gary Benson <gbenson@redhat.com>
5827
5828 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5829
462f517e
GB
58302014-07-31 Gary Benson <gbenson@redhat.com>
5831
5832 * ax.h: Do not include server.h.
5833 * gdbthread.h: Likewise.
5834 * lynx-low.h: Likewise.
5835 * notif.h: Likewise.
5836
976411d6
GB
58372014-07-30 Gary Benson <gbenson@redhat.com>
5838
5839 * server.h: Include common-defs.h.
5840 Do not include config.h or build-gnulib-gdbserver/config.h.
5841
d41f6d8e
GB
58422014-07-30 Gary Benson <gbenson@redhat.com>
5843
5844 * hostio-errno.c: Move server.h to top of includes list.
5845 * inferiors.c: Likewise.
5846 * linux-x86-low.c: Likewise.
5847 * notif.c: Include server.h.
5848
314c6a35
TT
58492014-07-24 Tom Tromey <tromey@redhat.com>
5850 Gary Benson <gbenson@redhat.com>
5851
5852 * server.h (CORE_ADDR): Now unsigned.
5853
69ff6be5
PA
58542014-07-16 Pedro Alves <palves@redhat.com>
5855
5856 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5857
ce9e3fe7
PA
58582014-07-15 Pedro Alves <palves@redhat.com>
5859
5860 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5861 copy.
5862
e76126e8
PA
58632014-07-11 Pedro Alves <palves@redhat.com>
5864
5865 * linux-low.c (kill_wait_lwp): New function, based on
5866 kill_one_lwp_callback, but use my_waitpid directly.
5867 (kill_one_lwp_callback, linux_kill): Use it.
5868
8e9db26e
PA
58692014-06-23 Pedro Alves <palves@redhat.com>
5870
5871 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5872 before setting DR0..DR3.
5873
698b3e08
GB
58742014-06-20 Gary Benson <gbenson@redhat.com>
5875
5876 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5877 * configure: Regenerated.
5878 * config.in: Likewise.
5879
125f8a3d
GB
58802014-06-20 Gary Benson <gbenson@redhat.com>
5881
5882 * Makefile.in (SFILES): Update locations for files moved
5883 from common to nat.
5884 (object file files): Reordered.
5885
42995dbd
GB
58862014-06-20 Gary Benson <gbenson@redhat.com>
5887
5888 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5889 (i386_dr_low_set_addr): Likewise.
5890 (i386_dr_low_get_addr): Likewise.
5891 (i386_dr_low_can_set_control): Likewise.
5892 (i386_dr_low_set_control): Likewise.
5893 (i386_dr_low_get_control): Likewise.
5894 (i386_dr_low_get_status): Likewise.
5895 (i386_get_debug_register_length): Likewise.
5896 * linux-x86-low.c (i386_dr_low_set_addr):
5897 Changed signature. Made static.
5898 (i386_dr_low_get_addr): Likewise.
5899 (i386_dr_low_set_control): Likewise.
5900 (i386_dr_low_get_control): Likewise.
5901 (i386_dr_low_get_status): Likewise.
5902 (i386_dr_low): New global variable.
5903 * win32-i386-low.c (i386_dr_low_set_addr):
5904 Changed signature. Made static.
5905 (i386_dr_low_get_addr): Likewise.
5906 (i386_dr_low_set_control): Likewise.
5907 (i386_dr_low_get_control): Likewise.
5908 (i386_dr_low_get_status): Likewise.
5909 (i386_dr_low): New global variable.
5910
e1d2394b
MS
59112014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5912
5913 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5914 * Makefile.in (AR, AR_FLAGS): Define.
5915 * configure: Regenerate.
5916
3a8ee006
GB
59172014-06-19 Gary Benson <gbenson@redhat.com>
5918
5919 * Makefile.in (i386-dregs.o): New rule.
5920 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5921 * i386-low.c (target.h): Remove include.
5922 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5923 (DR_CONTROL_SHIFT): Likewise.
5924 (DR_CONTROL_SIZE): Likewise.
5925 (DR_RW_EXECUTE): Likewise.
5926 (DR_RW_WRITE): Likewise.
5927 (DR_RW_READ): Likewise.
5928 (DR_RW_IORW): Likewise.
5929 (DR_LEN_1): Likewise.
5930 (DR_LEN_2): Likewise.
5931 (DR_LEN_4): Likewise.
5932 (DR_LEN_8): Likewise.
5933 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5934 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5935 (DR_ENABLE_SIZE): Likewise.
5936 (DR_LOCAL_SLOWDOWN): Likewise.
5937 (DR_GLOBAL_SLOWDOWN): Likewise.
5938 (DR_CONTROL_RESERVED): Likewise.
5939 (I386_DR_CONTROL_MASK): Likewise.
5940 (I386_DR_VACANT): Likewise.
5941 (I386_DR_LOCAL_ENABLE): Likewise.
5942 (I386_DR_GLOBAL_ENABLE): Likewise.
5943 (I386_DR_DISABLE): Likewise.
5944 (I386_DR_SET_RW_LEN): Likewise.
5945 (I386_DR_GET_RW_LEN): Likewise.
5946 (I386_DR_WATCH_HIT): Likewise.
5947 (i386_wp_op_t): Likewise.
5948 (i386_show_dr): Likewise.
5949 (i386_length_and_rw_bits): Likewise.
5950 (i386_insert_aligned_watchpoint): Likewise.
5951 (i386_remove_aligned_watchpoint): Likewise.
5952 (i386_handle_nonaligned_watchpoint): Likewise.
5953 i386_update_inferior_debug_regs(): Likewise.
5954 (i386_dr_insert_watchpoint): Likewise.
5955 (i386_dr_remove_watchpoint): Likewise.
5956 (i386_dr_region_ok_for_watchpoint): Likewise.
5957 (i386_dr_stopped_data_address): Likewise.
5958 (i386_dr_stopped_by_watchpoint): Likewise.
5959
8f26655c
GB
59602014-06-19 Gary Benson <gbenson@redhat.com>
5961
5962 * i386-low.c (i386_dr_show): Renamed to
5963 i386_show_dr and made static. All uses updated.
5964 (i386_dr_length_and_rw_bits): Renamed to
5965 i386_length_and_rw_bits and made static.
5966 All uses updated.
5967 (i386_dr_insert_aligned_watchpoint): Renamed to
5968 i386_insert_aligned_watchpoint and made static.
5969 All uses updated.
5970 (i386_dr_remove_aligned_watchpoint): Renamed to
5971 i386_remove_aligned_watchpoint and made static.
5972 All uses updated.
5973 (i386_dr_update_inferior_debug_regs): Renamed to
5974 i386_update_inferior_debug_regs and made static.
5975 All uses updated.
5976
b9228891
GB
59772014-06-18 Gary Benson <gbenson@redhat.com>
5978
5171def3
GB
5979 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5980 (i386_dr_low_can_set_control): Likewise.
5981 (i386_get_debug_register_length): Likewise.
5982 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5983 (i386_dr_low_can_set_control): Likewise.
5984 (i386_get_debug_register_length): Likewise.
5985
59862014-06-17 Gary Benson <gbenson@redhat.com>
5987
b9228891
GB
5988 * i386-low.h (i386-dregs.h): New include.
5989 (DR_FIRSTADDR): Now in i386-dregs.h.
5990 (DR_LASTADDR): Likewise.
5991 (DR_NADDR): Likewise.
5992 (DR_STATUS): Likewise.
5993 (DR_CONTROL): Likewise.
5994 (i386_debug_reg_state): Likewise.
5995 (i386_dr_insert_watchpoint): Likewise.
5996 (i386_dr_remove_watchpoint): Likewise.
5997 (i386_dr_region_ok_for_watchpoint): Likewise.
5998 (i386_dr_stopped_data_address): Likewise.
5999 (i386_dr_stopped_by_watchpoint): Likewise.
6000 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6001
4be83cc2
GB
60022014-06-18 Gary Benson <gbenson@redhat.com>
6003
6004 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6005 i386_dr_insert_watchpoint.
6006 (i386_low_remove_watchpoint): Renamed to
6007 i386_dr_remove_watchpoint.
6008 (i386_low_region_ok_for_watchpoint): Renamed to
6009 i386_dr_region_ok_for_watchpoint.
6010 (i386_low_stopped_data_address): Renamed to
6011 i386_dr_stopped_data_address.
6012 (i386_low_stopped_by_watchpoint): Renamed to
6013 i386_dr_stopped_by_watchpoint.
6014 * i386-low.c (i386_show_dr): Renamed to
6015 i386_dr_show and made nonstatic. All uses updated.
6016 (i386_length_and_rw_bits): Renamed to
6017 i386_dr_length_and_rw_bits and made nonstatic.
6018 All uses updated.
6019 (i386_insert_aligned_watchpoint): Renamed to
6020 i386_dr_insert_aligned_watchpoint and made nonstatic.
6021 All uses updated.
6022 (i386_remove_aligned_watchpoint): Renamed to
6023 i386_dr_remove_aligned_watchpoint and made nonstatic.
6024 All uses updated.
6025 (i386_update_inferior_debug_regs): Renamed to
6026 i386_dr_update_inferior_debug_regs and made nonstatic.
6027 All uses updated.
6028 (i386_low_insert_watchpoint): Renamed to
6029 i386_dr_insert_watchpoint. All uses updated.
6030 (i386_low_remove_watchpoint): Renamed to
6031 i386_dr_remove_watchpoint. All uses updated.
6032 (i386_low_region_ok_for_watchpoint): Renamed to
6033 i386_dr_region_ok_for_watchpoint. All uses updated.
6034 (i386_low_stopped_data_address): Renamed to
6035 i386_dr_stopped_data_address. All uses updated.
6036 (i386_low_stopped_by_watchpoint): Renamed to
6037 i386_dr_stopped_by_watchpoint. All uses updated.
6038
131aa0d4
GB
60392014-06-18 Gary Benson <gbenson@redhat.com>
6040
6041 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6042 (i386_dr_low_can_set_control): Likewise.
6043 (i386_insert_aligned_watchpoint): New check.
6044
d9305f7f
GB
60452014-06-18 Gary Benson <gbenson@redhat.com>
6046
6047 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6048 Renamed to state.
6049
e927c9fc
GB
60502014-06-18 Gary Benson <gbenson@redhat.com>
6051
6052 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6053 instead of fatal and error.
6054 (i386_handle_nonaligned_watchpoint): Likewise.
6055
1b6d4134
GB
60562014-06-18 Gary Benson <gbenson@redhat.com>
6057
6058 * i386-low.c (i386_get_debug_register_length): New macro.
6059 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6060 (i386_show_dr): Use debug_printf instead of fprintf. Use
6061 phex to format values.
6062
6e62758f
GB
60632014-06-18 Gary Benson <gbenson@redhat.com>
6064
6065 * i386-low.h: Comment changes.
6066 * i386-low.c: Likewise.
6067
fc6e2f03
GB
60682014-06-18 Gary Benson <gbenson@redhat.com>
6069
6070 * i386-low.c: Whitespace changes.
6071
f9d1eeed
TT
60722014-06-12 Tom Tromey <tromey@redhat.com>
6073
6074 * utils.c (freeargv): Remove.
6075
0b04e523
TT
60762014-06-12 Tom Tromey <tromey@redhat.com>
6077
6078 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6079 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6080 (parse_debug_format_options): Likewise.
6081 (gdbserver_usage): Likewise.
6082 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6083 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6084 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6085 against libiberty.
6086 ($(LIBGNU)): Depend on libiberty.
6087 (all-lib): Recurse into all subdirs.
6088 (install-only): Invoke "install" target in subdirs.
6089 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6090 targets.
6091 * configure: Rebuild.
6092 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6093 for vasprintf, vsnprintf, or gettimeofday.
6094 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6095 srv_tgtobj.
6096
270c9937
JB
60972014-06-05 Joel Brobecker <brobecker@adacore.com>
6098
6099 * development.sh: Delete.
6100 * Makefile.in (config.status): Adjust dependency on development.sh.
6101 * configure.ac: Adjust development.sh source call.
6102 * configure: Regenerate.
6103
0a261ed8
PA
61042014-06-02 Pedro Alves <palves@redhat.com>
6105
6106 * ax.c (gdb_free_agent_expr): New function.
6107 * ax.h (gdb_free_agent_expr): New declaration.
6108 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6109 list.
6110 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6111 static.
6112 (clear_breakpoint_conditions_and_commands): New function.
6113 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6114 (clear_breakpoint_conditions_and_commands): New declaration.
6115
e9dae05e
RR
61162014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6117
6118 * linux-aarch64-low.c (asm/ptrace.h): Include.
6119
5876f503
JK
61202014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6121
6122 Fix TLS access for -static -pthread.
6123 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6124 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6125 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6126
802e8e6d
PA
61272014-05-20 Pedro Alves <palves@redhat.com>
6128
6129 * linux-aarch64-low.c (aarch64_insert_point)
6130 (aarch64_remove_point): No longer check whether the type is
6131 supported here. Adjust to new interface.
6132 (the_low_target): Install aarch64_supports_z_point_type as
6133 supports_z_point_type method.
6134 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6135 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6136 instead of a Z packet char. Adjust.
6137 (arm_supports_z_point_type): New function.
6138 (arm_insert_point, arm_remove_point): Adjust to new interface.
6139 (the_low_target): Install arm_supports_z_point_type.
6140 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6141 (cris_insert_point, cris_remove_point): Adjust to new interface.
6142 Don't check whether the type is supported here.
6143 (the_low_target): Install cris_supports_z_point_type.
6144 * linux-low.c (linux_supports_z_point_type): New function.
6145 (linux_insert_point, linux_remove_point): Adjust to new interface.
6146 * linux-low.h (struct linux_target_ops) <insert_point,
6147 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6148 raw_breakpoint pointer parameter.
6149 <supports_z_point_type>: New method.
6150 * linux-mips-low.c (mips_supports_z_point_type): New function.
6151 (mips_insert_point, mips_remove_point): Adjust to new interface.
6152 Use mips_supports_z_point_type.
6153 (the_low_target): Install mips_supports_z_point_type.
6154 * linux-ppc-low.c (the_low_target): Install NULL as
6155 supports_z_point_type method.
6156 * linux-s390-low.c (the_low_target): Install NULL as
6157 supports_z_point_type method.
6158 * linux-sparc-low.c (the_low_target): Install NULL as
6159 supports_z_point_type method.
6160 * linux-x86-low.c (x86_supports_z_point_type): New function.
6161 (x86_insert_point): Adjust to new insert_point interface. Use
6162 insert_memory_breakpoint. Adjust to new
6163 i386_low_insert_watchpoint interface.
6164 (x86_remove_point): Adjust to remove_point interface. Use
6165 remove_memory_breakpoint. Adjust to new
6166 i386_low_remove_watchpoint interface.
6167 (the_low_target): Install x86_supports_z_point_type.
6168 * lynx-low.c (lynx_target_ops): Install NULL as
6169 supports_z_point_type callback.
6170 * nto-low.c (nto_supports_z_point_type): New.
6171 (nto_insert_point, nto_remove_point): Adjust to new interface.
6172 (nto_target_ops): Install nto_supports_z_point_type.
6173 * mem-break.c: Adjust intro comment.
6174 (struct raw_breakpoint) <raw_type, size>: New fields.
6175 <inserted>: Update comment.
6176 <shlib_disabled>: Delete field.
6177 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6178 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6179 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6180 (raw_bkpt_type_to_target_hw_bp_type): New function.
6181 (find_enabled_raw_code_breakpoint_at): New function.
6182 (find_raw_breakpoint_at): New type and size parameters. Use them.
6183 (insert_memory_breakpoint): New function, based off
6184 set_raw_breakpoint_at.
6185 (remove_memory_breakpoint): New function.
6186 (set_raw_breakpoint_at): Reimplement.
6187 (set_breakpoint): New, based on set_breakpoint_at.
6188 (set_breakpoint_at): Reimplement.
6189 (delete_raw_breakpoint): Go through the_target->remove_point
6190 instead of assuming memory breakpoints.
6191 (find_gdb_breakpoint_at): Delete.
6192 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6193 (find_gdb_breakpoint): New function.
6194 (set_gdb_breakpoint_at): Delete.
6195 (z_type_supported): New function.
6196 (set_gdb_breakpoint_1): New function, loosely based off
6197 set_gdb_breakpoint_at.
6198 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6199 (delete_gdb_breakpoint_at): Delete.
6200 (delete_gdb_breakpoint_1): New function, loosely based off
6201 delete_gdb_breakpoint_at.
6202 (delete_gdb_breakpoint): New function.
6203 (clear_gdb_breakpoint_conditions): Rename to ...
6204 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6205 breakpoint.
6206 (add_condition_to_breakpoint): Make static.
6207 (add_breakpoint_condition): Take a struct breakpoint pointer
6208 instead of an address. Adjust.
6209 (gdb_condition_true_at_breakpoint): Rename to ...
6210 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6211 z_type parameter.
6212 (gdb_condition_true_at_breakpoint): Reimplement.
6213 (add_breakpoint_commands): Take a struct breakpoint pointer
6214 instead of an address. Adjust.
6215 (gdb_no_commands_at_breakpoint): Rename to ...
6216 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6217 parameter. Return true if no breakpoint was found. Change debug
6218 output.
6219 (gdb_no_commands_at_breakpoint): Reimplement.
6220 (run_breakpoint_commands): Rename to ...
6221 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6222 and change return type to boolean.
6223 (run_breakpoint_commands): New function.
6224 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6225 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6226 breakpoint. Go through the_target->remove_point instead of
6227 assuming memory breakpoint.
6228 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6229 software and hardware breakpoints.
6230 (reinsert_raw_breakpoint): Go through the_target->insert_point
6231 instead of assuming memory breakpoint.
6232 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6233 software and hardware breakpoints.
6234 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6235 Check both software and hardware breakpoints.
6236 (validate_inserted_breakpoint): Assert the breakpoint is a
6237 software breakpoint. Set the inserted flag to -1 instead of
6238 setting shlib_disabled.
6239 (delete_disabled_breakpoints): Adjust.
6240 (validate_breakpoints): Only validate software breakpoints.
6241 Adjust to inserted flag change.
6242 (check_mem_read, check_mem_write): Skip breakpoint types other
6243 than software breakpoints. Adjust to inserted flag change.
6244 * mem-break.h (enum raw_bkpt_type): New enum.
6245 (raw_breakpoint, struct process_info): Forward declare.
6246 (Z_packet_to_target_hw_bp_type): Delete declaration.
6247 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6248 (set_gdb_breakpoint, delete_gdb_breakpoint)
6249 (clear_breakpoint_conditions): New declarations.
6250 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6251 (breakpoint_inserted_here): Update comment.
6252 (add_breakpoint_condition, add_breakpoint_commands): Replace
6253 address parameter with a breakpoint pointer parameter.
6254 (gdb_breakpoint_here): Update comment.
6255 (delete_gdb_breakpoint_at): Delete.
6256 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6257 * server.c (process_point_options): Take a struct breakpoint
6258 pointer instead of an address. Adjust.
6259 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6260 delete_gdb_breakpoint.
6261 * spu-low.c (spu_target_ops): Install NULL as
6262 supports_z_point_type method.
6263 * target.h: Include mem-break.h.
6264 (struct target_ops) <prepare_to_access_memory>: Update comment.
6265 <supports_z_point_type>: New field.
6266 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6267 instead of a char. Also take a raw breakpoint pointer.
6268 * win32-arm-low.c (the_low_target): Install NULL as
6269 supports_z_point_type.
6270 * win32-i386-low.c (i386_supports_z_point_type): New function.
6271 (i386_insert_point, i386_remove_point): Adjust to new interface.
6272 (the_low_target): Install i386_supports_z_point_type.
6273 * win32-low.c (win32_supports_z_point_type): New function.
6274 (win32_insert_point, win32_remove_point): Adjust to new interface.
6275 (win32_target_ops): Install win32_supports_z_point_type.
6276 * win32-low.h (struct win32_target_ops):
6277 <supports_z_point_type>: New method.
6278 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6279 instead of a char. Also take a raw breakpoint pointer.
6280
932539e3
PA
62812014-05-20 Pedro Alves <palves@redhat.com>
6282
6283 * mem-break.h: Include break-common.h.
6284 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6285 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6286 (Z_packet_to_target_hw_bp_type): New declaration.
6287 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6288 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6289 (Z_PACKET_ACCESS_WP): Delete macros.
6290 (Z_packet_to_hw_type): Delete function.
6291 * i386-low.h: Don't include break-common.h here.
6292 (Z_packet_to_hw_type): Delete declaration.
6293 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6294 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6295 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6296 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6297 * linux-aarch64-low.c: Don't include break-common.h here.
6298 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6299 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6300 (Z_packet_to_target_hw_bp_type): Delete function.
6301 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6302 function.
6303 (mips_insert_point, mips_remove_point): Use
6304 Z_packet_to_target_hw_bp_type.
6305
4ff0d3d8
PA
63062014-05-20 Pedro Alves <palves@redhat.com>
6307
6308 * linux-aarch64-low.c: Include break-common.h.
6309 (enum target_point_type): Delete.
6310 (Z_packet_to_point_type): Rename to ...
6311 (Z_packet_to_target_hw_bp_type): ... this, and return a
6312 target_hw_bp_type instead.
6313 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6314 instead of an enum target_point_type.
6315 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6316 breakpoint type.
6317 (aarch64_dr_state_insert_one_point)
6318 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6319 (aarch64_handle_aligned_watchpoint)
6320 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6321 Take an enum target_hw_bp_type instead of an enum
6322 target_point_type.
6323 (aarch64_supports_z_point_type): New function.
6324 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6325 use Z_packet_to_target_hw_bp_type.
6326
786dc519
JB
63272014-05-20 Joel Brobecker <brobecker@adacore.com>
6328
6329 * configure.ac: Only use -Werror by default when DEVELOPMENT
6330 is true.
6331 * configure: Regenerate.
6332
9e0aa64f
JK
63332014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6334
6335 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6336 * linux-x86-low.c (X86_64_USER_REGS): New.
6337 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6338
2b577b92
YQ
63392014-04-28 Yao Qi <yao@codesourcery.com>
6340
6341 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6342 name.
6343
94611da2
PA
63442014-04-25 Pedro Alves <palves@redhat.com>
6345
6346 PR server/16255
6347 * linux-low.c (linux_attach_fail_reason_string): New function.
6348 (linux_attach_lwp): Delete.
6349 (linux_attach_lwp_1): Rename to ...
6350 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6351 argument. Remove "initial" parameter. Return int instead of
6352 void. Don't error or warn here.
6353 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6354 failure to attach to the tgid. Call warning when failing to
6355 attach to an lwp.
6356 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6357 argument. Remove "initial" parameter. Return int instead of
6358 void. Don't error or warn here.
6359 (linux_attach_fail_reason_string): New declaration.
6360 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6361 interface change. Use linux_attach_fail_reason_string.
6362
01f9f808
MS
63632014-04-24 Michael Sturm <michael.sturm@mintel.com>
6364 Walfred Tedeschi <walfred.tedeschi@intel.com>
6365
6366 * Makefile.in: Added rules to handle new files
6367 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6368 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6369 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6370 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6371 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6372 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6373 x32-avx512-linux.o.
6374 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6375 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6376 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6377 i386/x32-avx512.xml.
6378 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6379 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6380 i386/x32-avx512-linux.xml.
6381 * i387-fp.c (num_avx512_k_registers): New constant for number
6382 of K registers.
6383 (num_avx512_zmmh_low_registers): New constant for number of
6384 lower ZMM registers (0-15).
6385 (num_avx512_zmmh_high_registers): New constant for number of
6386 higher ZMM registers (16-31).
6387 (num_avx512_ymmh_registers): New contant for number of higher
6388 YMM registers (ymm16-31 added by avx521 on x86_64).
6389 (num_avx512_xmm_registers): New constant for number of higher
6390 XMM registers (xmm16-31 added by AVX512 on x86_64).
6391 (struct i387_xsave): Add space for AVX512 registers.
6392 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6393 Add code to handle AVX512 registers.
6394 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6395 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6396 prototypei from generated file.
6397 (tdesc_amd64_avx512_linux): Likewise.
6398 (init_registers_x32_avx512_linux): Likewise.
6399 (tdesc_x32_avx512_linux): Likewise.
6400 (init_registers_i386_avx512_linux): Likewise.
6401 (tdesc_i386_avx512_linux): Likewise.
6402 (x86_64_regmap): Add AVX512 registers.
6403 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6404 mask.
6405 (initialize_low_arch): Add code to initialize AVX512 registers.
6406
51aa91f9
PA
64072014-04-23 Pedro Alves <palves@redhat.com>
6408
6409 * mem-break.c (find_gdb_breakpoint_at): Make static.
6410 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6411
a4165e94
PA
64122014-04-23 Pedro Alves <palves@redhat.com>
6413
6414 * i386-low.c: Don't include break-common.h here.
6415 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6416 prototype to take target_hw_bp_type as argument instead of a Z
6417 packet char.
6418 * i386-low.h: Include break-common.h here.
6419 (Z_packet_to_hw_type): Declare.
6420 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6421 prototypes.
6422 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6423 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6424 (x86_remove_point): Convert the packet number to a
6425 target_hw_bp_type before calling i386_low_remove_watchpoint.
6426 * win32-i386-low.c (i386_insert_point): Convert the packet number
6427 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6428 (i386_remove_point): Convert the packet number to a
6429 target_hw_bp_type before calling i386_low_remove_watchpoint.
6430
b8acf843
PA
64312014-04-23 Pedro Alves <palves@redhat.com>
6432
6433 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6434
d708bcd1
PA
64352014-04-10 Pedro Alves <palves@redhat.com>
6436
6437 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6438 Check if the condition or command is NULL before checking if the
6439 breakpoint is known. On success, return true.
6440 * mem-break.h (add_breakpoint_condition): Document return.
6441 (add_breakpoint_commands): Add describing comment.
6442 * server.c (skip_to_semicolon): New function.
6443 (process_point_options): Use it.
6444
2eec7d5b
PA
64452014-04-09 Pedro Alves <palves@redhat.com>
6446
6447 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6448 to lwpid_of.
6449
fa96cb38
PA
64502014-02-27 Pedro Alves <palves@redhat.com>
6451
6452 PR 12702
6453 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6454 macros.
6455 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6456 output.
6457 (last_thread_of_process_p): Take a PID argument instead of a
6458 thread pointer.
6459 (linux_wait_for_lwp): Delete.
6460 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6461 functions.
6462 (linux_low_filter_event): New function, party factored out from
6463 linux_wait_for_event.
6464 (linux_wait_for_event): Rename to ...
6465 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6466 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6467 sigsuspend. Check for zombie leaders.
6468 (linux_wait_for_event): Reimplement as wrapper around
6469 linux_wait_for_event_filtered.
6470 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6471 a normal or signal exit is seen, it's the whole process exiting.
6472 (wait_for_sigstop): No longer a for_each_inferior callback.
6473 Rewrite on top of linux_wait_for_event_filtered.
6474 (stop_all_lwps): Call wait_for_sigstop directly.
6475 * server.c (resume, handle_target_event): Handle
6476 TARGET_WAITKIND_NO_RESUMED.
6477
d763de10
JB
64782014-02-26 Joel Brobecker <brobecker@adacore.com>
6479
6480 * win32-low.c (psapi_get_dll_name,
6481 * win32_CreateToolhelp32Snapshot): Delete.
6482 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6483 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6484 Delete.
6485 (handle_load_dll): Add function description.
6486 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6487
850a0f76
JB
64882014-02-26 Joel Brobecker <brobecker@adacore.com>
6489
6490 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6491 Add comment.
6492 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6493 base address when calling win32_add_one_solib.
6494 (handle_load_dll): Delete local variable load_addr.
6495 Remove 0x1000 offset applied to DLL base address when calling
6496 win32_add_one_solib.
6497 (handle_unload_dll): Add comment.
6498
f25b3fc3
JB
64992014-02-26 Joel Brobecker <brobecker@adacore.com>
6500
6501 * win32-low.c (win32_add_all_dlls): Renames
6502 win32_ensure_ntdll_loaded. Rewrite function documentation.
6503 Adjust implementation to always load all DLLs.
6504 Add 0x1000 offset to DLL base address when calling
6505 win32_add_one_solib.
6506 (child_initialization_done): New static global.
6507 (do_initial_child_stuff): Set child_initialization_done to
6508 zero during child initialization, and 1 after. Replace call
6509 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6510 Add comment.
6511 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6512 (handle_unload_dll): Add function documentation.
6513 (get_child_debug_event): Ignore load and unload DLL events
6514 during child initialization.
6515
d86d4aaf
DE
65162014-02-20 Doug Evans <dje@google.com>
6517
3bc32da3 6518 Remove global all_lwps.
d86d4aaf
DE
6519 * inferiors.h (ptid_of): Move here from linux-low.h.
6520 (pid_of, lwpid_of): Ditto.
6521 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6522 parameter is a struct thread_info * now.
6523 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6524 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6525 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6526 directly.
6527 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6528 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6529 * linux-arm-low.c (update_registers_callback): Update, "entry"
6530 parameter is a struct thread_info * now.
6531 Fetch lwpid from current_inferior directly.
6532 (arm_insert_point): Pass &all_threads to find_inferior instead of
6533 &all_lwps.
6534 (arm_remove_point): Ditto.
6535 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6536 (arm_prepare_to_resume): Fetch pid from thread.
6537 (arm_read_description): Fetch lwpid from current_inferior directly.
6538 * linux-low.c (all_lwps): Delete.
6539 (delete_lwp): Delete call to remove_inferior.
6540 (handle_extended_wait): Fetch lwpid from thread.
6541 (add_lwp): Don't set lwp->entry.id. Remove call to
6542 add_inferior_to_list.
6543 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6544 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6545 (kill_one_lwp_callback): Ditto.
6546 (linux_kill): Don't dereference NULL pointer.
6547 Fetch ptid,lwpid from thread.
6548 (get_detach_signal): Fetch ptid from thread.
6549 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6550 Simplify call to regcache_invalidate_thread.
6551 (delete_lwp_callback): Update, "entry" parameter is a
6552 struct thread_info * now. Fetch pid from thread.
6553 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6554 (status_pending_p_callback): Update, "entry" parameter is a
6555 struct thread_info * now. Fetch ptid from thread.
6556 (find_lwp_pid): Update, "entry" parameter is a
6557 struct thread_info * now.
6558 (linux_wait_for_lwp): Fetch pid from thread.
6559 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6560 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6561 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6562 (dequeue_one_deferred_signal): Ditto.
6563 (cancel_breakpoint): Fetch ptid from current_inferior.
6564 (linux_wait_for_event): Pass &all_threads to find_inferior,
6565 not &all_lwps. Fetch ptid, lwpid from thread.
6566 (count_events_callback): Update, "entry" parameter is a
6567 struct thread_info * now.
6568 (select_singlestep_lwp_callback): Ditto.
6569 (select_event_lwp_callback): Ditto.
6570 (cancel_breakpoints_callback): Ditto.
6571 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6572 not &all_lwps.
6573 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6574 (unsuspend_one_lwp): Update, "entry" parameter is a
6575 struct thread_info * now.
6576 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6577 not &all_lwps.
6578 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6579 Fetch lwpid from thread, not lwp.
6580 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6581 Pass &all_threads to find_inferior, not &all_lwps.
6582 (send_sigstop): Fetch lwpid from thread, not lwp.
6583 (send_sigstop_callback): Update, "entry" parameter is a
6584 struct thread_info * now.
6585 (suspend_and_send_sigstop_callback): Ditto.
6586 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6587 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6588 struct thread_info * now.
6589 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6590 from thread, lwp.
6591 (lwp_running): Update, "entry" parameter is a
6592 struct thread_info * now.
6593 (stop_all_lwps): Fetch ptid from thread.
6594 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6595 (linux_resume_one_lwp): Fetch lwpid from thread.
6596 (linux_set_resume_request): Update, "entry" parameter is a
6597 struct thread_info * now. Fetch pid, lwpid from thread.
6598 (resume_status_pending_p): Update, "entry" parameter is a
6599 struct thread_info * now.
6600 (need_step_over_p): Ditto. Fetch lwpid from thread.
6601 (start_step_over): Fetch lwpid from thread.
6602 (linux_resume_one_thread): Update, "entry" parameter is a
6603 struct thread_info * now. Fetch lwpid from thread.
6604 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6605 (proceed_one_lwp): Update, "entry" parameter is a
6606 struct thread_info * now. Fetch lwpid from thread.
6607 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6608 struct thread_info * now.
6609 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6610 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6611 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6612 directly.
6613 (regsets_store_inferior_registers): Ditto.
6614 (fetch_register, store_register): Ditto.
6615 (linux_read_memory, linux_write_memory): Ditto.
6616 (linux_request_interrupt): Ditto.
6617 (linux_read_auxv): Ditto.
6618 (linux_xfer_siginfo): Ditto.
6619 (linux_qxfer_spu): Ditto.
6620 (linux_qxfer_libraries_svr4): Ditto.
6621 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6622 moved to inferiors.h.
6623 (get_lwp): Delete.
6624 (get_thread_lwp): Update.
6625 (struct lwp_info): Delete member "entry". Simplify comment for
6626 member "thread".
6627 (all_lwps): Delete.
6628 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6629 current_inferior directly.
6630 (update_watch_registers_callback): Update, "entry" parameter is a
6631 struct thread_info * now. Fetch pid from thread.
6632 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6633 (mips_insert_point): Fetch lwpid from current_inferior.
6634 Pass &all_threads to find_inferior, not &all_lwps.
6635 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6636 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6637 directly.
6638 (mips_stopped_data_address): Ditto.
6639 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6640 directly.
6641 * linux-tile-low.c (tile_arch_setup): Ditto.
6642 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6643 (update_debug_registers_callback): Update, "entry" parameter is a
6644 struct thread_info * now. Fetch pid from thread.
6645 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6646 Pass &all_threads to find_inferior, not &all_lwps.
6647 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6648 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6649 Pass &all_threads to find_inferior, not &all_lwps.
6650 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6651 (i386_dr_low_get_status): Ditto.
6652 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6653 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6654 (x86_linux_read_description): Ditto.
6655 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6656
3b8361aa
DE
66572014-02-20 Doug Evans <dje@google.com>
6658
6659 * inferiors.c (get_first_inferior): Fix buglet.
6660
f7667f0d
DE
66612014-02-19 Doug Evans <dje@google.com>
6662
6663 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6664 * inferiors.c (add_thread): Change result type to struct thread_info *.
6665 All callers updated.
6666 (add_lwp): Call add_thread here instead of in callers.
6667 All callers updated.
6668 * linux-low.h (get_lwp_thread): Rewrite.
6669 (struct lwp_info): New member "thread".
6670
b3312d80
DE
66712014-02-19 Doug Evans <dje@google.com>
6672
6673 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6674 All callers updated.
6675
ecc6f45c
DE
66762014-02-19 Doug Evans <dje@google.com>
6677
6678 * inferiors.c (add_thread): Fix whitespace.
6679
649ebbca
DE
66802014-02-19 Doug Evans <dje@google.com>
6681
6682 * dll.c (clear_dlls): Replace accessing list implemention details
6683 with API function.
6684 * gdbthread.h (get_first_thread): Declare.
6685 * inferiors.c (for_each_inferior_with_data): New function.
6686 (get_first_thread): New function.
6687 (find_thread_ptid): Simplify.
6688 (get_first_inferior): New function.
6689 (clear_list): Delete.
6690 (one_inferior_p): New function.
6691 (clear_inferior_list): New function.
6692 (clear_inferiors): Update.
6693 * inferiors.h (for_each_inferior_with_data): Declare.
6694 (clear_inferior_list): Declare.
6695 (one_inferior_p): Declare.
6696 (get_first_inferior): Declare.
6697 * linux-low.c (linux_wait_for_event): Replace accessing list
6698 implemention details with API function.
6699 * server.c (target_running): Ditto.
6700 (accumulate_file_name_length): New function.
6701 (emit_dll_description): New function.
6702 (handle_qxfer_libraries): Replace accessing list implemention
6703 details with API function.
6704 (handle_qxfer_threads_worker): New function.
6705 (handle_qxfer_threads_proper): Replace accessing list implemention
6706 details with API function.
6707 (handle_query): Ditto.
6708 (visit_actioned_threads_callback_ftype): New typedef.
6709 (visit_actioned_threads_data): New struct.
6710 (visit_actioned_threads): Rewrite to be find_inferior callback.
6711 (resume): Call find_inferior.
6712 (handle_status): Replace accessing list implemention
6713 details with API function.
6714 (process_serial_event): Replace accessing list implemention details
6715 with API function.
6716 * target.c (set_desired_inferior): Replace accessing list implemention
6717 details with API function.
6718 * tracepoint.c (same_process_p): New function.
6719 (gdb_agent_about_to_close): Replace accessing list implemention
6720 details with API function.
6721 * win32-low.c (child_delete_thread): Replace accessing list
6722 implemention details with API function.
6723 (match_dll_by_basename): New function.
6724 (dll_is_loaded_by_basename): New function.
6725 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6726 details call to dll_is_loaded_by_basename.
6727
80894984
DE
67282014-02-19 Doug Evans <dje@google.com>
6729
6730 * dll.h (struct dll_info): Add comment.
6731 * gdbthread.h (struct thread_info): Add comment.
6732 (current_ptid): Simplify.
6733 * inferiors.c (add_process): Update.
6734 (remove_process): Update.
6735 * inferiors.h (struct process_info): Rename member "head" to "entry".
6736 * linux-low.c (delete_lwp): Update.
6737 (add_lwp): Update.
6738 (last_thread_of_process_p): Update.
6739 (kill_one_lwp_callback, linux_kill): Update.
6740 (status_pending_p_callback): Update.
6741 (wait_for_sigstop): Update. Simplify read of ptid.
6742 (start_step_over): Update.
6743 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6744 (get_lwp_thread): Update.
6745 (struct lwp_info): Rename member "head" to "entry".
6746 * regcache.h (inferior_list_entry): Delete.
6747 * server.c (kill_inferior_callback): Update.
6748 (detach_or_kill_inferior_callback): Update.
6749 (print_started_pid): Update.
6750 (print_attached_pid): Update.
6751 (process_serial_event): Simplify read of ptid.
6752 * thread-db.c (thread_db_create_event): Update.
6753 (thread_db_get_tls_address): Update.
6754 * win32-low.c (current_inferior_ptid): Simplify.
6755
46917d26
TT
67562014-02-19 Tom Tromey <tromey@redhat.com>
6757
6758 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6759 argument.
6760 (target_supports_btrace): Update.
6761
0759a81e
YQ
67622014-02-14 Yao Qi <yao@codesourcery.com>
6763
6764 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6765 (rsp-low-ipa.o): New target.
6766
a7191e8b
TT
67672014-02-12 Tom Tromey <tromey@redhat.com>
6768
6769 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6770 convert_ascii_to_int.
6771 * regcache.c (registers_to_string): Likewise.
6772 * remote-utils.c (decode_M_packet): Likewise.
6773 * server.c (process_serial_event): Likewise.
6774
ff0e980e
TT
67752014-02-12 Tom Tromey <tromey@redhat.com>
6776
6777 * server.c (handle_query, handle_v_run): Use hex2bin, not
6778 unhexify.
6779 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6780
e9371aff
TT
67812014-02-12 Tom Tromey <tromey@redhat.com>
6782
6783 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6784 convert_int_to_ascii.
6785 * regcache.c (registers_to_string, collect_register_as_string):
6786 Likewise.
6787 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6788 Likewise.
6789 * server.c (process_serial_event): Likewise.
6790 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6791 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6792
971dc0b8
TT
67932014-02-12 Tom Tromey <tromey@redhat.com>
6794
6795 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6796 bin2hex, not hexify.
6797 * tracepoint.c (cmd_qtstatus): Likewise.
6798
0a822afb
TT
67992014-02-12 Tom Tromey <tromey@redhat.com>
6800
6801 * remote-utils.c (monitor_output): Pass explicit length to
6802 hexify.
6803
9c3d6531
TT
68042014-02-12 Tom Tromey <tromey@redhat.com>
6805
6806 * tracepoint.c: Include rsp-low.h.
6807 * server.c: Include rsp-low.h.
6808 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6809 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6810 declare.
6811 * remote-utils.c: Include rsp-low.h.
6812 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6813 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6814 (convert_int_to_ascii, convert_ascii_to_int): Move to
6815 common/rsp-low.c.
6816 * regcache.c: Include rsp-low.h.
6817 * ax.c: Include rsp-low.h.
6818 * Makefile.in (SFILES): Add common/rsp-low.c.
6819 (OBS): Add rsp-low.o.
6820 (rsp-low.o): New target.
6821
01fd3ea5
TT
68222014-02-12 Tom Tromey <tromey@redhat.com>
6823
6824 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6825 Include print-utils.h.
6826 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6827 (plongest, thirty_two, phex_nz): Remove.
6828 * Makefile.in (SFILES): Add common/print-utils.c.
6829 (OBS): Add print-utils.o.
6830 (print-utils-ipa.o): New target.
6831 (print-utils.o): New target.
6832 (IPA_OBJS): Add print-utils-ipa.o.
6833
e99dc820
TT
68342014-02-06 Tom Tromey <tromey@redhat.com>
6835
6836 * Makefile.in (SFILES): Fix indentation.
6837
ee1e2d4f
DE
68382014-02-05 Doug Evans <dje@google.com>
6839
6840 * linux-low.c (linux_wait_for_event): Improve comment.
6841 (linux_wait_1): Keep current_inferior in sync with event_child.
6842
f5a02773
DE
68432014-01-22 Doug Evans <dje@google.com>
6844
6845 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6846
87ce2a04
DE
68472014-01-22 Doug Evans <dje@google.com>
6848
6849 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6850 * configure: Regenerate.
6851 * config.in: Regenerate.
6852 * Makefile.in (SFILES): Add debug.c.
6853 (OBS): Add debug.o.
6854 * debug.c: New file.
6855 * debug.h: New file.
6856 * linux-aarch64-low.c (*): Update all debugging printfs to use
6857 debug_printf instead of fprintf.
6858 * linux-arm-low.c (*): Ditto.
6859 * linux-cris-low.c (*): Ditto.
6860 * linux-crisv32-low.c (*): Ditto.
6861 * linux-m32r-low.c (*): Ditto.
6862 * linux-sparc-low.c (*): Ditto.
6863 * linux-x86.c (*): Ditto.
6864 * linux-low.c (*): Ditto.
6865 (linux_wait_1): Add calls to debug_enter, debug_exit.
6866 (linux_wait): Remove redundant debugging printf.
6867 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6868 (linux_resume, unstop_all_lwps): Ditto.
6869 * mem-break.c (*): Update all debugging printfs to use
6870 debug_printf instead of fprintf.
6871 * remote-utils.c (*): Ditto.
6872 * thread-db.c (*): Ditto.
6873 * server.c #include <ctype.h>, "gdb_vecs.h".
6874 (debug_threads): Moved to debug.c.
6875 (*): Update all debugging printfs to use debug_printf instead of
6876 fprintf.
6877 (start_inferior): Replace call to fflush with call to debug_flush.
6878 (monitor_show_help): Mention set debug-format.
6879 (parse_debug_format_options): New function.
6880 (handle_monitor_command): Handle "monitor set debug-format".
6881 (gdbserver_usage): Mention --debug-format.
6882 (main): Parse --debug-format.
6883 * server.h (debug_threads): Declaration moved to debug.h.
6884 #include "debug.h".
6885 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6886 trace_debug_1 that uses debug_printf.
6887 (tracepoint_look_up_symbols): Update all debugging printfs to use
6888 debug_printf instead of fprintf.
6889
e671835b
BS
68902014-01-20 Baruch Siach <baruch@tkos.co.il>
6891
6892 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6893 sys/ptrace.h.
6894
b5737fa9
PA
68952014-01-17 Pedro Alves <palves@redhat.com>
6896
ea38d2a9 6897 PR build/16445
c7faa97a
PA
6898 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6899 defined after including gdb_proc_service.h.
b5737fa9 6900
40ed484e
DE
69012014-01-16 Doug Evans <dje@google.com>
6902
6903 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6904 (match_dll): Use it.
6905
969c39fb
MM
69062014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6907
6908 * target.h (target_ops) <read_btrace>: Change parameters and
6909 return type to allow error reporting.
6910 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6911 trace reading errors on.
6912 * linux-low.c (linux_low_read_btrace): Pass trace reading
6913 errors on.
6914 (linux_low_disable_btrace): New.
6915
ab7f45ba
DE
69162014-01-15 Doug Evans <dje@google.com>
6917
6918 * inferiors.c (thread_id_to_gdb_id): Delete.
6919 * inferiors.h (thread_id_to_gdb_id): Delete.
6920
66af0f44
EZ
69212014-01-13 Eli Zaretskii <eliz@gnu.org>
6922
6923 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6924 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6925 versions.
6926
9939e131
PA
69272014-01-08 Pedro Alves <palves@redhat.com>
6928
6929 * server.c (handle_status): Don't discard previous queued stop
6930 replies or thread's pending status here.
6931 (main) <disconnection>: Do it here instead.
6932
b7ea362b
PA
69332014-01-08 Pedro Alves <palves@redhat.com>
6934
6935 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6936 * server.c (visit_actioned_threads, handle_pending_status): New
6937 function.
6938 (handle_v_cont): Factor out parts to ...
6939 (resume): ... this new function. If in all-stop, and a thread
6940 being resumed has a pending status, report it without actually
6941 resuming.
6942 (myresume): Adjust to use the new 'resume' function.
6943 (clear_pending_status_callback, set_pending_status_callback)
6944 (find_status_pending_thread_callback): New functions.
6945 (handle_status): Handle the case of multiple threads having
6946 interesting statuses to report. Report threads' real last signal
6947 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6948 with an interesting thread to report the status for, instead of
6949 always reporting the status of the first thread.
6950
28498c42
JB
69512014-01-01 Joel Brobecker <brobecker@adacore.com>
6952
6953 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6954 * gdbreplay.c (gdbreplay_version): Likewise.
6955
f45c82da
YZ
69562013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6957
6958 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6959 iov.iov_len with the real length in use.
6960
379a5e2d
JB
69612013-12-13 Joel Brobecker <brobecker@adacore.com>
6962
6963 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6964 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6965 for all targets that use win32-low.c.
6966 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6967 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6968
4210d83e
PA
69692013-12-13 Pedro Alves <palves@redhat.com>
6970
6971 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6972 if equal to TARGET_WAITKIND_LOADED.
6973 * win32-low.c (cached_status): New static global.
6974 (win32_wait): Add declaration.
6975 (do_initial_child_stuff): Flush all initial pending debug events
6976 up to the initial breakpoint.
6977 (win32_wait): If CACHED_STATUS was set, return that instead
6978 of doing a real wait. Remove the code resuming the execution
6979 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6980 during the initial phase. Also remove the code changing
6981 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6982 TARGET_WAITKIND_STOPPED.
6983
e7f0d979
YQ
69842013-12-11 Yao Qi <yao@codesourcery.com>
6985
6986 * notif.c (handle_notif_ack): Return 0 if no notification
6987 matches.
6988
ebcf782c
DE
69892013-11-20 Doug Evans <dje@google.com>
6990
6991 * linux-low.c (linux_set_resume_request): Fix comment.
6992
20ad9378
DE
69932013-11-20 Doug Evans <dje@google.com>
6994
6995 * linux-low.c (resume_status_pending_p): Tweak comment.
6996
a196ebeb
WT
69972013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6998
6999 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7000 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7001 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7002 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7003 (srv_amd64_regobj): Add amd64-mpx.o.
7004 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7005 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7006 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7007 * i387-fp.c (num_pl_bnd_register) Added constant.
7008 (num_pl_bnd_cfg_registers) Added constant.
7009 (struct i387_xsave) Added reserved area and MPX fields.
7010 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7011 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7012 function.
7013 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7014 (init_registers_amd64_mpx_linux): Declare new function.
7015 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7016 (x86_64_regmap): Add MPX registers.
7017 (x86_linux_read_description): Add MPX case.
7018 (initialize_low_arch): Initialize MPX targets.
7019
0080a2f6
TT
70202013-11-18 Tom Tromey <tromey@redhat.com>
7021
7022 * configure: Rebuild.
7023 * configure.ac: Don't check for stdlib.h.
7024 * gdbreplay.c: Unconditionally include stdlib.h.
7025
2978b111
TT
70262013-11-18 Tom Tromey <tromey@redhat.com>
7027
7028 * config.in: Rebuild.
7029 * configure: Rebuild.
7030 * configure.ac: Don't use AC_HEADER_DIRENT.
7031
a3d08894
TT
70322013-11-18 Tom Tromey <tromey@redhat.com>
7033
7034 * server.h: Don't check HAVE_STRING_H.
7035 * gdbreplay.c: Don't check HAVE_STRING_H.
7036 * configure: Rebuild.
7037
0a5dd17d
TT
70382013-11-18 Tom Tromey <tromey@redhat.com>
7039
7040 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7041 LIBGNU.
7042
1bd2f0ba
TT
70432013-11-08 Tom Tromey <tromey@redhat.com>
7044
7045 * configure, config.in: Rebuild.
7046 * configure.ac: Remove unused configury.
7047
3266f10b
TT
70482013-11-08 Tom Tromey <tromey@redhat.com>
7049
7050 * acinclude.m4: Include common.m4, codeset.m4.
7051 * configure, config.in: Rebuild.
7052 * configure.ac: Use GDB_AC_COMMON.
7053
6682d959
AA
70542013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7055
7056 * linux-s390-low.c (HWCAP_S390_TE): New define.
7057 (s390_arch_setup): Consider the TE field in the HWCAP for
7058 determining 'have_regset_tdb'.
7059
fd0a4d76
SDJ
70602013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7061
7062 PR gdb/16014
7063 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7064 call to sizeof.
7065
1a3d890b
PA
70662013-10-02 Pedro Alves <palves@redhat.com>
7067
7068 * server.c (process_serial_event): Don't output "GDBserver
7069 exiting" if GDB is connected through stdio.
7070 * target.c (mywait): Likewise, be silent if GDB is connected
7071 through stdio.
7072
97ad4581
JB
70732013-10-01 Joel Brobecker <brobecker@adacore.com>
7074
7075 * lynx-low.c (lynx_add_threads_after_attach): New function.
7076 (lynx_attach): Remove call to add_thread. Add call to
7077 lynx_add_threads_after_attach instead.
7078
5b4e221c
MF
70792013-09-28 Mike Frysinger <vapier@gentoo.org>
7080
7081 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7082 * config.in, configure: Regenerated.
7083
ee47b2f8
YQ
70842013-09-18 Yao Qi <yao@codesourcery.com>
7085
7086 PR server/15959
7087 * server.c (start_inferior): Clear 'resume_info'.
7088
d6707650 70892013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7090
d6707650
JW
7091 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7092 for each register.
7093
9243dd0e 70942013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7095
9243dd0e
JW
7096 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7097 linux-tile-low.o to srv_tgtobj.
7098
c623a6ef
WN
70992013-09-16 Will Newton <will.newton@linaro.org>
7100
7101 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7102 out regs.
7103
fb71d39e
PA
71042013-09-06 Pedro Alves <palves@redhat.com>
7105
7106 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7107 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7108 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7109 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7110 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7111 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7112
8e7e9910
PA
71132013-09-06 Pedro Alves <palves@redhat.com>
7114
7115 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7116 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7117
7c3a12ca
PA
71182013-09-06 Pedro Alves <palves@redhat.com>
7119
7120 * linux-amd64-ipa.c: Include tracepoint.h.
7121 * linux-i386-ipa.c: Include tracepoint.h.
7122
8eb3d7b6
RW
71232013-09-06 Ricard Wanderlof <ricardw@axis.com>
7124
7125 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7126 (ps_get_thread_area): New function.
7127
eddddb9d
RW
71282013-09-06 Ricard Wanderlof <ricardw@axis.com>
7129
7130 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7131 (initialize_low_arch): Call init_registers_crisv32 rather than
7132 init_register_crisv32.
7133
533b0600
PA
71342013-09-05 Pedro Alves <palves@redhat.com>
7135
7136 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7137 to ...
7138 * hostio.h: ... this new file.
7139 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7140 win32-low.c: Include hostio.h.
7141
0ce3d3b5
PA
71422013-09-05 Pedro Alves <palves@redhat.com>
7143
7144 * server.h (gdb_client_data, handler_func, callback_handler_func)
7145 (delete_file_handler, add_file_handler, append_callback_event)
7146 (delete_callback_event, start_event_loop, initialize_event_loop):
7147 Move to event-loop.h and include it.
7148 * event-loop.h: New file.
7149
799cdc37
PA
71502013-09-05 Pedro Alves <palves@redhat.com>
7151
7152 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7153 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7154 (loaded_dll, unloaded_dll): Move to ...
7155 * dll.h: ... this new file.
7156 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7157
6a6bbd9d
PA
71582013-09-05 Pedro Alves <palves@redhat.com>
7159
7160 * server.h (current_process, get_thread_process, all_processes)
7161 (add_inferior_to_list, for_each_inferior, current_inferior)
7162 (remove_inferior, add_process, remove_process, find_process_pid)
7163 (have_started_inferiors_p, have_attached_inferiors_p)
7164 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7165 (clear_inferiors, find_inferior, find_inferior_id)
7166 (inferior_target_data, set_inferior_target_data)
7167 (inferior_regcache_data, set_inferior_regcache_data): Move to
7168 inferiors.h, and include it.
7169 * inferiors.h: New file.
7170
f699aaba
PA
71712013-09-05 Pedro Alves <palves@redhat.com>
7172
7173 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7174 Move ...
72f4393d 7175 * ax.h: ... here.
f699aaba 7176
c144c7a0
PA
71772013-09-05 Pedro Alves <palves@redhat.com>
7178
7179 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7180 tracepoint.h.
7181 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7182 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7183 (handle_tracepoint_general_set, handle_tracepoint_query)
7184 (tracepoint_finished_step, tracepoint_was_hit)
7185 (release_while_stepping_state_list, current_traceframe)
7186 (in_readonly_region, traceframe_read_mem)
7187 (fetch_traceframe_registers, traceframe_read_sdata)
7188 (traceframe_read_info, struct fast_tpoint_collect_status)
7189 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7190 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7191 (supply_fast_tracepoint_registers)
7192 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7193 (ipa_tdesc, claim_trampoline_space)
7194 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7195 (agent_mem_read, agent_get_trace_state_variable_value)
7196 (agent_set_trace_state_variable_value, agent_tsv_read)
7197 (agent_mem_read_string, get_raw_reg_func_addr)
7198 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7199 * tracepoint.h: ... this new file.
7200
ff42e6ab
PA
72012013-09-05 Pedro Alves <palves@redhat.com>
7202
7203 * server.h (perror_with_name, error, fatal, warning, paddress)
7204 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7205 include it.
7206 * utils.h: New file.
7207
541af0f4
PA
72082013-09-05 Pedro Alves <palves@redhat.com>
7209
7210 * server.h (remote_debug, noack_mode, transport_is_reliable)
7211 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7212 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7213 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7214 (write_enn, initialize_async_io, enable_async_io)
7215 (disable_async_io, check_remote_input_interrupt_request)
7216 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7217 (dead_thread_notify, prepare_resume_reply)
7218 (decode_address_to_semicolon, decode_address, decode_m_packet)
7219 (decode_M_packet, decode_X_packet, decode_xfer_write)
7220 (decode_search_memory_packet, unhexify, hexify)
7221 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7222 (look_up_one_symbol, relocate_instruction)
7223 (monitor_output): Move to remote-utils.h, and include it.
7224 * remote-utils.h: New file.
7225
eebdf26b
PA
72262013-09-05 Pedro Alves <palves@redhat.com>
7227
7228 * server.h (_): Delete.
7229
3aafd2ff
PA
72302013-09-02 Pedro Alves <palves@redhat.com>
7231
7232 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7233 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7234 allocated.
7235 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7236
cee83bcb
PM
72372013-09-02 Pierre Muller <muller@sourceware.org>
7238
7239 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7240 or WriteProcessMemory complete successfully and handle
7241 ERROR_PARTIAL_COPY error.
7242
9a13b2fa
PA
72432013-09-02 Pedro Alves <palves@redhat.com>
7244
7245 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7246 error instead of EIO.
7247
602e3198
JK
72482013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7249
7250 PR server/15604
7251 * linux-low.c: Include filestuff.h.
7252 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7253 * lynx-low.c: Include filestuff.h.
7254 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7255 * server.c: Include filestuff.h.
7256 (main): Call notice_open_fds.
7257 * spu-low.c: Include filestuff.h.
7258 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7259
96d7229d
LM
72602013-08-22 Luis Machado <lgustavo@codesourcery.com>
7261
7262 * Makefile.in: Explain why ../target and ../nat are not
7263 listed as include file search paths.
7264 (linux-waitpid.o): New object file rule.
7265 * configure.srv (srv_native_linux_obj): New variable.
7266 Replace all occurrences of linux native object files with
7267 $srv_native_linux_obj.
7268 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7269 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7270 (linux_enable_event_reporting): Remove declaration.
7271 (my_waitpid): Moved to common/linux-waitpid.c.
7272 (linux_wait_for_event): Pass ptid when calling
7273 linux_enable_event_reporting.
7274 (linux_supports_tracefork_flag): Remove.
7275 (linux_enable_event_reporting): Likewise.
7276 (linux_tracefork_grandchild): Remove.
7277 (STACK_SIZE): Moved to common/linux-ptrace.c.
7278 (linux_tracefork_child): Remove.
7279 (linux_test_for_tracefork): Remove.
7280 (linux_look_up_symbols): Call linux_supports_traceclone.
7281 (initialize_low): Remove call to linux_test_for_tracefork.
7282 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7283 common/linux-ptrace.h.
7284 (PTRACE_TYPE_ARG4): Likewise.
7285 Include linux-ptrace.h.
7286
32940073
PA
72872013-08-21 Pedro Alves <palves@redhat.com>
7288
7289 * config.in: Renegerate.
7290
33b60d58 72912013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 7292
33b60d58
LM
7293 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7294 (SFILES): Remove $(srcdir)/common/target-common.c and
7295 add $(srcdir)/target/waitstatus.c.
7296 (OBS): Remove target-common.o and add waitstatus.o.
7297 (server_h): Remove $(srcdir)/../common/target-common.h and
7298 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7299 and $(srcdir)/../target/waitstatus.h.
7300 (target-common.o): Remove.
7301 (waitstatus.o): New target object file.
7302 * target.h: Do not include target-common.h and
7303 include target/resume.h, target/wait.h and
7304 target/waitstatus.h.
7305
b8e1b30e
LM
73062013-08-13 Luis Machado <lgustavo@codesourcery.com>
7307
7308 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7309 to PTRACE_TYPE_ARG3.
7310 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7311 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7312 PTRACE_TYPE_ARG4.
7313 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7314 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7315
7a60ad40
YQ
73162013-07-27 Jie Zhang <jie@codesourcery.com>
7317 Daniel Jacobowitz <dan@codesourcery.com>
7318 Yao Qi <yao@codesourcery.com>
7319
7320 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7321 (mips-linux-watch.o): New rule.
7322 (mips_linux_watch_h): New variable.
7323 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7324 srv_tgtobj.
7325 * linux-mips-low.c: Include mips-linux-watch.h.
7326 (struct arch_process_info, struct arch_lwp_info): New.
7327 (update_watch_registers_callback): New function.
7328 (mips_linux_new_process, mips_linux_new_thread) New functions.
7329 (mips_linux_prepare_to_resume, mips_insert_point): New
7330 functions.
7331 (mips_remove_point, mips_stopped_by_watchpoint): New
7332 functions.
7333 (rsp_bp_type_to_target_hw_bp_type): New function.
7334 (mips_stopped_data_address): New function.
7335 (the_low_target): Add watchpoint support functions.
7336
de6f69ad
YQ
73372013-07-27 Yao Qi <yao@codesourcery.com>
7338
7339 * i386-low.c: Include break-common.h.
7340 (enum target_hw_bp_type): Remove.
7341
3360c0bf
LM
73422013-07-24 Luis Machado <lgustavo@codesourcery.com>
7343
7344 * Makefile.in (SFILES): /common/target-common.c.
7345 (OBS): Add target-common.o.
7346 (server_h): Add $(srcdir)/../common/target-common.h.
7347 (target-common.o): New target.
7348 * server.c (queue_stop_reply_callback): Free
7349 status string after use.
7350 * target.c (target_waitstatus_to_string): Remove.
7351 * target.h: Include target-common.h.
7352 (resume_kind): Likewise.
7353 (target_waitkind): Likewise.
7354 (target_waitstatus): Likewise.
7355 (TARGET_WNOHANG): Likewise.
7356
bd885420
YQ
73572013-07-04 Yao Qi <yao@codesourcery.com>
7358
7359 * Makefile.in (host_alias): Use @host_noncanonical@.
7360 (target_alias): Use @target_noncanonical@.
7361 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7362 ACX_NONCANONICAL_HOST.
7363 * configure: Regenerated.
7364
7365 Revert:
7366 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7367
7368 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7369 * configure: Rebuild.
7370 * Makefile.in (version_host, version_target): Get from configure.
7371 (version.c): Use $(version_host) and $(version_target).
7372
17ef446e
PA
73732013-07-03 Pedro Alves <palves@redhat.com>
7374
7375 * Makefile.in (config.status): Depend on development.sh.
7376 * acinclude.m4: Include libmcheck.m4.
7377 * configure: Regenerate.
7378
7a9a7487
MG
73792013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7380
7381 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7382 attribute inside the parentheses.
7383 (winapi_DebugSetProcessKillOnExit): Ditto.
7384 (winapi_DebugBreakProcess): Ditto.
7385 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 7386
49b64de6
MG
73872013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7388
7389 * notif.h (notif_event): Add a dummy member to avoid compiler
7390 errors.
7391
d5749ee7
PA
73922013-07-01 Pedro Alves <palves@redhat.com>
7393
7394 * hostio.c (HOSTIO_PATH_MAX): Define.
7395 (require_filename, handle_open, handle_unlink, handle_readlink):
7396 Use it.
7397
d8d2a3ee
PA
73982013-07-01 Pedro Alves <palves@redhat.com>
7399
7400 * server.h: Include "pathmax.h".
7401 * linux-low.c: Don't include sys/param.h.
7402 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7403 MAXPATHLEN.
7404 * win32-low.c: Don't include sys/param.h.
7405 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7406
bc7dea8d
PA
74072013-07-01 Pedro Alves <palves@redhat.com>
7408
7409 * event-loop.c: Don't check HAVE_UNISTD_H before including
7410 <unistd.h>.
7411 * gdbreplay.c: Likewise.
7412 * remote-utils.c: Likewise.
7413 * server.c: Likewise.
7414 * configure.ac: Don't check for unistd.h.
7415 * configure: Regenerate.
7416
d6c2da54
TT
74172013-06-28 Tom Tromey <tromey@redhat.com>
7418
7419 * Makefile.in (version.c): Use version.in, not
7420 common/version.in.
7421
257b6bec
MG
74222013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7423
7424 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7425 * configure: Rebuild.
7426 * Makefile.in (version_host, version_target): Get from configure.
7427 (version.c): Use $(version_host) and $(version_target).
7428
86ebe149
DK
74292013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7430
7431 Fix trace-status to output user name without trailing colon.
7432 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7433
f30aa5af
DK
74342013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7435
7436 Fix trace-status to output proper start-time and stop-time.
7437 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7438 output start time and stop time in hex as gdb expects.
7439
28a93511
YQ
74402013-06-26 Pedro Alves <pedro@codesourcery.com>
7441
7442 * tracepoint.c (build_traceframe_info_xml): Output trace state
7443 variables present in the trace buffer.
7444
01208463
TT
74452013-06-24 Tom Tromey <tromey@redhat.com>
7446
7447 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7448 create-version.sh.
7449 (version.o): Remove.
7450 * gdbreplay.c: Include version.h.
7451 (version, host_name): Don't declare.
7452 * server.h: Include version.h.
7453 (version, host_name): Don't declare.
7454
760256f9
PA
74552013-06-12 Pedro Alves <palves@redhat.com>
7456
7457 * linux-x86-low.c (linux_is_elf64): Delete global.
7458 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7459 with local linux_pid_exe_is_elf_64_file use.
7460
030031ee
PA
74612013-06-11 Pedro Alves <palves@redhat.com>
7462
7463 * linux-low.c (regset_disabled, disable_regset): New functions.
7464 (regsets_fetch_inferior_registers)
7465 (regsets_store_inferior_registers): Use them.
7466 (initialize_regsets_info); Don't allocate the disabled_regsets
7467 array here.
7468 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7469 comment.
7470
5da6eb0a
PA
74712013-06-11 Pedro Alves <palves@redhat.com>
7472
7473 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7474 xmalloc.
7475
7e5aaa09
PA
74762013-06-11 Pedro Alves <palves@redhat.com>
7477
7478 * linux-x86-low.c (initialize_low_arch): Call
7479 init_registers_x32_avx_linux.
7480
d878444c
JK
74812013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7482
7483 Fix compatibility with Android Bionic.
7484 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7485 it is not empty.
7486
3aee8918
PA
74872013-06-07 Pedro Alves <palves@redhat.com>
7488
5f2b57b5 7489 PR server/14823
3aee8918
PA
7490 * Makefile.in (OBS): Add tdesc.o.
7491 (IPA_OBJS): Add tdesc-ipa.o.
7492 (tdesc-ipa.o): New rule.
7493 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7494 interface.
7495 * linux-low.c (new_inferior): Delete.
7496 (disabled_regsets, num_regsets): Delete.
7497 (linux_add_process): Adjust to set the new per-process
7498 new_inferior flag.
7499 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7500 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7501 was a stop. When calling arch_setup, switch the current inferior
7502 to the thread that got an event.
7503 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7504 (regsets_fetch_inferior_registers)
7505 (regsets_store_inferior_registers): New regsets_info parameter.
7506 Adjust to use it.
7507 (linux_register_in_regsets): New regs_info parameter. Adjust to
7508 use it.
7509 (register_addr, fetch_register, store_register): New usrregs_info
7510 parameter. Adjust to use it.
7511 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7512 parameter regs_info. Adjust to use it.
7513 (linux_fetch_registers): Get the current inferior's regs_info, and
7514 adjust to use it.
7515 (linux_store_registers): Ditto.
7516 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7517 (initialize_low): Don't initialize the target_regsets here. Call
7518 initialize_low_arch.
7519 * linux-low.h (target_regsets): Delete declaration.
7520 (struct regsets_info): New.
7521 (struct usrregs_info): New.
7522 (struct regs_info): New.
7523 (struct process_info_private) <new_inferior>: New field.
7524 (struct linux_target_ops): Delete the num_regs, regmap, and
7525 regset_bitmap fields. New field regs_info.
7526 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7527 * i387-fp.c (num_xmm_registers): Delete.
7528 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7529 calls to new interface.
7530 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7531 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7532 Infer the number of xmm registers from the regcache's target
7533 description.
7534 * i387-fp.h (num_xmm_registers): Delete.
7535 * inferiors.c (add_thread): Don't install the thread's regcache
7536 here.
7537 * proc-service.c (gregset_info): Fetch the current inferior's
7538 regs_info. Adjust to use it.
7539 * regcache.c: Include tdesc.h.
7540 (register_bytes, reg_defs, num_registers)
7541 (gdbserver_expedite_regs): Delete.
7542 (get_thread_regcache): If the thread doesn't have a regcache yet,
7543 create one, instead of aborting gdbserver.
7544 (regcache_invalidate_one): Rename to ...
7545 (regcache_invalidate_thread): ... this.
7546 (regcache_invalidate_one): New.
7547 (regcache_invalidate): Only invalidate registers of the current
7548 process.
7549 (init_register_cache): Add target_desc parameter, and use it.
7550 (new_register_cache): Ditto. Assert the target description has a
7551 non zero registers_size.
7552 (regcache_cpy): Add assertions. Adjust.
7553 (realloc_register_cache, set_register_cache): Delete.
7554 (registers_to_string, registers_from_string): Adjust.
7555 (find_register_by_name, find_regno, find_register_by_number)
7556 (register_cache_size): Add target_desc parameter, and use it.
7557 (free_register_cache_thread, free_register_cache_thread_one)
7558 (regcache_release, register_cache_size): New.
7559 (register_size): Add target_desc parameter, and use it.
7560 (register_data, supply_register, supply_register_zeroed)
7561 (supply_regblock, supply_register_by_name, collect_register)
7562 (collect_register_as_string, collect_register_by_name): Adjust.
7563 * regcache.h (struct target_desc): Forward declare.
7564 (struct regcache) <tdesc>: New field.
7565 (init_register_cache, new_register_cache): Add target_desc
7566 parameter.
7567 (regcache_invalidate_thread): Declare.
7568 (regcache_invalidate_one): Delete declaration.
7569 (regcache_release): Declare.
7570 (find_register_by_number, register_cache_size, register_size)
7571 (find_regno): Add target_desc parameter.
7572 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7573 declarations.
7574 * remote-utils.c: Include tdesc.h.
7575 (outreg, prepare_resume_reply): Adjust.
7576 * server.c: Include tdesc.h.
7577 (gdbserver_xmltarget): Delete declaration.
7578 (get_features_xml, process_serial_event): Adjust.
7579 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7580 declare.
7581 (struct process_info) <tdesc>: New field.
7582 (ipa_tdesc): Declare.
7583 * tdesc.c: New file.
7584 * tdesc.h: New file.
7585 * tracepoint.c: Include tdesc.h.
7586 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7587 (get_context_regcache): Adjust to pass ipa_tdesc down.
7588 (do_action_at_tracepoint): Adjust to get the register cache size
7589 from the context regcache's description.
7590 (traceframe_walk_blocks): Adjust to get the register cache size
7591 from the current trace frame's description.
7592 (traceframe_get_pc): Adjust to get current trace frame's
7593 description and pass it down.
7594 (gdb_collect): Adjust to get the register cache size from the
7595 IPA's description.
7596 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7597 (gdbserver_xmltarget): Delete.
7598 (initialize_low_tracepoint): Set the ipa's target description.
7599 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7600 (initialize_low_tracepoint): Set the ipa's target description.
7601 * linux-x86-low.c: Include tdesc.h.
7602 [__x86_64__] (is_64bit_tdesc): New.
7603 (ps_get_thread_area, x86_get_thread_area): Use it.
7604 (i386_cannot_store_register): Rename to ...
7605 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7606 (i386_cannot_fetch_register): Rename to ...
7607 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7608 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7609 to new interface.
7610 (target_regsets): Rename to ...
7611 (x86_regsets): ... this.
7612 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7613 interface.
7614 (x86_siginfo_fixup): Use is_64bit_tdesc.
7615 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7616 (tdesc_x32_avx_linux, tdesc_x32_linux)
7617 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7618 Declare.
7619 (x86_linux_update_xmltarget): Delete.
7620 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7621 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7622 (AMD64_LINUX_USER64_CS): New.
7623 (x86_linux_read_description): New, based on
7624 x86_linux_update_xmltarget.
7625 (same_process_callback): New.
7626 (x86_arch_setup_process_callback): New.
7627 (x86_linux_update_xmltarget): New.
7628 (x86_regsets_info): New.
7629 (amd64_linux_regs_info): New.
7630 (i386_linux_usrregs_info): New.
7631 (i386_linux_regs_info): New.
7632 (x86_linux_regs_info): New.
7633 (x86_arch_setup): Reimplement.
7634 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7635 (x86_emit_ops): Ditto.
7636 (the_low_target): Adjust. Install x86_linux_regs_info,
7637 x86_cannot_fetch_register, and x86_cannot_store_register.
7638 (initialize_low_arch): New.
7639 * linux-ia64-low.c (tdesc_ia64): Declare.
7640 (ia64_fetch_register): Adjust.
7641 (ia64_usrregs_info, regs_info): New globals.
7642 (ia64_regs_info): New function.
7643 (the_low_target): Adjust.
7644 (initialize_low_arch): New function.
7645 * linux-sparc-low.c (tdesc_sparc64): Declare.
7646 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7647 Adjust.
7648 (sparc_arch_setup): New function.
7649 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7650 (the_low_target): Adjust.
7651 (initialize_low_arch): New function.
7652 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7653 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7654 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7655 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7656 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7657 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7658 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7659 (tdesc_powerpc_isa205_vsx64l): Declare.
7660 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7661 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7662 (ppc_set_pc, ppc_get_hwcap): Adjust.
7663 (ppc_usrregs_info): Forward declare.
7664 (!__powerpc64__) ppc_regmap_adjusted: New global.
7665 (ppc_arch_setup): Adjust to the current process'es target
7666 description.
7667 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7668 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7669 (ppc_store_evrregset): Adjust.
7670 (target_regsets): Rename to ...
7671 (ppc_regsets): ... this, and make static.
7672 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7673 (ppc_regs_info): New function.
7674 (the_low_target): Adjust.
7675 (initialize_low_arch): New function.
7676 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7677 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7678 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7679 (tdesc_s390x_linux64v2): Declare.
7680 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7681 (s390_fill_gregset, s390_store_last_break): Adjust.
7682 (target_regsets): Rename to ...
7683 (s390_regsets): ... this, and make static.
7684 (s390_get_pc, s390_set_pc): Adjust.
7685 (s390_get_hwcap): New target_desc parameter, and use it.
7686 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7687 (s390_arch_setup): Adjust to set the current process'es target
7688 description. Don't adjust the regmap.
7689 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7690 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7691 (regs_info_3264): New globals.
7692 (s390_regs_info): New function.
7693 (the_low_target): Adjust.
7694 (initialize_low_arch): New function.
7695 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7696 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7697 [__mips64] (init_registers_mips_linux)
7698 (init_registers_mips_dsp_linux): Delete defines.
7699 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7700 (have_dsp): New global.
7701 (mips_read_description): New, based on mips_arch_setup.
7702 (mips_arch_setup): Reimplement.
7703 (get_usrregs_info): New function.
7704 (mips_cannot_fetch_register, mips_cannot_store_register)
7705 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7706 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7707 (target_regsets): Rename to ...
7708 (mips_regsets): ... this, and make static.
7709 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7710 (dsp_regs_info, regs_info): New globals.
7711 (mips_regs_info): New function.
7712 (the_low_target): Adjust.
7713 (initialize_low_arch): New function.
7714 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7715 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7716 Declare.
7717 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7718 (arm_read_description): New, with bits factored from
7719 arm_arch_setup.
7720 (arm_arch_setup): Reimplement.
7721 (target_regsets): Rename to ...
7722 (arm_regsets): ... this, and make static.
7723 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7724 (arm_regs_info): New function.
7725 (the_low_target): Adjust.
7726 (initialize_low_arch): New function.
7727 * linux-m68k-low.c (tdesc_m68k): Declare.
7728 (target_regsets): Rename to ...
7729 (m68k_regsets): ... this, and make static.
7730 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7731 (m68k_regs_info): New function.
7732 (m68k_arch_setup): New function.
7733 (the_low_target): Adjust.
7734 (initialize_low_arch): New function.
7735 * linux-sh-low.c (tdesc_sharch): Declare.
7736 (target_regsets): Rename to ...
7737 (sh_regsets): ... this, and make static.
7738 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7739 (sh_regs_info, sh_arch_setup): New functions.
7740 (the_low_target): Adjust.
7741 (initialize_low_arch): New function.
7742 * linux-bfin-low.c (tdesc_bfin): Declare.
7743 (bfin_arch_setup): New function.
7744 (bfin_usrregs_info, regs_info): New globals.
7745 (bfin_regs_info): New function.
7746 (the_low_target): Adjust.
7747 (initialize_low_arch): New function.
7748 * linux-cris-low.c (tdesc_cris): Declare.
7749 (cris_arch_setup): New function.
7750 (cris_usrregs_info, regs_info): New globals.
7751 (cris_regs_info): New function.
7752 (the_low_target): Adjust.
7753 (initialize_low_arch): New function.
7754 * linux-cris-low.c (tdesc_crisv32): Declare.
7755 (cris_arch_setup): New function.
7756 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7757 (cris_regs_info): New function.
7758 (the_low_target): Adjust.
7759 (initialize_low_arch): New function.
7760 * linux-m32r-low.c (tdesc_m32r): Declare.
7761 (m32r_arch_setup): New function.
7762 (m32r_usrregs_info, regs_info): New globals.
7763 (m32r_regs_info): Adjust.
7764 (initialize_low_arch): New function.
7765 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7766 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7767 (tic6x_usrregs_info): Forward declare.
7768 (tic6x_read_description): New function, based on ...
7769 (tic6x_arch_setup): ... this. Reimplement.
7770 (target_regsets): Rename to ...
7771 (tic6x_regsets): ... this, and make static.
7772 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7773 (tic6x_regs_info): New function.
7774 (the_low_target): Adjust.
7775 (initialize_low_arch): New function.
7776 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7777 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7778 (target_regsets): Rename to ...
7779 (xtensa_regsets): ... this, and make static.
7780 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7781 globals.
7782 (xtensa_arch_setup, xtensa_regs_info): New functions.
7783 (the_low_target): Adjust.
7784 (initialize_low_arch): New function.
7785 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7786 (nios2_arch_setup): Set the current process'es tdesc.
7787 (target_regsets): Rename to ...
7788 (nios2_regsets): ... this.
7789 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7790 (nios2_regs_info): New function.
7791 (the_low_target): Adjust.
7792 (initialize_low_arch): New function.
a261b8f5
PA
7793 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7794 (aarch64_arch_setup): Set the current process'es tdesc.
7795 (target_regsets): Rename to ...
7796 (aarch64_regsets): ... this.
7797 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7798 (aarch64_regs_info): New function.
7799 (the_low_target): Adjust.
7800 (initialize_low_arch): New function.
3aee8918
PA
7801 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7802 globals.
7803 (target_regsets): Rename to ...
7804 (tile_regsets): ... this.
7805 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7806 (tile_regs_info): New function.
7807 (tile_arch_setup): Set the current process'es tdesc.
7808 (the_low_target): Adjust.
7809 (initialize_low_arch): New function.
7810 * spu-low.c (tdesc_spu): Declare.
7811 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7812 * win32-arm-low.c (tdesc_arm): Declare.
7813 (arm_arch_setup): New function.
7814 (the_low_target): Install arm_arch_setup instead of
7815 init_registers_arm.
7816 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7817 (init_windows_x86): Rename to ...
7818 (i386_arch_setup): ... this. Set `win32_tdesc'.
7819 (the_low_target): Adjust.
7820 * win32-low.c (win32_tdesc): New global.
7821 (child_add_thread): Don't create the thread cache here.
7822 (do_initial_child_stuff): Set the new process'es tdesc.
7823 * win32-low.h (struct target_desc): Forward declare.
7824 (win32_tdesc): Declare.
7825 * lynx-i386-low.c (tdesc_i386): Declare global.
7826 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7827 * lynx-low.c (lynx_tdesc): New global.
7828 (lynx_add_process): Set the new process'es tdesc.
7829 * lynx-low.h (struct target_desc): Forward declare.
7830 (lynx_tdesc): Declare global.
7831 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7832 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7833 * nto-low.c (nto_tdesc): New global.
7834 (do_attach): Set the new process'es tdesc.
7835 * nto-low.h (struct target_desc): Forward declare.
7836 (nto_tdesc): Declare.
7837 * nto-x86-low.c (tdesc_i386): Declare.
7838 (nto_x86_arch_setup): Set `nto_tdesc'.
7839
b1fbec62
GB
78402013-06-04 Gary Benson <gbenson@redhat.com>
7841
7842 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7843 to qSupported response when appropriate.
7844 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7845 with nonzero-length annex.
7846 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7847 arguments supplied in annex.
7848
d1ec4ce7
DE
78492013-05-31 Doug Evans <dje@google.com>
7850
ac44adcb 7851 PR server/15594
d1ec4ce7
DE
7852 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7853 64 bits in 64-cross-32 environment.
7854
9b25f2d3
PA
78552013-05-28 Pedro Alves <palves@redhat.com>
7856
7857 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7858 (aarch64-without-fpu.c): Delete rule.
7859 * configure.srv (aarch64*-*-linux*): Remove references to
7860 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7861 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7862 declaration.
7863
6740dc9c
PA
78642013-05-24 Pedro Alves <palves@redhat.com>
7865
7866 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7867 instead of strchr/decode_address. Error if the range isn't split
7868 with a ','. Don't assume there's be a ':' in the action.
7869
c2d6af84
PA
78702013-05-23 Yao Qi <yao@codesourcery.com>
7871 Pedro Alves <palves@redhat.com>
7872
7873 * linux-low.c (lwp_in_step_range): New function.
7874 (linux_wait_1): If the thread was range stepping and stopped
7875 outside the stepping range, report the stop to GDB. Otherwise,
7876 continue stepping. Add range stepping debug output.
7877 (linux_set_resume_request): Copy the step range from the resume
7878 request to the lwp.
7879 (linux_supports_range_stepping): New.
7880 (linux_target_ops) <supports_range_stepping>: Set to
7881 linux_supports_range_stepping.
7882 * linux-low.h (struct linux_target_ops)
7883 <supports_range_stepping>: New field.
7884 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7885 * linux-x86-low.c (x86_supports_range_stepping): New.
7886 (the_low_target) <supports_range_stepping>: Set to
7887 x86_supports_range_stepping.
7888 * server.c (handle_v_cont): Handle 'r' action.
7889 (handle_v_requests): Append ";r" if the target supports range
7890 stepping.
7891 * target.h (struct thread_resume) <step_range_start,
7892 step_range_end>: New fields.
7893 (struct target_ops) <supports_range_stepping>:
7894 New field.
7895 (target_supports_range_stepping): New macro.
7896
58794e1a
JB
78972013-05-17 Joel Brobecker <brobecker@adacore.com>
7898
7899 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7900 confusion in comment.
7901
d631c5a7
JB
79022013-05-17 Joel Brobecker <brobecker@adacore.com>
7903
7904 * lynx-low.c (struct process_info_private): New type.
7905 (lynx_add_process): New function.
7906 (lynx_create_inferior, lynx_attach): Replace calls to
7907 add_process by calls to lynx_add_process.
7908 (lynx_resume): If PTID is null, then try using
7909 current_process()->private->last_wait_event_ptid.
7910 Add comments.
7911 (lynx_clear_inferiors): Delete. The contents of that function
7912 has been inlined in lynx_mourn;
7913 (lynx_wait_1): Save the ptid in the process's private data.
7914 (lynx_mourn): Free the process' private data. Replace call
7915 to lynx_clear_inferiors by call to clear_inferiors.
7916
96f7a20f
YQ
79172013-05-17 Yao Qi <yao@codesourcery.com>
7918
7919 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7920 the right place.
7921
db0dfaa0
LM
79222013-05-16 Luis Machado <lgustavo@codesourcery.com>
7923
7924 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7925 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7926 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7927 PT_TEXT_END_ADDR guards. Update comments.
7928 (linux_target_op) <read_offsets>: Conditionally define to
7929 linux_read_offsets if the target is UCLIBC and if it defines
7930 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7931
68f5f838
SL
79322013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7933 Andrew Jenner <andrew@codesourcery.com>
7934
7935 * Makefile.in (SFILES): Add linux-nios2-low.c.
7936 (clean): Add action to delete nios2-linux.c.
7937 (nios2-linux.c): New rule.
7938 * configure.srv: Add nios2*-*-linux*.
7939 * linux-nios2-low.c: New.
7940
1ebff1fd
HAQ
79412013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7942
7943 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7944
f6150862
HZ
79452013-04-25 Hui Zhu <hui@codesourcery.com>
7946
7947 PR gdb/15186
f6150862
HZ
7948 * ax.c (ax_printf): Add fflush.
7949
614c279d
TT
79502013-04-22 Tom Tromey <tromey@redhat.com>
7951
7952 * Makefile.in (SFILES): Add filestuff.c.
7953 (OBS): Add filestuff.o.
7954 (filestuff.o): New target.
7955 * config.in, configure: Rebuild.
7956 * configure.ac: Check for fdwalk, pipe2.
7957
7d4e5717
PA
79582013-04-17 Pedro Alves <palves@redhat.com>
7959
7960 * configure.ac (USE_THREAD_DB): Delete variable.
7961 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7962 Don't AC_SUBST USE_THREAD_DB.
7963 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7964 * config.in, configure: Regenerate.
7965
d5c93e41
PA
79662013-04-16 Pedro Alves <palves@redhat.com>
7967
7968 * linux-low.h (struct lwp_info) <thread_known>: Move under
7969 the USE_THREAD_DB #ifdef.
7970
04f5fe89
PA
79712013-04-16 Pedro Alves <palves@redhat.com>
7972
7973 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7974 (linux-low.o): Delete rule.
7975 * linux-low.h: Always include "gdb_thread_db.h" instead of
7976 conditionally including thread_db.h.
7977 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7978 HAVE_THREAD_DB_H.
7979
480b27bf
JK
79802013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7981
7982 * Makefile.in (install-only): Fix make install regression.
7983
43662968
JK
79842013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7985
7986 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7987 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7988 installation.
7989 * gdbserver.1: Remove.
7990
3e74e146
PA
79912013-03-22 Pedro Alves <palves@redhat.com>
7992
7993 * linux-low.c (handle_extended_wait): Don't call
7994 linux_enable_event_reporting.
7995
a8347a2a
TT
79962013-03-15 Tony Theodore <tonyt@logyst.com>
7997
7998 PR build/9098:
7999 * Makefile.in (SHELL): Use @SHELL@.
8000
eeb56fa7
SDJ
80012013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8002
8003 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8004 compiler warning.
8005
4fa7e2ff
JB
80062013-03-13 Joel Brobecker <brobecker@adacore.com>
8007
8008 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8009 Remove extraneous NULL element.
8010
8ddb1965
YQ
80112013-03-13 Yao Qi <yao@codesourcery.com>
8012
8013 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8014 'V' block in trace frame.
8015
9accd112
MM
80162013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8017
8018 * target.h (struct target_ops): Add btrace ops.
8019 (target_supports_btrace): New macro.
8020 (target_enable_btrace): New macro.
8021 (target_disable_btrace): New macro.
8022 (target_read_btrace): New macro.
8023 * gdbthread.h (struct thread_info): Add btrace field.
8024 * server.c: Include btrace-common.h.
8025 (handle_btrace_general_set): New function.
8026 (handle_btrace_enable): New function.
8027 (handle_btrace_disable): New function.
8028 (handle_general_set): Call handle_btrace_general_set.
8029 (handle_qxfer_btrace): New function.
8030 (struct qxfer qxfer_packets[]): Add btrace entry.
8031 * inferiors.c (remove_thread): Disable btrace.
8032 * linux-low: Include linux-btrace.h.
8033 (linux_low_enable_btrace): New function.
8034 (linux_low_read_btrace): New function.
8035 (linux_target_ops): Add btrace ops.
8036 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8037 Add srv_linux_btrace=yes.
8038 (x86_64-*-linux*): Add linux-btrace.o.
8039 Add srv_linux_btrace=yes.
8040 * configure.ac: Define HAVE_LINUX_BTRACE.
8041 * config.in: Regenerated.
8042 * configure: Regenerated.
8043
5cc22e4c
MM
80442013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8045
8046 * server.c (handle_qxfer): Preserve error message if -3 is
8047 returned.
8048 (qxfer): Document the -3 return value.
8049
7c97f91e
MM
80502013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8051
8052 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8053 (linux_btrace_h): New variable.
8054 (linux-btrace.o): New rule.
8055
be9a119c 80562013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
8057 Hafiz Abid Qadeer <abidh@codesourcery.com>
8058
8059 * tracepoint.c (trace_buffer_size): New global.
8060 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8061 (init_trace_buffer): Change to one-argument function. Allocate
8062 trace buffer memory.
8063 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8064 handle QTBuffer:size packet.
8065 (cmd_bigqtbuffer_size): New function.
8066 (initialize_tracepoint): Call init_trace_buffer with
8067 DEFAULT_TRACE_BUFFER_SIZE.
8068 * server.c (handle_query): Add QTBuffer:size in the
8069 supported packets.
8070
e64f7499
YQ
80712013-03-07 Yao Qi <yao@codesourcery.com>
8072
8073 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8074 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8075 of -1.
8076 (cmd_qtsp): Adjust condition. Do post increment.
8077 Set cur_action and cur_step_action back to 0.
8078
f0ae6fc3
PA
80792013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8080
8081 PR server/15236
8082 * linux-low.c (linux_write_memory): Return early success if LEN is
8083 zero.
8084
b5b0b0af
CV
80852013-03-05 Corinna Vinschen <vinschen@redhat.de>
8086
334ad4a8 8087 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 8088
589bc927
TT
80892013-02-28 Tom Tromey <tromey@redhat.com>
8090
8091 * configure.ac: Invoke AC_SYS_LARGEFILE.
8092 * configure, config.in: Rebuild.
8093
dfe07582
CV
80942013-02-28 Corinna Vinschen <vinschen@redhat.com>
8095
8096 * win32-low.c: Throughout, fix format strings and casts of
8097 printf-like functions to avoid type related warnings on all
8098 platforms.
8099 (get_child_debug_event): Print dwDebugEventCode as hex since
8100 that's how it's usually documented.
8101
736cd585
YQ
81022013-02-28 Yao Qi <yao@codesourcery.com>
8103
8104 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8105 pulongest.
8106
e1f58301
JW
81072013-02-27 Jiong Wang <jiwang@tilera.com>
8108
8109 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8110 (reg-tilegx32.c): New rule.
8111 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8112 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8113 different register info initializer according to elf class.
8114 (init_registers_tilgx32): New function. The tilegx32 register info
8115 initializer.
8116 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8117 (tile_store_gregset): Likewise.
8118
d171ca78
YQ
81192013-02-27 Yao Qi <yao@codesourcery.com>
8120
8121 * server.c (process_point_options): Print debug message when
8122 debug_threads is true.
8123
282bbdf3
YQ
81242013-02-26 Yao Qi <yao@codesourcery.com>
8125
8126 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8127
aca22551
PA
81282013-02-19 Pedro Alves <palves@redhat.com>
8129 Kai Tietz <ktietz@redhat.com>
8130
8131 PR gdb/15161
8132
8133 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8134 instead of strtoul to extract address from packet.
8135 (process_serial_event) <'z'>: Likewise.
8136
4f3cee1c
YQ
81372013-02-18 Yao Qi <yao@codesourcery.com>
8138
8139 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8140
8e1d55a3
PA
81412013-02-14 Pedro Alves <palves@redhat.com>
8142
8143 Plug memory leak.
8144
8145 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8146 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8147
458820da
PA
81482013-02-14 Pedro Alves <palves@redhat.com>
8149
8150 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8151
baea0dae
PA
81522013-02-14 Pedro Alves <palves@redhat.com>
8153
8154 * tracepoint.c (save_string): Delete.
8155 (add_tracepoint_action): Use savestring instead of save_string.
8156
0b1afbb3
PA
81572013-02-12 Pedro Alves <palves@redhat.com>
8158
8159 * linux-xtensa-low.c: Ditto.
8160 * xtensa-xtregs.c: Ditto.
8161
8a4ac37e
PA
81622013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8163
8164 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8165 thread_db.
8166
148de6bb
MS
81672013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8168
8169 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8170 aarch64_num_wp_regs and aarch64_num_bp_regs to
8171 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8172
55fac6e0
MS
81732013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8174
8175 * linux-aarch64-low.c (ps_get_thread_area): Replace
8176 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8177
176eb98c
MS
81782013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8179 Marcus Shawcroft <marcus.shawcroft@arm.com>
8180 Nigel Stephens <nigel.stephens@arm.com>
8181 Yufeng Zhang <yufeng.zhang@arm.com>
8182
8183 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8184 (aarch64.c, aarch64-without-fpu.c): New targets.
8185 * configure.srv (aarch64*-*-linux*): New.
8186 * linux-aarch64-low.c: New file.
8187
56f7af9c
MS
81882013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8189
43aaf8b6 8190 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
8191 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8192 (dequeue_one_deferred_signal, linux_resume_one_thread)
8193 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8194 (linux_tracefork_grandchild, linux_test_for_tracefork)
8195 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8196 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8197 where the argument is 0.
8198
60f662b0
YQ
81992013-01-25 Yao Qi <yao@codesourcery.com>
8200
8201 * event-loop.c: Include "queue.h".
8202 (gdb_event_p): New typedef.
8203 (struct gdb_event) <next_event>: Remove.
8204 (event_queue): Change to QUEUE(gdb_event_p).
8205 (async_queue_event): Remove.
8206 (gdb_event_xfree): New.
8207 (initialize_event_loop): New.
8208 (process_event): Use API from QUEUE.
8209 (wait_for_event): Likewise.
8210 * server.c (main): Call initialize_event_loop.
8211 * server.h (initialize_event_loop): Declare.
8212
5ae4861a
YQ
82132013-01-18 Yao Qi <yao@codesourcery.com>
8214
8215 * ax.h (struct eval_agent_expr_context): New.
8216 (gdb_eval_agent_expr): Update declaration.
8217 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8218 TFRAME. Add new argument CTX.
8219 * server.h (struct eval_agent_expr_context): Declare.
8220 (agent_mem_read, agent_tsv_read): Update declaration.
8221 (agent_mem_read_string): Likewise.
8222 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8223 (add_traceframe_block): Add new argument TPOINT.
8224 Increase TPOINT->traceframe_usage.
8225 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8226 eval_tracepoint_agent_expr.
8227 (condition_true_at_tracepoint): Likewise.
8228 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8229 (agent_mem_read_string, agent_tsv_read): Likewise.
8230
85e00e85
YQ
82312013-01-16 Yao Qi <yao@codesourcery.com>
8232
8233 * linux-low.c (linux_resume_one_lwp): Don't check
8234 'lwp->bp_reinsert != 0'.
8235
4039cf45
JB
82362013-01-07 Joel Brobecker <brobecker@adacore.com>
8237 Pedro Alves <palves@redhat.com>
8238
8239 * lynx-low.c (ptrace_request_to_str): Define a temporary
8240 macro and use it to simplify this function's implementation.
8241
9044dee2
JB
82422013-01-07 Joel Brobecker <brobecker@adacore.com>
8243
8244 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8245 sets errno.
8246
e6352c8f
JB
82472013-01-07 Joel Brobecker <brobecker@adacore.com>
8248
8249 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8250
50681a27
JB
82512013-01-07 Joel Brobecker <brobecker@adacore.com>
8252
8253 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8254
3f6e77ef
JB
82552013-01-07 Joel Brobecker <brobecker@adacore.com>
8256
8257 * lynx-low.c (lynx_resume): Use the resume_info parameter
8258 to determine the ptid for the lynx_ptrace call, unless
8259 it is equal to minus_one_ptid, in which case we use the
8260 ptid of the current_inferior.
8261 (lynx_wait_1): After having received a thread create/exit
8262 event, resume the inferior's execution using the signaling
8263 thread's ptid, rather than the old ptid.
8264
7fda33ae
JB
82652013-01-07 Joel Brobecker <brobecker@adacore.com>
8266
8267 * lynx-low.c (lynx_resume): Delete variable ret.
8268
b9786c74
JB
82692013-01-01 Joel Brobecker <brobecker@adacore.com>
8270
8271 * gdbreplay.c (gdbreplay_version): Update copyright year.
8272 * server.c (gdbserver_version): Likewise.
8273
8b93d60f
JB
82742012-12-17 Joel Brobecker <brobecker@adacore.com>
8275
8276 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8277 new thread.
8278
037335a7
JB
82792012-12-17 Joel Brobecker <brobecker@adacore.com>
8280
8281 * lynx-low.c (ptrace_request_to_str): Add handling for
8282 PTRACE_GETTRACESIG.
8283
52d4cbd8
JB
82842012-12-17 Joel Brobecker <brobecker@adacore.com>
8285
8286 * lynx-low.c (lynx_attach): Delete variable new_process.
8287
ab8f6ca9
JB
82882012-12-17 Joel Brobecker <brobecker@adacore.com>
8289
8290 * lynx-low.c (lynx_create_inferior): Delete variable
8291 new_process.
8292
78cbc024
JB
82932012-12-17 Joel Brobecker <brobecker@adacore.com>
8294
8295 * lynx-low.c (ptrace_request_to_str): Do not handle
8296 PTRACE_GETTHREADLIST if this macro does not exist.
8297
14a00470
YQ
82982012-12-15 Yao Qi <yao@codesourcery.com>
8299
8300 * Makefile.in (OBS): Add notif.o.
8301 * notif.c, notif.h: New.
8302 * server.c: Include "notif.h".
8303 (struct vstop_notif) <next>: Remove.
8304 <base>: New field.
8305 (queue_stop_reply): Update.
8306 (push_event, send_next_stop_reply): Remove.
8307 (discard_queued_stop_replies): Update.
8308 (notif_stop): New variable.
8309 (handle_v_stopped): Remove.
8310 (handle_v_requests): Don't call handle_v_stopped. Call
8311 handle_ack_notif instead.
8312 (queue_stop_reply_callback): Call notif_event_enque instead
8313 of queue_stop_reply.
8314 (handle_status): Don't call send_next_stop_reply, call
8315 notif_write_event instead.
8316 (kill_inferior_callback): Likewise.
8317 (detach_or_kill_inferior_callback): Likewise.
8318 (main): Call initialize_notif.
8319 (process_serial_event): Call QUEUE_is_empty.
8320 (handle_target_event): Call notif_push instead of push event.
8321 * server.h (push_event): Remove declaration.
8322
61c125b9
TT
83232012-12-10 Tom Tromey <tromey@redhat.com>
8324
8325 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8326 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8327 macros.
8328 (.c.o): Rewrite.
8329 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8330 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8331 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8332 (amd64-linux-ipa.o, ax.o): Rewrite.
8333 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8334 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8335 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8336 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8337 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8338 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8339 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8340 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8341 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8342 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8343 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8344 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8345 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8346 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8347 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8348 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8349 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8350 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8351 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8352 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8353 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8354 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8355 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8356 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8357 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8358 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8359 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8360 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8361 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8362 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8363 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8364 (reg-tilegx.o): Remove.
8365 (all_object_files): New macro.
8366 Include .deps files.
8367 * aclocal.m4, configure: Rebuild.
8368 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8369 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8370 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8371
e90e9ad9
TT
83722012-12-05 Tom Tromey <tromey@redhat.com>
8373
8374 PR gdb/14917:
8375 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8376
02d403bf 83772012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
8378
8379 * configure.ac: Check for linux/perf_event.h.
8380 * config.in: Regenerated.
8381 * configure: Regenerated.
8382
0270a750
PA
83832012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8384
8385 * hostio.c (handle_readlink): Decrease buffer size
8386 parameter passed to readlink by one byte.
8387
8c29b58e
YQ
83882012-11-26 Yao Qi <yao@codesourcery.com>
8389
8390 * configure.ac (build_warnings): Append '-Wempty-body'.
8391 * configure: Regenerated.
8392 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8393 body.
8394
8bdce1ff
PM
83952012-11-15 Pierre Muller <muller@sourceware.org>
8396
8397 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8398 * config.in: Regenerate.
8399 * configure: Regenerate.
8400 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8401 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8402 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8403 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8404 header.
8405 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8406 instead of <sys/wait.h> header.
8407 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8408
02d403bf 84092012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
8410
8411 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8412 (various make rules): Remove -DGDBSERVER
8413
fbd5db48
YQ
84142012-11-09 Yao Qi <yao@codesourcery.com>
8415
8416 * spu-low.c (current_ptid): Move it to ..
8417 * gdbthread.h: ... here. New.
8418 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8419 * server.c (myresume, process_serial_event): Likewise.
8420 * thread-db.c (thread_db_find_new_threads): Likewise.
8421 * tracepoint.c (run_inferior_command): Likewise.
8422
b3dc46ff
AB
84232012-10-01 Andrew Burgess <aburgess@broadcom.com>
8424
8425 * server.c (handle_search_memory_1): Include access length in
8426 warning message.
8427
07c04788
HPN
84282012-09-05 Michael Brandt <michael.brandt@axis.com>
8429
8430 * linux-crisv32-low.c: Fix compile errors.
8431
918d227b
YQ
84322012-09-04 Yao Qi <yao@codesourcery.com>
8433
8434 * tracepoint.c (cmd_qtsv): Adjust debug message.
8435 Don't check CUR_TPOINT.
8436
18c1b81a
YQ
84372012-08-28 Yao Qi <yao@codesourcery.com>
8438
8439 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8440 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8441 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8442 Remove declarations of xmalloc, xreallloc, xstrdup and
8443 freeargv.
8444 * Makefile.in (libiberty_h): New.
8445 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8446 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8447
dc82f37b
YQ
84482012-08-23 Yao Qi <yao@codesourcery.com>
8449
8450 * server.h: Remove declaration of 'xsnprintf'.
8451
406b1477
KS
84522012-08-22 Keith Seitz <keiths@redhat.com>
8453
8454 * server.h: Include build-gnulib-gbserver/config.h.
8455 * gdbreplay.c: Likewise.
8456
e6712ff1
DE
84572012-08-08 Doug Evans <dje@google.com>
8458
8459 * Makefile.in (SFILES): Add gdb_vecs.c.
8460 (OBS): Add gdb_vecs.o.
8461 (gdb_vecs_h, host_defs_h): New variables.
8462 (thread-db.o): Add $(gdb_vecs_h) dependency.
8463 (gdb_vecs.o): New rule.
8464 * thread-db.c: #include "gdb_vecs.h".
8465 (thread_db_load_search): Use a vector to iterate over path elements.
8466 Handle text appearing after "$pdir".
8467
8468 * configure.ac: Add check for strstr.
8469 * config.in: Regenerate.
8470 * configure: Regenerate.
8471
7c3270ae
UW
84722012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8473
8474 * hostio.c (handle_pread): If pread fails, fall back to attempting
8475 lseek/read.
8476 (handle_pwrite): Likewise for pwrite.
8477
b62e2b27
UW
84782012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8479
8480 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8481 between unsupported TYPE and unimplementable ADDR/LEN combination.
8482 (arm_insert_point): Act on new return value.
8483
78a99e91
PA
84842012-07-31 Pedro Alves <palves@redhat.com>
8485
8486 * server.c (process_point_options): Only skip tokens if we find
8487 one that is unrecognized. Don't treat 'X' specially while
8488 skipping unrecognized tokens.
8489
fcf303ab
UW
84902012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8491
8492 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8493 to 4-byte-align HW breakpoint addresses for Thumb.
8494
7255706c
YQ
84952012-07-27 Yao Qi <yao@codesourcery.com>
8496
8497 PR remote/14161.
8498
8499 * server.h: Declare gdb_agent_about_to_close.
8500 * target.c (kill_inferior): Include "agent.h".
8501 New. Send command 'kill'.
8502 * target.h (kill_inferior): Removed macro.
8503 * tracepoint.c (gdb_agent_about_to_close): New.
8504 (gdb_agent_helper_thread): Handle command 'close'.
8505 Wait endlessly until the inferior stops.
8506 Install gdb_agent_remove_socket to atexit hook.
8507 (agent_socket_name): New static variable.
8508 (gdb_agent_socket_init): Replace local variable 'name' with
8509 'agent_socket_name'.
8510 (gdb_agent_remove_socket): New.
8511
5a3f286f
YQ
85122012-07-27 Yao Qi <yao@codesourcery.com>
8513
8514 * server.c (process_point_options): Stop at 'X' when parsing.
8515
961bd387
ME
85162012-07-19 Michael Eager <eager@eagercon.com>
8517
a261b8f5 8518 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
8519 to hw_execute.
8520 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8521 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8522 hardware breakpoint.
8523
aa7c7447
JK
85242012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8525
8526 * gdbserver/linux-low.c (initialize_low): Call
8527 linux_ptrace_init_warnings.
8528
7f216e7c
DE
85292012-07-02 Doug Evans <dje@google.com>
8530
8531 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8532 pointer to int.
8533
d3ce09f5
SS
85342012-07-02 Stan Shebs <stan@codesourcery.com>
8535
8536 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8537 (ax.o): Add it to build rule.
8538 (ax-ipa.o): Ditto.
8539 (OBS): Add format.o.
8540 (IPA_OBS): Add format.o.
8541 * server.c (handle_query): Claim support for breakpoint commands.
8542 (process_point_options): Add command case.
8543 (process_serial_event): Leave running if there are printfs in
8544 effect.
8545 * mem-break.h (any_persistent_commands): Declare.
8546 (add_breakpoint_commands): Declare.
8547 (gdb_no_commands_at_breakpoint): Declare.
8548 (run_breakpoint_commands): Declare.
8549 * mem-break.c (struct point_command_list): New struct.
8550 (struct breakpoint): New field command_list.
8551 (any_persistent_commands): New function.
8552 (add_commands_to_breakpoint): New function.
8553 (add_breakpoint_commands): New function.
8554 (gdb_no_commands_at_breakpoint): New function.
8555 (run_breakpoint_commands): New function.
8556 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8557 locally.
8558 * ax.c: Include format.h.
8559 (ax_printf): New function.
8560 (gdb_eval_agent_expr): Add printf opcode.
8561
2f8f6aed
YQ
85622012-06-13 Yao Qi <yao@codesourcery.com>
8563
8564 * server.c (start_inferior): Remove duplicated writes to fields
8565 'last_resume_kind' and 'last_status' of 'current_inferior'.
8566
0c9070b3
YQ
85672012-06-12 Yao Qi <yao@codesourcery.com>
8568 Pedro Alves <palves@redhat.com>
8569
8570 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8571 comment.
8572 * server.c (handle_v_cont): Extend comment.
8573
c52daf70
YQ
85742012-06-11 Yao Qi <yao@codesourcery.com>
8575
8576 * linux-low.c (linux_attach): Add 'static'.
8577
d38bbb0a
YQ
85782012-06-06 Yao Qi <yao@codesourcery.com>
8579
8580 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8581
89dc0afd
JK
85822012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8583
8584 Fix gcc -flto compilation warning.
8585 * server.c (main): Make variable multi_mode and attach volatile.
8586
75f62ce7
TJB
85872012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8588
8589 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8590 if the platform doesn't know about it.
8591
65f479b6
PA
85922012-05-30 Jeff Kenton <jkenton@tilera.com>
8593
8594 * Makefile.in (SFILES): Add linux-tile-low.c.
8595 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8596 * configure.srv: Handle tilegx-*-linux*.
8597 * linux-tile-low.c: New file.
8598
0c5bf5a9
JK
85992012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8600
8601 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8602
a493e3e2
PA
86032012-05-24 Pedro Alves <palves@redhat.com>
8604
8605 PR gdb/7205
8606
43aaf8b6 8607 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 8608
2ea28649
PA
86092012-05-24 Pedro Alves <palves@redhat.com>
8610
8611 PR gdb/7205
8612
8613 Replace target_signal with gdb_signal throughout.
8614
8d409d16
MR
86152012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8616
8617 * linux-low.c (linux_store_registers): Avoid the copying sequence
8618 when no data has been retrieved by ptrace.
8619
23512c01
MGD
86202012-05-22 Will Deacon <will.deacon@arm.com>
8621
8622 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8623 Include asm/ptrace.h.
8624 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8625 already defined.
8626
4934b29e
MR
86272012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8628
8629 * linux-low.c (linux_store_registers): Don't re-retrieve data
8630 with ptrace that has already been obtained from /proc. Always
8631 copy any data retrieved with ptrace to the buffer supplied.
8632
bde24c0a
PA
86332012-05-11 Yao Qi <yao@codesourcery.com>
8634 Pedro Alves <palves@redhat.com>
8635
8636 * linux-low.c (enum stopping_threads_kind): New.
8637 (stopping_threads): Change type to `enum stopping_threads_kind'.
8638 (handle_extended_wait): If stopping and suspending threads, leave
8639 the new_lwp suspended too.
8640 (linux_wait_for_event): Adjust.
8641 (stop_all_lwps): Set `stopping_threads' to
8642 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8643 whether we're suspending threads or just stopping them. Assert no
8644 recursion happens.
8645
623b6bdf
YQ
86462012-04-29 Yao Qi <yao@codesourcery.com>
8647
8648 * server.h: Move some code to ...
8649 * gdbthread.h: ... here. New.
8650 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8651 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8652 (nto-low.o, win32-low.o): Likewise.
8653 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8654 * regcache.c, remote-utils.c, server.c: Likewise.
8655 * target.c, tracepoint.c, win32-low.c: Likewise.
8656
f15f9948
TJB
86572012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8658
8659 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8660 (PTRACE_ARG4_TYPE): Likewise.
8661 (PTRACE_XFER_TYPE): Likewise.
8662 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8663 ptrace to PTRACE_ARG3_TYPE.
8664 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8665 (PTRACE_ARG4_TYPE): Likewise.
8666 (PTRACE_XFER_TYPE): Likewise.
8667 (linux_detach_one_lwp): Cast fourth argument of
8668 ptrace to long then PTRACE_ARG4_TYPE.
8669 (regsets_fetch_inferior_registers): Cast third argument of
8670 ptrace to long then PTRACE_ARG3_TYPE.
8671 (regsets_store_inferior_registers): Likewise.
8672
38ea300a
PA
86732012-04-20 Pedro Alves <palves@redhat.com>
8674
8675 * configure: Regenerate.
8676
c971b7fa
PA
86772012-04-19 Pedro Alves <palves@redhat.com>
8678
43aaf8b6 8679 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 8680 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
8681 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8682 (all, install-only, uninstall, clean-info, all-lib, clean): No
8683 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8684 (maintainer-clean realclean distclean): Use subdir_do.
8685 (subdir_do): New.
8686 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 8687 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
8688 * acinclude.m4: Include acx_configure_dir.m4.
8689 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8690 calls. Call AC_PROG_RANLIB. Configure gnulib using
8691 ACX_CONFIGURE_DIR.
8692 (GNULIB): New.
8693 (GNULIB_STDINT_H): Adjust.
8694 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8695 * gdbreplay.c: Include build-gnulib/config.h.
8696 * server.h: Likewise.
8697 * aclocal.m4: Regenerate.
8698 * config.in: Regenerate.
8699 * configure: Regenerate.
c971b7fa 8700
809277f8
PA
87012012-04-19 Pedro Alves <palves@redhat.com>
8702
8703 * Makefile.in (LIBGNU, INCGNU): Adjust.
8704 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8705 (all, install-only, uninstall, clean-info, all-lib, clean)
8706 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8707 * configure.ac: Adjust AC_OUTPUT output.
8708 * aclocal.m4: Regenerate.
8709 * configure: Regenerate.
8710
fd9bb8b8
PA
87112012-04-19 Pedro Alves <palves@redhat.com>
8712
8713 * Makefile.in (generated_files): New.
8714 (server_h): Remove the explicit dependency on config.h, and depend
8715 on $generated_files.
8716
1c298c66
PA
87172012-04-19 Pedro Alves <palves@redhat.com>
8718
8719 * Makefile.in (INCGNU): Add -Ignulib.
8720
57c4b50b
PA
87212012-04-19 Pedro Alves <palves@redhat.com>
8722
8723 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8724 (INCGNU): ... this, and spell out -I here.
8725 (GNULIB_LIB): Rename to ...
8726 (LIBGNU): ... this.
8727 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8728
1030e047
PA
87292012-04-19 Pedro Alves <palves@redhat.com>
8730
8731 * config.in: Regenerate.
8732
447d4319
PA
87332012-04-19 Pedro Alves <palves@redhat.com>
8734
8735 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8736 * server.h (memmem): Remove declaration.
8737 * config.in: Regenerate.
8738 * configure: Regenerate.
8739
aad9eab9
YQ
87402012-04-19 Yao Qi <yao@codesourcery.com>
8741
8742 * Makefile.in (SFILES): Add common/vec.c.
8743 (OBS): Add vec.o.
8744 (vec.o): New rule.
8745
3e10640f
YQ
87462012-04-19 Yao Qi <yao@codesourcery.com>
8747
8748 * remote-utils.c (prepare_resume_reply): Replace with macro
8749 target_core_of_thread.
8750 * server.c (handle_qxfer_threads_proper): Likewise.
8751 * target.h (traget_core_of_thread): New macro.
8752
71622373
PA
87532012-04-18 Pedro Alves <palves@redhat.com>
8754
8755 * aclocal.m4: Regenerate.
8756 * configure: Regenerate.
8757
80d26939
YQ
87582012-04-16 Yao Qi <yao@codesourcery.com>
8759
8760 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8761 duplicated on address.
8762
42476b70
YQ
87632012-04-16 Yao Qi <yao@codesourcery.com>
8764
8765 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8766 (struct tracepoint_action_ops) <send>: New field.
8767 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8768 (agent_expr_send, x_tracepoint_action_send): New.
8769 (l_tracepoint_action_send): New.
8770 (cmd_qtdp): Download and install tracepoint
8771 according to `use_agent'.
8772 (run_inferior_command): Add one more parameter `len'.
8773 Update callers.
8774 (tracepoint_send_agent): New.
8775 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8776
7bc83639
YQ
87772012-04-16 Yao Qi <yao@codesourcery.com>
8778
8779 * tracepoint.c (download_tracepoints): Moved to ...
8780 (cmd_qtstart): ... here.
8781
5f18041e
YQ
87822012-04-14 Yao Qi <yao@codesourcery.com>
8783
8784 * tracepoint.c: Include inttypes.h.
8785 (struct collect_memory_action): Use sized types.
8786 (struct tracepoint): Likewise.
8787 (cmd_qtdp, stop_tracing): Update print specifiers.
8788 (cmd_qtp, response_tracepoint): Likewise.
8789 (collect_data_at_tracepoint): Likewise.
8790 (collect_data_at_step): Likewise.
8791
55a8c076
YQ
87922012-04-14 Yao Qi <yao@codesourcery.com>
8793
8794 Import gnulib module inttypes.
8795 * aclocal.m4, config.in, configure: Regenerated.
8796
dc750257
YQ
87972012-04-14 Yao Qi <yao@codesourcery.com>
8798
8799 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8800 Makefile and config.status at last.
8801
0ab5faf9
YQ
88022012-04-13 Yao Qi <yao@codesourcery.com>
8803
8804 * tracepoint.c: Include stdint.h unconditionally.
8805
18f5fd81
TJB
88062012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8807
8808 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8809 on BFD_HAVE_SYS_PROCFS_TYPE.
8810 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8811 * configure: Regenerate.
8812 * config.in: Likewise.
8813
4d47af5c
L
88142012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8815
8816 * Makefile.in (clean): Also remove x32.c x32-linux.c
8817 x32-avx.c x32-avx-linux.c.
8818 (x32.o): New target.
8819 (x32.c): Likewise.
8820 (x32-linux.o): Likewise.
8821 (x32-linux.c): Likewise.
8822 (x32-avx.o): Likewise.
8823 (x32-avx.c): Likewise.
8824 (x32-avx-linux.o): Likewise.
8825 (x32-avx-linux.c): Likewise.
8826
8827 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8828 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8829 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8830 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8831 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8832 i386/x32-avx-linux.xml.
8833
8834 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8835 (init_registers_x32_avx_linux): Likwise.
8836 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8837 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8838
ecedbe58
PA
88392012-04-13 Pedro Alves <palves@redhat.com>
8840
8841 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8842 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8843 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8844 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8845 the sub-make.
8846
c92b5177
L
88472012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8848
8849 * linux-x86-low.c (compat_x32_clock_t): New.
8850 (compat_x32_siginfo_t): Likewise.
8851 (compat_x32_siginfo_from_siginfo): Likewise.
8852 (siginfo_from_compat_x32_siginfo): Likewise.
8853 (linux_is_elf64): Likewise.
8854 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8855 and siginfo_from_compat_x32_siginfo for x32.
8856 (x86_arch_setup): Set linux_is_elf64.
8857
214d508e
L
88582012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8859
8860 PR gdb/13969
8861 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8862 e_machine field.
8863 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8864 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8865 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8866 compatible with process.
8867
c9a1864a
YQ
88682012-04-12 Yao Qi <yao@codesourcery.com>
8869
8870 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8871 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8872 (install-only, install-info, clean): Handle sub dir gnulib.
8873 (all-lib, am--refresh): New targets.
8874 (memmem.o): Remove target.
8875 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8876 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8877 (AC_REPLACE_FUNCS): Remove memmem.
8878 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8879 (AC_OUTPUT): Generate Makefile in gnulib/.
8880 * aclocal.m4, config.in, configure: Regenerated.
8881
367ba2c2
MR
88822012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8883
8884 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8885
9d236627
PA
88862012-04-05 Pedro Alves <palves@redhat.com>
8887
8888 -Werror=strict-aliasing
8889
8890 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8891 pointer.
8892
111217b3
PA
88932012-04-04 Pedro Alves <palves@redhat.com>
8894
8895 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8896 (sparc_store_gregset_from_stack, sparc_store_gregset)
8897 (sparc_breakpoint_at): Fix formatting.
8898
8365dcf5
TJB
88992012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8900
8901 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8902 are available.
8903 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8904 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8905 * config.in: Regenerate.
8906 * configure: Likewise.
8907
689cc2ae
PA
89082012-03-29 Pedro Alves <palves@redhat.com>
8909
8910 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8911 Correct ptrace arguments.
8912
c14dfd32
PA
89132012-03-28 Pedro Alves <palves@redhat.com>
8914
8915 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8916 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8917 (IA64_FR1_REGNUM): New defines.
8918 (ia64_fetch_register): New.
8919 (the_low_target): Install it.
8920 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8921 field.
8922 * linux-low.c (linux_fetch_registers): Try the
8923 the_low_target.fetch_register hook first.
8924
8925 * linux-arm-low.c (the_low_target): Adjust.
8926 * linux-bfin-low.c (the_low_target): Adjust.
8927 * linux-cris-low.c (the_low_target): Adjust.
8928 * linux-crisv32-low.c (the_low_target): Adjust.
8929 * linux-m32r-low.c (the_low_target): Adjust.
8930 * linux-m68k-low.c (the_low_target): Adjust.
8931 * linux-mips-low.c (the_low_target): Adjust.
8932 * linux-ppc-low.c (the_low_target): Adjust.
8933 * linux-s390-low.c (the_low_target): Adjust.
8934 * linux-sh-low.c (the_low_target): Adjust.
8935 * linux-sparc-low.c (the_low_target): Adjust.
8936 * linux-tic6x-low.c (the_low_target): Adjust.
8937 * linux-x86-low.c (the_low_target): Adjust.
8938 * linux-xtensa-low.c (the_low_target): Adjust.
8939
63c88e13
PA
89402012-03-26 Pedro Alves <palves@redhat.com>
8941
8942 * server.c (handle_qxfer_libraries): Don't bail early if
8943 the_target->qxfer_libraries_svr4 is not NULL.
8944
fb723180
PA
89452012-03-26 Pedro Alves <palves@redhat.com>
8946
8947 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8948
0afae3cf
PA
89492012-03-23 Pedro Alves <palves@redhat.com>
8950
8951 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8952 "library-list-svr4" element's start tag when the the DSO list is
8953 empty.
8954
485f1ee4
PA
89552012-03-23 Pedro Alves <palves@redhat.com>
8956
8957 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8958 a variable whose type size is the same as the inferior's pointer
8959 size.
8960
a5362b9a
TS
89612012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8962
8963 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8964 struct siginfo.
8965 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8966 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8967 * linux-low.h: Include <signal.h>.
8968 (struct siginfo): Remove forward declaration.
8969 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8970 struct siginfo.
8971
d226c142
MF
89722012-03-21 Mike Frysinger <vapier@gentoo.org>
8973
8974 * .gitignore: Ignore more files.
8975
122f36ef
PA
89762012-03-19 Pedro Alves <palves@redhat.com>
8977 Jan Kratochvil <jan.kratochvil@redhat.com>
8978
8979 * server.c (cont_thread, general_thread): Add describing comments.
8980 (start_inferior): Clear `cont_thread'.
8981 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8982 of a process.
8983
fc3e5175
YQ
89842012-03-15 Yao Qi <yao@codesourcery.com>
8985
8986 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8987 handling to ...
8988 (cmd_qtdp): ... here.
8989
8d0d92cd
YQ
89902012-03-15 Yao Qi <yao@codesourcery.com>
8991
8992 * tracepoint.c (struct tracepoint_action_ops): New.
8993 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8994 (m_tracepoint_action_download): New.
8995 (r_tracepoint_action_download): New.
8996 (x_tracepoint_action_download): New.
8997 (l_tracepoint_action_download): New.
8998 (add_tracepoint_action): Install `action->ops' according type.
8999 (download_tracepoint_1): Move code `download' function pointer
9000 of various tracepoint_action_ops.
9001
87b0bb13
JK
90022012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9003
9004 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9005 linux_ptrace_attach_warnings.
9006
5f572dec
JK
90072012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9008
9009 * Makefile.in (linux-ptrace.o): New.
9010 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9011 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9012 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9013 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9014 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9015 of these targets.
9016 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9017
f4647387
YQ
90182012-03-08 Yao Qi <yao@codesourcery.com>
9019 Pedro Alves <palves@redhat.com>
9020
9021 Fix PR server/13392.
9022 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9023 offset of JMP insn.
9024 * tracepoint.c (remove_tracepoint): New.
9025 (cmd_qtdp): Call remove_tracepoint when failed to install.
9026
9b224c5e
PA
90272012-03-07 Pedro Alves <palves@redhat.com>
9028
9029 * linux-low.c (get_detach_signal): New.
9030 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9031 Pass on pending signals to PTRACE_DETACH. Check the result of the
9032 ptrace call.
9033 * server.c (program_signals, program_signals_p): New.
9034 (handle_general_set): Handle QProgramSignals.
9035 * server.h (program_signals, program_signals_p): Declare.
9036
e237a7e2
JK
90372012-03-05 Pedro Alves <palves@redhat.com>
9038 Jan Kratochvil <jan.kratochvil@redhat.com>
9039
9040 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9041 New comment why.
9042
5808517f
YQ
90432012-03-03 Yao Qi <yao@codesourcery.com>
9044
9045 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9046 agent_look_up_symbols.
9047
58b4daa5
YQ
90482012-03-03 Yao Qi <yao@codesourcery.com>
9049
9050 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9051 (linux-x86-low.o): Likewise.
9052 * server.h: Remove in_process_agent_loaded.
9053 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9054 common/agent.c.
9055 Update callers.
9056
8ffcbaaf
YQ
90572012-03-03 Yao Qi <yao@codesourcery.com>
9058
9059 * tracepoint.c (gdb_agent_capability): New global.
9060 (in_process_agent_loaded_ust): Renamed to
9061 `in_process_agent_supports_ust'.
9062 Update callers.
9063 (in_process_agent_supports_ust): Call agent_capability_check.
9064 (clear_installed_tracepoints): Assert that agent supports
9065 agent.
9066
d1feda86
YQ
90672012-03-03 Yao Qi <yao@codesourcery.com>
9068
9069 * linux-low.c (linux_supports_agent): New.
9070 (linux_target_ops): Initialize field `supports_agent' with
9071 linux_supports_agent.
9072 * target.h (struct target_ops) <supports_agent>: New.
9073 (target_supports_agent): New macro.
9074 * server.c (handle_general_set): Handle packet 'QAgent'.
9075 (handle_query): Send `QAgent+'.
9076 * Makefile.in (server.o): Depends on agent.h.
9077
2fa291ac
YQ
90782012-03-03 Yao Qi <yao@codesourcery.com>
9079
9080 * Makefile.in (OBS): Add agent.o.
9081 Add new rule for agent.o.
9082 Track dependence of tracepoint.c on agent.h.
9083 * tracepoint.c (run_inferior_command_1):
9084 (run_inferior_command): Call agent_run_command.
9085 (gdb_ust_connect_sync_socket): Deleted. Move it to
9086 common/agent.c.
9087 (resume_thread, stop_thread): Likewise.
9088 (gdb_ust_socket_init): Renamed to ...
9089 (gdb_agent_socket_init): ... New.
9090 (gdb_ust_thread): Renamed to ...
9091 (gdb_agent_helper_thread): ... New.
9092 (gdb_ust_init): Move some code to ...
9093 (gdb_agent_init): ... here. New.
9094 [HAVE_UST]: Call gdb_ust_init.
9095 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9096 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9097 * config.in, configure: Regenerated.
9098
05044653
PA
90992012-03-02 Pedro Alves <palves@redhat.com>
9100
9101 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9102 * linux-low.c (struct simple_pid_list): New.
9103 (stopped_pids): New a struct simple_pid_list pointer.
9104 (add_to_pid_list, pull_pid_from_list): New.
9105 (handle_extended_wait): Don't assume the first signal new children
9106 report is SIGSTOP. Adjust call to pull_pid_from_list.
9107 (linux_wait_for_lwp): Adjust.
9108
8d00225b
YQ
91092012-03-02 Yao Qi <yao@codesourcery.com>
9110
9111 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9112 debug log.
9113
19560ba5
YQ
91142012-03-02 Yao Qi <yao@codesourcery.com>
9115
9116 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9117 `stop_pc' and `tpoint'. Update caller.
9118
1faeff08
MR
91192012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9120
9121 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9122 * linux-low.c (use_linux_regsets): New macro.
9123 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9124 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9125 (linux_register_in_regsets): New function.
9126 (usr_fetch_inferior_registers): Skip registers covered by
9127 regsets.
9128 (usr_store_inferior_registers): Likewise.
9129 (usr_fetch_inferior_registers): New macro.
9130 (usr_store_inferior_registers): Likewise.
9131 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9132 (linux_store_registers): Likewise.
9133 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9134 prototype.
9135 (init_registers_mips64_dsp_linux): Likewise.
9136 (init_registers_mips_linux): New macro.
9137 (init_registers_mips_dsp_linux): Likewise.
9138 (mips_dsp_num_regs): Likewise.
9139 (DSP_BASE, DSP_CONTROL): New fallback macros.
9140 (mips_base_regs): New macro.
9141 (mips_regmap): Use it. Fix the size.
9142 (mips_dsp_regmap): New variable.
9143 (mips_dsp_regset_bitmap): Likewise.
9144 (mips_arch_setup): New function.
9145 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9146 than mips_regmap.
9147 (mips_cannot_store_register): Likewise.
9148 (the_low_target): Update .arch_setup, .num_regs and .regmap
9149 initializers. Add .regset_bitmap initializer.
9150 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9151 initializer.
9152 * linux-bfin-low.c (the_low_target): Likewise.
9153 * linux-cris-low.c (the_low_target): Likewise.
9154 * linux-crisv32-low.c (the_low_target): Likewise.
9155 * linux-ia64-low.c (the_low_target): Likewise.
9156 * linux-m32r-low.c (the_low_target): Likewise.
9157 * linux-m68k-low.c (the_low_target): Likewise.
9158 * linux-ppc-low.c (the_low_target): Likewise.
9159 * linux-s390-low.c (the_low_target): Likewise.
9160 * linux-sh-low.c (the_low_target): Likewise.
9161 * linux-sparc-low.c (the_low_target): Likewise.
9162 * linux-tic6x-low.c (the_low_target): Likewise.
9163 * linux-x86-low.c (the_low_target): Likewise.
9164 * linux-xtensa-low.c (the_low_target): Likewise.
9165 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9166 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9167 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9168 srv_xmlfiles.
9169 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9170 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9171
c03e6ccc
YQ
91722012-02-29 Yao Qi <yao@codesourcery.com>
9173 Pedro Alves <palves@redhat.com>
9174
9175 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9176 `step_over_finished' is true.
9177
644cebc9
PA
91782012-02-27 Pedro Alves <palves@redhat.com>
9179
9180 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9181 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9182
c14d7ab2
PA
91832012-02-27 Pedro Alves <palves@redhat.com>
9184
9185 PR server/9684
9186 * linux-low.c (pid_is_stopped): New.
9187 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9188
412c89dd
LM
91892012-02-25 Luis Machado <lgustavo@codesourcery.com>
9190
9191 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9192 of conditions.
9193
b745defe
MR
91942012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9195
9196 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9197
9f3a5c85
LM
91982012-02-24 Luis Machado <lgustavo@codesourcery>
9199
9200 * server.c (handle_query): Advertise support for target-side
9201 breakpoint condition evaluation.
9202 (process_point_options): New function.
9203 (process_serial_event): When inserting a breakpoint, check for
9204 a target-side condition that should be evaluated.
9205
9206 * mem-break.c: Include regcache.h and ax.h.
9207 (point_cond_list_t): New data structure.
9208 (breakpoint) <cond_list>: New field.
9209 (find_gdb_breakpoint_at): Make non-static.
9210 (delete_gdb_breakpoint_at): Clear any target-side
9211 conditions.
9212 (clear_gdb_breakpoint_conditions): New function.
9213 (add_condition_to_breakpoint): Likewise.
9214 (add_breakpoint_condition): Likewise.
9215 (gdb_condition_true_at_breakpoint): Likewise.
9216 (gdb_breakpoint_here): Return result directly instead
9217 of going through a local variable.
9218
9219 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9220 (clear_gdb_breakpoint_conditions): Likewise.
9221 (add_breakpoint_condition): Likewise.
9222 (gdb_condition_true_at_breakpoint): Likewise.
9223
9224 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9225 (need_step_over_p): Take target-side breakpoint condition into
9226 consideration.
9227
5e1dc496
LM
92282012-02-24 Luis Machado <lgustavo@codesourcery>
9229
9230 * server.h: Include tracepoint.h.
9231 (agent_mem_read, agent_get_trace_state_variable_value,
9232 agent_set_trace_state_variable_value,
9233 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9234 get_set_tsv_func_addr): New prototypes.
9235
9236 * ax.h: New include file.
9237 * ax.c: New source file.
9238
9239 * tracepoint.c: Include ax.h.
9240 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9241 agent_expr, eval_result_type): Move to ax.h.
9242 (parse_agent_expr): Rename to ...
9243 (gdb_parse_agent_expr): ... this, make it non-static and move
9244 to ax.h.
9245 (unparse_agent_expr) Rename to ...
9246 (gdb_unparse_agent_expr): ... this, make it non-static and move
9247 to ax.h.
9248 (eval_agent_expr): Rename to ...
9249 (eval_tracepoint_agent_expr): ... this.
9250 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9251 forward declarations.
9252 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9253 (agent_get_trace_state_variable_value): New function.
9254 (agent_set_trace_state_variable_value): New function.
9255 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9256 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9257 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9258 (condition_true_at_tracepoint): Likewise.
9259 (parse_agent_expr): Rename to ...
9260 (gdb_parse_agent_expr): ... this and move to ax.c.
9261 (unparse_agent_expr): Rename to ...
9262 (gdb_unparse_agent_expr): ... this and move to ax.c.
9263 (gdb_agent_op_name): Move to ax.c.
9264 (eval_agent_expr): Rename to ...
9265 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9266 and move to ax.c.
9267 (eval_tracepoint_agent_expr): New function.
9268 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 9269 non-static.
5e1dc496
LM
9270 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9271 ax.c.
9272 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9273 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9274 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9275 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9276 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9277 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9278 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9279 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9280 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9281 (compile_bytecodes): Remove forward declaration.
9282 (is_goto_target): Move to ax.c.
9283 (compile_bytecodes): Move to ax.c and call
9284 agent_get_trace_state_variable_value (...) and
9285 agent_set_trace_state_variable_value (...).
9286
9287 * Makefile.in: Update ax.c and IPA dependencies.
9288
277e4e52
PA
92892012-02-24 Pedro Alves <palves@redhat.com>
9290
9291 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9292 (cmd_bigqtbuffer_circular): ... this. Only handle
9293 'QTBuffer:circular:'.
9294 (handle_tracepoint_general_set): Adjust.
9295
bf4c19f7
YQ
92962012-02-16 Yao Qi <yao@codesourcery.com>
9297
9298 * inferiors.c: Move code to ...
9299 * dll.c: .... here. New.
9300 * server.h: Declare clear_dlls.
9301 * Makefile.in (SFILES): Add dll.c.
9302 (OBS): Add dll.o
9303 (dll.o): New rule.
9304
d73f2619
YQ
93052012-02-11 Yao Qi <yao@codesourcery.com>
9306
9307 * server.c: (handle_monitor_command): Add a new parameter
9308 `own_buf'.
9309 (handle_query): Update caller.
9310
f8255c2a
JB
93112012-02-09 Joel Brobecker <brobecker@adacore.com>
9312
9313 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9314 * configure, config.in: Regenerate.
9315 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9316 is not defined.
9317
da84f473
PA
93182012-02-02 Pedro Alves <palves@redhat.com>
9319
9320 Try SIGKILL first, then PTRACE_KILL.
9321 * linux-low.c (linux_kill_one_lwp): New.
9322 (linux_kill_one_lwp): Rename to ...
9323 (kill_one_lwp_callback): ... this. Use the new
9324 linux_kill_one_lwp.
9325
e886a173
PA
93262012-02-02 Pedro Alves <palves@redhat.com>
9327
9328 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9329 inferior.
9330
be07f1a2
PA
93312012-01-27 Pedro Alves <palves@redhat.com>
9332
9333 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9334 (elf_64_file_p): Make static.
9335 (linux_pid_exe_is_elf_64_file): New.
9336 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9337 Delete declarations.
9338 (linux_pid_exe_is_elf_64_file): Declare.
9339 * linux-x86-low.c (x86_arch_setup): Use
9340 linux_pid_exe_is_elf_64_file.
9341
d8301ad1
JK
93422012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9343
9344 * linux-low.c (linux_wait_for_event_1): Rename to ...
9345 (linux_wait_for_event): ... here and merge it with former
9346 linux_wait_for_event - new variable wait_ptid, use it.
9347 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9348
01b17894
PA
93492012-01-23 Pedro Alves <palves@redhat.com>
9350
9351 * server.c (main): Avoid yet another case of infinite loop while
9352 detaching/killing after a longjmp.
9353
e825046f
JK
93542012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9355
9356 Code cleanup.
9357 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9358
b9e7b9c3
UW
93592012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9360
9361 * hostio.c (handle_readlink): New function.
9362 (handle_vFile): Call it to handle "vFile:readlink" packets.
9363
901f9912
UW
93642012-01-20 Pedro Alves <palves@redhat.com>
9365 Ulrich Weigand <ulrich.weigand@linaro.org>
9366
9367 * server.c (handle_v_requests): Only support vAttach and vRun to
9368 start multiple processes when in extended protocol mode.
9369
fc1ab1a0
PA
93702012-01-17 Pedro Alves <palves@redhat.com>
9371
9372 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9373 memalign plus mprotect to allocate the scratch buffer.
9374
7d5d4e98
PA
93752012-01-13 Pedro Alves <palves@redhat.com>
9376
9377 * server.c (attach_inferior): Clear `cont_thread'.
9378
f128d5e9
PA
93792012-01-13 Pedro Alves <palves@redhat.com>
9380
9381 * server.c (main): Avoid infinite loop while detaching/killing
9382 after a longjmp.
9383
06db92f0
DE
93842012-01-09 Doug Evans <dje@google.com>
9385
9386 * server.c (start_inferior): Set last_ptid in --wrapper case.
9387
32d92999
YQ
93882012-01-06 Yao Qi <yao@codesourcery.com>
9389
9390 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9391 defined.
9392 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9393
5e0a92a9
YQ
93942012-01-04 Yao Qi <yao@codesourcery.com>
9395
9396 * tracepoint.c (cmd_qtdp): Print debug message
9397 for static tracepoint.
9398
ae639e8c
YQ
93992012-01-04 Yao Qi <yao@codesourcery.com>
9400
9401 * tracepoint.c (trace_vdebug): Differentiate debug message
9402 between gdbserver and IPA.
9403
f72429c5
YQ
94042012-01-03 Yao Qi <yao@codesourcery.com>
9405
9406 * tracepoint.c (tracepoint_was_hit): Don't collect for
9407 static tracepoint.
9408
12c3e59c
JB
94092012-01-02 Joel Brobecker <brobecker@adacore.com>
9410
9411 * terminal.h: Reformat copyright header.
9412
67827812
JB
94132012-01-02 Joel Brobecker <brobecker@adacore.com>
9414
9415 * server.c (gdbserver_version): Update copyright year.
9416 * gdbreplay.c (gdbreplay_version): Likewise.
9417
3e52c33d
JK
94182011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9419
9420 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9421
9422 Revert:
9423 2011-12-18 Hui Zhu <teawater@gmail.com>
9424 * linux-low.c (linux_create_inferior): Save return value to ret.
9425
66f1260e
HZ
94262011-12-18 Hui Zhu <teawater@gmail.com>
9427
9428 * linux-low.c (linux_create_inferior): Save return value to ret.
9429
e77616d7
DE
94302011-12-16 Doug Evans <dje@google.com>
9431
e7b06c57
DE
9432 * linux-low.c (linux_create_inferior): If stdio connection,
9433 redirect stdin from /dev/null, stdout to stderr.
9434 * remote-utils.c (remote_is_stdio): New static global.
9435 (remote_connection_is_stdio): New function.
9436 (remote_prepare): Handle stdio connection.
9437 (remote_open): Ditto.
9438 (remote_close): Don't close stdin for stdio connections.
9439 (read_prim,write_prim): New functions. Replace all calls to
9440 read/write to these.
9441 * server.c (main): Watch for "-" argument. Move call to
9442 remote_prepare before start_inferior.
9443 * server.h (STDIO_CONNECTION_NAME): New macro.
9444 (remote_connection_is_stdio): Declare.
9445
e77616d7
DE
9446 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9447 in debugging output.
9448
82067193
YQ
94492011-12-15 Yao Qi <yao@codesourcery.com>
9450
9451 * tracepoint.c: Include sys/syscall.h.
9452 (gdb_ust_thread): Remove preprocessor conditional.
9453
82bfbe7e
PA
94542011-12-14 Pedro Alves <pedro@codesourcery.com>
9455
9456 * linux-low.c (linux_detach_one_lwp): Call
9457 the_low_target.prepare_to_resume before detaching.
9458
712c6575
YQ
94592011-12-14 Yao Qi <yao@codesourcery.com>
9460
9461 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9462 of write.
9463
d54d1edf
YQ
94642011-12-14 Yao Qi <yao@codesourcery.com>
9465
9466 * i386-low.c (i386_low_stopped_data_address): Initialize local
9467 variable `control'.
9468
6210a125
PA
94692011-12-13 Pedro Alves <pedro@codesourcery.com>
9470
9471 PR remote/13492
9472
9473 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9474 DR_CONTROL unless necessary. Extend comments.
9475 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9476 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9477
2ece8244
YQ
94782011-12-13 Yao Qi <yao@codesourcery.com>
9479
9480 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9481 macros.
9482 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9483
784867a5
JK
94842011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9485
9486 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9487 Print new debug message for such case.
9488
6bf36717
JK
94892011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9490
9491 Fix overlapping memcpy.
9492 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9493 the read_inferior_memory transfer.
9494 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9495 write_inferior_memory transfer.
9496 (set_fast_tracepoint_jump): New variable buf. Use it for the
9497 read_inferior_memory and write_inferior_memory transfers.
9498 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9499 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9500 Use it for the write_inferior_memory transfer.
9501 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9502 buffers.
9503
50275556
MR
95042011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9505
9506 * linux-low.c (fetch_register, store_register): Make code
9507 consistent, fix formatting.
9508
7325beb4
MR
95092011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9510
9511 * linux-low.c (usr_store_inferior_registers): Factor out code
9512 to handle individual registers into...
9513 (store_register): ... this new function.
9514
c642a434
UW
95152011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9516
9517 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9518 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9519 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9520 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9521 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9522 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9523 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9524 (srv_xmlfiles): Add new XML files.
9525
9526 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9527 and <sys/uio.h>.
9528 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9529 (init_registers_s390_linux32v1): Add prototype.
9530 (init_registers_s390_linux32v2): Likewise.
9531 (init_registers_s390_linux64v1): Likewise.
9532 (init_registers_s390_linux64v2): Likewise.
9533 (init_registers_s390x_linux64v1): Likewise.
9534 (init_registers_s390x_linux64v2): Likewise.
9535 (s390_num_regs): Increment to 52.
9536 (s390_regmap): Add orig_r2 register.
9537 (s390_num_regs_3264): Increment to 68.
9538 (s390_regmap_3264): Add orig_r2 register.
9539 (s390_collect_ptrace_register): Handle orig_r2 register.
9540 (s390_supply_ptrace_register): Likewise.
9541 (s390_fill_last_break): New function.
9542 (s390_store_last_break): Likewise.
9543 (s390_fill_system_call): New function.
9544 (s390_store_system_call): Likewise.
9545 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9546 register sets.
9547 (s390_check_regset): New function.
9548 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9549 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9550 Update target_regsets for available register sets.
9551
2268b414
JK
95522011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9553 Jan Kratochvil <jan.kratochvil@redhat.com>
9554
9555 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9556 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9557 New.
9558 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9559 * linux-low.h (struct process_info_private): New member r_debug.
9560 * server.c (handle_qxfer_libraries): Call
9561 the_target->qxfer_libraries_svr4.
9562 (handle_qxfer_libraries_svr4): New function.
9563 (qxfer_packets): New entry "libraries-svr4".
9564 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9565 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9566 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9567 PACKET_qXfer_libraries_svr4.
9568
d6db1fab
UW
95692011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9570
9571 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9572 PSW address/mask between 8-byte and 16-byte formats.
9573 (s390_supply_ptrace_register): Likewise.
9574 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9575 basic addressing mode bit.
9576
242f5f1c
SS
95772011-11-24 Stan Shebs <stan@codesourcery.com>
9578
9579 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9580
f196051f
SS
95812011-11-17 Stan Shebs <stan@codesourcery.com>
9582
9583 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9584 (tracing_start_time): New global.
9585 (tracing_stop_time): New global.
9586 (tracing_user_name): New global.
9587 (tracing_notes): New global.
9588 (tracing_stop_note): New global.
9589 (cmd_qtstart): Set traceframe_usage, start_time.
9590 (stop_tracing): Set stop_time.
9591 (cmd_qtstatus): Report additional status.
9592 (cmd_qtp): New function.
9593 (handle_tracepoint_query): Call it.
9594 (cmd_qtnotes): New function.
9595 (handle_tracepoint_general_set): Call it.
9596 (get_timestamp): Rename from tsv_get_timestamp.
9597
405f8e94
SS
95982011-11-14 Stan Shebs <stan@codesourcery.com>
9599 Kwok Cheung Yeung <kcy@codesourcery.com>
9600
9601 * linux-x86-low.c (small_jump_insn): New.
9602 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9603 trampoline and error message, build a trampoline and issue a small
9604 jump instruction to it.
9605 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9606 trampoline and error message.
9607 (x86_get_min_fast_tracepoint_insn_len): New.
9608 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9609 * linux-low.h (struct linux_target_ops): Add arguments to
9610 install_fast_tracepoint_jump_pad operation, add new operation.
9611 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9612 arguments.
9613 (linux_get_min_fast_tracepoint_insn_len): New function.
9614 (linux_target_op): Add new operation.
9615 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9616 (gdb_trampoline_buffer_end): Ditto.
9617 (gdb_trampoline_buffer_error): Ditto.
9618 (struct ipa_sym_addresses): Add fields for new IPA variables.
9619 (symbol_list): Add entries for new IPA variables.
9620 (struct tracepoint): Add fields to hold the address range of the
9621 trampoline used by the tracepoint.
9622 (trampoline_buffer_head): New static variable.
9623 (trampoline_buffer_tail): Ditto.
9624 (claim_trampoline_space): New function.
9625 (have_fast_tracepoint_trampoline_buffer): New function.
9626 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9627 structure.
9628 (install_fast_tracepoint): Ditto, also add error buffer argument.
9629 (cmd_qtminftpilen): New function.
9630 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9631 (fast_tracepoint_from_trampoline_address): New function.
9632 (fast_tracepoint_collecting): Handle trampoline as part of jump
9633 pad space.
9634 (set_trampoline_buffer_space): New function.
9635 (initialize_tracepoint): Initialize new IPA variables.
9636 * target.h (struct target_ops): Add arguments to
9637 install_fast_tracepoint_jump_pad operation, add new
9638 get_min_fast_tracepoint_insn_len operation.
9639 (target_get_min_fast_tracepoint_insn_len): New.
9640 (install_fast_tracepoint_jump_pad): Add arguments.
9641 * server.h (IPA_BUFSIZ): Define.
9642 * linux-i386-ipa.c: Include extra header files.
9643 (initialize_fast_tracepoint_trampoline_buffer): New function.
9644 (initialize_low_tracepoint): Call it.
9645 * server.h (set_trampoline_buffer_space): Declare.
9646 (claim_trampoline_space): Ditto.
9647 (have_fast_tracepoint_trampoline_buffer): Ditto.
9648
1e4d1764
YQ
96492011-11-14 Yao Qi <yao@codesourcery.com>
9650
9651 * server.c (handle_query): Handle InstallInTrace for qSupported.
9652 * tracepoint.c (add_tracepoint): Sort list.
9653 (install_tracepoint, download_tracepoint): New.
9654 (cmd_qtdp): Call them to install and download tracepoints.
9655 (sort_tracepoints): Removed.
9656 (cmd_qtstart): Update.
9657
5c73ff4e
YQ
96582011-11-14 Yao Qi <yao@codesourcery.com>
9659
9660 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9661 * mem-break.h: Declare.
9662 * tracepoint.c (cmd_qtstart): Move some code to ...
9663 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9664 New.
9665 (download_tracepoints): Move some code to ...
9666 (download_tracepoint_1): ... here. New.
9667
86a30030
YQ
96682011-11-08 Yao Qi <yao@codesourcery.com>
9669
9670 * remote-utils.c (relocate_instruction): A comment fix.
9671
8d26e50c
JB
96722011-11-07 Joel Brobecker <brobecker@adacore.com>
9673
9674 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9675 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9676 dr_status_mirror and dr_control_mirror from debug_reg_state.
9677 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9678 (i386_initial_stuff): Remove use of deleted globals.
9679 (i386_get_thread_context, i386_set_thread_context,
9680 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9681 from debug_reg_state.
9682
a59306a3
YQ
96832011-11-05 Yao Qi <yao@codesourcery.com>
9684
9685 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9686 address as TPOINT's.
9687
3065dfb6
SS
96882011-11-02 Stan Shebs <stan@codesourcery.com>
9689
9690 * tracepoint.c (agent_mem_read_string): New function.
9691 (eval_agent_expr): Call it for tracenz.
9692 * server.c (handle_query): Report support for tracenz.
9693
fd0d8c7c
YQ
96942011-11-02 Yao Qi <yao@codesourcery.com>
9695
9696 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9697
609086b1
YQ
96982011-11-02 Yao Qi <yao@codesourcery.com>
9699
9700 * target.h: Fix a typo in comment.
9701
b9fd1791
PA
97022011-10-31 Pedro Alves <pedro@codesourcery.com>
9703
9704 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9705 clobber the breakpoints' shadows with fast tracepoint jumps.
9706 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9707 * target.c (write_inferior_memory): Also pass MYADDR down to
9708 check_mem_write.
9709
03583c20
UW
97102011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9711
9712 * configure.ac: Check support for personality routine.
9713 * configure: Regenerate.
9714 * config.in: Likewise.
9715 * linux-low.c: Include <sys/personality.h>.
9716 Define ADDR_NO_RANDOMIZE if necessary.
9717 (linux_create_inferior): Disable address space randomization when
9718 forking inferior, if requested.
9719 (linux_supports_disable_randomization): New function.
9720 (linux_target_ops): Install it.
9721 * server.h (disable_randomization): Declare.
9722 * server.c (disable_randomization): New global variable.
9723 (handle_general_set): Handle QDisableRandomization.
9724 (handle_query): Likewise for qSupported.
9725 (main): Support --disable-randomization and --no-disable-randomization
9726 command line arguments.
9727 * target.h (struct target_ops): Add supports_disable_randomization.
9728 (target_supports_disable_randomization): New macro.
9729
723b724b
MF
97302011-09-29 Mike Frysinger <vapier@gentoo.org>
9731
9732 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9733 ifdef check.
9734 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9735 [!PT_GETDSBT] (target_loadmap): New definition.
9736 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9737 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9738 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9739 and PT_GETDSBT to LINUX_LOADMAP.
9740 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9741 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9742
55329a5c 97432011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
9744
9745 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9746 (arm_linux_hwbp_cap): New static variable.
9747 (arm_linux_get_hwbp_cap): Replace by ...
9748 (arm_linux_init_hwbp_cap): ... this new function.
9749 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9750 (arm_linux_get_hw_watchpoint_count): Likewise.
9751 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9752 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9753 (arm_prepare_to_resume): Use perror_with_name instead of error.
9754
55329a5c 97552011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
9756
9757 * linux-arm-low.c: Include <signal.h>.
9758 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9759 (struct arm_linux_hwbp_cap): New data type.
9760 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9761 (struct arm_linux_hw_breakpoint): New data type.
9762 (MAX_BPTS, MAX_WPTS): Define.
9763 (struct arch_process_info, struct arch_lwp_info): New data types.
9764 (arm_linux_get_hwbp_cap): New function.
9765 (arm_linux_get_hw_breakpoint_count): Likewise.
9766 (arm_linux_get_hw_watchpoint_count): Likewise.
9767 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9768 (arm_hwbp_control_initialize): Likewise.
9769 (arm_hwbp_control_is_enabled): Likewise.
9770 (arm_hwbp_control_is_initialized): Likewise.
9771 (arm_hwbp_control_disable): Likewise.
9772 (arm_linux_hw_breakpoint_equal): Likewise.
9773 (arm_linux_hw_point_initialize): Likewise.
9774 (struct update_registers_data): New data structure.
9775 (update_registers_callback: New function.
9776 (arm_insert_point): Likewise.
9777 (arm_remove_point): Likewise.
9778 (arm_stopped_by_watchpoint): Likewise.
9779 (arm_stopped_data_address): Likewise.
9780 (arm_new_process): Likewise.
9781 (arm_new_thread): Likewise.
9782 (arm_prepare_to_resume): Likewise.
9783 (the_low_target): Register arm_insert_point, arm_remove_point,
9784 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9785 arm_new_thread, and arm_prepare_to_resume.
9786
6b9801d4
SS
97872011-09-15 Stan Shebs <stan@codesourcery.com>
9788
9789 * server.h (struct emit_ops): Add compare-goto fields.
9790 * tracepoint.c (gdb_agent_op_sizes): New table.
9791 (emit_eq_goto): New function.
9792 (emit_ne_goto): New function.
9793 (emit_lt_goto): New function.
9794 (emit_le_goto): New function.
9795 (emit_gt_goto): New function.
9796 (emit_ge_goto): New function.
9797 (is_goto_target): New function.
9798 (compile_bytecodes): Recognize special cases of compare-goto
9799 combinations and call specialized emitters for them.
9800 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9801 (amd64_emit_ne_goto): New function.
9802 (amd64_emit_lt_goto): New function.
9803 (amd64_emit_le_goto): New function.
9804 (amd64_emit_gt_goto): New function.
9805 (amd64_emit_ge_goto): New function.
9806 (amd64_emit_ops): Add the new functions.
9807 (i386_emit_eq_goto): New function.
9808 (i386_emit_ne_goto): New function.
9809 (i386_emit_lt_goto): New function.
9810 (i386_emit_le_goto): New function.
9811 (i386_emit_gt_goto): New function.
9812 (i386_emit_ge_goto): New function.
9813 (i386_emit_ops): Add the new functions.
9814
bf15cbda
SS
98152011-09-08 Stan Shebs <stan@codesourcery.com>
9816
9817 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9818 (i386_emit_epilogue): Restore %ebx.
9819
943ca1dd
JZ
98202011-08-31 Jie Zhang <jzhang918@gmail.com>
9821
9822 * server.c (step_thread): Remove definition.
9823 (process_serial_event): Don't handle Hs.
9824 * server.h (step_thread): Remove declaration.
9825 * target.c (set_desired_inferior): Remove use of step_thread.
9826
e3deef73
LM
98272011-08-24 Luis Machado <lgustavo@codesourcery.com>
9828
9829 * linux-low.c: Include linux-procfs.h.
9830 (linux_attach_lwp_1): Update comments.
9831 (linux_attach): Scan for existing threads when attaching to a
9832 process that is the tgid.
9833 * Makefile.in: Update dependencies.
9834
13da1c97
LM
98352011-08-24 Luis Machado <lgustavo@codesourcery.com>
9836
9837 * configure.srv: Add linux-procfs.o dependencies.
9838
881127c9
YQ
98392011-08-14 Yao Qi <yao@codesourcery.com>
9840
9841 * target.h (struct target_ops): Fix indent.
9842 * win32-low.c (win32_target_ops): Fix comment.
9843
58dbd541
YQ
98442011-08-14 Andrew Jenner <andrew@codesourcery.com>
9845 Yao Qi <yao@codesourcery.com>
9846
9847 * Makefile.in (clean): Remove tic6x-*.c files.
9848 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9849 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9850 (tic6x-c64xp-linux.c): Likewise.
9851 * configure.srv: Add support for tic6x-*-uclinux.
9852 * linux-tic6x-low.c: New.
9853 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9854
78d85199
YQ
98552011-08-14 Andrew Stubbs <ams@codesourcery.com>
9856 Yao Qi <yao@codesourcery.com>
9857
9858 * target.h (struct target_ops): Add read_loadmap.
9859 * linux-low.c (struct target_loadseg): New type.
9860 (struct target_loadmap): New type.
9861 (linux_read_loadmap): New function.
9862 (linux_target_ops): Add linux_read_loadmap.
9863 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
9864 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9865 to NULL.
78d85199 9866
a959a88d
EZ
98672011-08-05 Eli Zaretskii <eliz@gnu.org>
9868
9869 * win32-low.c: Include <stdint.h>.
9870
1ced966e
PA
98712011-07-22 Pedro Alves <pedro@codesourcery.com>
9872
9873 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9874 to the inferior here.
9875 (i386_remove_aligned_watchpoint): Ditto.
9876 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9877 fit part of the watchpoint in the debug registers.
9878 (i386_update_inferior_debug_regs): New.
9879 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9880 registers, and only update the inferior on success.
9881 (i386_low_remove_watchpoint): Ditto.
9882
d26e3629
KY
98832011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9884
9885 * linux-low.c (compare_ints, unique, list_threads, show_process,
9886 linux_core_of_thread): Delete.
9887 (linux_target_ops): Change linux_core_of_thread to
9888 linux_common_core_of_thread.
9889 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9890 * utils.c (malloc_failure): Change type of argument.
9891 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9892 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9893 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9894 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9895 (IPA_OBJS): Add common-utils-ipa.o.
9896 (ptid_h, linux_osdata_h): New macros.
9897 (server_h): Add common/common-utils.h, common/xml-utils.h,
9898 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9899 common/ptid.h.
9900 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9901 ptid.o, buffer.o): New rules.
9902 (linux-low.o): Add common/linux-osdata.h as a dependency.
9903 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9904 * configure.ac: Add AC_HEADER_DIRENT check.
9905 * config.in: Regenerate.
9906 * configure: Regenerate.
9907 * remote-utils.c (xml_escape_text): Delete.
9908 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9909 buffer_xml_printf): Move to common/buffer.c.
9910 * server.c (main): Remove call to initialize_inferiors.
9911 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9912 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9913 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9914 internal_error, gdb_assert, gdb_assert_fail): Delete.
9915 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9916 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9917 common/buffer.h.
9918 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9919 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9920 initialize_inferiors): Delete.
9921
2275a1a7
PA
99222011-07-20 Pedro Alves <pedro@codesourcery.com>
9923
9924 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9925 symbol error.
9926
0a5b1e09
PA
99272011-05-31 Pedro Alves <pedro@codesourcery.com>
9928
9929 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9930 assertion.
9931 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9932
6938fd34
YQ
99332011-05-26 Yao Qi <yao@codesourcery.com>
9934
9935 * Makefile.in (thread-db.o): Track dependence to
9936 common/gdb_thread_db.h.
9937 * thread-db.c: include gdb_thread_db.h from right place.
9938
b481f9e0
TT
99392011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9940
9941 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9942 __FILE__ and __LINE__ to internal_error.
9943
98a5dd13
DE
99442011-05-13 Doug Evans <dje@google.com>
9945
9946 * thread-db.c (try_thread_db_load_from_sdir): New function.
9947 (try_thread_db_load_from_dir): New function.
9948 (thread_db_load_search): Handle $sdir, ignore $pdir.
9949 Remove trying of system directories if search of
9950 libthread-db-search-path fails, that is now done via $sdir.
9951
d248b706
KY
99522011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9953
9954 * server.c (handle_query): Add EnableDisableTracepoints to the list
9955 of supported features.
43aaf8b6 9956 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 9957 tracepoints.
43aaf8b6
PA
9958 (cmd_qtenable_disable): New.
9959 (cmd_qtstart): Install tracepoints even if disabled.
9960 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9961 receiving a QTEnable or QTDisable packet.
9962 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9963 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9964 tracepoints.
9965 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 9966
84e578fb
DE
99672011-05-10 Doug Evans <dje@google.com>
9968
9969 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9970
71f55dd8
DE
99712011-05-04 Doug Evans <dje@google.com>
9972
9973 * linux-low.c (linux_join): Skip process lookup.
9974 * spu-low.c (spu_join): Ditto.
9975 * server.c (join_inferiors_callback): Delete.
9976 (process_serial_event): For 'D' packet (detach) call join_inferior
9977 directly.
9978
4d393d60
JM
99792011-05-04 Joseph Myers <joseph@codesourcery.com>
9980
9981 * README: Don't mention xscale*-*-linux*.
9982 * configure.srv (xscale*-*-linux*): Don't handle target.
9983
b00ad6ff
NF
99842011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9985
9986 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9987 casting pointers.
9988 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9989 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9990 (i386_emit_void_call_2): Likewise.
9991
af96c192
YQ
99922011-04-26 Yao Qi <yao@codesourcery.com>
9993
43aaf8b6
PA
9994 * linux-low.c: Move common macros to linux-ptrace.h.
9995 Include linux-ptrace.h.
af96c192
YQ
9996 * Makefile.in (linux_ptrace_h): New.
9997 (linux-low.o): Depends on linux-ptrace.h.
9998
03f2bd59
JK
99992011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10000
10001 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10002 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10003 (remote_prepare): New function with most of the TCP code from ...
10004 (remote_open): ... here. Detect PORT here unconditionally. Move also
10005 setting transport_is_reliable.
10006 * server.c (run_once): New variable.
10007 (gdbserver_usage): Document it.
10008 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10009 the first run if RUN_ONCE.
10010 * server.h (run_once, remote_prepare): New declarations.
10011
7a9dd1b2
TT
100122011-04-19 Tom Tromey <tromey@redhat.com>
10013
10014 * win32-low.c (handle_load_dll): Remove duplicate "the".
10015
81239425
PM
100162011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10017
10018 Remove support for old Cygwin 1.5 versions.
10019 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10020 function to avoid warning.
10021 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10022 warning.
10023
9e0627f1
PM
100242011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10025
10026 * gdbserver/server.h (Macro _): Define it if not available.
10027
588eebee
MS
100282011-03-14 Michael Snyder <msnyder@vmware.com>
10029
348af9f7 10030 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 10031
43f70d4c
JB
100322011-03-10 Joel Brobecker <brobecker@adacore.com>
10033
10034 * Makefile.in (maintainer-clean realclean distclean): Remove
10035 "make ... subdir_do" command.
10036
348af9f7
MS
100372011-03-10 Michael Snyder <msnyder@vmware.com>
10038
10039 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10040
10041 * server.c (handle_v_run): Free alloced buffer on early return.
10042
e637a4f5
YQ
100432011-03-09 Yao Qi <yao@codesourcery.com>
10044
10045 Revert:
10046 2011-03-04 Yao Qi <yao@codesourcery.com>
10047
10048 * Makefile.in: Remove GNU make feature --directory.
10049
10050 2011-03-05 Yao Qi <yao@codesourcery.com>
10051
10052 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10053 (subdir_do): New make target. Copied from gdb/Makefile.
10054 (maintainer-clean, realclean, distclean, clean): Call corresponding
10055 make targets in common/Makefile.
10056
10057 2011-02-11 Yao Qi <yao@codesourcery.com>
10058
10059 * configure.ac: Call AC_PROG_RANLIB.
10060 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10061 * configure: Regenerate.
10062
e6edda56
JK
100632011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10064
10065 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10066
e5141119
JB
100672011-03-06 Yao Qi <yao@codesourcery.com>
10068
10069 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10070
64794aa4
JB
100712011-03-05 Yao Qi <yao@codesourcery.com>
10072
10073 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10074 (subdir_do): New make target. Copied from gdb/Makefile.
10075 (maintainer-clean, realclean, distclean, clean): Call corresponding
10076 make targets in common/Makefile.
10077
7a762829
YQ
100782011-03-04 Yao Qi <yao@codesourcery.com>
10079
10080 * Makefile.in: Remove GNU make feature --directory.
10081
348af9f7
MS
100822011-03-04 Michael Snyder <msnyder@vmware.com>
10083
10084 * server.c (queue_stop_reply): Call xmalloc not malloc.
10085
100862011-03-02 Michael Snyder <msnyder@vmware.com>
10087
10088 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10089
9f72fee2
MS
100902011-02-28 Michael Snyder <msnyder@vmware.com>
10091
588eebee
MS
10092 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10093 (cmd_qtframe): Ditto.
10094 (cmd_qtbuffer): Ditto.
10095 (cmd_bigqtbuffer): Ditto.
10096
9f72fee2
MS
10097 * utils.c (decimal2str): Initialize 'width' to nine, then
10098 don't mess with it.
10099
8040bd49
UW
101002011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10101
10102 * hostio.c (require_data): Free *data, not data.
10103
7e52cbd0
JK
101042011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10105
10106 * hostio.c (require_data): Use free, not xfree.
10107
9130f83e
MS
101082011-02-27 Michael Snyder <msnyder@vmware.com>
10109
4b812f4e
MS
10110 * server.c (handle_query): Discard unused value.
10111
9130f83e
MS
10112 * hostio.c (require_data): Free malloc memory before returning
10113 error.
10114
69d37113
MS
101152011-02-26 Michael Snyder <msnyder@vmware.com>
10116
10117 * linux-low.c (list_threads): Call closedir for dirent.
10118
35f5825a
MS
101192011-02-27 Michael Snyder <msnyder@vmware.com>
10120
2a589cef
MS
10121 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10122 a case statement falls through.
10123
0adea5f7
MS
10124 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10125
35f5825a
MS
10126 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10127 in comparison.
10128
238f1c74
MS
101292011-02-26 Michael Snyder <msnyder@vmware.com>
10130
10131 * utils.c (decimal2str): Eliminate dead code and dead param.
10132 (pulongest): Drop dead param from call to decimal2str.
10133 (plongest): Ditto.
10134
633ff500
JB
101352011-02-24 Joel Brobecker <brobecker@adacore.com>
10136
10137 Revert the following patch (not approved yet):
10138 2011-02-21 Hui Zhu <teawater@gmail.com>
10139 * tracepoint.c (tp_printf): New function.
10140 (eval_agent_expr): Handle gdb_agent_op_printf.
10141
f9c6ff72
HZ
101422011-02-21 Hui Zhu <teawater@gmail.com>
10143
10144 * tracepoint.c (tp_printf): New function.
10145 (eval_agent_expr): Handle gdb_agent_op_printf.
10146
94d5e490
TT
101472011-02-18 Tom Tromey <tromey@redhat.com>
10148
10149 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10150 (tracepoint.o): Likewise.
10151 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10152 (gdb_agent_op_names): Likewise.
10153
c7f96d2b
TT
101542011-02-18 Tom Tromey <tromey@redhat.com>
10155
10156 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10157 gdb_agent_op_rot>: New constants.
10158 (gdb_agent_op_names): Add pick and roll.
10159 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10160 cases.
10161
0feedb2c
JK
101622011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10163
10164 * aclocal.m4: Regenerated with aclocal-1.11.1.
10165
b3b9301e
PA
101662011-02-14 Pedro Alves <pedro@codesourcery.com>
10167
10168 * server.c (handle_qxfer_traceframe_info): New.
10169 (qxfer_packets): Register "traceframe-info".
10170 (handle_query): Report support for qXfer:traceframe-info:read+.
10171 * tracepoint.c (match_blocktype): New.
10172 (traceframe_find_block_type): Rename to ...
10173 (traceframe_walk_blocks): ... this. Add callback filter argument,
10174 and use it.
10175 (traceframe_find_block_type): New, reimplemented on top of
10176 traceframe_walk_blocks.
10177 (build_traceframe_info_xml): New.
10178 (traceframe_read_info): New.
10179 * server.h (traceframe_read_info): Declare.
10180
4f3e6fb7
YQ
101812011-02-11 Yao Qi <yao@codesourcery.com>
10182
10183 * configure.ac: Call AC_PROG_RANLIB.
10184 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10185 * configure: Regenerate.
10186
764880b7
PA
101872011-02-07 Pedro Alves <pedro@codesourcery.com>
10188
10189 * server.c (gdb_read_memory): Change return semantics to allow
10190 partial transfers.
10191 (handle_search_memory_1): Adjust.
10192 (process_serial_event) <'m' packet>: Handle partial transfers.
10193 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10194
1c79eb8a
PA
101952011-01-28 Pedro Alves <pedro@codesourcery.com>
10196
10197 * regcache.c (init_register_cache): Initialize
10198 regcache->register_status.
10199 (free_register_cache): Release regcache->register_status.
10200 (regcache_cpy): Copy register_status.
10201 (registers_to_string): Print 'x's for unavailable registers.
10202 (supply_register): Mark the register's status valid or
10203 unavailable, depending on whether a buffer was passed in or not.
10204 (supply_register_zeroed): New.
10205 (supply_regblock): Mark the registers' status valid or
10206 unavailable, depending on whether a buffer was passed in or not.
10207 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10208 (struct regcache): New `register_status' field.
10209 (supply_register_zeroed): Declare.
10210 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10211 supply_register_zeroed, rather than passing a NULL buffer to
10212 supply_register.
10213 * tracepoint.c (fetch_traceframe_registers): Update comment.
10214
85724a0e
PA
102152011-01-28 Pedro Alves <pedro@codesourcery.com>
10216
10217 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10218 buffer explicit.
10219
d08aafef
PA
102202011-01-25 Pedro Alves <pedro@codesourcery.com>
10221
10222 * server.h (decode_xfer_write): Change prototype.
10223 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10224 and don't extract the annex here.
10225 * server.c (decode_xfer_read): Remove `annex' parameter,
10226 and don't extract the annex here.
10227 (decode_xfer): New.
10228 (struct qxfer): New.
10229 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10230 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10231 (handle_qxfer_statictrace): New functions, abstracted out from
10232 handle_query, and made to use the struct qxfer interface.
10233 (handle_threads_qxfer_proper): Rename to ...
10234 (handle_qxfer_threads_proper): ... this.
10235 (handle_threads_qxfer): Rename to ...
10236 (handle_qxfer_threads): ... this. Adjust.
10237 (qxfer_packets): New array.
10238 (handle_qxfer): New function.
10239 (handle_query): Use handle_qxfer.
10240
493e2a69
MS
102412011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10242
10243 * gdbreplay.c: Shorten lines of >= 80 columns.
10244 * linux-low.c: Ditto.
10245 * linux-ppc-low.c: Ditto.
10246 * linux-s390-low.c: Ditto.
10247 * linux-sparc-low.c: Ditto.
10248 * linux-x86-low.c: Ditto.
10249 * linux-xtensa-low.c: Ditto.
10250 * mem-break.c: Ditto.
10251 * nto-low.c: Ditto.
10252 * regcache.h: Ditto.
10253 * remote-utils.c: Ditto.
10254 * server.c: Ditto.
10255 * server.h: Ditto.
10256 * thread-db.c: Ditto.
10257 * tracepoint.c: Ditto.
10258 * utils.c: Ditto.
10259 * win32-low.h: Ditto.
10260
44944448
JB
102612011-01-05 Joel Brobecker <brobecker@adacore.com>
10262
10263 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10264 update.
10265
71ce852c
JB
102662011-01-01 Joel Brobecker <brobecker@adacore.com>
10267
10268 * server.c (gdbserver_version): Update copyright year in version
10269 output.
10270 * gdbreplay.c (gdbreplay_version): Ditto.
10271
eb826dc6
MF
102722010-12-29 Jie Zhang <jie.zhang@analog.com>
10273
10274 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10275 * linux-bfin-low.c: New file.
10276 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10277 PT_DATA_ADDR for BFIN targets.
10278 * Makefile.in (SFILES): Add linux-bfin-low.c.
10279 (clean): Remove reg-bfin.c.
10280 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10281 * README: Mention supported Blackfin targets.
10282
39ab222a
MF
102832010-12-23 Mike Frysinger <vapier@gentoo.org>
10284
10285 * .gitignore: New file.
10286
a1f2ce7d
MF
102872010-11-16 Mike Frysinger <vapier@gentoo.org>
10288
10289 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10290
f474844c
JZ
102912010-10-22 Jie Zhang <jie@codesourcery.com>
10292
10293 * Makefile.in: Add FLAGS_TO_PASS variable.
10294 (install): Remove dependency of install-only and recursively
10295 invoke make for install-only.
10296
f1048712
DE
102972010-10-04 Doug Evans <dje@google.com>
10298
10299 * Makefile.in (uninstall): Use $(DESTDIR).
10300
b53a1623
PA
103012010-09-24 Pedro Alves <pedro@codesourcery.com>
10302
e6ee044d
PA
10303 PR gdb/11842
10304
b53a1623
PA
10305 * linux-x86-low.c (compat_siginfo_from_siginfo)
10306 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10307 si_code is < 0. Check for si_code == SI_TIMER before checking for
10308 si_code < 0.
10309
fa1bd1e4
JB
103102010-09-13 Joel Brobecker <brobecker@adacore.com>
10311
10312 * lynx-i386-low.c: New file.
10313 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10314
47fac8f8
JB
103152010-09-13 Joel Brobecker <brobecker@adacore.com>
10316
10317 * lynx-low.c (ptrace_request_to_str): Remove handling for
10318 request values that have been removed in LynxOS 5.x.
10319
1adfc54d
JB
103202010-09-13 Joel Brobecker <brobecker@adacore.com>
10321
10322 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10323 <ptrace.h>
10324
c2a66c29
NS
103252010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10326
10327 * configure.ac: Add --enable-inprocess-agent option.
10328 * configure: Rebuilt.
10329
32fcada3
YQ
103302010-09-06 Yao Qi <yao@codesourcery.com>
10331
10332 * linux-low.c (linux_kill): Remove unused variable.
10333 (linux_stabilize_threads): Likewise.
10334 * server.c (start_inferior): Likewise.
10335 (queue_stop_reply_callback): Likewise.
10336 * tracepoint.c (do_action_at_tracepoint): Likewise.
10337
0cccb683
YQ
103382010-09-06 Yao Qi <yao@codesourcery.com>
10339
10340 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10341 on return.
10342
423ec54c
JK
103432010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10344
10345 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10346
12ac6819
PA
103472010-09-06 Pedro Alves <pedro@codesourcery.com>
10348
10349 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10350 "$(IPA_DEPFILES)".
10351
8ed54b31
JB
103522010-09-01 Joel Brobecker <brobecker@adacore.com>
10353
10354 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10355 gdbserver/lynx-ppc-low.c: New files.
10356 * Makefile.in (lynx_low_h): New variable.
10357 (lynx-low.o, lynx-ppc-low.o): New rules.
10358 * configure.ac: On LynxOS, link with -lnetinet.
10359 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10360 * configure: regenerate.
10361
bb0116a4
JB
103622010-09-01 Joel Brobecker <brobecker@adacore.com>
10363
10364 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10365 * configure.ac: Add check for vasprintf and vsnprintf.
10366 * configure, config.in: Regenerate.
10367 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10368
a778ab81 103692010-09-01 Joel Brobecker <brobecker@adacore.com>
10370
10371 * gdbreplay.c: Move include of alloca.h up, next to include of
10372 malloc.h.
10373 * server.h: Add include of malloc.h.
10374 * mem-break.c: Remove include of malloc.h.
10375 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10376
8b034a19 103772010-09-01 Joel Brobecker <brobecker@adacore.com>
10378
10379 * Makefile.in (memmem.o): Build with -Wno-error.
10380
103812010-09-01 Joel Brobecker <brobecker@adacore.com>
10382
10383 * utils.c (xsnprintf): Make non-static.
10384 * server.h: Add xsnprintf declaration.
10385 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10386 replace calls to snprintf by calls to xsnprintf throughout.
10387
103882010-09-01 Joel Brobecker <brobecker@adacore.com>
10389
10390 * configure.ac: Add configure check for alloca.
10391 * configure, config.in: Regenerate.
10392 * server.h: Include alloca.h if it exists.
10393 * gdbreplay.c: Include alloca.h if it exists.
10394
1a981360
PA
103952010-08-28 Pedro Alves <pedro@codesourcery.com>
10396
10397 * linux-low.c (__SIGRTMIN): Define if not already defined.
10398 (linux_create_inferior): Check for __ANDROID__ rather than
10399 __SIGRTMIN.
10400 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10401 are already deferred.
10402 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10403 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10404 stopped and already has a pending signal to report.
10405 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10406 a pending signal to report or is moving out of a jump pad.
10407 (linux_init_signals): Check for __ANDROID__ rather than
10408 __SIGRTMIN.
10409
b4d51a55
PA
104102010-08-28 Pedro Alves <pedro@codesourcery.com>
10411
10412 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10413 debug_threads check. Avoid a linear search when not doing debug
10414 output.
10415
ec48365d
PA
104162010-08-27 Pedro Alves <pedro@codesourcery.com>
10417
10418 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10419 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10420 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10421 (process_event): Change local fd's type to gdb_fildes_t.
10422 (create_file_handler): Adjust prototype.
10423 (delete_file_handler): Adjust prototype.
10424 (handle_file_event): Adjust prototype. Use pfildes.
10425 (create_file_event): Adjsut prototype.
10426 * remote-utils.c (remote_desc, listen_desc): Change type to
10427 gdb_fildes_t.
10428 * server.h: New gdb_fildes_t typedef.
10429 [USE_WIN32API]: Include winsock2.h.
10430 (delete_file_handler, add_file_handler): Adjust prototypes.
10431 (pfildes): Declare.
10432 * utils.c (pfildes): New.
10433
854d88f0
PA
104342010-08-27 Pedro Alves <pedro@codesourcery.com>
10435
10436 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10437 * configure: Regenerate.
10438
0146f85b
PA
104392010-08-27 Pedro Alves <pedro@codesourcery.com>
10440
10441 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10442 (linux_done_accessing_memory): ... this.
10443 (linux_target_ops): Adjust.
10444 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10445 * nto-low.c (nto_target_ops): Adjust comment.
10446 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10447 * spu-low.c (spu_target_ops): Adjust comment.
10448 * target.h (target_ops): Rename unprepare_to_access_memory field
10449 to done_accessing_memory.
10450 (unprepare_to_access_memory): Rename to ...
10451 (done_accessing_memory): ... this.
10452
90d74c30
PA
104532010-08-26 Pedro Alves <pedro@codesourcery.com>
10454
10455 * linux-low.c (linux_prepare_to_access_memory): New.
10456 (linux_unprepare_to_access_memory): New.
10457 (linux_target_ops): Install them.
10458 * server.c (read_memory): Rename to ...
10459 (gdb_read_memory): ... this. Use
10460 prepare_to_access_memory/prepare_to_access_memory.
10461 (write_memory): Rename to ...
10462 (gdb_write_memory): ... this. Use
10463 prepare_to_access_memory/prepare_to_access_memory.
10464 (handle_search_memory_1): Adjust.
10465 (process_serial_event): Adjust.
10466 * target.h (struct target_ops): New fields
10467 prepare_to_access_memory and unprepare_to_access_memory.
10468 (prepare_to_access_memory, unprepare_to_access_memory): New.
10469 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10470 prepare_to_access_memory/prepare_to_access_memory.
10471 * nto-low.c (nto_target_ops): Adjust.
10472 * spu-low.c (spu_target_ops): Adjust.
10473 * win32-low.c (win32_target_ops): Adjust.
10474
fd467969
PA
104752010-08-26 Pedro Alves <pedro@codesourcery.com>
10476
10477 * Makefile.in (WARN_CFLAGS): Get it from configure.
10478 (WERROR_CFLAGS): New.
10479 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10480 * configure.ac: Introduce --enable-werror, which adds -Werror to
10481 the compiler command line. Enabled by default. Disable with
10482 --disable-werror. Add -Wdeclaration-after-statement
10483 Wpointer-arith and -Wformat-nonliteral to warning flags.
10484 * configure: Regenerate.
10485
331e2f5f
PA
104862010-08-26 Pedro Alves <pedro@codesourcery.com>
10487
10488 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10489
e581f2b4
PA
104902010-08-26 Pedro Alves <pedro@codesourcery.com>
10491
10492 * gdbreplay.c (remote_error): New.
10493 (gdbchar): New.
10494 (expect): Use gdbchar. Check for error reading from GDB.
10495 Clarify sync error output.
10496 (play): Check for errors writing to GDB.
10497 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10498 * remote-utils.c (getpkt): Check for errors writing to the remote
10499 descriptor.
10500
3c11dd79
PA
105012010-08-25 Pedro Alves <pedro@codesourcery.com>
10502
10503 * linux-low.c (linux_wait_1): Move non-debugging code out of
10504 `debug_threads' control.
10505
d20a8ad9
PA
105062010-08-25 Pedro Alves <pedro@codesourcery.com>
10507
10508 * linux-low.c (linux_wait_1): Don't set last_status here.
10509 * server.c (push_event, queue_stop_reply_callback): Assert we're
10510 not pushing a TARGET_WAITKIND_IGNORE event.
10511 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10512 (myresume, handle_target_event): Set the thread's last_resume_kind
10513 and last_status from the target returned status.
10514
964e4306
PA
105152010-08-25 Pedro Alves <pedro@codesourcery.com>
10516
10517 PR threads/10729
10518
10519 * linux-x86-low.c (update_debug_registers_callback): New.
10520 (i386_dr_low_set_addr): Use it.
10521 (i386_dr_low_get_addr): New.
10522 (i386_dr_low_set_control): Use update_debug_registers_callback.
10523 (i386_dr_low_get_control): New.
10524 (i386_dr_low_get_status): Adjust.
10525 * linux-low.c (linux_stop_lwp): New.
10526 * linux-low.h (linux_stop_lwp): Declare.
10527
10528 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10529 argument instead of a i386_debug_reg_state.
10530 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10531 a i386_debug_reg_state.
10532 (i386_insert_aligned_watchpoint): Adjust.
10533 (i386_remove_aligned_watchpoint): Adjust.
10534 (i386_low_stopped_data_address): Read the debug registers from the
10535 inferior instead of from the mirrors.
10536 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10537 (i386_dr_low_get_addr): Declare.
10538 (i386_dr_low_get_control): Declare.
10539 (i386_dr_low_get_status): Change prototype.
10540
10541 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10542 (i386_dr_low_get_addr): New.
10543 (i386_dr_low_get_control): New.
10544 (i386_dr_low_get_status): Adjust prototype. Return
10545 dr_status_mirror.
10546 (i386_initial_stuff): Clear dr_status_mirror and
10547 dr_control_mirror.
10548 (i386_get_thread_context): Adjust.
10549 (i386_set_thread_context): Adjust.
10550 (i386_thread_added): Adjust.
10551
5f21a75b
PA
105522010-08-24 Pedro Alves <pedro@codesourcery.com>
10553
10554 * linux-low.h (linux_thread_area): Delete declaration.
10555
3e4c1235
TS
105562010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10557
10558 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10559 after its termination.
10560
1971b033
PA
105612010-08-09 Pedro Alves <pedro@codesourcery.com>
10562
10563 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10564 (gdb_wants_all_stopped): Delete.
10565 (linux_wait_1): Don't call them.
10566 * server.c (handle_v_cont): Tag all threads as want-stopped.
10567 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10568 stopped as "client-wants-stopped".
10569
310444ac
PA
105702010-07-31 Pedro Alves <pedro@codesourcery.com>
10571
10572 * Makefile.in (signals_h): New.
10573 (server_h): Depend on it.
10574 (server.o): Don't depend on $(signals_def).
10575 (signals.o): Depend on $(signals_def).
10576
a19cae16
JK
105772010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10578
10579 * Makefile.in (signals_def): New.
10580 (server_h): Append include/gdb/signals.h and signals_def.
10581 (server.o): Append signals_def.
10582
30d50328
JK
105832010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10584
10585 * server.c (handle_target_event): Use target_signal_to_host for
10586 resume_info.sig initialization.
10587 * target.h (struct thread_resume) <sig>: New comment.
10588
5c3216e2
OS
105892010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10590
c6f46ca0
OS
10591 * server.c (handle_query): strcpy() the returned string from paddress()
10592 instead of sprintf().
5c3216e2
OS
10593 * utils.c (paddress): Return phex_nz().
10594
6bd31874
JB
105952010-07-07 Joel Brobecker <brobecker@adacore.com>
10596
10597 * server.c (handle_v_cont): Call mourn_inferior if process
10598 just exited.
10599 (myresume): Likewise.
10600
0fb4aa4b
PA
106012010-07-01 Pedro Alves <pedro@codesourcery.com>
10602
10603 Static tracepoints, and integration with UST.
10604
10605 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10606 * mem-break.c (uninsert_all_breakpoints)
10607 (reinsert_all_breakpoints): New.
10608 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10609 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10610 (gdb_agent_ust_loaded, helper_thread_id)
10611 (gdb_agent_helper_thread_id): New macros.
10612 (struct ipa_sym_addresses): Add addr_ust_loaded,
10613 addr_helper_thread_id, addr_cmd_buf.
10614 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10615 (in_process_agent_loaded_ust): New.
10616 (write_e_ust_not_loaded): New.
10617 (maybe_write_ipa_ust_not_loaded): New.
10618 (struct collect_static_trace_data_action): New.
10619 (enum tracepoint_type) <static_tracepoint>: New.
10620 (struct tracepoint) <handle>: Mention static tracepoints.
10621 (struct static_tracepoint_ctx): New.
10622 (CMD_BUF_SIZE): New.
10623 (add_tracepoint_action): Handle static tracepoint actions.
10624 (unprobe_marker_at): New.
10625 (clear_installed_tracepoints): Handle static tracepoints.
10626 (cmd_qtdp): Handle static tracepoints.
10627 (probe_marker_at): New.
10628 (cmd_qtstart): Handle static tracepoints.
10629 (response_tracepoint): Handle static tracepoints.
10630 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10631 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10632 (get_context_regcache): Handle static tracepoints.
10633 (do_action_at_tracepoint): Handle static tracepoint actions.
10634 (traceframe_find_block_type): Handle static trace data blocks.
10635 (traceframe_read_sdata): New.
10636 (download_tracepoints): Download static tracepoint actions.
10637 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10638 (GDB_PROBE_NAME): New.
10639 (ust_ops): New.
10640 (GET_UST_SYM): New.
10641 (USTF): New.
10642 (dlsym_ust): New.
10643 (ust_marker_to_static_tracepoint): New.
10644 (gdb_probe): New.
10645 (collect_ust_data_at_tracepoint): New.
10646 (gdb_ust_probe): New.
10647 (UNIX_PATH_MAX, SOCK_DIR): New.
10648 (gdb_ust_connect_sync_socket): New.
10649 (resume_thread, stop_thread): New.
10650 (run_inferior_command): New.
10651 (init_named_socket): New.
10652 (gdb_ust_socket_init): New.
10653 (cstr_to_hexstr): New.
10654 (next_st): New.
10655 (first_marker, next_marker): New.
10656 (response_ust_marker): New.
10657 (cmd_qtfstm, cmd_qtsstm): New.
10658 (unprobe_marker_at, probe_marker_at): New.
10659 (cmd_qtstmat, gdb_ust_thread): New.
10660 (gdb_ust_init): New.
10661 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10662 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10663 (ST_REGENTRY): New.
10664 (x86_64_st_collect_regmap): New.
10665 (X86_64_NUM_ST_COLLECT_GREGS): New.
10666 (AMD64_RIP_REGNUM): New.
10667 (supply_static_tracepoint_registers): New.
10668 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10669 (ST_REGENTRY): New.
10670 (i386_st_collect_regmap): New.
10671 (i386_NUM_ST_COLLECT_GREGS): New.
10672 (supply_static_tracepoint_registers): New.
10673 * server.c (handle_query): Handle qXfer:statictrace:read.
10674 <qSupported>: Report support for StaticTracepoints, and
10675 qXfer:statictrace:read features.
10676 * server.h (traceframe_read_sdata)
10677 (supply_static_tracepoint_registers): Declare.
10678 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10679 (unpack_varlen_hex): Include in IPA build.
10680 * Makefile.in (ustlibs, ustinc): New.
10681 (IPA_OBJS): Add remote-utils-ipa.o.
10682 ($(IPA_LIB)): Link -ldl and -lpthread.
10683 (UST_CFLAGS): New.
10684 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10685 * config.in, configure: Regenerate.
10686
9e4344e5
PA
106872010-06-20 Ian Lance Taylor <iant@google.com>
10688 Pedro Alves <pedro@codesourcery.com>
10689
10690 * linux-x86-low.c (always_true): Delete.
10691 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10692 trying to fool the compiler with always_true.
10693
c6beb2cb
PA
106942010-06-20 Pedro Alves <pedro@codesourcery.com>
10695
10696 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10697 conditions in gdbserver.
10698
d2ed6730
UW
106992010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10700
10701 * spu-low.c (spu_read_memory): Wrap around local store limit.
10702 (spu_write_memory): Likewise.
10703
4e29fb54
PA
107042010-06-15 Pedro Alves <pedro@codesourcery.com>
10705
10706 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10707 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10708 LONGEST uses.
10709 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10710 uses.
10711 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10712 uses with LONGEST uses.
10713
6a271cae
PA
107142010-06-14 Stan Shebs <stan@codesourcery.com>
10715 Pedro Alves <pedro@codesourcery.com>
10716
10717 Bytecode compiler.
10718
10719 * linux-x86-low.c: Include limits.h.
10720 (add_insns): New.
10721 (always_true): New.
10722 (EMIT_ASM): New.
10723 (EMIT_ASM32): New.
10724 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10725 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10726 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10727 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10728 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10729 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10730 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10731 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10732 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10733 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10734 (amd64_emit_void_call_2): New.
10735 (amd64_emit_ops): New.
10736 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10737 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10738 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10739 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10740 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10741 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10742 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10743 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10744 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10745 (i386_emit_stack_adjust, i386_emit_int_call_1)
10746 (i386_emit_void_call_2): New.
10747 (i386_emit_ops): New.
10748 (x86_emit_ops): New.
10749 (the_low_target): Install x86_emit_ops.
10750 * server.h (struct emit_ops): New.
10751 (get_raw_reg_func_addr): Declare.
10752 (current_insn_ptr, emit_error): Declare.
10753 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10754 (set_trace_state_variable_value): New defines.
10755 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10756 addr_get_trace_state_variable_value and
10757 addr_set_trace_state_variable_value.
10758 (symbol_list): New fields for get_raw_reg,
10759 get_trace_state_variable_value and set_trace_state_variable_value.
10760 (condfn): New typedef.
10761 (struct tracepoint): New field `compiled_cond'.
10762 (do_action_at_tracepoint): Clear compiled_cond.
10763 (get_trace_state_variable_value, set_trace_state_variable_value):
10764 Export in the IPA.
10765 (condition_true_at_tracepoint): If there's a compiled condition,
10766 run that.
10767 (current_insn_ptr, emit_error): New globals.
10768 (struct bytecode_address): New.
10769 (get_raw_reg_func_addr): New.
10770 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10771 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10772 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10773 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10774 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10775 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10776 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10777 (compile_tracepoint_condition, compile_bytecodes): New.
10778 * target.h (emit_ops): Forward declare.
10779 (struct target_ops): New field emit_ops.
10780 (target_emit_ops): New.
10781 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10782 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10783 * linux-low.c (linux_emit_ops): New.
10784 (linux_target_ops): Install it.
10785 * linux-low.h (struct linux_target_ops): New field emit_ops.
10786
92b72907
UW
107872010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10788
10789 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10790 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10791
fa593d66
PA
107922010-06-01 Pedro Alves <pedro@codesourcery.com>
10793 Stan Shebs <stan@codesourcery.com>
10794
10795 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10796 (all): Depend on $(extra_libraries).
10797 (install-only): Install the IPA.
10798 (IPA_OBJS, IPA_LIB): New.
10799 (clean): Remove the IPA lib.
10800 (IPAGENT_CFLAGS): New.
10801 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10802 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10803 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10804 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10805 * configure.ac: Check for atomic builtins support in the compiler.
10806 (IPA_DEPFILES, extra_libraries): Define.
10807 * configure.srv (ipa_obj): Add description.
10808 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10809 (i[34567]86-*-linux*): Set ipa_obj.
10810 (x86_64-*-linux*): Set ipa_obj.
10811 * linux-low.c (stabilizing_threads): New.
10812 (supports_fast_tracepoints): New.
10813 (linux_detach): Stabilize threads before detaching.
10814 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10815 the lwp is either not stabilizing, or is moving out of a jump pad.
10816 (linux_fast_tracepoint_collecting): New.
10817 (maybe_move_out_of_jump_pad): New.
10818 (enqueue_one_deferred_signal): New.
10819 (dequeue_one_deferred_signal): New.
10820 (linux_wait_for_event_1): If moving out of a jump pad, defer
10821 pending signals to later.
10822 (linux_stabilize_threads): New.
10823 (linux_wait_1): Check if threads need moving out of jump pads, and
10824 do it if so.
10825 (stuck_in_jump_pad_callback): New.
10826 (move_out_of_jump_pad_callback): New.
10827 (lwp_running): New.
10828 (linux_resume_one_lwp): Handle moving out of jump pads.
10829 (linux_set_resume_request): Dequeue deferred signals.
10830 (need_step_over_p): Also step over fast tracepoint jumps.
10831 (start_step_over): Also uninsert fast tracepoint jumps.
10832 (finish_step_over): Also reinsert fast tracepoint jumps.
10833 (linux_install_fast_tracepoint_jump): New.
10834 (linux_target_ops): Install linux_stabilize_threads and
10835 linux_install_fast_tracepoint_jump_pad.
10836 * linux-low.h (linux_target_ops) <get_thread_area,
10837 install_fast_tracepoint_jump_pad>: New fields.
10838 (struct lwp_info) <collecting_fast_tracepoint,
10839 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10840 (linux_get_thread_area): Declare.
10841 * linux-x86-low.c (jump_insn): New.
10842 (x86_get_thread_area): New.
10843 (append_insns): New.
10844 (push_opcode): New.
10845 (amd64_install_fast_tracepoint_jump_pad): New.
10846 (i386_install_fast_tracepoint_jump_pad): New.
10847 (x86_install_fast_tracepoint_jump_pad): New.
10848 (the_low_target): Install x86_get_thread_area and
10849 x86_install_fast_tracepoint_jump_pad.
10850 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10851 (struct fast_tracepoint_jump): New.
10852 (fast_tracepoint_jump_insn): New.
10853 (fast_tracepoint_jump_shadow): New.
10854 (find_fast_tracepoint_jump_at): New.
10855 (fast_tracepoint_jump_here): New.
10856 (delete_fast_tracepoint_jump): New.
10857 (set_fast_tracepoint_jump): New.
10858 (uninsert_fast_tracepoint_jumps_at): New.
10859 (reinsert_fast_tracepoint_jumps_at): New.
10860 (set_breakpoint_at): Use write_inferior_memory.
10861 (uninsert_raw_breakpoint): Use write_inferior_memory.
10862 (check_mem_read): Mask out fast tracepoint jumps.
10863 (check_mem_write): Mask out fast tracepoint jumps.
10864 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10865 (set_fast_tracepoint_jump): Declare.
10866 (delete_fast_tracepoint_jump)
10867 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10868 (reinsert_fast_tracepoint_jumps_at): Declare.
10869 * regcache.c: Don't compile many functions when building the
10870 in-process agent library.
10871 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10872 the register buffer in the heap.
10873 (free_register_cache): If the register buffer isn't owned by the
10874 regcache, don't free it.
10875 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10876 pre-existing register caches.
10877 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10878 type.
10879 (convert_ascii_to_int): : Constify `from' parameter type.
10880 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10881 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10882 the needed buffer in-place.
10883 (relocate_instruction): New.
10884 * server.c (handle_query) <qSymbols>: If the target supports
10885 tracepoints, give it a chance of looking up symbols. Report
10886 support for fast tracepoints.
10887 (handle_status): Stabilize threads.
10888 (process_serial_event): Adjust.
10889 * server.h (struct fast_tracepoint_jump): Forward declare.
10890 (struct process_info) <fast_tracepoint_jumps>: New field.
10891 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10892 (decode_X_packet, decode_M_packet): Adjust.
10893 (relocate_instruction): Declare.
10894 (in_process_agent_loaded): Declare.
10895 (tracepoint_look_up_symbols): Declare.
10896 (struct fast_tpoint_collect_status): Declare.
10897 (fast_tracepoint_collecting): Declare.
10898 (force_unlock_trace_buffer): Declare.
10899 (handle_tracepoint_bkpts): Declare.
10900 (initialize_low_tracepoint)
10901 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10902 * target.h (struct target_ops) <stabilize_threads,
10903 install_fast_tracepoint_jump_pad>: New fields.
10904 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10905 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10906 [HAVE_STDINT_H]: Include stdint.h.
10907 (trace_debug_1): Rename to ...
10908 (trace_vdebug): ... this.
10909 (trace_debug): Rename to ...
10910 (trace_debug_1): ... this. Add `level' parameter.
10911 (trace_debug): New.
10912 (ATTR_USED, ATTR_NOINLINE): New.
10913 (IP_AGENT_EXPORT): New.
10914 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10915 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10916 (about_to_request_buffer_space, trace_buffer_is_full)
10917 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10918 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10919 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10920 (traceframe_write_count, traceframes_created)
10921 (trace_state_variables)
10922 New renaming defines.
10923 (struct ipa_sym_addresses): New.
10924 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10925 (symbol_list): New.
10926 (ipa_sym_addrs): New.
10927 (all_tracepoint_symbols_looked_up): New.
10928 (in_process_agent_loaded): New.
10929 (write_e_ipa_not_loaded): New.
10930 (maybe_write_ipa_not_loaded): New.
10931 (tracepoint_look_up_symbols): New.
10932 (debug_threads) [IN_PROCESS_AGENT]: New.
10933 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10934 (UNKNOWN_SIDE_EFFECTS): New.
10935 (stop_tracing): New.
10936 (flush_trace_buffer): New.
10937 (stop_tracing_bkpt): New.
10938 (flush_trace_buffer_bkpt): New.
10939 (read_inferior_integer): New.
10940 (read_inferior_uinteger): New.
10941 (read_inferior_data_pointer): New.
10942 (write_inferior_data_pointer): New.
10943 (write_inferior_integer): New.
10944 (write_inferior_uinteger): New.
10945 (struct collect_static_trace_data_action): Delete.
10946 (enum tracepoint_type): New.
10947 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
10948 <actions_str, step_actions, step_actions_str>: Only include in
10949 GDBserver.
fa593d66
PA
10950 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10951 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10952 (tracepoints): Use IP_AGENT_EXPORT.
10953 (last_tracepoint): Don't include in the IPA.
10954 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10955 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10956 (alloced_trace_state_variables): New.
10957 (trace_state_variables): Use IP_AGENT_EXPORT.
10958 (traceframe_t): Delete unused variable.
10959 (circular_trace_buffer): Don't include in the IPA.
10960 (trace_buffer_start): Delete.
10961 (struct trace_buffer_control): New.
10962 (trace_buffer_free): Delete.
10963 (struct ipa_trace_buffer_control): New.
10964 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10965 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10966 New.
10967 (trace_buffer_ctrl): New.
10968 (TRACE_BUFFER_CTRL_CURR): New.
10969 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10970 Reimplement as macros.
10971 (trace_buffer_wrap): Delete.
10972 (traceframe_write_count, traceframe_read_count)
10973 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10974 (struct tracepoint_hit_ctx) <type>: New field.
10975 (struct fast_tracepoint_ctx): New.
10976 (memory_barrier): New.
10977 (cmpxchg): New.
10978 (record_tracepoint_error): Update atomically in the IPA.
10979 (clear_inferior_trace_buffer): New.
10980 (about_to_request_buffer_space): New.
10981 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10982 updating the same buffer.
10983 (add_tracepoint): Default the tracepoint's type to trap
10984 tracepoint, and orig_size to -1.
10985 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10986 internal variables.
10987 (create_trace_state_variable): New parameter `gdb'. Handle it.
10988 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10989 (cmd_qtdp): Handle fast tracepoints.
10990 (cmd_qtdv): Adjust.
10991 (max_jump_pad_size): New.
10992 (gdb_jump_pad_head): New.
10993 (get_jump_space_head): New.
10994 (claim_jump_space): New.
10995 (sort_tracepoints): New.
10996 (MAX_JUMP_SIZE): New.
10997 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10998 IPA.
10999 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11000 support. Upload fast traceframes, and delete internal IPA
11001 breakpoints.
11002 (stop_tracing_handler): New.
11003 (flush_trace_buffer_handler): New.
11004 (cmd_qtstop): Upload fast tracepoints.
11005 (response_tracepoint): Handle fast tracepoints.
11006 (tracepoint_finished_step): Upload fast traceframes. Set the
11007 tracepoint hit context's tracepoint type.
11008 (handle_tracepoint_bkpts): New.
11009 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11010 type. Add comment about fast tracepoints.
11011 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11012 non-existing action_str field.
11013 (get_context_regcache): Handle fast tracepoints.
11014 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11015 to the regcache.
11016 (fast_tracepoint_from_jump_pad_address): New.
11017 (fast_tracepoint_from_ipa_tpoint_address): New.
11018 (collecting_t): New.
11019 (force_unlock_trace_buffer): New.
11020 (fast_tracepoint_collecting): New.
11021 (collecting): New.
11022 (gdb_collect): New.
11023 (write_inferior_data_ptr): New.
11024 (target_tp_heap): New.
11025 (target_malloc): New.
11026 (download_agent_expr): New.
11027 (UALIGN): New.
11028 (download_tracepoints): New.
11029 (download_trace_state_variables): New.
11030 (upload_fast_traceframes): New.
11031 (IPA_FIRST_TRACEFRAME): New.
11032 (IPA_NEXT_TRACEFRAME_1): New.
11033 (IPA_NEXT_TRACEFRAME): New.
11034 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11035 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11036 (gdb_jump_pad_buffer_end): New.
11037 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11038 (initialize_tracepoint): Adjust.
11039 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11040 buffer. Initialize the low module.
11041 * utils.c (PREFIX, TOOLNAME): New.
11042 (malloc_failure): Use PREFIX.
11043 (error): In the IPA, an error causes an exit.
11044 (fatal, warning): Use PREFIX.
11045 (internal_error): Use TOOLNAME.
11046 (NUMCELLS): Increase to 10.
11047 * configure, config.in: Regenerate.
11048
d149dd1d
PA
110492010-06-01 Pedro Alves <pedro@codesourcery.com>
11050
11051 * server.c (handle_query) <qSupported>: Do two passes over the
11052 qSupported string to avoid nesting strtok.
11053
f6528abd
JK
110542010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11055
11056 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11057 (CDEPS): New.
11058 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11059 -Wl,--dynamic-list.
11060 * configure: Regenerate.
11061 * proc-service.list: New.
11062
ca2a87a0
JK
110632010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11064
11065 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11066 New comment.
11067
363a6e9f
OS
110682010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11069
11070 * gdbreplay.c (remote_open): Check error return from socket() call by
11071 its equality to -1 not by it being negative.
11072 * remote-utils.c (remote_open): Likewise.
11073
d23b6cb1
PA
110742010-05-23 Pedro Alves <pedro@codesourcery.com>
11075
11076 * config.h: Regenerate.
11077
28d3cf85
MK
110782010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11079
11080 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11081 doesn't provide PTRACE_GET_THREAD_AREA.
11082
fea36a59
MK
110832010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11084
11085 * linux-m68k-low.c: Include <asm/ptrace.h>
11086 (ps_get_thread_area): Implement.
11087
24b066ba
DE
110882010-05-03 Doug Evans <dje@google.com>
11089
11090 * event-loop.c (struct callback_event): New struct.
11091 (callback_list): New global.
11092 (append_callback_event, delete_callback_event): New functions.
11093 (process_callback): New function.
11094 (start_event_loop): Call it.
11095 * remote-utils.c (NOT_SCHEDULED): Define.
11096 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11097 moved out of readchar.
11098 (readchar): Rewrite. Call reschedule before returning.
11099 (reset_readchar): New function.
11100 (remote_close): Call it.
11101 (process_remaining, reschedule): New functions.
11102 * server.h (callback_handler_func): New typedef.
11103 (append_callback_event, delete_callback_event): Declare.
11104
9836d6ea
PA
111052010-05-03 Pedro Alves <pedro@codesourcery.com>
11106
11107 * proc-service.c (ps_pglobal_lookup): Use
11108 thread_db_look_up_one_symbol.
11109 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11110 parameter. Use it instead of all_symbols_looked_up.
11111 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11112 field.
11113 (all_symbols_looked_up): Don't declare.
11114 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11115 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11116 field.
11117 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11118 Set all_symbols_looked_up here.
11119 (thread_db_look_up_one_symbol): New.
11120 (thread_db_get_tls_address): Adjust.
11121 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11122 thread_db object on the heap, and tentatively set it in the
11123 process structure.
11124 (thread_db_init): Don't set all_symbols_looked_up here.
11125 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11126
7984d532
PA
111272010-05-03 Pedro Alves <pedro@codesourcery.com>
11128
11129 * linux-low.c (linux_kill, linux_detach): Adjust.
11130 (status_pending_p_callback): Remove redundant statement. Check
11131 for !TARGET_WAITIKIND_IGNORE, instead of
11132 TARGET_WAITKIND_STOPPED.
11133 (handle_tracepoints): Make sure LWP is locked. Adjust.
11134 (linux_wait_for_event_1): Adjust.
11135 (linux_cancel_breakpoints): New.
11136 (unsuspend_one_lwp): New.
11137 (unsuspend_all_lwps): New.
11138 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11139 (send_sigstop_callback): Change return type to int, add new
11140 `except' parameter and handle it.
11141 (suspend_and_send_sigstop_callback): New.
11142 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11143 pass them down. If SUSPEND, also increment the lwp's suspend
11144 count.
11145 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11146 (need_step_over_p): Don't consider suspended LWPs.
11147 (start_step_over): Adjust.
11148 (proceed_one_lwp): Change return type to int, add new `except'
11149 parameter and handle it.
11150 (unsuspend_and_proceed_one_lwp): New.
11151 (proceed_all_lwps): Use find_inferior instead of
11152 for_each_inferior.
11153 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11154 also decrement the suspend count of LWPs. Pass `except' down,
11155 instead of hacking its suspend count.
11156 (linux_pause_all): Add `freeze' parameter. Adjust.
11157 (linux_unpause_all): New.
11158 (linux_target_ops): Install linux_unpause_all.
11159 * server.c (handle_status): Adjust.
11160 * target.h (struct target_ops): New fields `unpause_all' and
11161 `cancel_breakpoints'. Add new parameter to `pause_all'.
11162 (pause_all): Add new `freeze' parameter.
11163 (unpause_all): New.
11164 (cancel_breakpoints): New.
11165 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11166 cancel breakpoints.
11167 (cmd_qtstart): Pause threads.
11168 (stop_tracing): Pause threads, and cancel breakpoints.
11169 * win32-low.c (win32_target_ops): Adjust.
11170
e471f25b
PA
111712010-05-03 Pedro Alves <pedro@codesourcery.com>
11172
11173 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11174 the inferior right away from here...
11175 (linux_wait_1): ... to here, and adjust to check the thread's
11176 last_resume_kind instead of the lwp's step or stop_expected flags.
11177
1915ef4f
PA
111782010-05-02 Pedro Alves <pedro@codesourcery.com>
11179
11180 * README: Use consistent `GDB' and `GDBserver' spellings.
11181
f9e39928
PA
111822010-05-02 Pedro Alves <pedro@codesourcery.com>
11183
11184 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11185 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11186 (linux_detach_one_lwp): Assume the lwp is stopped.
11187 (any_thread_of): Delete.
11188 (linux_detach): Stop all lwps here. Don't blindly delete all
11189 breakpoints.
11190 (delete_lwp_callback): New.
11191 (linux_mourn): Delete all lwps of the process that is gone.
11192 (linux_wait_1): Don't delete the last lwp of the process here.
11193 * mem-break.h (mark_breakpoints_out): Declare.
11194 * mem-break.c (mark_breakpoints_out): New.
11195 (free_all_breakpoints): Use it.
11196 * server.c (handle_target_event): If the process is gone, mark
11197 breakpoints out.
11198 * thread-db.c (struct thread_db) <create_bp>: New field.
11199 (thread_db_enable_reporting): Fix prototype. Store a thread event
11200 breakpoint reference in the thread_db struct.
11201 (thread_db_load_search): Clear the thread_db object.
11202 (try_thread_db_load_1): Ditto.
11203 (switch_to_process): New.
11204 (disable_thread_event_reporting): Use it.
11205 (remove_thread_event_breakpoints): New.
11206 (thread_db_detach, thread_db_mourn): Use it.
11207
1e7fc18c
PA
112082010-05-01 Pedro Alves <pedro@codesourcery.com>
11209
11210 * linux-low.c (linux_enable_event_reporting): New.
11211 (linux_wait_for_event_1, handle_extended_wait): Use it.
11212
02fc4de7
PA
112132010-04-30 Pedro Alves <pedro@codesourcery.com>
11214
11215 * linux-low.c (linux_kill_one_lwp, linux_kill)
11216 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11217 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11218 SIGSTOP even if the LWP is stopped.
11219 (send_sigstop_callback): New.
11220 (stop_all_lwps): Use send_sigstop_callback instead.
11221 (linux_resume_one_thread): Adjust.
11222 (proceed_one_lwp): Still proceed an LWP that the client has
11223 requested to stop, if we haven't reported it as stopped yet. Make
11224 sure that LWPs the client want stopped, have a pending SIGSTOP.
11225
bc3b5632
DE
112262010-04-26 Doug Evans <dje@google.com>
11227
ae1ada35
DE
11228 * server.c (handle_general_set): Make static.
11229
bc3b5632
DE
11230 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11231 Print received char after testing for error/eof instead of before.
11232 (input_interrupt): Tweak comment.
11233
65730243
DE
112342010-04-23 Doug Evans <dje@google.com>
11235
11236 * server.c (start_inferior): Print inferior argv if --debug.
11237
a8ae7dc0
AR
112382010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11239
11240 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11241 * nto-x86-low.c: Include server.h
11242
1c07cc19
PM
112432010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11244
11245 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11246 be consistent with other sources of this directory.
11247 (init_registers_amd64): Correct name of source file of this function
11248 in the comment.
11249
e0a61e09
PM
112502010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11251
11252 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11253 64-bit executables.
11254
54709339
PM
112552010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11256
11257 * win32-i386-low.c: Add 64-bit support.
11258 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11259 (init_registers_amd64): Declare.
11260 (mappings): Add 64-bit version of array.
11261 (init_windows_x86): New function.
11262 (the_low_target): Change init_arch field to init_windows_x86.
11263
e8f0053d
PM
112642010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11265
11266 * win32-low.c: Adapt to support also 64-bit architecture.
11267 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11268 (get_image_name): Use SIZE_T type for local variable `done'.
11269 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11270 (toolhelp_get_dll_name): Idem.
11271 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11272 Use uintptr_t typecast to avoid warning.
11273 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11274 (handle_exception): Use phex_nz to avoid warning.
11275 (win32_wait): Remove unused local variable `process'.
11276
c481e77e
PM
112772010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11278
11279 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11280 `amd64-avx.o'.
11281
12ea4b69
PM
112822010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11283
11284 * configure.ac: Use `ws2_32' library for srv_mingw.
11285 * configure: Regenerate.
11286 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11287 * remote-utils.c: Likewise.
11288
f6d1620c
L
112892010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11290
11291 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11292 if __x86_64__ is defined.
11293
8e642873
PM
112942010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11295
11296 * configure: Regenerate.
11297
711e434b
PM
112982010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11299
11300 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11301 * target.h (target_ops): New get_tib_address field.
11302 * win32-low.h (win32_thread_info): Add thread_local_base field.
11303 * win32-low.c (child_add_thread): Add tlb argument.
11304 Set thread_local_base field to TLB.
11305 (get_child_debug_event): Adapt to child_add_thread change.
11306 (win32_get_tib_address): New function.
11307 (win32_target_ops): Set get_tib_address field to
11308 win32_get_tib_address.
11309 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11310
505106cd
PA
113112010-04-12 Pedro Alves <pedro@codesourcery.com>
11312
505106cd
PA
11313 * linux-low.c (linux_mourn): Also remove the process.
11314 * server.c (handle_target_event): Don't remove the process here.
11315 * nto-low.c (nto_mourn): New.
11316 (nto_target_ops): Install it.
11317 * spu-low.c (spu_mourn): New.
11318 (spu_target_ops): Install it.
11319 * win32-low.c (win32_mourn): New.
11320 (win32_target_ops): Install it.
11321
e8470a06
PA
113222010-04-12 Pedro Alves <pedro@codesourcery.com>
11323
11324 * server.h (buffer_xml_printf): Remove redundant `;'.
11325
45ba0d02
PA
113262010-04-12 Pedro Alves <pedro@codesourcery.com>
11327
11328 * regcache.c (set_register_cache): Invalidate regcaches before
11329 changing the register cache layout.
11330 (regcache_invalidate_one): Allow a NULL regcache.
11331 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11332 regcaches before changing the register cache layout or the target
11333 regsets.
11334
59e04013
L
113352010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11336
11337 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11338 variable warning on Linux/x86-64.
11339
8336d594
PA
113402010-04-11 Pedro Alves <pedro@codesourcery.com>
11341
11342 GDBserver disconnected tracing support.
11343
11344 * linux-low.c (linux_remove_process): Delete.
11345 (add_lwp): Don't set last_resume_kind here.
11346 (linux_kill): Use `mourn'.
11347 (linux_detach): Use `thread_db_detach', and `mourn'.
11348 (linux_mourn): New.
11349 (linux_attach_lwp_1): Adjust comment.
11350 (linux_attach): last_resume_kind moved the thread_info; adjust.
11351 (status_pending_p_callback): Adjust.
11352 (linux_wait_for_event_1): Adjust.
11353 (count_events_callback, select_singlestep_lwp_callback)
11354 (select_event_lwp_callback, cancel_breakpoints_callback)
11355 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11356 (proceed_one_lwp): Adjust.
11357 (linux_async): Add debug output.
11358 (linux_thread_stopped): New.
11359 (linux_pause_all): New.
11360 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11361 linux_pause_all.
11362 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11363 (thread_db_free): Delete declaration.
11364 (thread_db_detach, thread_db_mourn): Declare.
11365 * thread-db.c (thread_db_init): Use thread_db_mourn.
11366 (thread_db_free): Delete, split in two.
11367 (disable_thread_event_reporting): New.
11368 (thread_db_detach): New.
11369 (thread_db_mourn): New.
11370
11371 * server.h (struct thread_info) <last_resume_kind>: New field.
11372 <attached>: Add comment.
11373 <gdb_detached>: New field.
11374 (handler_func): Change return type to int.
11375 (handle_serial_event, handle_target_event): Ditto.
11376 (gdb_connected): Declare.
11377 (tracing): Delete.
11378 (disconnected_tracing): Declare.
11379 (stop_tracing): Declare.
11380
11381 * server.c (handle_query) <qSupported>: Report support for
11382 disconnected tracing.
11383 (queue_stop_reply_callback): Account for running threads.
11384 (gdb_wants_thread_stopped): New.
11385 (gdb_wants_all_threads_stopped): New.
11386 (gdb_reattached_process): New.
11387 (handle_status): Clear the `gdb_detached' flag of all processes.
11388 In all-stop, stop all threads.
11389 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11390 (process_serial_event): If the remote connection breaks, or if an
11391 exit was forced with "monitor exit", force an event loop exit.
11392 Handle disconnected tracing on detach.
11393 (handle_serial_event): Adjust.
11394 (handle_target_event): If GDB isn't connected, forward events back
11395 to the inferior, unless the last process exited, in which case,
11396 exit gdbserver. Adjust interface.
11397
11398 * remote-utils.c (remote_open): Don't block in accept. Instead
11399 register an event loop source on the listen socket file
11400 descriptor. Refactor bits into ...
11401 (listen_desc): ... this new global.
11402 (gdb_connected): ... this new function.
11403 (enable_async_notification): ... this new function.
11404 (handle_accept_event): ... this new function.
11405 (remote_close): Clear remote_desc.
11406
11407 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11408
11409 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11410 New fields.
11411 (mourn_inferior): Define.
11412 (target_process_qsupported): Avoid the dangling else problem.
11413 (thread_stopped): Define.
11414 (pause_all): Define.
11415 (target_waitstatus_to_string): Declare.
11416 * target.c (target_waitstatus_to_string): New.
11417
11418 * tracepoint.c (tracing): Make extern.
11419 (disconnected_tracing): New.
11420 (stop_tracing): Make extern. Handle tracing stops due to GDB
11421 disconnecting.
11422 (cmd_qtdisconnected): New.
11423 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11424 (handle_tracepoint_general_set): Handle QTDisconnected.
11425
11426 * event-loop.c (event_handler_func): Change return type to int.
11427 (process_event): Bail out if the event handler wants the event
11428 loop to stop.
11429 (handle_file_event): Ditto.
11430 (start_event_loop): Bail out if the event handler wants the event
11431 loop to stop.
11432
11433 * nto-low.c (nto_target_ops): Adjust.
11434 * spu-low.c (spu_wait): Don't remove the process here.
11435 (spu_target_ops): Adjust.
11436 * win32-low.c (win32_wait): Don't remove the process here.
11437 (win32_target_ops): Adjust.
11438
5d267c4c
PA
114392010-04-11 Pedro Alves <pedro@codesourcery.com>
11440
11441 * regcache.c (realloc_register_cache): Invalidate inferior's
11442 regcache before recreating it.
11443
623ccd72
PA
114442010-04-09 Pedro Alves <pedro@codesourcery.com>
11445
11446 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11447
219f2f23
PA
114482010-04-09 Stan Shebs <stan@codesourcery.com>
11449 Pedro Alves <pedro@codesourcery.com>
11450
11451 * server.h (LONGEST): New.
11452 (struct thread_info) <while_stepping>: New field.
11453 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11454 Declare.
11455 (initialize_tracepoint, handle_tracepoint_general_set)
11456 (handle_tracepoint_query, tracepoint_finished_step)
11457 (tracepoint_was_hit, release_while_stepping_state_list):
11458 (current_traceframe): Declare.
11459 * server.c (handle_general_set): Handle tracepoint packets.
11460 (read_memory): New.
11461 (write_memory): New.
11462 (handle_search_memory_1): Use read_memory.
11463 (handle_query): Report support for conditional tracepoints, trace
11464 state variables, and tracepoint sources. Handle tracepoint
11465 queries.
11466 (main): Initialize the tracepoints module.
11467 (process_serial_event): Handle traceframe reads/writes.
11468
11469 * linux-low.c (handle_tracepoints): New.
11470 (linux_wait_1): Call it.
11471 (linux_resume_one_lwp): Handle while-stepping.
11472 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11473 (linux_target_ops): Install them.
11474 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11475 New field.
11476 * linux-x86-low.c (x86_supports_tracepoints): New.
11477 (the_low_target). Install it.
11478
11479 * mem-break.h (delete_breakpoint): Declare.
11480 * mem-break.c (delete_breakpoint): Make external.
11481
11482 * target.h (struct target_ops): Add `supports_tracepoints',
11483 `read_pc', and `write_pc' fields.
11484 (target_supports_tracepoints): Define.
11485 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11486 (phex_nz): New.
11487
11488 * regcache.h (struct regcache) <registers_owned>: New field.
11489 (init_register_cache, regcache_cpy): Declare.
11490 (regcache_read_pc, regcache_write_pc): Declare.
11491 (register_cache_size): Declare.
11492 (supply_regblock): Declare.
11493 * regcache.c (init_register_cache): New.
11494 (new_register_cache): Use it.
11495 (regcache_cpy): New.
11496 (register_cache_size): New.
11497 (supply_regblock): New.
11498 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 11499
219f2f23
PA
11500 * tracepoint.c: New.
11501
11502 * Makefile.in (OBS): Add tracepoint.o.
11503 (tracepoint.o): New rule.
11504
3a13a53b
L
115052010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11506
11507 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11508 (i386-mmx.o): New.
11509 (i386-mmx.c): Likewise.
11510 (i386-mmx-linux.o): Likewise.
11511 (i386-mmx-linux.c): Likewise.
11512
11513 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11514 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11515 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11516 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11517
11518 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11519 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11520 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11521
1570b33e
L
115222010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11523
11524 * Makefile.in (clean): Updated.
11525 (i386-avx.o): New.
11526 (i386-avx.c): Likewise.
11527 (i386-avx-linux.o): Likewise.
11528 (i386-avx-linux.c): Likewise.
11529 (amd64-avx.o): Likewise.
11530 (amd64-avx.c): Likewise.
11531 (amd64-avx-linux.o): Likewise.
11532 (amd64-avx-linux.c): Likewise.
11533
11534 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11535 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11536 (srv_amd64_regobj): Add amd64-avx.o.
11537 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11538 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11539 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11540 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11541 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11542 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11543 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11544
11545 * i387-fp.c: Include "i386-xstate.h".
11546 (i387_xsave): New.
11547 (i387_cache_to_xsave): Likewise.
11548 (i387_xsave_to_cache): Likewise.
11549 (x86_xcr0): Likewise.
11550
11551 * i387-fp.h (i387_cache_to_xsave): Likewise.
11552 (i387_xsave_to_cache): Likewise.
11553 (x86_xcr0): Likewise.
11554
11555 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11556 * linux-crisv32-low.c (target_regsets): Likewise.
11557 * linux-m68k-low.c (target_regsets): Likewise.
11558 * linux-mips-low.c (target_regsets): Likewise.
11559 * linux-ppc-low.c (target_regsets): Likewise.
11560 * linux-s390-low.c (target_regsets): Likewise.
11561 * linux-sh-low.c (target_regsets): Likewise.
11562 * linux-sparc-low.c (target_regsets): Likewise.
11563 * linux-xtensa-low.c (target_regsets): Likewise.
11564
11565 * linux-low.c: Include <sys/uio.h>.
11566 (regsets_fetch_inferior_registers): Support nt_type.
11567 (regsets_store_inferior_registers): Likewise.
11568 (linux_process_qsupported): New.
11569 (linux_target_ops): Add linux_process_qsupported.
11570
11571 * linux-low.h (regset_info): Add nt_type.
11572 (linux_target_ops): Add process_qsupported.
11573
11574 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11575 and <sys/uio.h>.
11576 (init_registers_i386_avx_linux): New.
11577 (init_registers_amd64_avx_linux): Likewise.
11578 (xmltarget_i386_linux_no_xml): Likewise.
11579 (xmltarget_amd64_linux_no_xml): Likewise.
11580 (PTRACE_GETREGSET): Likewise.
11581 (PTRACE_SETREGSET): Likewise.
11582 (x86_fill_xstateregset): Likewise.
11583 (x86_store_xstateregset): Likewise.
11584 (use_xml): Likewise.
11585 (x86_linux_update_xmltarget): Likewise.
11586 (x86_linux_process_qsupported): Likewise.
11587 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11588 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11589 init_registers_i386_linux here. Call
11590 x86_linux_update_xmltarget.
11591 (the_low_target): Add x86_linux_process_qsupported.
11592
11593 * server.c (handle_query): Call target_process_qsupported.
11594
11595 * target.h (target_ops): Add process_qsupported.
11596 (target_process_qsupported): New.
11597
fc7238bb
PA
115982010-04-03 Pedro Alves <pedro@codesourcery.com>
11599
11600 * inferiors.c (add_thread): Set last_status kind to
11601 TARGET_WAITKIND_IGNORE.
11602 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11603 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11604 (linux_wait_1): Move `thread' local definition to block that uses
11605 it. Don't NULL initialize `event_child'.
11606 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11607 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11608 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11609
bdabb078
PA
116102010-04-01 Pedro Alves <pedro@codesourcery.com>
11611
11612 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11613 an extended waitstatus, or by a watchpoint.
11614 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11615 thread was stepping or has been stopped by a watchpoint.
11616
d3bbe7a0
PA
116172010-04-01 Pedro Alves <pedro@codesourcery.com>
11618
11619 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11620 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11621 of another, then delete the previous, and validate all
11622 breakpoints.
11623 (validate_inserted_breakpoint): New.
11624 (delete_disabled_breakpoints): New.
11625 (validate_breakpoints): New.
11626 (check_mem_read): Validate breakpoints before trusting their
11627 shadow. Delete disabled breakpoints.
11628 (check_mem_write): Validate breakpoints before trusting they
11629 should be inserted. Delete disabled breakpoints.
11630 * mem-break.h (validate_breakpoints):
11631 * server.c (handle_query): Validate breakpoints when we see a
11632 qSymbol query.
11633
8b07ae33
PA
116342010-04-01 Pedro Alves <pedro@codesourcery.com>
11635
11636 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11637 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11638 if we could tell there's a GDB breakpoint at stop_pc.
11639 (need_step_over_p): Don't do a step over if we find a GDB
11640 breakpoint at the resume PC.
11641
11642 * mem-break.c (struct raw_breakpoint): New.
11643 (enum bkpt_type): New type `gdb_breakpoint'.
11644 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11645 fields. New field `raw'.
11646 (find_raw_breakpoint_at): New.
11647 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11648 breakpoint instead.
11649 (set_breakpoint_at): Adjust.
11650 (delete_raw_breakpoint): New.
11651 (release_breakpoint): New.
11652 (delete_breakpoint): Rename to...
11653 (delete_breakpoint_1): ... this. Add proc parameter. Use
11654 release_breakpoint. Return ENOENT.
11655 (delete_breakpoint): Reimplement.
11656 (find_breakpoint_at): Delete.
11657 (find_gdb_breakpoint_at): New.
11658 (delete_breakpoint_at): Delete.
11659 (set_gdb_breakpoint_at): New.
11660 (delete_gdb_breakpoint_at): New.
11661 (gdb_breakpoint_here): New.
11662 (set_reinsert_breakpoint): Use release_breakpoint.
11663 (uninsert_breakpoint): Rename to ...
11664 (uninsert_raw_breakpoint): ... this.
11665 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11666 (reinsert_raw_breakpoint): Change parameter type to
11667 raw_breakpoint.
11668 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11669 instead.
11670 (check_breakpoints): Adjust. Use release_breakpoint.
11671 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11672 (breakpoint_inserted_here): Ditto.
11673 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11674 Don't trust the breakpoint's shadow if it is not inserted.
11675 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11676 (delete_all_breakpoints): Adjust.
11677 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11678 use delete_breakpoint_1.
11679
11680 * mem-break.h (breakpoints_supported): Delete declaration.
11681 (set_gdb_breakpoint_at): Declare.
11682 (gdb_breakpoint_here): Declare.
11683 (delete_breakpoint_at): Delete.
11684 (delete_gdb_breakpoint_at): Declare.
11685
11686 * server.h (struct raw_breakpoint): Forward declare.
11687 (struct process_info): New field `raw_breakpoints'.
11688
11689 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11690 breakpoints.
11691
6bf5e0ba
PA
116922010-03-24 Pedro Alves <pedro@codesourcery.com>
11693
11694 * linux-low.c (status_pending_p_callback): Fix comment.
11695 (linux_wait_for_event_1): Move most of the internal breakpoint
11696 handling from here...
11697 (linux_wait_1): ... to here.
11698 (count_events_callback): New.
11699 (select_singlestep_lwp_callback): New.
11700 (select_event_lwp_callback): New.
11701 (cancel_breakpoints_callback): New.
11702 (select_event_lwp): New.
11703 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11704 priority to all LWPs that have had events that should be reported
11705 to the client. Cancel breakpoints when about to reporting the
11706 event to the client, not while stopping lwps. No longer cancel
11707 finished single-steps here.
11708 (cancel_finished_single_step): Delete.
11709 (cancel_finished_single_steps): Delete.
11710
414a389f
PA
117112010-03-24 Pedro Alves <pedro@codesourcery.com>
11712
11713 * mem-break.c (enum bkpt_type): New.
11714 (struct breakpoint): New field `type'.
11715 (set_breakpoint_at): Change return type to struct breakpoint
11716 pointer. Set type to `other_breakpoint' by default.
11717 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11718 in the breakpoint list.
11719 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11720 (reinsert_breakpoint): Rename to ...
11721 (reinsert_raw_breakpoint): ... this.
11722 (reinsert_breakpoints_at): Adjust.
11723 * mem-break.h (struct breakpoint): Declare.
11724 (set_breakpoint_at): Change return type to struct breakpoint
11725 pointer.
11726
2280c721
PA
117272010-03-24 Pedro Alves <pedro@codesourcery.com>
11728
11729 * server.c (handle_query): Assign, not compare.
11730
d50171e4
PA
117312010-03-24 Pedro Alves <pedro@codesourcery.com>
11732
11733 Teach linux gdbserver to step-over-breakpoints.
11734
11735 * linux-low.c (can_hardware_single_step): New.
11736 (supports_breakpoints): New.
11737 (handle_extended_wait): If stopping threads, read the stop pc of
11738 the new cloned LWP.
11739 (get_pc): New.
11740 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11741 low target doesn't support retrieving the PC.
11742 (add_lwp): Set last_resume_kind to resume_continue.
11743 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11744 (linux_attach): Don't clear stop_expected. Set the lwp's
11745 last_resume_kind to resume_stop.
11746 (linux_detach_one_lwp): Don't check for removed breakpoints.
11747 (check_removed_breakpoint): Delete.
11748 (status_pending_p): Rename to ...
11749 (status_pending_p_callback): ... this. Don't check for removed
11750 breakpoints. Don't consider threads that are stopped from GDB's
11751 perspective.
11752 (linux_wait_for_lwp): Always read the stop_pc here.
11753 (cancel_breakpoint): New.
11754 (step_over_bkpt): New global.
11755 (linux_wait_for_event_1): Implement stepping over breakpoints.
11756 (gdb_wants_lwp_stopped): New.
11757 (gdb_wants_all_stopped): New.
11758 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11759 single-step traps here. Store the thread's last reported target
11760 wait status.
11761 (send_sigstop): Don't clear stop_expected. Always set it,
11762 instead.
11763 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11764 (cancel_finished_single_step): New.
11765 (cancel_finished_single_steps): New.
11766 (wait_for_sigstop): Don't cancel finished single-step traps here.
11767 (linux_resume_one_lwp): Don't check for removed breakpoints.
11768 Don't set `step' on non-hardware step archs.
11769 (linux_set_resume_request): Ignore resume_stop requests if already
11770 stopping or stopped. Set the lwp's last_resume_kind.
11771 (resume_status_pending_p): Don't check for removed breakpoints.
11772 (need_step_over_p): New.
11773 (start_step_over): New.
11774 (finish_step_over): New.
11775 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11776 requests. Clear the thread's last reported target waitstatus.
11777 Don't use the `suspended' flag. Don't consider pending breakpoints.
11778 (linux_resume): Start a step-over if necessary.
11779 (proceed_one_lwp): New.
11780 (proceed_all_lwps): New.
11781 (unstop_all_lwps): New.
11782 * linux-low.h (struct lwp_info): Rewrite comment for the
11783 `suspended' flag. Add the `stop_pc' field. Delete the
11784 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11785 Add `'last_resume_kind' and `need_step_over' fields.
11786 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11787 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11788 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11789 (set_raw_breakpoint_at): New.
11790 (set_breakpoint_at): Rewrite to use it.
11791 (reinsert_breakpoint_handler): Delete.
11792 (set_reinsert_breakpoint): New.
11793 (reinsert_breakpoint_by_bp): Delete.
11794 (delete_reinsert_breakpoints): New.
11795 (uninsert_breakpoint): Rewrite.
11796 (uninsert_breakpoints_at): New.
11797 (reinsert_breakpoint): Rewrite.
11798 (reinsert_breakpoints_at): New.
11799 (check_breakpoints): Rewrite.
11800 (breakpoint_here): New.
11801 (breakpoint_inserted_here): New.
11802 (check_mem_read): Adjust.
11803 * mem-break.h (breakpoints_supported, breakpoint_here)
11804 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11805 (reinsert_breakpoint_by_bp): Delete declaration.
11806 (delete_reinsert_breakpoints): Declare.
11807 (reinsert_breakpoint): Delete declaration.
11808 (reinsert_breakpoints_at): Declare.
11809 (uninsert_breakpoint): Delete declaration.
11810 (uninsert_breakpoints_at): Declare.
11811 (check_breakpoints): Adjust prototype.
11812 * server.h: Adjust include order.
11813 (struct thread_info): Declare here. Add a `last_status' field.
11814
30ba68cb
MS
118152010-03-23 Michael Snyder <msnyder@vmware.com>
11816
11817 * server.c (crc32): New function.
11818 (handle_query): Add handling for 'qCRC:' request.
11819
b9a881c2
PA
118202010-03-23 Pedro Alves <pedro@codesourcery.com>
11821
11822 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11823 lwp had been stopped by a watchpoint.
11824
e92d13d5
PA
118252010-03-16 Pedro Alves <pedro@codesourcery.com>
11826
11827 * server.h (internal_error): Declare.
11828 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11829 * utils.c (internal_error): New function.
11830
64daa791
AS
118312010-03-15 Andreas Schwab <schwab@redhat.com>
11832
11833 * configure.srv: Fix typo setting srv_regobj.
11834
f52cd8cd
PA
118352010-03-15 Pedro Alves <pedro@codesourcery.com>
11836
11837 * linux-low.c (fetch_register): Avoid passing a non string literal
11838 format to `error'.
11839 (usr_store_inferior_registers): Ditto.
11840
93ae6fdc
PA
118412010-03-14 Pedro Alves <pedro@codesourcery.com>
11842
11843 * linux-low.c (linux_write_memory): Bail out early if peeking
11844 memory failed.
11845
c3adc08c
PA
118462010-03-14 Pedro Alves <pedro@codesourcery.com>
11847
11848 * linux-low.h (struct lwp_info): New fields
11849 `stopped_by_watchpoint' and `stopped_data_address'.
11850 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11851 here, and cache them in the lwp object.
11852 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11853 directly.
11854 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11855 field.
11856 (linux_stopped_by_watchpoint): Rewrite.
11857 (linux_stopped_data_address): Rewrite.
11858
bce522a2
PA
118592010-03-06 Simo Melenius <simo.melenius@iki.fi>
11860
11861 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11862 switching the current inferior, not before.
11863
90884b2b
L
118642010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11865
11866 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11867 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11868 i386-linux.c and amd64-linux.c.
11869 (reg-i386.o): Removed.
11870 (reg-i386.c): Likewise.
11871 (reg-i386-linux.o): Likewise.
11872 (reg-i386-linux.c): Likewise.
11873 (reg-x86-64.o): Likewise.
11874 (reg-x86-64.c): Likewise.
11875 (reg-x86-64-linux.o): Likewise.
11876 (reg-x86-64-linux.c): Likewise.
11877 (i386.o): New.
11878 (i386.c): Likewise.
11879 (i386-linux.o): Likewise.
11880 (i386-linux.c): Likewise.
11881 (amd64.o): Likewise.
11882 (amd64.c): Likewise.
11883 (amd64-linux.o): Likewise.
11884 (amd64-linux.c): Likewise.
11885
11886 * configure.srv (srv_i386_regobj): New.
11887 (srv_i386_linux_regobj): Likewise.
11888 (srv_amd64_regobj): Likewise.
11889 (srv_amd64_linux_regobj): Likewise.
11890 (srv_i386_32bit_xmlfiles): Likewise.
11891 (srv_i386_64bit_xmlfiles): Likewise.
11892 (srv_i386_xmlfiles): Likewise.
11893 (srv_amd64_xmlfiles): Likewise.
11894 (srv_i386_linux_xmlfiles): Likewise.
11895 (srv_amd64_linux_xmlfiles): Likewise.
11896 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11897 srv_xmlfiles to $srv_i386_xmlfiles.
11898 (i[34567]86-*-mingw32ce*): Likewise.
11899 (i[34567]86-*-mingw*): Likewise.
11900 (i[34567]86-*-nto*): Likewise.
11901 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11902 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11903 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11904 (x86_64-*-linux*): Likewise.
11905
11906 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11907 (init_registers_amd64_linux): New.
11908 (x86_arch_setup): Replace init_registers_x86_64_linux with
11909 init_registers_amd64_linux.
11910
193f13e6
MK
119112010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11912
11913 * configure.ac: Check for libdl. If it is not available link against
11914 static libthread_db.
11915 * configure: Regenerate.
11916
85d721b8
PA
119172010-02-22 Pedro Alves <pedro@codesourcery.com>
11918
11919 PR9605
11920
11921 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11922 handing a read watchpoint.
11923 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11924
6076632b
DE
119252010-02-12 Doug Evans <dje@google.com>
11926
11927 * linux-low.c (linux_supports_tracefork_flag): Document.
11928 (linux_look_up_symbols): Add comment.
11929
3327ccf7
L
119302010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11931
11932 * regcache.c (supply_register): Clear regcache if buf is NULL.
11933
0718675c 119342010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 11935 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
11936
11937 * inferiors.c (find_inferior): Add function documentation.
11938 (unloaded_dll): Handle the case where the unloaded dll has not
11939 been previously registered in the dll list.
11940
177321bd
DJ
119412010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11942
11943 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11944 (thumb2_breakpoint): New.
11945 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11946
2b009048
DJ
119472010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11948
11949 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11950 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11951 breakpoints.
11952
3be029c7
PA
119532010-01-21 Pedro Alves <pedro@codesourcery.com>
11954
11955 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11956
18f5de3b
JK
119572010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11958
11959 * linux-s390-low.c (s390_collect_ptrace_register)
11960 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11961
3743bb4f
DE
119622010-01-21 Doug Evans <dje@google.com>
11963
14ce3065
DE
11964 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11965 (PTRACE_ARG4_TYPE): New macro.
11966 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11967 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11968 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11969 (usr_store_inferior_registers): Ditto.
11970 (linux_read_memory, linux_write_memory): Ditto.
11971 (linux_test_for_tracefork): Ditto.
11972
3743bb4f
DE
11973 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11974 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11975
8b315be5
PA
119762010-01-21 Pedro Alves <pedro@codesourcery.com>
11977
11978 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11979 target.
11980
85492558
PA
119812010-01-21 Pedro Alves <pedro@codesourcery.com>
11982
11983 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11984 prototype to take a regcache. Adjust.
11985
442ea881
PA
119862010-01-20 Pedro Alves <pedro@codesourcery.com>
11987
11988 * regcache.h (struct thread_info): Forward declare.
11989 (struct regcache): New.
11990 (new_register_cache): Adjust prototype.
11991 (get_thread_regcache): Declare.
11992 (free_register_cache): Adjust prototype.
11993 (registers_to_string, registers_from_string): Ditto.
11994 (supply_register, supply_register_by_name, collect_register)
11995 (collect_register_as_string, collect_register_by_name): Ditto.
11996 * regcache.c (struct inferior_regcache_data): Delete.
11997 (get_regcache): Rename to ...
11998 (get_thread_regcache): ... this. Adjust. Switch inferior before
11999 fetching registers.
12000 (regcache_invalidate_one): Adjust.
12001 (regcache_invalidate): Fix prototype.
12002 (new_register_cache): Return the new register cache.
12003 (free_register_cache): Change prototype.
12004 (realloc_register_cache): Adjust.
12005 (registers_to_string): Change prototype to take a regcache. Adjust.
12006 (registers_from_string): Ditto.
12007 (register_data): Ditto.
12008 (supply_register): Ditto.
12009 (supply_register_by_name): Ditto.
12010 (collect_register): Ditto.
12011 (collect_register_as_string): Ditto.
12012 (collect_register_by_name): Ditto.
12013 * server.c (process_serial_event): Adjust.
12014 * linux-low.h (regset_fill_func, regset_store_func): Change
12015 prototype.
12016 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12017 Change prototype.
12018 * linux-low.c (get_stop_pc): Adjust.
12019 (check_removed_breakpoint): Adjust.
12020 (linux_wait_for_event): Adjust.
12021 (linux_resume_one_lwp): Adjust.
12022 (fetch_register): Add regcache parameter. Adjust.
12023 (usr_store_inferior_registers): Ditto.
12024 (regsets_fetch_inferior_registers): Ditto.
12025 (regsets_store_inferior_registers): Ditto.
12026 (linux_fetch_registers, linux_store_registers): Ditto.
12027 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12028 regcache. Adjust.
43aaf8b6
PA
12029 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12030 Ditto.
442ea881
PA
12031 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12032 prototype to take a regcache.
12033 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12034 * remote-utils.c (convert_ascii_to_int, outreg)
12035 (prepare_resume_reply): Change prototype to take a regcache.
12036 Adjust.
12037 * target.h (struct target_ops) <fetch_registers, store_registers>:
12038 Change prototype to take a regcache.
12039 (fetch_inferior_registers, store_inferior_registers): Change
12040 prototype to take a regcache. Adjust.
12041 * proc-service.c (ps_lgetregs): Adjust.
12042 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12043 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12044 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12045 take a regcache. Adjust.
12046 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12047 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12048 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12049 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12050 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12051 (cris_cannot_fetch_register):
12052 (cris_breakpoint_at): Change prototype to take a regcache.
12053 Adjust.
12054 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12055 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12056 to take a regcache. Adjust.
12057 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12058 Adjust.
12059 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12060 take a regcache. Adjust.
12061 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12062 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12063 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12064 * linux-mips-low.c (mips_get_pc):
12065 (mips_set_pc): Change prototype to take a regcache. Adjust.
12066 (mips_reinsert_addr): Adjust.
12067 (mips_collect_register): Change prototype to take a regcache.
12068 Adjust.
12069 (mips_supply_register):
12070 (mips_collect_register_32bit, mips_supply_register_32bit)
12071 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12072 (mips_store_fpregset): Ditto.
43aaf8b6
PA
12073 * linux-ppc-low.c (ppc_supply_ptrace_register)
12074 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
12075 (parse_spufs_run): Adjust.
12076 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12077 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12078 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12079 take a regcache. Adjust.
12080 * linux-s390-low.c (s390_collect_ptrace_register)
12081 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12082 (s390_set_pc): Change prototype to take a regcache. Adjust.
12083 (s390_arch_setup): Adjust.
12084 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12085 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12086 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12087 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12088 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12089 regcache. Adjust.
12090 (sparc_breakpoint_at): Adjust.
12091 * linux-xtensa-low.c (xtensa_fill_gregset):
12092 (xtensa_store_gregset):
12093 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12094 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12095 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12096 prototype to take a regcache. Adjust.
12097 * win32-arm-low.c (arm_fetch_inferior_register)
12098 (arm_store_inferior_register): Change prototype to take a
12099 regcache. Adjust.
12100 * win32-i386-low.c (i386_fetch_inferior_register)
12101 (i386_store_inferior_register): Change prototype to take a
12102 regcache. Adjust.
12103 * win32-low.c (child_fetch_inferior_registers)
12104 (child_store_inferior_registers): Change prototype to take a
12105 regcache. Adjust.
12106 (win32_wait): Adjust.
12107 (win32_fetch_inferior_registers): Change prototype to take a
12108 regcache. Adjust.
12109 (win32_store_inferior_registers): Adjust.
12110 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12111 store_inferior_register>: Change prototype to take a regcache.
12112
60c3d7b0
DE
121132010-01-20 Doug Evans <dje@google.com>
12114
12115 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12116 #ifdef.
12117 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 12118 (W_STOPCODE): Provide definition if missing.
60c3d7b0 12119
dc146f7c
VP
121202010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12121
12122 * linux-low.c (linux_core_of_thread): New.
12123 (compare_ints, show_process, list_threads): New.
12124 (linux_qxfer_osdata): Report threads and cores.
12125 (linux_target_op): Register linux_core_of_thread.
12126 * remote-utils.c (prepare_resume_reply): Report the core.
12127 (buffer_xml_printf): Support %d specifier.
12128 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12129 New.
12130 (handle_query): Handle qXfer:threads. Announce availability
12131 thereof.
12132 * target.h (struct target_ops): New field core_of_thread.
12133
7803799a
UW
121342010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12135
12136 * Makefile.in (clean): Remove new generated files.
12137 (reg-s390.o, reg-s390.c): Remove rules.
12138 (reg-s390x.o, reg-s390x.c): Likewise.
12139 (s390-linux32.o, s390-linux32.c): Add rules.
12140 (s390-linux64.o, s390-linux64.c): Likewise.
12141 (s390x-linux64.o, s390x-linux64.c): Likewise.
12142 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12143 * linux-s390-low.c: Include <elf.h>.
12144 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12145 (init_registers_s390): Remove prototype.
12146 (init_registers_s390x): Likewise.
12147 (init_registers_s390_linux32): Add prototype.
12148 (init_registers_s390_linux64): Likewise.
12149 (init_registers_s390x_linux64): Likewise.
12150 (s390_num_regs_3264): New define.
12151 (s390_regmap_3264): New global variable.
12152 (s390_cannot_fetch_register): Remove obsolete check.
12153 (s390_cannot_store_register): Likewise.
12154 (s390_collect_ptrace_register): Handle upper/lower register halves.
12155 (s390_supply_ptrace_register): Likewise.
12156 (s390_fill_gregset): Update to register number changes.
12157 (s390_get_hwcap): New routine.
12158 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12159 Install appropriate regmap and register set.
12160
6e7ffa39
JB
121612010-01-01 Joel Brobecker <brobecker@adacore.com>
12162
12163 * server.c (gdbserver_version): Update copyright year to 2010.
12164 * gdbreplay.c (gdbreplay_version): Likewise.
12165
957f3f49
DE
121662009-12-28 Doug Evans <dje@google.com>
12167
12168 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12169 elf/external.h. Include <elf.h> instead but only if necessary.
12170
ca5c370d
PA
121712009-12-28 Pedro Alves <pedro@codesourcery.com>
12172
12173 * linux-low.c (linux_remove_process): Remove `detaching'
12174 parameter. Don't release/detach from thread_db here.
12175 (linux_kill): Release/detach from thread_db here, ...
12176 (linux_detach): ... and here, before actually detaching.
12177 (linux_wait_1): ... and here, when a process exits.
12178 * thread-db.c (any_thread_of): New.
12179 (thread_db_free): Switch the current inferior to a thread of the
12180 passed in process.
12181
4ee62156
DE
121822009-12-21 Doug Evans <dje@google.com>
12183
d90e6a88
DE
12184 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12185
c5f62d5f
DE
12186 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12187 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12188 warning ifndef __NR_tkill. Move setting of errno there too.
12189 Delete unnecessary resetting of errno after syscall.
12190 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12191
10e86dd7
DE
12192 * configure.ac: Check for dladdr.
12193 * config.in: Regenerate.
12194 * configure: Regenerate.
12195 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12196 (try_thread_db_load): Update.
12197
4ee62156
DE
12198 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12199
00f515da
DE
122002009-12-18 Doug Evans <dje@google.com>
12201
e9464885
DE
12202 * event-loop.c: Include unistd.h if it exists.
12203
07d4f67e
DE
12204 * linux-low.c (my_waitpid): Move definition away from being in
12205 between linux_tracefork_child/linux_test_for_tracefork.
12206
00f515da
DE
12207 * gdb_proc_service.h (psaddr_t): Fix type.
12208 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12209 signature to match glibc.
12210
1de1badb
DE
122112009-12-16 Doug Evans <dje@google.com>
12212
12213 * linux-low.c (linux_read_memory): Fix argument to read.
12214
aeeb81d1
PA
122152009-11-26 Pedro Alves <pedro@codesourcery.com>
12216
12217 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12218 events, don't leave current_inferior pointing at null.
12219
10357975
PA
122202009-11-26 Pedro Alves <pedro@codesourcery.com>
12221
12222 * win32-low.c (LOG): Delete.
12223 (OUTMSG): Output to stderr.
12224 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12225 on compile time LOG macro.
12226 (win32_wait): Fix debug output.
12227
cf6e3471
PA
122282009-11-26 Pedro Alves <pedro@codesourcery.com>
12229
12230 * win32-low.c (win32_add_one_solib): If the dll name is
12231 "ntdll.dll", prepend the system directory to the dll path.
12232
0c85e18e
MK
122332009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12234
12235 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12236
9ac544ce 122372009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 12238 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
12239
12240 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12241 * configure.ac: Check for __mcoldfire__ and set
12242 gdb_cv_m68k_is_coldfire.
12243 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12244 reg-cf.o and reg-m68k.o.
12245 * configure: Regenerated.
12246
fd7dd3e6
PA
122472009-11-16 Pedro Alves <pedro@codesourcery.com>
12248
12249 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12250 Pass it to thread_db_free.
12251 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12252 proper `detaching' argument to linux_remove_process.
12253 * linux-low.h (thread_db_free): Add `detaching' parameter.
12254 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12255 to thread_db_free.
12256 (thread_db_free): Add `detaching' parameter. Only
12257 call td_ta_clear_event if detaching from process.
12258
75aa492e
MK
122592009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12260
12261 * thread-db.c (thread_db_free): Fix typo.
12262
21e1bee4
PP
122632009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12264
12265 PR gdb/10838
12266 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12267
8838b45e
NS
122682009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12269
12270 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12271 with an i686 compiler.
12272 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12273 needed.
12274 * configure: Rebuilt.
12275
8a35fb51
SL
122762009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12277
12278 PR gdb/10783
12279
12280 * server.c (handle_search_memory_1): Correct read_addr initialization
12281 in loop for searching subsequent chunks.
12282
96f15937
PP
122832009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12284
12285 * configure.ac: New --with-libthread-db option.
12286 * thread-db.c: Allow direct dependence on libthread_db.
12287 (thread_db_free): Adjust.
12288 * config.in: Regenerate.
12289 * configure: Likewise.
889bf7c5 12290
5f7d1694
PP
122912009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12292
12293 PR gdb/10757
12294 * thread-db.c (attach_thread): New function.
12295 (maybe_attach_thread): Return success/failure.
12296 (find_new_threads_callback): Adjust.
889bf7c5
PA
12297 (thread_db_find_new_threads): Loop until no new threads.
12298
88e3b899
PA
122992009-10-13 Pedro Alves <pedro@codesourcery.com>
12300
12301 * proc-service.c (ps_lgetregs): Formatting.
12302
cdbfd419
PP
123032009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12304
12305 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12306 * configure.ac: Adjust.
12307 * linux-low.h (struct process_info_private): Move members to struct
12308 thread_db.
12309 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12310 * linux-low.c (linux_remove_process): Adjust.
12311 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12312 * server.c (handle_query): Move code ...
12313 (handle_monitor_command): ... here. New function.
12314 * target.h (struct target_ops): New member.
12315 * thread-db.c (struct thread_db): New.
12316 (libthread_db_search_path): New variable.
12317 (thread_db_create_event, thread_db_enable_reporting)
12318 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12319 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12320 (try_thread_db_load_1, dladdr_to_soname): New functions.
12321 (try_thread_db_load, thread_db_load_search): New functions.
12322 (thread_db_init): Search for libthread_db.
12323 (thread_db_free): New function.
12324 (thread_db_handle_monitor_command): Likewise.
12325 * config.in: Regenerate.
12326 * configure: Regenerate.
889bf7c5 12327
4168d2d6
UW
123282009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12329
12330 * spu-low.c (spu_kill): Wait for inferior to terminate.
12331 Call clear_inferiors.
12332 (spu_detach): Call clear_inferiors.
12333
81ecdfbb
RW
123342009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12335
12336 * aclocal.m4: Regenerate.
12337 * config.in: Likewise.
12338 * configure: Likewise.
12339
0b9ff2c0
UW
123402009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12341
12342 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12343 (parse_spufs_run): New function.
12344 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12345 (ppc_breakpoint_at): Handle SPU breakpoints.
12346
efcbbd14
UW
123472009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12348
12349 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12350 (SPUFS_MAGIC): Define.
12351 (spu_enumerate_spu_ids): New function.
12352 (linux_qxfer_spu): New function.
12353 (linux_target_ops): Install linux_qxfer_spu.
12354
f4d9bade
UW
123552009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12356
12357 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12358 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12359 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12360 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12361 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12362 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12363 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12364 (init_registers_powerpc_cell32l): Add prototype.
12365 (init_registers_powerpc_cell64l): Likewise.
12366 (ppc_arch_setup): Detect Cell/B.E. architecture.
12367
96e946ca
RW
123682009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12369
12370 * Makefile.in (datarootdir): New variable.
12371
58d6951d
DJ
123722009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12373
12374 * linux-low.c (linux_write_memory): Update debugging output.
12375 * Makefile.in (clean): Add new descriptions.
12376 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12377 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12378 * configure.srv: Add new files for arm*-*-linux*.
12379 * linux-arm-low.c: Add new declarations.
12380 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12381 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12382 (HWCAP_VFPv3D16): New.
12383 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12384 instead of __IWMMXT__.
12385 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12386 (arm_arch_setup): New.
12387 (target_regsets): Remove #ifdef. Add VFP regset.
12388 (the_low_target): Use arm_arch_setup.
12389
12b42a12
DJ
123902009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12391
12392 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12393 the main thread again.
12394
ac8c974e
AR
123952009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12396
12397 Adding Neutrino gdbserver.
12398 * configure: Regenerated.
12399 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12400 * configure.srv (i[34567]86-*-nto*): New target.
12401 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12402 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12403 (nto_comctrl) [__QNX__]: New function.
12404 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12405
4424e0c3 124062009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
12407
12408 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12409 srv_tgtobj.
12410
912cf4ba
PA
124112009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12412 Pedro Alves <pedro@codesourcery.com>
12413
12414 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12415 don't support CONTEXT_EXTENDED_REGISTERS.
12416 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12417 (the_low_target): Install them.
12418 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12419 failing with ERROR_PIPE_NOT_CONNECTED.
12420
aa5ca48f
DE
124212009-06-30 Doug Evans <dje@google.com>
12422 Pierre Muller <muller@ics.u-strasbg.fr>
12423
12424 Add h/w watchpoint support to x86-linux, win32-i386.
12425 * Makefile.in (SFILES): Add i386-low.c
12426 (i386_low_h): Define.
12427 (i386-low.o): Add dependencies.
12428 (linux-x86-low.o): Add i386-low.h dependency.
12429 (win32-i386-low.o): Ditto.
12430 * i386-low.c: New file.
12431 * i386-low.h: New file.
12432 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12433 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12434 * linux-low.c (linux_add_process): Initialize arch_private.
12435 (linux_remove_process): Free arch_private.
12436 (add_lwp): Initialize arch_private.
12437 (delete_lwp): Free arch_private.
12438 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12439 provided.
12440 * linux-low.h (process_info_private): New member arch_private.
12441 (lwp_info): New member arch_private.
12442 (linux_target_ops): New members new_process, new_thread,
12443 prepare_to_resume.
12444 (ptid_of): New macro.
12445 * linux-x86-low.c: Include stddef.h, i386-low.h.
12446 (arch_process_info): New struct.
12447 (arch_lwp_info): New struct.
12448 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12449 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12450 (i386_dr_low_get_status): New function.
12451 (x86_insert_point, x86_remove_point): New functions.
12452 (x86_stopped_by_watchpoint): New function.
12453 (x86_stopped_data_address): New function.
12454 (x86_linux_new_process, x86_linux_new_thread): New functions.
12455 (x86_linux_prepare_to_resume): New function.
12456 (the_low_target): Add entries for insert_point, remove_point,
12457 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12458 prepare_to_resume.
12459 * server.c (debug_hw_points): New global.
12460 (monitor_show_help): Document set debug-hw-points.
12461 (handle_query): Process "set debug-hw-points".
12462 * server.h (debug_hw_points): Declare.
12463 (paddress): Declare.
12464 * utils.c (NUMCELLS, CELLSIZE): New macros.
12465 (get_sell, xsnprintf, paddress): New functions.
12466 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12467 remove_point, stopped_by_watchpoint, stopped_data_address.
12468 * win32-i386-low.c: Include i386-low.h.
12469 (debug_reg_state): Replaces dr.
12470 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12471 (i386_dr_low_get_status): New function.
12472 (i386_insert_point, i386_remove_point): New functions.
12473 (i386_stopped_by_watchpoint): New function.
12474 (i386_stopped_data_address): New function.
12475 (i386_initial_stuff): Update.
12476 (get_thread_context,set_thread_context,i386_thread_added): Update.
12477 (the_low_target): Add entries for insert_point,
12478 remove_point, stopped_by_watchpoint, stopped_data_address.
12479 * win32-low.c (win32_insert_watchpoint): New function.
12480 (win32_remove_watchpoint): New function.
12481 (win32_stopped_by_watchpoint): New function.
12482 (win32_stopped_data_address): New function.
12483 (win32_target_ops): Add entries for insert_watchpoint,
12484 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12485 * win32-low.h (win32_target_ops): New members insert_point,
12486 remove_point, stopped_by_watchpoint, stopped_data_address.
12487
d993e290
PA
124882009-06-25 Pedro Alves <pedro@codesourcery.com>
12489
12490 * server.c (process_serial_event): Re-return unsupported, not
12491 error, if the type isn't recognized. Re-allow supporting only
12492 insert or remove packets. Also call require_running for
12493 breakpoints. Add missing break statement to default case. Tidy.
12494 * target.h (struct target_ops): Rename insert_watchpoint to
12495 insert_point, and remove_watchpoint to remove_point.
12496
12497 * linux-low.h (struct linux_target_ops): Likewise.
12498 * linux-low.c (linux_insert_watchpoint): Rename to ...
12499 (linux_insert_point): ... this. Adjust.
12500 (linux_remove_watchpoint): Rename to ...
12501 (linux_remove_point): ... this. Adjust.
12502 (linux_target_ops): Adjust.
12503 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12504 (cris_insert_point): ... this.
12505 (cris_remove_watchpoint): Rename to ...
12506 (cris_remove_point): ... this.
12507 (the_low_target): Adjust.
12508
0f54c268
PM
125092009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12510
12511 * server.c (handle_v_kill): Pass signal_pid to
12512 kill_inferior if multi_process is zero.
12513
c6314022
AR
125142009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12515
12516 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12517 * target.h (target_ops): Comment for *_watchpoint to make it clear
12518 the functions can get types '0' and '1'.
12519
4463ce24
AR
125202009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12521
12522 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12523 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12524 * regcache.c (get_regcache): Likewise.
12525 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12526 * win32-low.c (child_fetch_inferior_registers): Remove check for
12527 regno 0.
12528
cf8fd78b
PA
125292009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12530 Pedro Alves <pedro@codesourcery.com>
12531
12532 * target.h (struct target_ops) <supports_multi_process>: New
12533 callback.
12534 (target_supports_multi_process): New.
12535 * server.c (handle_query): Even if GDB reports support, only
12536 enable multi-process if the target also supports it. Report
12537 multi-process support only if the target backend supports it.
12538 * linux-low.c (linux_supports_multi_process): New function.
12539 (linux_target_ops): Install it as target_supports_multi_process
12540 callback.
12541
47c0c975
DE
125422009-05-24 Doug Evans <dje@google.com>
12543
e09875d4
DE
12544 Global renaming of find_thread_pid to find_thread_ptid.
12545 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12546 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12547 All callers updated.
12548
e27d73f6
DE
12549 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12550 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12551 directly.
12552
47c0c975
DE
12553 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12554 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12555 (linux_resume_one_lwp): Ditto.
12556
2acc282a
DE
125572009-05-23 Doug Evans <dje@google.com>
12558
12559 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12560 from struct inferior_list_entry * to struct lwp_info *.
12561 All callers updated.
12562
9f1036c1
DE
125632009-05-13 Doug Evans <dje@google.com>
12564
12565 * linux-x86-low.c: Don't include assert.h.
12566 (x86_siginfo_fixup): Use fatal, not assert.
12567 (x86_arch_setup): Fix comment.
12568
d0722149
DE
125692009-05-12 Doug Evans <dje@google.com>
12570
12571 Biarch support for i386/amd64 gdbserver.
12572 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12573 Add linux-x86-low.c.
12574 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12575 (linux-x86-low.o): Add.
12576 * linux-x86-64-low.c: Delete.
12577 * linux-i386-low.c: Delete.
12578 * linux-x86-low.c: New file.
12579 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12580 linux-x86-low.o.
12581 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12582 linux-x86-low.o.
12583 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12584 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12585 (linux_child_pid_to_exec_file): New function.
12586 (elf_64_header_p, elf_64_file_p): New functions.
12587 (siginfo_fixup): New function.
12588 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12589 give target a chance to convert layout.
12590 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12591 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12592
fdeb2a12
DE
125932009-05-07 Doug Evans <dje@google.com>
12594
12595 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12596 (regsets_store_inferior_registers): Ditto.
12597
a6dbe5df
PA
125982009-05-06 Pedro Alves <pedro@codesourcery.com>
12599
12600 PR server/10048
12601
12602 * linux-low.c (must_set_ptrace_flags): Delete.
12603 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12604 of the global.
12605 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12606 `lwp->must_set_ptrace_flags' instead.
ba42693b 12607 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
12608 (linux_wait_1): ... not here.
12609
5091eb23
DE
126102009-04-30 Doug Evans <dje@google.com>
12611
9f767825
DE
12612 * inferiors.c (started_inferior_callback): New function.
12613 (attached_inferior_callback): New function.
12614 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12615 * server.c (print_started_pid, print_attached_pid): New functions.
12616 (detach_or_kill_for_exit): New function.
12617 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12618 * server.h (have_started_inferiors_p): Declare.
12619 (have_attached_inferiors_p): Declare.
12620
5091eb23
DE
12621 * inferiors.c (remove_process): Fix memory leak, free process.
12622 * linux-low.c (linux_remove_process): New function.
12623 (linux_kill): Call it instead of remove_process.
12624 (linux_detach, linux_wait_1): Ditto.
12625
155c8968
PA
126262009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12627
12628 * configure.srv: Add x86 Windows CE target.
12629
7fe519cb
UW
126302009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12631
12632 * inferiors.c (get_thread_process): Make global.
12633 * server.h (get_thread_process): Add prototype.
12634 * thread-db.c (find_one_thread): Use get_thread_process
12635 instead of current_process.
12636 (thread_db_get_tls_address): Do not crash if called when
12637 thread layer is not yet initialized.
12638
5472f405
UW
126392009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12640
12641 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12642 * spu-low.c (current_tid): Rename to ...
12643 (current_ptid): ... this.
12644 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12645 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12646 ptid_get_lwp (current_ptid) instead of current_tid.
12647 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12648 instead of current_tid. Use find_process_pid to verify pid
12649 argument is valid. Pass proper argument to remove_process.
12650 (spu_thread_alive): Compare current_ptid instead of current_tid.
12651 (spu_resume): Likewise.
12652
55ac2b99
PA
126532009-04-02 Pedro Alves <pedro@codesourcery.com>
12654
12655 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12656 variable.
12657
95954743
PA
126582009-04-01 Pedro Alves <pedro@codesourcery.com>
12659
12660 Implement the multiprocess extensions, and add linux multiprocess
12661 support.
12662
12663 * server.h (ULONGEST): Declare.
12664 (struct ptid, ptid_t): New.
12665 (minus_one_ptid, null_ptid): Declare.
12666 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12667 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12668 (struct inferior_list_entry): Change `id' type from unsigned from
12669 to ptid_t.
12670 (struct sym_cache, struct breakpoint, struct
12671 process_info_private): Forward declare.
12672 (struct process_info): Declare.
12673 (current_process): Declare.
12674 (all_processes): Declare.
12675 (initialize_inferiors): Declare.
12676 (add_thread): Adjust to use ptid_t.
12677 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12678 (add_process, remove_process, find_thread_pid): Declare.
12679 (find_inferior_id): Adjust to use ptid_t.
12680 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12681 (multi_process): Declare.
12682 (push_event): Adjust to use ptid_t.
12683 (read_ptid, write_ptid): Declare.
12684 (prepare_resume_reply): Adjust to use ptid_t.
12685 (clear_symbol_cache): Declare.
12686 * inferiors.c (all_processes): New.
12687 (null_ptid, minus_one_ptid): New.
12688 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12689 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12690 (add_thread): Change unsigned long to ptid. Remove gdb_id
12691 parameter. Adjust.
12692 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12693 (gdb_id_to_thread): Rename to ...
12694 (find_thread_pid): ... this. Change unsigned long to ptid.
12695 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12696 (loaded_dll, pull_pid_from_list): Adjust.
12697 (add_process, remove_process, find_process_pid)
12698 (get_thread_process, current_process, initialize_inferiors): New.
12699 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12700 (struct target_waitstatus) <related_pid>: Ditto.
12701 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12702 return type to int.
12703 (struct target_ops) <join>: Add `pid' argument.
12704 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12705 (struct target_ops) <wait>: Add `ptid' field. Change return type
12706 to ptid.
12707 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12708 (mywait): Add `ptid' argument. Change return type to ptid_t.
12709 (target_pid_to_str): Declare.
12710 * target.c (set_desired_inferior): Adjust to use ptids.
12711 (mywait): Add new `ptid' argument. Adjust.
12712 (target_pid_to_str): New.
12713 * mem-break.h (free_all_breakpoints): Declare.
12714 * mem-break.c (breakpoints): Delelete.
12715 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12716 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12717 to use per-process breakpoint list.
12718 (free_all_breakpoints): New.
12719 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12720 (symbol_cache, all_symbols_looked_up): Delete.
12721 (hexchars): New.
12722 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12723 read_ptid): New.
12724 (prepare_resume_reply): Change ptid argument's type from unsigned
12725 long to ptid_t. Adjust. Implement W;process and X;process.
12726 (free_sym_cache, clear_symbol_cache): New.
12727 (look_up_one_symbol): Adjust to per-process symbol cache. *
12728 * server.c (cont_thread, general_thread, step_thread): Change type
12729 to ptid_t.
12730 (attached): Delete.
12731 (multi_process): New.
12732 (last_ptid): Change type to ptid_t.
12733 (struct vstop_notif) <ptid>: Change type to ptid_t.
12734 (queue_stop_reply, push_event): Change `ptid' argument's type to
12735 ptid_t.
12736 (discard_queued_stop_replies): Add `pid' argument.
12737 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12738 changes. Don't reference the `attached' global.
12739 (attach_inferior): Adjust to mywait interface changes.
12740 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12741 features. Handle and report "multiprocess+". Handle
12742 "qAttached:PID".
12743 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12744 changes.
12745 (handle_v_kill): New.
12746 (handle_v_stopped): Adjust to use target_pid_to_str.
12747 (handle_v_requests): Allow multiple attaches and runs when
12748 multiprocess extensions are in effect. Handle "vKill".
12749 (myresume): Adjust to use ptids.
12750 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12751 (handle_status): Adjust to discard_queued_stop_replies interface
12752 change.
12753 (first_thread_of, kill_inferior_callback)
12754 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12755 (main): Call initialize_inferiors. Adjust to use ptids, killing
12756 and detaching from all inferiors. Handle multiprocess packet
12757 variants.
12758 * linux-low.h: Include gdb_proc_service.h.
12759 (struct process_info_private): New.
12760 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12761 <lwpid_of>: Use ptid_get_lwp.
12762 (get_lwp_thread): Adjust.
12763 (struct lwp_info): Add `dead' member.
12764 (find_lwp_pid): Declare.
12765 * linux-low.c (thread_db_active): Delete.
12766 (new_inferior): Adjust comment.
12767 (inferior_pid): Delete.
12768 (linux_add_process): New.
12769 (handle_extended_wait): Adjust.
12770 (add_lwp): Change unsigned long to ptid.
12771 (linux_create_inferior): Add process to processes table. Adjust
12772 to use ptids. Don't set new_inferior here.
12773 (linux_attach_lwp): Rename to ...
12774 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12775 it. Adjust to use ptids.
12776 (linux_attach_lwp): New.
12777 (linux_attach): Add process to processes table. Don't set
12778 new_inferior here.
12779 (struct counter): New.
12780 (second_thread_of_pid_p, last_thread_of_process_p): New.
12781 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12782 multiple processes.
12783 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12784 processes. Remove process from process table.
12785 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12786 to multiple processes.
12787 (any_thread_of): New.
12788 (linux_detach): Add `pid' argument, and handle it. Remove process
12789 from processes table.
12790 (linux_join): Add `pid' argument. Handle it.
12791 (linux_thread_alive): Change unsighed long argument to ptid_t.
12792 Consider dead lwps as not being alive.
12793 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12794 threads we're not interested in.
12795 (same_lwp, find_lwp_pid): New.
12796 (linux_wait_for_lwp): Change `pid' argument's type from int to
12797 ptid_t. Adjust.
12798 (linux_wait_for_event): Rename to ...
12799 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12800 from int to ptid_t. Adjust.
12801 (linux_wait_for_event): New.
12802 (linux_wait_1): Add `ptid' argument. Change return type to
12803 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12804 that exit from the process table.
12805 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12806 Adjust.
12807 (mark_lwp_dead): New.
12808 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12809 stopping all threads, mark its main lwp as dead.
12810 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12811 ptids.
12812 (fetch_register, usr_store_inferior_registers)
12813 (regsets_fetch_inferior_registers)
12814 (regsets_store_inferior_registers, linux_read_memory)
12815 (linux_write_memory): Inline `inferior_pid'.
12816 (linux_look_up_symbols): Adjust to use per-process
12817 `thread_db_active'.
12818 (linux_request_interrupt): Adjust to use ptids.
12819 (linux_read_auxv): Inline `inferior_pid'.
12820 (initialize_low): Don't reference thread_db_active.
12821 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12822 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12823 (ps_getpid): Return the pid of the current inferior.
12824 * thread-db.c (proc_handle, thread_agent): Delete.
12825 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12826 per-process data.
12827 (find_one_thread): Change argument type to ptid_t. Adjust to
12828 per-process data.
12829 (maybe_attach_thread): Adjust to per-process data and ptids.
12830 (thread_db_find_new_threads): Ditto.
12831 (thread_db_init): Ditto.
12832 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12833 processes table. Adjust to use ptids.
12834 (spu_kill, spu_detach): Adjust interface. Remove process from
12835 processes table.
12836 (spu_join, spu_thread_alive): Adjust interface.
12837 (spu_wait): Adjust interface. Remove process from processes
12838 table. Adjust to use ptids.
12839 * win32-low.c (current_inferior_tid): Delete.
12840 (current_inferior_ptid): New.
12841 (debug_event_ptid): New.
12842 (thread_rec): Take a ptid. Adjust.
12843 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12844 (child_delete_thread): Ditto.
12845 (do_initial_child_stuff): Add `attached' argument. Add process to
12846 processes table.
12847 (child_fetch_inferior_registers, child_store_inferior_registers):
12848 Adjust.
12849 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12850 (win32_attach): Pass 1 to do_initial_child_stuff.
12851 (win32_kill): Adjust interface. Remove process from processes
12852 table.
12853 (win32_detach): Ditto.
12854 (win32_join): Adjust interface.
12855 (win32_thread_alive): Take a ptid.
12856 (win32_resume): Adjust to use ptids.
12857 (get_child_debug_event): Ditto.
12858 (win32_wait): Adjust interface. Remove exiting process from
12859 processes table.
12860
bd99dc85
PA
128612009-04-01 Pedro Alves <pedro@codesourcery.com>
12862
12863 Non-stop mode support.
12864
12865 * server.h (non_stop): Declare.
12866 (gdb_client_data, handler_func): Declare.
12867 (delete_file_handler, add_file_handler, start_event_loop):
12868 Declare.
12869 (handle_serial_event, handle_target_event, push_event)
12870 (putpkt_notif): Declare.
12871 * target.h (enum resume_kind): New.
12872 (struct thread_resume): Replace `step' field by `kind' field.
12873 (TARGET_WNOHANG): Define.
12874 (struct target_ops) <wait>: Add `options' argument.
12875 <supports_non_stop, async, start_non_stop>: New fields.
12876 (target_supports_non_stop, target_async): New.
12877 (start_non_stop): Declare.
12878 (mywait): Add `options' argument.
12879 * target.c (mywait): Add `options' argument. Print child exit
12880 notifications here.
12881 (start_non_stop): New.
12882 * server.c (non_stop, own_buf, mem_buf): New globals.
12883 (struct vstop_notif): New.
12884 (notif_queue): New global.
12885 (queue_stop_reply, push_event, discard_queued_stop_replies)
12886 (send_next_stop_reply): New.
12887 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12888 interface changes.
12889 (attach_inferior): In non-stop mode, don't wait for the target
12890 here.
12891 (handle_general_set): Handle QNonStop.
12892 (handle_query): When handling qC, return the current general
12893 thread, instead of the first thread of the list.
12894 (handle_query): If the backend supports non-stop mode, include
12895 QNonStop+ in the qSupported query response.
12896 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12897 and non-stop mode.
12898 (handle_v_attach, handle_v_run): Handle non-stop mode.
12899 (handle_v_stopped): New.
12900 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12901 (myresume): Adjust to use resume_kind. Handle non-stop.
12902 (queue_stop_reply_callback): New.
12903 (handle_status): Handle non-stop mode.
12904 (main): Clear non_stop flag on reconnection. Use the event-loop.
12905 Refactor serial protocol handling from here ...
12906 (process_serial_event): ... to this new function. When GDB
12907 selects any thread, select one here. In non-stop mode, wait until
12908 GDB acks all pending events before exiting.
12909 (handle_serial_event, handle_target_event): New.
12910 * remote-utils.c (remote_open): Install remote_desc in the event
12911 loop.
12912 (remote_close): Remove remote_desc from the event loop.
12913 (putpkt_binary): Rename to...
12914 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12915 (putpkt_binary): New as wrapper around putpkt_binary_1.
12916 (putpkt_notif): New.
12917 (prepare_resume_reply): In non-stop mode, don't change the
12918 general_thread.
12919 * event-loop.c: New.
12920 * Makefile.in (OBJ): Add event-loop.o.
12921 (event-loop.o): New rule.
12922
12923 * linux-low.h (pid_of): Moved here.
12924 (lwpid_of): New.
12925 (get_lwp_thread): Use lwpid_of.
12926 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12927 * linux-low.c (pid_of): Delete.
12928 (inferior_pid): Use lwpid_of.
12929 (linux_event_pipe): New.
12930 (target_is_async_p): New.
12931 (delete_lwp): New.
12932 (handle_extended_wait): Use lwpid_of.
12933 (add_lwp): Don't set lwpid field.
12934 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12935 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12936 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12937 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12938 first. Adjust to linux_wait_for_event interface changes. Use
12939 lwpid_of.
12940 (linux_detach): Don't delete the main lwp here.
12941 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12942 (status_pending_p): Don't consider explicitly suspended lwps.
12943 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12944 pointer. Add OPTIONS argument. Change return type to int. Use
12945 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12946 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12947 pointer. Add status pointer argument. Return a pid instead of a
12948 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12949 changes. In non-stop mode, don't switch to a random thread.
12950 (linux_wait): Rename to...
12951 (linux_wait_1): ... this. Add target_options argument, and handle
12952 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12953 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12954 clean exit and signal exit code. Don't stop all threads in
12955 non-stop mode. In all-stop mode, only stop all threads when
12956 reporting a stop to GDB. Handle explicit thread stop requests.
12957 (async_file_flush, async_file_mark): New.
12958 (linux_wait): New.
12959 (send_sigstop): Use lwpid_of.
12960 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12961 interface changes. In non-stop mode, don't switch to a random
12962 thread.
12963 (linux_resume_one_lwp): Use lwpid_of.
12964 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12965 (linux_resume_one_thread): ... this. Handle resume_stop. In
12966 non-stop mode, don't look for pending flag in all threads.
12967 (resume_status_pending_p): Don't consider explicitly suspended
12968 threads.
12969 (my_waitpid): Reimplement. Emulate __WALL.
12970 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12971 Use lwpid_of.
12972 (sigchld_handler, linux_supports_non_stop, linux_async)
12973 (linux_start_non_stop): New.
12974 (linux_target_ops): Register linux_supports_non_stop, linux_async
12975 and linux_start_non_stop.
12976 (initialize_low): Install SIGCHLD handler.
12977 * thread-db.c (thread_db_create_event, find_one_thread)
12978 (thread_db_get_tls_address): Use lwpid_of.
12979 * win32-low.c (win32_detach): Adjust to use resume_kind.
12980 (win32_wait): Add `options' argument.
12981 * spu-low.c (spu_resume): Adjust to use resume_kind.
12982 (spu_wait): Add `options' argument.
12983
5b1c542e
PA
129842009-04-01 Pedro Alves <pedro@codesourcery.com>
12985
12986 Decouple target code from remote protocol.
12987
12988 * target.h (enum target_waitkind): New.
12989 (struct target_waitstatus): New.
12990 (struct target_ops) <wait>: Return an unsigned long. Take a
12991 target_waitstatus pointer instead of a char pointer.
12992 (mywait): Likewise.
12993 * target.c (mywait): Change prototype to return an unsigned long.
12994 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12995 * server.h (thread_from_wait, old_thread_from_wait): Delete
12996 declarations.
12997 (prepare_resume_reply): Change prototype to take a
12998 target_waitstatus.
12999 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13000 (last_status, last_ptid): New.
13001 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13002 pid instead of a signal.
13003 (attach_inferior): Remove "status" and "signal" parameters.
13004 Adjust.
13005 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13006 not as an address.
13007 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13008 (handle_v_requests, myresume): Remove "status" and "signal"
13009 parameters. Adjust.
13010 (handle_status): New.
13011 (main): Delete local `status'. Adjust.
13012 * remote-utils.c: Include target.h.
13013 (prepare_resume_reply): Change prototype to take a
13014 target_waitstatus. Adjust.
13015
13016 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13017 interface.
13018 * spu-low.c (spu_wait): Adjust.
13019 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13020 Delete.
13021 (win32_wait): Adjust.
13022
2bd7c093
PA
130232009-04-01 Pedro Alves <pedro@codesourcery.com>
13024
13025 * target.h (struct thread_resume): Delete leave_stopped member.
13026 (struct target_ops): Add a `n' argument to the `resume' callback.
13027 * server.c (start_inferior): Adjust.
13028 (handle_v_cont, myresume): Adjust.
13029 * linux-low.c (check_removed_breakpoint): Adjust to resume
13030 interface change, and to removed leave_stopped field.
13031 (resume_ptr): Delete.
13032 (struct thread_resume_array): New.
13033 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13034 resume interface change.
13035 (linux_continue_one_thread, linux_queue_one_thread)
13036 (resume_status_pending_p): Check if the resume field is NULL
13037 instead of checking the leave_stopped member.
13038 (linux_resume): Adjust to the target resume interface change.
13039 * spu-low.c (spu_resume): Adjust to the target resume interface
13040 change.
13041 * win32-low.c (win32_detach, win32_resume): Ditto.
13042
c35fafde
PA
130432009-04-01 Pedro Alves <pedro@codesourcery.com>
13044
13045 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13046 flag.
13047 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13048 pending.
13049 (linux_continue_one_thread): Only preserve the stepping flag if
13050 there's a pending breakpoint.
13051
0a59d50b
PA
130522009-03-31 Pedro Alves <pedro@codesourcery.com>
13053
13054 * server.c (main): After the inferior having exited, call
13055 remote_close before exiting gdbserver.
13056
f04c6d38
TJB
130572009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13058
13059 Fix size of FPSCR in Power 7 processors.
13060 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13061 (PPC_FEATURE_HAS_DFP): New #define.
13062 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13063 size of the FPSCR.
13064
78e5cee6
PA
130652009-03-23 Pedro Alves <pedro@codesourcery.com>
13066
13067 * server.c (handle_query) Whitespace and formatting.
13068
1b3f6016
PA
130692009-03-22 Pedro Alves <pedro@codesourcery.com>
13070
13071 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13072 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13073 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13074 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13075 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13076 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13077 Makefile.in, configure.ac: Fix whitespace throughout.
13078 * configure: Regenerate.
13079
a07b2135
PA
130802009-03-22 Pedro Alves <pedro@codesourcery.com>
13081
13082 * inferiors.c (find_inferior): Make it safe for the callback
13083 function to delete the currently iterated inferior.
13084
67cc2626
PA
130852009-03-22 Pedro Alves <pedro@codesourcery.com>
13086
13087 * Makefile.in (linuw_low_h): Move higher.
13088 (thread-db.o): Depend on $(linux_low_h).
13089
54a0b537
PA
130902009-03-17 Pedro Alves <pedro@codesourcery.com>
13091
13092 Rename "process" to "lwp" throughout.
13093
13094 * linux-low.c (all_processes): Rename to...
13095 (all_lwps): ... this.
13096 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13097 (add_process): Rename to ...
13098 (add_lwp): ... this. Adjust.
13099 (linux_create_inferior): Adjust.
13100 (linux_attach_lwp): Adjust.
13101 (linux_attach): Adjust.
13102 (linux_kill_one_process): Rename to ...
13103 (linux_kill_one_lwp): ... this. Adjust.
13104 (linux_kill): Adjust.
13105 (linux_detach_one_process): Rename to ...
13106 (linux_detach_one_lwp): ... this. Adjust.
13107 (linux_detach): Adjust.
13108 (check_removed_breakpoint): Adjust.
13109 (status_pending_p): Adjust.
13110 (linux_wait_for_process): Rename to ...
13111 (linux_wait_for_lwp): ... this. Adjust.
13112 (linux_wait_for_event): Adjust.
13113 (send_sigstop): Adjust.
13114 (wait_for_sigstop): Adjust.
13115 (stop_all_processes): Rename to ...
13116 (stop_all_lwps): ... this.
13117 (linux_resume_one_process): Rename to ...
13118 (linux_resume_one_lwp): ... this. Adjust.
13119 (linux_set_resume_request, linux_continue_one_thread)
13120 (linux_queue_one_thread, resume_status_pending_p)
13121 (usr_store_inferior_registers, regsets_store_inferior_registers)
13122 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13123 Adjust.
13124 * linux-low.h (get_process): Rename to ...
13125 (get_lwp): ... this. Adjust.
13126 (get_thread_process): Rename to ...
13127 (get_thread_lwp): ... this. Adjust.
13128 (get_process_thread): Rename to ...
13129 (get_lwp_thread): ... this. Adjust.
13130 (struct process_info): Rename to ...
13131 (struct lwp_info): ... this.
13132 (all_processes): Rename to ...
13133 (all_lwps): ... this.
13134 * proc-service.c (ps_lgetregs): Adjust.
13135 * thread-db.c (thread_db_create_event, find_one_thread)
13136 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13137
0b16c5cf
PA
131382009-03-14 Pedro Alves <pedro@codesourcery.com>
13139
13140 * server.c (handle_query): Handle "qAttached".
13141
32de4b9d
NS
131422009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13143
13144 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13145 GPLv3, update license URL.
13146
2aecd87f
DE
131472009-03-01 Doug Evans <dje@google.com>
13148
93efd302 13149 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
13150 (server_h): Add gdb_signals.h.
13151 (signals.o): Update.
13152 * server.h (target_signal_from_host,target_signal_to_host_p)
13153 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13154
86b1f9c5
PM
131552009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13156
13157 * remote-utils.c (getpkt): Also generate remote-debug
13158 information if noack_mode is set.
13159
4aa995e1
PA
131602009-02-06 Pedro Alves <pedro@codesourcery.com>
13161
13162 * server.c (handle_query): Report qXfer:siginfo:read and
13163 qXfer:siginfo:write as supported and handle them.
13164 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13165 * linux-low.c (linux_xfer_siginfo): New.
13166 (linux_target_ops): Set it.
13167
62709adf
PA
131682009-01-26 Pedro Alves <pedro@codesourcery.com>
13169
13170 * server.c (gdbserver_usage): Mention --remote-debug.
13171 (main): Accept '--remote-debug' switch.
13172
aef93bd7
DE
131732009-01-18 Doug Evans <dje@google.com>
13174
13175 * regcache.c (new_register_cache): No need to check result of xcalloc.
13176 * server.c (handle_search_memory): Back out calls to xmalloc,
13177 result is checked and error is returned to user upon failure.
13178 (handle_query): Ditto. Add more checks for result of malloc.
13179 (handle_v_cont): Check result of malloc, report error back to
13180 user upon failure.
13181 (handle_v_run): Ditto. Call freeargv.
13182 * server.h (freeargv): Declare.
13183 * utils.c (freeargv): New fn.
13184
54363045
DE
131852009-01-15 Doug Evans <dje@google.com>
13186
f626972c
DE
13187 * gdbreplay.c (perror_with_name): Make arg const char *.
13188 * server.h (target_signal_to_name): Make return type const char *.
0842e787 13189 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 13190 * utils.c (perror_with_name): Make arg const char *.
54363045 13191
18aae699
PA
131922009-01-14 Pedro Alves <pedro@codesourcery.com>
13193
13194 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13195 when handling a EXIT_PROCESS_DEBUG_EVENT.
13196
ff703abe
JB
131972009-01-06 Joel Brobecker <brobecker@adacore.com>
13198
13199 * gdbreplay.c (gdbreplay_version): Update copyright year.
13200 * server.c (gdbserver_version): Likewise.
13201
f21cc1a2 132022009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
13203
13204 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 13205 (handle_extended_wait): Improve comment.
0e21c1ec 13206
bca929d3
DE
132072008-12-13 Doug Evans <dje@google.com>
13208
13209 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13210 * server.h (ATTR_MALLOC): New macro.
13211 (xmalloc,xcalloc,xstrdup): Declare.
13212 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13213 * inferiors.c: Ditto.
13214 * linux-low.c: Ditto.
13215 * mem-break.c: Ditto.
13216 * regcache.c: Ditto.
13217 * remote-utils.c: Ditto.
13218 * server.c: Ditto.
13219 * target.c: Ditto.
13220 * win32-low.c: Ditto.
13221
97438e3f
DE
132222008-12-12 Doug Evans <dje@google.com>
13223
896c7fbb
DE
13224 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13225 in debugging printf.
13226
97438e3f
DE
13227 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13228
e3b886f8
DE
132292008-12-09 Doug Evans <dje@google.com>
13230
13231 * linux-low.h (struct process_info): Delete member tid, unused.
13232 * thread-db.c (find_one_thread): Update.
13233 (maybe_attach_thread): Update.
13234
07e059b5
VP
132352008-12-02 Pedro Alves <pedro@codesourcery.com>
13236
889bf7c5
PA
13237 * target.h (struct target_ops): Add qxfer_osdata member.
13238 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13239 and dirent.h.
13240 (linux_qxfer_osdata): New functions.
13241 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13242 callback.
13243 * server.c (handle_query): Handle "qXfer:osdata:read:".
13244 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13245 (buffer_xml_printf): New functions.
13246 * server.h (struct buffer): New.
13247 (buffer_grow_str, buffer_grow_str0): New macros.
13248 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13249 (buffer_xml_printf): Declare.
07e059b5 13250
4cab47ab
DE
132512008-11-24 Doug Evans <dje@google.com>
13252
13253 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13254
f142445f
DJ
132552008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13256
13257 * server.c (handle_v_run): Always use the supplied argument list.
13258
d0107bb6 132592008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 13260
d0107bb6
BW
13261 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13262 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 13263
2c4ad781
TJB
132642008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13265
13266 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13267 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13268 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13269 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13270 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13271 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13272 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13273 XML target descriptions.
13274 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13275 when inferior is running on an ISA 2.05 or later processor. Add
13276 special case to return offset for full 64-bit slot of FPSCR when
13277 in 32-bits.
13278
dfb64f85
DJ
132792008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13280
13281 * Makefile.in (SFILES, clean): Added sparc64 files.
13282 (reg-sparc64.o, reg-sparc64.c): New.
13283 * configure.srv (sparc*-*-linux*): New configuration.
13284 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13285 syscall arguments for SPARC.
13286 (regsets_store_inferior_registers): Likewise.
13287 * linux-sparc-low.c: New file.
13288
66b6e1dd
DE
132892008-10-21 Doug Evans <dje@google.com>
13290
13291 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13292 (READLINE_DIR,READLINE_DEP): Delete.
13293 (INTERNAL_CFLAGS): Update.
13294 (LINTFLAGS): Update.
13295
9b710a42
PA
132962008-10-10 Pedro Alves <pedro@codesourcery.com>
13297
13298 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13299 whole argv from the last run, not just argv[0].
13300
5822d809
PA
133012008-09-08 Pedro Alves <pedro@codesourcery.com>
13302
13303 * regcache.c (new_register_cache): Return NULL if the register
13304 cache size isn't known yet.
13305 (free_register_cache): Avoid dereferencing a NULL regcache.
13306
74aac56f
DJ
133072008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13308
13309 * configure.srv: Merge MIPS and MIPS64.
13310
400b20f5
MR
133112008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13312
13313 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13314
677c5bb1
LM
133152008-08-18 Luis Machado <luisgpm@br.ibm.com>
13316
13317 * Makefile.in: Add required vsx dependencies.
13318
13319 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13320 Declare init_registers_powerpc_vsx32l.
13321 Declare init_registers_powerpc_vsx64l.
13322 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13323 (ppc_arch_setup): Check for VSX in hwcap.
13324 (ppc_fill_vsxregset): New function.
13325 (ppc_store_vsxregset): New function.
13326 Add new VSX entry in regset_info target_regsets.
13327
13328 * configure.srv: Add new VSX dependencies.
13329
a6f3e723
SL
133302008-08-12 Pedro Alves <pedro@codesourcery.com>
13331
13332 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13333 (remote_open): Set or clear transport_is_reliable.
13334 (putpkt_binary): Don't expect acks in noack mode.
13335 (getpkt): Don't send ack/nac in noack mode.
13336 * server.c (handle_general_set): Handle QStartNoAckMode.
13337 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13338 qSupported.
13339 (main): Reset noack_mode on every connection.
13340 * server.h (noack_mode): Declare.
13341
a417dc56
RW
133422008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13343
13344 * Makefile.in (GDBREPLAY_OBS): New variable.
13345 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13346
3221518c
UW
133472008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13348 Daniel Jacobowitz <dan@codesourcery.com>
13349
13350 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13351 (usr_store_inferior_registers): Likewise.
13352 (regsets_store_inferior_registers): Likewise.
13353
ec56be1b
PA
133542008-07-31 Rolf Jansen <rj@surtec.com>
13355 Pedro Alves <pedro@codesourcery.com>
13356
13357 * configure.ac: Check for memmem declaration.
13358 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13359 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13360 (disable_packet_qfThreadInfo): Unconditionally compile.
13361 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13362 * configure, config.in: Regenerate.
13363
2fe5e3ff
DE
133642008-07-28 Doug Kwan <dougkwan@google.com>
13365
13366 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13367 (linux_write_memory): Remove declaration of errno.
13368
836acd6d
UW
133692008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13370
13371 * linux-low.c (handle_extended_wait): Do not use "status"
13372 variable uninitialized.
13373
aeba519e
PA
133742008-07-07 Pedro Alves <pedro@codesourcery.com>
13375
13376 * server.c (handle_v_attach): Inhibit reporting dll changes.
13377
db42f210
PA
133782008-06-27 Pedro Alves <pedro@codesourcery.com>
13379
13380 * remote-utils.c (prepare_resume_reply): If requested, don't
13381 output "thread:TID" in the T stop reply.
13382
13383 * server.c (disable_packet_vCont, disable_packet_Tthread)
13384 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13385 (handle_query): If requested, disable support for qC, qfThreadInfo
13386 and qsThreadInfo.
13387 (handle_v_requests): If requested, disable support for vCont.
13388 (gdbserver_show_disableable): New.
13389 (main): Handle --disable-packet and --disable-packet=LIST.
13390
13391 * server.h (disable_packet_vCont, disable_packet_Tthread)
13392 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13393
8e4c5421
CD
133942008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13395
13396 * server.c (gdbserver_usage): Mention --version.
13397
6e23a804
DJ
133982008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13399
13400 * Makefile.in (gdbreplay.o): New rule.
13401
90aa6a40
JM
134022008-06-06 Joseph Myers <joseph@codesourcery.com>
13403
13404 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13405 message, not gdbserver.
13406
c16158bc 134072008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
13408 Nathan Sidwell <nathan@codesourcery.com>
13409 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
13410
13411 * acinclude.m4: Include ../../config/acx.m4.
13412 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13413 * configure, config.in: Regenerate.
13414 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13415 * server.c (gdbserver_version): Print PKGVERSION.
13416 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13417 (main): Adjust gdbserver_usage calls.
13418 * gdbreplay.c (version, host_name): Add declarations.
13419 (gdbreplay_version, gdbreplay_usage): New.
13420 (main): Accept --version and --help options.
13421
aeb75bf5
DJ
134222008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13423
13424 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13425 (arm_breakpoint_at): Handle Thumb.
13426 (the_low_target): Add comment.
13427
76b233dd
UW
134282008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13429
13430 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13431
08388c79
DE
134322008-05-09 Doug Evans <dje@google.com>
13433
a3c83fae
DE
13434 * server.h (decode_search_memory_packet): Declare.
13435 * remote-utils.c (decode_search_memory_packet): New fn.
13436 * server.c (handle_search_memory_1): New fn.
08388c79
DE
13437 (handle_search_memory): New fn.
13438 (handle_query): Process qSearch:memory packets.
13439
bb9c3d36
UW
134402008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13441
13442 * regcache.c (registers_length): Remove.
13443 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13444 full register packet.
13445 * regcache.h (registers_length): Remove prototype.
13446 * server.h (PBUFSIZ): Define to 16384.
13447
7284e1be
UW
134482008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13449
13450 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13451 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13452 powerpc-64l.o, and powerpc-altivec64l.o.
13453 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13454 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13455 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13456 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13457 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13458 to srv_xmlfiles.
13459
13460 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13461 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13462 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13463 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13464 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13465 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13466 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13467 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13468 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13469 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13470 (clean): Update.
13471
13472 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13473 (init_registers_powerpc_32l): ... this new prototype.
13474 (init_registers_powerpc_32): Remove, replace by ...
13475 (init_registers_powerpc_altivec32l): ... this new prototype.
13476 (init_registers_powerpc_e500): Remove, replace by ...
13477 (init_registers_powerpc_e500l): ... this new prototype.
13478 (init_registers_ppc64): Remove, replace by ...
13479 (init_registers_powerpc_64l): ... this new prototype.
13480 (init_registers_powerpc_64): Remove, replace by ...
13481 (init_registers_powerpc_altivec64l): ... this new prototype.
13482 (ppc_num_regs): Set to 73.
13483 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13484 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13485 (ppc_cannot_store_register): Handle orig_r3 and trap.
13486 (ppc_arch_setup): Update init_registers_... calls.
13487 (ppc_fill_gregset): Handle orig_r3 and trap.
13488
13489 * inferiors.c (clear_inferiors): Reset current_inferior.
13490
fdc59709
PB
134912008-04-23 Paolo Bonzini <bonzini@gnu.org>
13492
889bf7c5
PA
13493 * acinclude.m4: Add override.m4.
13494 * configure: Regenerate.
fdc59709 13495
c9b2f845
UW
134962008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13497
13498 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13499 initial call to init_register_ppc64.
13500
550512b8
UW
135012008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13502
43aaf8b6
PA
13503 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13504 single powerpc*-*-linux* case.
550512b8
UW
13505 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13506
b6430ec3
UW
135072008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13508
13509 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 13510 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
13511 from reg_xmlfiles.
13512 * linux-ppc-low.c: Include <elf.h>.
13513 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13514 (ppc_hwcap): New global variable.
13515 (ppc_regmap): Remove __SPE__ #ifdef sections.
13516 (ppc_regmap_e500): New global variable.
13517 (ppc_cannot_store_register): Update __SPE__ special case.
13518 (ppc_get_hwcap): New function.
13519 (ppc_arch_setup): Use it to determine whether inferior supports
13520 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13521 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13522 Do not access registers if target does not support AltiVec.
13523 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13524 Do not access registers if target does not support SPE.
13525 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13526
52fa2412
UW
135272008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13528
13529 * linux-low.c (disabled_regsets, num_regsets): New.
13530 (use_regsets_p): Delete.
13531 (linux_wait_for_process): Clear disabled_regsets.
13532 (regsets_fetch_inferior_registers): Check and set it.
13533 (regsets_store_inferior_registers): Likewise.
13534 (linux_fetch_registers, linux_store_registers): Do not use
13535 use_regsets_p.
13536 (initialize_low): Allocate disabled_regsets.
13537
e28b3332
DJ
135382008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13539
13540 * Makefile.in (LIBOBJS): New.
13541 (OBS): Use LIBOBJS.
13542 (memmem.o): New rule.
13543 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13544 * configure: Regenerated.
13545
4536995d
UW
135462008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13547
13548 * server.c (handle_query): Never return "unsupported" for
13549 qXfer:features:read queries.
13550
221c031f
UW
135512008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13552
13553 * server.c (get_features_xml): Fix inverted condition.
13554 (handle_query): Always support qXfer:feature:read.
13555
ccd213ac
DJ
135562008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13557
13558 * server.c (wrapper_argv): New.
13559 (start_inferior): Handle wrapper_argv. If set, expect an extra
13560 trap.
13561 (gdbserver_usage): Document --wrapper.
13562 (main): Parse --wrapper.
13563
6fe305f7
UW
135642008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13565
13566 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13567 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13568 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13569 (ppc_set_pc): Likewise.
13570 (ppc_arch_setup): New function.
13571 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13572 of collect_register.
889bf7c5 13573 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 13574
5b0a002e
UW
135752008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13576
13577 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13578 instead of linux-ppc64-low.o.
13579 * linux-ppc64-low.c: Remove file.
13580 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13581 (linux-ppc64-low.o): Remove rule.
13582
13583 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13584 (init_registers_powerpc_64): Likewise.
13585 (ppc_regmap): Conditionally define depending on __powerpc64__.
13586 (ppc_cannot_store_register): Do not special-case "fpscr" when
13587 compiled on __powerpc64__.
13588 (ppc_collect_ptrace_register): New function.
13589 (ppc_supply_ptrace_register): New function.
13590 (ppc_breakpoint): Change type to "unsigned int".
13591 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13592 (the_low_target): Conditionally provide initializers for the
889bf7c5 13593 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
13594 collect_ptrace_register and supply_ptrace_register members.
13595
9b4b61c8
UW
135962008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13597
13598 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13599 * server.c (gdbserver_xmltarget): Define.
13600 (get_features_xml): Use it to replace "target.xml" and arch_string.
13601
13602 * configure.srv: Remove srv_xmltarget. Add XML files that were
13603 mentioned there to srv_xmlfiles instead. Remove conditional tests
13604 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13605 srv_xmlfiles and srv_regobj to include all possible choices.
13606 * configure.ac (srv_xmltarget): Remove.
13607 (srv_xmlfiles): Do not add "target.xml".
13608 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13609 checks for supplementary target information.
13610 * configure: Regenerate.
13611 * Makefile.in (XML_TARGET): Remove.
13612 (target.xml): Remove rule.
13613 (clean): Do not clean up target.xml.
13614 (.PRECIOUS): Do not mention target.xml.
13615
13616 * target.h (struct target_ops): Remove arch_string member.
13617 * linux-low.c (linux_arch_string): Remove.
13618 (linux_target_ops): Remove arch_string initializer.
13619 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13620 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13621 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13622 * spu-low.c (spu_arch_string): Remove.
13623 (spu_target_ops): Remove arch_string initializer.
13624 * win32-low.c (win32_arch_string): Remove.
13625 (win32_target_ops): Remove arch_string initializer.
13626 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13627 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13628 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13629
ee1a7ae4
UW
136302008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13631
13632 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13633 by collect_ptrace_register and supply_ptrace_register hooks.
13634 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13635 instead of checking for the_low_target.left_pad_xfer.
13636 (usr_store_inferior_registers): Use collect_ptrace_register callback
13637 instead of checking for the_low_target.left_pad_xfer.
13638
13639 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13640 (s390_supply_ptrace_register): Likewise.
13641 (s390_fill_gregset): Call s390_collect_ptrace_register.
13642 (the_low_target): Update.
13643
13644 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13645 (ppc_supply_ptrace_register): Likewise.
13646 (the_low_target): Update.
13647
13648 * linux-i386-low.c (the_low_target): Update.
13649 * linux-x86-64-low.c (the_low_target): Update.
13650
d61ddec4
UW
136512008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13652
13653 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13654 reg-s390.o and reg-s390x.o.
13655
13656 * linux-low.c (new_inferior): New global variable.
13657 (linux_create_inferior, linux_attach): Set it.
13658 (linux_wait_for_process): Call the_low_target.arch_setup after the
13659 target has stopped for the first time.
13660 (initialize_low): Do not call the_low_target.arch_setup.
13661
13662 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13663 (s390_set_pc): Likewise.
13664 (s390_arch_setup): New function.
13665 (the_low_target): Use s390_arch_setup as arch_setup routine.
13666
13667 * regcache.c (realloc_register_cache): New function.
13668 (set_register_cache): Call it for each existing regcache.
13669
d05b4ac3
UW
136702008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13671
13672 * server.h (init_registers): Remove prototype.
13673
13674 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13675 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13676 instead of init_registers ().
13677 * linux-arm-low.c (init_registers_arm): Add prototype.
13678 (init_registers_arm_with_iwmmxt): Likewise.
13679 (the_low_target): Add initializer for arch_setup field.
13680 * linux-cris-low.c (init_registers_cris): Add prototype.
13681 (the_low_target): Add initializer for arch_setup field.
13682 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13683 (the_low_target): Add initializer for arch_setup field.
13684 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13685 (the_low_target): Add initializer for arch_setup field.
13686 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13687 (the_low_target): Add initializer for arch_setup field.
13688 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13689 (the_low_target): Add initializer for arch_setup field.
13690 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13691 (the_low_target): Add initializer for arch_setup field.
13692 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13693 (init_registers_mips64_linux): Likewise.
13694 (the_low_target): Add initializer for arch_setup field.
13695 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13696 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13697 (the_low_target): Add initializer for arch_setup field.
13698 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13699 (init_registers_powerpc_64): Likewise.
13700 (the_low_target): Add initializer for arch_setup field.
13701 * linux-s390-low.c (init_registers_s390): Add prototype.
13702 (init_registers_s390x): Likewise.
13703 (the_low_target): Add initializer for arch_setup field.
13704 * linux-sh-low.c (init_registers_sh): Add prototype.
13705 (the_low_target): Add initializer for arch_setup field.
13706 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13707 (the_low_target): Add initializer for arch_setup field.
13708 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13709 (the_low_target): Add initializer for arch_setup field.
13710
13711 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13712 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13713 instead of init_registers ().
13714 * win32-arm-low.c (init_registers_arm): Add prototype.
13715 (the_low_target): Add initializer for arch_setup field.
13716 * win32-i386-low.c (init_registers_i386): Add prototype.
13717 (the_low_target): Add initializer for arch_setup field.
13718
13719 * spu-low.c (init_registers_spu): Add prototype.
13720 (initialize_low): Call initialie_registers_spu () instead of
13721 initialize_registers ().
13722
fd96d250
PA
137232008-02-19 Pedro Alves <pedro@codesourcery.com>
13724
13725 * server.c (handle_v_requests): When handling the vRun and vAttach
13726 packets, if already debugging a process, don't kill it. Return an
13727 error instead.
13728
d41b6bb4
DJ
137292008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13730
13731 * server.c (handle_query): Correct length check.
13732
5ac588cf
PA
137332008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13734
13735 * win32-low.c (do_initial_child_stuff): Add process handle
13736 parameter. Set current_process_handle and current_process_id from the
13737 parameters. Clear globals.
13738 (win32_create_inferior): Don't set current_process_handle and
13739 current_process_id here. Instead pass them on the call to
13740 do_initial_child_stuff.
13741 (win32_attach): Likewise.
13742 (win32_clear_inferiors): New.
13743 (win32_kill): Don't close the current process handle or the
13744 current thread handle here. Instead call win32_clear_inferiors.
13745 (win32_detach): Don't open a new handle to the process. Call
13746 win32_clear_inferiors.
13747 (win32_join): Don't rely on current_process_handle; open a new
13748 handle using the process id.
13749 (win32_wait): Call win32_clear_inferiors when the inferior process
13750 has exited.
13751
ecd7ecbc
DJ
137522008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13753
13754 * server.c (monitor_show_help): Add "exit".
13755
1525d545
MG
137562008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13757
ecd7ecbc 13758 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
13759 (clean): Add reg-xtensa.c.
13760 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
13761 * configure.srv (xtensa*-*-linux*) New target.
13762 * linux-xtensa-low.c: New.
13763 * xtensa-xtregs.c: New.
1525d545 13764
59a016f0
PA
137652008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13766
13767 * hostio.c: Don't include errno.h.
13768 (errno_to_fileio_errno): Move to hostio-errno.
13769 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13770 error number outputting to the target->hostio_last_error callback.
13771 (hostio_packet_error): Use FILEIO_EINVAL directly.
13772 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13773 calls to hostio_error.
13774 * hostio-errno.c: New.
13775 * server.h (hostio_last_error_from_errno): Declare.
13776 * target.h (target_ops): Add hostio_last_error member.
13777 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13778 as hostio_last_error handler.
889bf7c5 13779 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
13780 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13781 (wince_hostio_last_error): New functions.
13782 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13783 as hostio_last_error handler.
13784 (win32_target_ops) [!_WIN32_WCE]: Register
13785 hostio_last_error_from_errno as hostio_last_error handler.
13786 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13787 (hostio-errno.o): New rule.
13788 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13789 * configure.srv (srv_hostio_err_objs): New variable. Default to
13790 hostio-errno.o.
13791 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13792 * configure: Regenerate.
13793
2d717e4f
DJ
137942008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13795
13796 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13797 (linux_kill, linux_detach): Clean up the process list.
13798 * remote-utils.c (remote_open): Improve port number parsing.
13799 (putpkt_binary, input_interrupt): Only send interrupts if the target
13800 is running.
13801 * server.c (extended_protocol): Make static.
13802 (attached): Define earlier.
13803 (exit_requested, response_needed, program_argv): New variables.
13804 (target_running): New.
13805 (start_inferior): Clear attached here.
13806 (attach_inferior): Set attached here.
13807 (require_running): Define.
13808 (handle_query): Use require_running and target_running. Implement
13809 "monitor exit".
13810 (handle_v_attach, handle_v_run): New.
13811 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13812 (gdbserver_usage): Update.
13813 (main): Redo argument parsing. Handle --debug and --multi. Handle
13814 --attach along with other options or after the port. Save
13815 program_argv. Support no initial program. Resynchronize
13816 communication with GDB after an error. Handle "monitor exit".
13817 Use require_running and target_running. Always allow the extended
13818 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13819 restart in extended mode.
13820 * README: Refer to the GDB manual. Update --attach usage.
13821
7407e2de
AS
138222007-12-20 Andreas Schwab <schwab@suse.de>
13823
13824 * linux-low.c (STACK_SIZE): Define.
13825 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13826 (linux_test_for_tracefork): Likewise.
13827
b65d95c5
DJ
138282007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13829
13830 * linux-low.c (linux_wait_for_event): Update messages. Do not
13831 reinsert auto-delete breakpoints.
13832 * mem-break.c (struct breakpoint): Change return type of handler to
13833 int.
13834 (set_breakpoint_at): Update handler type.
13835 (reinsert_breakpoint_handler): Return 1 instead of calling
13836 delete_breakpoint.
13837 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13838 setting a new one.
13839 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13840 * mem-break.h (set_breakpoint_at): Update handler type.
13841 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13842 * win32-low.c (auto_delete_breakpoint): New.
13843 (get_child_debug_event): Use it.
13844
4e799345
DJ
138452007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13846
13847 * configure.ac: Check for pread and pwrite.
13848 * hostio.c (handle_pread): Fall back to lseek and read.
13849 (handle_pwrite): Fall back to lseek and write.
13850 * config.in, configure: Regenerated.
13851
27524b67
DJ
138522007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13853
13854 * server.c (myresume): Add own_buf argument.
13855 (main): Update calls.
13856
a20d5e98
DJ
138572007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13858
13859 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13860 * remote-utils.c (remote_open): Do not call disable_async_io.
13861 (block_async_io): Delete.
13862 (unblock_async_io): Make static.
13863 (initialize_async_io): New.
13864 * server.c (handle_v_cont): Handle async I/O here.
13865 (myresume): Likewise. Move other common resume tasks here...
13866 (main): ... from here. Call initialize_async_io. Disable async
13867 I/O before the main loop.
13868 * server.h (initialize_async_io): Declare.
13869 (block_async_io, unblock_async_io): Delete prototypes.
13870 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13871
b79d787e
DJ
138722007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13873
13874 * remote-utils.c (readchar): Allow binary data in received messages.
13875
d97903b2
PA
138762007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13877
13878 * win32-low.c (attaching): New global.
13879 (win32_create_inferior): Clear the `attaching' global.
13880 (win32_attach): Set the `attaching' global.
13881 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13882 attaching. Only set a breakpoint at the entry point if not
13883 attaching.
13884
311de423
PA
138852007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13886
13887 * server.c (main): Don't report dll events on the initial
13888 connection on attaches.
13889
6c2d16d2
PA
138902007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13891
13892 * server.c (main): Relax numerical bases supported for the pid of
13893 the --attach command line argument.
13894
5ca906e6
PA
138952007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13896
13897 * win32-low.c (win32_attach): Call OpenProcess before
13898 DebugActiveProcess, not after. Add last error output to error
13899 call.
13900
9c6c8194
PA
139012007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13902
13903 * win32-low.c (win32_get_thread_context)
13904 (win32_set_thread_context): New functions.
13905 (thread_rec): Use win32_get_thread_context.
13906 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13907 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13908 field.
13909
4d5d1aaa
PA
139102007-12-03 Leo Zayas
13911 Pedro Alves <pedro_alves@portugalmail.pt>
13912
13913 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13914 global variables.
13915 (child_add_thread): Minor cleanup.
13916 (child_continue): Resume artificially suspended threads before
13917 calling ContinueDebugEvent.
13918 (suspend_one_thread): New.
13919 (fake_breakpoint_event): New.
13920 (get_child_debug_event): Change return type to int. Check here if
13921 gdb sent an interrupt request. If a soft interrupt was requested,
13922 fake a breakpoint event. Return 0 if there is no event to handle,
13923 and 1 otherwise.
13924 (win32_wait): Don't check here if gdb sent an interrupt request.
13925 Ensure there is a valid event to handle.
13926 (win32_request_interrupt): Add soft interruption method as last
13927 resort.
13928
c436e841
PA
139292007-12-03 Leo Zayas
13930 Pedro Alves <pedro_alves@portugalmail.pt>
13931
13932 * win32-low.h (win32_thread_info): Add descriptions to the
13933 structure members. Replace `suspend_count' counter by a
13934 `suspended' flag.
13935 * win32-low.c (thread_rec): Update condition of when to get the
13936 context from the inferior. Rely on ContextFlags being set if it
13937 has already been retrieved. Only suspend the inferior thread if
13938 we haven't already. Warn if that fails.
13939 (continue_one_thread): s/suspend_count/suspended/. Only call
13940 ResumeThread once. Warn if that fails.
13941
e7b5fa67
PA
139422007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13943
13944 * win32-low.c (win32_wait): Don't read from the inferior when it
13945 has already exited.
13946
a385171d
PA
139472007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13948
13949 * Makefile.in (win32_low_h): New variable.
13950 (win32-low.o): Add dependency on $(win32_low_h).
13951 (win32-arm-low.o, win32-i386-low.o): New rules.
13952
f80c84b3
DJ
139532007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13954
13955 * hostio.c: Correct copyright year.
13956
a6b151f1
DJ
139572007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13958
13959 * Makefile.in (OBS): Add hostio.o.
13960 (hostio.o): New rule.
13961 * server.h (handle_vFile): Declare.
13962 * hostio.c: New file.
13963 * server.c (handle_v_requests): Take packet_len and new_packet_len
13964 for binary packets. Call handle_vFile.
13965 (main): Update call to handle_v_requests.
13966
f9387fc3
DJ
139672007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13968
13969 * linux-low.c: Include <sched.h>.
13970
51c2684e
DJ
139712007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13972
13973 * linux-low.c (linux_tracefork_grandchild): New.
13974 (linux_tracefork_child): Use clone.
13975 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13976
75f83163
JB
139772007-10-31 Joel Brobecker <brobecker@adacore.com>
13978
13979 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13980
da5898ce
DJ
139812007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13982
13983 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13984
24a09b5f
DJ
139852007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13986
13987 * inferiors.c (change_inferior_id): Delete.
13988 (add_pid_to_list, pull_pid_from_list): New.
13989 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13990 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13991 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13992 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13993 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13994 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13995 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13996 (using_threads): Always set to 1.
13997 (handle_extended_wait): New.
13998 (add_process): Do not set TID.
13999 (linux_create_inferior): Set must_set_ptrace_flags.
14000 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14001 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14002 (linux_thread_alive): Rename TID argument to LWPID.
14003 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14004 (linux_wait_for_event): Do not use TID or check using_threads. Update
14005 call to dead_thread_notify. Call handle_extended_wait.
14006 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14007 (send_sigstop): Delete sigstop_sent.
14008 (wait_for_sigstop): Avoid TID.
14009 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14010 (linux_test_for_tracefork): New.
14011 (linux_lookup_signals): Use thread_db_active and
14012 linux_supports_tracefork_flag.
14013 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14014 * linux-low.h (get_process_thread): Avoid TID.
14015 (struct process_ifo): Move thread_known and tid to the end. Remove
14016 sigstop_sent.
14017 (linux_attach_lwp, thread_db_init): Update prototypes.
14018 * server.h (change_inferior_id): Delete prototype.
14019 (add_pid_to_list, pull_pid_from_list): New prototypes.
14020 * thread-db.c (thread_db_use_events): New.
14021 (find_first_thread): Rename to...
14022 (find_one_thread): ...this. Update callers and messages. Do not
14023 call fatal. Check thread_db_use_events. Do not call
14024 change_inferior_id or new_thread_notify.
14025 (maybe_attach_thread): Update. Do not call new_thread_notify.
14026 (thread_db_init): Set thread_db_use_events. Check use_events.
14027 * utils.c (fatal, warning): Correct message prefix.
14028
30ed0a8f
DJ
140292007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14030
14031 * Makefile.in (clean): Remove new files.
14032 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14033 (powerpc-64.o, powerpc-64.c): New rules.
14034 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14035 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14036 with SPE.
14037 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14038 SPE targets.
14039 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14040 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14041 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14042 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14043 (target_regsets): Add AltiVec and SPE register sets.
14044 * configure.ac: Check for AltiVec and SPE.
14045 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14046 (ppc_fill_vrregset, ppc_store_vrregset): New.
14047 (target_regsets): Add AltiVec register set.
14048 * configure: Regenerated.
14049
fd462a61
DJ
140502007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14051
14052 * linux-low.c (O_LARGEFILE): Define.
14053 (linux_read_memory): Use /proc/PID/mem.
14054 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14055 * configure, config.in: Regenerated.
14056
69f223ed
DJ
140572007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14058
14059 * linux-low.c (linux_wait_for_event): Do not pass signals while
14060 single-stepping.
14061
aec18585
PA
140622007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14063
14064 * win32-low.c (create_process): New.
14065 (win32_create_inferior): Use create_process instead of
14066 CreateProcess. If create_process failed retry appending an ".exe"
14067 suffix. Store the GetLastError result immediatelly after
14068 create_process calls and use it on the call to error.
14069
34d86ddd
PA
140702007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14071
14072 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14073
5a0e3bd0
JB
140742007-08-23 Joel Brobecker <brobecker@adacore.com>
14075
14076 * configure.ac: Switch license to GPLv3.
14077
f88c79e6
MS
140782007-08-01 Michael Snyder <msnyder@access-company.com>
14079
14080 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14081
6b3d9b83
PA
140822007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14083
14084 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14085 typedef.
14086 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14087 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14088 CloseToolhelp32Snapshot.
14089 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14090 CloseToolhelp32Snapshot.
14091
c588c53c
MS
140922007-07-27 Michael Snyder <michael.snyder@access-company.com>
14093
14094 * server.c (main): Check for inferior exit before main loop.
14095
aa0403d9
PA
140962007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14097
14098 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14099 instead of on tmp_desc.
14100
255e7678
DJ
141012007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14102 Daniel Jacobowitz <dan@codesourcery.com>
14103
14104 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14105 (add_thread): Minor cleanups.
14106 (clear_inferiors): Move lower in the file. Clear the DLL
14107 list.
14108 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14109 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14110 (xml_escape_text): New.
14111 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14112 for qSupported.
14113 (handle_v_cont): Report errors.
14114 (gdbserver_version): Update.
14115 (main): Correct size of own_buf. Do not report initial DLL events.
14116 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14117 (unloaded_dll, xml_escape_text): New.
14118 * win32-low.c (enum target_waitkind): Update comments.
14119 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14120 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14121 (win32_EnumProcessModules, win32_GetModuleInformation)
14122 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14123 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14124 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14125 (win32_Module32First, win32_Module32Next, load_toolhelp)
14126 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14127 (get_child_debug_event): Handle DLL events.
14128 (win32_wait): Likewise.
14129
0d37add9
DJ
141302007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14131
14132 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14133 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14134
45e2715e
PA
141352007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14136
14137 * win32-low.c (handle_output_debug_string): Ignore event if not
14138 waiting.
14139
c5674cf1
PA
141402007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14141
14142 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14143
2bbe3cc1
DJ
141442007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14145
14146 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14147
ae13219e
DJ
141482007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14149
14150 * inferiors.c (change_inferior_id): Add comment.
14151 * linux-low.c (check_removed_breakpoint): Add an early
14152 prototype. Improve debug output.
14153 (linux_attach): Doc update.
14154 (linux_detach_one_process, linux_detach): Clean up before releasing
14155 each process.
14156 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14157 * linux-low.h (struct process_info): Doc improvement.
14158 * mem-break.c (delete_all_breakpoints): New.
14159 * mem-break.h (delete_all_breakpoints): New prototype.
14160 * thread-db.c (find_first_thread): New.
14161 (thread_db_create_event): Call it instead of
14162 thread_db_find_new_threads. Clean up unused variables.
14163 (maybe_attach_thread): Remove first thread handling.
14164 (thread_db_find_new_threads): Use find_first_thread.
14165 (thread_db_get_tls_address): Likewise.
14166
4105de34
DJ
141672007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14168
14169 * thread-db.c (thread_db_find_new_threads): Add prototype.
14170 (thread_db_create_event): Check for the main thread before adding
14171 a new thread.
14172 (maybe_attach_thread): Only enable event reporting if TID == 0.
14173 (thread_db_get_tls_address): Check for new threads.
14174
2b876972
DJ
141752007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14176
14177 * linux-low.c (linux_create_inferior): Try execv before execvp.
14178 * spu-low.c (spu_create_inferior): Likewise.
14179
7a245884
DJ
141802007-06-13 Mike Frysinger <vapier@gentoo.org>
14181
14182 * linux-low.c (linux_create_inferior): Change execv to execvp.
14183 * spu-low.c (spu_create_inferior): Likewies.
14184
117ce543
DJ
141852007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14186
14187 * Makefile.in (clean): Clean new files instead of deleted ones.
14188 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14189 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14190 rules.
14191 * configure.srv: Specify XML files and new regformats for MIPS and
14192 MIPS64 GNU/Linux.
14193 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14194 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14195 an entry for the restart register.
14196 (mips_cannot_fetch_register, mips_cannot_store_register)
14197 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14198 register names to match the XML descriptions.
14199 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14200 restart register instead of $0.
14201
0e7f50da
UW
142022007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14203 Markus Deuling <deuling@de.ibm.com>
14204
14205 * remote-utils.c (decode_xfer_write): New function.
14206 * server.h (decode_xfer_write): Add prototype.
14207 * server.c (handle_query): Add PACKET_LEN argument. Support
14208 qXfer:spu:read and qXfer:spu:write packets.
14209 (main): Pass packet_len to handle_query.
14210 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14211 * target.h (target_ops): Add qxfer_spu.
14212
374c1d38
UW
142132007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14214
14215 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14216 accessing non-seekable spufs files.
14217
bb63802a
UW
142182007-05-16 Markus Deuling <deuling@de.ibm.com>
14219
889bf7c5 14220 * server.c (handle_query): Add reply for qC packet.
bb63802a 14221
7390519e
PA
142222007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14223 Leo Zayas <lerele@champenstudios@com>
14224
14225 * server.h (check_remote_input_interrupt_request): New function.
14226 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14227 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14228 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14229 (check_remote_input_interrupt_request): New function.
14230 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 14231 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
14232 winapi_GenerateConsoleCtrlEvent): New typedefs.
14233 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14234 to 250 ms.
14235 (win32_wait): Check for remote interrupt request
14236 with check_remote_input_interrupt_request.
14237 (win32_request_interrupt): New function.
14238 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14239
34b34921
PA
142402007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14241
14242 * win32-low.c (debug_registers_changed,
14243 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14244 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14245 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14246 (thread_rec): Get context using the low target.
14247 (child_add_thread): Call thread_added on the low target,
14248 which does the same thing.
14249 (regptr): Delete.
14250 (do_initial_child_stuff): Remove debug registers references.
14251 Set context using the low target. Resume threads after
14252 setting the contexts.
14253 (child_continue): Remove dead variable. Remove debug
14254 registers references.
14255 (child_fetch_inferior_registers): Go through the low target.
14256 (do_child_store_inferior_registers): Remove.
14257 (child_store_inferior_registers): Go through the low target.
14258 (win32_resume): Remove debug registers references.
14259 Set context using the low target.
14260 (handle_exception): Change return type to void. Don't record
14261 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14262 first chance exception.
889bf7c5 14263 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
14264 goto loop. Always return after waiting for debug event.
14265 (win32_wait): Convert to switch statement. Handle spurious
14266 events.
14267
14268 * win32-i386-low.c (debug_registers_changed,
14269 debug_registers_used): New.
14270 (initial_stuff): Rename to ...
14271 (i386_initial_stuff): ... this. Clear debug registers
14272 state variables.
14273 (store_debug_registers): Delete.
14274 (i386_get_thread_context): New.
14275 (load_debug_registers): Delete.
14276 (i386_set_thread_context): New.
14277 (i386_thread_added): New.
14278 (single_step): Rename to ...
14279 (i386_single_step): ... this.
14280 (do_fetch_inferior_registers): Rename to ...
14281 (i386_fetch_inferior_register): ... this.
14282 (i386_store_inferior_register): New.
14283 (the_low_target): Adapt to new interface.
14284
14285 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14286 (arm_get_thread_context): New.
14287 (arm_set_thread_context): New.
14288 (regptr): New.
14289 (do_fetch_inferior_registers): Rename to ...
14290 (arm_fetch_inferior_register): ... this.
14291 (arm_store_inferior_register): New.
14292 (arm_wince_breakpoint): Reimplement as unsigned long.
14293 (arm_wince_breakpoint_len): Define.
14294 (the_low_target): Adapt to new interface.
14295
14296 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14297 load_debug_registers. Add get_thread_context, set_thread_context,
14298 thread_added and store_inferior_register. Rename
14299 fetch_inferior_registers to fetch_inferior_register.
14300 (regptr): Remove declaration.
14301
dd6953e1
PA
143022007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14303
14304 * linux-low.c (linux_detach): Change return type to int. Return 0.
14305 * spu-low.c (spu_detach): Likewise.
14306
444d6139
PA
143072007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14308
14309 * target.h (target_ops): Change return type of detach to int.
14310 Add join.
14311 (join_inferior): New.
14312 * server.c (main): Don't skip detach support on mingw32.
14313 If the inferior doesn't support detaching return error.
14314 Call join_inferior instead of using waitpid.
14315 * linux-low.c (linux_join): New.
14316 (linux_target_op): Add linux_join.
14317 * spu-low.c (spu_join): New.
14318 (spu_target_ops): Add spu_join.
14319 * win32-low.c (win32_detach): Adapt to new interface.
14320 Reopen current_process_handle before detaching. Issue a child
14321 resume before detaching.
14322 (win32_join): New.
14323 (win32_target_op): Add win32_join.
14324
1d5315fe
PA
143252007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14326
14327 * win32-low.c (win32-attach): Fix return value.
14328 * target.h (target_ops): Describe ATTACH return values.
14329
bf914831
PA
143302007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14331
14332 * win32-low.c (GETPROCADDRESS): Define.
14333 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14334 (winapi_DebugSetProcessKillOnExit): Likewise.
14335 (win32_create_inferior): Force usage of ansi CreateProcessA.
14336 (win32_attach): Use GETPROCADDRESS.
14337 (win32_detach): Likewise.
14338
f72f3e60
PA
143392007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14340
14341 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14342
ed50f18f
PA
143432007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14344
14345 * win32-low.c: Commit leftover changes from 2007-03-29.
14346
0c2ead7e
DJ
143472007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14348
14349 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14350 fields short instead of int. Add explicit padding.
14351 (i387_cache_to_fsave): Remove unnecessary casts.
14352 (i387_fsave_to_cache): Doc fix.
14353 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14354
73725ff3
DJ
143552007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14356
14357 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14358 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14359
d99f33d8
PA
143602007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14361
14362 * configure.srv (arm*-*-mingw32ce*): Move near the other
14363 arm targets.
14364
68070c10
PA
143652007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14366
2482afc6 14367 * configure.ac: Add errno checking.
68070c10
PA
14368 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14369 sys/file.h and malloc.h.
14370 (AC_CHECK_DECLS): Add perror.
14371 (srv_mingwce): Handle.
2482afc6 14372 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
14373 win32-i386-low.o to srv_tgtobj.
14374 (i[34567]86-*-mingw*): Likewise.
14375 (arm*-*-mingw32ce*): Add case.
14376 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14377 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14378 [__MINGW32CE__] (strerror): New function.
14379 [__MINGW32CE__] (errno): Define to GetLastError.
14380 [__MINGW32CE__] (COUNTOF): New macro.
14381 (remote_open): Remove extra close call.
14382 * mem-break.c (delete_breakpoint_at): New function.
14383 * mem-break.h (delete_breakpoint_at): Declare.
14384 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14385 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14386 [USE_WIN32API] (read, write): Add char* casts.
14387 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14388 * server.h: Include wincecompat.h on Windows CE.
14389 [HAVE_ERRNO_H]: Check.
14390 (perror): Declare if not declared.
14391 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14392 (perror_with_name): Remove errno declaration.
14393 * wincecompat.h: New.
14394 * wincecompat.c: New.
14395 * win32-low.h: New.
14396 * win32-arm-low.c: New.
14397 * win32-i386-low.c: New.
14398 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14399 (OUTMSG2): Make it safe.
14400 (_T): New macro.
14401 (COUNTOF): New macro.
14402 (NUM_REGS): Get it from the low target.
14403 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14404 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14405 (thread_rec): Let low target handle debug registers.
14406 (child_add_thread): Likewise.
14407 (child_init_thread_list): Likewise.
14408 (continue_one_thread): Likewise.
14409 (regptr): New.
14410 (do_child_fetch_inferior_registers): Move to ...
14411 * win32-i386-low.c: ... here, and rename to ...
14412 (do_fetch_inferior_registers): ... this.
889bf7c5 14413 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
14414 Go through the low target.
14415 (do_child_store_inferior_registers): Use regptr.
14416 (strwinerror): New function.
14417 (win32_create_inferior): Handle Windows CE.
14418 Use strwinerror instead of strerror on Windows error
14419 codes. Add program to the error output.
14420 Don't close the main thread handle on Windows CE.
14421 (win32_attach): Use coredll.dll on Windows CE.
14422 (win32_kill): Close current process and current
14423 thread handles.
14424 (win32_detach): Use coredll.dll on Windows CE.
14425 (win32_resume): Let low target handle debug registers, and
14426 step request.
14427 (handle_exception): Add/Remove initial breakpoint. Avoid
14428 non-existant WSTOPSIG on Windows CE.
14429 (win32_read_inferior_memory): Cast to remove warning.
14430 (win32_arch_string): Go through the low target.
14431 (initialize_low): Call set_breakpoint_data with the low
14432 target's breakpoint.
14433 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14434 FOP_REGNUM, mappings): Move to ...
14435 * win32-i386-low.c: ... here.
14436 * win32-low.c (win32_thread_info): Move to ...
14437 * win32-low.h: ... here.
14438 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14439 win32-arm-low.c and wincecompat.c.
14440 (all:): Add $EXEEXT.
14441 (install-only:): Likewise.
14442 (gdbserver:): Likewise.
14443 (gdbreplay:): Likewise.
14444 * config.in: Regenerate.
14445 * configure: Regenerate.
14446
41093d81
PA
144472007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14448
14449 * win32-low.c: Rename typedef thread_info to
14450 win32_thread_info throughout.
14451
544afa54
PA
144522007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14453
14454 * win32-i386-low.c: Rename to ...
14455 * win32-low.c: ... this.
14456 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14457 * Makefile.in: Likewise.
14458
bce7165d
PA
144592007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14460
14461 * remote-utils.c (monitor_output): Constify msg parameter.
14462 * server.h (monitor_output): Likewise.
14463 * win32-i386-low.c (handle_output_debug_string): New.
14464 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14465 handle_output_debug_string.
14466 (get_child_debug_event): Likewise.
14467
506c7aa0
DJ
144682007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14469
14470 * server.c (main): Correct strtoul check.
14471
42c81e2a
DJ
144722007-03-27 Jon Ringle <jon@ringle.org>
14473
14474 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14475
9453113a
DJ
144762007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14477
14478 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14479
64a69107
DJ
144802007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14481
14482 * terminal.h: Check HAVE_SGTTY_H.
14483
144842007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
14485
14486 * remote-utils.c (remote_open): Print out the assigned port number.
14487
c74d0ad8
DJ
144882007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14489
14490 * remote-utils.c (monitor_output): New function.
14491 * server.c (debug_threads): Define here.
14492 (monitor_show_help): New function.
14493 (handle_query): Handle qRcmd.
14494 (main): Do not handle 'd' packet.
14495 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14496 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14497 of debug_threads.
14498
de7c3b4a
PA
144992007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14500
14501 * Makefile.in (EXEEXT): New.
14502 (clean): Use $(EXEEXT).
14503
ef57601b
PA
145042007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14505
14506 * target.h (target_ops): Rename send_signal to request_interrupt,
14507 and remove enum target_signal parameter.
14508 * linux-low.c (linux_request_interrupt): Rename from
14509 linux_send_signal, and always send SIGINT.
14510 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14511 and always send SIGINT.
14512 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14513 of send_signal.
14514 (input_interrupt): Likewise.
14515
820f2bda
PA
145162007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14517
14518 * server.c (get_features_xml): Check if target implemented
14519 arch_string.
14520 * win32-i386-low.c (win32_arch_string): New.
14521 (win32_target_ops): Add win32_arch_string as arch_string member.
14522
ab39bf24
UW
145232007-02-22 Markus Deuling <deuling@de.ibm.com>
14524
14525 * spu-low.c (spu_arch_string): New.
14526 (spu_target_ops): Add spu_arch_string.
14527
61ff6e04
DJ
145282007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14529
14530 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14531 * configure.ac: Do not check for terminal.h.
14532 * configure, config.in: Regenerated.
14533
fb1e4ffc
DJ
145342007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14535
14536 * Makefile.in (OBS): Add $(XML_BUILTIN).
14537 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14538 (clean): Update.
14539 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14540 (arm-with-iwmmxt.c): New.
14541 * config.in, configure: Regenerate.
14542 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14543 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14544 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14545 (arm*-*-linux*): Add iWMMXt and regset support.
14546 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14547 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14548 (arm_store_wmmxregset, target_regsets): New.
14549 * server.c (get_features_xml): Take annex argument. Check builtin
14550 XML documents.
14551 (handle_query): Handle multiple annexes.
14552
0f48aa01
DJ
145532007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14554
14555 * remote-utils.c [USE_WIN32API] (read, write): Define.
14556 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14557 write.
14558
23181151
DJ
145592007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14560
14561 * linux-i386-low.c (the_low_target): Set arch_string.
14562 * linux-x86-64-low.c (the_low_target): Likewise.
14563 * linux-low.c (linux_arch_string): New.
14564 (linux_target_ops): Add it.
14565 * linux-low.h (struct linux_target_ops): Add arch_string.
14566 * server.c (write_qxfer_response): Use const void * for DATA.
14567 (get_features_xml): New.
14568 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14569 * target.h (struct target_ops): Add arch_string method.
14570
9d606399
DJ
145712007-01-03 Denis Pilat <denis.pilat@st.com>
14572 Daniel Jacobowitz <dan@codesourcery.com>
14573
14574 * linux-low.c (linux_kill): Handle being called with no threads.
14575 * win32-i386-low.c (win32_kill): Likewise.
14576 (get_child_debug_event): Clear current_process_handle.
14577
145782006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
14579 Daniel Jacobowitz <dan@codesourcery.com>
14580
14581 * remote-utils.c (remote_open): Check the type of specified
14582 serial port devices before opening them.
14583 * server.c (main): Kill the inferior if an error occurs during
14584 the first remote_open.
14585
a5e13d24
DJ
145862006-12-05 Markus Deuling <deuling@de.ibm.com>
14587
14588 * README: Update supported targets.
14589
186947f7
DJ
145902006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14591
14592 * Makefile.in (clean): Remove reg-mips64.c.
14593 (reg-mips64.c, reg-mips64.o): New rules.
14594 * configure.srv: Handle mips64. Include regset support for mips.
14595 * linux-mips-low.c (union mips_register): New.
14596 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14597 (mips_breakpoint, mips_breakpoint_at): Use int.
14598 (mips_collect_register, mips_supply_register)
14599 (mips_collect_register_32bit, mips_supply_register_32bit)
14600 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14601 (mips_store_fpregset, target_regsets): New.
14602 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14603
a13e2c95
UW
146042006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14605
14606 * configure.srv: Add target "spu*-*-*".
14607 * Makefile.in (clean): Remove reg-spu.c.
14608 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14609 * spu-low.c: New file.
14610
cb7283db
DJ
146112006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14612
14613 * configure.ac: Correct td_thr_tls_get_addr test.
14614 * configure: Regenerated.
14615
89be2091
DJ
146162006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14617
14618 * linux-low.c (linux_wait_for_event): Reformat. Use the
14619 pass_signals array.
14620 * remote-utils.c (decode_address_to_semicolon): New.
14621 * server.c (pass_signals, handle_general_set): New.
14622 (handle_query): Mention QPassSignals for qSupported.
14623 (main): Call handle_general_set.
14624 * server.h (pass_signals, decode_address_to_semicolon): New.
14625
000ef4f0
DJ
146262006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14627
14628 * server.c (handle_query): Correct error handling for read_auxv.
14629
b7149293
UW
146302005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14631
14632 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14633 and srv_linux_thread_db to yes.
14634 * linux-s390-low.c (s390_fill_gregset): New function.
14635 (target_regsets): Define data structure.
14636
dae5f5cf
DJ
146372006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14638
14639 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14640 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14641 * config.in, configure: Regenerated.
14642 * inferiors.c (gdb_id_to_thread): New function.
14643 (gdb_id_to_thread_id): Use it.
14644 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14645 * linux-low.h (struct process_info): Add th member.
14646 (thread_db_get_tls_address): New prototype.
14647 * remote-utils.c (decode_address): Make non-static.
14648 * server.c (handle_query): Handle qGetTLSAddr.
14649 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14650 * target.h (struct target_ops): Add get_tls_address.
14651 * thread-db.c (maybe_attach_thread): Save the thread handle.
14652 (thread_db_get_tls_address): New.
14653
32ca6d61
DJ
146542006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14655
14656 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14657 (linux_resume_one_process): Take a siginfo_t *. Update all
14658 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14659 (struct pending_signals): Add a siginfo_t.
14660 (linux_wait_for_process): Always set last_status.
14661 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14662 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14663 * linux-low.h (struct process_info): Add last_status.
14664
5ffff7c1
DJ
146652006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14666
14667 * remote-utils.c (try_rle): New function.
14668 (putpkt_binary): Use it.
14669
8695c747
DJ
146702006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14671
14672 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14673 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14674 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14675 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14676 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14677 point registers.
14678
290fadea
RS
146792006-08-08 Richard Sandiford <richard@codesourcery.com>
14680
14681 * server.c (terminal_fd): New variable.
14682 (old_foreground_pgrp): Likewise.
14683 (restore_old_foreground_pgrp): New function.
14684 (start_inferior): Record the terminal file descriptor in terminal_fd
14685 and its original foreground group in old_foreground_pgrp. Register
14686 restore_old_foreground_pgrp with atexit().
14687
9f2e1e63
DJ
146882006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14689
14690 * server.c (handle_query): Correct qPart to qXfer.
14691
b80864fb
DJ
146922006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14693
14694 * configure.ac: Check for more headers which are missing on
14695 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14696 * configure.srv: Add Cygwin and mingw32.
14697 * remote-utils.c: Don't include headers unconditionally which
14698 are missing on mingw32. Include <winsock.h> for mingw32.
14699 (remote_open): Adjust for mingw32 support. Flush
14700 standard error after writing to it.
14701 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14702 (unblock_async_io, enable_async_io, disable_async_io)
14703 (readchar, getpkt): Update for Winsock support.
14704 (prepare_resume_reply): Expect a protocol signal number.
14705 * server.c: Disable <sys/wait.h> on mingw32.
14706 (start_inferior): Adjust for mingw32 support. Flush
14707 standard error after writing to it.
14708 (attach_inferior): Likewise. Use protocol signal
14709 numbers.
14710 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14711 and names.
14712 * win32-i386-low.c: New file.
14713 * Makefile.in (XM_CLIBS): Set.
14714 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14715 (win32-i386-low.o): New dependency rule.
14716 * linux-low.c (linux_wait): Use target signal numbers.
14717 * target.h (struct target_ops): Doc fix.
14718 * server.h (target_signal_to_name): New prototype.
14719 * gdbreplay.c: Don't include headers unconditionally which
14720 are missing on mingw32. Include <winsock.h> for mingw32.
14721 (remote_close, remote_open): Adjust for Winsock support.
14722 * configure, config.in: Regenerated.
14723
0876f84a
DJ
147242006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14725
14726 * server.c (decode_xfer_read, write_qxfer_response): New.
14727 (handle_query): Take a packet length argument. Handle
14728 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14729 the qSupported response.
14730 (main): Update call to handle_query.
14731
01f9e8fa
DJ
147322006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14733
14734 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14735 (putpkt_binary): Renamed from putpkt and adjusted for binary
14736 data.
14737 (putpkt): New wrapper for putpkt_binary.
14738 (readchar): Don't mask off the high bit.
14739 (decode_X_packet): New function.
14740 * server.c (main): Call putpkt_binary if a handler sets the packet
14741 length. Save the length of the incoming packet. Handle 'X'.
14742 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14743
be2a5f71
DJ
147442006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14745
14746 * server.c (handle_query): Handle qSupported.
14747
ea025f5f
DJ
147482006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14749
14750 * remote-utils.c (all_symbols_looked_up): New variable.
14751 (look_up_one_symbol): Check it.
14752 * server.h (look_up_one_symbol): New declaration.
14753 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14754
9308fc88
DJ
147552006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14756
14757 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 14758 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
14759 (PTRACE_GET_THREAD_AREA): Define.
14760 (ps_get_thread_area): New function.
14761
52fb6437
NS
147622006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14763
14764 * configure.srv (m68k*-*-uclinux*): New target.
14765 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14766 (linux_resume_one_process): Remove extraneous cast.
14767 (linux_read_offsets): New.
14768 (linux_target_op): Add linux_read_offsets on mmuless systems.
14769 * server.c (handle_query): Add qOffsets logic.
14770 * target.h (struct target_ops): Add read_offsets.
14771
21b0f40c
DJ
147722006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14773
14774 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14775 (PTRACE_GET_THREAD_AREA): Define.
14776 (ps_get_thread_area): New function.
14777 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14778 (linux-x86-64-low.o): Update.
14779
0050a760
DJ
147802006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14781
14782 * configure.ac: Remove checks for prfpregset_t.
14783 * gdb_proc_service.h: New file.
14784 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14785 new "gdb_proc_service.h".
14786 * proc-service.c: Likewise.
14787 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14788 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14789 * Makefile.in (gdb_proc_service_h): Updated.
14790 * configure, config.in: Regenerated.
14791
b92a518e
DJ
147922006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14793
14794 * remote-utils.c (prepare_resume_reply): Move declaration
14795 of gdb_id_from_wait to the top of the block.
14796
545587ee
DJ
147972006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14798
14799 * linux-low.c (regsets_store_inferior_registers): Read the regset
14800 from the target before filling it.
14801
9db87ebd
DJ
148022006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14803
14804 * server.c (attach_inferior): Return SIGTRAP for a successful
14805 attach.
14806
dd24457d
DJ
148072006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14808
14809 * Makefile.in (OBS): Add version.o.
14810 (STAGESTUFF): Delete.
14811 (version.o): Add dependencies.
14812 (version.c): Replace rule.
14813 (clean): Remove version.c.
14814 * server.c (gdbserver_version): New.
14815 (gdbserver_usage): Use printf.
14816 (main): Handle --version and --help.
14817 * server.h (version, host_name): Add declarations.
14818
6f0f660e
EZ
148192005-12-23 Eli Zaretskii <eliz@gnu.org>
14820
889bf7c5
PA
14821 * linux-arm-low.c:
14822 * linux-arm-low.c:
14823 * inferiors.c:
14824 * i387-fp.h:
14825 * i387-fp.c:
14826 * gdbreplay.c:
14827 * regcache.c:
14828 * proc-service.c:
14829 * mem-break.h:
14830 * mem-break.c:
14831 * linux-x86-64-low.c:
14832 * linux-sh-low.c:
14833 * linux-s390-low.c:
14834 * linux-ppc64-low.c:
14835 * linux-ppc-low.c:
14836 * linux-mips-low.c:
14837 * linux-m68k-low.c:
14838 * linux-m32r-low.c:
14839 * linux-low.h:
14840 * linux-low.c:
14841 * linux-ia64-low.c:
14842 * linux-i386-low.c:
14843 * linux-crisv32-low.c:
14844 * thread-db.c:
14845 * terminal.h:
14846 * target.h:
14847 * target.c:
14848 * server.h:
14849 * server.c:
14850 * remote-utils.c:
14851 * regcache.h:
14852 * utils.c:
14853 * Makefile.in:
14854 * configure.ac:
6f0f660e
EZ
14855 * gdbserver.1: Add (C) after Copyright. Update the FSF
14856 address.
14857
9d1fb177
DJ
148582005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14859
14860 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14861 (arm_breakpoint_at): Recognize both breakpoints.
14862 (the_low_target): Use the correct breakpoint instruction.
14863
011a70c2
DJ
148642005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14865
14866 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14867 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14868 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14869 (the_low_target): Update.
14870
7fb85e41
AS
148712005-10-25 Andreas Schwab <schwab@suse.de>
14872
14873 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14874
14875 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14876 (ia64_num_regs): Reduce to 462.
14877
3db0444b
DJ
148782005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14879
14880 * acinclude.m4: Correct quoting.
14881 * aclocal.m4: Regenerated.
14882
14883 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14884 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14885 (thread_db_init): Call thread_db_err_str.
14886 * configure.ac: Check for TD_VERSION.
14887 * config.in, configure: Regenerated.
14888
bee0189a
DJ
148892005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14890
14891 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14892
e9d25b98
DJ
148932005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14894
14895 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14896 is not available. Define HAVE_PTRACE_GETREGS if it is.
14897 * config.in, configure: Regenerated.
14898 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14899 * linux-i386-low.c, linux-m68k-low.c: Update to use
14900 HAVE_PTRACE_GETREGS.
14901 * linux-low.c (regsets_fetch_inferior_registers)
14902 (regsets_store_inferior_registers): Only return 0 if we processed
14903 GENERAL_REGS.
14904 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14905 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14906
a06660f7
DJ
149072005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14908
14909 * inferiors.c (struct thread_info): Add gdb_id.
14910 (add_thread): Add gdb_id argument.
14911 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14912 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14913 calls to add_thread.
14914 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14915 * server.c (handle_query): Use thread_to_gdb_id.
14916 (handle_v_cont, main): Use gdb_id_to_thread_id.
14917 * server.h (add_thread): Update prototype.
14918 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14919 prototypes.
14920
5a1f5858
DJ
149212005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14922
14923 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14924 left-padded registers.
14925 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14926 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14927
e122f1f5
SE
149282005-07-01 Steve Ellcey <sje@cup.hp.com>
14929
14930 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14931 * configure: Regenerate.
14932 * config.in: Regenerate.
14933 * server.h (NEED_DECLARATION_STRERROR):
14934 Replace with !HAVE_DECL_STRERROR.
14935
d592fa2f
DJ
149362005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14937
14938 * linux-low.c (linux_wait, linux_send_signal): Don't test
14939 an unsigned long variable for > 0 if it could be MAX_ULONG.
14940 * server.c (myresume): Likewise.
14941 * target.c (set_desired_inferior): Likewise.
14942
ccbd4912
MK
149432005-06-13 Mark Kettenis <kettenis@gnu.org>
14944
14945 * configure.ac: Simplify and improve check for socklen_t.
14946 * configure, config.in: Regenerate.
14947
f450004a
DJ
149482005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14949
14950 * acconfig.h: Remove.
14951 * configure.ac: Add a test for socklen_t. Use three-argument
14952 AC_DEFINE throughout.
14953 * config.in: Regenerated using autoheader 2.59.
14954 * configure: Regenerated.
14955
14956 * gdbreplay.c (socklen_t): Provide a default.
14957 (remote_open): Use socklen_t.
14958 * remote-utils.c (socklen_t): Provide a default.
14959 (remote_open): Use socklen_t.
14960 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14961 unsigned char.
14962
14963 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14964 char for buffers.
14965 * linux-low.c (linux_read_memory, linux_write_memory)
14966 (linux_read_auxv): Likewise.
14967 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14968 (check_mem_write): Likewise.
14969 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14970 Likewise.
14971 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14972 (registers_from_string, register_data): Likewise.
14973 * server.c (handle_query, main): Likewise.
14974 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14975 (decode_M_packet): Likewise.
14976 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14977 * target.h (struct target_ops): Update read_memory, write_memory,
14978 and read_auxv.
14979 (read_inferior_memory, write_inferior_memory): Update.
14980 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14981 to unsigned char *.
14982 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14983 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14984 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14985 linux-s390-low.c, linux-sh-low.c: Update for changes in
14986 read_inferior_memory and the_low_target->breakpoint.
14987
eee84df1
DJ
149882005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14989
14990 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14991 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14992 * configure.srv: Add powerpc64-*-linux*.
14993 * linux-ppc64-low.c: New file.
14994
45b134e5
OF
149952005-05-23 Orjan Friberg <orjanf@axis.com>
14996
14997 * linux-cris-low.c: New file with support for CRIS.
14998 * linux-crisv32-low.c: Ditto for CRISv32.
14999 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15000 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 15001 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
15002 reg-crisv32.o, and reg-crisv32.c to make rules.
15003 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15004 recognized targets.
15005
48d93c75
UW
150062005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15007
15008 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15009 of sizeof (PTRACE_XFER_TYPE).
15010 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15011
e013ee27
OF
150122005-05-12 Orjan Friberg <orjanf@axis.com>
15013
889bf7c5 15014 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
15015 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15016 pointers for hardware watchpoint support.
15017 * linux-low.h (struct linux_target_ops): Ditto.
15018 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15019 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15020 to linux_target_ops.
15021 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15022 reply packet.
15023 * server.c (main): Recognize 'Z' and 'z' packets.
15024
b0ded00b
UW
150252005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15026
15027 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15028 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15029 (the_low_target): Add new members.
15030
8643e2ad
DJ
150312005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15032
15033 * proc-service.c (ps_lgetregs): Search all_processes instead of
15034 all_threads.
15035
fc620387
DJ
150362005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15037
15038 * server.c (start_inferior): Change return type to int.
15039 (attach_inferior): Change sigptr to int *.
15040 (handle_v_cont, handle_v_requests): Change signal to int *.
15041 (main): Change signal to int.
15042
150432005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
15044
15045 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15046 * configure.srv: Add m32r*-*-linux*.
15047 * linux-m32r-low.c: New file.
15048
e0e76420
DJ
150492005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15050
15051 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15052
a1928bad
DJ
150532005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15054
15055 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15056 Take unsigned long arguments for PIDs.
15057 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15058 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15059 (wait_for_sigstop, linux_resume_one_process)
15060 (regsets_fetch_inferior_registers, linux_send_signal)
15061 (linux_read_auxv): Likewise. Update the types of variables holding
15062 PIDs. Update format string specifiers.
15063 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15064 * remote-utils.c (prepare_resume_reply): Likewise.
15065 * server.c (cont_thread, general_thread, step_thread)
15066 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15067 unsigned long.
15068 (handle_query): Update format specifiers.
15069 (handle_v_cont, main): Use strtoul for thread IDs.
15070 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15071 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15072 (general_thread, step_thread, thread_from_wait)
15073 (old_thread_from_wait): Update.
15074 * target.h (struct thread_resume): Use unsigned long for THREAD.
15075 (struct target_ops): Use unsigned long for arguments to attach and
15076 thread_alive.
15077
dcdb98d2
DJ
150782005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15079
15080 * acinclude.m4: Include bfd/bfd.m4 directly.
15081 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15082 <agriffis@toolchain.org>.
15083 * aclocal.m4, configure: Regenerated.
15084
bec39cab
AC
150852005-01-07 Andrew Cagney <cagney@gnu.org>
15086
15087 * configure.ac: Rename configure.in, require autoconf 2.59.
15088 * configure: Re-generate.
15089
434c4c77
DJ
150902004-12-08 Daniel Jacobowitz <dan@debian.org>
15091
15092 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15093 LIBS when finished.
15094 * aclocal.m4: Regenerated.
15095 * configure: Regenerated.
15096
db1d3e1b
AS
150972004-11-21 Andreas Schwab <schwab@suse.de>
15098
15099 * linux-m68k-low.c (m68k_num_gregs): Define.
15100 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15101 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15102 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15103 (m68k_breakpoint_at): New. Add to the_low_target.
15104
15105 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15106 srv_linux_thread_db to yes.
15107
43360365
JB
151082004-10-20 Joel Brobecker <brobecker@gnat.com>
15109
15110 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15111 (ARCH_SET_FS): Likewise.
15112 (ARCH_GET_FS): Likewise.
15113 (ARCH_GET_GS): Likewise.
15114
fd500816
DJ
151152004-10-16 Daniel Jacobowitz <dan@debian.org>
15116
15117 * linux-i386-low.c (ps_get_thread_area): New.
15118 * linux-x86-64-low.c (ps_get_thread_area): New.
15119 * linux-low.c: Include <sys/syscall.h>.
15120 (linux_kill_one_process): Don't kill the first thread here.
15121 (linux_kill): Kill the first thread here.
15122 (kill_lwp): New function.
15123 (send_sigstop, linux_send_signal): Use it.
15124 * proc-service.c: Clean up #ifdefs.
15125 (fpregset_info): Delete.
15126 (ps_lgetregs): Update and enable implementation.
15127 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15128 implementations.
15129 * remote-utils.c (struct sym_cache, symbol_cache): New.
15130 (input_interrupt): Print a clearer message.
15131 (async_io_enabled): New variable.
15132 (enable_async_io, disable_async_io): Use it. Update comments.
15133 (look_up_one_symbol): Use the symbol cache.
15134 * thread-db.c (thread_db_look_up_symbols): New function.
15135 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15136
f6de3c42
DJ
151372004-10-16 Daniel Jacobowitz <dan@debian.org>
15138
15139 * configure.in: Test for -rdynamic.
15140 * configure: Regenerated.
15141 * Makefile (INTERNAL_LDFLAGS): New.
15142 (gdbserver, gdbreplay): Use it.
15143
2c0fc042
AC
151442004-09-02 Andrew Cagney <cagney@gnu.org>
15145
15146 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15147
075b3282
DJ
151482004-03-23 Daniel Jacobowitz <drow@mvista.com>
15149
15150 * linux-low.c (linux_wait): Clear all_processes list also.
15151
fa6a77dc
DJ
151522004-03-12 Daniel Jacobowitz <drow@mvista.com>
15153
15154 * linux-low.c: Include <errno.h>. Remove extern declaration of
15155 errno.
15156
6d782a97
DJ
151572004-03-12 Daniel Jacobowitz <drow@mvista.com>
15158
15159 * gdbreplay.c, server.h, utils.c: Update copyright years.
15160
3a7fb99b
DJ
151612004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15162
15163 * server.c (main): Print child status or termination signal from
15164 variable 'signal', not 'sig'.
15165
c3e735a6
DJ
151662004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15167
15168 * linux-low.c (linux_read_memory): Change return type to
15169 int. Check for and return error from ptrace().
15170 * target.c (read_inferior_memory): Change return type to int. Pass
15171 back return status from the_target->read_memory().
15172 * target.h (struct target_ops): Adapt *read_memory() prototype.
15173 Update comment.
15174 (read_inferior_memory): Adapt prototype.
15175 * server.c (main): Return an error packet if
15176 read_inferior_memory() returns an error.
15177
a59d1c82
DJ
151782004-03-04 Daniel Jacobowitz <drow@mvista.com>
15179
15180 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15181 Unify with other clean targets.
15182
dc3f8883
DJ
151832004-02-29 Daniel Jacobowitz <drow@mvista.com>
15184
15185 * server.c (handle_v_cont): Call set_desired_inferior.
15186
89a208da
DJ
151872004-02-29 Daniel Jacobowitz <drow@mvista.com>
15188
15189 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15190
62ea82f5
DJ
151912004-02-29 Daniel Jacobowitz <drow@mvista.com>
15192
15193 * linux-low.c (linux_wait): Unblock async I/O.
15194 (linux_resume): Block and enable async I/O.
15195 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15196 * server.h (block_async_io, unblock_async_io): Add prototypes.
15197
6910d122
DJ
151982004-02-29 Daniel Jacobowitz <drow@mvista.com>
15199
15200 * remote-utils.c (remote_open): Print a status notice after
15201 opening a TCP port.
15202 * server.c (attach_inferior): Print a status notice after
15203 attaching.
15204
152052004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
15206
15207 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15208
c89dc5d4
DJ
152092004-02-26 Daniel Jacobowitz <drow@mvista.com>
15210
15211 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15212 error packet.
15213 * server.c, target.h: Update copyright years.
15214
4b8dad4a
RM
152152004-02-25 Roland McGrath <roland@redhat.com>
15216
15217 * target.h (struct target_ops): New member `read_auxv'.
15218 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15219 * linux-low.c (linux_read_auxv): New function.
15220 (linux_target_ops): Initialize `read_auxv' member to that.
15221
d7446758
JB
152222004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15223
15224 Committed by Jim Blandy <jimb@redhat.com>.
15225
15226 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 15227 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
15228 instead of GPR_SIZE to distiguish s390 and s390x targets.
15229
5544ad89
DJ
152302004-01-31 Daniel Jacobowitz <drow@mvista.com>
15231
15232 * linux-low.c: Update copyright year.
15233 (check_removed_breakpoint): Clear pending_is_breakpoint.
15234 (linux_set_resume_request, linux_queue_one_thread)
15235 (resume_status_pending_p): New functions.
15236 (linux_continue_one_thread): Use process->resume.
15237 (linux_resume): Only resume threads if there are no pending events.
15238 * linux-low.h (struct process_info): Add resume request
15239 pointer.
15240
2a68b70e
DJ
152412004-01-30 Daniel Jacobowitz <drow@mvista.com>
15242
15243 * regcache.c (new_register_cache): Clear the allocated register
15244 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15245
64386c31
DJ
152462003-10-13 Daniel Jacobowitz <drow@mvista.com>
15247
15248 * linux-low.c (linux_resume): Take a struct thread_resume *
15249 argument.
15250 (linux_wait): Update call.
15251 (resume_ptr): New static variable.
15252 (linux_continue_one_thread): Renamed from
15253 linux_continue_one_process. Use resume_ptr.
15254 (linux_resume): Use linux_continue_one_thread.
15255 * server.c (handle_v_cont, handle_v_requests): New functions.
15256 (myresume): New function.
15257 (main): Handle 'v' case.
15258 * target.h (struct thread_resume): New type.
15259 (struct target_ops): Change argument of "resume" to struct
15260 thread_resume *.
15261 (myresume): Delete macro.
15262
c938e9b0
L
152632003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15264
15265 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15266 (uninstall): Support DESTDIR.
15267
7f313d07
BC
15268Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15269
15270 * configure.srv: Add xscale*linux copy of arm*linux entry.
15271
3b2fc2ea
DJ
152722003-07-24 Daniel Jacobowitz <drow@mvista.com>
15273
15274 * linux-arm-low.c (arm_reinsert_addr): New function.
15275 (the_low_target): Add arm_reinsert_addr.
15276
1c0a559e
MK
152772003-07-08 Mark Kettenis <kettenis@gnu.org>
15278
15279 * mem-break.c: Remove whitespace at end of file.
15280
43d5792c
DJ
152812003-06-28 Daniel Jacobowitz <drow@mvista.com>
15282
15283 * configure.in: Check whether we need to prototype strerror.
15284 * server.h: Optionally prototype strerror.
15285 * gdbreplay.c (perror_with_name): Use strerror.
15286 * linux-low.c (linux_attach_lwp): Use strerror.
15287 * utils.c (perror_with_name): Use strerror.
15288 * config.in, configure: Regenerated.
15289
c8a86edf
DJ
152902003-06-28 Daniel Jacobowitz <drow@mvista.com>
15291
15292 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15293 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15294
73d37363
DJ
152952003-06-20 Daniel Jacobowitz <drow@mvista.com>
15296
15297 * Makefile.in (SFILES): Update.
15298 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15299 low-sun3.c: Remove files.
15300
6ad8ae5c
DJ
153012003-06-17 Daniel Jacobowitz <drow@mvista.com>
15302
15303 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15304 (linux_detach_one_process, linux_detach): New functions.
15305 (linux_target_ops): Add linux_detach.
15306 * server.c (main): Handle 'D' packet.
15307 * target.h (struct target_ops): Add "detach" member.
15308 (detach_inferior): Define.
15309
1581182a
MK
153102003-06-13 Mark Kettenis <kettenis@gnu.org>
15311
15312 From Kelley Cook <kelleycook@wideopenwest.com>:
15313 * configure.srv: Accept i[34567]86 variants.
15314
e5379b03
DJ
153152003-06-05 Daniel Jacobowitz <drow@mvista.com>
15316
15317 * linux-low.c (linux_wait_for_event): Correct comment typos.
15318 (linux_resume_one_process): Call check_removed_breakpoint.
15319 (linux_send_signal): New function.
15320 (linux_target_ops): Add linux_send_signal.
15321 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15322 of kill.
15323 * target.h (struct target_ops): Add send_signal.
15324
2ff29de4
JB
153252003-05-29 Jim Blandy <jimb@redhat.com>
15326
15327 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15328 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15329 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15330 away part of the register's value.
15331
254787d4
DJ
153322003-03-26 Daniel Jacobowitz <drow@mvista.com>
15333
15334 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15335 (linux_wait_for_event, linux_init_signals): Likewise.
15336
94e10508
DJ
153372003-03-17 Daniel Jacobowitz <drow@mvista.com>
15338
15339 * configure.in: Check for stdlib.h.
15340 * configure: Regenerated.
15341 * config.in: Regenerated.
15342
4c0711e0
DJ
153432003-01-04 Andreas Schwab <schwab@suse.de>
15344
15345 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15346
ef66e766
AC
153472003-01-02 Andrew Cagney <ac131313@redhat.com>
15348
15349 * Makefile.in: Remove obsolete code.
15350
a1358604
DJ
153512002-11-20 Daniel Jacobowitz <drow@mvista.com>
15352
15353 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15354 defined(PT_FPR0_HI).
15355
23ce3b1c
DJ
153562002-11-17 Stuart Hughes <seh@zee2.com>
15357
15358 * linux-arm-low.c (arm_num_regs): Increase.
15359 (arm_regmap): Include status register.
15360
153612002-11-17 Daniel Jacobowitz <drow@mvista.com>
15362
15363 * linux-low.c (register_addr): Remove incorrect -1 check.
15364
a9fa9f7d
DJ
153652002-08-29 Daniel Jacobowitz <drow@mvista.com>
15366
15367 * linux-low.c (linux_create_inferior): Call setpgid. Return
15368 the new PID.
15369 (unstopped_p, linux_signal_pid): Remove.
15370 (linux_target_ops): Remove linux_signal_pid.
15371 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15372 global instead of target method.
15373 * target.h (struct target_ops): Remove signal_pid. Update comment
15374 for create_inferior.
15375 * server.c (signal_pid): New variable.
15376 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 15377 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
15378 (attach_inferior): Set signal_pid.
15379
17574093
DJ
153802002-08-23 Daniel Jacobowitz <drow@mvista.com>
15381
15382 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15383
153842002-08-20 Jim Blandy <jimb@redhat.com>
15385
15386 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15387 default for this.
15388
153892002-08-01 Andrew Cagney <cagney@redhat.com>
15390
15391 * Makefile.in: Make chill references obsolete.
15392
153932002-07-24 Kevin Buettner <kevinb@redhat.com>
15394
15395 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15396 * configure: Regenerate.
15397 * config.in: Regenerate.
15398
153992002-07-09 David O'Brien <obrien@FreeBSD.org>
15400
15401 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15402 (perror_with_name, remote_close, remote_open, expect, play): Static.
15403
154042002-07-04 Michal Ludvig <mludvig@suse.cz>
15405
4b8dad4a 15406 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
15407 byte offsets instead of an array of indexes.
15408 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15409
154102002-06-13 Daniel Jacobowitz <drow@mvista.com>
15411
15412 * regcache.c: Add comment.
15413
154142002-06-11 Daniel Jacobowitz <drow@mvista.com>
15415
15416 * thread-db.c: New file.
15417 * proc-service.c: New file.
15418 * acinclude.m4: New file.
15419 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15420 proc-service.o, and thread-db.o.
15421 (linux-low.o): Add USE_THREAD_DB.
15422 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15423 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15424 * aclocal.m4: Regenerated.
15425 * config.in: Regenerated.
15426 * configure: Regenerated.
15427 * configure.in: Check for proc_service.h, sys/procfs.h,
15428 thread_db.h, and linux/elf.h headrs.
15429 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15430 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15431 Check for -lthread_db and thread support.
15432 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15433 PowerPC, and SuperH.
15434 * i387-fp.c: Constify arguments.
15435 * i387-fp.h: Likewise.
15436 * inferiors.c: (struct thread_info): Renamed from
15437 `struct inferior_info'. Remove PID member. Use generic inferior
15438 list header. All uses updated.
15439 (inferiors, signal_pid): Removed.
15440 (all_threads): New variable.
15441 (get_thread): Define.
15442 (add_inferior_to_list): New function.
15443 (for_each_inferior): New function.
15444 (change_inferior_id): New function.
15445 (add_inferior): Removed.
15446 (remove_inferior): New function.
15447 (add_thread): New function.
15448 (free_one_thread): New function.
15449 (remove_thread): New function.
15450 (clear_inferiors): Use for_each_inferior and free_one_thread.
15451 (find_inferior): New function.
15452 (find_inferior_id): New function.
15453 (inferior_target_data): Update argument type.
15454 (set_inferior_target_data): Likewise.
15455 (inferior_regcache_data): Likewise.
15456 (set_inferior_regcache_data): Likewise.
15457 * linux-low.c (linux_bp_reinsert): Remove.
15458 (all_processes, stopping_threads, using_thrads)
15459 (struct pending_signals, debug_threads, pid_of): New.
15460 (inferior_pid): Replace with macro.
15461 (struct inferior_linux_data): Remove.
15462 (get_stop_pc, add_process): New functions.
15463 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15464 Use add_process and add_thread.
15465 (linux_attach_lwp): New function, based on old linux_attach. Use
15466 add_process and add_thread. Set stop_expected for new threads.
15467 (linux_attach): New function.
15468 (linux_kill_one_process): New function.
15469 (linux_kill): Kill all LWPs.
15470 (linux_thread_alive): Use find_inferior_id.
15471 (check_removed_breakpoints, status_pending_p): New functions.
15472 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15473 Update. Use WNOHANG. Wait for cloned processes also. Update process
15474 struct for the found process.
15475 (linux_wait_for_event): New function.
15476 (linux_wait): Use it. Support LWPs.
15477 (send_sigstop, wait_for_sigstop, stop_all_processes)
15478 (linux_resume_one_process, linux_continue_one_process): New functions.
15479 (linux_resume): Support LWPs.
15480 (REGISTER_RAW_SIZE): Remove.
15481 (fetch_register): Use register_size instead. Call supply_register.
15482 (usr_store_inferior_registers): Likewise. Call collect_register.
15483 Fix recursive case.
15484 (regsets_fetch_inferior_registers): Improve error message.
15485 (regsets_store_inferior_registers): Add debugging.
15486 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15487 (unstopped_p, linux_signal_pid): New functions.
15488 (linux_target_ops): Add linux_signal_pid.
15489 (linux_init_signals): New function.
15490 (initialize_low): Call it. Initialize using_threads.
15491 * regcache.c (inferior_regcache_data): Add valid
15492 flag.
15493 (get_regcache): Fetch registers lazily. Add fetch argument
15494 and update all callers.
15495 (regcache_invalidate_one, regcache_invalidate): New
15496 functions.
15497 (new_register_cache): Renamed from create_register_cache.
15498 Return the new regcache.
15499 (free_register_cache): Change argument to a void *.
15500 (registers_to_string, registers_from_string): Call get_regcache
15501 with fetch flag set.
15502 (register_data): Make static. Pass fetch flag to get_regcache.
15503 (supply_register): Call get_regcache with fetch flag clear.
15504 (collect_register): Call get_regcache with fetch flag set.
15505 (collect_register_as_string): New function.
15506 * regcache.h: Update.
15507 * remote-utils.c (putpkt): Flush after debug output and use
15508 stderr.
15509 Handle input interrupts while waiting for an ACK.
15510 (input_interrupt): Use signal_pid method.
15511 (getpkt): Flush after debug output and use stderr.
15512 (outreg): Use collect_register_as_string.
15513 (new_thread_notify, dead_thread_notify): New functions.
15514 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15515 and general_thread.
15516 (look_up_one_symbol): Flush after debug output.
15517 * server.c (step_thread, server_waiting): New variables.
15518 (start_inferior): Don't use signal_pid. Update call to mywait.
15519 (attach_inferior): Update call to mywait.
15520 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15521 (main): Don't fetch/store registers explicitly. Use
15522 set_desired_inferior. Support proposed ``Hs'' packet. Update
15523 calls to mywait.
15524 * server.h: Update.
15525 (struct inferior_list, struct_inferior_list_entry): New.
15526 * target.c (set_desired_inferior): New.
15527 (write_inferior_memory): Constify.
15528 (mywait): New function.
15529 * target.h: Update.
15530 (struct target_ops): New signal_pid method.
15531 (mywait): Removed macro, added prototype.
15532
15533 * linux-low.h (regset_func): Removed.
15534 (regset_fill_func, regset_store_func): New.
15535 (enum regset_type): New.
15536 (struct regset_info): Add type field. Use new operation types.
15537 (struct linux_target_ops): stop_pc renamed to get_pc.
15538 Add decr_pc_after_break and breakpoint_at.
15539 (get_process, get_thread_proess, get_process_thread)
15540 (strut process_info, all_processes, linux_attach_lwp)
15541 (thread_db_init): New.
15542
15543 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15544 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15545 (the_low_target): Add new members.
15546 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15547 (i386_store_fpxregset): Constify.
15548 (target_regsets): Add new kind identifier.
15549 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15550 (i386_set_pc): Add debugging.
15551 (i386_breakpoint_at): New function.
15552 (the_low_target): Add new members.
15553 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15554 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15555 (mips_breakpoint_at): New.
15556 (the_low_target): Add new members.
15557 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15558 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15559 (the_low_target): Add new members.
15560 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15561 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15562 (the_low_target): Add new members.
15563 * linux-x86-64-low.c (target_regsets): Add new kind
15564 identifier.
15565
155662002-05-15 Daniel Jacobowitz <drow@mvista.com>
15567
15568 From Martin Pool <mbp@samba.org>:
15569 * server.c (gdbserver_usage): New function.
15570 (main): Call it.
15571
155722002-05-14 Daniel Jacobowitz <drow@mvista.com>
15573
15574 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15575 stop_at -> stop_pc.
15576
155772002-05-04 Andrew Cagney <ac131313@redhat.com>
15578
15579 * Makefile.in: Remove obsolete code.
15580
155812002-04-24 Michal Ludvig <mludvig@suse.cz>
15582
15583 * linux-low.c (regsets_fetch_inferior_registers),
15584 (regsets_store_inferior_registers): Removed cast to int from
15585 ptrace() calls.
15586 * regcache.h: Added declaration of struct inferior_info.
15587
155882002-04-20 Daniel Jacobowitz <drow@mvista.com>
15589
15590 * inferiors.c (struct inferior_info): Add regcache_data.
15591 (add_inferior): Call create_register_cache.
15592 (clear_inferiors): Call free_register_cache.
15593 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15594 * regcache.c (struct inferior_regcache_data): New.
15595 (registers): Remove.
15596 (get_regcache): New function.
15597 (create_register_cache, free_register_cache): New functions.
15598 (set_register_cache): Don't initialize the register cache here.
15599 (registers_to_string, registers_from_string, register_data): Call
15600 get_regcache.
15601 * regcache.h: Add prototypes.
15602 * server.h: Likewise.
15603
156042002-04-20 Daniel Jacobowitz <drow@mvista.com>
15605
15606 * mem-break.c: New file.
15607 * mem-break.h: New file.
15608 * Makefile.in: Add mem-break.o rule; update server.h
15609 dependencies.
15610 * inferiors.c (struct inferior_info): Add target_data
15611 member.
15612 (clear_inferiors): Free target_data member if set.
15613 (inferior_target_data, set_inferior_target_data): New functions.
15614 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15615 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15616 * linux-low.c (linux_bp_reinsert): New variable.
15617 (struct inferior_linux_data): New.
15618 (linux_create_inferior): Use set_inferior_target_data.
15619 (linux_attach): Likewise. Call add_inferior.
15620 (linux_wait_for_one_inferior): New function.
15621 (linux_wait): Call it.
15622 (linux_write_memory): Add const.
15623 (initialize_low): Call set_breakpoint_data.
15624 * linux-low.h (struct linux_target_ops): Add breakpoint
15625 handling members.
15626 * server.c (attach_inferior): Remove extra add_inferior
15627 call.
15628 * server.h: Include mem-break.h. Update inferior.c
15629 prototypes.
15630 * target.c (read_inferior_memory)
15631 (write_inferior_memory): New functions.
15632 * target.h (read_inferior_memory)
15633 (write_inferior_memory): Change macros to prototypes.
15634 (struct target_ops): Update comments. Add const to write_memory
15635 definition.
15636
156372002-04-11 Daniel Jacobowitz <drow@mvista.com>
15638
15639 * linux-low.c (usr_store_inferior_registers): Support
15640 registers which are allowed to fail to store.
15641 * linux-low.h (linux_target_ops): Likewise.
15642 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15643 (ppc_cannot_store_register): FPSCR may not be storable.
15644
156452002-04-09 Daniel Jacobowitz <drow@mvista.com>
15646
15647 * server.h: Include <string.h> if HAVE_STRING_H.
15648 * ChangeLog: Correct paths in last ChangeLog entry.
15649
156502002-04-09 Daniel Jacobowitz <drow@mvista.com>
15651
15652 * linux-low.h: Remove obsolete prototypes.
15653 (struct linux_target_ops): New.
15654 (extern the_low_target): New.
15655 * linux-low.c (num_regs, regmap): Remove declarations.
15656 (register_addr): Use the_low_target explicitly.
15657 (fetch_register): Likewise.
15658 (usr_fetch_inferior_registers): Likewise.
15659 (usr_store_inferior_registers): Likewise.
15660 * linux-arm-low.c (num_regs): Remove.
15661 (arm_num_regs): Define.
15662 (arm_regmap): Renamed from regmap, made static.
15663 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15664 made static.
15665 (arm_cannot_store_register): Renamed from cannot_store_register,
15666 made static.
15667 (the_low_target): New.
15668 * linux-i386-low.c (num_regs): Remove.
15669 (i386_num_regs): Define.
15670 (i386_regmap): Renamed from regmap, made static.
15671 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15672 made static.
15673 (i386_cannot_store_register): Renamed from cannot_store_register,
15674 made static.
15675 (the_low_target): New.
15676 * linux-ia64-low.c (num_regs): Remove.
15677 (ia64_num_regs): Define.
15678 (ia64_regmap): Renamed from regmap, made static.
15679 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15680 made static.
15681 (ia64_cannot_store_register): Renamed from cannot_store_register,
15682 made static.
15683 (the_low_target): New.
15684 * linux-m68k-low.c (num_regs): Remove.
15685 (m68k_num_regs): Define.
15686 (m68k_regmap): Renamed from regmap, made static.
15687 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15688 made static.
15689 (m68k_cannot_store_register): Renamed from cannot_store_register,
15690 made static.
15691 (the_low_target): New.
15692 * linux-mips-low.c (num_regs): Remove.
15693 (mips_num_regs): Define.
15694 (mips_regmap): Renamed from regmap, made static.
15695 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15696 made static.
15697 (mips_cannot_store_register): Renamed from cannot_store_register,
15698 made static.
15699 (the_low_target): New.
15700 * linux-ppc-low.c (num_regs): Remove.
15701 (ppc_num_regs): Define.
15702 (ppc_regmap): Renamed from regmap, made static.
15703 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15704 made static.
15705 (ppc_cannot_store_register): Renamed from cannot_store_register,
15706 made static.
15707 (the_low_target): New.
15708 * linux-s390-low.c (num_regs): Remove.
15709 (s390_num_regs): Define.
15710 (s390_regmap): Renamed from regmap, made static.
15711 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15712 made static.
15713 (s390_cannot_store_register): Renamed from cannot_store_register,
15714 made static.
15715 (the_low_target): New.
15716 * linux-sh-low.c (num_regs): Remove.
15717 (sh_num_regs): Define.
15718 (sh_regmap): Renamed from regmap, made static.
15719 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15720 made static.
15721 (sh_cannot_store_register): Renamed from cannot_store_register,
15722 made static.
15723 (the_low_target): New.
15724 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15725 (the_low_target): New.
15726
157272002-04-09 Daniel Jacobowitz <drow@mvista.com>
15728
15729 * Makefile.in: Add stamp-h target.
15730 * configure.in: Create stamp-h.
15731 * configure: Regenerated.
15732
157332002-04-09 Daniel Jacobowitz <drow@mvista.com>
15734
15735 * inferiors.c: New file.
15736 * target.c: New file.
15737 * target.h: New file.
15738 * Makefile.in: Add target.o and inferiors.o. Update
15739 dependencies.
15740 * linux-low.c (inferior_pid): New static variable,
15741 moved from server.c.
15742 (linux_create_inferior): Renamed from create_inferior.
15743 Call add_inferior. Return 0 on success instead of a PID.
15744 (linux_attach): Renamed from myattach.
15745 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15746 (linux_thread_alive): Renamed from mythread_alive.
15747 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15748 child dies.
15749 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15750 (regsets_store_inferior_registers): Correct error message.
15751 Add missing ``return 0''.
15752 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15753 (linux_store_registers): Renamed from store_inferior_registers.
15754 (linux_read_memory): Renamed from read_inferior_memory.
15755 (linux_write_memory): Renamed from write_inferior_memory.
15756 (linux_target_ops): New structure.
15757 (initialize_low): Call set_target_ops ().
15758 * remote-utils.c (unhexify): New function.
15759 (hexify): New function.
15760 (input_interrupt): Send signals to ``signal_pid''.
15761 * server.c (inferior_pid): Remove.
15762 (start_inferior): Update create_inferior call.
15763 (attach_inferior): Call add_inferior.
15764 (handle_query): New function.
15765 (main): Call handle_query for `q' packets.
15766 * server.h: Include "target.h". Remove obsolete prototypes.
15767 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15768
157692002-04-09 Daniel Jacobowitz <drow@mvista.com>
15770
15771 * Makefile.in: Add WARN_CFLAGS. Update configury
15772 dependencies.
15773 * configure.in: Check for <string.h>
15774 * configure: Regenerate.
15775 * config.in: Regenerate.
15776 * gdbreplay.c: Include needed system headers.
15777 (remote_open): Remove strchr prototype.
15778 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15779 * regcache.c (supply_register): Change buf argument to const void *.
15780 (supply_register_by_name): Likewise.
15781 (collect_register): Change buf argument to void *.
15782 (collect_register_by_name): Likewise.
15783 * regcache.h: Add missing prototypes.
15784 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15785 * server.c (handle_query): New function.
15786 (attached): New static variable, moved out of main.
15787 (main): Quiet longjmp clobber warnings.
15788 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15789 * utils.c (error): Remove NORETURN.
15790 (fatal): Likewise.