]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Automatic date update in version.in
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
a602f924
AH
12017-11-15 Alan Hayward <alan.hayward@arm.com>
2
3 * Makefile.in: Update arch rules.
4 * configure.srv: Explicitly mark arch/ files.
5
5616b6c3
AS
62017-11-13 Andreas Schwab <schwab@suse.de>
7
8 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
9 function.
10 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
11
d1928160
PA
122017-11-06 Pedro Alves <palves@redhat.com>
13
14 * config.in, configure: Regenerate.
15
bac608e7
SM
162017-10-27 Simon Marchi <simon.marchi@ericsson.com>
17
18 * target.c (struct thread_search): Remove.
19 (thread_search_callback): Remove.
20 (prepare_to_access_memory): Use for_each_thread instead of
21 find_inferior. Inline code from thread_search_callback.
22
eaddb425
SM
232017-10-27 Simon Marchi <simon.marchi@ericsson.com>
24
25 * server.c (struct visit_actioned_threads_data): Remove.
26 (visit_actioned_threads): Change prototype to take arguments
27 directly.
28 (resume): Use find_thread instead of find_inferior.
29
99078d34
SM
302017-10-27 Simon Marchi <simon.marchi@ericsson.com>
31
32 * server.c (queue_stop_reply_callback): Change prototype, return
33 void.
34 (find_status_pending_thread_callback): Remove.
35 (handle_status): Replace find_inferior with find_thread and
36 for_each_thread.
37
cc628f3d
AH
382017-10-25 Alan Hayward <alan.hayward@arm.com>
39
40 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
41 with REGNO.
42 (aarch64_store_gregset): Likewise.
43 (aarch64_fill_fpregset): Likewise.
44 (aarch64_store_fpregset): Likewise.
45
4d3bb80e
SM
462017-10-21 Simon Marchi <simon.marchi@ericsson.com>
47
48 * gdbthread.h (find_thread, for_each_thread): New functions.
49 * inferiors.c (thread_of_pid): Remove.
50 (find_any_thread_of_pid): Use find_thread.
51 * linux-low.c (num_lwps): Use for_each_thread.
52
7a7cdfa0
YQ
532017-10-17 Yao Qi <yao.qi@linaro.org>
54
55 * Makefile.in: Remove one rule.
56 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
57
e675d170
YQ
582017-10-17 Yao Qi <yao.qi@linaro.org>
59
60 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
61 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
62
7eb4e0f9
YQ
632017-10-17 Yao Qi <yao.qi@linaro.org>
64
65 * configure.srv: Rename arm.o with arch/arm.o.
66
60d6cfc9
YQ
672017-10-17 Yao Qi <yao.qi@linaro.org>
68
69 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
70 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
71 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
72 (arch-i386.o, arch-amd64.o): Remove rules.
73 (arch/%.o): New rule.
74 Update POSTCOMPILE and COMPILE.pre.
75 * configure.ac: Invoke AC_CONFIG_COMMANDS.
76 * configure: Re-generated.
77 * configure.srv: Replace arch-i386.o with arch/i386.o.
78 Replace arch-amd64.o with arch/amd64.o.
79
5bfda255
YQ
802017-10-16 Yao Qi <yao.qi@linaro.org>
81
82 * configure: Regenerated.
83
9c80ecd6
SM
842017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
85
86 * inferiors.h: (struct inferior_list): Remove.
87 (struct inferior_list_entry); Remove.
88 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
89 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
90 get_first_inferior): Remove.
91 (for_each_inferior, for_each_inferior_with_data, find_inferior,
92 find_inferior_id, find_inferior_in_random): Change signature.
93 * inferiors.c (all_threads): Change type to
94 std::list<thread_info *>.
95 (get_thread): Remove macro.
96 (find_inferior, find_inferior_id): Change signature, implement
97 using find_thread.
98 (find_inferior_in_random): Change signature, implement using
99 find_thread_in_random.
100 (for_each_inferior, for_each_inferior_with_data): Change
101 signature, implement using for_each_thread.
102 (add_inferior_to_list, remove_inferior): Remove.
103 (add_thread, get_first_thread, thread_of_pid,
104 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
105 (get_first_inferior, one_inferior_p, clear_inferior_list):
106 Remove.
107 (clear_inferiors, get_thread_process): Update.
108 * gdbthread.h: Include <list>.
109 (struct thread_info) <entry>: Remove field.
110 <id>: New field.
111 (all_threads): Change type to std::list<thread_info *>.
112 (get_first_inferior): Add doc.
113 (find_thread, for_each_thread, find_thread_in_random): New
114 functions.
115 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
116 * linux-arm-low.c (update_registers_callback): Update.
117 * linux-low.c (second_thread_of_pid_p): Update.
118 (kill_one_lwp_callback, linux_detach_lwp_callback,
119 delete_lwp_callback, status_pending_p_callback, same_lwp,
120 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
121 iterate_over_lwps, not_stopped_callback,
122 resume_stopped_resumed_lwps, count_events_callback,
123 select_singlestep_lwp_callback, select_event_lwp_callback,
124 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
125 suspend_and_send_sigstop_callback, wait_for_sigstop,
126 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
127 lwp_running, linux_set_resume_request, resume_status_pending_p,
128 need_step_over_p, start_step_over, linux_resume_one_thread,
129 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
130 reset_lwp_ptrace_options_callback): Update.
131 * linux-mips-low.c (update_watch_registers_callback): Update.
132 * regcache.c (regcache_invalidate_one, regcache_invalidate):
133 Update.
134 (free_register_cache_thread_one): Remove.
135 (regcache_release): Update.
136 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
137 handle_qxfer_threads_worker): Update.
138 (handle_query): Update, use list iterator.
139 (visit_actioned_threads, handle_pending_status,
140 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
141 clear_pending_status_callback, set_pending_status_callback,
142 find_status_pending_thread_callback, handle_status,
143 process_serial_event): Update.
144 * target.c (thread_search_callback): Update.
145 * thread-db.c (thread_db_get_tls_address): Update.
146 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
147 Update.
148 * win32-i386-low.c (update_debug_registers_callback): Update.
149 * win32-low.c (delete_thread_info, child_delete_thread,
150 continue_one_thread, suspend_one_thread,
151 get_child_debug_event): Adjust.
152
9179355e
SM
1532017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
154
155 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
156 * inferiors.h: Include <list>.
157 (struct process_info) <entry>: Remove field.
158 <pid>: New field.
159 (pid_of): Change macro to function.
160 (ptid_of, lwpid_of): Remove macro.
161 (all_processes): Change type to std::list<process_info *>.
162 (ALL_PROCESSES): Remove macro.
163 (for_each_process, find_process): New function.
164 * inferiors.c (all_processes): Change type to
165 std::list<process_info *>.
166 (find_thread_process): Adjust.
167 (add_process): Likewise.
168 (remove_process): Likewise.
169 (find_process_pid): Likewise.
170 (get_first_process): Likewise.
171 (started_inferior_callback): Remove.
172 (have_started_inferiors_p): Adjust.
173 (attached_inferior_callback): Remove.
174 (have_attached_inferiors_p): Adjust.
175 * linux-low.c (check_zombie_leaders): Likewise.
176 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
177 (x86_linux_update_xmltarget): Adjust.
178 * server.c (handle_query): Likewise.
179 (gdb_reattached_process): Remove.
180 (handle_status): Adjust.
181 (kill_inferior_callback): Likewise.
182 (detach_or_kill_inferior): Remove.
183 (print_started_pid): Likewise.
184 (print_attached_pid): Likewise.
185 (detach_or_kill_for_exit): Update.
186 (process_serial_event): Likewise.
187 * linux-arm-low.c (arm_new_fork): Likewise.
188
c9cb8905
SM
1892017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
190
191 * dll.h: Include <list>.
192 (struct dll_info): Add constructor.
193 <entry>: Remove field.
194 (all_dlls): Change type to std::list<dll_info>.
195 * dll.c: Include <algorithm>.
196 (get_dll): Remove macro.
197 (all_dlls): Change type to std::list<dll_info *>.
198 (free_one_dll): Remove.
199 (match_dll): Likewise.
200 (loaded_dll): Adjust.
201 (unloaded_dll): Adjust to all_dlls type change, use
202 std::find_if. Inline code from match_dll.
203 (clear_dlls): Adjust to all_dlls type change.
204 * server.c (emit_dll_description): Remove.
205 (handle_qxfer_libraries): Adjust to all_dlls type change,
206 integrate emit_dll_description's functionality.
207
04ec7890
SM
2082017-10-12 Simon Marchi <simon.marchi@ericsson.com>
209
210 * linux-low.h (struct linux_target_ops) <delete_process>: New
211 field.
212 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
213 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
214 (struct linux_target_ops): Add delete_process callback.
215 * linux-arm-low.c (arm_delete_process): New.
216 (struct linux_target_ops): Add delete_process callback.
217 * linux-bfin-low.c (struct linux_target_ops): Likewise.
218 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
219 * linux-m32r-low.c (struct linux_target_ops): Likewise.
220 * linux-mips-low.c (mips_linux_delete_process): New.
221 (struct linux_target_ops): Add delete_process callback.
222 * linux-ppc-low.c (struct linux_target_ops): Likewise.
223 * linux-s390-low.c (struct linux_target_ops): Likewise.
224 * linux-sh-low.c (struct linux_target_ops): Likewise.
225 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
226 * linux-tile-low.c (struct linux_target_ops): Likewise.
227 * linux-x86-low.c (x86_linux_delete_process): New.
228 (struct linux_target_ops): Add delete_process callback.
229 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
230
466eecee
SM
2312017-10-12 Simon Marchi <simon.marchi@ericsson.com>
232
233 * linux-aarch64-low.c (the_low_target): Add thread delete
234 callback.
235 * linux-arm-low.c (arm_delete_thread): New function.
236 (the_low_target): Add thread delete callback.
237 * linux-bfin-low.c (the_low_target): Likewise.
238 * linux-crisv32-low.c (the_low_target): Likewise.
239 * linux-low.c (delete_lwp): Invoke delete_thread callback if
240 set.
241 * linux-low.h (struct linux_target_ops) <delete_thread>: New
242 field.
243 * linux-m32r-low.c (the_low_target): Add thread delete callback.
244 * linux-mips-low.c (mips_linux_delete_thread): New function.
245 (the_low_target): Add thread delete callback.
246 * linux-ppc-low.c (the_low_target): Likewise.
247 * linux-s390-low.c (the_low_target): Likewise.
248 * linux-sh-low.c (the_low_target): Likewise.
249 * linux-tic6x-low.c (the_low_target): Likewise.
250 * linux-tile-low.c (the_low_target): Likewise.
251 * linux-x86-low.c (the_low_target): Likewise.
252 * linux-xtensa-low.c (the_low_target): Likewise.
253
b79f7801
YZ
2542017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
255
256 * win32-low.c: Include "common-inferior.h".
257
bc3b087d
SDJ
2582017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
259
260 * inferiors.c (set_inferior_cwd): New function.
261 * server.c (handle_general_set): Handle QSetWorkingDir packet.
262 (handle_query): Inform that QSetWorkingDir is supported.
263 * win32-low.c (create_process): Pass the inferior's cwd to
264 CreateProcess.
265
d092c5a2
SDJ
2662017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
267
268 * inferiors.c (current_inferior_cwd): New global variable.
269 (get_inferior_cwd): New function.
270 * inferiors.h (struct process_info) <cwd>: New field.
271
7da0a886
SDJ
2722017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
273
274 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
275 (OBS): Add gdb_tilde_expand.o.
276
289a6840
SM
2772017-10-02 Simon Marchi <simon.marchi@ericsson.com>
278
279 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
280 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
281
256642e8
PA
2822017-09-29 Pedro Alves <palves@redhat.com>
283
284 * ax.c (gdb_parse_agent_expr): Constify.
285 * ax.h (gdb_parse_agent_expr): Constify.
286 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
287 Constify.
288 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
289 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
290 * remote-utils.h (read_ptid): Constify.
291 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
292 (process_point_options, process_serial_event): Constify.
293 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
294 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
295 (cmd_qtbuffer): Constify.
296
5b9ca4d4
PA
2972017-09-29 Pedro Alves <palves@redhat.com>
298
299 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
300 fails.
301
94c207e0
PA
3022017-09-29 Pedro Alves <palves@redhat.com>
303
304 * linux-low.c (handle_extended_wait): Pass parent thread instead
305 of process to thread_db_notice_clone.
306 * linux-low.h (thread_db_notice_clone): Replace parent process
307 parameter with parent thread parameter.
308 * thread-db.c (find_one_thread): Add comment.
309 (thread_db_notice_clone): Replace parent process parameter with
310 parent thread parameter. Temporarily switch to the parent thread.
311
75352e28
SDJ
3122017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
313
314 * gdbthread.h: Include "common-gdbthread.h".
315 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
316 "if" when validating the ptid.
317 * remote-utils.c: Include "gdbthread.h".
318 (prepare_resume_reply): Use "switch_to_thread".
319 * target.c (done_accessing_memory): Likewise.
320
ad339634
AA
3212017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
322
323 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
324 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
325 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
326 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
327 s390x-gs-linux64-ipa.o to ipa_obj.
328 * linux-s390-low.c (HWCAP_S390_GS): New define.
329 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
330 New functions.
331 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
332 (s390_arch_setup): Check for guarded-storage support and choose
333 appropriate tdesc.
334 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
335 init_registers_s390x_gs_linux64.
336 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
337 enum value.
338 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
339 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
340
cc4d742f
SM
3412017-09-22 Simon Marchi <simon.marchi@ericsson.com>
342
343 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
344
f6327dcb
KB
3452017-09-21 Kevin Buettner <kevinb@redhat.com>
346
347 * linux-low.h (struct lwp_info): Add new field, thread_handle.
348 (thread_db_thread_handle): Declare.
349 * linux-low.c (linux_target_ops): Initialize thread_handle.
350 * server.c (handle_qxfer_threads_worker): Add support for
351 "handle" attribute.
352 * target.h (struct target_ops): Add new function pointer,
353 thread_handle.
354 (target_thread_handle): Define.
355 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
356 field in lwp.
357 (thread_db_thread_handle): New function.
358
86299109
KB
3592017-09-21 Kevin Buettner <kevinb@redhat.com>
360
361 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
362 * linux-low.h (thread_db_notice_clone): Declare.
363 * thread-db.c (thread_db_notice_clone): New function.
364
f557a88a
PA
3652017-09-21 Pedro Alves <palves@redhat.com>
366
367 * server.c (gdb_read_memory, handle_status, process_serial_event)
368 (handle_serial_event, handle_target_event): Adjust to
369 set_desired_thread prototype change.
370 * target.c (set_desired_thread): Remove 'use_general' parameter
371 and adjust.
372 * target.h (set_desired_thread): Remove 'use_general' parameter.
373
223ffa71
TT
3742017-09-20 Tom Tromey <tom@tromey.com>
375
376 * target.c (target_terminal::terminal_state): Define.
377 (target_terminal::init): Rename from target_terminal_init.
378 (target_terminal::inferior): Rename from
379 target_terminal_inferior.
380 (target_terminal::ours): Rename from target_terminal_ours.
381 (target_terminal::ours_for_output, target_terminal::info): New.
382
04fd3ba9
SM
3832017-09-16 Simon Marchi <simon.marchi@ericsson.com>
384
385 * server.c (accumulate_file_name_length): Remove.
386 (emit_dll_description): Adjust to std::string change.
387 (handle_qxfer_libraries): Use std::string to hold document.
388
5e187554
SM
3892017-09-16 Simon Marchi <simon.marchi@ericsson.com>
390
391 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
392 return type of xml_escape_text.
393 * server.c (emit_dll_description): Likewise.
394
1526853e
SM
3952017-09-16 Simon Marchi <simon.marchi@ericsson.com>
396
397 * server.c (captured_main): Accept argument for --selftest.
398 Update run_tests call.
399 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
400 when registering selftests.
401
c4dfafab
SDJ
4022017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
403
404 * regcache.c (get_thread_regcache): Update code to use "std::vector"
405 instead of "VEC" for "target_desc.reg_defs".
406 (regcache_cpy): Likewise.
407 (registers_to_string): Likewise.
408 (registers_from_string): Likewise.
409 (find_regno): Likewise.
410 (supply_regblock): Likewise.
411 (regcache_raw_read_unsigned): Likewise.
412 * tdesc.c (init_target_desc): Likewise.
413 (tdesc_create_reg): Likewise.
414 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
415 (struct target_desc) <reg_defs>: Convert to "std::vector".
416 (target_desc): Do not initialize "reg_defs".
417 (~target_desc): Update code to use "std::vector" instead of "VEC"
418 for "target_desc.reg_defs".
419 (operator==): Likewise.
420
124aceb4
SM
4212017-09-15 Simon Marchi <simon.marchi@ericsson.com>
422
423 * inferiors.h (thread_to_gdb_id): Remove.
424 * inferiors.c (thread_to_gdb_id): Remove.
425 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
426 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
427 lynx_store_registers, lynx_read_memory, lynx_write_memory):
428 Likewise.
429 * nto-low.c (nto_fetch_registers, nto_store_registers,
430 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
431
96cde54f
SM
4322017-09-15 Simon Marchi <simon.marchi@ericsson.com>
433
434 * inferiors.h (gdb_id_to_thread_id): Remove.
435 * inferiors.c (gdb_id_to_thread_id): Remove.
436 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
437 removal. Move pid declaration closer to where it's used.
438
e8ca139e
SM
4392017-09-15 Simon Marchi <simon.marchi@ericsson.com>
440
441 * server.c (handle_detach): New function.
442 (process_serial_event): Move code out, call handle_detach.
443
f8a4e119
SM
4442017-09-15 Simon Marchi <simon.marchi@ericsson.com>
445
446 * server.c (require_running): Rename to ...
447 (require_running_or_return): ... this ...
448 (require_running_or_break): ... and this.
449 (handle_query, process_serial_event): Adjust.
450
0eb0a407
SM
4512017-09-15 Simon Marchi <simon.marchi@ericsson.com>
452
453 * linux-low.c (linux_set_resume_request): Remove unused
454 variables.
455
785922a5
SM
4562017-09-15 Simon Marchi <simon.marchi@ericsson.com>
457
458 * server.c (first_thread_of): Remove.
459 (process_serial_event): Replace usage of first_thread_of with
460 find_any_thread_of_pid.
461 * tracepoint.c (same_process_p): Remove.
462 (gdb_agent_about_to_close): Replace usage of same_process_p with
463 find_any_thread_of_pid.
464 * linux-x86-low.c (same_process_callback): Remove.
465 (x86_arch_setup_process_callback): Replace usage of
466 same_process_callback with find_any_thread_of_pid.
467 * thread-db.c (any_thread_of): Remove.
468 (switch_to_process): Replace usage of any_thread_of with
469 find_any_thread_of_pid.
470 * inferiors.c (thread_pid_matches_callback): Remove.
471 (find_thread_process): Adjust to use find_any_thread_of_pid.
472
a059f00c
SDJ
4732017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
474
475 * regcache.c (get_thread_regcache): Guard calls to "memset"
476 with "!VEC_empty".
477
cc397f3a
SDJ
4782017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
479
480 * linux-low.c (handle_extended_wait): Use
481 "allocate_target_description" instead of "XNEW".
482 * linux-x86-low.c (initialize_low_arch): Likewise.
483
22916b07
YQ
4842017-09-05 Yao Qi <yao.qi@linaro.org>
485
486 * configure.srv (srv_i386_regobj): Remove.
487 (srv_amd64_regobj): Remove.
488 (srv_regobj): Set it to "" for x86 non-linux targets.
489 * linux-x86-tdesc.c (i386_linux_read_description):
490 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
491 (init_registers_i386): Remove the declaration.
492 (tdesc_i386): Remove the declaration.
493 (lynx_i386_arch_setup): Call i386_create_target_description.
494 * nto-x86-low.c: Likewise.
495 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
496 [!__x86_64__]: include arch/i386.h.
497 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
498
38602d55
YQ
4992017-09-05 Yao Qi <yao.qi@linaro.org>
500
501 * configure.srv (srv_amd64_linux_xmlfiles): Remove
502 i386/amd64-XXX-linux from it.
503
44b886ff
YQ
5042017-09-05 Yao Qi <yao.qi@linaro.org>
505
506 * configure.srv: Empty srv_amd64_linux_regobj if $development is
507 false.
508 (ipa_amd64_linux_regobj): Remove.
509 (ipa_x32_linux_regobj): Remove.
510
b4570e4b
YQ
5112017-09-05 Yao Qi <yao.qi@linaro.org>
512
513 * Makefile.in (arch-amd64.o): New rule.
514 * configure.srv: Append arch-amd64.o.
515 * linux-amd64-ipa.c: Include common/x86-xstate.h.
516 (get_ipa_tdesc): Call amd64_linux_read_description.
517 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
518 and init_registers_amd64_XXX.
519 * linux-x86-low.c (x86_linux_read_description): Call
520 amd64_linux_read_description.
521 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
522 (initialize_low_arch): Don't call init_registers_x32_XXX and
523 init_registers_amd64_XXX.
524 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
525 and tdesc_amd64_XXX.
526 [__x86_64__] (amd64_tdesc_test): New function.
527 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
528 and init_registers_amd64_XXX.
529 * linux-x86-tdesc.c: Include arch/amd64.h.
530 (xcr0_to_tdesc_idx): New function.
531 (i386_linux_read_description): New function.
532 (amd64_get_ipa_tdesc_idx): New function.
533 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
534 (amd64_get_ipa_tdesc): Declare.
535
d1f28ea2
YQ
5362017-09-05 Yao Qi <yao.qi@linaro.org>
537
538 * configure.srv (srv_i386_linux_xmlfiles): Remove
539 i386/i386-XXX-linux.xml from it.
540
25a93583
YQ
5412017-09-05 Yao Qi <yao.qi@linaro.org>
542
543 * configure.srv: Set srv_i386_linux_regobj empty if $development
544 is false.
545 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
546 initialize_low_tdesc.
547 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
548 with #if initialize_low_tdesc.
549 * linux-x86-tdesc-selftest.c: New file.
550 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
551
5f035c07
YQ
5522017-09-05 Yao Qi <yao.qi@linaro.org>
553
554 * Makefile.in (arch-i386.o): New rule.
555 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
556 (x86_64-*-linux*): Likewise.
557 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
558 include arch/i386.h.
559 (i386_linux_read_description): Remove code and call
560 i386_create_target_description.
561 * tdesc.c (allocate_target_description): New function.
562 * tdesc.h (set_tdesc_architecture): Remove declaration.
563 (set_tdesc_osabi): Likewise.
564
0abe8a89
YQ
5652017-09-05 Yao Qi <yao.qi@linaro.org>
566
567 * linux-x86-tdesc.c: Don't include <inttypes.h>.
568 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
569 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
570 .xmltarget.
571 * server.c (get_features_xml): Call tdesc_get_features_xml.
572 * tdesc.c (set_tdesc_architecture): New function.
573 (set_tdesc_osabi): New function.
574 (tdesc_get_features_xml): New function.
575 (tdesc_create_feature): Add an argument.
576 * tdesc.h (struct target_desc) <features>: New field.
577 <arch, osabi>: New field.
578 (~target_desc): xfree features, arch, and osabi.
579 (target_desc::oerator==): Don't compare .xmltarget.
580 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
581 (set_tdesc_osabi): Likewise.
582 (tdesc_get_features_xml): Likewise.
583
0a188386
YQ
5842017-09-05 Yao Qi <yao.qi@linaro.org>
585
586 * linux-x86-tdesc.c: Include selftest.h.
587 (i386_tdesc_test): New function.
588 (initialize_low_tdesc): Call selftests::register_test.
589 * tdesc.h: Include regdef.h.
590 (target_desc): Override operator == and !=.
591
f49ff000
YQ
5922017-09-05 Yao Qi <yao.qi@linaro.org>
593
594 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
595 (ipa_obj): Likewise.
596 * linux-i386-ipa.c: Include common/x86-xstate.h
597 (get_ipa_tdesc): Call i386_linux_read_description.
598 (initialize_low_tracepoint): Don't call init_registers_XXX
599 functions, call initialize_low_tdesc instead.
600 * linux-x86-low.c (x86_linux_read_description): Call
601 i386_linux_read_description.
602 (initialize_low_arch): Don't call init_registers_i386_XXX
603 functions, call initialize_low_tdesc.
604 * linux-x86-tdesc.c: New file.
605 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
606 (i386_get_ipa_tdesc_idx): Declare.
607 (i386_get_ipa_tdesc): Declare.
608 (initialize_low_tdesc): Declare.
609
2b68ef2f
YQ
6102017-09-05 Yao Qi <yao.qi@linaro.org>
611
612 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
613 instead of 0.
614
f7000548
YQ
6152017-09-05 Yao Qi <yao.qi@linaro.org>
616
617 * Makefile.in (IPA_OBJS): Add vec-ipa.o
618 * regcache.c (get_thread_regcache): Use VEC_length.
619 (init_register_cache): Likewise.
620 (regcache_cpy): Likewise.
621 (registers_to_string): Iterate reg_defs via VEC_iterate.
622 (find_regno): Likewise.
623 (find_register_by_number): Use VEC_index.
624 (register_size): Call find_register_by_number.
625 (register_data): Call find_register_by_number.
626 (supply_regblock): Use VEC_length.
627 (regcache_raw_read_unsigned): Likewise.
628 * tdesc.c (init_target_desc): Iterate reg_defs via
629 VEC_iterate.
630 (default_description): Update initializer.
631 (copy_target_description): Don't update field num_registers.
632 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
633 <num_registers>: Remove.
634
50a421ac
SM
6352017-09-04 Simon Marchi <simon.marchi@ericsson.com>
636
637 * Makefile.in (.SECONDARY): Define target.
638
23fdd69e
SM
6392017-09-03 Simon Marchi <simon.marchi@ericsson.com>
640
641 * linux-low.c (linux_wait_1): Adjust.
642 * server.c (queue_stop_reply_callback): Adjust.
643
0a2dde4a
SDJ
6442017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
645
646 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
647 QEnvironmentUnset and QEnvironmentReset packets.
648 (handle_query): Inform remote that QEnvironmentHexEncoded,
649 QEnvironmentUnset and QEnvironmentReset are supported.
650
6afd337d
SM
6512017-08-25 Simon Marchi <simon.marchi@ericsson.com>
652
653 * inferiors.h (inferior_target_data): Rename to ...
654 (thread_target_data): ... this.
655 (inferior_regcache_data): Rename to ...
656 (thread_regcache_data): ... this.
657 (set_inferior_regcache_data): Rename to ...
658 (set_thread_regcache_data): ... this.
659 * inferiors.c (inferior_target_data): Rename to ...
660 (thread_target_data): ... this.
661 (inferior_regcache_data): Rename to ...
662 (thread_regcache_data): ... this.
663 (set_inferior_regcache_data): Rename to ...
664 (set_thread_regcache_data): ... this.
665 (free_one_thread): Update.
666 * linux-low.h (get_thread_lwp): Update.
667 * regcache.c (get_thread_regcache): Update.
668 (regcache_invalidate_thread): Update.
669 (free_register_cache_thread): Update.
670 * win32-i386-low.c (update_debug_registers_callback): Update.
671 (win32_get_current_dr): Update.
672 * win32-low.c (thread_rec): Update.
673 (delete_thread_info): Update.
674 (continue_one_thread): Update.
675 (suspend_one_thread): Update.
676
a160cc46
SM
6772017-08-24 Simon Marchi <simon.marchi@ericsson.com>
678
679 * inferiors.c (set_inferior_target_data): Remove.
680 * inferiors.h (set_inferior_target_data): Remove.
681
6d580b63
YQ
6822017-08-18 Yao Qi <yao.qi@linaro.org>
683
684 * Makefile.in (OBS): Add selftest.o.
685 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
686 * configure, config.in: Re-generated.
687 * server.c: Include common/sefltest.h.
688 (captured_main): Handle option --selftest.
689
f5a29eb0
YQ
6902017-08-09 Yao Qi <yao.qi@linaro.org>
691
692 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
693 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
694 i386-avx-mpx.o and i386-mmx.o.
695 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
696 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
697 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
698 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
699 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
700 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
701 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
702 i386/amd64-avx-mpx.xml.
703
57757c2f
YQ
7042017-08-09 Yao Qi <yao.qi@linaro.org>
705
706 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
707 and x32-avx-avx512.o.
708 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
709 i386/x32-avx-avx512.xml.
710
229d26fc
SM
7112017-07-26 Simon Marchi <simon.marchi@ericsson.com>
712
713 * tracepoint.h (enum class fast_tpoint_collect_result): New
714 enumeration.
715 (fast_tracepoint_collecting): Change return type to
716 fast_tpoint_collect_result.
717 * tracepoint.c (fast_tracepoint_collecting): Likewise.
718 * linux-low.h: Include tracepoint.h.
719 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
720 fast_tpoint_collect_result.
721 * linux-low.c (handle_tracepoints): Adjust.
722 (linux_fast_tracepoint_collecting): Change return type to
723 fast_tpoint_collect_result.
724 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
725 linux_wait_1, stuck_in_jump_pad_callback,
726 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
727 proceed_one_lwp): Adjust to type change.
728
2e1e43e1
YQ
7292017-07-10 Yao Qi <yao.qi@linaro.org>
730
731 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
732
adc764e7
YQ
7332017-06-29 Yao Qi <yao.qi@linaro.org>
734
735 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
736 Remove.
737 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
738
a206891a
SM
7392017-06-20 Simon Marchi <simon.marchi@ericsson.com>
740
741 * Makefile.in (IPA_OBJS): Sort and format one item per line.
742
9a6c7d9c
SDJ
7432017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
744
745 * linux-low.c (linux_create_inferior): Adjust code to access the
746 environment information via 'gdb_environ' class.
747 * lynx-low.c (lynx_create_inferior): Likewise.
748 * server.c (our_environ): Make it an instance of 'gdb_environ'.
749 (get_environ): Return a pointer to 'our_environ'.
750 (captured_main): Initialize 'our_environ'.
751 * server.h (get_environ): Adjust prototype.
752 * spu-low.c (spu_create_inferior): Adjust code to access the
753 environment information via 'gdb_environ' class.
754
ae3e2ccf
SM
7552017-06-17 Simon Marchi <simon.marchi@ericsson.com>
756
757 * linux-low.c (linux_read_memory, linux_write_memory): Remove
758 usage of "register" keyword.
759
3e019bdc
SM
7602017-06-17 Simon Marchi <simon.marchi@ericsson.com>
761
762 * configure: Re-generate.
763
8465943a
SM
7642017-06-17 Simon Marchi <simon.marchi@ericsson.com>
765
766 * configure: Re-generate.
767
cf0dd6f0
SM
7682017-06-17 Simon Marchi <simon.marchi@ericsson.com>
769
770 * Makefile.in (COMPILE.pre): Add "-x c++".
771
9845682b
SDJ
7722017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
773
774 * fork-child.c: Conditionally include <signal.h>.
775
aefd8b33
SDJ
7762017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
777
778 * server.c (handle_general_set): Handle new packet
779 "QStartupWithShell".
780 (handle_query): Add "QStartupWithShell" to the list of supported
781 packets.
782 (gdbserver_usage): Add help text explaining the
783 new "--startup-with-shell" and "--no-startup-with-shell" CLI
784 options.
785 (captured_main): Recognize and act upon the presence of the new
786 CLI options.
787
2090129c
SDJ
7882017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
789 Pedro Alves <palves@redhat.com>
790
791 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
792 * configure: Regenerate.
793 * configure.srv (srv_linux_obj): Add "fork-child.o" and
794 "fork-inferior.o".
795 (i[34567]86-*-lynxos*): Likewise.
796 (spu*-*-*): Likewise.
797 * fork-child.c: New file.
798 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
799 and "environ.h".
800 (linux_ptrace_fun): New function.
801 (linux_create_inferior): Adjust function prototype to reflect
802 change on "target.h". Adjust function code to use
803 "fork_inferior".
804 (linux_request_interrupt): Delete "signal_pid".
805 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
806 (lynx_ptrace_fun): New function.
807 (lynx_create_inferior): Adjust function prototype to reflect
808 change on "target.h". Adjust function code to use
809 "fork_inferior".
810 * nto-low.c (nto_create_inferior): Adjust function prototype and
811 code to reflect change on "target.h". Update comments.
812 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
813 "common-terminal.h" and "environ.h".
814 (terminal_fd): Moved to fork-child.c.
815 (old_foreground_pgrp): Likewise.
816 (restore_old_foreground_pgrp): Likewise.
817 (last_status): Make it global.
818 (last_ptid): Likewise.
819 (our_environ): New variable.
820 (startup_with_shell): Likewise.
821 (program_name): Likewise.
822 (program_argv): Rename to...
823 (program_args): ...this.
824 (wrapper_argv): New variable.
825 (start_inferior): Delete function.
826 (get_exec_wrapper): New function.
827 (get_exec_file): Likewise.
828 (get_environ): Likewise.
829 (prefork_hook): Likewise.
830 (post_fork_inferior): Likewise.
831 (postfork_hook): Likewise.
832 (postfork_child_hook): Likewise.
833 (handle_v_run): Update code to deal with arguments coming from the
834 remote host. Update calls from "start_inferior" to
835 "create_inferior".
836 (captured_main): Likewise. Initialize environment variable. Call
837 "have_job_control".
838 * server.h (post_fork_inferior): New prototype.
839 (get_environ): Likewise.
840 (last_status): Declare.
841 (last_ptid): Likewise.
842 (signal_pid): Likewise.
843 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
844 (spu_ptrace_fun): New function.
845 (spu_create_inferior): Adjust function prototype to reflect change
846 on "target.h". Adjust function code to use "fork_inferior".
847 * target.c (target_terminal_init): New function.
848 (target_terminal_inferior): Likewise.
849 (target_terminal_ours): Likewise.
850 * target.h: Include <vector>.
851 (struct target_ops) <create_inferior>: Update prototype.
852 (create_inferior): Update macro.
853 * utils.c (gdb_flush_out_err): New function.
854 * win32-low.c (win32_create_inferior): Adjust function prototype
855 and code to reflect change on "target.h".
856
043a4934
SDJ
8572017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
858
859 * inferiors.c (switch_to_thread): New function.
860
15652511
SDJ
8612017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
862
863 * Makefile.in (SFILE): Add "common/job-control.c".
864 (OBS): Add "job-control.o".
865
21ea5acd
SDJ
8662017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
867
868 * Makefile: Remove "@host_makefile_frag@".
869
e13cb306
PA
8702017-05-05 Pedro Alves <palves@redhat.com>
871
872 * configure: Regenerate.
873
c94fee56
SDJ
8742017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
875
876 * configure: Regenerate.
877
a0ff9e1a
SM
8782017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
879
880 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
881 software_single_step change of return type to
882 std::vector<CORE_ADDR>.
883 * linux-low.c (install_software_single_step_breakpoints):
884 Likewise.
885 * linux-low.h (install_software_single_step_breakpoints):
886 Likewise.
887
be628ab8
SDJ
8882017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
889
890 * remote-utils.c: Include "gdb_termios.h" instead of
891 "terminal.h".
892 * terminal.h: Delete file.
893
7c5ded6a
SDJ
8942017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
895
896 * server.c: Include <vector>.
897 <program_argv, wrapper_argv>: Convert to std::vector.
898 (start_inferior): Rewrite function to use C++.
899 (handle_v_run): Likewise. Update code that calculates the argv
900 based on the vRun packet; use C++.
901 (captured_main): Likewise.
902
436252de
SM
9032017-04-06 Simon Marchi <simon.marchi@ericsson.com>
904
905 * server.c (handle_v_cont): Initialize thread_resume::thread
906 with null_ptid.
907
9bf2a700
PA
9082017-04-05 Pedro Alves <palves@redhat.com>
909
910 * configure: Regenerate.
911
a121b7c1
PA
9122017-04-05 Pedro Alves <palves@redhat.com>
913
914 * gdbreplay.c (sync_error): Constify.
915 * linux-x86-low.c (push_opcode): Constify.
916
21c8a587
PA
9172017-04-05 Pedro Alves <palves@redhat.com>
918
919 * win32-low.c (get_child_debug_event)
920 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
921 Report TARGET_WAITKIND_SPURIOUS instead.
922
fb32b4f7
PA
9232017-04-05 Pedro Alves <palves@redhat.com>
924
925 * remote-utils.c (remote_prepare, remote_open): Constify.
926 * remote-utils.h (remote_prepare, remote_open): Constify.
927 * server.c (captured_main): Constify 'port' handling.
928
65dd1e59
SM
9292017-04-04 Simon Marchi <simon.marchi@ericsson.com>
930
931 * Makefile.in (clean): Clear .deps.
932
8fa5b777
SM
9332017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
934
935 * .gitignore: Remove generated files, replace with wildcard.
936 * (clean): Replace removal of generated files with wildcard.
937 (version.c): Replace with...
938 (version-generated.c): ...this.
939 (xml-builtin.c): Replace with...
940 (xml-builtin-generated.c): ...this.
941 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
942 (%.c: *regformats*): Replace with...
943 (%-generated.c: *regformats*): ...this.
944
a12e714b
MF
9452017-03-27 Max Filippov <jcmvbkbc@gmail.com>
946
947 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
948 (xtensa_fill_gregset): Call collect_register_by_name for
949 threadptr register.
950 (xtensa_store_gregset): Call supply_register_by_name for
951 threadptr register.
952
1a09b50a
MF
9532017-03-27 Max Filippov <jcmvbkbc@gmail.com>
954
955 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
956 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
957 (xtensa_store_gregset): Call supply_register for all registers in
958 a0_regnum..a0_regnum + C0_NREGS range.
959
1a01e7c6
SM
9602017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
961
962 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
963 (ax-ipa.o: ax.c): Remove.
964 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
965 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
966 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
967 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
968 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
969
36bc18a8
SM
9702017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
971
972 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
973 (print-utils-ipa.o: ../common/print-utils.c): Remove.
974 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
975 (errors-ipa.o: ../common/errors.c): Remove.
976 (format-ipa.o: ../common/format.c): Remove.
977 (common-utils-ipa.o: ../common/common-utils.c): Remove.
978
a8ebe3d5
SM
9792017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
980
981 * Makefile.in (%-ipa.o: %.c): New rule.
982 (tracepoint-ipa.o: tracepoint.c): Remove.
983 (utils-ipa.o: utils.c): Remove.
984 (remote-utils-ipa.o: remote-utils.c): Remove.
985 (regcache-ipa.o: regcache.c): Remove.
986 (i386-linux-ipa.o: i386-linux.c): Remove.
987 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
988 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
989 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
990 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
991 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
992 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
993 (amd64-linux-ipa.o: amd64-linux.c): Remove.
994 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
995 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
996 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
997 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
998 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
999 (aarch64-ipa.o: aarch64.c): Remove.
1000 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1001 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1002 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1003 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1004 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1005 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1006 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1007 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1008 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1009 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1010 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1011 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1012 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1013 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1014 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1015 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1016 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1017 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1018 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1019 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1020 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1021 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1022 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1023 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1024 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1025 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1026 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1027 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1028 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1029 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1030 (tdesc-ipa.o: tdesc.c): Remove.
1031 (x32-linux-ipa.o: x32-linux.c): Remove.
1032 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1033 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1034
50cfacb7
SM
10352017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1036
1037 * Makefile.in (%.o: ../arch/%.c): New rule.
1038 (arm.o: ../arch/arm.c): Remove.
1039 (arm-linux.o: ../arch/arm-linux.c): Remove.
1040 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1041 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1042
c5a22423
SM
10432017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1044
1045 * Makefile.in (%.o: ../nat/%.c): New rule.
1046 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1047 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1048 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1049 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1050 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1051 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1052 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1053 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1054 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1055 (linux-personality.o: ../nat/linux-personality.c): Remove.
1056 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1057 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1058 (x86-linux.o: ../nat/x86-linux.c): Remove.
1059 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1060 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1061
6bda016b
SM
10622017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1063
1064 * Makefile.in (%.o: ../common/%.c): New rule.
1065 (signals.o: ../common/signals.c): Remove.
1066 (print-utils.o: ../common/print-utils.c): Remove.
1067 (rsp-low.o: ../common/rsp-low.c): Remove.
1068 (common-utils.o: ../common/common-utils.c): Remove.
1069 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1070 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1071 (vec.o: ../common/vec.c): Remove.
1072 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1073 (xml-utils.o: ../common/xml-utils.c): Remove.
1074 (ptid.o: ../common/ptid.c): Remove.
1075 (buffer.o: ../common/buffer.c): Remove.
1076 (format.o: ../common/format.c): Remove.
1077 (filestuff.o: ../common/filestuff.c): Remove.
1078 (agent.o: ../common/agent.c): Remove.
1079 (errors.o: ../common/errors.c): Remove.
1080 (environ.o: ../common/environ.c): Remove.
1081 (common-debug.o: ../common/common-debug.c): Remove.
1082 (cleanups.o: ../common/cleanups.c): Remove.
1083 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1084 (fileio.o: ../common/fileio.c): Remove.
1085 (common-regcache.o: ../common/common-regcache.c): Remove.
1086 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1087 (new-op.o: ../common/new-op.c): Remove.
1088 (btrace-common.o: ../common/btrace-common.c): Remove.
1089
21122961
SM
10902017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1091
1092 * Makefile.in (%.o: ../target/%.c): New rule.
1093 (waitstatus.o: ../target/waitstatus.c): Remove.
1094
c362e621
SM
10952017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1096
1097 * Makefile.in
1098 (%.c: ../regformats/%.dat,
1099 (%.c: ../regformats/arm/%.dat,
1100 (%.c: ../regformats/i386/%.dat,
1101 (%.c: ../regformats/rs6000/%.dat): New rules.
1102 (aarch64.c): Remove.
1103 (reg-arm.c): Remove.
1104 (arm-with-iwmmxt.c): Remove.
1105 (arm-with-vfpv2.c): Remove.
1106 (arm-with-vfpv3.c): Remove.
1107 (arm-with-neon.c): Remove.
1108 (reg-bfin.c): Remove.
1109 (reg-cris.c): Remove.
1110 (reg-crisv32.c): Remove.
1111 (i386.c): Remove.
1112 (i386-linux.c): Remove.
1113 (i386-avx.c): Remove.
1114 (i386-avx-linux.c): Remove.
1115 (i386-avx-avx512.c): Remove.
1116 (i386-avx-avx512-linux.c): Remove.
1117 (i386-mpx.c): Remove.
1118 (i386-mpx-linux.c): Remove.
1119 (i386-avx-mpx-avx512-pku.c): Remove.
1120 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1121 (i386-avx-mpx.c): Remove.
1122 (i386-avx-mpx-linux.c): Remove.
1123 (i386-mmx.c): Remove.
1124 (i386-mmx-linux.c): Remove.
1125 (reg-ia64.c): Remove.
1126 (reg-m32r.c): Remove.
1127 (reg-m68k.c): Remove.
1128 (reg-cf.c): Remove.
1129 (mips-linux.c): Remove.
1130 (mips-dsp-linux.c): Remove.
1131 (mips64-linux.c): Remove.
1132 (mips64-dsp-linux.c): Remove.
1133 (nios2-linux.c): Remove.
1134 (powerpc-32.c): Remove.
1135 (powerpc-32l.c): Remove.
1136 (powerpc-altivec32l.c): Remove.
1137 (powerpc-cell32l.c): Remove.
1138 (powerpc-vsx32l.c): Remove.
1139 (powerpc-isa205-32l.c): Remove.
1140 (powerpc-isa205-altivec32l.c): Remove.
1141 (powerpc-isa205-vsx32l.c): Remove.
1142 (powerpc-e500l.c): Remove.
1143 (powerpc-64l.c): Remove.
1144 (powerpc-altivec64l.c): Remove.
1145 (powerpc-cell64l.c): Remove.
1146 (powerpc-vsx64l.c): Remove.
1147 (powerpc-isa205-64l.c): Remove.
1148 (powerpc-isa205-altivec64l.c): Remove.
1149 (powerpc-isa205-vsx64l.c): Remove.
1150 (s390-linux32.c): Remove.
1151 (s390-linux32v1.c): Remove.
1152 (s390-linux32v2.c): Remove.
1153 (s390-linux64.c): Remove.
1154 (s390-linux64v1.c): Remove.
1155 (s390-linux64v2.c): Remove.
1156 (s390-te-linux64.c): Remove.
1157 (s390-vx-linux64.c): Remove.
1158 (s390-tevx-linux64.c): Remove.
1159 (s390x-linux64.c): Remove.
1160 (s390x-linux64v1.c): Remove.
1161 (s390x-linux64v2.c): Remove.
1162 (s390x-te-linux64.c): Remove.
1163 (s390x-vx-linux64.c): Remove.
1164 (s390x-tevx-linux64.c): Remove.
1165 (tic6x-c64xp-linux.c): Remove.
1166 (tic6x-c64x-linux.c): Remove.
1167 (tic6x-c62x-linux.c): Remove.
1168 (reg-sh.c): Remove.
1169 (reg-sparc64.c): Remove.
1170 (reg-spu.c): Remove.
1171 (amd64.c): Remove.
1172 (amd64-linux.c): Remove.
1173 (amd64-avx.c): Remove.
1174 (amd64-avx-linux.c): Remove.
1175 (amd64-avx-avx512.c): Remove.
1176 (amd64-avx-avx512-linux.c): Remove.
1177 (amd64-mpx.c): Remove.
1178 (amd64-mpx-linux.c): Remove.
1179 (amd64-avx-mpx-avx512-pku.c): Remove.
1180 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1181 (amd64-avx-mpx.c): Remove.
1182 (amd64-avx-mpx-linux.c): Remove.
1183 (x32.c): Remove.
1184 (x32-linux.c): Remove.
1185 (x32-avx.c): Remove.
1186 (x32-avx-linux.c): Remove.
1187 (x32-avx-avx512.c): Remove.
1188 (x32-avx-avx512-linux.c): Remove.
1189 (reg-xtensa.c): Remove.
1190 (reg-tilegx.c): Remove.
1191 (reg-tilegx32.c): Remove.
1192
1672e0d9
SDJ
11932017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1194
1195 * Makefile.in (SFILES): Add "common/environ.c".
1196 (OBJS): Add "common/environ.h".
1197
239b6d10
WT
11982017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1199
1200 * configure.ac: Check if the fs_base and gs_base members of
1201 `struct user_regs_struct' exist.
1202 * config.in: Regenerated.
1203 * configure: Likewise.
1204
694b382c
AT
12052017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1206
1207 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1208 target_read_memory.
1209 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1210 (get_next_pcs_syscall_next_pc): Likewise.
1211
7dc53023
LM
12122016-12-23 Luis Machado <lgustavo@codesourcery.com>
1213
1214 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1215 * nto-x86-low.c: Likewise.
1216
ad02e4fe
SM
12172016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1218
1219 * Makefile.in: Include disable-implicit-rules.mk.
1220
dcb07cfa
PA
12212016-11-23 Pedro Alves <palves@redhat.com>
1222
1223 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1224 (debug_vprintf): Use std::chrono::steady_clock instead of
1225 gettimeofday. Use '.' instead of ':'.
1226 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1227 (get_timestamp): Use std::chrono::steady_clock instead of
1228 gettimeofday.
1229
8629c02c
SM
12302016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1231
1232 * Makefile.in: Fix whitespace formatting.
1233
b593ecca
SM
12342016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1235
1236 * Makefile.in (SFILES, OBS): Flatten list and order
1237 alphabetically.
1238
9986ba08
PA
12392016-11-23 Pedro Alves <palves@redhat.com>
1240
1241 * event-loop.c (handle_file_event): Use warning.
1242 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1243 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1244 Use warning.
1245
4eefa7bc
PA
12462016-11-23 Pedro Alves <palves@redhat.com>
1247
1248 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1249 output.
1250 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1251 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1252 debug_printf and debug_flush for debug output.
1253 * server.c (handle_general_set): Likewise.
1254 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1255 output.
1256
5443506e
SM
12572016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1258
1259 * Makefile.in (.c.o): Replace rule with ...
1260 (%.o: %.c): ... this one.
1261
3b165252
SM
12622016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1263
1264 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1265 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1266 make.
1267 * configure.ac: Remove checks for the make program.
1268 * configure: Re-generate.
1269
0bcda685
PA
12702016-10-28 Pedro Alves <palves@redhat.com>
1271
1272 * Makefile.in (CXX_DIALECT): Get from configure.
1273 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1274 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1275 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1276 * config.in: Regenerate.
1277 * configure: Regenerate.
1278
c3805894
YQ
12792016-10-27 Yao Qi <yao.qi@linaro.org>
1280
1281 * linux-low.c (linux_supports_range_stepping): Return true if
1282 can_software_single_step return true.
1283
89342618
YQ
12842016-10-27 Yao Qi <yao.qi@linaro.org>
1285
1286 * inferiors.c (find_inferior_in_random): New function.
1287 * inferiors.h (find_inferior_in_random): Declare.
1288 * linux-low.c (linux_wait_for_event_filtered): Call
1289 find_inferior_in_random instead of find_inferior.
1290
e3652c84
YQ
12912016-10-27 Yao Qi <yao.qi@linaro.org>
1292
1293 * linux-low.c (linux_wait_1): If single-step breakpoints are
1294 inserted, remove them.
1295
5a04c4cf
PA
12962016-10-26 Pedro Alves <palves@redhat.com>
1297
1298 * linux-low.c (handle_extended_wait): Link parent/child fork
1299 threads.
1300 (linux_wait_1): Unlink them.
1301 (linux_set_resume_request): Ignore resume requests for
1302 already-resumed and unhandled fork child threads.
1303 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1304 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1305 New functions.
1306 (handle_v_requests) <vCont>: Don't call require_running.
1307 * server.h (in_queued_stop_replies): New declaration.
1308
cb93dc7f
YQ
13092016-10-24 Yao Qi <yao.qi@linaro.org>
1310
1311 PR server/20733
1312 * linux-aarch64-low.c (append_insns): Cast the return value to
1313 'uint32_t *'.
1314
a1078bea
YQ
13152016-10-10 Yao Qi <yao.qi@linaro.org>
1316
1317 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1318
1fb77080
SDJ
13192016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1320
1321 * target.c (target_supports_multi_process): New function, moved
1322 from...
1323 * target.h (target_supports_multi_process): ... here. Remove
1324 macro.
1325
39b5a3b9
TT
13262016-10-05 Tom Tromey <tom@tromey.com>
1327
1328 PR remote/20655:
1329 * tracepoint.c (handle_tracepoint_bkpts): Check
1330 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1331
c1d0b70a
YQ
13322016-10-05 Yao Qi <yao.qi@linaro.org>
1333
1334 * configure.srv: Update the path of arm-*.xml files.
1335
0a69eedb
YQ
13362016-10-05 Terry Guo <terry.guo@arm.com>
1337 Yao Qi <yao.qi@linaro.org>
1338
1339 * Makefile.in: Adjust the path of rules.
1340 * configure.srv: Update the path of xml files.
1341 * regformats/arm-with-iwmmxt.dat: Regenerated.
1342 * regformats/arm-with-neon.dat: Likewise.
1343 * regformats/arm-with-vfpv2.dat: Likewise.
1344 * regformats/arm-with-vfpv3.dat Likewise.
1345
17e16485
YQ
13462016-09-30 Yao Qi <yao.qi@linaro.org>
1347
1348 PR gdbserver/20627
1349 * target.c (target_stop_and_wait): Don't call
1350 target_continue_no_signal, use resume_stop instead.
1351
edeeb602
YQ
13522016-09-26 Yao Qi <yao.qi@linaro.org>
1353
1354 * linux-low.c (linux_wait_1): Call debug_exit.
1355
503b1c39
PA
13562016-09-23 Pedro Alves <palves@redhat.com>
1357
1358 * Makefile.in (SFILES): Add common/new-op.c.
1359 (OBS): Add common/new-op.o.
1360 (new-op.o): New rule.
1361
74172ecf
SM
13622016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1363
1364 * .gitinore: Ignore more files.
1365
fc6cda2e
YQ
13662016-09-21 Yao Qi <yao.qi@linaro.org>
1367
1368 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1369 23.
1370
bc1e6c81
SDJ
13712016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1372
1373 * server.c (start_inferior): Call target_mourn_inferior instead of
1374 mourn_inferior; pass ptid_t argument to it.
1375 (resume): Likewise.
1376 (handle_target_event): Likewise.
1377 * target.c (target_mourn_inferior): New function.
1378 * target.h (mourn_inferior): Delete macro.
1379
0e00e962
AA
13802016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1381
1382 * linux-low.c (lwp_is_stepping): New function.
1383
1d8cb77d
CL
13842016-09-06 Carl Love <cel@us.ibm.com>
1385
1386 * server.c (start_inferior): Fixed comment, requested comment change
1387 didn't get updated correctly. Removed reference to ptrace () call as
1388 it is only true on Linux systems.
1389
7313bced
CL
13902016-09-06 Carl Love <cel@us.ibm.com>
1391
1392 * server.c (start_inferior): Do not call
1393 function target_post_create_inferior () if the
1394 inferior process has already exited.
1395
cf6de44d
PA
13962016-09-05 Pedro Alves <palves@redhat.com>
1397
1398 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1399 (COMPILE.pre, CC_LD): Use CXX directly.
1400 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1401 * acinclude.m4: Don't include build-with-cxx.m4.
1402 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1403 * configure: Regenerate.
1404
c1da6748
AT
14052016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1406
1407 PR gdb/19495
1408 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1409 call writing data to own_buf.
1410
f2b9e3df
SDJ
14112016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1412
1413 * target.c (mywait): Call target_wait instead of
1414 the_target->wait.
1415 (target_wait): New function.
1416
049a8570
SDJ
14172016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1418
1419 * server.c (start_inferior): New variable 'ptid'. Replace calls
1420 to the_target->resume by target_continue{,_no_signal}, depending
1421 on the case.
1422 * target.c (target_stop_and_wait): Call target_continue_no_signal
1423 instead of the_target->resume.
1424 (target_continue): New function.
1425
3aa5cfa0
AT
14262016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1427
1428 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1429
754653a7
AZ
14302016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1431
1432 PR server/20491
1433 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1434 ps_prochandle.
1435 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1436 * linux-arm-low.c (ps_get_thread_area): Likewise.
1437 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1438 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1439 * linux-mips-low.c (ps_get_thread_area): Likewise.
1440 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1441 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1442 * linux-x86-low.c (ps_get_thread_area): Likewise.
1443 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1444
ed036b40
PA
14452016-08-19 Pedro Alves <palves@redhat.com>
1446
1447 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1448
c8ef42ee
PA
14492016-08-19 Pedro Alves <palves@redhat.com>
1450
1451 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1452 comment. Use memcpy instead of casting through unsigned long.
1453
9c235a72
PA
14542016-08-19 Pedro Alves <palves@redhat.com>
1455
1456 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1457 allocating around 0x80000000.
1458
201506da
PA
14592016-08-19 Pedro Alves <palves@redhat.com>
1460
1461 PR gdb/20415
1462 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1463 (x32-avx512-linux-ipa.o): New rules.
1464 * configure.ac (x86_64-*-linux*): New x32 check.
1465 * configure.srv (ipa_x32_linux_regobj): New.
1466 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1467 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1468 descriptions.
1469 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1470 descriptions.
1471 * configure: Regenerate.
1472
f348d89a
PA
14732016-08-09 Pedro Alves <palves@redhat.com>
1474
1475 PR gdb/18653
1476 * Makefile.in (OBS): Add signals-state-save-restore.o.
1477 (signals-state-save-restore.o): New rule.
1478 * config.in: Regenerate.
1479 * configure: Regenerate.
1480 * linux-low.c: Include "signals-state-save-restore.h".
1481 (linux_create_inferior): Call
1482 restore_original_signals_state.
1483 * server.c: Include "dispositions-save-restore.h".
1484 (captured_main): Call save_original_signals_state.
1485
1baf5149
PA
14862016-08-05 Pedro Alves <palves@redhat.com>
1487
1488 * configure: Regenerate.
1489
fcd4a73d
YQ
14902016-08-04 Yao Qi <yao.qi@linaro.org>
1491
1492 * linux-low.c (regsets_fetch_inferior_registers): Check
1493 errno is ESRCH or not.
1494
979659d0
YQ
14952016-08-02 Yao Qi <yao.qi@linaro.org>
1496
1497 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1498 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1499 (thread_db_load_search): Update.
1500 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1501 td_ta_set_event and td_ta_event_getmsg.
1502
6598661d
PA
15032016-07-26 Pedro Alves <palves@redhat.com>
1504
1505 PR server/20414
1506 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1507 of unsigned long for 64-bit registers and use uint32_t instead of
1508 unsigned int for 32-bit registers.
1509
9cf12d57
PA
15102016-07-26 Pedro Alves <palves@redhat.com>
1511
1512 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1513 to 'ptrace'.
1514
305450ed
TT
15152016-07-21 Tom Tromey <tom@tromey.com>
1516
1517 * configure: Rebuild.
1518
2583da7c
YQ
15192016-07-21 Yao Qi <yao.qi@linaro.org>
1520
1521 * mem-break.c (find_gdb_breakpoint): Cast bp to
1522 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1523
21536b36
YQ
15242016-07-21 Yao Qi <yao.qi@linaro.org>
1525
1526 * server.c (handle_v_requests): Support s and S actions
1527 if target_supports_software_single_step return true.
1528
8901d193
YQ
15292016-07-21 Yao Qi <yao.qi@linaro.org>
1530
1531 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1532 is resume_step, call maybe_hw_step.
1533 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1534 and unstop them.
1535 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1536 breakpoints or not.
1537 (proceed_one_lwp): If resume request is resume_step, install
1538 reinsert breakpoints and call maybe_hw_step.
1539
0e9a339e
YQ
15402016-07-21 Yao Qi <yao.qi@linaro.org>
1541
1542 * linux-low.c (proceed_one_lwp): Declare.
1543 (linux_resume_one_thread): Remove local variable 'step'.
1544 Lift code enqueue signal. Call proceed_one_lwp instead of
1545 linux_resume_one_lwp.
1546
4281b351
YQ
15472016-07-21 Yao Qi <yao.qi@linaro.org>
1548
1549 * linux-low.c (linux_resume_one_thread): Call
1550 enqueue_pending_signal.
1551
984a2c04
YQ
15522016-07-21 Yao Qi <yao.qi@linaro.org>
1553
1554 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1555 * inferiors.c (do_restore_current_thread_cleanup): New function.
1556 (make_cleanup_restore_current_thread): Likewise.
1557 * linux-low.c (install_software_single_step_breakpoints): Call
1558 make_cleanup_restore_current_thread. Switch current_thread to
1559 thread.
1560
bec903c9
YQ
15612016-07-21 Yao Qi <yao.qi@linaro.org>
1562
1563 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1564 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1565 (clone_one_breakpoint): Likewise.
1566 (delete_reinsert_breakpoints): Change parameter to thread.
1567 Callers updated.
1568 (has_reinsert_breakpoints): Likewise.
1569 (uninsert_reinsert_breakpoints): Likewise.
1570 (reinsert_reinsert_breakpoints): Likewise.
1571 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1572 (delete_reinsert_breakpoints): Likewise.
1573 (reinsert_reinsert_breakpoints): Likewise.
1574 (uninsert_reinsert_breakpoints): Likewise.
1575 (has_reinsert_breakpoints): Likewise.
1576
63c40ec7
YQ
15772016-07-21 Yao Qi <yao.qi@linaro.org>
1578
1579 * inferiors.c (get_thread_process): Make parameter const.
1580 * inferiors.h (get_thread_process): Update declaration.
1581 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1582 Add new parameters child_thread and parent_thread. Callers
1583 updated.
1584 * mem-break.h (clone_all_breakpoints): Update declaration.
1585
9aa76cd0
YQ
15862016-07-21 Yao Qi <yao.qi@linaro.org>
1587
1588 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1589 <command_list, handler>: Remove.
1590 (struct gdb_breakpoint): New.
1591 (struct other_breakpoint): New.
1592 (struct reinsert_breakpoint): New.
1593 (is_gdb_breakpoint): New function.
1594 (any_persistent_commands): Update command_list if
1595 is_gdb_breakpoint returns true.
1596 (set_breakpoint): Create breakpoints according to their types.
1597 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1598 (set_gdb_breakpoint_1): Likewise.
1599 (set_gdb_breakpoint): Likewise.
1600 (clear_breakpoint_conditions): Change parameter type to
1601 'struct gdb_breakpoint *'.
1602 (clear_breakpoint_commands): Likewise.
1603 (clear_breakpoint_conditions_and_commands): Likewise.
1604 (add_condition_to_breakpoint): Likewise.
1605 (add_breakpoint_condition): Likewise.
1606 (add_commands_to_breakpoint): Likewise.
1607 (check_breakpoints): Check other_breakpoint.
1608 (clone_one_breakpoint): Clone breakpopint according to its type.
1609 * mem-break.h (struct gdb_breakpoint): Declare.
1610 (set_gdb_breakpoint): Update declaration.
1611 (clear_breakpoint_conditions_and_commands): Likewise.
1612 (add_breakpoint_condition): Likewise.
1613 (add_breakpoint_commands): Likewise.
1614 * server.c (process_point_options): Change parameter type to
1615 'struct gdb_breakpoint *'.
1616
811f8301
YQ
16172016-07-21 Yao Qi <yao.qi@linaro.org>
1618
1619 * mem-break.c (set_breakpoint_at): Rename it to ...
1620 (set_breakpoint_type_at): ... it.
1621 (set_breakpoint_at): Call set_breakpoint_type_at.
1622 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1623 * mem-break.h (set_breakpoint_at): Update comments.
1624
b1c51e36
CLT
16252016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1626
1627 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1628 to buf parameter.
1629 (nios2_store_gregset): Likewise.
1630
ced2dffb
PA
16312016-07-01 Pedro Alves <palves@redhat.com>
1632 Antoine Tremblay <antoine.tremblay@ericsson.com>
1633
1634 * linux-low.c: Change interface to take the target lwp_info
1635 pointer directly and return void. Handle detaching from a zombie
1636 thread.
1637 (linux_detach_lwp_callback): New function.
1638 (linux_detach): Detach from the leader thread after detaching from
1639 the clone threads.
1640
2ac09a5b
YQ
16412016-06-28 Yao Qi <yao.qi@linaro.org>
1642
1643 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1644 for variable new_offset.
1645 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1646 (aarch64_ftrace_insn_reloc_cb): Likewise.
1647 (aarch64_ftrace_insn_reloc_tb): Likewise.
1648 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1649 PRIx64 instead of PRIx32.
1650
79e7fd4f
YQ
16512016-06-28 Yao Qi <yao.qi@linaro.org>
1652
1653 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1654 (the_low_target): Install arm_get_syscall_trapinfo.
1655
061fc021
YQ
16562016-06-28 Yao Qi <yao.qi@linaro.org>
1657
1658 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1659 function.
1660 (the_low_target): Install aarch64_get_syscall_trapinfo.
1661
4cc32bec
YQ
16622016-06-28 Yao Qi <yao.qi@linaro.org>
1663
1664 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1665 Callers updated.
1666 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1667 Remove parameter sysno.
1668 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1669 sysret.
1670
782c1122
AA
16712016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1672
1673 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1674 (s390_emit_ne_goto): Likewise.
1675 (s390_emit_lt_goto): Likewise.
1676 (s390_emit_le_goto): Likewise.
1677 (s390_emit_gt_goto): Likewise.
1678 (s390_emit_ge_goto): Likewise.
1679 (s390x_emit_eq_goto): Likewise.
1680 (s390x_emit_ne_goto): Likewise.
1681 (s390x_emit_lt_goto): Likewise.
1682 (s390x_emit_le_goto): Likewise.
1683 (s390x_emit_gt_goto): Likewise.
1684 (s390x_emit_ge_goto): Likewise.
1685 (s390_emit_ops_impl): Mark variable static.
1686 (s390x_emit_ops): Likewise.
1687
2e7b624b
YQ
16882016-06-17 Yao Qi <yao.qi@linaro.org>
1689
1690 * linux-low.c (handle_extended_wait): Call
1691 uninsert_reinsert_breakpoints for the parent process. Remove
1692 reinsert breakpoints from the child process. Reinsert them to
1693 the parent process when vfork is done.
1694 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1695 (reinsert_reinsert_breakpoints): New function.
1696 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1697 (reinsert_reinsert_breakpoints): Declare.
1698
8a81c5d7
YQ
16992016-06-17 Yao Qi <yao.qi@linaro.org>
1700
1701 * linux-low.c (handle_extended_wait): If the parent is doing
1702 step-over, remove the reinsert breakpoints from the forked child.
1703
f50bf8e5
YQ
17042016-06-17 Yao Qi <yao.qi@linaro.org>
1705
1706 * linux-low.c (unsuspend_all_lwps): Declare.
1707 (linux_low_filter_event): If thread exited, call finish_step_over.
1708 If step-over is finished, unsuspend other threads.
1709
8376a3cb
YQ
17102016-06-17 Yao Qi <yao.qi@linaro.org>
1711
1712 * linux-low.c (linux_resume_one_lwp_throw): Assert
1713 has_reinsert_breakpoints returns false.
1714 * mem-break.c (delete_disabled_breakpoints): Assert
1715 bp type isn't reinsert_breakpoint.
1716
f79b145d
YQ
17172016-06-17 Yao Qi <yao.qi@linaro.org>
1718
1719 * linux-low.c (maybe_hw_step): New function.
1720 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1721 (finish_step_over): Switch current_thread to lwp temporarily,
1722 and assert has_reinsert_breakpoints returns true.
1723 (proceed_one_lwp): Call maybe_hw_step.
1724 * mem-break.c (has_reinsert_breakpoints): New function.
1725 * mem-break.h (has_reinsert_breakpoints): Declare.
1726
0ae534d2
JT
17272016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1728
1729 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1730
fcdad592
YQ
17312016-05-17 Yao Qi <yao.qi@linaro.org>
1732
1733 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1734 instead of find_inferior.
1735
9e784964
YQ
17362016-05-05 Yao Qi <yao.qi@linaro.org>
1737
1738 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1739 Initialize res to zero.
1740
cf2ebb6e
YQ
17412016-05-05 Yao Qi <yao.qi@linaro.org>
1742
1743 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1744 to uint32_t.
1745
c1aebf87
UW
17462016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1747
1748 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1749 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1750 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1751
35fd2deb 17522016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 1753 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
1754
1755 * tracepoint.c (write_inferior_int8): New function.
1756 (cmd_qtenable_disable): Write enable flag using
1757 write_inferior_int8.
1758
484b3c32
YQ
17592016-04-25 Yao Qi <yao.qi@linaro.org>
1760
1761 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1762 (need_step_over_p): Return zero if the LWP has pending signals
1763 can be delivered on software single step target.
1764
85ba7d86
YQ
17652016-04-25 Yao Qi <yao.qi@linaro.org>
1766
1767 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1768 return instead of error.
1769
3539aa13
YQ
17702016-04-22 Yao Qi <yao.qi@linaro.org>
1771
1772 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1773 to 23.
1774
5b061e98
YQ
17752016-04-22 Yao Qi <yao.qi@linaro.org>
1776
1777 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1778 signal when stepping over breakpoint with software single
1779 step.
1780
3451269c
PA
17812016-04-21 Pedro Alves <palves@redhat.com>
1782
1783 * linux-s390-low.c (s390_collect_ptrace_register)
1784 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1785 add casts.
1786 (s390_check_regset): Use void * instead of gdb_byte *.
1787
a2358508
PA
17882016-04-20 Pedro Alves <palves@redhat.com>
1789
1790 * configure: Renegerate.
1791
6885166d
YQ
17922016-04-20 Yao Qi <yao.qi@linaro.org>
1793
1794 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1795 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1796 number 16.
1797 (arm_store_gregset): Likewise.
1798
2b863f51
WT
17992016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1800
1801 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1802 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1803 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1804 (amd64-avx-mpx-linux.c): New rules.
1805 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1806 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1807 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1808 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1809 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1810 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1811 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1812 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1813 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1814 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1815 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1816 * linux-x86-low.c (x86_linux_read_description): Add case for
1817 X86_XSTATE_AVX_MPX_MASK.
1818 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1819 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1820 init_registers_i386_avx_mpx_linux.
1821 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1822 (initialize_low_tracepoint): Call
1823 init_registers_i386_avx_mpx_linux.
1824 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1825 (initialize_low_tracepoint): Call
1826 init_registers_amd64_avx_mpx_linux.
1827 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1828 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1829 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1830 declarations.
1831
9b30624b
PA
18322016-04-18 Pedro Alves <palves@redhat.com>
1833
1834 * configure: Regenerate.
1835
45e3745e
AT
18362016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1837
1838 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1839 (aarch64_emit_sub): Likewise.
1840
2afc13ff
PA
18412016-04-12 Pedro Alves <palves@redhat.com>
1842
1843 * utils.c (prepare_to_throw_exception): Delete.
1844
6e774b13
SM
18452016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1846
1847 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1848
4dca19f8
MK
18492016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1850
1851 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1852
d0a9981f
MK
18532016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1854
1855 * linux-aarch64-ipa.c: Add <elf.h> include.
1856 * linux-ppc-ipa.c: Add <elf.h> include.
1857 * linux-s390-ipa.c: Add <elf.h> include.
1858
252db07e
MK
18592016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1860
1861 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1862 (get_raw_reg_ptr): Likewise.
1863 (get_trace_state_variable_value_ptr): Likewise.
1864 (set_trace_state_variable_value_ptr): Likewise.
1865 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1866 char *.
1867
14e2b6d9
MK
18682016-03-31 Wei-cheng Wang <cole945@gmail.com>
1869 Marcin Kościelnicki <koriakin@0x04.net>
1870
1871 PR/17221
1872 * linux-ppc-low.c (emit_insns): New function.
1873 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1874 (ppc_emit_prologue): New function.
1875 (ppc_emit_epilogue): New function.
1876 (ppc_emit_add): New function.
1877 (ppc_emit_sub): New function.
1878 (ppc_emit_mul): New function.
1879 (ppc_emit_lsh): New function.
1880 (ppc_emit_rsh_signed): New function.
1881 (ppc_emit_rsh_unsigned): New function.
1882 (ppc_emit_ext): New function.
1883 (ppc_emit_zero_ext): New function.
1884 (ppc_emit_log_not): New function.
1885 (ppc_emit_bit_and): New function.
1886 (ppc_emit_bit_or): New function.
1887 (ppc_emit_bit_xor): New function.
1888 (ppc_emit_bit_not): New function.
1889 (ppc_emit_equal): New function.
1890 (ppc_emit_less_signed): New function.
1891 (ppc_emit_less_unsigned): New function.
1892 (ppc_emit_ref): New function.
1893 (ppc_emit_const): New function.
1894 (ppc_emit_reg): New function.
1895 (ppc_emit_pop): New function.
1896 (ppc_emit_stack_flush): New function.
1897 (ppc_emit_swap): New function.
1898 (ppc_emit_stack_adjust): New function.
1899 (ppc_emit_call): New function.
1900 (ppc_emit_int_call_1): New function.
1901 (ppc_emit_void_call_2): New function.
1902 (ppc_emit_if_goto): New function.
1903 (ppc_emit_goto): New function.
1904 (ppc_emit_eq_goto): New function.
1905 (ppc_emit_ne_goto): New function.
1906 (ppc_emit_lt_goto): New function.
1907 (ppc_emit_le_goto): New function.
1908 (ppc_emit_gt_goto): New function.
1909 (ppc_emit_ge_goto): New function.
1910 (ppc_write_goto_address): New function.
1911 (ppc_emit_ops_impl): New static variable.
1912 (ppc64v1_emit_prologue): New function.
1913 (ppc64v2_emit_prologue): New function.
1914 (ppc64_emit_epilogue): New function.
1915 (ppc64_emit_add): New function.
1916 (ppc64_emit_sub): New function.
1917 (ppc64_emit_mul): New function.
1918 (ppc64_emit_lsh): New function.
1919 (ppc64_emit_rsh_signed): New function.
1920 (ppc64_emit_rsh_unsigned): New function.
1921 (ppc64_emit_ext): New function.
1922 (ppc64_emit_zero_ext): New function.
1923 (ppc64_emit_log_not): New function.
1924 (ppc64_emit_bit_and): New function.
1925 (ppc64_emit_bit_or): New function.
1926 (ppc64_emit_bit_xor): New function.
1927 (ppc64_emit_bit_not): New function.
1928 (ppc64_emit_equal): New function.
1929 (ppc64_emit_less_signed): New function.
1930 (ppc64_emit_less_unsigned): New function.
1931 (ppc64_emit_ref): New function.
1932 (ppc64_emit_const): New function.
1933 (ppc64v1_emit_reg): New function.
1934 (ppc64v2_emit_reg): New function.
1935 (ppc64_emit_pop): New function.
1936 (ppc64_emit_stack_flush): New function.
1937 (ppc64_emit_swap): New function.
1938 (ppc64v1_emit_call): New function.
1939 (ppc64v2_emit_call): New function.
1940 (ppc64v1_emit_int_call_1): New function.
1941 (ppc64v2_emit_int_call_1): New function.
1942 (ppc64v1_emit_void_call_2): New function.
1943 (ppc64v2_emit_void_call_2): New function.
1944 (ppc64_emit_if_goto): New function.
1945 (ppc64_emit_eq_goto): New function.
1946 (ppc64_emit_ne_goto): New function.
1947 (ppc64_emit_lt_goto): New function.
1948 (ppc64_emit_le_goto): New function.
1949 (ppc64_emit_gt_goto): New function.
1950 (ppc64_emit_ge_goto): New function.
1951 (ppc64v1_emit_ops_impl): New static variable.
1952 (ppc64v2_emit_ops_impl): New static variable.
1953 (ppc_emit_ops): New function.
1954 (linux_low_target): Wire in ppc_emit_ops.
1955
a2174ba4
MK
19562016-03-31 Wei-cheng Wang <cole945@gmail.com>
1957 Marcin Kościelnicki <koriakin@0x04.net>
1958
1959 PR/17221
1960 * Makefile.in: Add powerpc-*-ipa.o
1961 * configure.srv: Add ipa_obj for powerpc*-linux.
1962 * linux-ppc-ipa.c: New file.
1963 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1964 includes.
1965 (PPC_FIELD): New macro.
1966 (PPC_SEXT): New macro.
1967 (PPC_OP6): New macro.
1968 (PPC_BO): New macro.
1969 (PPC_LI): New macro.
1970 (PPC_BD): New macro.
1971 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1972 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1973 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1974 (ppc_get_thread_area): New function.
1975 (is_elfv2_inferior): New function.
1976 (gen_ds_form): New function.
1977 (GEN_STD): New macro.
1978 (GEN_STDU): New macro.
1979 (GEN_LD): New macro.
1980 (GEN_LDU): New macro.
1981 (gen_d_form): New function.
1982 (GEN_ADDI): New macro.
1983 (GEN_ADDIS): New macro.
1984 (GEN_LI): New macro.
1985 (GEN_LIS): New macro.
1986 (GEN_ORI): New macro.
1987 (GEN_ORIS): New macro.
1988 (GEN_LWZ): New macro.
1989 (GEN_STW): New macro.
1990 (GEN_STWU): New macro.
1991 (gen_xfx_form): New function.
1992 (GEN_MFSPR): New macro.
1993 (GEN_MTSPR): New macro.
1994 (GEN_MFCR): New macro.
1995 (GEN_MTCR): New macro.
1996 (GEN_SYNC): New macro.
1997 (GEN_LWSYNC): New macro.
1998 (gen_x_form): New function.
1999 (GEN_OR): New macro.
2000 (GEN_MR): New macro.
2001 (GEN_LWARX): New macro.
2002 (GEN_STWCX): New macro.
2003 (GEN_CMPW): New macro.
2004 (gen_md_form): New function.
2005 (GEN_RLDICL): New macro.
2006 (GEN_RLDICR): New macro.
2007 (gen_i_form): New function.
2008 (GEN_B): New macro.
2009 (GEN_BL): New macro.
2010 (gen_b_form): New function.
2011 (GEN_BNE): New macro.
2012 (GEN_LOAD): New macro.
2013 (GEN_STORE): New macro.
2014 (gen_limm): New function.
2015 (gen_atomic_xchg): New function.
2016 (gen_call): New function.
2017 (ppc_relocate_instruction): New function.
2018 (ppc_install_fast_tracepoint_jump_pad): New function.
2019 (ppc_get_min_fast_tracepoint_insn_len): New function.
2020 (ppc_get_ipa_tdesc_idx): New function.
2021 (the_low_target): Wire in the new functions.
2022 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2023 tdescs.
2024 * linux-ppc-tdesc.h: New file.
2025
a13c4696
MK
20262016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2027
2028 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2029 (alloc_jump_pad_buffer): New function.
2030 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2031 (alloc_jump_pad_buffer): New function.
2032 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2033 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2034 (alloc_jump_pad_buffer): New function.
2035 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2036 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2037 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2038 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2039
1cda1512
MK
20402016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2041
2042 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2043 * linux-amd64-ipa.c: Likewise.
2044 * linux-i386-ipa.c: Likewise.
2045 * linux-s390-ipa.c: Likewise.
2046 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2047 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2048 set_trace_state_variable_value_ptr.
2049 (struct ipa_sym_addresses): Likewise.
2050 (symbol_list): Likewise.
2051 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2052 accessing gdb_collect directly.
2053 (gdb_collect_ptr_type): New typedef.
2054 (get_raw_reg_ptr_type): New typedef.
2055 (get_trace_state_variable_value_ptr_type): New typedef.
2056 (set_trace_state_variable_value_ptr_type): New typedef.
2057 (gdb_collect_ptr): New global.
2058 (get_raw_reg_ptr): New global.
2059 (get_trace_state_variable_value_ptr): New global.
2060 (set_trace_state_variable_value_ptr): New global.
2061 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2062 accessing get_raw_reg directly.
2063 (get_get_tsv_func_addr): Likewise for
2064 get_trace_state_variable_value_ptr.
2065 (get_set_tsv_func_addr): Likewise for
2066 set_trace_state_variable_value_ptr.
2067 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2068
72fb5488
SM
20692016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2070
2071 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2072
28170b88
MK
20732016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2074
2075 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2076 packets.
2077 (relocate_instruction): Remove own_buf.
2078 * server.c (own_buf): Make global.
2079 (handle_v_requests): Make global.
2080 * server.h (own_buf): New declaration.
2081 (handle_v_requests): New prototype.
2082
f39e8743
MK
20832016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2084
2085 PR 18377
2086 * linux-s390-low.c (add_insns): New function.
2087 (s390_emit_prologue): New function.
2088 (s390_emit_epilogue): New function.
2089 (s390_emit_add): New function.
2090 (s390_emit_sub): New function.
2091 (s390_emit_mul): New function.
2092 (s390_emit_lsh): New function.
2093 (s390_emit_rsh_signed): New function.
2094 (s390_emit_rsh_unsigned): New function.
2095 (s390_emit_ext): New function.
2096 (s390_emit_log_not): New function.
2097 (s390_emit_bit_and): New function.
2098 (s390_emit_bit_or): New function.
2099 (s390_emit_bit_xor): New function.
2100 (s390_emit_bit_not): New function.
2101 (s390_emit_equal): New function.
2102 (s390_emit_less_signed): New function.
2103 (s390_emit_less_unsigned): New function.
2104 (s390_emit_ref): New function.
2105 (s390_emit_if_goto): New function.
2106 (s390_emit_goto): New function.
2107 (s390_write_goto_address): New function.
2108 (s390_emit_litpool): New function.
2109 (s390_emit_const): New function.
2110 (s390_emit_call): New function.
2111 (s390_emit_reg): New function.
2112 (s390_emit_pop): New function.
2113 (s390_emit_stack_flush): New function.
2114 (s390_emit_zero_ext): New function.
2115 (s390_emit_swap): New function.
2116 (s390_emit_stack_adjust): New function.
2117 (s390_emit_set_r2): New function.
2118 (s390_emit_int_call_1): New function.
2119 (s390_emit_void_call_2): New function.
2120 (s390_emit_eq_goto): New function.
2121 (s390_emit_ne_goto): New function.
2122 (s390_emit_lt_goto): New function.
2123 (s390_emit_le_goto): New function.
2124 (s390_emit_gt_goto): New function.
2125 (s390_emit_ge_goto): New function.
2126 (s390x_emit_prologue): New function.
2127 (s390x_emit_epilogue): New function.
2128 (s390x_emit_add): New function.
2129 (s390x_emit_sub): New function.
2130 (s390x_emit_mul): New function.
2131 (s390x_emit_lsh): New function.
2132 (s390x_emit_rsh_signed): New function.
2133 (s390x_emit_rsh_unsigned): New function.
2134 (s390x_emit_ext): New function.
2135 (s390x_emit_log_not): New function.
2136 (s390x_emit_bit_and): New function.
2137 (s390x_emit_bit_or): New function.
2138 (s390x_emit_bit_xor): New function.
2139 (s390x_emit_bit_not): New function.
2140 (s390x_emit_equal): New function.
2141 (s390x_emit_less_signed): New function.
2142 (s390x_emit_less_unsigned): New function.
2143 (s390x_emit_ref): New function.
2144 (s390x_emit_if_goto): New function.
2145 (s390x_emit_const): New function.
2146 (s390x_emit_call): New function.
2147 (s390x_emit_reg): New function.
2148 (s390x_emit_pop): New function.
2149 (s390x_emit_stack_flush): New function.
2150 (s390x_emit_zero_ext): New function.
2151 (s390x_emit_swap): New function.
2152 (s390x_emit_stack_adjust): New function.
2153 (s390x_emit_int_call_1): New function.
2154 (s390x_emit_void_call_2): New function.
2155 (s390x_emit_eq_goto): New function.
2156 (s390x_emit_ne_goto): New function.
2157 (s390x_emit_lt_goto): New function.
2158 (s390x_emit_le_goto): New function.
2159 (s390x_emit_gt_goto): New function.
2160 (s390x_emit_ge_goto): New function.
2161 (s390_emit_ops): New function.
2162 (struct linux_target_ops): Fill in emit_ops hook.
2163
abd9baf9
MK
21642016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2165
2166 PR 18377
2167 * Makefile.in: Add s390 IPA files.
2168 * configure.srv: Build IPA for s390.
2169 * linux-s390-ipa.c: New file.
2170 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2171 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2172 (tdesc_s390_linux32): Likewise.
2173 (init_registers_s390_linux32v1): Likewise.
2174 (tdesc_s390_linux32v1): Likewise.
2175 (init_registers_s390_linux32v2): Likewise.
2176 (tdesc_s390_linux32v2): Likewise.
2177 (init_registers_s390_linux64): Likewise.
2178 (tdesc_s390_linux64): Likewise.
2179 (init_registers_s390_linux64v1): Likewise.
2180 (tdesc_s390_linux64v1): Likewise.
2181 (init_registers_s390_linux64v2): Likewise.
2182 (tdesc_s390_linux64v2): Likewise.
2183 (init_registers_s390_te_linux64): Likewise.
2184 (tdesc_s390_te_linux64): Likewise.
2185 (init_registers_s390_vx_linux64): Likewise.
2186 (tdesc_s390_vx_linux64): Likewise.
2187 (init_registers_s390_tevx_linux64): Likewise.
2188 (tdesc_s390_tevx_linux64): Likewise.
2189 (init_registers_s390x_linux64): Likewise.
2190 (tdesc_s390x_linux64): Likewise.
2191 (init_registers_s390x_linux64v1): Likewise.
2192 (tdesc_s390x_linux64v1): Likewise.
2193 (init_registers_s390x_linux64v2): Likewise.
2194 (tdesc_s390x_linux64v2): Likewise.
2195 (init_registers_s390x_te_linux64): Likewise.
2196 (tdesc_s390x_te_linux64): Likewise.
2197 (init_registers_s390x_vx_linux64): Likewise.
2198 (tdesc_s390x_vx_linux64): Likewise.
2199 (init_registers_s390x_tevx_linux64): Likewise.
2200 (tdesc_s390x_tevx_linux64): Likewise.
2201 (have_hwcap_s390_vx): New static variable.
2202 (s390_arch_setup): Fill have_hwcap_s390_vx.
2203 (s390_get_thread_area): New function.
2204 (s390_ft_entry_gpr_esa): New const.
2205 (s390_ft_entry_gpr_zarch): New const.
2206 (s390_ft_entry_misc): New const.
2207 (s390_ft_entry_fr): New const.
2208 (s390_ft_entry_vr): New const.
2209 (s390_ft_main_31): New const.
2210 (s390_ft_main_64): New const.
2211 (s390_ft_exit_fr): New const.
2212 (s390_ft_exit_vr): New const.
2213 (s390_ft_exit_misc): New const.
2214 (s390_ft_exit_gpr_esa): New const.
2215 (s390_ft_exit_gpr_zarch): New const.
2216 (append_insns): New function.
2217 (s390_relocate_instruction): New function.
2218 (s390_install_fast_tracepoint_jump_pad): New function.
2219 (s390_get_min_fast_tracepoint_insn_len): New function.
2220 (s390_get_ipa_tdesc_idx): New function.
2221 (struct linux_target_ops): Wire in the above functions.
2222 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2223 * linux-s390-tdesc.h: New file.
2224
a4105d04
MK
22252016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2226
2227 * linux-s390-low.c (s390_supports_tracepoints): New function.
2228 (struct linux_target_ops): Fill supports_tracepoints hook.
2229
35ac8b3e
YQ
22302016-03-18 Yao Qi <yao.qi@linaro.org>
2231
2232 * linux-low.c (lwp_signal_can_be_delivered): New function.
2233 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2234
94610ec4
YQ
22352016-03-18 Yao Qi <yao.qi@linaro.org>
2236
2237 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2238 0 if signal is enqueued. Remove 'signal' from one debugging
2239 message. Move one debugging message to some lines below.
2240 Remove code setting 'signal' to 0.
2241
80aea927
YQ
22422016-03-18 Yao Qi <yao.qi@linaro.org>
2243
2244 * linux-low.c (linux_low_filter_event): Remove redundant
2245 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2246
b04fd3be
MK
22472016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2248
2249 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2250 (struct linux_target_ops): Wire in the above.
2251
c40c8d4b
YQ
22522016-03-03 Yao Qi <yao.qi@linaro.org>
2253
2254 * linux-low.c: Update comments to start_step_over.
2255
0f8288ae
YQ
22562016-03-03 Yao Qi <yao.qi@linaro.org>
2257
2258 PR server/19736
2259 * linux-low.c (handle_extended_wait): Set child suspended
2260 if event_lwp->bp_reinsert isn't zero.
2261
fdbd04a8
YQ
22622016-03-02 Yao Qi <yao.qi@linaro.org>
2263
2264 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2265 enqueue_pending_signal.
2266
6896a8fa
MK
22672016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2268
2269 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2270 is actually loaded.
2271
ab503087
MK
22722016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2273
2274 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2275 (s390_regmap_3264) [!__s390x__]: New global.
2276 (s390_collect_ptrace_register): Skip map entries containing -1.
2277 (s390_supply_ptrace_register): Ditto.
2278 (s390_fill_gprs_high): New function.
2279 (s390_store_gprs_high): New function.
2280 (s390_regsets): Add NT_S390_HIGH_GPRS.
2281 (s390_get_hwcap): Enable on 31-bit.
2282 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2283 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2284 Detect NT_S390_HIGH_GPRS.
2285 (s390_usrregs_info_3264): Enable on 31-bit.
2286 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2287 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2288
ae91f625
MK
22892016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2290
2291 PR gdb/13808
2292 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2293 * configure.srv: Ditto.
2294 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2295 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2296 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2297 (init_registers_amd64_linux): Remove prototype.
2298 (tdesc_amd64_linux): Remove declaration.
2299 (get_ipa_tdesc): New function.
2300 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2301 initialize remaining tdescs.
2302 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2303 (init_registers_i386_linux): Remove prototype.
2304 (tdesc_i386_linux): Remove declaration.
2305 (get_ipa_tdesc): New function.
2306 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2307 initialize remaining tdescs.
2308 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2309 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2310 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2311 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2312 (x86_get_ipa_tdesc_idx): New function.
2313 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2314 * linux-x86-tdesc.h: New file.
2315 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2316 (target_get_ipa_tdesc_idx): New macro.
2317 * tracepoint.c (ipa_tdesc_idx): New macro.
2318 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2319 (symbol_list): Add ipa_tdesc_idx.
2320 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2321 (ipa_tdesc): Remove.
2322 (ipa_tdesc_idx): New variable.
2323 (get_context_regcache): Use get_ipa_tdesc.
2324 (gdb_collect): Ditto.
2325 (gdb_probe): Ditto.
2326 * tracepoint.h (get_ipa_tdesc): New prototype.
2327 (ipa_tdesc): Remove.
2328
e7ad2f14
PA
23292016-02-24 Pedro Alves <palves@redhat.com>
2330
2331 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2332 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2333 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2334 Factor out common code between the USE_SIGTRAP_SIGINFO and
2335 !USE_SIGTRAP_SIGINFO blocks.
2336 (linux_low_filter_event): Call save_stop_reason instead of
2337 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2338 Update comments.
2339 (linux_wait_1): Update comments.
2340
657f9cde
WW
23412016-02-24 Wei-cheng Wang <cole945@gmail.com>
2342
2343 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2344 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2345 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2346 ppc_insert_point, ppc_remove_point.
2347
b00b61e1
MK
23482016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2349
2350 * linux-s390-low.c (s390_supports_z_point_type): New function.
2351 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2352
553cb527
YQ
23532016-02-16 Yao Qi <yao.qi@linaro.org>
2354
2355 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2356 PC. Get pc from regcache_read_pc.
2357
a5652c21
YQ
23582016-02-12 Yao Qi <yao.qi@linaro.org>
2359
2360 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2361 or linux_get_pc_32bit.
2362 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2363
ed443b61
YQ
23642016-02-12 Yao Qi <yao.qi@linaro.org>
2365
2366 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2367 arm_linux_get_next_pcs_fixup.
2368
020ecd38
MK
23692016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2370
2371 * tracepoint.c (x_tracepoint_action_download): Change
2372 write_inferior_data_ptr to write_inferior_data_pointer.
2373 (cmd_qtstart): Likewise.
2374 (write_inferior_data_ptr): Remove.
2375 (download_agent_expr): Change write_inferior_data_ptr to
2376 write_inferior_data_pointer.
2377 (download_tracepoint_1): Likewise.
2378 (download_tracepoint): Likewise.
2379 (download_trace_state_variables): Likewise.
2380
7cae9051
WW
23812016-02-11 Wei-cheng Wang <cole945@gmail.com>
2382 Marcin Kościelnicki <koriakin@0x04.net>
2383
2384 * tracepoint.c (struct tracepoint_action_ops): Remove.
2385 (struct tracepoint_action): Remove ops.
2386 (m_tracepoint_action_download, r_tracepoint_action_download)
2387 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2388 size and offset accordingly.
2389 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2390 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2391 (tracepoint_action_send, tracepoint_action_download): New functions.
2392 Helpers for trace action handlers.
2393 (add_tracepoint_action): Remove setup actions ops.
2394 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2395
9f6a71b4
YQ
23962016-02-10 Yao Qi <yao.qi@linaro.org>
2397
2398 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2399
1e94266c
SM
24002016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2401
2402 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2403 to AC_OUTPUT.
2404 * configure: Regenerate.
2405
8adce034
SM
24062016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2407
2408 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2409 void * to gdb_byte *.
2410 * linux-low.c (siginfo_fixup): Likewise.
2411 (linux_xfer_siginfo): Likewise.
2412 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2413 Likewise.
2414 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2415
93813b37
WT
24162016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2417
2418 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2419 to srv_tgtobj.
2420 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2421 to srv_tgtobj.
2422 * linux-x86-low.c [__x86_64__]: Include
2423 "nat/amd64-linux-siginfo.h".
2424 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2425 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2426 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2427 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2428 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2429 (cpt_si_fd, si_timerid, si_overrun): Move from
2430 nat/amd64-linux-siginfo.c.
2431 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2432
8424cc97
SM
24332016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2434
2435 * server.c (skip_to_semicolon): Remove.
2436 (process_point_options): Use strchrnul instead of
2437 skip_to_semicolon.
2438
4d18591b
YQ
24392016-01-26 Yao Qi <yao.qi@linaro.org>
2440
2441 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2442 * linux-low.c (install_software_single_step_breakpoints): Don't
2443 call regcache_read_pc.
2444 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2445 argument pc.
2446
d8020970
YQ
24472016-01-26 Yao Qi <yao.qi@linaro.org>
2448
2449 * linux-low.c (install_software_single_step_breakpoints): Call
2450 regcache_read_pc instead of get_pc.
2451
8b207339
YQ
24522016-01-26 Yao Qi <yao.qi@linaro.org>
2453
2454 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2455 (unblock_async_io): Rename to ...
2456 (block_unblock_async_io): ... it. New function.
2457 (enable_async_io): Don't install SIGIO handler. Unblock it
2458 instead.
2459 (disable_async_io): Don't ignore SIGIO. Block it instead.
2460 (initialize_async_io): Install SIGIO handler. Don't call
2461 unblock_async_io.
2462
18879fef
YQ
24632016-01-26 Yao Qi <yao.qi@linaro.org>
2464
2465 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2466 first character is '\003', call *the_target->request_interrupt.
2467
a0f8e08a
YQ
24682016-01-25 Yao Qi <yao.qi@linaro.org>
2469
2470 * remote-utils.c (new_thread_notify): Remove.
2471 (dead_thread_notify): Likewise.
2472 * remote-utils.h (new_thread_notify): Remove declaration.
2473 (dead_thread_notify): Likewise.
2474
cc5fd9ab
MK
24752016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2476
2477 * gdb.trace/pending.exp: Fix expected message on continue.
2478
99e8eb11
MK
24792016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2480
2481 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2482 it works properly on big-endian machines where sizeof (CORE_ADDR)
2483 != sizeof (void *).
2484
a994041d
PA
24852016-01-21 Pedro Alves <palves@redhat.com>
2486
2487 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2488 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2489 * configure: Regenerate.
2490
f7a6a40d
YQ
24912016-01-21 Yao Qi <yao.qi@linaro.org>
2492
2493 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2494 is_thumb and set it according to CPSR saved on the stack.
2495 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2496 arm_sigreturn_next_pc.
2497
6f69e520
YQ
24982016-01-18 Yao Qi <yao.qi@linaro.org>
2499
2500 * linux-low.c (linux_set_pc_64bit): New function.
2501 (linux_get_pc_64bit): New function.
2502 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2503 Declare.
2504 * linux-sparc-low.c (debug_threads): Remove declaration.
2505 (sparc_get_pc): Remove.
2506 (the_low_target): Use linux_get_pc_64bit instead of
2507 sparc_get_pc.
2508 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2509 (the_low_target): Use linux_get_pc_64bit and
2510 linux_set_pc_64bit.
2511
276d4552
YQ
25122016-01-18 Yao Qi <yao.qi@linaro.org>
2513
2514 * linux-arm-low.c (debug_threads): Remove declaration.
2515 (arm_get_pc, arm_set_pc): Remove.
2516 (the_low_target): Use linux_get_pc_32bit and
2517 linux_set_pc_32bit.
2518 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2519 (the_low_target): Use linux_get_pc_32bit and
2520 linux_set_pc_32bit.
2521 * linux-cris-low.c (debug_threads): Remove declaration.
2522 (cris_get_pc, cris_set_pc,): Remove.
2523 (the_low_target): Use linux_get_pc_32bit and
2524 linux_set_pc_32bit.
2525 * linux-crisv32-low.c (debug_threads): Remove declaration.
2526 (cris_get_pc, cris_set_pc): Remove.
2527 (the_low_target): Use linux_get_pc_32bit and
2528 linux_set_pc_32bit.
2529 * linux-low.c: Include inttypes.h.
2530 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2531 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2532 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2533 (the_low_target): Use linux_get_pc_32bit and
2534 linux_set_pc_32bit.
2535 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2536 (the_low_target): Use linux_get_pc_32bit and
2537 linux_set_pc_32bit.
2538 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2539 (the_low_target): Use linux_get_pc_32bit and
2540 linux_set_pc_32bit.
2541 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2542 (the_low_target): Use linux_get_pc_32bit and
2543 linux_set_pc_32bit.
2544 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2545 (the_low_target): Use linux_get_pc_32bit and
2546 linux_set_pc_32bit.
2547
eb0edac8
GB
25482016-01-18 Gary Benson <gbenson@redhat.com>
2549
2550 * configure.ac (AC_FUNC_FORK): New check.
2551 * config.in: Regenerate.
2552 * configure: Likewise.
2553
1b451dda
YQ
25542016-01-14 Yao Qi <yao.qi@linaro.org>
2555
2556 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2557 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2558 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2559 arm_get_next_pcs_ctor.
2560
82075af2
JS
25612016-01-12 Josh Stone <jistone@redhat.com>
2562 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2563
2564 * inferiors.h: Include "gdb_vecs.h".
2565 (struct process_info): Add syscalls_to_catch.
2566 * inferiors.c (remove_process): Free syscalls_to_catch.
2567 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2568 syscall_return stops.
2569 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2570 * server.c (handle_general_set): Handle QCatchSyscalls.
2571 (handle_query): Report support for QCatchSyscalls.
2572 * target.h (struct target_ops): Add supports_catch_syscall.
2573 (target_supports_catch_syscall): New macro.
2574 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2575 (struct lwp_info): Add syscall_state.
2576 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2577 Maintain syscall_state and syscalls_to_catch across exec.
2578 (get_syscall_trapinfo): New function, proxy to the_low_target.
2579 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2580 (linux_low_filter_event): Toggle syscall_state entry/return for
2581 syscall traps, and set it ignored for all others.
2582 (gdb_catching_syscalls_p): New function.
2583 (gdb_catch_this_syscall_p): New function.
2584 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2585 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2586 (linux_supports_catch_syscall): New function.
2587 (linux_target_ops): Install it.
2588 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2589 (the_low_target): Install it.
2590
8f13a3ce
MF
25912016-01-12 Mike Frysinger <vapier@gentoo.org>
2592
2593 * acinclude.m4: Include new ../warning.m4 file.
2594 * configure: Regenerated.
2595 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2596
5b3da067
MF
25972016-01-12 Mike Frysinger <vapier@gentoo.org>
2598
2599 * ax.c (is_goto_target): Mark static.
2600 * linux-low.c (register_addr): Likewise.
2601 (linux_fetch_registers, linux_store_registers): Likewise.
2602 * mem-break.c (any_persistent_commands): Fix old prototype.
2603 (add_commands_to_breakpoint): Mark static.
2604 * regcache.c (find_register_by_name): Delete unused func.
2605 * remote-utils.c (hex_or_minus_one): Mark static.
2606 * server.c (monitor_show_help): Mark static.
2607 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2608 handle_v_requests): Likewise.
2609
bc504a31
PA
26102016-01-12 Pedro Alves <palves@redhat.com>
2611
2612 Remove use of the registered trademark symbol throughout.
2613
5a0dd67a
YQ
26142016-01-08 Yao Qi <yao.qi@linaro.org>
2615
2616 * remote-utils.c (getpkt): If c is '\003', call target hook
2617 request_interrupt.
2618
b2ca446f
YQ
26192016-01-06 Yao Qi <yao.qi@linaro.org>
2620
2621 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2622 linux-aarch32-low.c.
2623 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2624 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2625 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2626 (thumb2_breakpoint): Declare.
2627 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2628 linux-aarch32-low.h.
2629 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2630 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2631 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2632
edd88788
JB
26332016-01-01 Joel Brobecker <brobecker@adacore.com>
2634
2635 * gdbreplay.c (gdbreplay_version): Change copyright year in
2636 version message.
2637 * server.c (gdbserver_version): Likewise.
2638
65da7f14
PP
26392015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2640
2641 * server.c (crc32_table): Delete.
2642 (crc32): Use libiberty's xcrc32 function.
2643
4abd5ed2
JB
26442015-12-22 Joel Brobecker <brobecker@adacore.com>
2645
2646 * lynx-low.c (lynx_delete_thread_callback): New function.
2647 (lynx_mourn): Properly delete our process and all of its
2648 threads. Remove call to clear_inferiors.
2649
0e50fe5c
JB
26502015-12-22 Joel Brobecker <brobecker@adacore.com>
2651
2652 * target.c (thread_search_callback): Add check that
2653 the thread_stopped target callback is not NULL before
2654 calling it.
2655
35adc03f
YQ
26562015-12-21 Yao Qi <yao.qi@linaro.org>
2657
2658 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2659 arm breakpoint.
2660
bd2b2909
AT
26612015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2662
2663 * server.c (handle_query): Call target_supports_software_single_step.
2664
7fe5e27e
AT
26652015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2666
2667 * linux-low.c (single_step): New function.
2668 (linux_resume_one_lwp_throw): Call single_step.
2669 (start_step_over): Likewise.
2670
d9311bfa
AT
26712015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2672
2673 * Makefile.in (SFILES): Append arch/arm-linux.c,
2674 arch/arm-get-next-pcs.c.
2675 (arm-linux.o): New rule.
2676 (arm-get-next-pcs.o): New rule.
2677 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2678 arm-linux.o.
2679 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2680 to linux-aarch32-low.c.
2681 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2682 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2683 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2684 (thumb2_breakpoint_len): Likewise.
2685 (arm_is_thumb_mode): Make non-static.
2686 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2687 from linux-aarch32-low.c.
2688 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2689 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2690 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2691 (thumb2_breakpoint_len): Likewise.
2692 (arm_is_thumb_mode): New declaration.
2693 * linux-arm-low.c: Include arch/arm-linux.h
2694 aarch/arm-get-next-pcs.h, sys/syscall.h.
2695 (get_next_pcs_ops): New struct.
2696 (get_next_pcs_addr_bits_remove): New function.
2697 (get_next_pcs_is_thumb): New function.
2698 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2699 (arm_sigreturn_next_pc): Likewise.
2700 (get_next_pcs_syscall_next_pc): Likewise.
2701 (arm_gdbserver_get_next_pcs): Likewise.
2702 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2703 Initialize.
2704 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2705 * server.h: Include gdb_vecs.h.
2706
68ce2059
AT
27072015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2708
2709 * Makefile.in (SFILES): Append common/common-regcache.c.
2710 (OBS): Append common-regcache.o.
2711 (common-regcache.o): New rule.
2712 * regcache.c (init_register_cache): Initialize cache to
2713 REG_UNAVAILABLE.
2714 (regcache_raw_read_unsigned): New function.
2715 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2716 register_status enum.
2717
fa5308bd
AT
27182015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2719
2720 * linux-aarch64-low.c (the_low_targets): Rename
2721 breakpoint_reinsert_addr to get_next_pcs.
2722 * linux-arm-low.c (the_low_targets): Likewise.
2723 * linux-bfin-low.c (the_low_targets): Likewise.
2724 * linux-cris-low.c (the_low_targets): Likewise.
2725 * linux-crisv32-low.c (the_low_targets): Likewise.
2726 * linux-low.c (can_software_single_step): Likewise.
2727 (install_software_single_step_breakpoints): New function.
2728 (start_step_over): Use install_software_single_step_breakpoints.
2729 * linux-low.h: New CORE_ADDR vector.
2730 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2731 get_next_pcs.
2732 * linux-mips-low.c (the_low_targets): Likewise.
2733 * linux-nios2-low.c (the_low_targets): Likewise.
2734 * linux-sparc-low.c (the_low_targets): Likewise.
2735
4a6ed09b
PA
27362015-12-17 Pedro Alves <palves@redhat.com>
2737
2738 * linux-low.c (linux_kill_one_lwp): Remove references to
2739 LinuxThreads.
2740 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2741 to 'kill'.
2742 (linux_init_signals): Delete.
2743 (initialize_low): Adjust.
2744 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2745
7544db95
PA
27462015-12-16 Pedro Alves <palves@redhat.com>
2747
2748 * configure.ac (compiler warning flags): When testing a
2749 -Wno-foo option, check whether -Wfoo works instead.
2750 * configure: Regenerate.
2751
8020350c
DB
27522015-12-11 Don Breazeal <donb@codesourcery.com>
2753
2754 * server.c (process_serial_event): Don't exit from gdbserver
2755 in remote mode if there are still active inferiors.
2756
db91f502
YQ
27572015-12-11 Yao Qi <yao.qi@linaro.org>
2758
2759 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2760 arm_breakpoint_at if the process is 32-bit.
2761
b37a6290
YQ
27622015-12-11 Yao Qi <yao.qi@linaro.org>
2763
2764 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2765 arm breakpoint.
2766
17b1509a
YQ
27672015-12-07 Yao Qi <yao.qi@linaro.org>
2768
2769 * configure.srv: Append arm.o to srv_tgtobj for
2770 aarch64*-*-linux* target.
2771 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2772 from linux-arm-low.c.
2773 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2774 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2775 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2776 (thumb2_breakpoint_len): Likewise.
2777 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2778 (arm_breakpoint_kinds): Likewise.
2779 (arm_breakpoint_kind_from_pc): Likewise.
2780 (arm_sw_breakpoint_from_kind): Likewise.
2781 (arm_breakpoint_kind_from_current_state): Likewise.
2782 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2783 (arm_sw_breakpoint_from_kind): Declare.
2784 (arm_breakpoint_kind_from_current_state): Declare.
2785 (arm_breakpoint_at): Declare.
2786 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2787 arm_sw_breakpoint_from_kind if process is 32-bit.
2788 (aarch64_breakpoint_kind_from_pc): New function.
2789 (aarch64_breakpoint_kind_from_current_state): New function.
2790 (the_low_target): Initialize fields breakpoint_kind_from_pc
2791 and breakpoint_kind_from_current_state.
2792 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2793 linux-aarch32-low.c.
2794 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2795 (arm_breakpoint, arm_breakpoint_len): Likewise.
2796 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2797 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2798 (arm_is_thumb_mode): Likewise.
2799 (arm_breakpoint_at): Likewise.
2800 (arm_breakpoint_kind_from_pc): Likewise.
2801 (arm_sw_breakpoint_from_kind): Likewise.
2802 (arm_breakpoint_kind_from_current_state): Likewise.
2803
2804 Revert:
2805 2015-08-04 Yao Qi <yao.qi@linaro.org>
2806
2807 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2808 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2809 * server.c (extended_protocol): Remove "static".
2810 * server.h (extended_protocol): Declare it.
2811
ece66d65
JS
28122015-12-04 Josh Stone <jistone@redhat.com>
2813
2814 * target.h (struct target_ops) <arch_setup>: Rename to ...
2815 (struct target_ops) <post_create_inferior>: ... this.
2816 (target_arch_setup): Rename to ...
2817 (target_post_create_inferior): ... this, calling post_create_inferior.
2818 * server.c (start_inferior): Update target_arch_setup calls to
2819 target_post_create_inferior.
2820 * linux-low.c (linux_low_ptrace_options): Forward declare.
2821 (linux_arch_setup): Update its comment for general use.
2822 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2823 (struct linux_target_ops): Use linux_post_create_inferior.
2824 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2825 to post_create_inferior.
2826 * nto-low.c (struct nto_target_ops): Likewise.
2827 * spu-low.c (struct spu_target_ops): Likewise.
2828 * win32-low.c (struct win32_target_ops): Likewise.
2829
e58c48b4
AT
28302015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2831
2832 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2833
fbec8956
AT
28342015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2835
2836 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2837 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2838 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2839 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2840 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2841 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2842 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2843 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2844 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2845 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2846 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2847 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2848
9b4c5f87
AT
28492015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2850
2851 * linux-low.c (linux_look_up_symbols): Don't call
2852 linux_supports_traceclone.
2853 * linux-low.h (thread_db_init): Remove use_events argument.
2854 * thread-db.c (thread_db_use_event): Remove global variable.
2855 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2856 (struct thread_db) <td_create_bp>: Remove field.
2857 (thread_db_create_event): Remove function.
2858 (thread_db_enable_reporting): Likewise.
2859 (find_one_thread): Don't check for thread_db_use_events.
2860 (attach_thread): Likewise.
2861 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2862 (try_thread_db_load_1): Don't check for thread_db_use_events.
2863 (thread_db_init): Remove use_events argument and thread events
2864 handling.
2865 (remove_thread_event_breakpoints): Remove function.
2866 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2867
7d00775e
AT
28682015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2869
2870 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2871 New function.
2872 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2873 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2874 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2875 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2876 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2877 Initialize.
2878 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2879 New function.
2880 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2881 * linux-low.c (can_hardware_single_step): Use
2882 supports_hardware_single_step.
2883 (can_software_single_step): New function.
2884 (start_step_over): Call can_software_single_step.
2885 (linux_supports_hardware_single_step): New function.
2886 (struct target_ops) <supports_software_single_step>: Initialize.
2887 * linux-low.h (struct linux_target_ops)
2888 <supports_hardware_single_step>: Initialize.
2889 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2890 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2891 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2892 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2893 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2894 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2895 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2896 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2897 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2898 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2899 Initialize.
2900 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2901 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2902 Initialize.
2903 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2904 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2905 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2906 New function.
2907 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2908 * target.h (struct target_ops): <supports_software_single_step>:
2909 New field.
2910 (target_supports_software_single_step): New macro.
2911
2d97cd35
AT
29122015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2913
2914 * linux-low.c (linux_wait_1): Fix pc advance condition.
2915 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2916 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2917
769ef81f
AT
29182015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2919
2920 * linux-arm-low.c (arm_is_thumb_mode): New function.
2921 (arm_breakpoint_at): Use arm_is_thumb_mode.
2922 (arm_breakpoint_kind_from_current_state): New function.
2923 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2924 Initialize.
2925 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2926 (linux_breakpoint_kind_from_current_state): New function.
2927 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2928 * linux-low.h (struct linux_target_ops)
2929 <breakpoint_kind_from_current_state>: New field.
2930 * target.h (struct target_ops): Likewise.
2931 (target_breakpoint_kind_from_current_state): New macro.
2932
1bebeeca
PA
29332015-11-30 Pedro Alves <palves@redhat.com>
2934
2935 * linux-low.c (linux_resume): Wake up the event loop before
2936 returning.
2937
a67a9fae
PA
29382015-11-30 Pedro Alves <palves@redhat.com>
2939
2940 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2941 check.
2942 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2943 to -1.
2944 * target.c (struct thread_search): New structure.
2945 (thread_search_callback): New function.
2946 (prev_general_thread): New global.
2947 (prepare_to_access_memory, done_accessing_memory): New functions.
2948 * target.h (prepare_to_access_memory, done_accessing_memory):
2949 Replace macros with function declarations.
2950
f2faf941
PA
29512015-11-30 Pedro Alves <palves@redhat.com>
2952
2953 PR 14618
2954 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2955 report TARGET_WAITKIND_NO_RESUMED.
2956 * remote-utils.c (prepare_resume_reply): Handle
2957 TARGET_WAITKIND_NO_RESUMED.
2958 * server.c (report_no_resumed): New global.
2959 (handle_query) <qSupported>: Handle "no-resumed+". Report
2960 "no-resumed+" support.
2961 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2962 return error if the client doesn't support no-resumed events.
2963 (push_stop_notification): New function.
2964 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2965 events if the client supports them.
2966
a681f9c9
PA
29672015-11-30 Pedro Alves <palves@redhat.com>
2968
2969 * linux-low.c (thread_still_has_status_pending_p): Don't check
2970 vCont;t here.
2971 (lwp_resumed): New function.
2972 (status_pending_p_callback): Return early if the LWP is not
2973 supposed to be resumed.
2974
65706a29
PA
29752015-11-30 Pedro Alves <palves@redhat.com>
2976
2977 * linux-low.c (handle_extended_wait): Assert that the LWP's
2978 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2979 thread create events, leave the new child's status pending.
2980 (linux_low_filter_event): If GDB wants to hear about thread exit
2981 events, leave the LWP marked dead and don't delete it.
2982 (linux_wait_for_event_filtered): Don't check for thread exit.
2983 (filter_exit_event): New function.
2984 (linux_wait_1): Use it, when returning an exit event.
2985 (linux_resume_one_lwp_throw): Assert that the LWP's
2986 waitstatus is TARGET_WAITKIND_IGNORE.
2987 * remote-utils.c (prepare_resume_reply): Handle
2988 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2989 * server.c (report_thread_events): New global.
2990 (handle_general_set): Handle QThreadEvents.
2991 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2992 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2993 TARGET_WAITKIND_THREAD_EXITED.
2994 * server.h (report_thread_events): Declare.
2995
56cf4bed
PA
29962015-11-30 Pedro Alves <palves@redhat.com>
2997
2998 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2999 the thread's last_resume_kind was resume_stop.
3000
500c1d85
PA
30012015-11-30 Pedro Alves <palves@redhat.com>
3002
3003 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3004 before returning.
3005
de979965
PA
30062015-11-30 Pedro Alves <palves@redhat.com>
3007
3008 * server.c (handle_v_requests): Handle vCtrlC.
3009
34c65914
PA
30102015-11-30 Pedro Alves <palves@redhat.com>
3011
3012 * gdbthread.h (find_any_thread_of_pid): Declare.
3013 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3014 functions.
3015 * server.c (handle_query): If current_thread is NULL, look for
3016 another thread of the selected process.
3017
79efa585 30182015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 3019 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
3020
3021 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3022 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3023 name in reply.
3024 * target.h (struct target_ops) <thread_name>: New field.
3025 (target_thread_name): New macro.
3026
80d82c19
JB
30272015-11-23 Joel Brobecker <brobecker@adacore.com>
3028
3029 * regcache.h (regcache_invalidate_pid): Add declaration.
3030 * regcache.c (regcache_invalidate_pid): New function, extracted
3031 from regcache_invalidate.
3032 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3033 Add trivial documentation comment.
3034 * lynx-low.c: Use regcache_invalidate_pid instead of
3035 regcache_invalidate.
3036
64da5dd5
JB
30372015-11-23 Joel Brobecker <brobecker@adacore.com>
3038
3039 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3040 and Elf64_auxv_t if the target is Android.
3041
37ce4055
DE
30422015-11-22 Doug Evans <xdje42@gmail.com>
3043
3044 * target.h: #include <sys/types.h>.
3045
06e03fff
PA
30462015-11-19 Pedro Alves <palves@redhat.com>
3047
3048 * linux-low.c (linux_process_qsupported): Change prototype.
3049 Adjust.
3050 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3051 Change prototype.
3052 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3053 and adjust to loop over all features.
3054 * server.c (handle_query) <qSupported>: Adjust to call
3055 target_process_qsupported once, passing it a vector of unprocessed
3056 features.
3057 * target.h (struct target_ops) <process_qsupported>: Change
3058 prototype.
3059 (target_process_qsupported): Adjust.
3060
9a084706
PA
30612015-11-19 Pedro Alves <palves@redhat.com>
3062
3063 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3064 mode.
3065 * configure: Regenerate.
3066
dad44a1f
PA
30672015-11-19 Pedro Alves <palves@redhat.com>
3068
3069 * configure: Regenerate.
3070
231c0592
YQ
30712015-11-19 Yao Qi <yao.qi@linaro.org>
3072
3073 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3074 type to uint32_t.
3075
6c1c9a8b
YQ
30762015-11-19 Yao Qi <yao.qi@linaro.org>
3077
3078 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3079 (struct aarch64_operand): Move enum out.
3080
9caa3311
YQ
30812015-11-19 Yao Qi <yao.qi@linaro.org>
3082
3083 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3084 struct user_fpsimd_state *.
3085 (aarch64_store_fpregset): Likewise.
3086
6a69a054
YQ
30872015-11-19 Yao Qi <yao.qi@linaro.org>
3088
3089 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3090 struct user_pt_regs *.
3091 (aarch64_store_gregset): Likewise.
3092
1798301e
PA
30932015-11-18 Pedro Alves <palves@redhat.com>
3094
3095 * Makefile.in (all_object_files): Add $IPA_OBJS.
3096
ce7715e2
PA
30972015-11-17 Pedro Alves <palves@redhat.com>
3098
3099 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3100 GDB_SIGNAL_0 and gdb_signal_to_string.
3101
c0879059
PA
31022015-11-17 Pedro Alves <palves@redhat.com>
3103
3104 * win32-low.c (handle_output_debug_string): Remove parameter.
3105 (win32_kill): Remove our_status local and adjust call to
3106 handle_output_debug_string.
3107 (get_child_debug_event): Adjust call to
3108 handle_output_debug_string.
3109
1996e237
SM
31102015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3111
3112 * linux-mips-low.c (mips_fill_gregset): Add cast.
3113 (mips_store_gregset): Likewise.
3114 (mips_fill_fpregset): Likewise.
3115 (mips_store_fpregset): Likewise.
3116
cbec665b
SM
31172015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3118
3119 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3120 priv.
3121
eb3e3c67
SM
31222015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3123
3124 * linux-mips-low.c (mips_linux_new_thread): Change type of
3125 watch_type to enum target_hw_bp_type.
3126
171de4b8
SM
31272015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3128
3129 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3130 Change return type to arm_hwbp_type.
3131
04248ead
SM
31322015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3133
3134 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3135 (arm_store_gregset): Likewise.
3136 * linux-arm-low.c (arm_get_hwcap): Likewise.
3137 (arm_read_description): Likewise.
3138
04b3479c
SM
31392015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3140
3141 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3142
2bc84e8a
SM
31432015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3144
3145 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3146 (ppc_fill_vsxregset): Likewise.
3147 (ppc_store_vsxregset): Likewise.
3148 (ppc_fill_vrregset): Likewise.
3149 (ppc_store_vrregset): Likewise.
3150 (ppc_fill_evrregset): Likewise.
3151 (ppc_store_evrregset): Likewise.
3152
e6c5bb05
SM
31532015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3154
3155 * linux-ppc-low.c (ppc_usrregs_info): Remove
3156 forward-declaration.
3157 (ppc_arch_setup): Move lower in file.
3158
7ea45d72
SM
31592015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3160
3161 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3162 (ps_pdwrite): Likewise.
3163
69291610
HW
31642015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3165
3166 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3167 to after assert checks.
3168
b42945fd
SM
31692015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3170
3171 * proc-service.c (ps_pdread): Add/adjust casts.
3172 (ps_pdwrite): Add/adjust casts.
3173
d6f85c84
SM
31742015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3175
3176 * server.c (handle_search_memory_1): Cast return value of
3177 memmem.
3178
f98cd059
SM
31792015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3180
3181 * server.c (write_qxfer_response): Change type of data to
3182 gdb_byte *.
3183
d2412fa5
PA
31842015-10-29 Pedro Alves <palves@redhat.com>
3185
3186 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3187
c17414a2
PA
31882015-10-29 Pedro Alves <palves@redhat.com>
3189
3190 * tracepoint.c (clear_installed_tracepoints): Add casts.
3191
e053fbc4
PA
31922015-10-29 Pedro Alves <palves@redhat.com>
3193
3194 * server.c (handle_v_cont, process_serial_event): Add enum
3195 gdb_signal casts to signal parsing code.
3196
add67df8
PA
31972015-10-29 Pedro Alves <palves@redhat.com>
3198
3199 * linux-low.h (NULL_REGSET): Define.
3200 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3201 * linux-arm-low.c (arm_regsets): Likewise.
3202 * linux-crisv32-low.c (cris_regsets): Likewise.
3203 * linux-m68k-low.c (m68k_regsets): Likewise.
3204 * linux-mips-low.c (mips_regsets): Likewise.
3205 * linux-nios2-low.c (nios2_regsets): Likewise.
3206 * linux-ppc-low.c (ppc_regsets): Likewise.
3207 * linux-s390-low.c (s390_regsets): Likewise.
3208 * linux-sh-low.c (sh_regsets): Likewise.
3209 * linux-sparc-low.c (sparc_regsets): Likewise.
3210 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3211 * linux-tile-low.c (tile_regsets): Likewise.
3212 * linux-x86-low.c (x86_regsets): Likewise.
3213 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3214
50bc912a
PA
32152015-10-29 Pedro Alves <palves@redhat.com>
3216
3217 * linux-low.h (NULL_REGSET): Define.
3218 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3219 * linux-arm-low.c (arm_regsets): Likewise.
3220 * linux-crisv32-low.c (cris_regsets): Likewise.
3221 * linux-m68k-low.c (m68k_regsets): Likewise.
3222 * linux-mips-low.c (mips_regsets): Likewise.
3223 * linux-nios2-low.c (nios2_regsets): Likewise.
3224 * linux-ppc-low.c (ppc_regsets): Likewise.
3225 * linux-s390-low.c (s390_regsets): Likewise.
3226 * linux-sh-low.c (sh_regsets): Likewise.
3227 * linux-sparc-low.c (sparc_regsets): Likewise.
3228 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3229 * linux-tile-low.c (tile_regsets): Likewise.
3230 * linux-x86-low.c (x86_regsets): Likewise.
3231 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3232
682b2546
DE
32332015-10-26 Doug Evans <dje@google.com>
3234
3235 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3236
963843d4
DE
32372015-10-26 Doug Evans <dje@google.com>
3238
3239 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3240
d41401ac
DE
32412015-10-26 Doug Evans <dje@google.com>
3242
3243 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3244 for debug_printf.
3245 (attach_thread, find_new_threads_callback): Ditto.
3246
3db28855
AT
32472015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3248
3249 * mem-break.h (set_breakpoint_data): Remove.
3250
fb78e89c
AT
32512015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3252
3253 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3254 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3255 (initialize_low): Remove set_breakpoint_data call.
3256 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3257 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3258 (initialize_low): Remove set_breakpoint_data call.
3259 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3260 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3261 (initialize_low): Remove set_breakpoint_data call.
3262
2e6ee069
AT
32632015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3264
3265 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3266 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3267 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3268 * target.h (target_breakpoint_kind_from_pc): New macro.
3269
1652a986
AT
32702015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3271
3272 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3273 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3274 the default breakpoint kind.
3275
abeead09
AT
32762015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3277
3278 * linux-arm-low.c (arm_supports_z_point_type): Add software
3279 breakpoint support.
3280
b0b4b501
AT
32812015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3282
3283 * linux-arm-low.c: Refactor breakpoint definitions.
3284 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3285 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3286
8689682c
AT
32872015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3288
3289 * Makefile.in: Add arm.c/o.
3290 * configure.srv: Likewise.
3291 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3292 (arm_breakpoint_kind_from_pc): New function.
3293 (arm_sw_breakpoint_from_kind): Return proper kind.
3294 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3295
27165294
AT
32962015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3297
3298 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3299 removal.
3300 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3301 (struct raw_breakpoint) <size>: Remove.
3302 (struct raw_breakpoint) <kind>: Add.
3303 (bp_size): New function.
3304 (bp_opcode): Likewise.
3305 (find_raw_breakpoint_at): Adjust for kind.
3306 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3307 (remove_memory_breakpoint): Adjust for kind call bp_size.
3308 (set_raw_breakpoint_at): Adjust for kind.
3309 (set_breakpoint): Likewise.
3310 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3311 (delete_raw_breakpoint): Adjust for kind.
3312 (delete_breakpoint): Likewise.
3313 (find_gdb_breakpoint): Likewise.
3314 (set_gdb_breakpoint_1): Likewise.
3315 (set_gdb_breakpoint): Likewise.
3316 (delete_gdb_breakpoint_1): Likewise.
3317 (delete_gdb_breakpoint): Likewise.
3318 (uninsert_raw_breakpoint): Likewise.
3319 (reinsert_raw_breakpoint): Likewise.
3320 (set_breakpoint_data): Remove.
3321 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3322 (check_mem_read): Adjust for kind call bp_size.
3323 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3324 (clone_one_breakpoint): Adjust for kind.
3325 * mem-break.h (set_gdb_breakpoint): Likewise.
3326 (delete_gdb_breakpoint): Likewise.
3327 * server.c (process_serial_event): Likewise.
3328
dd373349
AT
33292015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3330
3331 * linux-aarch64-low.c (aarch64_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-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3337 (arm_sw_breakpoint_from_kind): New function.
3338 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3339 (struct linux_target_ops) <breakpoint>: Remove.
3340 (struct linux_target_ops) <breakpoint_len>: Remove.
3341 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3342 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3343 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3344 (struct linux_target_ops) <breakpoint>: Remove.
3345 (struct linux_target_ops) <breakpoint_len>: Remove.
3346 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3347 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3348 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3349 (struct linux_target_ops) <breakpoint>: Remove.
3350 (struct linux_target_ops) <breakpoint_len>: Remove.
3351 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3352 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3353 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3354 and sw_breakpoint_from_kind to increment the pc.
3355 (linux_breakpoint_kind_from_pc): New function.
3356 (linux_sw_breakpoint_from_kind): New function.
3357 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3358 (initialize_low): Call breakpoint_kind_from_pc and
3359 sw_breakpoint_from_kind to replace breakpoint_data/len.
3360 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3361 New field.
3362 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3363 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3364 (struct linux_target_ops) <breakpoint>: Remove.
3365 (struct linux_target_ops) <breakpoint_len>: Remove.
3366 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3367 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3368 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3369 (struct linux_target_ops) <breakpoint>: Remove.
3370 (struct linux_target_ops) <breakpoint_len>: Remove.
3371 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3372 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3373 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3374 (struct linux_target_ops) <breakpoint>: Remove.
3375 (struct linux_target_ops) <breakpoint_len>: Remove.
3376 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3377 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3378 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3379 (struct linux_target_ops) <breakpoint>: Remove.
3380 (struct linux_target_ops) <breakpoint_len>: Remove.
3381 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3382 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3383 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3384 (struct linux_target_ops) <breakpoint>: Remove.
3385 (struct linux_target_ops) <breakpoint_len>: Remove.
3386 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3387 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3388 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3389 (struct linux_target_ops) <breakpoint>: Remove.
3390 (struct linux_target_ops) <breakpoint_len>: Remove.
3391 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3392 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3393 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3394 (struct linux_target_ops) <breakpoint>: Remove.
3395 (struct linux_target_ops) <breakpoint_len>: Remove.
3396 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3397 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3398 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3399 (struct linux_target_ops) <breakpoint>: Remove.
3400 (struct linux_target_ops) <breakpoint_len>: Remove.
3401 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3402 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3403 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3404 (struct linux_target_ops) <breakpoint>: Remove.
3405 (struct linux_target_ops) <breakpoint_len>: Remove.
3406 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3407 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3408 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3409 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3410 (struct linux_target_ops) <breakpoint>: Remove.
3411 (struct linux_target_ops) <breakpoint_len>: Remove.
3412 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3413 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3414 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3415 (struct linux_target_ops) <breakpoint>: Remove.
3416 (struct linux_target_ops) <breakpoint_len>: Remove.
3417 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3418 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3419
4cd98a19
AT
34202015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3421
3422 * linux-cris-low.c (cris_get_pc): Remove void arg.
3423
774ee6d2
AR
34242015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3425
3426 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3427 variable name.
3428
833dcd29
AR
34292015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3430
3431 * inferiors.c (thread_pid_matches_callback): New function.
3432 (find_thread_process): New function.
3433 (remove_thread): Reset current_thread.
3434 (remove_process): Assert threads have been removed first.
3435
8d689ee5
YQ
34362015-10-15 Yao Qi <yao.qi@linaro.org>
3437
3438 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3439 if it is 3.
3440 (aarch64_remove_point): Likewise.
3441 * regcache.c (regcache_register_size): New function.
3442
1c2e1515
YQ
34432015-10-12 Yao Qi <yao.qi@linaro.org>
3444
3445 * linux-aarch64-low.c: Update all callers as emit_load_store
3446 is renamed to aarch64_emit_load_store.
3447
e1c587c3
YQ
34482015-10-12 Yao Qi <yao.qi@linaro.org>
3449
3450 * linux-aarch64-low.c: Update all callers of function renaming
3451 from emit_insn to aarch64_emit_insn.
3452
b6542f81
YQ
34532015-10-12 Yao Qi <yao.qi@linaro.org>
3454
3455 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3456 arch/aarch64-insn.h.
3457 (struct aarch64_memory_operand): Likewise.
3458 (ENCODE): Likewise.
3459 (emit_insn): Move to arch/aarch64-insn.c.
3460 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3461 (emit_load_store): Move to arch/aarch64-insn.c.
3462 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3463 (can_encode_int32): Remove.
3464
246994ce
YQ
34652015-10-12 Yao Qi <yao.qi@linaro.org>
3466
3467 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3468 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3469 (aarch64_relocate_instruction): Likewise.
3470 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3471 (struct aarch64_insn_visitor): Likewise.
3472
0badd99f
YQ
34732015-10-12 Yao Qi <yao.qi@linaro.org>
3474
3475 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3476 (struct aarch64_insn_visitor): New.
3477 (struct aarch64_insn_relocation_data): New.
3478 (aarch64_ftrace_insn_reloc_b): New function.
3479 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3480 (aarch64_ftrace_insn_reloc_cb): Likewise.
3481 (aarch64_ftrace_insn_reloc_tb): Likewise.
3482 (aarch64_ftrace_insn_reloc_adr): Likewise.
3483 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3484 (aarch64_ftrace_insn_reloc_others): Likewise.
3485 (visitor): New.
3486 (aarch64_relocate_instruction): Use visitor.
3487
dfaffe9d
YQ
34882015-10-12 Yao Qi <yao.qi@linaro.org>
3489
3490 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3491 int. Add argument buf.
3492 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3493 aarch64_relocate_instruction.
3494
70b439f0
YQ
34952015-10-12 Yao Qi <yao.qi@linaro.org>
3496
3497 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3498 argument insn. Remove local variable insn. Don't call
3499 target_read_uint32.
3500 (aarch64_install_fast_tracepoint_jump_pad): Call
3501 target_read_uint32.
3502
7781c06f
YQ
35032015-09-30 Yao Qi <yao.qi@linaro.org>
3504
3505 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3506 (emit_load_store_pair): Likewise.
3507
9a3c8263
SM
35082015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3509
3510 * dll.c (match_dll): Add cast(s).
3511 (unloaded_dll): Likewise.
3512 * linux-low.c (second_thread_of_pid_p): Likewise.
3513 (delete_lwp_callback): Likewise.
3514 (count_events_callback): Likewise.
3515 (select_event_lwp_callback): Likewise.
3516 (linux_set_resume_request): Likewise.
3517 * server.c (accumulate_file_name_length): Likewise.
3518 (emit_dll_description): Likewise.
3519 (handle_qxfer_threads_worker): Likewise.
3520 (visit_actioned_threads): Likewise.
3521 * thread-db.c (any_thread_of): Likewise.
3522 * tracepoint.c (same_process_p): Likewise.
3523 (match_blocktype): Likewise.
3524 (build_traceframe_info_xml): Likewise.
3525
224c3ddb
SM
35262015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3527
3528 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3529 assignment.
3530 (gdb_unparse_agent_expr): Likewise.
3531 * hostio.c (require_data): Likewise.
3532 (handle_pread): Likewise.
3533 * linux-low.c (disable_regset): Likewise.
3534 (fetch_register): Likewise.
3535 (store_register): Likewise.
3536 (get_dynamic): Likewise.
3537 (linux_qxfer_libraries_svr4): Likewise.
3538 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3539 (set_fast_tracepoint_jump): Likewise.
3540 (uninsert_fast_tracepoint_jumps_at): Likewise.
3541 (reinsert_fast_tracepoint_jumps_at): Likewise.
3542 (validate_inserted_breakpoint): Likewise.
3543 (clone_agent_expr): Likewise.
3544 * regcache.c (init_register_cache): Likewise.
3545 * remote-utils.c (putpkt_binary_1): Likewise.
3546 (decode_M_packet): Likewise.
3547 (decode_X_packet): Likewise.
3548 (look_up_one_symbol): Likewise.
3549 (relocate_instruction): Likewise.
3550 (monitor_output): Likewise.
3551 * server.c (handle_search_memory): Likewise.
3552 (handle_qxfer_exec_file): Likewise.
3553 (handle_qxfer_libraries): Likewise.
3554 (handle_qxfer): Likewise.
3555 (handle_query): Likewise.
3556 (handle_v_cont): Likewise.
3557 (handle_v_run): Likewise.
3558 (captured_main): Likewise.
3559 * target.c (write_inferior_memory): Likewise.
3560 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3561 * tracepoint.c (init_trace_buffer): Likewise.
3562 (add_tracepoint_action): Likewise.
3563 (add_traceframe): Likewise.
3564 (add_traceframe_block): Likewise.
3565 (cmd_qtdpsrc): Likewise.
3566 (cmd_qtdv): Likewise.
3567 (cmd_qtstatus): Likewise.
3568 (response_source): Likewise.
3569 (response_tsv): Likewise.
3570 (cmd_qtnotes): Likewise.
3571 (gdb_collect): Likewise.
3572 (initialize_tracepoint): Likewise.
3573
afbe19f8
PL
35742015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3575
3576 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3577 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3578 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3579 <NOP>: New.
3580 (enum aarch64_condition_codes): New enum.
3581 (w0): New static global.
3582 (fp): Likewise.
3583 (lr): Likewise.
3584 (struct aarch64_memory_operand) <type>: New
3585 MEMORY_OPERAND_POSTINDEX type.
3586 (postindex_memory_operand): New helper function.
3587 (emit_ret): New function.
3588 (emit_load_store_pair): New function, factored out of emit_stp
3589 with support for MEMORY_OPERAND_POSTINDEX.
3590 (emit_stp): Rewrite using emit_load_store_pair.
3591 (emit_ldp): New function.
3592 (emit_load_store): Likewise.
3593 (emit_ldr): Mention post-index instruction in comment.
3594 (emit_ldrh): New function.
3595 (emit_ldrb): New function.
3596 (emit_ldrsw): Mention post-index instruction in comment.
3597 (emit_str): Likewise.
3598 (emit_subs): New function.
3599 (emit_cmp): Likewise.
3600 (emit_and): Likewise.
3601 (emit_orr): Likewise.
3602 (emit_orn): Likewise.
3603 (emit_eor): Likewise.
3604 (emit_mvn): Likewise.
3605 (emit_lslv): Likewise.
3606 (emit_lsrv): Likewise.
3607 (emit_asrv): Likewise.
3608 (emit_mul): Likewise.
3609 (emit_sbfm): Likewise.
3610 (emit_sbfx): Likewise.
3611 (emit_ubfm): Likewise.
3612 (emit_ubfx): Likewise.
3613 (emit_csinc): Likewise.
3614 (emit_cset): Likewise.
3615 (emit_nop): Likewise.
3616 (emit_ops_insns): New helper function.
3617 (emit_pop): Likewise.
3618 (emit_push): Likewise.
3619 (aarch64_emit_prologue): New function.
3620 (aarch64_emit_epilogue): Likewise.
3621 (aarch64_emit_add): Likewise.
3622 (aarch64_emit_sub): Likewise.
3623 (aarch64_emit_mul): Likewise.
3624 (aarch64_emit_lsh): Likewise.
3625 (aarch64_emit_rsh_signed): Likewise.
3626 (aarch64_emit_rsh_unsigned): Likewise.
3627 (aarch64_emit_ext): Likewise.
3628 (aarch64_emit_log_not): Likewise.
3629 (aarch64_emit_bit_and): Likewise.
3630 (aarch64_emit_bit_or): Likewise.
3631 (aarch64_emit_bit_xor): Likewise.
3632 (aarch64_emit_bit_not): Likewise.
3633 (aarch64_emit_equal): Likewise.
3634 (aarch64_emit_less_signed): Likewise.
3635 (aarch64_emit_less_unsigned): Likewise.
3636 (aarch64_emit_ref): Likewise.
3637 (aarch64_emit_if_goto): Likewise.
3638 (aarch64_emit_goto): Likewise.
3639 (aarch64_write_goto_address): Likewise.
3640 (aarch64_emit_const): Likewise.
3641 (aarch64_emit_call): Likewise.
3642 (aarch64_emit_reg): Likewise.
3643 (aarch64_emit_pop): Likewise.
3644 (aarch64_emit_stack_flush): Likewise.
3645 (aarch64_emit_zero_ext): Likewise.
3646 (aarch64_emit_swap): Likewise.
3647 (aarch64_emit_stack_adjust): Likewise.
3648 (aarch64_emit_int_call_1): Likewise.
3649 (aarch64_emit_void_call_2): Likewise.
3650 (aarch64_emit_eq_goto): Likewise.
3651 (aarch64_emit_ne_goto): Likewise.
3652 (aarch64_emit_lt_goto): Likewise.
3653 (aarch64_emit_le_goto): Likewise.
3654 (aarch64_emit_gt_goto): Likewise.
3655 (aarch64_emit_ge_got): Likewise.
3656 (aarch64_emit_ops_impl): New static global variable.
3657 (aarch64_emit_ops): New target function, return
3658 &aarch64_emit_ops_impl.
3659 (struct linux_target_ops): Install it.
3660
bb903df0
PL
36612015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3662
3663 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3664 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3665 aarch64-ipa.o.
3666 * linux-aarch64-ipa.c: New file.
3667 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3668 and endian.h.
3669 (aarch64_get_thread_area): New target method.
3670 (extract_signed_bitfield): New helper function.
3671 (aarch64_decode_ldr_literal): New function.
3672 (enum aarch64_opcodes): New enum.
3673 (struct aarch64_register): New struct.
3674 (struct aarch64_operand): New struct.
3675 (x0): New static global.
3676 (x1): Likewise.
3677 (x2): Likewise.
3678 (x3): Likewise.
3679 (x4): Likewise.
3680 (w2): Likewise.
3681 (ip0): Likewise.
3682 (sp): Likewise.
3683 (xzr): Likewise.
3684 (aarch64_register): New helper function.
3685 (register_operand): Likewise.
3686 (immediate_operand): Likewise.
3687 (struct aarch64_memory_operand): New struct.
3688 (offset_memory_operand): New helper function.
3689 (preindex_memory_operand): Likewise.
3690 (enum aarch64_system_control_registers): New enum.
3691 (ENCODE): New macro.
3692 (emit_insn): New helper function.
3693 (emit_b): New function.
3694 (emit_bcond): Likewise.
3695 (emit_cb): Likewise.
3696 (emit_tb): Likewise.
3697 (emit_blr): Likewise.
3698 (emit_stp): Likewise.
3699 (emit_ldp_q_offset): Likewise.
3700 (emit_stp_q_offset): Likewise.
3701 (emit_load_store): Likewise.
3702 (emit_ldr): Likewise.
3703 (emit_ldrsw): Likewise.
3704 (emit_str): Likewise.
3705 (emit_ldaxr): Likewise.
3706 (emit_stxr): Likewise.
3707 (emit_stlr): Likewise.
3708 (emit_data_processing_reg): Likewise.
3709 (emit_data_processing): Likewise.
3710 (emit_add): Likewise.
3711 (emit_sub): Likewise.
3712 (emit_mov): Likewise.
3713 (emit_movk): Likewise.
3714 (emit_mov_addr): Likewise.
3715 (emit_mrs): Likewise.
3716 (emit_msr): Likewise.
3717 (emit_sevl): Likewise.
3718 (emit_wfe): Likewise.
3719 (append_insns): Likewise.
3720 (can_encode_int32_in): New helper function.
3721 (aarch64_relocate_instruction): New function.
3722 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3723 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3724 (struct linux_target_ops): Install aarch64_get_thread_area,
3725 aarch64_install_fast_tracepoint_jump_pad and
3726 aarch64_get_min_fast_tracepoint_insn_len.
3727
787749ea
PL
37282015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3729
3730 * Makefile.in (aarch64-insn.o): New rule.
3731 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3732
9812b2e6
YQ
37332015-09-21 Yao Qi <yao.qi@linaro.org>
3734
3735 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3736
18fe412b
YQ
37372015-09-21 Yao Qi <yao.qi@linaro.org>
3738
3739 * tracepoint.c (max_jump_pad_size): Remove.
3740
a0cc84cd
YQ
37412015-09-18 Yao Qi <yao.qi@linaro.org>
3742
3743 * linux-aarch64-low.c: Don't include sys/uio.h.
3744 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3745
d78908cf
WW
37462015-09-16 Wei-cheng Wang <cole945@gmail.com>
3747
3748 * tracepoint.c (eval_result_type): Change prototype.
3749 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3750
d57e0d50
PA
37512015-09-15 Pedro Alves <palves@redhat.com>
3752
3753 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3754 Check whether to report exec events instead of checking whether
3755 multiprocess is enabled.
3756
5a676acc
PA
37572015-09-15 Pedro Alves <palves@redhat.com>
3758
3759 PR remote/18965
3760 * remote-utils.c (prepare_resume_reply): Merge
3761 TARGET_WAITKIND_VFORK_DONE switch case with the
3762 TARGET_WAITKIND_FORKED case.
3763
7c5d0fad
YQ
37642015-09-15 Yao Qi <yao.qi@linaro.org>
3765
3766 * server.c (handle_query): Check string comparison using
3767 "else if" instead of "if".
3768
750ce8d1
YQ
37692015-09-15 Yao Qi <yao.qi@linaro.org>
3770
3771 * server.c (vCont_supported): New global variable.
3772 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3773 matches. Append ";vContSupported+" to own_buf.
3774 (handle_v_requests): Append ";s;S" to own_buf if target supports
3775 hardware single step or vCont_supported is false.
3776 (capture_main): Set vCont_supported to zero.
3777
70b90b91
YQ
37782015-09-15 Yao Qi <yao.qi@linaro.org>
3779
3780 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3781 it to ...
3782 (linux_supports_hardware_single_step): ... New function.
3783 (linux_target_ops): Update.
3784 * lynx-low.c (lynx_target_ops): Set field
3785 supports_hardware_single_step to target_can_do_hardware_single_step.
3786 * nto-low.c (nto_target_ops): Likewise.
3787 * spu-low.c (spu_target_ops): Likewise.
3788 * win32-low.c (win32_target_ops): Likewise.
3789 * target.c (target_can_do_hardware_single_step): New function.
3790 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3791 Remove. <supports_hardware_single_step>: New field.
3792 (target_supports_conditional_breakpoints): Remove.
3793 (target_supports_hardware_single_step): New macro.
3794 (target_can_do_hardware_single_step): Declare.
3795 * server.c (handle_query): Use target_supports_hardware_single_step
3796 instead of target_supports_conditional_breakpoints.
3797
ade90bde
YQ
37982015-09-15 Yao Qi <yao.qi@linaro.org>
3799
3800 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3801 function.
3802 (struct linux_target_ops the_low_target): Install
3803 aarch64_linux_siginfo_fixup.
3804
94585166
DB
38052015-09-11 Don Breazeal <donb@codesourcery.com>
3806 Luis Machado <lgustavo@codesourcery.com>
3807
3808 * linux-low.c (linux_mourn): Static declaration.
3809 (linux_arch_setup): Move in front of
3810 handle_extended_wait.
3811 (linux_arch_setup_thread): New function.
3812 (handle_extended_wait): Handle exec events. Call
3813 linux_arch_setup_thread. Make event_lwp argument a
3814 pointer-to-a-pointer.
3815 (check_zombie_leaders): Do not check stopped threads.
3816 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3817 (linux_low_filter_event): Add lwp and thread for exec'ing
3818 non-leader thread if leader thread has been deleted.
3819 Refactor code into linux_arch_setup_thread and call it.
3820 Pass child lwp pointer by reference to handle_extended_wait.
3821 (linux_wait_for_event_filtered): Update comment.
3822 (linux_wait_1): Prevent clobbering exec event status.
3823 (linux_supports_exec_events): New function.
3824 (linux_target_ops) <supports_exec_events>: Initialize new member.
3825 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3826 new member.
3827 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3828 * server.c (report_exec_events): New global variable.
3829 (handle_query): Handle qSupported query for exec-events feature.
3830 (captured_main): Initialize report_exec_events.
3831 * server.h (report_exec_events): Declare new global variable.
3832 * target.h (struct target_ops) <supports_exec_events>: New
3833 member.
3834 (target_supports_exec_events): New macro.
3835 * win32-low.c (win32_target_ops) <supports_exec_events>:
3836 Initialize new member.
3837
0568462b
MM
38382015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3839
3840 * linux-low.c (linux_low_enable_btrace): Remove.
3841 (linux_target_ops): Replace linux_low_enable_btrace with
3842 linux_enable_btrace.
3843
39edd165
YQ
38442015-09-03 Yao Qi <yao.qi@linaro.org>
3845
3846 * linux-aarch64-low.c (aarch64_insert_point): Call
3847 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3848 returns true.
3849
1db33b5a
UW
38502015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3851
3852 * linux-low.c (check_stopped_by_breakpoint): Use
3853 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3854
ab290430
PA
38552015-08-27 Pedro Alves <palves@redhat.com>
3856
3857 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3858
8d749320
SM
38592015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3860
6711b7f8
SM
3861 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3862 the XNEW-family equivalent.
8d749320
SM
3863 (compile_bytecodes): Likewise.
3864 * dll.c (loaded_dll): Likewise.
3865 * event-loop.c (append_callback_event): Likewise.
3866 (create_file_handler): Likewise.
3867 (create_file_event): Likewise.
3868 * hostio.c (handle_open): Likewise.
3869 * inferiors.c (add_thread): Likewise.
3870 (add_process): Likewise.
3871 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3872 * linux-arm-low.c (arm_new_process): Likewise.
3873 (arm_new_thread): Likewise.
3874 * linux-low.c (add_to_pid_list): Likewise.
3875 (linux_add_process): Likewise.
3876 (handle_extended_wait): Likewise.
3877 (add_lwp): Likewise.
3878 (enqueue_one_deferred_signal): Likewise.
3879 (enqueue_pending_signal): Likewise.
3880 (linux_resume_one_lwp_throw): Likewise.
3881 (linux_resume_one_thread): Likewise.
3882 (linux_read_memory): Likewise.
3883 (linux_write_memory): Likewise.
3884 * linux-mips-low.c (mips_linux_new_process): Likewise.
3885 (mips_linux_new_thread): Likewise.
3886 (mips_add_watchpoint): Likewise.
3887 * linux-x86-low.c (initialize_low_arch): Likewise.
3888 * lynx-low.c (lynx_add_process): Likewise.
3889 * mem-break.c (set_raw_breakpoint_at): Likewise.
3890 (set_breakpoint): Likewise.
3891 (add_condition_to_breakpoint): Likewise.
3892 (add_commands_to_breakpoint): Likewise.
3893 (clone_agent_expr): Likewise.
3894 (clone_one_breakpoint): Likewise.
3895 * regcache.c (new_register_cache): Likewise.
3896 * remote-utils.c (look_up_one_symbol): Likewise.
3897 * server.c (queue_stop_reply): Likewise.
3898 (start_inferior): Likewise.
3899 (queue_stop_reply_callback): Likewise.
3900 (handle_target_event): Likewise.
3901 * spu-low.c (fetch_ppc_memory): Likewise.
3902 (store_ppc_memory): Likewise.
3903 * target.c (set_target_ops): Likewise.
3904 * thread-db.c (thread_db_load_search): Likewise.
3905 (try_thread_db_load_1): Likewise.
3906 * tracepoint.c (add_tracepoint): Likewise.
3907 (add_tracepoint_action): Likewise.
3908 (create_trace_state_variable): Likewise.
3909 (cmd_qtdpsrc): Likewise.
3910 (cmd_qtro): Likewise.
3911 (add_while_stepping_state): Likewise.
3912 * win32-low.c (child_add_thread): Likewise.
3913 (get_image_name): Likewise.
3914
ed8b7b42
YQ
39152015-08-25 Yao Qi <yao.qi@linaro.org>
3916
3917 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3918
db3cb7cb
YQ
39192015-08-25 Yao Qi <yao.qi@linaro.org>
3920
3921 * Makefile.in (aarch64-linux.o): New rule.
3922 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3923 srv_tgtobj.
3924 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3925 (aarch64_init_debug_reg_state): Make it extern.
3926 (aarch64_linux_prepare_to_resume): Remove.
3927
f6011a1c
YQ
39282015-08-25 Yao Qi <yao.qi@linaro.org>
3929
3930 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3931 lwp_arch_private_info and ptid_of_lwp.
3932
88e2cf7e
YQ
39332015-08-25 Yao Qi <yao.qi@linaro.org>
3934
3935 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3936 Find proc_info by find_process_pid. All callers updated.
3937
5e35436e
YQ
39382015-08-25 Yao Qi <yao.qi@linaro.org>
3939
3940 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3941 Remove.
3942 (debug_reg_change_callback): Remove.
3943 (aarch64_notify_debug_reg_change): Remove.
3944
4a8a7965
YQ
39452015-08-25 Yao Qi <yao.qi@linaro.org>
3946
3947 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3948 Call current_lwp_ptid.
3949
32a271ee
YQ
39502015-08-25 Yao Qi <yao.qi@linaro.org>
3951
3952 * linux-aarch64-low.c (debug_reg_change_callback): Use
3953 debug_printf.
3954
0d51c8d7
YQ
39552015-08-25 Yao Qi <yao.qi@linaro.org>
3956
3957 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3958
31a43dd5
YQ
39592015-08-25 Yao Qi <yao.qi@linaro.org>
3960
3961 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3962
8ee52567
YQ
39632015-08-25 Yao Qi <yao.qi@linaro.org>
3964
3965 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3966 the code.
3967
ff3f0f45
YQ
39682015-08-25 Yao Qi <yao.qi@linaro.org>
3969
3970 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3971 Remove.
3972 (debug_reg_change_callback): Remove argument entry and add argument
3973 lwp. Remove local variable thread. Don't print thread id in the
3974 debugging output. Don't check whether pid of thread equals to pid.
3975 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3976 iterate_over_lwps instead find_inferior.
3977
3d40fbb5
PA
39782015-08-24 Pedro Alves <palves@redhat.com>
3979
3980 * inferiors.c (get_first_process): New function.
3981 * inferiors.h (get_first_process): New declaration.
3982 * remote-utils.c (read_ptid): Default to the first process in the
3983 list, instead of to the current thread's process.
3984
438e1e42
PA
39852015-08-24 Pedro Alves <palves@redhat.com>
3986
3987 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3988 * event-loop.c: Likewise.
3989 * remote-utils.c: Likewise.
3990 * tracepoint.c: Likewise.
3991
a8c6d4fc
PA
39922015-08-24 Pedro Alves <palves@redhat.com>
3993
3994 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3995 ptid_get_lwp.
3996
99b0bb12
PA
39972015-08-21 Pedro Alves <palves@redhat.com>
3998
3999 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4000 instead of literal 1.
4001
f8904751
PA
40022015-08-21 Pedro Alves <palves@redhat.com>
4003
4004 * tdesc.c (default_description): Explicitly zero-initialize.
4005
465a859e
PA
40062015-08-21 Pedro Alves <palves@redhat.com>
4007
4008 PR gdb/18749
4009 * inferiors.c (remove_thread): Discard any pending stop reply for
4010 this thread.
4011 * server.c (remove_all_on_match_pid): Rename to ...
4012 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4013 instead of a pid.
4014 (discard_queued_stop_replies): Change parameter to a ptid. Now
4015 extern.
4016 (handle_v_kill, kill_inferior_callback, captured_main)
4017 (process_serial_event): Adjust.
4018 * server.h (discard_queued_stop_replies): Declare.
4019
f0db101d
PA
40202015-08-21 Pedro Alves <palves@redhat.com>
4021
4022 * linux-low.c (wait_for_sigstop): Always switch to no thread
4023 selected if the previously current thread dies.
4024 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4025 process instead of the current thread's.
4026 * remote-utils.c (input_interrupt): Don't check if there's no
4027 current thread.
4028 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4029 current thread to the general thread fails, error out.
4030 (handle_qxfer_auxv, handle_qxfer_libraries)
4031 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4032 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4033 (handle_query): Check if there's a thread selected instead of
4034 checking whether there's any thread in the thread list.
4035 (handle_qxfer_threads, handle_qxfer_btrace)
4036 (handle_qxfer_btrace_conf): Don't error out early if there's no
4037 thread in the thread list.
4038 (handle_v_cont, myresume): Don't set the current thread to the
4039 continue thread.
4040 (process_serial_event) <Hg handling>: Also set thread_id if the
4041 previous general thread is still alive.
4042 (process_serial_event) <g/G handling>: If setting the current
4043 thread to the general thread fails, error out.
4044 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4045 thread's lwp instead of the current thread's.
4046 * target.c (set_desired_thread): If the desired thread was not
4047 found, leave the current thread pointing to NULL. Return an int
4048 (boolean) indicating success.
4049 * target.h (set_desired_thread): Change return type to int.
4050
40045d91
MF
40512015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4052
4053 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4054 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4055 #includes.
4056 (ps_get_thread_area): New function.
4057
45face3b
GB
40582015-08-19 Gary Benson <gbenson@redhat.com>
4059
4060 * hostio.c (handle_pread): Do not attempt to read more data
4061 than hostio_reply_with_data can fit in a packet.
4062
16d5f642
JB
40632015-08-18 Joel Brobecker <brobecker@adacore.com>
4064
4065 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4066
a738da3a
MF
40672015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4068
4069 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4070
33ebda9d
PA
40712015-08-06 Pedro Alves <palves@redhat.com>
4072
4073 * tracepoint.c (expr_eval_result): Now an int.
4074
a44892be
PA
40752015-08-06 Pedro Alves <palves@redhat.com>
4076
4077 * gdbthread.h (struct regcache): Forward declare.
4078 (struct thread_info) <regcache_data>: Now a struct regcache
4079 pointer.
4080 * inferiors.c (inferior_regcache_data)
4081 (set_inferior_regcache_data): Now work with struct regcache
4082 pointers.
4083 * inferiors.h (struct regcache): Forward declare.
4084 (inferior_regcache_data, set_inferior_regcache_data): Now work
4085 with struct regcache pointers.
4086 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4087 (free_register_cache_thread): Remove struct regcache pointer
4088 casts.
4089
608a1e46
PA
40902015-08-06 Pedro Alves <palves@redhat.com>
4091
4092 * server.c (captured_main): On error, print the exception message
4093 to stderr, and if run_once is set, throw a quit.
4094
f0ce0d3a
PA
40952015-08-06 Pedro Alves <palves@redhat.com>
4096
4097 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4098 the current thread.
4099
bf47e248
PA
41002015-08-06 Pedro Alves <palves@redhat.com>
4101
4102 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4103 reading beyond the passed in buffer length.
4104
b6b9ffcc
PL
41052015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4106
4107 * tracepoint.c (symbol_list) <required>: Remove.
4108
863d01bd
PA
41092015-08-06 Pedro Alves <palves@redhat.com>
4110
4111 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4112 count if stopping and suspending threads.
4113 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4114 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4115 (linux_detach): Complete an ongoing step-over.
4116 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4117 throughout.
4118 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4119 (linux_wait_1): If passing a signal to the inferior after
4120 finishing a step-over, unsuspend and re-resume all lwps. If we
4121 see a single-step event but the thread should be continuing, don't
4122 pass the trap to gdb.
4123 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4124 internal_error instead of gdb_assert.
4125 (enqueue_pending_signal): New function.
4126 (check_ptrace_stopped_lwp_gone): Add debug output.
4127 (start_step_over): Use internal_error instead of gdb_assert.
4128 (complete_ongoing_step_over): New function.
4129 (linux_resume_one_thread): Don't resume a suspended thread.
4130 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4131 it stepping.
4132
00db26fa
PA
41332015-08-06 Pedro Alves <palves@redhat.com>
4134
4135 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4136 (linux_thread_alive): Use lwp_is_marked_dead.
4137 (extended_event_reported): Delete.
4138 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4139 instead of extended_event_reported.
4140 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4141 as well.
4142 (lwp_is_marked_dead): New function.
4143 (lwp_running): Use lwp_is_marked_dead.
4144 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4145 comment.
4146
ad071a30
PA
41472015-08-06 Pedro Alves <palves@redhat.com>
4148
4149 * linux-low.c (linux_wait_1): Move fork event output out of the
4150 !report_to_gdb check. Pass event_child->waitstatus to
4151 target_waitstatus_to_string instead of ourstatus.
4152
524b57e6
YQ
41532015-08-04 Yao Qi <yao.qi@linaro.org>
4154
4155 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4156 if current_thread is 32 bit.
4157
6085d6f6
YQ
41582015-08-04 Yao Qi <yao.qi@linaro.org>
4159
4160 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4161 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4162 * server.c (extended_protocol): Remove "static".
4163 * server.h (extended_protocol): Declare it.
4164
8a7e4587
YQ
41652015-08-04 Yao Qi <yao.qi@linaro.org>
4166
4167 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4168 both aarch64 and aarch32.
4169 (aarch64_set_pc): Likewise.
4170
3b53ae99
YQ
41712015-08-04 Yao Qi <yao.qi@linaro.org>
4172
4173 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4174 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4175 arm-with-neon.xml to srv_xmlfiles.
4176 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4177 (is_64bit_tdesc): New function.
4178 (aarch64_linux_read_description): New function.
4179 (aarch64_arch_setup): Call aarch64_linux_read_description.
4180 (regs_info): Rename to regs_info_aarch64.
4181 (aarch64_regs_info): Return right regs_info.
4182 (initialize_low_arch): Call initialize_low_arch_aarch32.
4183
bd9e6534
YQ
41842015-08-04 Yao Qi <yao.qi@linaro.org>
4185
4186 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4187 * linux-aarch32-low.c: New file.
4188 * linux-aarch32-low.h: New file.
4189 * linux-arm-low.c (arm_fill_gregset): Move it to
4190 linux-aarch32-low.c.
4191 (arm_store_gregset): Likewise.
4192 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4193 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4194 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4195 (regs_info): Rename to regs_info_arm.
4196 (arm_regs_info): Return regs_info_aarch32 if
4197 have_ptrace_getregset is 1 and target description is
4198 arm_with_neon or arm_with_vfpv3.
4199 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4200 Call initialize_low_arch_aarch32 instead.
4201
ded48a5e
YQ
42022015-08-04 Yao Qi <yao.qi@linaro.org>
4203
4204 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4205 * linux-low.c: ... here.
4206 * linux-low.h (have_ptrace_getregset): Declare it.
4207
96e9210f
PA
42082015-08-04 Pedro Alves <palves@redhat.com>
4209
4210 * thread-db.c (struct thread_db): Use new typedefs.
4211 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4212 CHK calls.
4213 (disable_thread_event_reporting): Cast result of dlsym to
4214 destination function pointer type.
4215 (thread_db_mourn): Use td_ta_delete_ftype.
4216
af60a1ef
SL
42172015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4218
4219 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4220 arch variant.
4221 (CDX_BREAKPOINT): Define for R2.
4222 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4223 (the_low_target): Add comments.
4224
e8b41681
YQ
42252015-07-30 Yao Qi <yao.qi@linaro.org>
4226
4227 * linux-arm-low.c (arm_hwcap): Remove it.
4228 (arm_read_description): New local variable arm_hwcap. Don't
4229 set arm_hwcap to zero.
4230
89abb039
YQ
42312015-07-30 Yao Qi <yao.qi@linaro.org>
4232
4233 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4234 Use regcache->tdesc instead.
4235 (arm_store_wmmxregset): Likewise.
4236 (arm_fill_vfpregset): Likewise.
4237 (arm_store_vfpregset): Likewise.
4238
deca266c
YQ
42392015-07-30 Yao Qi <yao.qi@linaro.org>
4240
4241 * linux-arm-low.c: Include arch/arm.h.
4242 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4243 (arm_store_gregset): Likewise.
4244
aa58a496
SM
42452015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4246
4247 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4248 ptrace's 4th parameter.
4249
50904b25
YQ
42502015-07-27 Yao Qi <yao.qi@linaro.org>
4251
4252 * configure.srv (case aarch64*-*-linux*): Don't set
4253 srv_linux_usrregs.
4254
5826e159
PA
42552015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4256
4257 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4258 sys/ptrace.h.
4259 * linux-arm-low.c: Likewise.
4260 * linux-cris-low.c: Likewise.
4261 * linux-crisv32-low.c: Likewise.
4262 * linux-low.c: Likewise.
4263 * linux-m68k-low.c: Likewise.
4264 * linux-mips-low.c: Likewise.
4265 * linux-nios2-low.c: Likewise.
4266 * linux-s390-low.c: Likewise.
4267 * linux-sparc-low.c: Likewise.
4268 * linux-tic6x-low.c: Likewise.
4269 * linux-tile-low.c: Likewise.
4270 * linux-x86-low.c: Likewise.
4271
54019719
PA
42722015-07-24 Pedro Alves <palves@redhat.com>
4273
4274 * config.in: Regenerate.
4275 * configure: Regenerate.
4276
eb7aa561
PA
42772015-07-24 Pedro Alves <palves@redhat.com>
4278
4279 * acinclude.m4: Include ../ptrace.m4.
4280 * configure.ac: Call GDB_AC_PTRACE.
4281 * config.in, configure: Regenerate.
4282
55d7b841
YQ
42832015-07-24 Yao Qi <yao.qi@linaro.org>
4284
4285 * linux-low.c (linux_create_inferior): Remove setting to
4286 proc->priv->new_inferior.
4287 (linux_attach): Likewise.
4288 (linux_low_filter_event): Likewise.
4289 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4290
c06cbd92
YQ
42912015-07-24 Yao Qi <yao.qi@linaro.org>
4292
4293 * linux-low.c (linux_arch_setup): New function.
4294 (linux_low_filter_event): If proc->tdesc is NULL and
4295 proc->attached is true, call the_low_target.arch_setup.
4296 Otherwise, keep status pending, and return.
4297 (linux_resume_one_lwp_throw): Don't call get_pc if
4298 thread->while_stepping isn't NULL. Don't call
4299 get_thread_regcache if proc->tdesc is NULL.
4300 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4301 (linux_target_ops): Install arch_setup.
4302 * server.c (start_inferior): Call the_target->arch_setup.
4303 * target.h (struct target_ops) <arch_setup>: New field.
4304 (target_arch_setup): New marco.
4305 * lynx-low.c (lynx_target_ops): Update.
4306 * nto-low.c (nto_target_ops): Update.
4307 * spu-low.c (spu_target_ops): Update.
4308 * win32-low.c (win32_target_ops): Update.
4309
5ae3ebba
YQ
43102015-07-24 Yao Qi <yao.qi@linaro.org>
4311
4312 * linux-low.c (linux_add_process): Don't set
4313 proc->priv->new_inferior.
4314 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4315 (linux_attach): Likewise.
4316
eb97750b
YQ
43172015-07-24 Yao Qi <yao.qi@linaro.org>
4318
4319 * server.c (start_inferior): Code refactor.
4320
51aee833
YQ
43212015-07-24 Yao Qi <yao.qi@linaro.org>
4322
4323 * server.c (process_serial_event): Set general_thread.
4324
af1b22f3
YQ
43252015-07-21 Yao Qi <yao.qi@linaro.org>
4326
4327 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4328 aarch64_linux_get_debug_reg_capacity.
4329
554717a3
YQ
43302015-07-17 Yao Qi <yao.qi@linaro.org>
4331
4332 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4333 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4334 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4335 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4336 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4337 (AARCH64_HWP_ALIGNMENT): Likewise.
4338 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4339 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4340 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4341 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4342 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4343 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4344 (struct aarch64_debug_reg_state): Likewise.
4345 (struct arch_lwp_info): Likewise.
4346 (aarch64_align_watchpoint): Likewise.
4347 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4348 (aarch64_watchpoint_length): Likewise.
4349 (aarch64_point_encode_ctrl_reg): Likewise
4350 (aarch64_point_is_aligned): Likewise.
4351 (aarch64_align_watchpoint): Likewise.
4352 (aarch64_linux_set_debug_regs):
4353 (aarch64_dr_state_insert_one_point): Likewise.
4354 (aarch64_dr_state_remove_one_point): Likewise.
4355 (aarch64_handle_breakpoint): Likewise.
4356 (aarch64_handle_aligned_watchpoint): Likewise.
4357 (aarch64_handle_unaligned_watchpoint): Likewise.
4358 (aarch64_handle_watchpoint): Likewise.
4359
c67ca4de
YQ
43602015-07-17 Yao Qi <yao.qi@linaro.org>
4361
4362 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4363 and don't aarch64_get_debug_reg_state. All callers update.
4364 (aarch64_handle_aligned_watchpoint): Likewise.
4365 (aarch64_handle_unaligned_watchpoint): Likewise.
4366 (aarch64_handle_watchpoint): Likewise.
4367 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4368 (aarch64_remove_point): Likewise.
4369
25abf979
YQ
43702015-07-17 Yao Qi <yao.qi@linaro.org>
4371
4372 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4373 debug_printf.
4374 (aarch64_handle_unaligned_watchpoint): Likewise.
4375
db1ff28b
JK
43762015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4377
4378 Revert the previous 3 commits:
4379 Move gdb_regex* to common/
4380 Move linux_find_memory_regions_full & co.
4381 gdbserver build-id attribute generator
4382
700ca40f
JK
43832015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4384 Jan Kratochvil <jan.kratochvil@redhat.com>
4385
4386 gdbserver build-id attribute generator.
4387 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4388 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4389 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4390 (find_phdr): New.
4391 (get_dynamic): Use find_pdhr to traverse program headers.
4392 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4393 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4394 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4395 (get_hex_build_id): New.
4396 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4397 to reply XML document.
4398
9904185c
JK
43992015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4400 Jan Kratochvil <jan.kratochvil@redhat.com>
4401
4402 * target.c: Include target/target-utils.h and fcntl.h.
4403 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4404 (target_fileio_read_stralloc): New functions.
4405
6e5b4429
JK
44062015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4407
4408 * Makefile.in (OBS): Add gdb_regex.o.
4409 (gdb_regex.o): New.
4410 * config.in: Rebuilt.
4411 * configure: Rebuilt.
4412
ddc98fbf
JK
44132015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4414 Jan Kratochvil <jan.kratochvil@redhat.com>
4415
4416 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4417 * Makefile.in (OBS): Add target-utils.o.
4418 (linux-maps.o, target-utils.o): New.
4419 * configure.srv (srv_linux_obj): Add linux-maps.o.
4420
e57bb7a0
PL
44212015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4422
4423 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4424 function, return 1.
4425 (the_low_target): Install it.
4426
586b02a9
PA
44272015-07-14 Pedro Alves <palves@redhat.com>
4428
4429 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4430 Instead, ignore ECHILD, and throw an error for other errnos.
4431
58c1b36c
PA
44322015-07-10 Pedro Alves <palves@redhat.com>
4433
4434 * event-loop.c (struct callback_event) <data>: Change type to
4435 gdb_client_data instance instead of gdb_client_data pointer.
4436 (append_callback_event): Adjust.
4437
421530db
PL
44382015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4439
4440 * linux-aarch64-low.c: Add comments for each linux_target_ops
4441 method. Remove comments already covered in target_ops and
4442 linux_target_ops definitions.
4443 (the_low_target): Add comments for each unimplemented method.
4444
c2d65f38
YQ
44452015-07-09 Yao Qi <yao.qi@linaro.org>
4446
4447 * linux-aarch64-low.c (aarch64_regmap): Remove.
4448 (aarch64_usrregs_info): Remove.
4449 (regs_info): Set field usrregs to NULL.
4450
b20a6524
MM
44512015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4452
4453 * linux-low.c: Include "rsp-low.h"
4454 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4455 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4456 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4457 (handle_btrace_enable_pt): New.
4458 (handle_btrace_general_set): Support "pt".
4459 (handle_btrace_conf_general_set): Support "pt:size".
4460
96c97461
PL
44612015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4462
4463 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4464 Z_PACKET_SW_BP.
4465
37d66942
PL
44662015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4467
4468 * linux-aarch64-low.c: Remove comment about endianness.
4469 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4470 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4471 memcmp.
4472
dc06243f
GB
44732015-06-24 Gary Benson <gbenson@redhat.com>
4474
4475 * linux-i386-ipa.c (stdint.h): Do not include.
4476 * lynx-i386-low.c (stdint.h): Likewise.
4477 * lynx-ppc-low.c (stdint.h): Likewise.
4478 * mem-break.c (stdint.h): Likewise.
4479 * thread-db.c (stdint.h): Likewise.
4480 * tracepoint.c (stdint.h): Likewise.
4481 * win32-low.c (stdint.h): Likewise.
4482
124e13d9
SM
44832015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4484
4485 * server.c (write_qxfer_response): Update call to
4486 remote_escape_output.
4487
909c2cda
JK
44882015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4489 Jan Kratochvil <jan.kratochvil@redhat.com>
4490
4491 Merge multiple hex conversions.
4492 * gdbreplay.c (tohex): Rename to 'fromhex'.
4493 (logchar): Use fromhex.
4494
24c05f46
JK
44952015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4496
4497 * server.c (handle_qxfer_libraries): Set `version' attribute for
4498 <library-list>.
4499
14d2069a
GB
45002015-06-10 Gary Benson <gbenson@redhat.com>
4501
4502 * target.h (struct target_ops) <multifs_open>: New field.
4503 <multifs_unlink>: Likewise.
4504 <multifs_readlink>: Likewise.
4505 * linux-low.c (nat/linux-namespaces.h): New include.
4506 (linux_target_ops): Initialize the_target->multifs_open,
4507 the_target->multifs_unlink and the_target->multifs_readlink.
4508 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4509 * hostio.c (hostio_fs_pid): New static variable.
4510 (hostio_handle_new_gdb_connection): New function.
4511 (handle_setfs): Likewise.
4512 (handle_open): Use the_target->multifs_open as appropriate.
4513 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4514 (handle_readlink): Use the_target->multifs_readlink as
4515 appropriate.
4516 (handle_vFile): Handle vFile:setfs packets.
4517 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4518 after target_handle_new_gdb_connection.
4519
4b8b5e72
GB
45202015-06-10 Gary Benson <gbenson@redhat.com>
4521
4522 * configure.ac (AC_CHECK_FUNCS): Add setns.
4523 * config.in: Regenerate.
4524 * configure: Likewise.
4525 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4526 (linux-namespaces.o): New rule.
4527 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4528
3ac2e371
GB
45292015-06-09 Gary Benson <gbenson@redhat.com>
4530
4531 * hostio.c (handle_open): Process mode argument with
4532 fileio_to_host_mode.
4533
ca9b78ce
YQ
45342015-06-01 Yao Qi <yao.qi@linaro.org>
4535
4536 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4537 * linux-x86-low.c: Likewise.
4538
bfacd19d
DB
45392015-05-28 Don Breazeal <donb@codesourcery.com>
4540
4541 * linux-low.c (handle_extended_wait): Initialize
4542 thread_info.last_resume_kind for new fork children.
4543
452003ef
PA
45442015-05-15 Pedro Alves <palves@redhat.com>
4545
4546 * target.h (target_handle_new_gdb_connection): Rewrite using if
4547 wrapped in do/while.
4548
1041a03c
JB
45492015-05-14 Joel Brobecker <brobecker@adacore.com>
4550
4551 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4552 * configure, config.in: Regenerate.
4553 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4554 Declare typedef.
4555
c269dbdb
DB
45562015-05-12 Don Breazeal <donb@codesourcery.com>
4557
4558 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4559 PTRACE_EVENT_VFORK_DONE.
4560 (linux_low_ptrace_options, extended_event_reported): Add vfork
4561 events.
4562 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4563 and "vforkdone" for RSP 'T' Stop Reply Packet.
4564 * server.h (report_vfork_events): Declare
4565 global variable.
4566
3a8a0396
DB
45672015-05-12 Don Breazeal <donb@codesourcery.com>
4568
4569 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4570 (the_low_target) <new_fork>: Initialize new member.
4571 * linux-arm-low.c (arm_new_fork): New function.
4572 (the_low_target) <new_fork>: Initialize new member.
4573 * linux-low.c (handle_extended_wait): Call new target function
4574 new_fork.
4575 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4576 * linux-mips-low.c (mips_add_watchpoint): New function
4577 extracted from mips_insert_point.
4578 (the_low_target) <new_fork>: Initialize new member.
4579 (mips_linux_new_fork): New function.
4580 (mips_insert_point): Call mips_add_watchpoint.
4581 * linux-x86-low.c (x86_linux_new_fork): New function.
4582 (the_low_target) <new_fork>: Initialize new member.
4583
de0d863e
DB
45842015-05-12 Don Breazeal <donb@codesourcery.com>
4585
4586 * linux-low.c (handle_extended_wait): Implement return value,
4587 rename argument 'event_child' to 'event_lwp', handle
4588 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4589 (linux_low_ptrace_options): New function.
4590 (linux_low_filter_event): Call linux_low_ptrace_options,
4591 use different argument fo linux_enable_event_reporting,
4592 use return value from handle_extended_wait.
4593 (extended_event_reported): New function.
4594 (linux_wait_1): Call extended_event_reported and set
4595 status to report fork events.
4596 (linux_write_memory): Add pid to debug message.
4597 (reset_lwp_ptrace_options_callback): New function.
4598 (linux_handle_new_gdb_connection): New function.
4599 (linux_target_ops): Initialize new structure member.
4600 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4601 * lynx-low.c: Initialize new structure member.
4602 * remote-utils.c (prepare_resume_reply): Implement stop reason
4603 "fork" for "T" stop message.
4604 * server.c (handle_query): Call handle_new_gdb_connection.
4605 * server.h (report_fork_events): Declare global flag.
4606 * target.h (struct target_ops) <handle_new_gdb_connection>:
4607 New member.
4608 (target_handle_new_gdb_connection): New macro.
4609 * win32-low.c: Initialize new structure member.
4610
ddcbc397
DB
46112015-05-12 Don Breazeal <donb@codesourcery.com>
4612
4613 * mem-break.c (APPEND_TO_LIST): Define macro.
4614 (clone_agent_expr): New function.
4615 (clone_one_breakpoint): New function.
4616 (clone_all_breakpoints): New function.
4617 * mem-break.h: Declare new functions.
4618
89245bc0
DB
46192015-05-12 Don Breazeal <donb@codesourcery.com>
4620
4621 * linux-low.c (linux_supports_fork_events): New function.
4622 (linux_supports_vfork_events): New function.
4623 (linux_target_ops): Initialize new structure members.
4624 (initialize_low): Call linux_check_ptrace_features.
4625 * lynx-low.c (lynx_target_ops): Initialize new structure
4626 members.
4627 * server.c (report_fork_events, report_vfork_events):
4628 New global flags.
4629 (handle_query): Add new features to qSupported packet and
4630 response.
4631 (captured_main): Initialize new global variables.
4632 * target.h (struct target_ops) <supports_fork_events>:
4633 New member.
4634 <supports_vfork_events>: New member.
4635 (target_supports_fork_events): New macro.
4636 (target_supports_vfork_events): New macro.
4637 * win32-low.c (win32_target_ops): Initialize new structure
4638 members.
4639
835205d0
GB
46402015-05-12 Gary Benson <gbenson@redhat.com>
4641
4642 * server.c (handle_qxfer_exec_file): Use current process
4643 if annex is empty.
4644
21e94bd9
SL
46452015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4646
4647 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4648 Remove HAVE_PTRACE_GETREGS conditionals.
4649 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4650 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4651
45614f15
YQ
46522015-05-08 Yao Qi <yao.qi@linaro.org>
4653
4654 * linux-low.c (linux_supports_conditional_breakpoints): New
4655 function.
4656 (linux_target_ops): Install new target method.
4657 * lynx-low.c (lynx_target_ops): Install NULL hook for
4658 supports_conditional_breakpoints.
4659 * nto-low.c (nto_target_ops): Likewise.
4660 * spu-low.c (spu_target_ops): Likewise.
4661 * win32-low.c (win32_target_ops): Likewise.
4662 * server.c (handle_query): Check
4663 target_supports_conditional_breakpoints.
4664 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4665 New field.
4666 (target_supports_conditional_breakpoints): New macro.
4667
80ad801e
PA
46682015-05-06 Pedro Alves <palves@redhat.com>
4669
4670 PR server/18081
4671 * server.c (start_inferior): If the process exits, mourn it.
4672
819843c7
GB
46732015-04-21 Gary Benson <gbenson@redhat.com>
4674
4675 * hostio.c (fileio_open_flags_to_host): Factored out to
4676 fileio_to_host_openflags in common/fileio.c. Single use
4677 updated.
4678
a2d5a9d7
MF
46792015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4680
4681 * linux-xtensa-low.c (xtensa_fill_gregset)
4682 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4683 XCHAL_HAVE_LOOP.
4684
deb44829
MF
46852015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4686
4687 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4688 (regs_info): Replace usrregs pointer with NULL.
4689
e57f1de3
GB
46902015-04-17 Gary Benson <gbenson@redhat.com>
4691
4692 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4693 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4694 * server.c (handle_qxfer_exec_file): New function.
4695 (qxfer_packets): Add exec-file entry.
4696 (handle_query): Report qXfer:exec-file:read as supported packet.
4697
62828379
RN
46982015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4699
4700 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4701
b88bb450
GB
47022015-04-09 Gary Benson <gbenson@redhat.com>
4703
4704 * hostio-errno.c (errno_to_fileio_error): Remove function.
4705 Update caller to use remote_fileio_to_fio_error.
4706
c8f4bfdd
YQ
47072015-04-09 Yao Qi <yao.qi@linaro.org>
4708
4709 * linux-low.c (linux_insert_point): Call
4710 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4711 (linux_remove_point): Call remove_memory_breakpoint if type is
4712 raw_bkpt_type_sw.
4713 * linux-x86-low.c (x86_insert_point): Don't call
4714 insert_memory_breakpoint.
4715 (x86_remove_point): Don't call remove_memory_breakpoint.
4716
41f98f02
PA
47172015-04-01 Pedro Alves <palves@redhat.com>
4718 Cleber Rosa <crosa@redhat.com>
4719
4720 * server.c (gdbserver_usage): Reorganize and extend the usage
4721 message.
4722
2bf6fb9d
PA
47232015-03-24 Pedro Alves <palves@redhat.com>
4724
4725 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4726 output. Also dump TRAP_TRACE.
4727 (linux_low_filter_event): In debug output, distinguish a
4728 resume_stop SIGSTOP from a delayed SIGSTOP.
4729
369f6daa
GB
47302015-03-24 Gary Benson <gbenson@redhat.com>
4731
4732 * linux-x86-low.c (x86_linux_new_thread): Moved to
4733 nat/x86-linux.c.
4734 (x86_linux_prepare_to_resume): Likewise.
4735
8e5d4070
GB
47362015-03-24 Gary Benson <gbenson@redhat.com>
4737
4738 * Makefile.in (x86-linux-dregs.o): New rule.
4739 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4740 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4741 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4742 (x86_linux_dr_get): Likewise.
4743 (x86_linux_dr_set): Likewise.
4744 (update_debug_registers_callback): Likewise.
4745 (x86_linux_dr_set_addr): Likewise.
4746 (x86_linux_dr_get_addr): Likewise.
4747 (x86_linux_dr_set_control): Likewise.
4748 (x86_linux_dr_get_control): Likewise.
4749 (x86_linux_dr_get_status): Likewise.
4750 (x86_linux_update_debug_registers): Likewise.
4751
2b95d440
GB
47522015-03-24 Gary Benson <gbenson@redhat.com>
4753
4754 * linux-x86-low.c (x86_linux_update_debug_registers):
4755 New function, factored out from...
4756 (x86_linux_prepare_to_resume): ...this.
4757
14b0bc68
GB
47582015-03-24 Gary Benson <gbenson@redhat.com>
4759
4760 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4761 (x86_linux_dr_set): Likewise.
4762 (update_debug_registers_callback): Likewise.
4763 (x86_linux_dr_set_addr): Likewise.
4764 (x86_linux_dr_get_addr): Likewise.
4765 (x86_linux_dr_set_control): Likewise.
4766 (x86_linux_dr_get_control): Likewise.
4767 (x86_linux_dr_get_status): Likewise.
4768 (x86_linux_prepare_to_resume): Likewise.
4769
5dfe6ca8
GB
47702015-03-24 Gary Benson <gbenson@redhat.com>
4771
4772 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4773 Use perror_with_name. Pass string through gettext.
4774 (x86_linux_dr_set): Likewise.
4775
d33472ad
GB
47762015-03-24 Gary Benson <gbenson@redhat.com>
4777
4778 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4779 (x86_linux_dr_set_addr): ...this.
4780 (x86_dr_low_get_addr): Rename to...
4781 (x86_linux_dr_get_addr): ...this.
4782 (x86_dr_low_set_control): Rename to...
4783 (x86_linux_dr_set_control): ...this.
4784 (x86_dr_low_get_control): Rename to...
4785 (x86_linux_dr_get_control): ...this.
4786 (x86_dr_low_get_status): Rename to...
4787 (x86_linux_dr_get_status): ...this.
4788 (x86_dr_low): Update with new function names.
4789
4b134ca1
GB
47902015-03-24 Gary Benson <gbenson@redhat.com>
4791
4792 * Makefile.in (x86-linux.o): New rule.
4793 * configure.srv: Add x86-linux.o to relevant targets.
4794 * linux-low.c (lwp_set_arch_private_info): New function.
4795 (lwp_arch_private_info): Likewise.
4796 * linux-x86-low.c: Include nat/x86-linux.h.
4797 (arch_lwp_info): Removed structure.
4798 (update_debug_registers_callback):
4799 Use lwp_set_debug_registers_changed.
4800 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4801 and lwp_set_debug_registers_changed.
4802 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4803
34c703da
GB
48042015-03-24 Gary Benson <gbenson@redhat.com>
4805
4806 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4807 * linux-arm-low.c (arm_new_thread): Likewise.
4808 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4809 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4810 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4811 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4812
cff068da
GB
48132015-03-24 Gary Benson <gbenson@redhat.com>
4814
4815 * linux-low.c (ptid_of_lwp): New function.
4816 (lwp_is_stopped): Likewise.
4817 (lwp_stop_reason): Likewise.
4818 * linux-x86-low.c (update_debug_registers_callback):
4819 Use lwp_is_stopped.
4820 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4821 lwp_stop_reason.
4822
b2f7c7e8
GB
48232015-03-24 Gary Benson <gbenson@redhat.com>
4824
4825 * linux-low.h (linux_stop_lwp): Remove declaration.
4826
6d4ee8c6
GB
48272015-03-24 Gary Benson <gbenson@redhat.com>
4828
4829 * linux-low.h: Include nat/linux-nat.h.
4830 * linux-low.c (iterate_over_lwps_args): New structure.
4831 (iterate_over_lwps_filter): New function.
4832 (iterate_over_lwps): Likewise.
4833 * linux-x86-low.c (update_debug_registers_callback):
4834 Update signature to what iterate_over_lwps expects.
4835 Remove PID check that iterate_over_lwps now performs.
4836 (x86_dr_low_set_addr): Use iterate_over_lwps.
4837 (x86_dr_low_set_control): Likewise.
4838
70a0bb6b
GB
48392015-03-24 Gary Benson <gbenson@redhat.com>
4840
4841 * linux-x86-low.c (x86_debug_reg_state): New function.
4842 (x86_linux_prepare_to_resume): Use the above.
4843
7b669087
GB
48442015-03-24 Gary Benson <gbenson@redhat.com>
4845
4846 * linux-low.c (current_lwp_ptid): New function.
4847 * linux-x86-low.c: Include nat/linux-nat.h.
4848 (x86_dr_low_get_addr): Use current_lwp_ptid.
4849 (x86_dr_low_get_control): Likewise.
4850 (x86_dr_low_get_status): Likewise.
4851
eef49a3d
PA
48522015-03-20 Pedro Alves <palves@redhat.com>
4853
4854 * tracepoint.c (cmd_qtstatus): Make "str" const.
4855
b2333d22
PA
48562015-03-20 Pedro Alves <palves@redhat.com>
4857
4858 * server.c (handle_general_set): Make "req_str" const.
4859
23f238d3
PA
48602015-03-19 Pedro Alves <palves@redhat.com>
4861
4862 * linux-low.c (linux_resume_one_lwp): Rename to ...
4863 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4864 instead call perror_with_name.
4865 (check_ptrace_stopped_lwp_gone): New function.
4866 (linux_resume_one_lwp): Reimplement as wrapper around
4867 linux_resume_one_lwp_throw that swallows errors if the LWP is
4868 gone.
4869
91baf43f
PA
48702015-03-19 Pedro Alves <palves@redhat.com>
4871
4872 * linux-low.c (count_events_callback, select_event_lwp_callback):
4873 No longer check whether the thread has resume_stop as last resume
4874 kind.
4875
8bf3b159
PA
48762015-03-19 Pedro Alves <palves@redhat.com>
4877
4878 * linux-low.c (count_events_callback, select_event_lwp_callback):
4879 Use the lwp's status_pending_p field, not the thread's.
4880
b90fc188
PA
48812015-03-19 Pedro Alves <palves@redhat.com>
4882
4883 * linux-low.c (select_event_lwp_callback): Update comments to
4884 no longer mention SIGTRAP.
4885
464b0089
GB
48862015-03-18 Gary Benson <gbenson@redhat.com>
4887
4888 * server.c (handle_query): Do not report vFile:fstat as supported.
4889
aa9e327f
GB
48902015-03-11 Gary Benson <gbenson@redhat.com>
4891
4892 * hostio.c (sys/types.h): New include.
4893 (sys/stat.h): Likewise.
4894 (common-remote-fileio.h): Likewise.
4895 (handle_fstat): New function.
4896 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 4897
791c0056
GB
48982015-03-11 Gary Benson <gbenson@redhat.com>
4899
4900 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4901 struct stat.st_blocks and struct stat.st_blksize.
4902 * configure: Regenerate.
4903 * config.in: Likewise.
4904 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4905 (OBS): Add common-remote-fileio.o.
4906 (common-remote-fileio.o): New rule.
4907
9a9df970
PA
49082015-03-09 Pedro Alves <palves@redhat.com>
4909
4910 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4911 'struct sockaddr' pointer in 'accept' call.
4912
9eb1356e
PA
49132015-03-09 Pedro Alves <palves@redhat.com>
4914
4915 Revert:
4916 2015-03-07 Pedro Alves <palves@redhat.com>
4917 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4918 or <winsock2.h> here. Instead include "gdb_socket.h".
4919 (remote_open): Use union gdb_sockaddr_u.
4920 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4921 or <winsock2.h> here. Instead include "gdb_socket.h".
4922 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4923 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4924 or <sys/un.h>.
4925 (init_named_socket, gdb_agent_helper_thread): Use union
4926 gdb_sockaddr_u.
4927
aac331e4
PA
49282015-03-07 Pedro Alves <palves@redhat.com>
4929
4930 * configure.ac (build_warnings): Move
4931 -Wdeclaration-after-statement to the C-specific set.
4932 * configure: Regenerate.
4933
366c75fc
PA
49342015-03-07 Pedro Alves <palves@redhat.com>
4935
4936 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4937 or <winsock2.h> here. Instead include "gdb_socket.h".
4938 (remote_open): Use union gdb_sockaddr_u.
4939 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4940 or <winsock2.h> here. Instead include "gdb_socket.h".
4941 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4942 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4943 or <sys/un.h>.
4944 (init_named_socket, gdb_agent_helper_thread): Use union
4945 gdb_sockaddr_u.
4946
492d29ea
PA
49472015-03-07 Pedro Alves <palves@redhat.com>
4948
4949 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4950 instead.
4951
60a191ed
YQ
49522015-03-06 Yao Qi <yao.qi@linaro.org>
4953
4954 * linux-aarch64-low.c (aarch64_insert_point): Use
4955 show_debug_regs as a boolean.
4956 (aarch64_remove_point): Likewise.
4957
f5771b1d
PA
49582015-03-05 Pedro Alves <palves@redhat.com>
4959
4960 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4961 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4962 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4963 * nto-low.c (nto_target_ops): Likewise.
4964 * spu-low.c (spu_target_ops): Likewise.
4965 * win32-low.c (win32_target_ops): Likewise.
4966
3e572f71
PA
49672015-03-04 Pedro Alves <palves@redhat.com>
4968
72f4393d 4969 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
4970 Decide whether a breakpoint triggered based on the SIGTRAP's
4971 siginfo.si_code.
72f4393d
L
4972 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4973 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
4974 (linux_low_filter_event): Check for breakpoints before checking
4975 watchpoints.
4976 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4977 siginfo.si_code.
72f4393d
L
4978 (linux_stopped_by_sw_breakpoint)
4979 (linux_supports_stopped_by_sw_breakpoint)
4980 (linux_stopped_by_hw_breakpoint)
4981 (linux_supports_stopped_by_hw_breakpoint): New functions.
4982 (linux_target_ops): Install new target methods.
3e572f71 4983
1ec68e26
PA
49842015-03-04 Pedro Alves <palves@redhat.com>
4985
4986 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4987 * server.c (swbreak_feature, hwbreak_feature): New globals.
4988 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4989 (captured_main): Clear swbreak_feature and hwbreak_feature.
4990 * server.h (swbreak_feature, hwbreak_feature): Declare.
4991 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4992 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4993 supports_stopped_by_hw_breakpoint>: New fields.
4994 (target_supports_stopped_by_sw_breakpoint)
4995 (target_stopped_by_sw_breakpoint)
4996 (target_supports_stopped_by_hw_breakpoint)
4997 (target_stopped_by_hw_breakpoint): Declare.
4998
15c66dd6
PA
49992015-03-04 Pedro Alves <palves@redhat.com>
5000
5001 enum lwp_stop_reason -> enum target_stop_reason
5002 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5003 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5004 (linux_wait_1, stuck_in_jump_pad_callback)
5005 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5006 (linux_stopped_by_watchpoint):
5007 * linux-low.h (enum lwp_stop_reason): Delete.
5008 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5009 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5010
98fc70d6
YQ
50112015-03-04 Yao Qi <yao.qi@linaro.org>
5012
5013 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5014
dd2ac174
GB
50152015-03-03 Gary Benson <gbenson@redhat.com>
5016
5017 * hostio.c (handle_vFile): Fix prefix lengths.
5018
d68e53f4
MM
50192015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5020
5021 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5022 ptr_bits.
5023
bf2d68ab
AA
50242015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5025
5026 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5027 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5028 (clean): Add "rm -f" for above C files.
5029 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5030 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5031 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5032 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5033 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5034 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5035 (init_registers_s390x_vx_linux64)
5036 (init_registers_s390x_tevx_linux64)
5037 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5038 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5039 declarations.
5040 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5041 (s390_store_vxrs_high): New functions.
5042 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5043 NT_S390_VXRS_HIGH.
5044 (s390_arch_setup): Add logic for selecting one of the new target
5045 descriptions. Activate the new vector regsets if applicable.
5046 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5047 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5048 and init_registers_s390x_tevx_linux64.
5049
c966a859
PA
50502015-03-01 Pedro Alves <palves@redhat.com>
5051
5052 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5053 parameter.
5054
4180215b
PA
50552015-02-27 Pedro Alves <palves@redhat.com>
5056
5057 * linux-x86-low.c (u_debugreg_offset): New function.
5058 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5059
749bab01
PA
50602015-02-27 Pedro Alves <palves@redhat.com>
5061
5062 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5063 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5064 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5065 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5066 (ps_lsetfpregs, ps_getpid)
5067 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5068 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5069 (ps_lsetxregs, ps_plog): Declare.
5070
3c14e5a3
PA
50712015-02-27 Pedro Alves <palves@redhat.com>
5072
5073 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5074 IP_AGENT_EXPORT_FUNC.
5075 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5076 IP_AGENT_EXPORT_FUNC.
5077 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5078 (IP_AGENT_EXPORT): Delete.
5079 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5080 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5081 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5082 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5083 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5084 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5085 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5086 (traceframe_read_count, traceframe_write_count)
5087 (traceframes_created, trace_state_variables, get_raw_reg)
5088 (get_trace_state_variable_value, set_trace_state_variable_value)
5089 (ust_loaded, helper_thread_id, cmd_buf): Use
5090 IPA_SYM_EXPORTED_NAME.
5091 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5092 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5093 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5094 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5095 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5096 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5097 EXTERN_C_PUSH/EXTERN_C_POP.
5098 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5099 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5100 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5101 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5102 (traceframe_write_count, traceframe_read_count)
5103 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5104 (about_to_request_buffer_space, get_trace_state_variable_value)
5105 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5106 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5107 EXTERN_C_PUSH/EXTERN_C_POP.
5108 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5109 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5110 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5111 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5112 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5113 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5114 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5115 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5116 Define.
5117 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5118 (IP_AGENT_EXPORT_VAR_DECL): Define.
5119 (tracing): Declare.
5120 (gdb_agent_get_raw_reg): Declare.
5121
fe978cb0
PA
51222015-02-27 Tom Tromey <tromey@redhat.com>
5123 Pedro Alves <palves@redhat.com>
5124
5125 Rename symbols whose names are reserved C++ keywords throughout.
5126
3bc3d82a
PA
51272015-02-27 Pedro Alves <palves@redhat.com>
5128
5129 * Makefile.in (COMPILER): New, get it from autoconf.
5130 (CXX): Get from autoconf instead.
5131 (COMPILE.pre): Use COMPILER.
5132 (CC-LD): Rename to ...
5133 (CC_LD): ... this. Use COMPILER.
5134 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5135 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5136 * acinclude.m4: Include build-with-cxx.m4.
5137 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5138 Disable -Werror by default if building in C++ mode.
5139 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5140 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5141 the C++ compiler. Save/restore CXXFLAGS too.
5142 * configure: Regenerate.
5143
07697489
PA
51442015-02-27 Pedro Alves <palves@redhat.com>
5145
5146 * acinclude.m4: Include libiberty.m4.
5147 * configure.ac: Call libiberty_INIT.
5148 * config.in, configure: Regenerate.
5149
9beb7c4e
PA
51502015-02-26 Pedro Alves <palves@redhat.com>
5151
5152 * linux-low.c (linux_wait_1): When incrementing the PC past a
5153 program breakpoint always use the_low_target.breakpoint_len as
5154 increment, rather than the maximum between that and
5155 the_low_target.decr_pc_after_break.
5156
8090aef2
PA
51572015-02-23 Pedro Alves <palves@redhat.com>
5158
5159 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5160 thread was doing a step-over; always adjust the PC if
5161 we stepped over a permanent breakpoint.
5162 (linux_wait_1): If we stepped over breakpoint that was on top of a
5163 permanent breakpoint, manually advance the PC past it.
5164
bc9540e8
PA
51652015-02-23 Pedro Alves <palves@redhat.com>
5166
5167 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5168 modes.
5169 (x86_fill_gregset, x86_store_gregset): Use it when handling
5170 $orig_eax.
5171
2db9a427
PA
51722015-02-20 Pedro Alves <palves@redhat.com>
5173
5174 * thread-db.c: Include "nat/linux-procfs.h".
5175 (thread_db_init): Skip listing new threads if the kernel supports
5176 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5177
afa8d396
PA
51782015-02-20 Pedro Alves <palves@redhat.com>
5179
5180 * linux-low.c (status_pending_p_callback): Use ptid_match.
5181
c9587f88
AT
51822015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5183
5184 PR breakpoints/16812
5185 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5186 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5187 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5188
b05ec7a5
AT
51892015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5190
5191 PR breakpoints/15956
5192 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5193
d33501a5
MM
51942015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5195
5196 * linux-low.c (linux_low_btrace_conf): Print size.
5197 * server.c (handle_btrace_conf_general_set): New.
5198 (hanle_general_set): Call handle_btrace_conf_general_set.
5199 (handle_query): Report Qbtrace-conf:bts:size as supported.
5200
f4abbc16
MM
52012015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5202
5203 * linux-low.c (linux_low_enable_btrace): Update parameters.
5204 (linux_low_btrace_conf): New.
5205 (linux_target_ops)<to_btrace_conf>: Initialize.
5206 * server.c (current_btrace_conf): New.
5207 (handle_btrace_enable): Rename to ...
5208 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5209 to target_enable_btrace. Update comment. Update users.
5210 (handle_qxfer_btrace_conf): New.
5211 (qxfer_packets): Add btrace-conf entry.
5212 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5213 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5214 (target_ops)<read_btrace_conf>: New.
5215 (target_enable_btrace): Update parameters.
5216 (target_read_btrace_conf): New.
5217
043c3577
MM
52182015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5219
5220 * server.c (handle_btrace_general_set): Remove call to
5221 target_supports_btrace.
5222 (supported_btrace_packets): New.
5223 (handle_query): Call supported_btrace_packets.
5224 * target.h: include btrace-common.h.
5225 (btrace_target_info): Removed.
5226 (supports_btrace, target_supports_btrace): Update parameters.
5227
734b0e4b
MM
52282015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5229
5230 * Makefile.in (SFILES): Add common/btrace-common.c.
5231 (OBS): Add common/btrace-common.o.
5232 (btrace-common.o): Add build rules.
5233 * linux-low: Include btrace-common.h.
5234 (linux_low_read_btrace): Use struct btrace_data. Call
5235 btrace_data_init and btrace_data_fini.
5236
d6c146e9
PA
52372015-02-06 Pedro Alves <palves@redhat.com>
5238
5239 * thread-db.c (find_new_threads_callback): Add debug output.
5240
20ba1ce6
PA
52412015-02-04 Pedro Alves <palves@redhat.com>
5242
5243 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5244 (resume_stopped_resumed_lwps): New function.
5245 (linux_wait_for_event_filtered): Use it.
5246
8cc73a39
SDJ
52472015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5248
5249 * Makefile.in (SFILES): Add linux-personality.c.
5250 (linux-personality.o): New rule.
5251 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5252 list of objects to be built.
5253 * linux-low.c: Include nat/linux-personality.h.
5254 (linux_create_inferior): Remove code to disable address space
5255 randomization (moved to ../nat/linux-personality.c). Create
5256 cleanup to disable address space randomization.
5257
fb23d554
SDJ
52582015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5259
5260 * Makefile.in (posix-strerror.o): New rule.
5261 (mingw-strerror.o): Likewise.
5262 * configure: Regenerated.
5263 * configure.ac: Source file ../common/common.host. Initialize new
5264 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5265
cdf43629
YQ
52662015-01-14 Yao Qi <yao@codesourcery.com>
5267
5268 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5269 (ppc-linux.o): New rule.
5270 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5271 * configure.ac: AC_CHECK_FUNCS(getauxval).
5272 * config.in: Re-generated.
5273 * configure: Re-generated.
5274 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5275 ppc64_64bit_inferior_p
5276
514c5338
YQ
52772015-01-14 Yao Qi <yao@codesourcery.com>
5278
5279 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5280 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5281 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5282 (PT_ORIG_R3, PT_TRAP): Likewise.
5283 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5284 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5285 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5286
3368c1e5
JB
52872015-01-10 Joel Brobecker <brobecker@adacore.com>
5288
5289 * i387-fp.c (i387_cache_to_xsave): In look over
5290 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5291 zmmh_low_space field by use of zmmh_high_space.
5292
582511be
PA
52932015-01-09 Pedro Alves <palves@redhat.com>
5294
5295 * linux-low.c (step_over_bkpt): Move higher up in the file.
5296 (handle_extended_wait): Don't store the stop_pc here.
5297 (get_stop_pc): Adjust comments and rename to ...
5298 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5299 stopped for a software breakpoint or hardware breakpoint.
5300 (thread_still_has_status_pending_p): New function.
5301 (status_pending_p_callback): Use
5302 thread_still_has_status_pending_p. If the event is no longer
5303 interesting, resume the LWP.
5304 (handle_tracepoints): Add assert.
5305 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5306 (wstatus_maybe_breakpoint): New function.
5307 (cancel_breakpoint): Delete function.
5308 (check_stopped_by_watchpoint): New function, factored out from
5309 linux_low_filter_event.
5310 (lp_status_maybe_breakpoint): Delete function.
5311 (linux_low_filter_event): Remove filter_ptid argument.
5312 Leave thread group exits pending here. Store the LWP's stop PC.
5313 Always leave events pending.
5314 (linux_wait_for_event_filtered): Pull all events out of the
5315 kernel, and leave them all pending.
5316 (count_events_callback, select_event_lwp_callback): Consider all
5317 events.
5318 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5319 (select_event_lwp): Only give preference to the stepping LWP in
5320 all-stop mode. Adjust comments.
5321 (ignore_event): New function.
5322 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5323 references to cancel_breakpoints. Adjust to renames. Also give
5324 equal priority to all LWPs that have had events in non-stop mode.
5325 If reporting a software breakpoint event, unadjust the LWP's PC.
5326 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5327 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5328 Adjust.
5329 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5330 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5331 (linux_stopped_by_watchpoint): Adjust.
5332 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5333 * linux-low.h (enum lwp_stop_reason): New.
5334 (struct lwp_info) <stop_pc>: Adjust comment.
5335 <stopped_by_watchpoint>: Delete field.
5336 <stop_reason>: New field.
5337 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5338 * mem-break.c (software_breakpoint_inserted_here)
5339 (hardware_breakpoint_inserted_here): New function.
5340 * mem-break.h (software_breakpoint_inserted_here)
5341 (hardware_breakpoint_inserted_here): Declare.
5342 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5343 (cancel_breakpoints): Delete.
5344 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5345 (upload_fast_traceframes): Remove references to
5346 cancel_breakpoints.
5347
a33e3959
PA
53482015-01-09 Pedro Alves <palves@redhat.com>
5349
5350 * thread-db.c (find_new_threads_callback): Ignore thread if the
5351 kernel thread ID is -1.
5352
8784d563
PA
53532015-01-09 Pedro Alves <palves@redhat.com>
5354
5355 * linux-low.c (linux_attach_fail_reason_string): Move to
5356 nat/linux-ptrace.c, and rename.
5357 (linux_attach_lwp): Update comment.
5358 (attach_proc_task_lwp_callback): New function.
5359 (linux_attach): Adjust to rename and use
5360 linux_proc_attach_tgid_threads.
5361 (linux_attach_fail_reason_string): Delete declaration.
5362
76f2b779
JB
53632015-01-01 Joel Brobecker <brobecker@adacore.com>
5364
5365 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5366 * server.c (gdbserver_version): Likewise.
5367
fafcc06a
SDJ
53682014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5369
5370 * remote-utils.c: Include ctype.h.
5371 (input_interrupt): Explicitly handle the case when the char
5372 received is the NUL byte. Improve the printing of non-ASCII
5373 characters.
5374
beed38b8
JB
53752014-12-16 Joel Brobecker <brobecker@adacore.com>
5376
5377 * linux-low.c (linux_low_filter_event): Update call to
5378 linux_enable_event_reporting following the addition of
5379 a new parameter to that function.
5380
bf330350
CU
53812014-12-16 Catalin Udma <catalin.udma@freescale.com>
5382
5383 PR server/17457
5384 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5385 (AARCH64_FPCR_REGNO): Likewise.
5386 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5387 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5388 (aarch64_store_fpregset): Likewise.
5389
5227d625
JB
53902014-12-15 Joel Brobecker <brobecker@adacore.com>
5391
5392 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5393 Remove FIXME comment about assumption about N.
5394
f93b65a0
JB
53952014-12-13 Joel Brobecker <brobecker@adacore.com>
5396
5397 * configure.ac: If large-file support is disabled in GDBserver,
5398 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5399 * configure: Regenerate.
5400
e5a9158d
AA
54012014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5402
5403 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5404 warning upon ENODATA from ptrace.
5405 * linux-s390-low.c (s390_store_tdb): New.
5406 (s390_regsets): Add regset for NT_S390_TDB.
5407
feea5f36
AA
54082014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5409
5410 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5411 without a fill_function.
5412 * linux-s390-low.c (s390_fill_last_break): Remove.
5413 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5414 (s390_arch_setup): Use regset's size instead of fill_function for
5415 loop end condition.
5416
098dbe61
AA
54172014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5418
5419 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5420 the regset's store function when ptrace returned an error.
5421 * regcache.c (get_thread_regcache): Invalidate register cache
5422 before fetching inferior's registers.
5423
28eef672
AA
54242014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5425
5426 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5427 while-loop as for-loop.
5428 (regsets_store_inferior_registers): Likewise.
5429
bdca27a2
YQ
54302014-11-28 Yao Qi <yao@codesourcery.com>
5431
5432 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5433 * config.in, configure: Re-generate.
5434 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5435 is defined.
5436
9c232dda
YQ
54372014-11-21 Yao Qi <yao@codesourcery.com>
5438
5439 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5440 (AC_CHECK_HEADERS): Remove malloc.h.
5441 * configure: Re-generated.
5442 * config.in: Re-generated.
5443 * server.h: Don't include alloca.h and malloc.h.
5444 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5445 Don't include malloc.h.
5446
43968415
JB
54472014-11-17 Joel Brobecker <brobecker@adacore.com>
5448
5449 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5450 corresponding ERRNO check in same block.
5451
40e91bc7
PA
54522014-11-12 Pedro Alves <palves@redhat.com>
5453
5454 * server.c (cont_thread): Update comment.
5455 (start_inferior, attach_inferior): No longer clear cont_thread.
5456 (handle_v_cont): No longer set cont_thread.
5457 (captured_main): Clear cont_thread each time a GDB connects.
5458
c2c118cf
PA
54592014-11-12 Pedro Alves <palves@redhat.com>
5460
5461 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5462 thread, and don't resume all threads if the Hc thread has exited.
5463
78708b7c
PA
54642014-11-12 Pedro Alves <palves@redhat.com>
5465
5466 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5467 the process group instead of to a specific LWP.
5468
a2abc7de
PA
54692014-10-15 Pedro Alves <palves@redhat.com>
5470
5471 PR server/17487
5472 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5473 parameter.
5474 (arm_set_thread_context): Delete.
5475 (the_low_target): Adjust.
5476 * win32-i386-low.c (debug_registers_changed)
5477 (debug_registers_used): Delete.
5478 (update_debug_registers_callback): New function.
5479 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5480 needing to update their debug registers.
5481 (win32_get_current_dr): New function.
5482 (x86_dr_low_get_addr, x86_dr_low_get_control)
5483 (x86_dr_low_get_status): Fetch the debug register from the thread
5484 record's context.
5485 (i386_initial_stuff): Adjust.
5486 (i386_get_thread_context): Remove current_event parameter. Don't
5487 clear debug_registers_changed nor copy DR values to
5488 debug_reg_state.
5489 (i386_set_thread_context): Delete.
5490 (i386_prepare_to_resume): New function.
5491 (i386_thread_added): Mark the thread as needing to update irs
5492 debug registers.
5493 (the_low_target): Remove i386_set_thread_context and install
5494 i386_prepare_to_resume.
5495 * win32-low.c (win32_get_thread_context): Adjust.
5496 (win32_set_thread_context): Use SetThreadContext
5497 directly.
5498 (win32_prepare_to_resume): New function.
5499 (win32_require_context): New function, factored out from ...
5500 (thread_rec): ... this.
5501 (continue_one_thread): Call win32_prepare_to_resume on each thread
5502 we're about to continue.
5503 (win32_resume): Call win32_prepare_to_resume on the event thread.
5504 * win32-low.h (struct win32_thread_info)
5505 <debug_registers_changed>: New field.
5506 (struct win32_target_ops): Change prototype of set_thread_context,
5507 delete set_thread_context and add prepare_to_resume.
5508 (win32_require_context): New declaration.
5509
a442d071
GB
55102014-10-08 Gary Benson <gbenson@redhat.com>
5511
5512 * server.h: Do not include common-exceptions.h.
5513
6f1947e8
GB
55142014-10-08 Gary Benson <gbenson@redhat.com>
5515
5516 * server.h: Do not include cleanups.h.
5517
63b434a4
JH
55182014-09-30 James Hogan <james.hogan@imgtec.com>
5519
5520 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5521 mips64-dsp-linux.c.
5522
c4d9ceb6
YQ
55232014-09-23 Yao Qi <yao@codesourcery.com>
5524
5525 * linux-low.c (lp_status_maybe_breakpoint): New function.
5526 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5527 (count_events_callback): Likewise.
5528 (select_event_lwp_callback): Likewise.
5529 (cancel_breakpoints_callback): Likewise.
5530
89a5711c
DB
55312014-09-19 Don Breazeal <donb@codesourcery.com>
5532
5533 * linux-low.c (handle_extended_wait): Call
5534 linux_ptrace_get_extended_event.
5535 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5536 linux_is_extended_waitstatus.
5537
bffc0964
JB
55382014-09-16 Joel Brobecker <brobecker@adacore.com>
5539
5540 * Makefile.in (CPPFLAGS): Define.
5541 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5542 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5543
0bfdf32f
GB
55442014-09-16 Gary Benson <gbenson@redhat.com>
5545
5546 * inferiors.h (current_inferior): Renamed as...
5547 (current_thread): New variable. All uses updated.
5548 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5549 (maybe_move_out_of_jump_pad): Likewise.
5550 (cancel_breakpoint): Likewise.
5551 (linux_low_filter_event): Likewise.
5552 (wait_for_sigstop): Likewise.
5553 (linux_resume_one_lwp): Likewise.
5554 (need_step_over_p): Likewise.
5555 (start_step_over): Likewise.
5556 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5557 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5558 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5559 and save_inferior as saved_thread.
5560 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5561 saved_thread.
5562 (regcache_invalidate_thread): Likewise.
5563 * remote-utils.c (prepare_resume_reply): Likewise.
5564 * thread-db.c (thread_db_get_tls_address): Likewise.
5565 (disable_thread_event_reporting): Likewise.
5566 (remove_thread_event_breakpoints): Likewise.
5567 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5568 as saved_thread.
5569 * target.h (set_desired_inferior): Renamed as...
5570 (set_desired_thread): New declaration. All uses updated.
5571 * server.c (myresume): Updated comment to reference thread instead
5572 of inferior.
5573 (handle_serial_event): Likewise.
5574 (handle_target_event): Likewise.
5575
361c8ade
GB
55762014-09-12 Tom Tromey <tromey@redhat.com>
5577 Gary Benson <gbenson@redhat.com>
5578
5579 * regcache.h: Include common-regcache.h.
5580 (regcache_read_pc): Don't declare.
5581 * regcache.c (get_thread_regcache_for_ptid): New function.
5582
bd9269f7
GB
55832014-09-11 Tom Tromey <tromey@redhat.com>
5584 Gary Benson <gbenson@redhat.com>
5585
5586 * symbol.c: New file.
5587 * Makefile.in (SFILES): Add symbol.c.
5588 (OBS): Add symbol.o.
5589
f8c1d06b
GB
55902014-09-11 Gary Benson <gbenson@redhat.com>
5591
5592 * target.c (target_stop_ptid, target_continue_ptid): New
5593 functions.
5594
721ec300
GB
55952014-09-11 Tom Tromey <tromey@redhat.com>
5596 Gary Benson <gbenson@redhat.com>
5597
5598 * target.h: Include target/target.h.
5599 * target.c (target_read_memory, target_read_uint32)
5600 (target_write_memory): New functions.
5601
c5e92cca
GB
56022014-09-11 Gary Benson <gbenson@redhat.com>
5603
5604 * server.h (debug_hw_points): Don't declare.
5605 * server.c (debug_hw_points): Don't define. Replace all uses
5606 with show_debug_regs.
5607 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5608 all uses with show_debug_regs.
5609
2e4bb98a
EBM
56102014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5611
5612 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5613 endianness into account.
5614 (ppc_supply_ptrace_register): Likewise.
5615
ac740bc7
JH
56162014-09-03 James Hogan <james.hogan@imgtec.com>
5617
5618 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5619 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5620
97ea6506
GB
56212014-09-03 Gary Benson <gbenson@redhat.com>
5622
5623 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5624 ALL_DEBUG_ADDRESS_REGISTERS.
5625
df7e5265
GB
56262014-09-02 Gary Benson <gbenson@redhat.com>
5627
5628 * i386-low.h: Renamed as...
5629 * x86-low.h: New file. All type, function and variable name
5630 prefixes changed from "i386_" to "x86_". All references updated.
5631 * i386-low.c: Renamed as...
5632 * x86-low.c: New file. All type, function and variable name
5633 prefixes changed from "i386_" to "x86_". All references updated.
5634
ed859da7
GB
56352014-09-02 Gary Benson <gbenson@redhat.com>
5636
5637 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5638 (x86_linux_new_thread): Likewise.
5639
860789c7
GB
56402014-08-29 Gary Benson <gbenson@redhat.com>
5641
5642 * server.h (setjmp.h): Do not include.
5643 (toplevel): Do not declare.
5644 (common-exceptions.h): Include.
5645 (cleanups.h): Likewise.
5646 * server.c (toplevel): Do not define.
5647 (exit_code): New static global.
5648 (detach_or_kill_for_exit_cleanup): New function.
5649 (main): New function. Original main renamed to...
5650 (captured_main): New function.
5651 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5652
ff55e1b5
GB
56532014-08-29 Gary Benson <gbenson@redhat.com>
5654
5655 * Makefile.in (SFILES): Add common/common-exceptions.c.
5656 (OBS): Add common-exceptions.o.
5657 (common-exceptions.o): New rule.
5658 * utils.c (prepare_to_throw_exception): New function.
5659
e9bcb658
GB
56602014-08-29 Gary Benson <gbenson@redhat.com>
5661
5662 * config.in: Regenerate.
5663 * configure: Likewise.
5664
e3180625
GB
56652014-08-29 Gary Benson <gbenson@redhat.com>
5666
5667 * Makefile.in (SFILES): Add common/cleanups.c.
5668 (OBS): cleanups.o.
5669 (cleanups.o): New rule.
5670
e3d6ba5d
GB
56712014-08-29 Gary Benson <gbenson@redhat.com>
5672
5673 * utils.c (internal_vwarning): New function.
5674
7096e886
GB
56752014-08-28 Gary Benson <gbenson@redhat.com>
5676
5677 * utils.h (fatal): Remove declaration.
5678 * utils.c (fatal): Remove function.
5679
14ce3192
GB
56802014-08-28 Gary Benson <gbenson@redhat.com>
5681
5682 * tracepoint.c (gdb_agent_init): Replace fatal with
5683 perror_with_name.
5684 (initialize_tracepoint): Likewise.
5685
50278d59
GB
56862014-08-28 Gary Benson <gbenson@redhat.com>
5687
5688 * remote-utils.c (remote_prepare): Replace fatal with error.
5689
aa96c426
GB
56902014-08-28 Gary Benson <gbenson@redhat.com>
5691
5692 * linux-low.c (linux_async): Replace fatal with warning.
5693 Tidy up and return.
5694 (linux_start_non_stop): Return -1 if linux_async failed.
5695
f7160e97
GB
56962014-08-28 Gary Benson <gbenson@redhat.com>
5697
5698 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5699 gdb_assert.
5700 (i386_dr_low_get_addr): Remove vague comment.
5701 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5702 gdb_assert.
5703
38e08fca
GB
57042014-08-28 Gary Benson <gbenson@redhat.com>
5705
5706 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5707 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5708 internal_error.
5709 (linux_resume_one_lwp): Likewise.
5710 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5711 gdb_assert.
5712 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5713 with internal_error.
5714 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5715 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5716 (find_register_by_name): Replace fatal with internal_error.
5717 (find_regno): Likewise.
5718 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5719 * thread-db.c (thread_db_create_event): Likewise.
5720 (thread_db_load_search): Likewise.
5721 (try_thread_db_load_1): Likewise.
5722 * tracepoint.c (get_jump_space_head): Replace fatal with
5723 internal_error.
5724 (claim_trampoline_space): Likewise.
5725 (have_fast_tracepoint_trampoline_buffer): Likewise.
5726 (cmd_qtstart): Likewise.
5727 (stop_tracing): Likewise.
5728 (fast_tracepoint_collecting): Likewise.
5729 (target_malloc): Likewise.
5730 (download_tracepoint): Likewise.
5731 (download_trace_state_variables): Replace check with gdb_assert.
5732 (upload_fast_traceframes): Replace fatal with internal_error.
5733
34abf635
GB
57342014-08-19 Tom Tromey <tromey@redhat.com>
5735 Gary Benson <gbenson@redhat.com>
5736
5737 * Makefile.in (SFILES): Add common/common-debug.c.
5738 (OBS): Add common-debug.o.
5739 (common-debug.o): New rule.
5740 * debug.h (debug_printf): Don't declare.
5741 * debug.c (debug_printf): Renamed and rewritten as...
5742 (debug_vprintf): New function.
5743
f6e94d78
GB
57442014-08-19 Gary Benson <gbenson@redhat.com>
5745
5746 * utils.h: Do not include print-utils.h.
5747
9239eeab
GB
57482014-08-19 Tom Tromey <tromey@redhat.com>
5749 Gary Benson <gbenson@redhat.com>
5750
5751 * server.h: Add static assertion.
5752 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5753
ef87c8bb
GB
57542014-08-19 Tom Tromey <tromey@redhat.com>
5755 Gary Benson <gbenson@redhat.com>
5756
5757 * Makefile.in (SFILES): Add common/errors.c.
5758 (OBS): Add errors.o.
5759 (IPA_OBS): Add errors-ipa.o.
5760 (errors.o): New rule.
5761 (errors-ipa.o): Likewise.
5762 * utils.h (perror_with_name, error, warning): Don't declare.
5763 * utils.c (warning): Renamed and rewritten as...
5764 (vwarning): New function.
5765 (error): Renamed and rewritten as...
5766 (verror): New function.
5767 (internal_error): Renamed and rewritten as...
5768 (internal_verror): New function.
5769
bb974a24
GB
57702014-08-07 Gary Benson <gbenson@redhat.com>
5771
5772 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5773 * configure: Regenerate.
5774 * config.in: Likewise.
5775 * server.h: Do not include errno.h.
5776 * event-loop.c: Likewise.
5777 * hostio-errno.c: Likewise.
5778 * linux-low.c: Likewise.
5779 * remote-utils.c: Likewise.
5780 * spu-low.c: Likewise.
5781 * utils.c: Likewise.
5782 * gdbreplay.c: Unconditionally include errno.h.
5783
6d3d12eb
GB
57842014-08-07 Gary Benson <gbenson@redhat.com>
5785
5786 * server.h: Do not include string.h.
5787 * event-loop.c: Likewise.
5788 * linux-low.c: Likewise.
5789 * regcache.c: Likewise.
5790 * remote-utils.c: Likewise.
5791 * spu-low.c: Likewise.
5792 * utils.c: Likewise.
5793
dccbb609
GB
57942014-08-07 Gary Benson <gbenson@redhat.com>
5795
5796 * server.h: Do not include gdb_assert.h.
5797
e76df0d0
GB
57982014-08-07 Gary Benson <gbenson@redhat.com>
5799
5800 * server.h: Do not include common-utils.h.
5801
4cb9c816
GB
58022014-08-07 Gary Benson <gbenson@redhat.com>
5803
5804 * server.h: Do not include ptid.h.
5805 * notif.h: Likewise.
5806
3995eeee
GB
58072014-08-07 Gary Benson <gbenson@redhat.com>
5808
5809 * server.h: Do not include gdb_locale.h.
5810
cb9f1a9b
GB
58112014-08-07 Gary Benson <gbenson@redhat.com>
5812
5813 * server.h: Do not include gdb/signals.h.
5814 * win32-low.c: Likewise.
5815
a5fceff8
GB
58162014-08-07 Gary Benson <gbenson@redhat.com>
5817
5818 * server.h: Do not include pathmax.h.
5819
b9391142
GB
58202014-08-07 Gary Benson <gbenson@redhat.com>
5821
5822 * server.h: Do not include libiberty.h.
5823 * linux-bfin-low.c: Likewise.
5824
0e443c87
GB
58252014-08-07 Gary Benson <gbenson@redhat.com>
5826
5827 * server.h: Do not include ansidecl.h.
5828
8ebb3f56
GB
58292014-08-07 Gary Benson <gbenson@redhat.com>
5830
5831 * linux-x86-low.c: Do not include stddef.h.
5832 * lynx-ppc-low.c: Likewise.
5833 * tracepoint.c: Likewise.
5834
8980bdf6
GB
58352014-08-07 Gary Benson <gbenson@redhat.com>
5836
5837 * server.h: Do not include stdarg.h.
5838 * nto-low.c: Likewise.
5839
d7096f71
GB
58402014-08-07 Gary Benson <gbenson@redhat.com>
5841
5842 * server.h: Do not include stdlib.h.
5843 * inferiors.c: Likewise.
5844 * linux-low.c: Likewise.
5845 * regcache.c: Likewise.
5846 * spu-low.c: Likewise.
5847 * tracepoint.c: Likewise.
5848 * utils.c: Likewise.
5849
d02f550d
GB
58502014-08-07 Gary Benson <gbenson@redhat.com>
5851
5852 * server.h: Do not include stdio.h.
5853 * linux-low.c: Likewise.
5854 * remote-utils.c: Likewise.
5855 * spu-low.c: Likewise.
5856 * utils.c: Likewise.
5857 * wincecompat.c: Likewise.
5858
87f6c4e3
GB
58592014-08-06 Gary Benson <gbenson@redhat.com>
5860
5861 * regcache.c (init_register_cache): Move conditionals inside if.
5862
7089dca4
GB
58632014-08-06 Gary Benson <gbenson@redhat.com>
5864
5865 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5866
462f517e
GB
58672014-07-31 Gary Benson <gbenson@redhat.com>
5868
5869 * ax.h: Do not include server.h.
5870 * gdbthread.h: Likewise.
5871 * lynx-low.h: Likewise.
5872 * notif.h: Likewise.
5873
976411d6
GB
58742014-07-30 Gary Benson <gbenson@redhat.com>
5875
5876 * server.h: Include common-defs.h.
5877 Do not include config.h or build-gnulib-gdbserver/config.h.
5878
d41f6d8e
GB
58792014-07-30 Gary Benson <gbenson@redhat.com>
5880
5881 * hostio-errno.c: Move server.h to top of includes list.
5882 * inferiors.c: Likewise.
5883 * linux-x86-low.c: Likewise.
5884 * notif.c: Include server.h.
5885
314c6a35
TT
58862014-07-24 Tom Tromey <tromey@redhat.com>
5887 Gary Benson <gbenson@redhat.com>
5888
5889 * server.h (CORE_ADDR): Now unsigned.
5890
69ff6be5
PA
58912014-07-16 Pedro Alves <palves@redhat.com>
5892
5893 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5894
ce9e3fe7
PA
58952014-07-15 Pedro Alves <palves@redhat.com>
5896
5897 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5898 copy.
5899
e76126e8
PA
59002014-07-11 Pedro Alves <palves@redhat.com>
5901
5902 * linux-low.c (kill_wait_lwp): New function, based on
5903 kill_one_lwp_callback, but use my_waitpid directly.
5904 (kill_one_lwp_callback, linux_kill): Use it.
5905
8e9db26e
PA
59062014-06-23 Pedro Alves <palves@redhat.com>
5907
5908 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5909 before setting DR0..DR3.
5910
698b3e08
GB
59112014-06-20 Gary Benson <gbenson@redhat.com>
5912
5913 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5914 * configure: Regenerated.
5915 * config.in: Likewise.
5916
125f8a3d
GB
59172014-06-20 Gary Benson <gbenson@redhat.com>
5918
5919 * Makefile.in (SFILES): Update locations for files moved
5920 from common to nat.
5921 (object file files): Reordered.
5922
42995dbd
GB
59232014-06-20 Gary Benson <gbenson@redhat.com>
5924
5925 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5926 (i386_dr_low_set_addr): Likewise.
5927 (i386_dr_low_get_addr): Likewise.
5928 (i386_dr_low_can_set_control): Likewise.
5929 (i386_dr_low_set_control): Likewise.
5930 (i386_dr_low_get_control): Likewise.
5931 (i386_dr_low_get_status): Likewise.
5932 (i386_get_debug_register_length): Likewise.
5933 * linux-x86-low.c (i386_dr_low_set_addr):
5934 Changed signature. Made static.
5935 (i386_dr_low_get_addr): Likewise.
5936 (i386_dr_low_set_control): Likewise.
5937 (i386_dr_low_get_control): Likewise.
5938 (i386_dr_low_get_status): Likewise.
5939 (i386_dr_low): New global variable.
5940 * win32-i386-low.c (i386_dr_low_set_addr):
5941 Changed signature. Made static.
5942 (i386_dr_low_get_addr): Likewise.
5943 (i386_dr_low_set_control): Likewise.
5944 (i386_dr_low_get_control): Likewise.
5945 (i386_dr_low_get_status): Likewise.
5946 (i386_dr_low): New global variable.
5947
e1d2394b
MS
59482014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5949
5950 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5951 * Makefile.in (AR, AR_FLAGS): Define.
5952 * configure: Regenerate.
5953
3a8ee006
GB
59542014-06-19 Gary Benson <gbenson@redhat.com>
5955
5956 * Makefile.in (i386-dregs.o): New rule.
5957 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5958 * i386-low.c (target.h): Remove include.
5959 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5960 (DR_CONTROL_SHIFT): Likewise.
5961 (DR_CONTROL_SIZE): Likewise.
5962 (DR_RW_EXECUTE): Likewise.
5963 (DR_RW_WRITE): Likewise.
5964 (DR_RW_READ): Likewise.
5965 (DR_RW_IORW): Likewise.
5966 (DR_LEN_1): Likewise.
5967 (DR_LEN_2): Likewise.
5968 (DR_LEN_4): Likewise.
5969 (DR_LEN_8): Likewise.
5970 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5971 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5972 (DR_ENABLE_SIZE): Likewise.
5973 (DR_LOCAL_SLOWDOWN): Likewise.
5974 (DR_GLOBAL_SLOWDOWN): Likewise.
5975 (DR_CONTROL_RESERVED): Likewise.
5976 (I386_DR_CONTROL_MASK): Likewise.
5977 (I386_DR_VACANT): Likewise.
5978 (I386_DR_LOCAL_ENABLE): Likewise.
5979 (I386_DR_GLOBAL_ENABLE): Likewise.
5980 (I386_DR_DISABLE): Likewise.
5981 (I386_DR_SET_RW_LEN): Likewise.
5982 (I386_DR_GET_RW_LEN): Likewise.
5983 (I386_DR_WATCH_HIT): Likewise.
5984 (i386_wp_op_t): Likewise.
5985 (i386_show_dr): Likewise.
5986 (i386_length_and_rw_bits): Likewise.
5987 (i386_insert_aligned_watchpoint): Likewise.
5988 (i386_remove_aligned_watchpoint): Likewise.
5989 (i386_handle_nonaligned_watchpoint): Likewise.
5990 i386_update_inferior_debug_regs(): Likewise.
5991 (i386_dr_insert_watchpoint): Likewise.
5992 (i386_dr_remove_watchpoint): Likewise.
5993 (i386_dr_region_ok_for_watchpoint): Likewise.
5994 (i386_dr_stopped_data_address): Likewise.
5995 (i386_dr_stopped_by_watchpoint): Likewise.
5996
8f26655c
GB
59972014-06-19 Gary Benson <gbenson@redhat.com>
5998
5999 * i386-low.c (i386_dr_show): Renamed to
6000 i386_show_dr and made static. All uses updated.
6001 (i386_dr_length_and_rw_bits): Renamed to
6002 i386_length_and_rw_bits and made static.
6003 All uses updated.
6004 (i386_dr_insert_aligned_watchpoint): Renamed to
6005 i386_insert_aligned_watchpoint and made static.
6006 All uses updated.
6007 (i386_dr_remove_aligned_watchpoint): Renamed to
6008 i386_remove_aligned_watchpoint and made static.
6009 All uses updated.
6010 (i386_dr_update_inferior_debug_regs): Renamed to
6011 i386_update_inferior_debug_regs and made static.
6012 All uses updated.
6013
b9228891
GB
60142014-06-18 Gary Benson <gbenson@redhat.com>
6015
5171def3
GB
6016 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6017 (i386_dr_low_can_set_control): Likewise.
6018 (i386_get_debug_register_length): Likewise.
6019 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6020 (i386_dr_low_can_set_control): Likewise.
6021 (i386_get_debug_register_length): Likewise.
6022
60232014-06-17 Gary Benson <gbenson@redhat.com>
6024
b9228891
GB
6025 * i386-low.h (i386-dregs.h): New include.
6026 (DR_FIRSTADDR): Now in i386-dregs.h.
6027 (DR_LASTADDR): Likewise.
6028 (DR_NADDR): Likewise.
6029 (DR_STATUS): Likewise.
6030 (DR_CONTROL): Likewise.
6031 (i386_debug_reg_state): Likewise.
6032 (i386_dr_insert_watchpoint): Likewise.
6033 (i386_dr_remove_watchpoint): Likewise.
6034 (i386_dr_region_ok_for_watchpoint): Likewise.
6035 (i386_dr_stopped_data_address): Likewise.
6036 (i386_dr_stopped_by_watchpoint): Likewise.
6037 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6038
4be83cc2
GB
60392014-06-18 Gary Benson <gbenson@redhat.com>
6040
6041 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6042 i386_dr_insert_watchpoint.
6043 (i386_low_remove_watchpoint): Renamed to
6044 i386_dr_remove_watchpoint.
6045 (i386_low_region_ok_for_watchpoint): Renamed to
6046 i386_dr_region_ok_for_watchpoint.
6047 (i386_low_stopped_data_address): Renamed to
6048 i386_dr_stopped_data_address.
6049 (i386_low_stopped_by_watchpoint): Renamed to
6050 i386_dr_stopped_by_watchpoint.
6051 * i386-low.c (i386_show_dr): Renamed to
6052 i386_dr_show and made nonstatic. All uses updated.
6053 (i386_length_and_rw_bits): Renamed to
6054 i386_dr_length_and_rw_bits and made nonstatic.
6055 All uses updated.
6056 (i386_insert_aligned_watchpoint): Renamed to
6057 i386_dr_insert_aligned_watchpoint and made nonstatic.
6058 All uses updated.
6059 (i386_remove_aligned_watchpoint): Renamed to
6060 i386_dr_remove_aligned_watchpoint and made nonstatic.
6061 All uses updated.
6062 (i386_update_inferior_debug_regs): Renamed to
6063 i386_dr_update_inferior_debug_regs and made nonstatic.
6064 All uses updated.
6065 (i386_low_insert_watchpoint): Renamed to
6066 i386_dr_insert_watchpoint. All uses updated.
6067 (i386_low_remove_watchpoint): Renamed to
6068 i386_dr_remove_watchpoint. All uses updated.
6069 (i386_low_region_ok_for_watchpoint): Renamed to
6070 i386_dr_region_ok_for_watchpoint. All uses updated.
6071 (i386_low_stopped_data_address): Renamed to
6072 i386_dr_stopped_data_address. All uses updated.
6073 (i386_low_stopped_by_watchpoint): Renamed to
6074 i386_dr_stopped_by_watchpoint. All uses updated.
6075
131aa0d4
GB
60762014-06-18 Gary Benson <gbenson@redhat.com>
6077
6078 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6079 (i386_dr_low_can_set_control): Likewise.
6080 (i386_insert_aligned_watchpoint): New check.
6081
d9305f7f
GB
60822014-06-18 Gary Benson <gbenson@redhat.com>
6083
6084 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6085 Renamed to state.
6086
e927c9fc
GB
60872014-06-18 Gary Benson <gbenson@redhat.com>
6088
6089 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6090 instead of fatal and error.
6091 (i386_handle_nonaligned_watchpoint): Likewise.
6092
1b6d4134
GB
60932014-06-18 Gary Benson <gbenson@redhat.com>
6094
6095 * i386-low.c (i386_get_debug_register_length): New macro.
6096 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6097 (i386_show_dr): Use debug_printf instead of fprintf. Use
6098 phex to format values.
6099
6e62758f
GB
61002014-06-18 Gary Benson <gbenson@redhat.com>
6101
6102 * i386-low.h: Comment changes.
6103 * i386-low.c: Likewise.
6104
fc6e2f03
GB
61052014-06-18 Gary Benson <gbenson@redhat.com>
6106
6107 * i386-low.c: Whitespace changes.
6108
f9d1eeed
TT
61092014-06-12 Tom Tromey <tromey@redhat.com>
6110
6111 * utils.c (freeargv): Remove.
6112
0b04e523
TT
61132014-06-12 Tom Tromey <tromey@redhat.com>
6114
6115 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6116 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6117 (parse_debug_format_options): Likewise.
6118 (gdbserver_usage): Likewise.
6119 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6120 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6121 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6122 against libiberty.
6123 ($(LIBGNU)): Depend on libiberty.
6124 (all-lib): Recurse into all subdirs.
6125 (install-only): Invoke "install" target in subdirs.
6126 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6127 targets.
6128 * configure: Rebuild.
6129 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6130 for vasprintf, vsnprintf, or gettimeofday.
6131 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6132 srv_tgtobj.
6133
270c9937
JB
61342014-06-05 Joel Brobecker <brobecker@adacore.com>
6135
6136 * development.sh: Delete.
6137 * Makefile.in (config.status): Adjust dependency on development.sh.
6138 * configure.ac: Adjust development.sh source call.
6139 * configure: Regenerate.
6140
0a261ed8
PA
61412014-06-02 Pedro Alves <palves@redhat.com>
6142
6143 * ax.c (gdb_free_agent_expr): New function.
6144 * ax.h (gdb_free_agent_expr): New declaration.
6145 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6146 list.
6147 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6148 static.
6149 (clear_breakpoint_conditions_and_commands): New function.
6150 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6151 (clear_breakpoint_conditions_and_commands): New declaration.
6152
e9dae05e
RR
61532014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6154
6155 * linux-aarch64-low.c (asm/ptrace.h): Include.
6156
5876f503
JK
61572014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6158
6159 Fix TLS access for -static -pthread.
6160 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6161 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6162 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6163
802e8e6d
PA
61642014-05-20 Pedro Alves <palves@redhat.com>
6165
6166 * linux-aarch64-low.c (aarch64_insert_point)
6167 (aarch64_remove_point): No longer check whether the type is
6168 supported here. Adjust to new interface.
6169 (the_low_target): Install aarch64_supports_z_point_type as
6170 supports_z_point_type method.
6171 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6172 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6173 instead of a Z packet char. Adjust.
6174 (arm_supports_z_point_type): New function.
6175 (arm_insert_point, arm_remove_point): Adjust to new interface.
6176 (the_low_target): Install arm_supports_z_point_type.
6177 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6178 (cris_insert_point, cris_remove_point): Adjust to new interface.
6179 Don't check whether the type is supported here.
6180 (the_low_target): Install cris_supports_z_point_type.
6181 * linux-low.c (linux_supports_z_point_type): New function.
6182 (linux_insert_point, linux_remove_point): Adjust to new interface.
6183 * linux-low.h (struct linux_target_ops) <insert_point,
6184 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6185 raw_breakpoint pointer parameter.
6186 <supports_z_point_type>: New method.
6187 * linux-mips-low.c (mips_supports_z_point_type): New function.
6188 (mips_insert_point, mips_remove_point): Adjust to new interface.
6189 Use mips_supports_z_point_type.
6190 (the_low_target): Install mips_supports_z_point_type.
6191 * linux-ppc-low.c (the_low_target): Install NULL as
6192 supports_z_point_type method.
6193 * linux-s390-low.c (the_low_target): Install NULL as
6194 supports_z_point_type method.
6195 * linux-sparc-low.c (the_low_target): Install NULL as
6196 supports_z_point_type method.
6197 * linux-x86-low.c (x86_supports_z_point_type): New function.
6198 (x86_insert_point): Adjust to new insert_point interface. Use
6199 insert_memory_breakpoint. Adjust to new
6200 i386_low_insert_watchpoint interface.
6201 (x86_remove_point): Adjust to remove_point interface. Use
6202 remove_memory_breakpoint. Adjust to new
6203 i386_low_remove_watchpoint interface.
6204 (the_low_target): Install x86_supports_z_point_type.
6205 * lynx-low.c (lynx_target_ops): Install NULL as
6206 supports_z_point_type callback.
6207 * nto-low.c (nto_supports_z_point_type): New.
6208 (nto_insert_point, nto_remove_point): Adjust to new interface.
6209 (nto_target_ops): Install nto_supports_z_point_type.
6210 * mem-break.c: Adjust intro comment.
6211 (struct raw_breakpoint) <raw_type, size>: New fields.
6212 <inserted>: Update comment.
6213 <shlib_disabled>: Delete field.
6214 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6215 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6216 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6217 (raw_bkpt_type_to_target_hw_bp_type): New function.
6218 (find_enabled_raw_code_breakpoint_at): New function.
6219 (find_raw_breakpoint_at): New type and size parameters. Use them.
6220 (insert_memory_breakpoint): New function, based off
6221 set_raw_breakpoint_at.
6222 (remove_memory_breakpoint): New function.
6223 (set_raw_breakpoint_at): Reimplement.
6224 (set_breakpoint): New, based on set_breakpoint_at.
6225 (set_breakpoint_at): Reimplement.
6226 (delete_raw_breakpoint): Go through the_target->remove_point
6227 instead of assuming memory breakpoints.
6228 (find_gdb_breakpoint_at): Delete.
6229 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6230 (find_gdb_breakpoint): New function.
6231 (set_gdb_breakpoint_at): Delete.
6232 (z_type_supported): New function.
6233 (set_gdb_breakpoint_1): New function, loosely based off
6234 set_gdb_breakpoint_at.
6235 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6236 (delete_gdb_breakpoint_at): Delete.
6237 (delete_gdb_breakpoint_1): New function, loosely based off
6238 delete_gdb_breakpoint_at.
6239 (delete_gdb_breakpoint): New function.
6240 (clear_gdb_breakpoint_conditions): Rename to ...
6241 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6242 breakpoint.
6243 (add_condition_to_breakpoint): Make static.
6244 (add_breakpoint_condition): Take a struct breakpoint pointer
6245 instead of an address. Adjust.
6246 (gdb_condition_true_at_breakpoint): Rename to ...
6247 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6248 z_type parameter.
6249 (gdb_condition_true_at_breakpoint): Reimplement.
6250 (add_breakpoint_commands): Take a struct breakpoint pointer
6251 instead of an address. Adjust.
6252 (gdb_no_commands_at_breakpoint): Rename to ...
6253 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6254 parameter. Return true if no breakpoint was found. Change debug
6255 output.
6256 (gdb_no_commands_at_breakpoint): Reimplement.
6257 (run_breakpoint_commands): Rename to ...
6258 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6259 and change return type to boolean.
6260 (run_breakpoint_commands): New function.
6261 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6262 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6263 breakpoint. Go through the_target->remove_point instead of
6264 assuming memory breakpoint.
6265 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6266 software and hardware breakpoints.
6267 (reinsert_raw_breakpoint): Go through the_target->insert_point
6268 instead of assuming memory breakpoint.
6269 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6270 software and hardware breakpoints.
6271 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6272 Check both software and hardware breakpoints.
6273 (validate_inserted_breakpoint): Assert the breakpoint is a
6274 software breakpoint. Set the inserted flag to -1 instead of
6275 setting shlib_disabled.
6276 (delete_disabled_breakpoints): Adjust.
6277 (validate_breakpoints): Only validate software breakpoints.
6278 Adjust to inserted flag change.
6279 (check_mem_read, check_mem_write): Skip breakpoint types other
6280 than software breakpoints. Adjust to inserted flag change.
6281 * mem-break.h (enum raw_bkpt_type): New enum.
6282 (raw_breakpoint, struct process_info): Forward declare.
6283 (Z_packet_to_target_hw_bp_type): Delete declaration.
6284 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6285 (set_gdb_breakpoint, delete_gdb_breakpoint)
6286 (clear_breakpoint_conditions): New declarations.
6287 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6288 (breakpoint_inserted_here): Update comment.
6289 (add_breakpoint_condition, add_breakpoint_commands): Replace
6290 address parameter with a breakpoint pointer parameter.
6291 (gdb_breakpoint_here): Update comment.
6292 (delete_gdb_breakpoint_at): Delete.
6293 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6294 * server.c (process_point_options): Take a struct breakpoint
6295 pointer instead of an address. Adjust.
6296 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6297 delete_gdb_breakpoint.
6298 * spu-low.c (spu_target_ops): Install NULL as
6299 supports_z_point_type method.
6300 * target.h: Include mem-break.h.
6301 (struct target_ops) <prepare_to_access_memory>: Update comment.
6302 <supports_z_point_type>: New field.
6303 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6304 instead of a char. Also take a raw breakpoint pointer.
6305 * win32-arm-low.c (the_low_target): Install NULL as
6306 supports_z_point_type.
6307 * win32-i386-low.c (i386_supports_z_point_type): New function.
6308 (i386_insert_point, i386_remove_point): Adjust to new interface.
6309 (the_low_target): Install i386_supports_z_point_type.
6310 * win32-low.c (win32_supports_z_point_type): New function.
6311 (win32_insert_point, win32_remove_point): Adjust to new interface.
6312 (win32_target_ops): Install win32_supports_z_point_type.
6313 * win32-low.h (struct win32_target_ops):
6314 <supports_z_point_type>: New method.
6315 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6316 instead of a char. Also take a raw breakpoint pointer.
6317
932539e3
PA
63182014-05-20 Pedro Alves <palves@redhat.com>
6319
6320 * mem-break.h: Include break-common.h.
6321 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6322 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6323 (Z_packet_to_target_hw_bp_type): New declaration.
6324 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6325 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6326 (Z_PACKET_ACCESS_WP): Delete macros.
6327 (Z_packet_to_hw_type): Delete function.
6328 * i386-low.h: Don't include break-common.h here.
6329 (Z_packet_to_hw_type): Delete declaration.
6330 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6331 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6332 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6333 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6334 * linux-aarch64-low.c: Don't include break-common.h here.
6335 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6336 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6337 (Z_packet_to_target_hw_bp_type): Delete function.
6338 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6339 function.
6340 (mips_insert_point, mips_remove_point): Use
6341 Z_packet_to_target_hw_bp_type.
6342
4ff0d3d8
PA
63432014-05-20 Pedro Alves <palves@redhat.com>
6344
6345 * linux-aarch64-low.c: Include break-common.h.
6346 (enum target_point_type): Delete.
6347 (Z_packet_to_point_type): Rename to ...
6348 (Z_packet_to_target_hw_bp_type): ... this, and return a
6349 target_hw_bp_type instead.
6350 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6351 instead of an enum target_point_type.
6352 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6353 breakpoint type.
6354 (aarch64_dr_state_insert_one_point)
6355 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6356 (aarch64_handle_aligned_watchpoint)
6357 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6358 Take an enum target_hw_bp_type instead of an enum
6359 target_point_type.
6360 (aarch64_supports_z_point_type): New function.
6361 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6362 use Z_packet_to_target_hw_bp_type.
6363
786dc519
JB
63642014-05-20 Joel Brobecker <brobecker@adacore.com>
6365
6366 * configure.ac: Only use -Werror by default when DEVELOPMENT
6367 is true.
6368 * configure: Regenerate.
6369
9e0aa64f
JK
63702014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6371
6372 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6373 * linux-x86-low.c (X86_64_USER_REGS): New.
6374 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6375
2b577b92
YQ
63762014-04-28 Yao Qi <yao@codesourcery.com>
6377
6378 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6379 name.
6380
94611da2
PA
63812014-04-25 Pedro Alves <palves@redhat.com>
6382
6383 PR server/16255
6384 * linux-low.c (linux_attach_fail_reason_string): New function.
6385 (linux_attach_lwp): Delete.
6386 (linux_attach_lwp_1): Rename to ...
6387 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6388 argument. Remove "initial" parameter. Return int instead of
6389 void. Don't error or warn here.
6390 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6391 failure to attach to the tgid. Call warning when failing to
6392 attach to an lwp.
6393 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6394 argument. Remove "initial" parameter. Return int instead of
6395 void. Don't error or warn here.
6396 (linux_attach_fail_reason_string): New declaration.
6397 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6398 interface change. Use linux_attach_fail_reason_string.
6399
01f9f808
MS
64002014-04-24 Michael Sturm <michael.sturm@mintel.com>
6401 Walfred Tedeschi <walfred.tedeschi@intel.com>
6402
6403 * Makefile.in: Added rules to handle new files
6404 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6405 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6406 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6407 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6408 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6409 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6410 x32-avx512-linux.o.
6411 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6412 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6413 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6414 i386/x32-avx512.xml.
6415 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6416 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6417 i386/x32-avx512-linux.xml.
6418 * i387-fp.c (num_avx512_k_registers): New constant for number
6419 of K registers.
6420 (num_avx512_zmmh_low_registers): New constant for number of
6421 lower ZMM registers (0-15).
6422 (num_avx512_zmmh_high_registers): New constant for number of
6423 higher ZMM registers (16-31).
6424 (num_avx512_ymmh_registers): New contant for number of higher
6425 YMM registers (ymm16-31 added by avx521 on x86_64).
6426 (num_avx512_xmm_registers): New constant for number of higher
6427 XMM registers (xmm16-31 added by AVX512 on x86_64).
6428 (struct i387_xsave): Add space for AVX512 registers.
6429 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6430 Add code to handle AVX512 registers.
6431 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6432 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6433 prototypei from generated file.
6434 (tdesc_amd64_avx512_linux): Likewise.
6435 (init_registers_x32_avx512_linux): Likewise.
6436 (tdesc_x32_avx512_linux): Likewise.
6437 (init_registers_i386_avx512_linux): Likewise.
6438 (tdesc_i386_avx512_linux): Likewise.
6439 (x86_64_regmap): Add AVX512 registers.
6440 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6441 mask.
6442 (initialize_low_arch): Add code to initialize AVX512 registers.
6443
51aa91f9
PA
64442014-04-23 Pedro Alves <palves@redhat.com>
6445
6446 * mem-break.c (find_gdb_breakpoint_at): Make static.
6447 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6448
a4165e94
PA
64492014-04-23 Pedro Alves <palves@redhat.com>
6450
6451 * i386-low.c: Don't include break-common.h here.
6452 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6453 prototype to take target_hw_bp_type as argument instead of a Z
6454 packet char.
6455 * i386-low.h: Include break-common.h here.
6456 (Z_packet_to_hw_type): Declare.
6457 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6458 prototypes.
6459 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6460 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6461 (x86_remove_point): Convert the packet number to a
6462 target_hw_bp_type before calling i386_low_remove_watchpoint.
6463 * win32-i386-low.c (i386_insert_point): Convert the packet number
6464 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6465 (i386_remove_point): Convert the packet number to a
6466 target_hw_bp_type before calling i386_low_remove_watchpoint.
6467
b8acf843
PA
64682014-04-23 Pedro Alves <palves@redhat.com>
6469
6470 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6471
d708bcd1
PA
64722014-04-10 Pedro Alves <palves@redhat.com>
6473
6474 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6475 Check if the condition or command is NULL before checking if the
6476 breakpoint is known. On success, return true.
6477 * mem-break.h (add_breakpoint_condition): Document return.
6478 (add_breakpoint_commands): Add describing comment.
6479 * server.c (skip_to_semicolon): New function.
6480 (process_point_options): Use it.
6481
2eec7d5b
PA
64822014-04-09 Pedro Alves <palves@redhat.com>
6483
6484 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6485 to lwpid_of.
6486
fa96cb38
PA
64872014-02-27 Pedro Alves <palves@redhat.com>
6488
6489 PR 12702
6490 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6491 macros.
6492 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6493 output.
6494 (last_thread_of_process_p): Take a PID argument instead of a
6495 thread pointer.
6496 (linux_wait_for_lwp): Delete.
6497 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6498 functions.
6499 (linux_low_filter_event): New function, party factored out from
6500 linux_wait_for_event.
6501 (linux_wait_for_event): Rename to ...
6502 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6503 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6504 sigsuspend. Check for zombie leaders.
6505 (linux_wait_for_event): Reimplement as wrapper around
6506 linux_wait_for_event_filtered.
6507 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6508 a normal or signal exit is seen, it's the whole process exiting.
6509 (wait_for_sigstop): No longer a for_each_inferior callback.
6510 Rewrite on top of linux_wait_for_event_filtered.
6511 (stop_all_lwps): Call wait_for_sigstop directly.
6512 * server.c (resume, handle_target_event): Handle
6513 TARGET_WAITKIND_NO_RESUMED.
6514
d763de10
JB
65152014-02-26 Joel Brobecker <brobecker@adacore.com>
6516
6517 * win32-low.c (psapi_get_dll_name,
6518 * win32_CreateToolhelp32Snapshot): Delete.
6519 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6520 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6521 Delete.
6522 (handle_load_dll): Add function description.
6523 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6524
850a0f76
JB
65252014-02-26 Joel Brobecker <brobecker@adacore.com>
6526
6527 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6528 Add comment.
6529 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6530 base address when calling win32_add_one_solib.
6531 (handle_load_dll): Delete local variable load_addr.
6532 Remove 0x1000 offset applied to DLL base address when calling
6533 win32_add_one_solib.
6534 (handle_unload_dll): Add comment.
6535
f25b3fc3
JB
65362014-02-26 Joel Brobecker <brobecker@adacore.com>
6537
6538 * win32-low.c (win32_add_all_dlls): Renames
6539 win32_ensure_ntdll_loaded. Rewrite function documentation.
6540 Adjust implementation to always load all DLLs.
6541 Add 0x1000 offset to DLL base address when calling
6542 win32_add_one_solib.
6543 (child_initialization_done): New static global.
6544 (do_initial_child_stuff): Set child_initialization_done to
6545 zero during child initialization, and 1 after. Replace call
6546 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6547 Add comment.
6548 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6549 (handle_unload_dll): Add function documentation.
6550 (get_child_debug_event): Ignore load and unload DLL events
6551 during child initialization.
6552
d86d4aaf
DE
65532014-02-20 Doug Evans <dje@google.com>
6554
3bc32da3 6555 Remove global all_lwps.
d86d4aaf
DE
6556 * inferiors.h (ptid_of): Move here from linux-low.h.
6557 (pid_of, lwpid_of): Ditto.
6558 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6559 parameter is a struct thread_info * now.
6560 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6561 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6562 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6563 directly.
6564 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6565 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6566 * linux-arm-low.c (update_registers_callback): Update, "entry"
6567 parameter is a struct thread_info * now.
6568 Fetch lwpid from current_inferior directly.
6569 (arm_insert_point): Pass &all_threads to find_inferior instead of
6570 &all_lwps.
6571 (arm_remove_point): Ditto.
6572 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6573 (arm_prepare_to_resume): Fetch pid from thread.
6574 (arm_read_description): Fetch lwpid from current_inferior directly.
6575 * linux-low.c (all_lwps): Delete.
6576 (delete_lwp): Delete call to remove_inferior.
6577 (handle_extended_wait): Fetch lwpid from thread.
6578 (add_lwp): Don't set lwp->entry.id. Remove call to
6579 add_inferior_to_list.
6580 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6581 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6582 (kill_one_lwp_callback): Ditto.
6583 (linux_kill): Don't dereference NULL pointer.
6584 Fetch ptid,lwpid from thread.
6585 (get_detach_signal): Fetch ptid from thread.
6586 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6587 Simplify call to regcache_invalidate_thread.
6588 (delete_lwp_callback): Update, "entry" parameter is a
6589 struct thread_info * now. Fetch pid from thread.
6590 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6591 (status_pending_p_callback): Update, "entry" parameter is a
6592 struct thread_info * now. Fetch ptid from thread.
6593 (find_lwp_pid): Update, "entry" parameter is a
6594 struct thread_info * now.
6595 (linux_wait_for_lwp): Fetch pid from thread.
6596 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6597 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6598 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6599 (dequeue_one_deferred_signal): Ditto.
6600 (cancel_breakpoint): Fetch ptid from current_inferior.
6601 (linux_wait_for_event): Pass &all_threads to find_inferior,
6602 not &all_lwps. Fetch ptid, lwpid from thread.
6603 (count_events_callback): Update, "entry" parameter is a
6604 struct thread_info * now.
6605 (select_singlestep_lwp_callback): Ditto.
6606 (select_event_lwp_callback): Ditto.
6607 (cancel_breakpoints_callback): Ditto.
6608 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6609 not &all_lwps.
6610 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6611 (unsuspend_one_lwp): Update, "entry" parameter is a
6612 struct thread_info * now.
6613 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6614 not &all_lwps.
6615 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6616 Fetch lwpid from thread, not lwp.
6617 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6618 Pass &all_threads to find_inferior, not &all_lwps.
6619 (send_sigstop): Fetch lwpid from thread, not lwp.
6620 (send_sigstop_callback): Update, "entry" parameter is a
6621 struct thread_info * now.
6622 (suspend_and_send_sigstop_callback): Ditto.
6623 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6624 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6625 struct thread_info * now.
6626 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6627 from thread, lwp.
6628 (lwp_running): Update, "entry" parameter is a
6629 struct thread_info * now.
6630 (stop_all_lwps): Fetch ptid from thread.
6631 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6632 (linux_resume_one_lwp): Fetch lwpid from thread.
6633 (linux_set_resume_request): Update, "entry" parameter is a
6634 struct thread_info * now. Fetch pid, lwpid from thread.
6635 (resume_status_pending_p): Update, "entry" parameter is a
6636 struct thread_info * now.
6637 (need_step_over_p): Ditto. Fetch lwpid from thread.
6638 (start_step_over): Fetch lwpid from thread.
6639 (linux_resume_one_thread): Update, "entry" parameter is a
6640 struct thread_info * now. Fetch lwpid from thread.
6641 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6642 (proceed_one_lwp): Update, "entry" parameter is a
6643 struct thread_info * now. Fetch lwpid from thread.
6644 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6645 struct thread_info * now.
6646 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6647 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6648 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6649 directly.
6650 (regsets_store_inferior_registers): Ditto.
6651 (fetch_register, store_register): Ditto.
6652 (linux_read_memory, linux_write_memory): Ditto.
6653 (linux_request_interrupt): Ditto.
6654 (linux_read_auxv): Ditto.
6655 (linux_xfer_siginfo): Ditto.
6656 (linux_qxfer_spu): Ditto.
6657 (linux_qxfer_libraries_svr4): Ditto.
6658 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6659 moved to inferiors.h.
6660 (get_lwp): Delete.
6661 (get_thread_lwp): Update.
6662 (struct lwp_info): Delete member "entry". Simplify comment for
6663 member "thread".
6664 (all_lwps): Delete.
6665 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6666 current_inferior directly.
6667 (update_watch_registers_callback): Update, "entry" parameter is a
6668 struct thread_info * now. Fetch pid from thread.
6669 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6670 (mips_insert_point): Fetch lwpid from current_inferior.
6671 Pass &all_threads to find_inferior, not &all_lwps.
6672 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6673 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6674 directly.
6675 (mips_stopped_data_address): Ditto.
6676 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6677 directly.
6678 * linux-tile-low.c (tile_arch_setup): Ditto.
6679 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6680 (update_debug_registers_callback): Update, "entry" parameter is a
6681 struct thread_info * now. Fetch pid from thread.
6682 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6683 Pass &all_threads to find_inferior, not &all_lwps.
6684 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6685 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6686 Pass &all_threads to find_inferior, not &all_lwps.
6687 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6688 (i386_dr_low_get_status): Ditto.
6689 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6690 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6691 (x86_linux_read_description): Ditto.
6692 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6693
3b8361aa
DE
66942014-02-20 Doug Evans <dje@google.com>
6695
6696 * inferiors.c (get_first_inferior): Fix buglet.
6697
f7667f0d
DE
66982014-02-19 Doug Evans <dje@google.com>
6699
6700 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6701 * inferiors.c (add_thread): Change result type to struct thread_info *.
6702 All callers updated.
6703 (add_lwp): Call add_thread here instead of in callers.
6704 All callers updated.
6705 * linux-low.h (get_lwp_thread): Rewrite.
6706 (struct lwp_info): New member "thread".
6707
b3312d80
DE
67082014-02-19 Doug Evans <dje@google.com>
6709
6710 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6711 All callers updated.
6712
ecc6f45c
DE
67132014-02-19 Doug Evans <dje@google.com>
6714
6715 * inferiors.c (add_thread): Fix whitespace.
6716
649ebbca
DE
67172014-02-19 Doug Evans <dje@google.com>
6718
6719 * dll.c (clear_dlls): Replace accessing list implemention details
6720 with API function.
6721 * gdbthread.h (get_first_thread): Declare.
6722 * inferiors.c (for_each_inferior_with_data): New function.
6723 (get_first_thread): New function.
6724 (find_thread_ptid): Simplify.
6725 (get_first_inferior): New function.
6726 (clear_list): Delete.
6727 (one_inferior_p): New function.
6728 (clear_inferior_list): New function.
6729 (clear_inferiors): Update.
6730 * inferiors.h (for_each_inferior_with_data): Declare.
6731 (clear_inferior_list): Declare.
6732 (one_inferior_p): Declare.
6733 (get_first_inferior): Declare.
6734 * linux-low.c (linux_wait_for_event): Replace accessing list
6735 implemention details with API function.
6736 * server.c (target_running): Ditto.
6737 (accumulate_file_name_length): New function.
6738 (emit_dll_description): New function.
6739 (handle_qxfer_libraries): Replace accessing list implemention
6740 details with API function.
6741 (handle_qxfer_threads_worker): New function.
6742 (handle_qxfer_threads_proper): Replace accessing list implemention
6743 details with API function.
6744 (handle_query): Ditto.
6745 (visit_actioned_threads_callback_ftype): New typedef.
6746 (visit_actioned_threads_data): New struct.
6747 (visit_actioned_threads): Rewrite to be find_inferior callback.
6748 (resume): Call find_inferior.
6749 (handle_status): Replace accessing list implemention
6750 details with API function.
6751 (process_serial_event): Replace accessing list implemention details
6752 with API function.
6753 * target.c (set_desired_inferior): Replace accessing list implemention
6754 details with API function.
6755 * tracepoint.c (same_process_p): New function.
6756 (gdb_agent_about_to_close): Replace accessing list implemention
6757 details with API function.
6758 * win32-low.c (child_delete_thread): Replace accessing list
6759 implemention details with API function.
6760 (match_dll_by_basename): New function.
6761 (dll_is_loaded_by_basename): New function.
6762 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6763 details call to dll_is_loaded_by_basename.
6764
80894984
DE
67652014-02-19 Doug Evans <dje@google.com>
6766
6767 * dll.h (struct dll_info): Add comment.
6768 * gdbthread.h (struct thread_info): Add comment.
6769 (current_ptid): Simplify.
6770 * inferiors.c (add_process): Update.
6771 (remove_process): Update.
6772 * inferiors.h (struct process_info): Rename member "head" to "entry".
6773 * linux-low.c (delete_lwp): Update.
6774 (add_lwp): Update.
6775 (last_thread_of_process_p): Update.
6776 (kill_one_lwp_callback, linux_kill): Update.
6777 (status_pending_p_callback): Update.
6778 (wait_for_sigstop): Update. Simplify read of ptid.
6779 (start_step_over): Update.
6780 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6781 (get_lwp_thread): Update.
6782 (struct lwp_info): Rename member "head" to "entry".
6783 * regcache.h (inferior_list_entry): Delete.
6784 * server.c (kill_inferior_callback): Update.
6785 (detach_or_kill_inferior_callback): Update.
6786 (print_started_pid): Update.
6787 (print_attached_pid): Update.
6788 (process_serial_event): Simplify read of ptid.
6789 * thread-db.c (thread_db_create_event): Update.
6790 (thread_db_get_tls_address): Update.
6791 * win32-low.c (current_inferior_ptid): Simplify.
6792
46917d26
TT
67932014-02-19 Tom Tromey <tromey@redhat.com>
6794
6795 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6796 argument.
6797 (target_supports_btrace): Update.
6798
0759a81e
YQ
67992014-02-14 Yao Qi <yao@codesourcery.com>
6800
6801 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6802 (rsp-low-ipa.o): New target.
6803
a7191e8b
TT
68042014-02-12 Tom Tromey <tromey@redhat.com>
6805
6806 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6807 convert_ascii_to_int.
6808 * regcache.c (registers_to_string): Likewise.
6809 * remote-utils.c (decode_M_packet): Likewise.
6810 * server.c (process_serial_event): Likewise.
6811
ff0e980e
TT
68122014-02-12 Tom Tromey <tromey@redhat.com>
6813
6814 * server.c (handle_query, handle_v_run): Use hex2bin, not
6815 unhexify.
6816 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6817
e9371aff
TT
68182014-02-12 Tom Tromey <tromey@redhat.com>
6819
6820 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6821 convert_int_to_ascii.
6822 * regcache.c (registers_to_string, collect_register_as_string):
6823 Likewise.
6824 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6825 Likewise.
6826 * server.c (process_serial_event): Likewise.
6827 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6828 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6829
971dc0b8
TT
68302014-02-12 Tom Tromey <tromey@redhat.com>
6831
6832 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6833 bin2hex, not hexify.
6834 * tracepoint.c (cmd_qtstatus): Likewise.
6835
0a822afb
TT
68362014-02-12 Tom Tromey <tromey@redhat.com>
6837
6838 * remote-utils.c (monitor_output): Pass explicit length to
6839 hexify.
6840
9c3d6531
TT
68412014-02-12 Tom Tromey <tromey@redhat.com>
6842
6843 * tracepoint.c: Include rsp-low.h.
6844 * server.c: Include rsp-low.h.
6845 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6846 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6847 declare.
6848 * remote-utils.c: Include rsp-low.h.
6849 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6850 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6851 (convert_int_to_ascii, convert_ascii_to_int): Move to
6852 common/rsp-low.c.
6853 * regcache.c: Include rsp-low.h.
6854 * ax.c: Include rsp-low.h.
6855 * Makefile.in (SFILES): Add common/rsp-low.c.
6856 (OBS): Add rsp-low.o.
6857 (rsp-low.o): New target.
6858
01fd3ea5
TT
68592014-02-12 Tom Tromey <tromey@redhat.com>
6860
6861 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6862 Include print-utils.h.
6863 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6864 (plongest, thirty_two, phex_nz): Remove.
6865 * Makefile.in (SFILES): Add common/print-utils.c.
6866 (OBS): Add print-utils.o.
6867 (print-utils-ipa.o): New target.
6868 (print-utils.o): New target.
6869 (IPA_OBJS): Add print-utils-ipa.o.
6870
e99dc820
TT
68712014-02-06 Tom Tromey <tromey@redhat.com>
6872
6873 * Makefile.in (SFILES): Fix indentation.
6874
ee1e2d4f
DE
68752014-02-05 Doug Evans <dje@google.com>
6876
6877 * linux-low.c (linux_wait_for_event): Improve comment.
6878 (linux_wait_1): Keep current_inferior in sync with event_child.
6879
f5a02773
DE
68802014-01-22 Doug Evans <dje@google.com>
6881
6882 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6883
87ce2a04
DE
68842014-01-22 Doug Evans <dje@google.com>
6885
6886 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6887 * configure: Regenerate.
6888 * config.in: Regenerate.
6889 * Makefile.in (SFILES): Add debug.c.
6890 (OBS): Add debug.o.
6891 * debug.c: New file.
6892 * debug.h: New file.
6893 * linux-aarch64-low.c (*): Update all debugging printfs to use
6894 debug_printf instead of fprintf.
6895 * linux-arm-low.c (*): Ditto.
6896 * linux-cris-low.c (*): Ditto.
6897 * linux-crisv32-low.c (*): Ditto.
6898 * linux-m32r-low.c (*): Ditto.
6899 * linux-sparc-low.c (*): Ditto.
6900 * linux-x86.c (*): Ditto.
6901 * linux-low.c (*): Ditto.
6902 (linux_wait_1): Add calls to debug_enter, debug_exit.
6903 (linux_wait): Remove redundant debugging printf.
6904 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6905 (linux_resume, unstop_all_lwps): Ditto.
6906 * mem-break.c (*): Update all debugging printfs to use
6907 debug_printf instead of fprintf.
6908 * remote-utils.c (*): Ditto.
6909 * thread-db.c (*): Ditto.
6910 * server.c #include <ctype.h>, "gdb_vecs.h".
6911 (debug_threads): Moved to debug.c.
6912 (*): Update all debugging printfs to use debug_printf instead of
6913 fprintf.
6914 (start_inferior): Replace call to fflush with call to debug_flush.
6915 (monitor_show_help): Mention set debug-format.
6916 (parse_debug_format_options): New function.
6917 (handle_monitor_command): Handle "monitor set debug-format".
6918 (gdbserver_usage): Mention --debug-format.
6919 (main): Parse --debug-format.
6920 * server.h (debug_threads): Declaration moved to debug.h.
6921 #include "debug.h".
6922 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6923 trace_debug_1 that uses debug_printf.
6924 (tracepoint_look_up_symbols): Update all debugging printfs to use
6925 debug_printf instead of fprintf.
6926
e671835b
BS
69272014-01-20 Baruch Siach <baruch@tkos.co.il>
6928
6929 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6930 sys/ptrace.h.
6931
b5737fa9
PA
69322014-01-17 Pedro Alves <palves@redhat.com>
6933
ea38d2a9 6934 PR build/16445
c7faa97a
PA
6935 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6936 defined after including gdb_proc_service.h.
b5737fa9 6937
40ed484e
DE
69382014-01-16 Doug Evans <dje@google.com>
6939
6940 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6941 (match_dll): Use it.
6942
969c39fb
MM
69432014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6944
6945 * target.h (target_ops) <read_btrace>: Change parameters and
6946 return type to allow error reporting.
6947 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6948 trace reading errors on.
6949 * linux-low.c (linux_low_read_btrace): Pass trace reading
6950 errors on.
6951 (linux_low_disable_btrace): New.
6952
ab7f45ba
DE
69532014-01-15 Doug Evans <dje@google.com>
6954
6955 * inferiors.c (thread_id_to_gdb_id): Delete.
6956 * inferiors.h (thread_id_to_gdb_id): Delete.
6957
66af0f44
EZ
69582014-01-13 Eli Zaretskii <eliz@gnu.org>
6959
6960 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6961 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6962 versions.
6963
9939e131
PA
69642014-01-08 Pedro Alves <palves@redhat.com>
6965
6966 * server.c (handle_status): Don't discard previous queued stop
6967 replies or thread's pending status here.
6968 (main) <disconnection>: Do it here instead.
6969
b7ea362b
PA
69702014-01-08 Pedro Alves <palves@redhat.com>
6971
6972 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6973 * server.c (visit_actioned_threads, handle_pending_status): New
6974 function.
6975 (handle_v_cont): Factor out parts to ...
6976 (resume): ... this new function. If in all-stop, and a thread
6977 being resumed has a pending status, report it without actually
6978 resuming.
6979 (myresume): Adjust to use the new 'resume' function.
6980 (clear_pending_status_callback, set_pending_status_callback)
6981 (find_status_pending_thread_callback): New functions.
6982 (handle_status): Handle the case of multiple threads having
6983 interesting statuses to report. Report threads' real last signal
6984 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6985 with an interesting thread to report the status for, instead of
6986 always reporting the status of the first thread.
6987
28498c42
JB
69882014-01-01 Joel Brobecker <brobecker@adacore.com>
6989
6990 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6991 * gdbreplay.c (gdbreplay_version): Likewise.
6992
f45c82da
YZ
69932013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6994
6995 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6996 iov.iov_len with the real length in use.
6997
379a5e2d
JB
69982013-12-13 Joel Brobecker <brobecker@adacore.com>
6999
7000 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7001 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7002 for all targets that use win32-low.c.
7003 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7004 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7005
4210d83e
PA
70062013-12-13 Pedro Alves <palves@redhat.com>
7007
7008 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7009 if equal to TARGET_WAITKIND_LOADED.
7010 * win32-low.c (cached_status): New static global.
7011 (win32_wait): Add declaration.
7012 (do_initial_child_stuff): Flush all initial pending debug events
7013 up to the initial breakpoint.
7014 (win32_wait): If CACHED_STATUS was set, return that instead
7015 of doing a real wait. Remove the code resuming the execution
7016 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7017 during the initial phase. Also remove the code changing
7018 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7019 TARGET_WAITKIND_STOPPED.
7020
e7f0d979
YQ
70212013-12-11 Yao Qi <yao@codesourcery.com>
7022
7023 * notif.c (handle_notif_ack): Return 0 if no notification
7024 matches.
7025
ebcf782c
DE
70262013-11-20 Doug Evans <dje@google.com>
7027
7028 * linux-low.c (linux_set_resume_request): Fix comment.
7029
20ad9378
DE
70302013-11-20 Doug Evans <dje@google.com>
7031
7032 * linux-low.c (resume_status_pending_p): Tweak comment.
7033
a196ebeb
WT
70342013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7035
7036 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7037 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7038 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7039 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7040 (srv_amd64_regobj): Add amd64-mpx.o.
7041 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7042 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7043 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7044 * i387-fp.c (num_pl_bnd_register) Added constant.
7045 (num_pl_bnd_cfg_registers) Added constant.
7046 (struct i387_xsave) Added reserved area and MPX fields.
7047 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7048 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7049 function.
7050 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7051 (init_registers_amd64_mpx_linux): Declare new function.
7052 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7053 (x86_64_regmap): Add MPX registers.
7054 (x86_linux_read_description): Add MPX case.
7055 (initialize_low_arch): Initialize MPX targets.
7056
0080a2f6
TT
70572013-11-18 Tom Tromey <tromey@redhat.com>
7058
7059 * configure: Rebuild.
7060 * configure.ac: Don't check for stdlib.h.
7061 * gdbreplay.c: Unconditionally include stdlib.h.
7062
2978b111
TT
70632013-11-18 Tom Tromey <tromey@redhat.com>
7064
7065 * config.in: Rebuild.
7066 * configure: Rebuild.
7067 * configure.ac: Don't use AC_HEADER_DIRENT.
7068
a3d08894
TT
70692013-11-18 Tom Tromey <tromey@redhat.com>
7070
7071 * server.h: Don't check HAVE_STRING_H.
7072 * gdbreplay.c: Don't check HAVE_STRING_H.
7073 * configure: Rebuild.
7074
0a5dd17d
TT
70752013-11-18 Tom Tromey <tromey@redhat.com>
7076
7077 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7078 LIBGNU.
7079
1bd2f0ba
TT
70802013-11-08 Tom Tromey <tromey@redhat.com>
7081
7082 * configure, config.in: Rebuild.
7083 * configure.ac: Remove unused configury.
7084
3266f10b
TT
70852013-11-08 Tom Tromey <tromey@redhat.com>
7086
7087 * acinclude.m4: Include common.m4, codeset.m4.
7088 * configure, config.in: Rebuild.
7089 * configure.ac: Use GDB_AC_COMMON.
7090
6682d959
AA
70912013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7092
7093 * linux-s390-low.c (HWCAP_S390_TE): New define.
7094 (s390_arch_setup): Consider the TE field in the HWCAP for
7095 determining 'have_regset_tdb'.
7096
fd0a4d76
SDJ
70972013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7098
7099 PR gdb/16014
7100 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7101 call to sizeof.
7102
1a3d890b
PA
71032013-10-02 Pedro Alves <palves@redhat.com>
7104
7105 * server.c (process_serial_event): Don't output "GDBserver
7106 exiting" if GDB is connected through stdio.
7107 * target.c (mywait): Likewise, be silent if GDB is connected
7108 through stdio.
7109
97ad4581
JB
71102013-10-01 Joel Brobecker <brobecker@adacore.com>
7111
7112 * lynx-low.c (lynx_add_threads_after_attach): New function.
7113 (lynx_attach): Remove call to add_thread. Add call to
7114 lynx_add_threads_after_attach instead.
7115
5b4e221c
MF
71162013-09-28 Mike Frysinger <vapier@gentoo.org>
7117
7118 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7119 * config.in, configure: Regenerated.
7120
ee47b2f8
YQ
71212013-09-18 Yao Qi <yao@codesourcery.com>
7122
7123 PR server/15959
7124 * server.c (start_inferior): Clear 'resume_info'.
7125
d6707650 71262013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7127
d6707650
JW
7128 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7129 for each register.
7130
9243dd0e 71312013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7132
9243dd0e
JW
7133 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7134 linux-tile-low.o to srv_tgtobj.
7135
c623a6ef
WN
71362013-09-16 Will Newton <will.newton@linaro.org>
7137
7138 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7139 out regs.
7140
fb71d39e
PA
71412013-09-06 Pedro Alves <palves@redhat.com>
7142
7143 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7144 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7145 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7146 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7147 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7148 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7149
8e7e9910
PA
71502013-09-06 Pedro Alves <palves@redhat.com>
7151
7152 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7153 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7154
7c3a12ca
PA
71552013-09-06 Pedro Alves <palves@redhat.com>
7156
7157 * linux-amd64-ipa.c: Include tracepoint.h.
7158 * linux-i386-ipa.c: Include tracepoint.h.
7159
8eb3d7b6
RW
71602013-09-06 Ricard Wanderlof <ricardw@axis.com>
7161
7162 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7163 (ps_get_thread_area): New function.
7164
eddddb9d
RW
71652013-09-06 Ricard Wanderlof <ricardw@axis.com>
7166
7167 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7168 (initialize_low_arch): Call init_registers_crisv32 rather than
7169 init_register_crisv32.
7170
533b0600
PA
71712013-09-05 Pedro Alves <palves@redhat.com>
7172
7173 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7174 to ...
7175 * hostio.h: ... this new file.
7176 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7177 win32-low.c: Include hostio.h.
7178
0ce3d3b5
PA
71792013-09-05 Pedro Alves <palves@redhat.com>
7180
7181 * server.h (gdb_client_data, handler_func, callback_handler_func)
7182 (delete_file_handler, add_file_handler, append_callback_event)
7183 (delete_callback_event, start_event_loop, initialize_event_loop):
7184 Move to event-loop.h and include it.
7185 * event-loop.h: New file.
7186
799cdc37
PA
71872013-09-05 Pedro Alves <palves@redhat.com>
7188
7189 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7190 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7191 (loaded_dll, unloaded_dll): Move to ...
7192 * dll.h: ... this new file.
7193 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7194
6a6bbd9d
PA
71952013-09-05 Pedro Alves <palves@redhat.com>
7196
7197 * server.h (current_process, get_thread_process, all_processes)
7198 (add_inferior_to_list, for_each_inferior, current_inferior)
7199 (remove_inferior, add_process, remove_process, find_process_pid)
7200 (have_started_inferiors_p, have_attached_inferiors_p)
7201 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7202 (clear_inferiors, find_inferior, find_inferior_id)
7203 (inferior_target_data, set_inferior_target_data)
7204 (inferior_regcache_data, set_inferior_regcache_data): Move to
7205 inferiors.h, and include it.
7206 * inferiors.h: New file.
7207
f699aaba
PA
72082013-09-05 Pedro Alves <palves@redhat.com>
7209
7210 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7211 Move ...
72f4393d 7212 * ax.h: ... here.
f699aaba 7213
c144c7a0
PA
72142013-09-05 Pedro Alves <palves@redhat.com>
7215
7216 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7217 tracepoint.h.
7218 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7219 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7220 (handle_tracepoint_general_set, handle_tracepoint_query)
7221 (tracepoint_finished_step, tracepoint_was_hit)
7222 (release_while_stepping_state_list, current_traceframe)
7223 (in_readonly_region, traceframe_read_mem)
7224 (fetch_traceframe_registers, traceframe_read_sdata)
7225 (traceframe_read_info, struct fast_tpoint_collect_status)
7226 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7227 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7228 (supply_fast_tracepoint_registers)
7229 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7230 (ipa_tdesc, claim_trampoline_space)
7231 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7232 (agent_mem_read, agent_get_trace_state_variable_value)
7233 (agent_set_trace_state_variable_value, agent_tsv_read)
7234 (agent_mem_read_string, get_raw_reg_func_addr)
7235 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7236 * tracepoint.h: ... this new file.
7237
ff42e6ab
PA
72382013-09-05 Pedro Alves <palves@redhat.com>
7239
7240 * server.h (perror_with_name, error, fatal, warning, paddress)
7241 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7242 include it.
7243 * utils.h: New file.
7244
541af0f4
PA
72452013-09-05 Pedro Alves <palves@redhat.com>
7246
7247 * server.h (remote_debug, noack_mode, transport_is_reliable)
7248 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7249 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7250 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7251 (write_enn, initialize_async_io, enable_async_io)
7252 (disable_async_io, check_remote_input_interrupt_request)
7253 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7254 (dead_thread_notify, prepare_resume_reply)
7255 (decode_address_to_semicolon, decode_address, decode_m_packet)
7256 (decode_M_packet, decode_X_packet, decode_xfer_write)
7257 (decode_search_memory_packet, unhexify, hexify)
7258 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7259 (look_up_one_symbol, relocate_instruction)
7260 (monitor_output): Move to remote-utils.h, and include it.
7261 * remote-utils.h: New file.
7262
eebdf26b
PA
72632013-09-05 Pedro Alves <palves@redhat.com>
7264
7265 * server.h (_): Delete.
7266
3aafd2ff
PA
72672013-09-02 Pedro Alves <palves@redhat.com>
7268
7269 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7270 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7271 allocated.
7272 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7273
cee83bcb
PM
72742013-09-02 Pierre Muller <muller@sourceware.org>
7275
7276 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7277 or WriteProcessMemory complete successfully and handle
7278 ERROR_PARTIAL_COPY error.
7279
9a13b2fa
PA
72802013-09-02 Pedro Alves <palves@redhat.com>
7281
7282 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7283 error instead of EIO.
7284
602e3198
JK
72852013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7286
7287 PR server/15604
7288 * linux-low.c: Include filestuff.h.
7289 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7290 * lynx-low.c: Include filestuff.h.
7291 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7292 * server.c: Include filestuff.h.
7293 (main): Call notice_open_fds.
7294 * spu-low.c: Include filestuff.h.
7295 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7296
96d7229d
LM
72972013-08-22 Luis Machado <lgustavo@codesourcery.com>
7298
7299 * Makefile.in: Explain why ../target and ../nat are not
7300 listed as include file search paths.
7301 (linux-waitpid.o): New object file rule.
7302 * configure.srv (srv_native_linux_obj): New variable.
7303 Replace all occurrences of linux native object files with
7304 $srv_native_linux_obj.
7305 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7306 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7307 (linux_enable_event_reporting): Remove declaration.
7308 (my_waitpid): Moved to common/linux-waitpid.c.
7309 (linux_wait_for_event): Pass ptid when calling
7310 linux_enable_event_reporting.
7311 (linux_supports_tracefork_flag): Remove.
7312 (linux_enable_event_reporting): Likewise.
7313 (linux_tracefork_grandchild): Remove.
7314 (STACK_SIZE): Moved to common/linux-ptrace.c.
7315 (linux_tracefork_child): Remove.
7316 (linux_test_for_tracefork): Remove.
7317 (linux_look_up_symbols): Call linux_supports_traceclone.
7318 (initialize_low): Remove call to linux_test_for_tracefork.
7319 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7320 common/linux-ptrace.h.
7321 (PTRACE_TYPE_ARG4): Likewise.
7322 Include linux-ptrace.h.
7323
32940073
PA
73242013-08-21 Pedro Alves <palves@redhat.com>
7325
7326 * config.in: Renegerate.
7327
33b60d58 73282013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 7329
33b60d58
LM
7330 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7331 (SFILES): Remove $(srcdir)/common/target-common.c and
7332 add $(srcdir)/target/waitstatus.c.
7333 (OBS): Remove target-common.o and add waitstatus.o.
7334 (server_h): Remove $(srcdir)/../common/target-common.h and
7335 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7336 and $(srcdir)/../target/waitstatus.h.
7337 (target-common.o): Remove.
7338 (waitstatus.o): New target object file.
7339 * target.h: Do not include target-common.h and
7340 include target/resume.h, target/wait.h and
7341 target/waitstatus.h.
7342
b8e1b30e
LM
73432013-08-13 Luis Machado <lgustavo@codesourcery.com>
7344
7345 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7346 to PTRACE_TYPE_ARG3.
7347 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7348 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7349 PTRACE_TYPE_ARG4.
7350 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7351 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7352
7a60ad40
YQ
73532013-07-27 Jie Zhang <jie@codesourcery.com>
7354 Daniel Jacobowitz <dan@codesourcery.com>
7355 Yao Qi <yao@codesourcery.com>
7356
7357 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7358 (mips-linux-watch.o): New rule.
7359 (mips_linux_watch_h): New variable.
7360 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7361 srv_tgtobj.
7362 * linux-mips-low.c: Include mips-linux-watch.h.
7363 (struct arch_process_info, struct arch_lwp_info): New.
7364 (update_watch_registers_callback): New function.
7365 (mips_linux_new_process, mips_linux_new_thread) New functions.
7366 (mips_linux_prepare_to_resume, mips_insert_point): New
7367 functions.
7368 (mips_remove_point, mips_stopped_by_watchpoint): New
7369 functions.
7370 (rsp_bp_type_to_target_hw_bp_type): New function.
7371 (mips_stopped_data_address): New function.
7372 (the_low_target): Add watchpoint support functions.
7373
de6f69ad
YQ
73742013-07-27 Yao Qi <yao@codesourcery.com>
7375
7376 * i386-low.c: Include break-common.h.
7377 (enum target_hw_bp_type): Remove.
7378
3360c0bf
LM
73792013-07-24 Luis Machado <lgustavo@codesourcery.com>
7380
7381 * Makefile.in (SFILES): /common/target-common.c.
7382 (OBS): Add target-common.o.
7383 (server_h): Add $(srcdir)/../common/target-common.h.
7384 (target-common.o): New target.
7385 * server.c (queue_stop_reply_callback): Free
7386 status string after use.
7387 * target.c (target_waitstatus_to_string): Remove.
7388 * target.h: Include target-common.h.
7389 (resume_kind): Likewise.
7390 (target_waitkind): Likewise.
7391 (target_waitstatus): Likewise.
7392 (TARGET_WNOHANG): Likewise.
7393
bd885420
YQ
73942013-07-04 Yao Qi <yao@codesourcery.com>
7395
7396 * Makefile.in (host_alias): Use @host_noncanonical@.
7397 (target_alias): Use @target_noncanonical@.
7398 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7399 ACX_NONCANONICAL_HOST.
7400 * configure: Regenerated.
7401
7402 Revert:
7403 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7404
7405 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7406 * configure: Rebuild.
7407 * Makefile.in (version_host, version_target): Get from configure.
7408 (version.c): Use $(version_host) and $(version_target).
7409
17ef446e
PA
74102013-07-03 Pedro Alves <palves@redhat.com>
7411
7412 * Makefile.in (config.status): Depend on development.sh.
7413 * acinclude.m4: Include libmcheck.m4.
7414 * configure: Regenerate.
7415
7a9a7487
MG
74162013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7417
7418 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7419 attribute inside the parentheses.
7420 (winapi_DebugSetProcessKillOnExit): Ditto.
7421 (winapi_DebugBreakProcess): Ditto.
7422 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 7423
49b64de6
MG
74242013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7425
7426 * notif.h (notif_event): Add a dummy member to avoid compiler
7427 errors.
7428
d5749ee7
PA
74292013-07-01 Pedro Alves <palves@redhat.com>
7430
7431 * hostio.c (HOSTIO_PATH_MAX): Define.
7432 (require_filename, handle_open, handle_unlink, handle_readlink):
7433 Use it.
7434
d8d2a3ee
PA
74352013-07-01 Pedro Alves <palves@redhat.com>
7436
7437 * server.h: Include "pathmax.h".
7438 * linux-low.c: Don't include sys/param.h.
7439 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7440 MAXPATHLEN.
7441 * win32-low.c: Don't include sys/param.h.
7442 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7443
bc7dea8d
PA
74442013-07-01 Pedro Alves <palves@redhat.com>
7445
7446 * event-loop.c: Don't check HAVE_UNISTD_H before including
7447 <unistd.h>.
7448 * gdbreplay.c: Likewise.
7449 * remote-utils.c: Likewise.
7450 * server.c: Likewise.
7451 * configure.ac: Don't check for unistd.h.
7452 * configure: Regenerate.
7453
d6c2da54
TT
74542013-06-28 Tom Tromey <tromey@redhat.com>
7455
7456 * Makefile.in (version.c): Use version.in, not
7457 common/version.in.
7458
257b6bec
MG
74592013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7460
7461 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7462 * configure: Rebuild.
7463 * Makefile.in (version_host, version_target): Get from configure.
7464 (version.c): Use $(version_host) and $(version_target).
7465
86ebe149
DK
74662013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7467
7468 Fix trace-status to output user name without trailing colon.
7469 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7470
f30aa5af
DK
74712013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7472
7473 Fix trace-status to output proper start-time and stop-time.
7474 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7475 output start time and stop time in hex as gdb expects.
7476
28a93511
YQ
74772013-06-26 Pedro Alves <pedro@codesourcery.com>
7478
7479 * tracepoint.c (build_traceframe_info_xml): Output trace state
7480 variables present in the trace buffer.
7481
01208463
TT
74822013-06-24 Tom Tromey <tromey@redhat.com>
7483
7484 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7485 create-version.sh.
7486 (version.o): Remove.
7487 * gdbreplay.c: Include version.h.
7488 (version, host_name): Don't declare.
7489 * server.h: Include version.h.
7490 (version, host_name): Don't declare.
7491
760256f9
PA
74922013-06-12 Pedro Alves <palves@redhat.com>
7493
7494 * linux-x86-low.c (linux_is_elf64): Delete global.
7495 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7496 with local linux_pid_exe_is_elf_64_file use.
7497
030031ee
PA
74982013-06-11 Pedro Alves <palves@redhat.com>
7499
7500 * linux-low.c (regset_disabled, disable_regset): New functions.
7501 (regsets_fetch_inferior_registers)
7502 (regsets_store_inferior_registers): Use them.
7503 (initialize_regsets_info); Don't allocate the disabled_regsets
7504 array here.
7505 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7506 comment.
7507
5da6eb0a
PA
75082013-06-11 Pedro Alves <palves@redhat.com>
7509
7510 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7511 xmalloc.
7512
7e5aaa09
PA
75132013-06-11 Pedro Alves <palves@redhat.com>
7514
7515 * linux-x86-low.c (initialize_low_arch): Call
7516 init_registers_x32_avx_linux.
7517
d878444c
JK
75182013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7519
7520 Fix compatibility with Android Bionic.
7521 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7522 it is not empty.
7523
3aee8918
PA
75242013-06-07 Pedro Alves <palves@redhat.com>
7525
5f2b57b5 7526 PR server/14823
3aee8918
PA
7527 * Makefile.in (OBS): Add tdesc.o.
7528 (IPA_OBJS): Add tdesc-ipa.o.
7529 (tdesc-ipa.o): New rule.
7530 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7531 interface.
7532 * linux-low.c (new_inferior): Delete.
7533 (disabled_regsets, num_regsets): Delete.
7534 (linux_add_process): Adjust to set the new per-process
7535 new_inferior flag.
7536 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7537 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7538 was a stop. When calling arch_setup, switch the current inferior
7539 to the thread that got an event.
7540 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7541 (regsets_fetch_inferior_registers)
7542 (regsets_store_inferior_registers): New regsets_info parameter.
7543 Adjust to use it.
7544 (linux_register_in_regsets): New regs_info parameter. Adjust to
7545 use it.
7546 (register_addr, fetch_register, store_register): New usrregs_info
7547 parameter. Adjust to use it.
7548 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7549 parameter regs_info. Adjust to use it.
7550 (linux_fetch_registers): Get the current inferior's regs_info, and
7551 adjust to use it.
7552 (linux_store_registers): Ditto.
7553 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7554 (initialize_low): Don't initialize the target_regsets here. Call
7555 initialize_low_arch.
7556 * linux-low.h (target_regsets): Delete declaration.
7557 (struct regsets_info): New.
7558 (struct usrregs_info): New.
7559 (struct regs_info): New.
7560 (struct process_info_private) <new_inferior>: New field.
7561 (struct linux_target_ops): Delete the num_regs, regmap, and
7562 regset_bitmap fields. New field regs_info.
7563 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7564 * i387-fp.c (num_xmm_registers): Delete.
7565 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7566 calls to new interface.
7567 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7568 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7569 Infer the number of xmm registers from the regcache's target
7570 description.
7571 * i387-fp.h (num_xmm_registers): Delete.
7572 * inferiors.c (add_thread): Don't install the thread's regcache
7573 here.
7574 * proc-service.c (gregset_info): Fetch the current inferior's
7575 regs_info. Adjust to use it.
7576 * regcache.c: Include tdesc.h.
7577 (register_bytes, reg_defs, num_registers)
7578 (gdbserver_expedite_regs): Delete.
7579 (get_thread_regcache): If the thread doesn't have a regcache yet,
7580 create one, instead of aborting gdbserver.
7581 (regcache_invalidate_one): Rename to ...
7582 (regcache_invalidate_thread): ... this.
7583 (regcache_invalidate_one): New.
7584 (regcache_invalidate): Only invalidate registers of the current
7585 process.
7586 (init_register_cache): Add target_desc parameter, and use it.
7587 (new_register_cache): Ditto. Assert the target description has a
7588 non zero registers_size.
7589 (regcache_cpy): Add assertions. Adjust.
7590 (realloc_register_cache, set_register_cache): Delete.
7591 (registers_to_string, registers_from_string): Adjust.
7592 (find_register_by_name, find_regno, find_register_by_number)
7593 (register_cache_size): Add target_desc parameter, and use it.
7594 (free_register_cache_thread, free_register_cache_thread_one)
7595 (regcache_release, register_cache_size): New.
7596 (register_size): Add target_desc parameter, and use it.
7597 (register_data, supply_register, supply_register_zeroed)
7598 (supply_regblock, supply_register_by_name, collect_register)
7599 (collect_register_as_string, collect_register_by_name): Adjust.
7600 * regcache.h (struct target_desc): Forward declare.
7601 (struct regcache) <tdesc>: New field.
7602 (init_register_cache, new_register_cache): Add target_desc
7603 parameter.
7604 (regcache_invalidate_thread): Declare.
7605 (regcache_invalidate_one): Delete declaration.
7606 (regcache_release): Declare.
7607 (find_register_by_number, register_cache_size, register_size)
7608 (find_regno): Add target_desc parameter.
7609 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7610 declarations.
7611 * remote-utils.c: Include tdesc.h.
7612 (outreg, prepare_resume_reply): Adjust.
7613 * server.c: Include tdesc.h.
7614 (gdbserver_xmltarget): Delete declaration.
7615 (get_features_xml, process_serial_event): Adjust.
7616 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7617 declare.
7618 (struct process_info) <tdesc>: New field.
7619 (ipa_tdesc): Declare.
7620 * tdesc.c: New file.
7621 * tdesc.h: New file.
7622 * tracepoint.c: Include tdesc.h.
7623 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7624 (get_context_regcache): Adjust to pass ipa_tdesc down.
7625 (do_action_at_tracepoint): Adjust to get the register cache size
7626 from the context regcache's description.
7627 (traceframe_walk_blocks): Adjust to get the register cache size
7628 from the current trace frame's description.
7629 (traceframe_get_pc): Adjust to get current trace frame's
7630 description and pass it down.
7631 (gdb_collect): Adjust to get the register cache size from the
7632 IPA's description.
7633 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7634 (gdbserver_xmltarget): Delete.
7635 (initialize_low_tracepoint): Set the ipa's target description.
7636 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7637 (initialize_low_tracepoint): Set the ipa's target description.
7638 * linux-x86-low.c: Include tdesc.h.
7639 [__x86_64__] (is_64bit_tdesc): New.
7640 (ps_get_thread_area, x86_get_thread_area): Use it.
7641 (i386_cannot_store_register): Rename to ...
7642 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7643 (i386_cannot_fetch_register): Rename to ...
7644 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7645 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7646 to new interface.
7647 (target_regsets): Rename to ...
7648 (x86_regsets): ... this.
7649 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7650 interface.
7651 (x86_siginfo_fixup): Use is_64bit_tdesc.
7652 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7653 (tdesc_x32_avx_linux, tdesc_x32_linux)
7654 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7655 Declare.
7656 (x86_linux_update_xmltarget): Delete.
7657 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7658 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7659 (AMD64_LINUX_USER64_CS): New.
7660 (x86_linux_read_description): New, based on
7661 x86_linux_update_xmltarget.
7662 (same_process_callback): New.
7663 (x86_arch_setup_process_callback): New.
7664 (x86_linux_update_xmltarget): New.
7665 (x86_regsets_info): New.
7666 (amd64_linux_regs_info): New.
7667 (i386_linux_usrregs_info): New.
7668 (i386_linux_regs_info): New.
7669 (x86_linux_regs_info): New.
7670 (x86_arch_setup): Reimplement.
7671 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7672 (x86_emit_ops): Ditto.
7673 (the_low_target): Adjust. Install x86_linux_regs_info,
7674 x86_cannot_fetch_register, and x86_cannot_store_register.
7675 (initialize_low_arch): New.
7676 * linux-ia64-low.c (tdesc_ia64): Declare.
7677 (ia64_fetch_register): Adjust.
7678 (ia64_usrregs_info, regs_info): New globals.
7679 (ia64_regs_info): New function.
7680 (the_low_target): Adjust.
7681 (initialize_low_arch): New function.
7682 * linux-sparc-low.c (tdesc_sparc64): Declare.
7683 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7684 Adjust.
7685 (sparc_arch_setup): New function.
7686 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7687 (the_low_target): Adjust.
7688 (initialize_low_arch): New function.
7689 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7690 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7691 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7692 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7693 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7694 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7695 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7696 (tdesc_powerpc_isa205_vsx64l): Declare.
7697 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7698 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7699 (ppc_set_pc, ppc_get_hwcap): Adjust.
7700 (ppc_usrregs_info): Forward declare.
7701 (!__powerpc64__) ppc_regmap_adjusted: New global.
7702 (ppc_arch_setup): Adjust to the current process'es target
7703 description.
7704 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7705 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7706 (ppc_store_evrregset): Adjust.
7707 (target_regsets): Rename to ...
7708 (ppc_regsets): ... this, and make static.
7709 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7710 (ppc_regs_info): New function.
7711 (the_low_target): Adjust.
7712 (initialize_low_arch): New function.
7713 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7714 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7715 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7716 (tdesc_s390x_linux64v2): Declare.
7717 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7718 (s390_fill_gregset, s390_store_last_break): Adjust.
7719 (target_regsets): Rename to ...
7720 (s390_regsets): ... this, and make static.
7721 (s390_get_pc, s390_set_pc): Adjust.
7722 (s390_get_hwcap): New target_desc parameter, and use it.
7723 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7724 (s390_arch_setup): Adjust to set the current process'es target
7725 description. Don't adjust the regmap.
7726 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7727 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7728 (regs_info_3264): New globals.
7729 (s390_regs_info): New function.
7730 (the_low_target): Adjust.
7731 (initialize_low_arch): New function.
7732 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7733 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7734 [__mips64] (init_registers_mips_linux)
7735 (init_registers_mips_dsp_linux): Delete defines.
7736 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7737 (have_dsp): New global.
7738 (mips_read_description): New, based on mips_arch_setup.
7739 (mips_arch_setup): Reimplement.
7740 (get_usrregs_info): New function.
7741 (mips_cannot_fetch_register, mips_cannot_store_register)
7742 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7743 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7744 (target_regsets): Rename to ...
7745 (mips_regsets): ... this, and make static.
7746 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7747 (dsp_regs_info, regs_info): New globals.
7748 (mips_regs_info): New function.
7749 (the_low_target): Adjust.
7750 (initialize_low_arch): New function.
7751 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7752 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7753 Declare.
7754 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7755 (arm_read_description): New, with bits factored from
7756 arm_arch_setup.
7757 (arm_arch_setup): Reimplement.
7758 (target_regsets): Rename to ...
7759 (arm_regsets): ... this, and make static.
7760 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7761 (arm_regs_info): New function.
7762 (the_low_target): Adjust.
7763 (initialize_low_arch): New function.
7764 * linux-m68k-low.c (tdesc_m68k): Declare.
7765 (target_regsets): Rename to ...
7766 (m68k_regsets): ... this, and make static.
7767 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7768 (m68k_regs_info): New function.
7769 (m68k_arch_setup): New function.
7770 (the_low_target): Adjust.
7771 (initialize_low_arch): New function.
7772 * linux-sh-low.c (tdesc_sharch): Declare.
7773 (target_regsets): Rename to ...
7774 (sh_regsets): ... this, and make static.
7775 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7776 (sh_regs_info, sh_arch_setup): New functions.
7777 (the_low_target): Adjust.
7778 (initialize_low_arch): New function.
7779 * linux-bfin-low.c (tdesc_bfin): Declare.
7780 (bfin_arch_setup): New function.
7781 (bfin_usrregs_info, regs_info): New globals.
7782 (bfin_regs_info): New function.
7783 (the_low_target): Adjust.
7784 (initialize_low_arch): New function.
7785 * linux-cris-low.c (tdesc_cris): Declare.
7786 (cris_arch_setup): New function.
7787 (cris_usrregs_info, regs_info): New globals.
7788 (cris_regs_info): New function.
7789 (the_low_target): Adjust.
7790 (initialize_low_arch): New function.
7791 * linux-cris-low.c (tdesc_crisv32): Declare.
7792 (cris_arch_setup): New function.
7793 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7794 (cris_regs_info): New function.
7795 (the_low_target): Adjust.
7796 (initialize_low_arch): New function.
7797 * linux-m32r-low.c (tdesc_m32r): Declare.
7798 (m32r_arch_setup): New function.
7799 (m32r_usrregs_info, regs_info): New globals.
7800 (m32r_regs_info): Adjust.
7801 (initialize_low_arch): New function.
7802 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7803 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7804 (tic6x_usrregs_info): Forward declare.
7805 (tic6x_read_description): New function, based on ...
7806 (tic6x_arch_setup): ... this. Reimplement.
7807 (target_regsets): Rename to ...
7808 (tic6x_regsets): ... this, and make static.
7809 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7810 (tic6x_regs_info): New function.
7811 (the_low_target): Adjust.
7812 (initialize_low_arch): New function.
7813 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7814 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7815 (target_regsets): Rename to ...
7816 (xtensa_regsets): ... this, and make static.
7817 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7818 globals.
7819 (xtensa_arch_setup, xtensa_regs_info): New functions.
7820 (the_low_target): Adjust.
7821 (initialize_low_arch): New function.
7822 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7823 (nios2_arch_setup): Set the current process'es tdesc.
7824 (target_regsets): Rename to ...
7825 (nios2_regsets): ... this.
7826 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7827 (nios2_regs_info): New function.
7828 (the_low_target): Adjust.
7829 (initialize_low_arch): New function.
a261b8f5
PA
7830 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7831 (aarch64_arch_setup): Set the current process'es tdesc.
7832 (target_regsets): Rename to ...
7833 (aarch64_regsets): ... this.
7834 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7835 (aarch64_regs_info): New function.
7836 (the_low_target): Adjust.
7837 (initialize_low_arch): New function.
3aee8918
PA
7838 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7839 globals.
7840 (target_regsets): Rename to ...
7841 (tile_regsets): ... this.
7842 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7843 (tile_regs_info): New function.
7844 (tile_arch_setup): Set the current process'es tdesc.
7845 (the_low_target): Adjust.
7846 (initialize_low_arch): New function.
7847 * spu-low.c (tdesc_spu): Declare.
7848 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7849 * win32-arm-low.c (tdesc_arm): Declare.
7850 (arm_arch_setup): New function.
7851 (the_low_target): Install arm_arch_setup instead of
7852 init_registers_arm.
7853 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7854 (init_windows_x86): Rename to ...
7855 (i386_arch_setup): ... this. Set `win32_tdesc'.
7856 (the_low_target): Adjust.
7857 * win32-low.c (win32_tdesc): New global.
7858 (child_add_thread): Don't create the thread cache here.
7859 (do_initial_child_stuff): Set the new process'es tdesc.
7860 * win32-low.h (struct target_desc): Forward declare.
7861 (win32_tdesc): Declare.
7862 * lynx-i386-low.c (tdesc_i386): Declare global.
7863 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7864 * lynx-low.c (lynx_tdesc): New global.
7865 (lynx_add_process): Set the new process'es tdesc.
7866 * lynx-low.h (struct target_desc): Forward declare.
7867 (lynx_tdesc): Declare global.
7868 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7869 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7870 * nto-low.c (nto_tdesc): New global.
7871 (do_attach): Set the new process'es tdesc.
7872 * nto-low.h (struct target_desc): Forward declare.
7873 (nto_tdesc): Declare.
7874 * nto-x86-low.c (tdesc_i386): Declare.
7875 (nto_x86_arch_setup): Set `nto_tdesc'.
7876
b1fbec62
GB
78772013-06-04 Gary Benson <gbenson@redhat.com>
7878
7879 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7880 to qSupported response when appropriate.
7881 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7882 with nonzero-length annex.
7883 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7884 arguments supplied in annex.
7885
d1ec4ce7
DE
78862013-05-31 Doug Evans <dje@google.com>
7887
ac44adcb 7888 PR server/15594
d1ec4ce7
DE
7889 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7890 64 bits in 64-cross-32 environment.
7891
9b25f2d3
PA
78922013-05-28 Pedro Alves <palves@redhat.com>
7893
7894 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7895 (aarch64-without-fpu.c): Delete rule.
7896 * configure.srv (aarch64*-*-linux*): Remove references to
7897 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7898 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7899 declaration.
7900
6740dc9c
PA
79012013-05-24 Pedro Alves <palves@redhat.com>
7902
7903 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7904 instead of strchr/decode_address. Error if the range isn't split
7905 with a ','. Don't assume there's be a ':' in the action.
7906
c2d6af84
PA
79072013-05-23 Yao Qi <yao@codesourcery.com>
7908 Pedro Alves <palves@redhat.com>
7909
7910 * linux-low.c (lwp_in_step_range): New function.
7911 (linux_wait_1): If the thread was range stepping and stopped
7912 outside the stepping range, report the stop to GDB. Otherwise,
7913 continue stepping. Add range stepping debug output.
7914 (linux_set_resume_request): Copy the step range from the resume
7915 request to the lwp.
7916 (linux_supports_range_stepping): New.
7917 (linux_target_ops) <supports_range_stepping>: Set to
7918 linux_supports_range_stepping.
7919 * linux-low.h (struct linux_target_ops)
7920 <supports_range_stepping>: New field.
7921 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7922 * linux-x86-low.c (x86_supports_range_stepping): New.
7923 (the_low_target) <supports_range_stepping>: Set to
7924 x86_supports_range_stepping.
7925 * server.c (handle_v_cont): Handle 'r' action.
7926 (handle_v_requests): Append ";r" if the target supports range
7927 stepping.
7928 * target.h (struct thread_resume) <step_range_start,
7929 step_range_end>: New fields.
7930 (struct target_ops) <supports_range_stepping>:
7931 New field.
7932 (target_supports_range_stepping): New macro.
7933
58794e1a
JB
79342013-05-17 Joel Brobecker <brobecker@adacore.com>
7935
7936 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7937 confusion in comment.
7938
d631c5a7
JB
79392013-05-17 Joel Brobecker <brobecker@adacore.com>
7940
7941 * lynx-low.c (struct process_info_private): New type.
7942 (lynx_add_process): New function.
7943 (lynx_create_inferior, lynx_attach): Replace calls to
7944 add_process by calls to lynx_add_process.
7945 (lynx_resume): If PTID is null, then try using
7946 current_process()->private->last_wait_event_ptid.
7947 Add comments.
7948 (lynx_clear_inferiors): Delete. The contents of that function
7949 has been inlined in lynx_mourn;
7950 (lynx_wait_1): Save the ptid in the process's private data.
7951 (lynx_mourn): Free the process' private data. Replace call
7952 to lynx_clear_inferiors by call to clear_inferiors.
7953
96f7a20f
YQ
79542013-05-17 Yao Qi <yao@codesourcery.com>
7955
7956 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7957 the right place.
7958
db0dfaa0
LM
79592013-05-16 Luis Machado <lgustavo@codesourcery.com>
7960
7961 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7962 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7963 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7964 PT_TEXT_END_ADDR guards. Update comments.
7965 (linux_target_op) <read_offsets>: Conditionally define to
7966 linux_read_offsets if the target is UCLIBC and if it defines
7967 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7968
68f5f838
SL
79692013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7970 Andrew Jenner <andrew@codesourcery.com>
7971
7972 * Makefile.in (SFILES): Add linux-nios2-low.c.
7973 (clean): Add action to delete nios2-linux.c.
7974 (nios2-linux.c): New rule.
7975 * configure.srv: Add nios2*-*-linux*.
7976 * linux-nios2-low.c: New.
7977
1ebff1fd
HAQ
79782013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7979
7980 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7981
f6150862
HZ
79822013-04-25 Hui Zhu <hui@codesourcery.com>
7983
7984 PR gdb/15186
f6150862
HZ
7985 * ax.c (ax_printf): Add fflush.
7986
614c279d
TT
79872013-04-22 Tom Tromey <tromey@redhat.com>
7988
7989 * Makefile.in (SFILES): Add filestuff.c.
7990 (OBS): Add filestuff.o.
7991 (filestuff.o): New target.
7992 * config.in, configure: Rebuild.
7993 * configure.ac: Check for fdwalk, pipe2.
7994
7d4e5717
PA
79952013-04-17 Pedro Alves <palves@redhat.com>
7996
7997 * configure.ac (USE_THREAD_DB): Delete variable.
7998 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7999 Don't AC_SUBST USE_THREAD_DB.
8000 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8001 * config.in, configure: Regenerate.
8002
d5c93e41
PA
80032013-04-16 Pedro Alves <palves@redhat.com>
8004
8005 * linux-low.h (struct lwp_info) <thread_known>: Move under
8006 the USE_THREAD_DB #ifdef.
8007
04f5fe89
PA
80082013-04-16 Pedro Alves <palves@redhat.com>
8009
8010 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8011 (linux-low.o): Delete rule.
8012 * linux-low.h: Always include "gdb_thread_db.h" instead of
8013 conditionally including thread_db.h.
8014 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8015 HAVE_THREAD_DB_H.
8016
480b27bf
JK
80172013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8018
8019 * Makefile.in (install-only): Fix make install regression.
8020
43662968
JK
80212013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8022
8023 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8024 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8025 installation.
8026 * gdbserver.1: Remove.
8027
3e74e146
PA
80282013-03-22 Pedro Alves <palves@redhat.com>
8029
8030 * linux-low.c (handle_extended_wait): Don't call
8031 linux_enable_event_reporting.
8032
a8347a2a
TT
80332013-03-15 Tony Theodore <tonyt@logyst.com>
8034
8035 PR build/9098:
8036 * Makefile.in (SHELL): Use @SHELL@.
8037
eeb56fa7
SDJ
80382013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8039
8040 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8041 compiler warning.
8042
4fa7e2ff
JB
80432013-03-13 Joel Brobecker <brobecker@adacore.com>
8044
8045 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8046 Remove extraneous NULL element.
8047
8ddb1965
YQ
80482013-03-13 Yao Qi <yao@codesourcery.com>
8049
8050 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8051 'V' block in trace frame.
8052
9accd112
MM
80532013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8054
8055 * target.h (struct target_ops): Add btrace ops.
8056 (target_supports_btrace): New macro.
8057 (target_enable_btrace): New macro.
8058 (target_disable_btrace): New macro.
8059 (target_read_btrace): New macro.
8060 * gdbthread.h (struct thread_info): Add btrace field.
8061 * server.c: Include btrace-common.h.
8062 (handle_btrace_general_set): New function.
8063 (handle_btrace_enable): New function.
8064 (handle_btrace_disable): New function.
8065 (handle_general_set): Call handle_btrace_general_set.
8066 (handle_qxfer_btrace): New function.
8067 (struct qxfer qxfer_packets[]): Add btrace entry.
8068 * inferiors.c (remove_thread): Disable btrace.
8069 * linux-low: Include linux-btrace.h.
8070 (linux_low_enable_btrace): New function.
8071 (linux_low_read_btrace): New function.
8072 (linux_target_ops): Add btrace ops.
8073 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8074 Add srv_linux_btrace=yes.
8075 (x86_64-*-linux*): Add linux-btrace.o.
8076 Add srv_linux_btrace=yes.
8077 * configure.ac: Define HAVE_LINUX_BTRACE.
8078 * config.in: Regenerated.
8079 * configure: Regenerated.
8080
5cc22e4c
MM
80812013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8082
8083 * server.c (handle_qxfer): Preserve error message if -3 is
8084 returned.
8085 (qxfer): Document the -3 return value.
8086
7c97f91e
MM
80872013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8088
8089 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8090 (linux_btrace_h): New variable.
8091 (linux-btrace.o): New rule.
8092
be9a119c 80932013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
8094 Hafiz Abid Qadeer <abidh@codesourcery.com>
8095
8096 * tracepoint.c (trace_buffer_size): New global.
8097 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8098 (init_trace_buffer): Change to one-argument function. Allocate
8099 trace buffer memory.
8100 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8101 handle QTBuffer:size packet.
8102 (cmd_bigqtbuffer_size): New function.
8103 (initialize_tracepoint): Call init_trace_buffer with
8104 DEFAULT_TRACE_BUFFER_SIZE.
8105 * server.c (handle_query): Add QTBuffer:size in the
8106 supported packets.
8107
e64f7499
YQ
81082013-03-07 Yao Qi <yao@codesourcery.com>
8109
8110 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8111 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8112 of -1.
8113 (cmd_qtsp): Adjust condition. Do post increment.
8114 Set cur_action and cur_step_action back to 0.
8115
f0ae6fc3
PA
81162013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8117
8118 PR server/15236
8119 * linux-low.c (linux_write_memory): Return early success if LEN is
8120 zero.
8121
b5b0b0af
CV
81222013-03-05 Corinna Vinschen <vinschen@redhat.de>
8123
334ad4a8 8124 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 8125
589bc927
TT
81262013-02-28 Tom Tromey <tromey@redhat.com>
8127
8128 * configure.ac: Invoke AC_SYS_LARGEFILE.
8129 * configure, config.in: Rebuild.
8130
dfe07582
CV
81312013-02-28 Corinna Vinschen <vinschen@redhat.com>
8132
8133 * win32-low.c: Throughout, fix format strings and casts of
8134 printf-like functions to avoid type related warnings on all
8135 platforms.
8136 (get_child_debug_event): Print dwDebugEventCode as hex since
8137 that's how it's usually documented.
8138
736cd585
YQ
81392013-02-28 Yao Qi <yao@codesourcery.com>
8140
8141 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8142 pulongest.
8143
e1f58301
JW
81442013-02-27 Jiong Wang <jiwang@tilera.com>
8145
8146 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8147 (reg-tilegx32.c): New rule.
8148 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8149 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8150 different register info initializer according to elf class.
8151 (init_registers_tilgx32): New function. The tilegx32 register info
8152 initializer.
8153 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8154 (tile_store_gregset): Likewise.
8155
d171ca78
YQ
81562013-02-27 Yao Qi <yao@codesourcery.com>
8157
8158 * server.c (process_point_options): Print debug message when
8159 debug_threads is true.
8160
282bbdf3
YQ
81612013-02-26 Yao Qi <yao@codesourcery.com>
8162
8163 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8164
aca22551
PA
81652013-02-19 Pedro Alves <palves@redhat.com>
8166 Kai Tietz <ktietz@redhat.com>
8167
8168 PR gdb/15161
8169
8170 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8171 instead of strtoul to extract address from packet.
8172 (process_serial_event) <'z'>: Likewise.
8173
4f3cee1c
YQ
81742013-02-18 Yao Qi <yao@codesourcery.com>
8175
8176 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8177
8e1d55a3
PA
81782013-02-14 Pedro Alves <palves@redhat.com>
8179
8180 Plug memory leak.
8181
8182 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8183 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8184
458820da
PA
81852013-02-14 Pedro Alves <palves@redhat.com>
8186
8187 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8188
baea0dae
PA
81892013-02-14 Pedro Alves <palves@redhat.com>
8190
8191 * tracepoint.c (save_string): Delete.
8192 (add_tracepoint_action): Use savestring instead of save_string.
8193
0b1afbb3
PA
81942013-02-12 Pedro Alves <palves@redhat.com>
8195
8196 * linux-xtensa-low.c: Ditto.
8197 * xtensa-xtregs.c: Ditto.
8198
8a4ac37e
PA
81992013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8200
8201 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8202 thread_db.
8203
148de6bb
MS
82042013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8205
8206 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8207 aarch64_num_wp_regs and aarch64_num_bp_regs to
8208 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8209
55fac6e0
MS
82102013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8211
8212 * linux-aarch64-low.c (ps_get_thread_area): Replace
8213 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8214
176eb98c
MS
82152013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8216 Marcus Shawcroft <marcus.shawcroft@arm.com>
8217 Nigel Stephens <nigel.stephens@arm.com>
8218 Yufeng Zhang <yufeng.zhang@arm.com>
8219
8220 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8221 (aarch64.c, aarch64-without-fpu.c): New targets.
8222 * configure.srv (aarch64*-*-linux*): New.
8223 * linux-aarch64-low.c: New file.
8224
56f7af9c
MS
82252013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8226
43aaf8b6 8227 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
8228 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8229 (dequeue_one_deferred_signal, linux_resume_one_thread)
8230 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8231 (linux_tracefork_grandchild, linux_test_for_tracefork)
8232 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8233 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8234 where the argument is 0.
8235
60f662b0
YQ
82362013-01-25 Yao Qi <yao@codesourcery.com>
8237
8238 * event-loop.c: Include "queue.h".
8239 (gdb_event_p): New typedef.
8240 (struct gdb_event) <next_event>: Remove.
8241 (event_queue): Change to QUEUE(gdb_event_p).
8242 (async_queue_event): Remove.
8243 (gdb_event_xfree): New.
8244 (initialize_event_loop): New.
8245 (process_event): Use API from QUEUE.
8246 (wait_for_event): Likewise.
8247 * server.c (main): Call initialize_event_loop.
8248 * server.h (initialize_event_loop): Declare.
8249
5ae4861a
YQ
82502013-01-18 Yao Qi <yao@codesourcery.com>
8251
8252 * ax.h (struct eval_agent_expr_context): New.
8253 (gdb_eval_agent_expr): Update declaration.
8254 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8255 TFRAME. Add new argument CTX.
8256 * server.h (struct eval_agent_expr_context): Declare.
8257 (agent_mem_read, agent_tsv_read): Update declaration.
8258 (agent_mem_read_string): Likewise.
8259 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8260 (add_traceframe_block): Add new argument TPOINT.
8261 Increase TPOINT->traceframe_usage.
8262 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8263 eval_tracepoint_agent_expr.
8264 (condition_true_at_tracepoint): Likewise.
8265 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8266 (agent_mem_read_string, agent_tsv_read): Likewise.
8267
85e00e85
YQ
82682013-01-16 Yao Qi <yao@codesourcery.com>
8269
8270 * linux-low.c (linux_resume_one_lwp): Don't check
8271 'lwp->bp_reinsert != 0'.
8272
4039cf45
JB
82732013-01-07 Joel Brobecker <brobecker@adacore.com>
8274 Pedro Alves <palves@redhat.com>
8275
8276 * lynx-low.c (ptrace_request_to_str): Define a temporary
8277 macro and use it to simplify this function's implementation.
8278
9044dee2
JB
82792013-01-07 Joel Brobecker <brobecker@adacore.com>
8280
8281 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8282 sets errno.
8283
e6352c8f
JB
82842013-01-07 Joel Brobecker <brobecker@adacore.com>
8285
8286 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8287
50681a27
JB
82882013-01-07 Joel Brobecker <brobecker@adacore.com>
8289
8290 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8291
3f6e77ef
JB
82922013-01-07 Joel Brobecker <brobecker@adacore.com>
8293
8294 * lynx-low.c (lynx_resume): Use the resume_info parameter
8295 to determine the ptid for the lynx_ptrace call, unless
8296 it is equal to minus_one_ptid, in which case we use the
8297 ptid of the current_inferior.
8298 (lynx_wait_1): After having received a thread create/exit
8299 event, resume the inferior's execution using the signaling
8300 thread's ptid, rather than the old ptid.
8301
7fda33ae
JB
83022013-01-07 Joel Brobecker <brobecker@adacore.com>
8303
8304 * lynx-low.c (lynx_resume): Delete variable ret.
8305
b9786c74
JB
83062013-01-01 Joel Brobecker <brobecker@adacore.com>
8307
8308 * gdbreplay.c (gdbreplay_version): Update copyright year.
8309 * server.c (gdbserver_version): Likewise.
8310
8b93d60f
JB
83112012-12-17 Joel Brobecker <brobecker@adacore.com>
8312
8313 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8314 new thread.
8315
037335a7
JB
83162012-12-17 Joel Brobecker <brobecker@adacore.com>
8317
8318 * lynx-low.c (ptrace_request_to_str): Add handling for
8319 PTRACE_GETTRACESIG.
8320
52d4cbd8
JB
83212012-12-17 Joel Brobecker <brobecker@adacore.com>
8322
8323 * lynx-low.c (lynx_attach): Delete variable new_process.
8324
ab8f6ca9
JB
83252012-12-17 Joel Brobecker <brobecker@adacore.com>
8326
8327 * lynx-low.c (lynx_create_inferior): Delete variable
8328 new_process.
8329
78cbc024
JB
83302012-12-17 Joel Brobecker <brobecker@adacore.com>
8331
8332 * lynx-low.c (ptrace_request_to_str): Do not handle
8333 PTRACE_GETTHREADLIST if this macro does not exist.
8334
14a00470
YQ
83352012-12-15 Yao Qi <yao@codesourcery.com>
8336
8337 * Makefile.in (OBS): Add notif.o.
8338 * notif.c, notif.h: New.
8339 * server.c: Include "notif.h".
8340 (struct vstop_notif) <next>: Remove.
8341 <base>: New field.
8342 (queue_stop_reply): Update.
8343 (push_event, send_next_stop_reply): Remove.
8344 (discard_queued_stop_replies): Update.
8345 (notif_stop): New variable.
8346 (handle_v_stopped): Remove.
8347 (handle_v_requests): Don't call handle_v_stopped. Call
8348 handle_ack_notif instead.
8349 (queue_stop_reply_callback): Call notif_event_enque instead
8350 of queue_stop_reply.
8351 (handle_status): Don't call send_next_stop_reply, call
8352 notif_write_event instead.
8353 (kill_inferior_callback): Likewise.
8354 (detach_or_kill_inferior_callback): Likewise.
8355 (main): Call initialize_notif.
8356 (process_serial_event): Call QUEUE_is_empty.
8357 (handle_target_event): Call notif_push instead of push event.
8358 * server.h (push_event): Remove declaration.
8359
61c125b9
TT
83602012-12-10 Tom Tromey <tromey@redhat.com>
8361
8362 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8363 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8364 macros.
8365 (.c.o): Rewrite.
8366 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8367 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8368 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8369 (amd64-linux-ipa.o, ax.o): Rewrite.
8370 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8371 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8372 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8373 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8374 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8375 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8376 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8377 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8378 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8379 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8380 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8381 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8382 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8383 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8384 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8385 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8386 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8387 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8388 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8389 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8390 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8391 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8392 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8393 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8394 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8395 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8396 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8397 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8398 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8399 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8400 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8401 (reg-tilegx.o): Remove.
8402 (all_object_files): New macro.
8403 Include .deps files.
8404 * aclocal.m4, configure: Rebuild.
8405 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8406 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8407 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8408
e90e9ad9
TT
84092012-12-05 Tom Tromey <tromey@redhat.com>
8410
8411 PR gdb/14917:
8412 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8413
02d403bf 84142012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
8415
8416 * configure.ac: Check for linux/perf_event.h.
8417 * config.in: Regenerated.
8418 * configure: Regenerated.
8419
0270a750
PA
84202012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8421
8422 * hostio.c (handle_readlink): Decrease buffer size
8423 parameter passed to readlink by one byte.
8424
8c29b58e
YQ
84252012-11-26 Yao Qi <yao@codesourcery.com>
8426
8427 * configure.ac (build_warnings): Append '-Wempty-body'.
8428 * configure: Regenerated.
8429 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8430 body.
8431
8bdce1ff
PM
84322012-11-15 Pierre Muller <muller@sourceware.org>
8433
8434 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8435 * config.in: Regenerate.
8436 * configure: Regenerate.
8437 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8438 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8439 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8440 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8441 header.
8442 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8443 instead of <sys/wait.h> header.
8444 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8445
02d403bf 84462012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
8447
8448 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8449 (various make rules): Remove -DGDBSERVER
8450
fbd5db48
YQ
84512012-11-09 Yao Qi <yao@codesourcery.com>
8452
8453 * spu-low.c (current_ptid): Move it to ..
8454 * gdbthread.h: ... here. New.
8455 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8456 * server.c (myresume, process_serial_event): Likewise.
8457 * thread-db.c (thread_db_find_new_threads): Likewise.
8458 * tracepoint.c (run_inferior_command): Likewise.
8459
b3dc46ff
AB
84602012-10-01 Andrew Burgess <aburgess@broadcom.com>
8461
8462 * server.c (handle_search_memory_1): Include access length in
8463 warning message.
8464
07c04788
HPN
84652012-09-05 Michael Brandt <michael.brandt@axis.com>
8466
8467 * linux-crisv32-low.c: Fix compile errors.
8468
918d227b
YQ
84692012-09-04 Yao Qi <yao@codesourcery.com>
8470
8471 * tracepoint.c (cmd_qtsv): Adjust debug message.
8472 Don't check CUR_TPOINT.
8473
18c1b81a
YQ
84742012-08-28 Yao Qi <yao@codesourcery.com>
8475
8476 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8477 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8478 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8479 Remove declarations of xmalloc, xreallloc, xstrdup and
8480 freeargv.
8481 * Makefile.in (libiberty_h): New.
8482 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8483 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8484
dc82f37b
YQ
84852012-08-23 Yao Qi <yao@codesourcery.com>
8486
8487 * server.h: Remove declaration of 'xsnprintf'.
8488
406b1477
KS
84892012-08-22 Keith Seitz <keiths@redhat.com>
8490
8491 * server.h: Include build-gnulib-gbserver/config.h.
8492 * gdbreplay.c: Likewise.
8493
e6712ff1
DE
84942012-08-08 Doug Evans <dje@google.com>
8495
8496 * Makefile.in (SFILES): Add gdb_vecs.c.
8497 (OBS): Add gdb_vecs.o.
8498 (gdb_vecs_h, host_defs_h): New variables.
8499 (thread-db.o): Add $(gdb_vecs_h) dependency.
8500 (gdb_vecs.o): New rule.
8501 * thread-db.c: #include "gdb_vecs.h".
8502 (thread_db_load_search): Use a vector to iterate over path elements.
8503 Handle text appearing after "$pdir".
8504
8505 * configure.ac: Add check for strstr.
8506 * config.in: Regenerate.
8507 * configure: Regenerate.
8508
7c3270ae
UW
85092012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8510
8511 * hostio.c (handle_pread): If pread fails, fall back to attempting
8512 lseek/read.
8513 (handle_pwrite): Likewise for pwrite.
8514
b62e2b27
UW
85152012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8516
8517 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8518 between unsupported TYPE and unimplementable ADDR/LEN combination.
8519 (arm_insert_point): Act on new return value.
8520
78a99e91
PA
85212012-07-31 Pedro Alves <palves@redhat.com>
8522
8523 * server.c (process_point_options): Only skip tokens if we find
8524 one that is unrecognized. Don't treat 'X' specially while
8525 skipping unrecognized tokens.
8526
fcf303ab
UW
85272012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8528
8529 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8530 to 4-byte-align HW breakpoint addresses for Thumb.
8531
7255706c
YQ
85322012-07-27 Yao Qi <yao@codesourcery.com>
8533
8534 PR remote/14161.
8535
8536 * server.h: Declare gdb_agent_about_to_close.
8537 * target.c (kill_inferior): Include "agent.h".
8538 New. Send command 'kill'.
8539 * target.h (kill_inferior): Removed macro.
8540 * tracepoint.c (gdb_agent_about_to_close): New.
8541 (gdb_agent_helper_thread): Handle command 'close'.
8542 Wait endlessly until the inferior stops.
8543 Install gdb_agent_remove_socket to atexit hook.
8544 (agent_socket_name): New static variable.
8545 (gdb_agent_socket_init): Replace local variable 'name' with
8546 'agent_socket_name'.
8547 (gdb_agent_remove_socket): New.
8548
5a3f286f
YQ
85492012-07-27 Yao Qi <yao@codesourcery.com>
8550
8551 * server.c (process_point_options): Stop at 'X' when parsing.
8552
961bd387
ME
85532012-07-19 Michael Eager <eager@eagercon.com>
8554
a261b8f5 8555 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
8556 to hw_execute.
8557 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8558 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8559 hardware breakpoint.
8560
aa7c7447
JK
85612012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8562
8563 * gdbserver/linux-low.c (initialize_low): Call
8564 linux_ptrace_init_warnings.
8565
7f216e7c
DE
85662012-07-02 Doug Evans <dje@google.com>
8567
8568 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8569 pointer to int.
8570
d3ce09f5
SS
85712012-07-02 Stan Shebs <stan@codesourcery.com>
8572
8573 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8574 (ax.o): Add it to build rule.
8575 (ax-ipa.o): Ditto.
8576 (OBS): Add format.o.
8577 (IPA_OBS): Add format.o.
8578 * server.c (handle_query): Claim support for breakpoint commands.
8579 (process_point_options): Add command case.
8580 (process_serial_event): Leave running if there are printfs in
8581 effect.
8582 * mem-break.h (any_persistent_commands): Declare.
8583 (add_breakpoint_commands): Declare.
8584 (gdb_no_commands_at_breakpoint): Declare.
8585 (run_breakpoint_commands): Declare.
8586 * mem-break.c (struct point_command_list): New struct.
8587 (struct breakpoint): New field command_list.
8588 (any_persistent_commands): New function.
8589 (add_commands_to_breakpoint): New function.
8590 (add_breakpoint_commands): New function.
8591 (gdb_no_commands_at_breakpoint): New function.
8592 (run_breakpoint_commands): New function.
8593 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8594 locally.
8595 * ax.c: Include format.h.
8596 (ax_printf): New function.
8597 (gdb_eval_agent_expr): Add printf opcode.
8598
2f8f6aed
YQ
85992012-06-13 Yao Qi <yao@codesourcery.com>
8600
8601 * server.c (start_inferior): Remove duplicated writes to fields
8602 'last_resume_kind' and 'last_status' of 'current_inferior'.
8603
0c9070b3
YQ
86042012-06-12 Yao Qi <yao@codesourcery.com>
8605 Pedro Alves <palves@redhat.com>
8606
8607 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8608 comment.
8609 * server.c (handle_v_cont): Extend comment.
8610
c52daf70
YQ
86112012-06-11 Yao Qi <yao@codesourcery.com>
8612
8613 * linux-low.c (linux_attach): Add 'static'.
8614
d38bbb0a
YQ
86152012-06-06 Yao Qi <yao@codesourcery.com>
8616
8617 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8618
89dc0afd
JK
86192012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8620
8621 Fix gcc -flto compilation warning.
8622 * server.c (main): Make variable multi_mode and attach volatile.
8623
75f62ce7
TJB
86242012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8625
8626 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8627 if the platform doesn't know about it.
8628
65f479b6
PA
86292012-05-30 Jeff Kenton <jkenton@tilera.com>
8630
8631 * Makefile.in (SFILES): Add linux-tile-low.c.
8632 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8633 * configure.srv: Handle tilegx-*-linux*.
8634 * linux-tile-low.c: New file.
8635
0c5bf5a9
JK
86362012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8637
8638 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8639
a493e3e2
PA
86402012-05-24 Pedro Alves <palves@redhat.com>
8641
8642 PR gdb/7205
8643
43aaf8b6 8644 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 8645
2ea28649
PA
86462012-05-24 Pedro Alves <palves@redhat.com>
8647
8648 PR gdb/7205
8649
8650 Replace target_signal with gdb_signal throughout.
8651
8d409d16
MR
86522012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8653
8654 * linux-low.c (linux_store_registers): Avoid the copying sequence
8655 when no data has been retrieved by ptrace.
8656
23512c01
MGD
86572012-05-22 Will Deacon <will.deacon@arm.com>
8658
8659 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8660 Include asm/ptrace.h.
8661 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8662 already defined.
8663
4934b29e
MR
86642012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8665
8666 * linux-low.c (linux_store_registers): Don't re-retrieve data
8667 with ptrace that has already been obtained from /proc. Always
8668 copy any data retrieved with ptrace to the buffer supplied.
8669
bde24c0a
PA
86702012-05-11 Yao Qi <yao@codesourcery.com>
8671 Pedro Alves <palves@redhat.com>
8672
8673 * linux-low.c (enum stopping_threads_kind): New.
8674 (stopping_threads): Change type to `enum stopping_threads_kind'.
8675 (handle_extended_wait): If stopping and suspending threads, leave
8676 the new_lwp suspended too.
8677 (linux_wait_for_event): Adjust.
8678 (stop_all_lwps): Set `stopping_threads' to
8679 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8680 whether we're suspending threads or just stopping them. Assert no
8681 recursion happens.
8682
623b6bdf
YQ
86832012-04-29 Yao Qi <yao@codesourcery.com>
8684
8685 * server.h: Move some code to ...
8686 * gdbthread.h: ... here. New.
8687 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8688 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8689 (nto-low.o, win32-low.o): Likewise.
8690 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8691 * regcache.c, remote-utils.c, server.c: Likewise.
8692 * target.c, tracepoint.c, win32-low.c: Likewise.
8693
f15f9948
TJB
86942012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8695
8696 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8697 (PTRACE_ARG4_TYPE): Likewise.
8698 (PTRACE_XFER_TYPE): Likewise.
8699 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8700 ptrace to PTRACE_ARG3_TYPE.
8701 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8702 (PTRACE_ARG4_TYPE): Likewise.
8703 (PTRACE_XFER_TYPE): Likewise.
8704 (linux_detach_one_lwp): Cast fourth argument of
8705 ptrace to long then PTRACE_ARG4_TYPE.
8706 (regsets_fetch_inferior_registers): Cast third argument of
8707 ptrace to long then PTRACE_ARG3_TYPE.
8708 (regsets_store_inferior_registers): Likewise.
8709
38ea300a
PA
87102012-04-20 Pedro Alves <palves@redhat.com>
8711
8712 * configure: Regenerate.
8713
c971b7fa
PA
87142012-04-19 Pedro Alves <palves@redhat.com>
8715
43aaf8b6 8716 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 8717 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
8718 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8719 (all, install-only, uninstall, clean-info, all-lib, clean): No
8720 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8721 (maintainer-clean realclean distclean): Use subdir_do.
8722 (subdir_do): New.
8723 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 8724 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
8725 * acinclude.m4: Include acx_configure_dir.m4.
8726 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8727 calls. Call AC_PROG_RANLIB. Configure gnulib using
8728 ACX_CONFIGURE_DIR.
8729 (GNULIB): New.
8730 (GNULIB_STDINT_H): Adjust.
8731 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8732 * gdbreplay.c: Include build-gnulib/config.h.
8733 * server.h: Likewise.
8734 * aclocal.m4: Regenerate.
8735 * config.in: Regenerate.
8736 * configure: Regenerate.
c971b7fa 8737
809277f8
PA
87382012-04-19 Pedro Alves <palves@redhat.com>
8739
8740 * Makefile.in (LIBGNU, INCGNU): Adjust.
8741 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8742 (all, install-only, uninstall, clean-info, all-lib, clean)
8743 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8744 * configure.ac: Adjust AC_OUTPUT output.
8745 * aclocal.m4: Regenerate.
8746 * configure: Regenerate.
8747
fd9bb8b8
PA
87482012-04-19 Pedro Alves <palves@redhat.com>
8749
8750 * Makefile.in (generated_files): New.
8751 (server_h): Remove the explicit dependency on config.h, and depend
8752 on $generated_files.
8753
1c298c66
PA
87542012-04-19 Pedro Alves <palves@redhat.com>
8755
8756 * Makefile.in (INCGNU): Add -Ignulib.
8757
57c4b50b
PA
87582012-04-19 Pedro Alves <palves@redhat.com>
8759
8760 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8761 (INCGNU): ... this, and spell out -I here.
8762 (GNULIB_LIB): Rename to ...
8763 (LIBGNU): ... this.
8764 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8765
1030e047
PA
87662012-04-19 Pedro Alves <palves@redhat.com>
8767
8768 * config.in: Regenerate.
8769
447d4319
PA
87702012-04-19 Pedro Alves <palves@redhat.com>
8771
8772 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8773 * server.h (memmem): Remove declaration.
8774 * config.in: Regenerate.
8775 * configure: Regenerate.
8776
aad9eab9
YQ
87772012-04-19 Yao Qi <yao@codesourcery.com>
8778
8779 * Makefile.in (SFILES): Add common/vec.c.
8780 (OBS): Add vec.o.
8781 (vec.o): New rule.
8782
3e10640f
YQ
87832012-04-19 Yao Qi <yao@codesourcery.com>
8784
8785 * remote-utils.c (prepare_resume_reply): Replace with macro
8786 target_core_of_thread.
8787 * server.c (handle_qxfer_threads_proper): Likewise.
8788 * target.h (traget_core_of_thread): New macro.
8789
71622373
PA
87902012-04-18 Pedro Alves <palves@redhat.com>
8791
8792 * aclocal.m4: Regenerate.
8793 * configure: Regenerate.
8794
80d26939
YQ
87952012-04-16 Yao Qi <yao@codesourcery.com>
8796
8797 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8798 duplicated on address.
8799
42476b70
YQ
88002012-04-16 Yao Qi <yao@codesourcery.com>
8801
8802 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8803 (struct tracepoint_action_ops) <send>: New field.
8804 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8805 (agent_expr_send, x_tracepoint_action_send): New.
8806 (l_tracepoint_action_send): New.
8807 (cmd_qtdp): Download and install tracepoint
8808 according to `use_agent'.
8809 (run_inferior_command): Add one more parameter `len'.
8810 Update callers.
8811 (tracepoint_send_agent): New.
8812 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8813
7bc83639
YQ
88142012-04-16 Yao Qi <yao@codesourcery.com>
8815
8816 * tracepoint.c (download_tracepoints): Moved to ...
8817 (cmd_qtstart): ... here.
8818
5f18041e
YQ
88192012-04-14 Yao Qi <yao@codesourcery.com>
8820
8821 * tracepoint.c: Include inttypes.h.
8822 (struct collect_memory_action): Use sized types.
8823 (struct tracepoint): Likewise.
8824 (cmd_qtdp, stop_tracing): Update print specifiers.
8825 (cmd_qtp, response_tracepoint): Likewise.
8826 (collect_data_at_tracepoint): Likewise.
8827 (collect_data_at_step): Likewise.
8828
55a8c076
YQ
88292012-04-14 Yao Qi <yao@codesourcery.com>
8830
8831 Import gnulib module inttypes.
8832 * aclocal.m4, config.in, configure: Regenerated.
8833
dc750257
YQ
88342012-04-14 Yao Qi <yao@codesourcery.com>
8835
8836 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8837 Makefile and config.status at last.
8838
0ab5faf9
YQ
88392012-04-13 Yao Qi <yao@codesourcery.com>
8840
8841 * tracepoint.c: Include stdint.h unconditionally.
8842
18f5fd81
TJB
88432012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8844
8845 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8846 on BFD_HAVE_SYS_PROCFS_TYPE.
8847 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8848 * configure: Regenerate.
8849 * config.in: Likewise.
8850
4d47af5c
L
88512012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8852
8853 * Makefile.in (clean): Also remove x32.c x32-linux.c
8854 x32-avx.c x32-avx-linux.c.
8855 (x32.o): New target.
8856 (x32.c): Likewise.
8857 (x32-linux.o): Likewise.
8858 (x32-linux.c): Likewise.
8859 (x32-avx.o): Likewise.
8860 (x32-avx.c): Likewise.
8861 (x32-avx-linux.o): Likewise.
8862 (x32-avx-linux.c): Likewise.
8863
8864 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8865 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8866 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8867 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8868 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8869 i386/x32-avx-linux.xml.
8870
8871 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8872 (init_registers_x32_avx_linux): Likwise.
8873 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8874 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8875
ecedbe58
PA
88762012-04-13 Pedro Alves <palves@redhat.com>
8877
8878 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8879 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8880 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8881 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8882 the sub-make.
8883
c92b5177
L
88842012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8885
8886 * linux-x86-low.c (compat_x32_clock_t): New.
8887 (compat_x32_siginfo_t): Likewise.
8888 (compat_x32_siginfo_from_siginfo): Likewise.
8889 (siginfo_from_compat_x32_siginfo): Likewise.
8890 (linux_is_elf64): Likewise.
8891 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8892 and siginfo_from_compat_x32_siginfo for x32.
8893 (x86_arch_setup): Set linux_is_elf64.
8894
214d508e
L
88952012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8896
8897 PR gdb/13969
8898 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8899 e_machine field.
8900 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8901 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8902 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8903 compatible with process.
8904
c9a1864a
YQ
89052012-04-12 Yao Qi <yao@codesourcery.com>
8906
8907 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8908 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8909 (install-only, install-info, clean): Handle sub dir gnulib.
8910 (all-lib, am--refresh): New targets.
8911 (memmem.o): Remove target.
8912 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8913 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8914 (AC_REPLACE_FUNCS): Remove memmem.
8915 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8916 (AC_OUTPUT): Generate Makefile in gnulib/.
8917 * aclocal.m4, config.in, configure: Regenerated.
8918
367ba2c2
MR
89192012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8920
8921 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8922
9d236627
PA
89232012-04-05 Pedro Alves <palves@redhat.com>
8924
8925 -Werror=strict-aliasing
8926
8927 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8928 pointer.
8929
111217b3
PA
89302012-04-04 Pedro Alves <palves@redhat.com>
8931
8932 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8933 (sparc_store_gregset_from_stack, sparc_store_gregset)
8934 (sparc_breakpoint_at): Fix formatting.
8935
8365dcf5
TJB
89362012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8937
8938 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8939 are available.
8940 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8941 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8942 * config.in: Regenerate.
8943 * configure: Likewise.
8944
689cc2ae
PA
89452012-03-29 Pedro Alves <palves@redhat.com>
8946
8947 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8948 Correct ptrace arguments.
8949
c14dfd32
PA
89502012-03-28 Pedro Alves <palves@redhat.com>
8951
8952 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8953 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8954 (IA64_FR1_REGNUM): New defines.
8955 (ia64_fetch_register): New.
8956 (the_low_target): Install it.
8957 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8958 field.
8959 * linux-low.c (linux_fetch_registers): Try the
8960 the_low_target.fetch_register hook first.
8961
8962 * linux-arm-low.c (the_low_target): Adjust.
8963 * linux-bfin-low.c (the_low_target): Adjust.
8964 * linux-cris-low.c (the_low_target): Adjust.
8965 * linux-crisv32-low.c (the_low_target): Adjust.
8966 * linux-m32r-low.c (the_low_target): Adjust.
8967 * linux-m68k-low.c (the_low_target): Adjust.
8968 * linux-mips-low.c (the_low_target): Adjust.
8969 * linux-ppc-low.c (the_low_target): Adjust.
8970 * linux-s390-low.c (the_low_target): Adjust.
8971 * linux-sh-low.c (the_low_target): Adjust.
8972 * linux-sparc-low.c (the_low_target): Adjust.
8973 * linux-tic6x-low.c (the_low_target): Adjust.
8974 * linux-x86-low.c (the_low_target): Adjust.
8975 * linux-xtensa-low.c (the_low_target): Adjust.
8976
63c88e13
PA
89772012-03-26 Pedro Alves <palves@redhat.com>
8978
8979 * server.c (handle_qxfer_libraries): Don't bail early if
8980 the_target->qxfer_libraries_svr4 is not NULL.
8981
fb723180
PA
89822012-03-26 Pedro Alves <palves@redhat.com>
8983
8984 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8985
0afae3cf
PA
89862012-03-23 Pedro Alves <palves@redhat.com>
8987
8988 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8989 "library-list-svr4" element's start tag when the the DSO list is
8990 empty.
8991
485f1ee4
PA
89922012-03-23 Pedro Alves <palves@redhat.com>
8993
8994 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8995 a variable whose type size is the same as the inferior's pointer
8996 size.
8997
a5362b9a
TS
89982012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8999
9000 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9001 struct siginfo.
9002 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9003 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9004 * linux-low.h: Include <signal.h>.
9005 (struct siginfo): Remove forward declaration.
9006 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9007 struct siginfo.
9008
d226c142
MF
90092012-03-21 Mike Frysinger <vapier@gentoo.org>
9010
9011 * .gitignore: Ignore more files.
9012
122f36ef
PA
90132012-03-19 Pedro Alves <palves@redhat.com>
9014 Jan Kratochvil <jan.kratochvil@redhat.com>
9015
9016 * server.c (cont_thread, general_thread): Add describing comments.
9017 (start_inferior): Clear `cont_thread'.
9018 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9019 of a process.
9020
fc3e5175
YQ
90212012-03-15 Yao Qi <yao@codesourcery.com>
9022
9023 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9024 handling to ...
9025 (cmd_qtdp): ... here.
9026
8d0d92cd
YQ
90272012-03-15 Yao Qi <yao@codesourcery.com>
9028
9029 * tracepoint.c (struct tracepoint_action_ops): New.
9030 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9031 (m_tracepoint_action_download): New.
9032 (r_tracepoint_action_download): New.
9033 (x_tracepoint_action_download): New.
9034 (l_tracepoint_action_download): New.
9035 (add_tracepoint_action): Install `action->ops' according type.
9036 (download_tracepoint_1): Move code `download' function pointer
9037 of various tracepoint_action_ops.
9038
87b0bb13
JK
90392012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9040
9041 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9042 linux_ptrace_attach_warnings.
9043
5f572dec
JK
90442012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9045
9046 * Makefile.in (linux-ptrace.o): New.
9047 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9048 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9049 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9050 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9051 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9052 of these targets.
9053 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9054
f4647387
YQ
90552012-03-08 Yao Qi <yao@codesourcery.com>
9056 Pedro Alves <palves@redhat.com>
9057
9058 Fix PR server/13392.
9059 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9060 offset of JMP insn.
9061 * tracepoint.c (remove_tracepoint): New.
9062 (cmd_qtdp): Call remove_tracepoint when failed to install.
9063
9b224c5e
PA
90642012-03-07 Pedro Alves <palves@redhat.com>
9065
9066 * linux-low.c (get_detach_signal): New.
9067 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9068 Pass on pending signals to PTRACE_DETACH. Check the result of the
9069 ptrace call.
9070 * server.c (program_signals, program_signals_p): New.
9071 (handle_general_set): Handle QProgramSignals.
9072 * server.h (program_signals, program_signals_p): Declare.
9073
e237a7e2
JK
90742012-03-05 Pedro Alves <palves@redhat.com>
9075 Jan Kratochvil <jan.kratochvil@redhat.com>
9076
9077 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9078 New comment why.
9079
5808517f
YQ
90802012-03-03 Yao Qi <yao@codesourcery.com>
9081
9082 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9083 agent_look_up_symbols.
9084
58b4daa5
YQ
90852012-03-03 Yao Qi <yao@codesourcery.com>
9086
9087 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9088 (linux-x86-low.o): Likewise.
9089 * server.h: Remove in_process_agent_loaded.
9090 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9091 common/agent.c.
9092 Update callers.
9093
8ffcbaaf
YQ
90942012-03-03 Yao Qi <yao@codesourcery.com>
9095
9096 * tracepoint.c (gdb_agent_capability): New global.
9097 (in_process_agent_loaded_ust): Renamed to
9098 `in_process_agent_supports_ust'.
9099 Update callers.
9100 (in_process_agent_supports_ust): Call agent_capability_check.
9101 (clear_installed_tracepoints): Assert that agent supports
9102 agent.
9103
d1feda86
YQ
91042012-03-03 Yao Qi <yao@codesourcery.com>
9105
9106 * linux-low.c (linux_supports_agent): New.
9107 (linux_target_ops): Initialize field `supports_agent' with
9108 linux_supports_agent.
9109 * target.h (struct target_ops) <supports_agent>: New.
9110 (target_supports_agent): New macro.
9111 * server.c (handle_general_set): Handle packet 'QAgent'.
9112 (handle_query): Send `QAgent+'.
9113 * Makefile.in (server.o): Depends on agent.h.
9114
2fa291ac
YQ
91152012-03-03 Yao Qi <yao@codesourcery.com>
9116
9117 * Makefile.in (OBS): Add agent.o.
9118 Add new rule for agent.o.
9119 Track dependence of tracepoint.c on agent.h.
9120 * tracepoint.c (run_inferior_command_1):
9121 (run_inferior_command): Call agent_run_command.
9122 (gdb_ust_connect_sync_socket): Deleted. Move it to
9123 common/agent.c.
9124 (resume_thread, stop_thread): Likewise.
9125 (gdb_ust_socket_init): Renamed to ...
9126 (gdb_agent_socket_init): ... New.
9127 (gdb_ust_thread): Renamed to ...
9128 (gdb_agent_helper_thread): ... New.
9129 (gdb_ust_init): Move some code to ...
9130 (gdb_agent_init): ... here. New.
9131 [HAVE_UST]: Call gdb_ust_init.
9132 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9133 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9134 * config.in, configure: Regenerated.
9135
05044653
PA
91362012-03-02 Pedro Alves <palves@redhat.com>
9137
9138 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9139 * linux-low.c (struct simple_pid_list): New.
9140 (stopped_pids): New a struct simple_pid_list pointer.
9141 (add_to_pid_list, pull_pid_from_list): New.
9142 (handle_extended_wait): Don't assume the first signal new children
9143 report is SIGSTOP. Adjust call to pull_pid_from_list.
9144 (linux_wait_for_lwp): Adjust.
9145
8d00225b
YQ
91462012-03-02 Yao Qi <yao@codesourcery.com>
9147
9148 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9149 debug log.
9150
19560ba5
YQ
91512012-03-02 Yao Qi <yao@codesourcery.com>
9152
9153 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9154 `stop_pc' and `tpoint'. Update caller.
9155
1faeff08
MR
91562012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9157
9158 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9159 * linux-low.c (use_linux_regsets): New macro.
9160 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9161 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9162 (linux_register_in_regsets): New function.
9163 (usr_fetch_inferior_registers): Skip registers covered by
9164 regsets.
9165 (usr_store_inferior_registers): Likewise.
9166 (usr_fetch_inferior_registers): New macro.
9167 (usr_store_inferior_registers): Likewise.
9168 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9169 (linux_store_registers): Likewise.
9170 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9171 prototype.
9172 (init_registers_mips64_dsp_linux): Likewise.
9173 (init_registers_mips_linux): New macro.
9174 (init_registers_mips_dsp_linux): Likewise.
9175 (mips_dsp_num_regs): Likewise.
9176 (DSP_BASE, DSP_CONTROL): New fallback macros.
9177 (mips_base_regs): New macro.
9178 (mips_regmap): Use it. Fix the size.
9179 (mips_dsp_regmap): New variable.
9180 (mips_dsp_regset_bitmap): Likewise.
9181 (mips_arch_setup): New function.
9182 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9183 than mips_regmap.
9184 (mips_cannot_store_register): Likewise.
9185 (the_low_target): Update .arch_setup, .num_regs and .regmap
9186 initializers. Add .regset_bitmap initializer.
9187 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9188 initializer.
9189 * linux-bfin-low.c (the_low_target): Likewise.
9190 * linux-cris-low.c (the_low_target): Likewise.
9191 * linux-crisv32-low.c (the_low_target): Likewise.
9192 * linux-ia64-low.c (the_low_target): Likewise.
9193 * linux-m32r-low.c (the_low_target): Likewise.
9194 * linux-m68k-low.c (the_low_target): Likewise.
9195 * linux-ppc-low.c (the_low_target): Likewise.
9196 * linux-s390-low.c (the_low_target): Likewise.
9197 * linux-sh-low.c (the_low_target): Likewise.
9198 * linux-sparc-low.c (the_low_target): Likewise.
9199 * linux-tic6x-low.c (the_low_target): Likewise.
9200 * linux-x86-low.c (the_low_target): Likewise.
9201 * linux-xtensa-low.c (the_low_target): Likewise.
9202 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9203 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9204 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9205 srv_xmlfiles.
9206 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9207 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9208
c03e6ccc
YQ
92092012-02-29 Yao Qi <yao@codesourcery.com>
9210 Pedro Alves <palves@redhat.com>
9211
9212 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9213 `step_over_finished' is true.
9214
644cebc9
PA
92152012-02-27 Pedro Alves <palves@redhat.com>
9216
9217 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9218 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9219
c14d7ab2
PA
92202012-02-27 Pedro Alves <palves@redhat.com>
9221
9222 PR server/9684
9223 * linux-low.c (pid_is_stopped): New.
9224 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9225
412c89dd
LM
92262012-02-25 Luis Machado <lgustavo@codesourcery.com>
9227
9228 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9229 of conditions.
9230
b745defe
MR
92312012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9232
9233 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9234
9f3a5c85
LM
92352012-02-24 Luis Machado <lgustavo@codesourcery>
9236
9237 * server.c (handle_query): Advertise support for target-side
9238 breakpoint condition evaluation.
9239 (process_point_options): New function.
9240 (process_serial_event): When inserting a breakpoint, check for
9241 a target-side condition that should be evaluated.
9242
9243 * mem-break.c: Include regcache.h and ax.h.
9244 (point_cond_list_t): New data structure.
9245 (breakpoint) <cond_list>: New field.
9246 (find_gdb_breakpoint_at): Make non-static.
9247 (delete_gdb_breakpoint_at): Clear any target-side
9248 conditions.
9249 (clear_gdb_breakpoint_conditions): New function.
9250 (add_condition_to_breakpoint): Likewise.
9251 (add_breakpoint_condition): Likewise.
9252 (gdb_condition_true_at_breakpoint): Likewise.
9253 (gdb_breakpoint_here): Return result directly instead
9254 of going through a local variable.
9255
9256 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9257 (clear_gdb_breakpoint_conditions): Likewise.
9258 (add_breakpoint_condition): Likewise.
9259 (gdb_condition_true_at_breakpoint): Likewise.
9260
9261 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9262 (need_step_over_p): Take target-side breakpoint condition into
9263 consideration.
9264
5e1dc496
LM
92652012-02-24 Luis Machado <lgustavo@codesourcery>
9266
9267 * server.h: Include tracepoint.h.
9268 (agent_mem_read, agent_get_trace_state_variable_value,
9269 agent_set_trace_state_variable_value,
9270 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9271 get_set_tsv_func_addr): New prototypes.
9272
9273 * ax.h: New include file.
9274 * ax.c: New source file.
9275
9276 * tracepoint.c: Include ax.h.
9277 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9278 agent_expr, eval_result_type): Move to ax.h.
9279 (parse_agent_expr): Rename to ...
9280 (gdb_parse_agent_expr): ... this, make it non-static and move
9281 to ax.h.
9282 (unparse_agent_expr) Rename to ...
9283 (gdb_unparse_agent_expr): ... this, make it non-static and move
9284 to ax.h.
9285 (eval_agent_expr): Rename to ...
9286 (eval_tracepoint_agent_expr): ... this.
9287 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9288 forward declarations.
9289 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9290 (agent_get_trace_state_variable_value): New function.
9291 (agent_set_trace_state_variable_value): New function.
9292 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9293 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9294 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9295 (condition_true_at_tracepoint): Likewise.
9296 (parse_agent_expr): Rename to ...
9297 (gdb_parse_agent_expr): ... this and move to ax.c.
9298 (unparse_agent_expr): Rename to ...
9299 (gdb_unparse_agent_expr): ... this and move to ax.c.
9300 (gdb_agent_op_name): Move to ax.c.
9301 (eval_agent_expr): Rename to ...
9302 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9303 and move to ax.c.
9304 (eval_tracepoint_agent_expr): New function.
9305 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 9306 non-static.
5e1dc496
LM
9307 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9308 ax.c.
9309 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9310 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9311 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9312 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9313 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9314 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9315 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9316 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9317 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9318 (compile_bytecodes): Remove forward declaration.
9319 (is_goto_target): Move to ax.c.
9320 (compile_bytecodes): Move to ax.c and call
9321 agent_get_trace_state_variable_value (...) and
9322 agent_set_trace_state_variable_value (...).
9323
9324 * Makefile.in: Update ax.c and IPA dependencies.
9325
277e4e52
PA
93262012-02-24 Pedro Alves <palves@redhat.com>
9327
9328 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9329 (cmd_bigqtbuffer_circular): ... this. Only handle
9330 'QTBuffer:circular:'.
9331 (handle_tracepoint_general_set): Adjust.
9332
bf4c19f7
YQ
93332012-02-16 Yao Qi <yao@codesourcery.com>
9334
9335 * inferiors.c: Move code to ...
9336 * dll.c: .... here. New.
9337 * server.h: Declare clear_dlls.
9338 * Makefile.in (SFILES): Add dll.c.
9339 (OBS): Add dll.o
9340 (dll.o): New rule.
9341
d73f2619
YQ
93422012-02-11 Yao Qi <yao@codesourcery.com>
9343
9344 * server.c: (handle_monitor_command): Add a new parameter
9345 `own_buf'.
9346 (handle_query): Update caller.
9347
f8255c2a
JB
93482012-02-09 Joel Brobecker <brobecker@adacore.com>
9349
9350 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9351 * configure, config.in: Regenerate.
9352 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9353 is not defined.
9354
da84f473
PA
93552012-02-02 Pedro Alves <palves@redhat.com>
9356
9357 Try SIGKILL first, then PTRACE_KILL.
9358 * linux-low.c (linux_kill_one_lwp): New.
9359 (linux_kill_one_lwp): Rename to ...
9360 (kill_one_lwp_callback): ... this. Use the new
9361 linux_kill_one_lwp.
9362
e886a173
PA
93632012-02-02 Pedro Alves <palves@redhat.com>
9364
9365 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9366 inferior.
9367
be07f1a2
PA
93682012-01-27 Pedro Alves <palves@redhat.com>
9369
9370 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9371 (elf_64_file_p): Make static.
9372 (linux_pid_exe_is_elf_64_file): New.
9373 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9374 Delete declarations.
9375 (linux_pid_exe_is_elf_64_file): Declare.
9376 * linux-x86-low.c (x86_arch_setup): Use
9377 linux_pid_exe_is_elf_64_file.
9378
d8301ad1
JK
93792012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9380
9381 * linux-low.c (linux_wait_for_event_1): Rename to ...
9382 (linux_wait_for_event): ... here and merge it with former
9383 linux_wait_for_event - new variable wait_ptid, use it.
9384 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9385
01b17894
PA
93862012-01-23 Pedro Alves <palves@redhat.com>
9387
9388 * server.c (main): Avoid yet another case of infinite loop while
9389 detaching/killing after a longjmp.
9390
e825046f
JK
93912012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9392
9393 Code cleanup.
9394 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9395
b9e7b9c3
UW
93962012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9397
9398 * hostio.c (handle_readlink): New function.
9399 (handle_vFile): Call it to handle "vFile:readlink" packets.
9400
901f9912
UW
94012012-01-20 Pedro Alves <palves@redhat.com>
9402 Ulrich Weigand <ulrich.weigand@linaro.org>
9403
9404 * server.c (handle_v_requests): Only support vAttach and vRun to
9405 start multiple processes when in extended protocol mode.
9406
fc1ab1a0
PA
94072012-01-17 Pedro Alves <palves@redhat.com>
9408
9409 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9410 memalign plus mprotect to allocate the scratch buffer.
9411
7d5d4e98
PA
94122012-01-13 Pedro Alves <palves@redhat.com>
9413
9414 * server.c (attach_inferior): Clear `cont_thread'.
9415
f128d5e9
PA
94162012-01-13 Pedro Alves <palves@redhat.com>
9417
9418 * server.c (main): Avoid infinite loop while detaching/killing
9419 after a longjmp.
9420
06db92f0
DE
94212012-01-09 Doug Evans <dje@google.com>
9422
9423 * server.c (start_inferior): Set last_ptid in --wrapper case.
9424
32d92999
YQ
94252012-01-06 Yao Qi <yao@codesourcery.com>
9426
9427 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9428 defined.
9429 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9430
5e0a92a9
YQ
94312012-01-04 Yao Qi <yao@codesourcery.com>
9432
9433 * tracepoint.c (cmd_qtdp): Print debug message
9434 for static tracepoint.
9435
ae639e8c
YQ
94362012-01-04 Yao Qi <yao@codesourcery.com>
9437
9438 * tracepoint.c (trace_vdebug): Differentiate debug message
9439 between gdbserver and IPA.
9440
f72429c5
YQ
94412012-01-03 Yao Qi <yao@codesourcery.com>
9442
9443 * tracepoint.c (tracepoint_was_hit): Don't collect for
9444 static tracepoint.
9445
12c3e59c
JB
94462012-01-02 Joel Brobecker <brobecker@adacore.com>
9447
9448 * terminal.h: Reformat copyright header.
9449
67827812
JB
94502012-01-02 Joel Brobecker <brobecker@adacore.com>
9451
9452 * server.c (gdbserver_version): Update copyright year.
9453 * gdbreplay.c (gdbreplay_version): Likewise.
9454
3e52c33d
JK
94552011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9456
9457 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9458
9459 Revert:
9460 2011-12-18 Hui Zhu <teawater@gmail.com>
9461 * linux-low.c (linux_create_inferior): Save return value to ret.
9462
66f1260e
HZ
94632011-12-18 Hui Zhu <teawater@gmail.com>
9464
9465 * linux-low.c (linux_create_inferior): Save return value to ret.
9466
e77616d7
DE
94672011-12-16 Doug Evans <dje@google.com>
9468
e7b06c57
DE
9469 * linux-low.c (linux_create_inferior): If stdio connection,
9470 redirect stdin from /dev/null, stdout to stderr.
9471 * remote-utils.c (remote_is_stdio): New static global.
9472 (remote_connection_is_stdio): New function.
9473 (remote_prepare): Handle stdio connection.
9474 (remote_open): Ditto.
9475 (remote_close): Don't close stdin for stdio connections.
9476 (read_prim,write_prim): New functions. Replace all calls to
9477 read/write to these.
9478 * server.c (main): Watch for "-" argument. Move call to
9479 remote_prepare before start_inferior.
9480 * server.h (STDIO_CONNECTION_NAME): New macro.
9481 (remote_connection_is_stdio): Declare.
9482
e77616d7
DE
9483 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9484 in debugging output.
9485
82067193
YQ
94862011-12-15 Yao Qi <yao@codesourcery.com>
9487
9488 * tracepoint.c: Include sys/syscall.h.
9489 (gdb_ust_thread): Remove preprocessor conditional.
9490
82bfbe7e
PA
94912011-12-14 Pedro Alves <pedro@codesourcery.com>
9492
9493 * linux-low.c (linux_detach_one_lwp): Call
9494 the_low_target.prepare_to_resume before detaching.
9495
712c6575
YQ
94962011-12-14 Yao Qi <yao@codesourcery.com>
9497
9498 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9499 of write.
9500
d54d1edf
YQ
95012011-12-14 Yao Qi <yao@codesourcery.com>
9502
9503 * i386-low.c (i386_low_stopped_data_address): Initialize local
9504 variable `control'.
9505
6210a125
PA
95062011-12-13 Pedro Alves <pedro@codesourcery.com>
9507
9508 PR remote/13492
9509
9510 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9511 DR_CONTROL unless necessary. Extend comments.
9512 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9513 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9514
2ece8244
YQ
95152011-12-13 Yao Qi <yao@codesourcery.com>
9516
9517 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9518 macros.
9519 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9520
784867a5
JK
95212011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9522
9523 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9524 Print new debug message for such case.
9525
6bf36717
JK
95262011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9527
9528 Fix overlapping memcpy.
9529 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9530 the read_inferior_memory transfer.
9531 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9532 write_inferior_memory transfer.
9533 (set_fast_tracepoint_jump): New variable buf. Use it for the
9534 read_inferior_memory and write_inferior_memory transfers.
9535 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9536 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9537 Use it for the write_inferior_memory transfer.
9538 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9539 buffers.
9540
50275556
MR
95412011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9542
9543 * linux-low.c (fetch_register, store_register): Make code
9544 consistent, fix formatting.
9545
7325beb4
MR
95462011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9547
9548 * linux-low.c (usr_store_inferior_registers): Factor out code
9549 to handle individual registers into...
9550 (store_register): ... this new function.
9551
c642a434
UW
95522011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9553
9554 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9555 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9556 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9557 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9558 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9559 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9560 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9561 (srv_xmlfiles): Add new XML files.
9562
9563 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9564 and <sys/uio.h>.
9565 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9566 (init_registers_s390_linux32v1): Add prototype.
9567 (init_registers_s390_linux32v2): Likewise.
9568 (init_registers_s390_linux64v1): Likewise.
9569 (init_registers_s390_linux64v2): Likewise.
9570 (init_registers_s390x_linux64v1): Likewise.
9571 (init_registers_s390x_linux64v2): Likewise.
9572 (s390_num_regs): Increment to 52.
9573 (s390_regmap): Add orig_r2 register.
9574 (s390_num_regs_3264): Increment to 68.
9575 (s390_regmap_3264): Add orig_r2 register.
9576 (s390_collect_ptrace_register): Handle orig_r2 register.
9577 (s390_supply_ptrace_register): Likewise.
9578 (s390_fill_last_break): New function.
9579 (s390_store_last_break): Likewise.
9580 (s390_fill_system_call): New function.
9581 (s390_store_system_call): Likewise.
9582 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9583 register sets.
9584 (s390_check_regset): New function.
9585 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9586 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9587 Update target_regsets for available register sets.
9588
2268b414
JK
95892011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9590 Jan Kratochvil <jan.kratochvil@redhat.com>
9591
9592 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9593 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9594 New.
9595 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9596 * linux-low.h (struct process_info_private): New member r_debug.
9597 * server.c (handle_qxfer_libraries): Call
9598 the_target->qxfer_libraries_svr4.
9599 (handle_qxfer_libraries_svr4): New function.
9600 (qxfer_packets): New entry "libraries-svr4".
9601 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9602 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9603 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9604 PACKET_qXfer_libraries_svr4.
9605
d6db1fab
UW
96062011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9607
9608 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9609 PSW address/mask between 8-byte and 16-byte formats.
9610 (s390_supply_ptrace_register): Likewise.
9611 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9612 basic addressing mode bit.
9613
242f5f1c
SS
96142011-11-24 Stan Shebs <stan@codesourcery.com>
9615
9616 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9617
f196051f
SS
96182011-11-17 Stan Shebs <stan@codesourcery.com>
9619
9620 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9621 (tracing_start_time): New global.
9622 (tracing_stop_time): New global.
9623 (tracing_user_name): New global.
9624 (tracing_notes): New global.
9625 (tracing_stop_note): New global.
9626 (cmd_qtstart): Set traceframe_usage, start_time.
9627 (stop_tracing): Set stop_time.
9628 (cmd_qtstatus): Report additional status.
9629 (cmd_qtp): New function.
9630 (handle_tracepoint_query): Call it.
9631 (cmd_qtnotes): New function.
9632 (handle_tracepoint_general_set): Call it.
9633 (get_timestamp): Rename from tsv_get_timestamp.
9634
405f8e94
SS
96352011-11-14 Stan Shebs <stan@codesourcery.com>
9636 Kwok Cheung Yeung <kcy@codesourcery.com>
9637
9638 * linux-x86-low.c (small_jump_insn): New.
9639 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9640 trampoline and error message, build a trampoline and issue a small
9641 jump instruction to it.
9642 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9643 trampoline and error message.
9644 (x86_get_min_fast_tracepoint_insn_len): New.
9645 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9646 * linux-low.h (struct linux_target_ops): Add arguments to
9647 install_fast_tracepoint_jump_pad operation, add new operation.
9648 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9649 arguments.
9650 (linux_get_min_fast_tracepoint_insn_len): New function.
9651 (linux_target_op): Add new operation.
9652 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9653 (gdb_trampoline_buffer_end): Ditto.
9654 (gdb_trampoline_buffer_error): Ditto.
9655 (struct ipa_sym_addresses): Add fields for new IPA variables.
9656 (symbol_list): Add entries for new IPA variables.
9657 (struct tracepoint): Add fields to hold the address range of the
9658 trampoline used by the tracepoint.
9659 (trampoline_buffer_head): New static variable.
9660 (trampoline_buffer_tail): Ditto.
9661 (claim_trampoline_space): New function.
9662 (have_fast_tracepoint_trampoline_buffer): New function.
9663 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9664 structure.
9665 (install_fast_tracepoint): Ditto, also add error buffer argument.
9666 (cmd_qtminftpilen): New function.
9667 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9668 (fast_tracepoint_from_trampoline_address): New function.
9669 (fast_tracepoint_collecting): Handle trampoline as part of jump
9670 pad space.
9671 (set_trampoline_buffer_space): New function.
9672 (initialize_tracepoint): Initialize new IPA variables.
9673 * target.h (struct target_ops): Add arguments to
9674 install_fast_tracepoint_jump_pad operation, add new
9675 get_min_fast_tracepoint_insn_len operation.
9676 (target_get_min_fast_tracepoint_insn_len): New.
9677 (install_fast_tracepoint_jump_pad): Add arguments.
9678 * server.h (IPA_BUFSIZ): Define.
9679 * linux-i386-ipa.c: Include extra header files.
9680 (initialize_fast_tracepoint_trampoline_buffer): New function.
9681 (initialize_low_tracepoint): Call it.
9682 * server.h (set_trampoline_buffer_space): Declare.
9683 (claim_trampoline_space): Ditto.
9684 (have_fast_tracepoint_trampoline_buffer): Ditto.
9685
1e4d1764
YQ
96862011-11-14 Yao Qi <yao@codesourcery.com>
9687
9688 * server.c (handle_query): Handle InstallInTrace for qSupported.
9689 * tracepoint.c (add_tracepoint): Sort list.
9690 (install_tracepoint, download_tracepoint): New.
9691 (cmd_qtdp): Call them to install and download tracepoints.
9692 (sort_tracepoints): Removed.
9693 (cmd_qtstart): Update.
9694
5c73ff4e
YQ
96952011-11-14 Yao Qi <yao@codesourcery.com>
9696
9697 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9698 * mem-break.h: Declare.
9699 * tracepoint.c (cmd_qtstart): Move some code to ...
9700 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9701 New.
9702 (download_tracepoints): Move some code to ...
9703 (download_tracepoint_1): ... here. New.
9704
86a30030
YQ
97052011-11-08 Yao Qi <yao@codesourcery.com>
9706
9707 * remote-utils.c (relocate_instruction): A comment fix.
9708
8d26e50c
JB
97092011-11-07 Joel Brobecker <brobecker@adacore.com>
9710
9711 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9712 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9713 dr_status_mirror and dr_control_mirror from debug_reg_state.
9714 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9715 (i386_initial_stuff): Remove use of deleted globals.
9716 (i386_get_thread_context, i386_set_thread_context,
9717 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9718 from debug_reg_state.
9719
a59306a3
YQ
97202011-11-05 Yao Qi <yao@codesourcery.com>
9721
9722 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9723 address as TPOINT's.
9724
3065dfb6
SS
97252011-11-02 Stan Shebs <stan@codesourcery.com>
9726
9727 * tracepoint.c (agent_mem_read_string): New function.
9728 (eval_agent_expr): Call it for tracenz.
9729 * server.c (handle_query): Report support for tracenz.
9730
fd0d8c7c
YQ
97312011-11-02 Yao Qi <yao@codesourcery.com>
9732
9733 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9734
609086b1
YQ
97352011-11-02 Yao Qi <yao@codesourcery.com>
9736
9737 * target.h: Fix a typo in comment.
9738
b9fd1791
PA
97392011-10-31 Pedro Alves <pedro@codesourcery.com>
9740
9741 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9742 clobber the breakpoints' shadows with fast tracepoint jumps.
9743 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9744 * target.c (write_inferior_memory): Also pass MYADDR down to
9745 check_mem_write.
9746
03583c20
UW
97472011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9748
9749 * configure.ac: Check support for personality routine.
9750 * configure: Regenerate.
9751 * config.in: Likewise.
9752 * linux-low.c: Include <sys/personality.h>.
9753 Define ADDR_NO_RANDOMIZE if necessary.
9754 (linux_create_inferior): Disable address space randomization when
9755 forking inferior, if requested.
9756 (linux_supports_disable_randomization): New function.
9757 (linux_target_ops): Install it.
9758 * server.h (disable_randomization): Declare.
9759 * server.c (disable_randomization): New global variable.
9760 (handle_general_set): Handle QDisableRandomization.
9761 (handle_query): Likewise for qSupported.
9762 (main): Support --disable-randomization and --no-disable-randomization
9763 command line arguments.
9764 * target.h (struct target_ops): Add supports_disable_randomization.
9765 (target_supports_disable_randomization): New macro.
9766
723b724b
MF
97672011-09-29 Mike Frysinger <vapier@gentoo.org>
9768
9769 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9770 ifdef check.
9771 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9772 [!PT_GETDSBT] (target_loadmap): New definition.
9773 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9774 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9775 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9776 and PT_GETDSBT to LINUX_LOADMAP.
9777 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9778 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9779
55329a5c 97802011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
9781
9782 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9783 (arm_linux_hwbp_cap): New static variable.
9784 (arm_linux_get_hwbp_cap): Replace by ...
9785 (arm_linux_init_hwbp_cap): ... this new function.
9786 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9787 (arm_linux_get_hw_watchpoint_count): Likewise.
9788 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9789 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9790 (arm_prepare_to_resume): Use perror_with_name instead of error.
9791
55329a5c 97922011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
9793
9794 * linux-arm-low.c: Include <signal.h>.
9795 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9796 (struct arm_linux_hwbp_cap): New data type.
9797 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9798 (struct arm_linux_hw_breakpoint): New data type.
9799 (MAX_BPTS, MAX_WPTS): Define.
9800 (struct arch_process_info, struct arch_lwp_info): New data types.
9801 (arm_linux_get_hwbp_cap): New function.
9802 (arm_linux_get_hw_breakpoint_count): Likewise.
9803 (arm_linux_get_hw_watchpoint_count): Likewise.
9804 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9805 (arm_hwbp_control_initialize): Likewise.
9806 (arm_hwbp_control_is_enabled): Likewise.
9807 (arm_hwbp_control_is_initialized): Likewise.
9808 (arm_hwbp_control_disable): Likewise.
9809 (arm_linux_hw_breakpoint_equal): Likewise.
9810 (arm_linux_hw_point_initialize): Likewise.
9811 (struct update_registers_data): New data structure.
9812 (update_registers_callback: New function.
9813 (arm_insert_point): Likewise.
9814 (arm_remove_point): Likewise.
9815 (arm_stopped_by_watchpoint): Likewise.
9816 (arm_stopped_data_address): Likewise.
9817 (arm_new_process): Likewise.
9818 (arm_new_thread): Likewise.
9819 (arm_prepare_to_resume): Likewise.
9820 (the_low_target): Register arm_insert_point, arm_remove_point,
9821 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9822 arm_new_thread, and arm_prepare_to_resume.
9823
6b9801d4
SS
98242011-09-15 Stan Shebs <stan@codesourcery.com>
9825
9826 * server.h (struct emit_ops): Add compare-goto fields.
9827 * tracepoint.c (gdb_agent_op_sizes): New table.
9828 (emit_eq_goto): New function.
9829 (emit_ne_goto): New function.
9830 (emit_lt_goto): New function.
9831 (emit_le_goto): New function.
9832 (emit_gt_goto): New function.
9833 (emit_ge_goto): New function.
9834 (is_goto_target): New function.
9835 (compile_bytecodes): Recognize special cases of compare-goto
9836 combinations and call specialized emitters for them.
9837 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9838 (amd64_emit_ne_goto): New function.
9839 (amd64_emit_lt_goto): New function.
9840 (amd64_emit_le_goto): New function.
9841 (amd64_emit_gt_goto): New function.
9842 (amd64_emit_ge_goto): New function.
9843 (amd64_emit_ops): Add the new functions.
9844 (i386_emit_eq_goto): New function.
9845 (i386_emit_ne_goto): New function.
9846 (i386_emit_lt_goto): New function.
9847 (i386_emit_le_goto): New function.
9848 (i386_emit_gt_goto): New function.
9849 (i386_emit_ge_goto): New function.
9850 (i386_emit_ops): Add the new functions.
9851
bf15cbda
SS
98522011-09-08 Stan Shebs <stan@codesourcery.com>
9853
9854 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9855 (i386_emit_epilogue): Restore %ebx.
9856
943ca1dd
JZ
98572011-08-31 Jie Zhang <jzhang918@gmail.com>
9858
9859 * server.c (step_thread): Remove definition.
9860 (process_serial_event): Don't handle Hs.
9861 * server.h (step_thread): Remove declaration.
9862 * target.c (set_desired_inferior): Remove use of step_thread.
9863
e3deef73
LM
98642011-08-24 Luis Machado <lgustavo@codesourcery.com>
9865
9866 * linux-low.c: Include linux-procfs.h.
9867 (linux_attach_lwp_1): Update comments.
9868 (linux_attach): Scan for existing threads when attaching to a
9869 process that is the tgid.
9870 * Makefile.in: Update dependencies.
9871
13da1c97
LM
98722011-08-24 Luis Machado <lgustavo@codesourcery.com>
9873
9874 * configure.srv: Add linux-procfs.o dependencies.
9875
881127c9
YQ
98762011-08-14 Yao Qi <yao@codesourcery.com>
9877
9878 * target.h (struct target_ops): Fix indent.
9879 * win32-low.c (win32_target_ops): Fix comment.
9880
58dbd541
YQ
98812011-08-14 Andrew Jenner <andrew@codesourcery.com>
9882 Yao Qi <yao@codesourcery.com>
9883
9884 * Makefile.in (clean): Remove tic6x-*.c files.
9885 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9886 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9887 (tic6x-c64xp-linux.c): Likewise.
9888 * configure.srv: Add support for tic6x-*-uclinux.
9889 * linux-tic6x-low.c: New.
9890 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9891
78d85199
YQ
98922011-08-14 Andrew Stubbs <ams@codesourcery.com>
9893 Yao Qi <yao@codesourcery.com>
9894
9895 * target.h (struct target_ops): Add read_loadmap.
9896 * linux-low.c (struct target_loadseg): New type.
9897 (struct target_loadmap): New type.
9898 (linux_read_loadmap): New function.
9899 (linux_target_ops): Add linux_read_loadmap.
9900 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
9901 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9902 to NULL.
78d85199 9903
a959a88d
EZ
99042011-08-05 Eli Zaretskii <eliz@gnu.org>
9905
9906 * win32-low.c: Include <stdint.h>.
9907
1ced966e
PA
99082011-07-22 Pedro Alves <pedro@codesourcery.com>
9909
9910 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9911 to the inferior here.
9912 (i386_remove_aligned_watchpoint): Ditto.
9913 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9914 fit part of the watchpoint in the debug registers.
9915 (i386_update_inferior_debug_regs): New.
9916 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9917 registers, and only update the inferior on success.
9918 (i386_low_remove_watchpoint): Ditto.
9919
d26e3629
KY
99202011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9921
9922 * linux-low.c (compare_ints, unique, list_threads, show_process,
9923 linux_core_of_thread): Delete.
9924 (linux_target_ops): Change linux_core_of_thread to
9925 linux_common_core_of_thread.
9926 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9927 * utils.c (malloc_failure): Change type of argument.
9928 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9929 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9930 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9931 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9932 (IPA_OBJS): Add common-utils-ipa.o.
9933 (ptid_h, linux_osdata_h): New macros.
9934 (server_h): Add common/common-utils.h, common/xml-utils.h,
9935 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9936 common/ptid.h.
9937 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9938 ptid.o, buffer.o): New rules.
9939 (linux-low.o): Add common/linux-osdata.h as a dependency.
9940 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9941 * configure.ac: Add AC_HEADER_DIRENT check.
9942 * config.in: Regenerate.
9943 * configure: Regenerate.
9944 * remote-utils.c (xml_escape_text): Delete.
9945 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9946 buffer_xml_printf): Move to common/buffer.c.
9947 * server.c (main): Remove call to initialize_inferiors.
9948 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9949 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9950 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9951 internal_error, gdb_assert, gdb_assert_fail): Delete.
9952 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9953 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9954 common/buffer.h.
9955 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9956 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9957 initialize_inferiors): Delete.
9958
2275a1a7
PA
99592011-07-20 Pedro Alves <pedro@codesourcery.com>
9960
9961 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9962 symbol error.
9963
0a5b1e09
PA
99642011-05-31 Pedro Alves <pedro@codesourcery.com>
9965
9966 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9967 assertion.
9968 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9969
6938fd34
YQ
99702011-05-26 Yao Qi <yao@codesourcery.com>
9971
9972 * Makefile.in (thread-db.o): Track dependence to
9973 common/gdb_thread_db.h.
9974 * thread-db.c: include gdb_thread_db.h from right place.
9975
b481f9e0
TT
99762011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9977
9978 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9979 __FILE__ and __LINE__ to internal_error.
9980
98a5dd13
DE
99812011-05-13 Doug Evans <dje@google.com>
9982
9983 * thread-db.c (try_thread_db_load_from_sdir): New function.
9984 (try_thread_db_load_from_dir): New function.
9985 (thread_db_load_search): Handle $sdir, ignore $pdir.
9986 Remove trying of system directories if search of
9987 libthread-db-search-path fails, that is now done via $sdir.
9988
d248b706
KY
99892011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9990
9991 * server.c (handle_query): Add EnableDisableTracepoints to the list
9992 of supported features.
43aaf8b6 9993 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 9994 tracepoints.
43aaf8b6
PA
9995 (cmd_qtenable_disable): New.
9996 (cmd_qtstart): Install tracepoints even if disabled.
9997 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9998 receiving a QTEnable or QTDisable packet.
9999 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10000 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10001 tracepoints.
10002 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 10003
84e578fb
DE
100042011-05-10 Doug Evans <dje@google.com>
10005
10006 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10007
71f55dd8
DE
100082011-05-04 Doug Evans <dje@google.com>
10009
10010 * linux-low.c (linux_join): Skip process lookup.
10011 * spu-low.c (spu_join): Ditto.
10012 * server.c (join_inferiors_callback): Delete.
10013 (process_serial_event): For 'D' packet (detach) call join_inferior
10014 directly.
10015
4d393d60
JM
100162011-05-04 Joseph Myers <joseph@codesourcery.com>
10017
10018 * README: Don't mention xscale*-*-linux*.
10019 * configure.srv (xscale*-*-linux*): Don't handle target.
10020
b00ad6ff
NF
100212011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10022
10023 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10024 casting pointers.
10025 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10026 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10027 (i386_emit_void_call_2): Likewise.
10028
af96c192
YQ
100292011-04-26 Yao Qi <yao@codesourcery.com>
10030
43aaf8b6
PA
10031 * linux-low.c: Move common macros to linux-ptrace.h.
10032 Include linux-ptrace.h.
af96c192
YQ
10033 * Makefile.in (linux_ptrace_h): New.
10034 (linux-low.o): Depends on linux-ptrace.h.
10035
03f2bd59
JK
100362011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10037
10038 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10039 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10040 (remote_prepare): New function with most of the TCP code from ...
10041 (remote_open): ... here. Detect PORT here unconditionally. Move also
10042 setting transport_is_reliable.
10043 * server.c (run_once): New variable.
10044 (gdbserver_usage): Document it.
10045 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10046 the first run if RUN_ONCE.
10047 * server.h (run_once, remote_prepare): New declarations.
10048
7a9dd1b2
TT
100492011-04-19 Tom Tromey <tromey@redhat.com>
10050
10051 * win32-low.c (handle_load_dll): Remove duplicate "the".
10052
81239425
PM
100532011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10054
10055 Remove support for old Cygwin 1.5 versions.
10056 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10057 function to avoid warning.
10058 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10059 warning.
10060
9e0627f1
PM
100612011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10062
10063 * gdbserver/server.h (Macro _): Define it if not available.
10064
588eebee
MS
100652011-03-14 Michael Snyder <msnyder@vmware.com>
10066
348af9f7 10067 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 10068
43f70d4c
JB
100692011-03-10 Joel Brobecker <brobecker@adacore.com>
10070
10071 * Makefile.in (maintainer-clean realclean distclean): Remove
10072 "make ... subdir_do" command.
10073
348af9f7
MS
100742011-03-10 Michael Snyder <msnyder@vmware.com>
10075
10076 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10077
10078 * server.c (handle_v_run): Free alloced buffer on early return.
10079
e637a4f5
YQ
100802011-03-09 Yao Qi <yao@codesourcery.com>
10081
10082 Revert:
10083 2011-03-04 Yao Qi <yao@codesourcery.com>
10084
10085 * Makefile.in: Remove GNU make feature --directory.
10086
10087 2011-03-05 Yao Qi <yao@codesourcery.com>
10088
10089 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10090 (subdir_do): New make target. Copied from gdb/Makefile.
10091 (maintainer-clean, realclean, distclean, clean): Call corresponding
10092 make targets in common/Makefile.
10093
10094 2011-02-11 Yao Qi <yao@codesourcery.com>
10095
10096 * configure.ac: Call AC_PROG_RANLIB.
10097 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10098 * configure: Regenerate.
10099
e6edda56
JK
101002011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10101
10102 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10103
e5141119
JB
101042011-03-06 Yao Qi <yao@codesourcery.com>
10105
10106 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10107
64794aa4
JB
101082011-03-05 Yao Qi <yao@codesourcery.com>
10109
10110 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10111 (subdir_do): New make target. Copied from gdb/Makefile.
10112 (maintainer-clean, realclean, distclean, clean): Call corresponding
10113 make targets in common/Makefile.
10114
7a762829
YQ
101152011-03-04 Yao Qi <yao@codesourcery.com>
10116
10117 * Makefile.in: Remove GNU make feature --directory.
10118
348af9f7
MS
101192011-03-04 Michael Snyder <msnyder@vmware.com>
10120
10121 * server.c (queue_stop_reply): Call xmalloc not malloc.
10122
101232011-03-02 Michael Snyder <msnyder@vmware.com>
10124
10125 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10126
9f72fee2
MS
101272011-02-28 Michael Snyder <msnyder@vmware.com>
10128
588eebee
MS
10129 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10130 (cmd_qtframe): Ditto.
10131 (cmd_qtbuffer): Ditto.
10132 (cmd_bigqtbuffer): Ditto.
10133
9f72fee2
MS
10134 * utils.c (decimal2str): Initialize 'width' to nine, then
10135 don't mess with it.
10136
8040bd49
UW
101372011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10138
10139 * hostio.c (require_data): Free *data, not data.
10140
7e52cbd0
JK
101412011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10142
10143 * hostio.c (require_data): Use free, not xfree.
10144
9130f83e
MS
101452011-02-27 Michael Snyder <msnyder@vmware.com>
10146
4b812f4e
MS
10147 * server.c (handle_query): Discard unused value.
10148
9130f83e
MS
10149 * hostio.c (require_data): Free malloc memory before returning
10150 error.
10151
69d37113
MS
101522011-02-26 Michael Snyder <msnyder@vmware.com>
10153
10154 * linux-low.c (list_threads): Call closedir for dirent.
10155
35f5825a
MS
101562011-02-27 Michael Snyder <msnyder@vmware.com>
10157
2a589cef
MS
10158 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10159 a case statement falls through.
10160
0adea5f7
MS
10161 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10162
35f5825a
MS
10163 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10164 in comparison.
10165
238f1c74
MS
101662011-02-26 Michael Snyder <msnyder@vmware.com>
10167
10168 * utils.c (decimal2str): Eliminate dead code and dead param.
10169 (pulongest): Drop dead param from call to decimal2str.
10170 (plongest): Ditto.
10171
633ff500
JB
101722011-02-24 Joel Brobecker <brobecker@adacore.com>
10173
10174 Revert the following patch (not approved yet):
10175 2011-02-21 Hui Zhu <teawater@gmail.com>
10176 * tracepoint.c (tp_printf): New function.
10177 (eval_agent_expr): Handle gdb_agent_op_printf.
10178
f9c6ff72
HZ
101792011-02-21 Hui Zhu <teawater@gmail.com>
10180
10181 * tracepoint.c (tp_printf): New function.
10182 (eval_agent_expr): Handle gdb_agent_op_printf.
10183
94d5e490
TT
101842011-02-18 Tom Tromey <tromey@redhat.com>
10185
10186 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10187 (tracepoint.o): Likewise.
10188 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10189 (gdb_agent_op_names): Likewise.
10190
c7f96d2b
TT
101912011-02-18 Tom Tromey <tromey@redhat.com>
10192
10193 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10194 gdb_agent_op_rot>: New constants.
10195 (gdb_agent_op_names): Add pick and roll.
10196 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10197 cases.
10198
0feedb2c
JK
101992011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10200
10201 * aclocal.m4: Regenerated with aclocal-1.11.1.
10202
b3b9301e
PA
102032011-02-14 Pedro Alves <pedro@codesourcery.com>
10204
10205 * server.c (handle_qxfer_traceframe_info): New.
10206 (qxfer_packets): Register "traceframe-info".
10207 (handle_query): Report support for qXfer:traceframe-info:read+.
10208 * tracepoint.c (match_blocktype): New.
10209 (traceframe_find_block_type): Rename to ...
10210 (traceframe_walk_blocks): ... this. Add callback filter argument,
10211 and use it.
10212 (traceframe_find_block_type): New, reimplemented on top of
10213 traceframe_walk_blocks.
10214 (build_traceframe_info_xml): New.
10215 (traceframe_read_info): New.
10216 * server.h (traceframe_read_info): Declare.
10217
4f3e6fb7
YQ
102182011-02-11 Yao Qi <yao@codesourcery.com>
10219
10220 * configure.ac: Call AC_PROG_RANLIB.
10221 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10222 * configure: Regenerate.
10223
764880b7
PA
102242011-02-07 Pedro Alves <pedro@codesourcery.com>
10225
10226 * server.c (gdb_read_memory): Change return semantics to allow
10227 partial transfers.
10228 (handle_search_memory_1): Adjust.
10229 (process_serial_event) <'m' packet>: Handle partial transfers.
10230 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10231
1c79eb8a
PA
102322011-01-28 Pedro Alves <pedro@codesourcery.com>
10233
10234 * regcache.c (init_register_cache): Initialize
10235 regcache->register_status.
10236 (free_register_cache): Release regcache->register_status.
10237 (regcache_cpy): Copy register_status.
10238 (registers_to_string): Print 'x's for unavailable registers.
10239 (supply_register): Mark the register's status valid or
10240 unavailable, depending on whether a buffer was passed in or not.
10241 (supply_register_zeroed): New.
10242 (supply_regblock): Mark the registers' status valid or
10243 unavailable, depending on whether a buffer was passed in or not.
10244 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10245 (struct regcache): New `register_status' field.
10246 (supply_register_zeroed): Declare.
10247 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10248 supply_register_zeroed, rather than passing a NULL buffer to
10249 supply_register.
10250 * tracepoint.c (fetch_traceframe_registers): Update comment.
10251
85724a0e
PA
102522011-01-28 Pedro Alves <pedro@codesourcery.com>
10253
10254 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10255 buffer explicit.
10256
d08aafef
PA
102572011-01-25 Pedro Alves <pedro@codesourcery.com>
10258
10259 * server.h (decode_xfer_write): Change prototype.
10260 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10261 and don't extract the annex here.
10262 * server.c (decode_xfer_read): Remove `annex' parameter,
10263 and don't extract the annex here.
10264 (decode_xfer): New.
10265 (struct qxfer): New.
10266 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10267 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10268 (handle_qxfer_statictrace): New functions, abstracted out from
10269 handle_query, and made to use the struct qxfer interface.
10270 (handle_threads_qxfer_proper): Rename to ...
10271 (handle_qxfer_threads_proper): ... this.
10272 (handle_threads_qxfer): Rename to ...
10273 (handle_qxfer_threads): ... this. Adjust.
10274 (qxfer_packets): New array.
10275 (handle_qxfer): New function.
10276 (handle_query): Use handle_qxfer.
10277
493e2a69
MS
102782011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10279
10280 * gdbreplay.c: Shorten lines of >= 80 columns.
10281 * linux-low.c: Ditto.
10282 * linux-ppc-low.c: Ditto.
10283 * linux-s390-low.c: Ditto.
10284 * linux-sparc-low.c: Ditto.
10285 * linux-x86-low.c: Ditto.
10286 * linux-xtensa-low.c: Ditto.
10287 * mem-break.c: Ditto.
10288 * nto-low.c: Ditto.
10289 * regcache.h: Ditto.
10290 * remote-utils.c: Ditto.
10291 * server.c: Ditto.
10292 * server.h: Ditto.
10293 * thread-db.c: Ditto.
10294 * tracepoint.c: Ditto.
10295 * utils.c: Ditto.
10296 * win32-low.h: Ditto.
10297
44944448
JB
102982011-01-05 Joel Brobecker <brobecker@adacore.com>
10299
10300 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10301 update.
10302
71ce852c
JB
103032011-01-01 Joel Brobecker <brobecker@adacore.com>
10304
10305 * server.c (gdbserver_version): Update copyright year in version
10306 output.
10307 * gdbreplay.c (gdbreplay_version): Ditto.
10308
eb826dc6
MF
103092010-12-29 Jie Zhang <jie.zhang@analog.com>
10310
10311 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10312 * linux-bfin-low.c: New file.
10313 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10314 PT_DATA_ADDR for BFIN targets.
10315 * Makefile.in (SFILES): Add linux-bfin-low.c.
10316 (clean): Remove reg-bfin.c.
10317 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10318 * README: Mention supported Blackfin targets.
10319
39ab222a
MF
103202010-12-23 Mike Frysinger <vapier@gentoo.org>
10321
10322 * .gitignore: New file.
10323
a1f2ce7d
MF
103242010-11-16 Mike Frysinger <vapier@gentoo.org>
10325
10326 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10327
f474844c
JZ
103282010-10-22 Jie Zhang <jie@codesourcery.com>
10329
10330 * Makefile.in: Add FLAGS_TO_PASS variable.
10331 (install): Remove dependency of install-only and recursively
10332 invoke make for install-only.
10333
f1048712
DE
103342010-10-04 Doug Evans <dje@google.com>
10335
10336 * Makefile.in (uninstall): Use $(DESTDIR).
10337
b53a1623
PA
103382010-09-24 Pedro Alves <pedro@codesourcery.com>
10339
e6ee044d
PA
10340 PR gdb/11842
10341
b53a1623
PA
10342 * linux-x86-low.c (compat_siginfo_from_siginfo)
10343 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10344 si_code is < 0. Check for si_code == SI_TIMER before checking for
10345 si_code < 0.
10346
fa1bd1e4
JB
103472010-09-13 Joel Brobecker <brobecker@adacore.com>
10348
10349 * lynx-i386-low.c: New file.
10350 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10351
47fac8f8
JB
103522010-09-13 Joel Brobecker <brobecker@adacore.com>
10353
10354 * lynx-low.c (ptrace_request_to_str): Remove handling for
10355 request values that have been removed in LynxOS 5.x.
10356
1adfc54d
JB
103572010-09-13 Joel Brobecker <brobecker@adacore.com>
10358
10359 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10360 <ptrace.h>
10361
c2a66c29
NS
103622010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10363
10364 * configure.ac: Add --enable-inprocess-agent option.
10365 * configure: Rebuilt.
10366
32fcada3
YQ
103672010-09-06 Yao Qi <yao@codesourcery.com>
10368
10369 * linux-low.c (linux_kill): Remove unused variable.
10370 (linux_stabilize_threads): Likewise.
10371 * server.c (start_inferior): Likewise.
10372 (queue_stop_reply_callback): Likewise.
10373 * tracepoint.c (do_action_at_tracepoint): Likewise.
10374
0cccb683
YQ
103752010-09-06 Yao Qi <yao@codesourcery.com>
10376
10377 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10378 on return.
10379
423ec54c
JK
103802010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10381
10382 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10383
12ac6819
PA
103842010-09-06 Pedro Alves <pedro@codesourcery.com>
10385
10386 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10387 "$(IPA_DEPFILES)".
10388
8ed54b31
JB
103892010-09-01 Joel Brobecker <brobecker@adacore.com>
10390
10391 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10392 gdbserver/lynx-ppc-low.c: New files.
10393 * Makefile.in (lynx_low_h): New variable.
10394 (lynx-low.o, lynx-ppc-low.o): New rules.
10395 * configure.ac: On LynxOS, link with -lnetinet.
10396 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10397 * configure: regenerate.
10398
bb0116a4
JB
103992010-09-01 Joel Brobecker <brobecker@adacore.com>
10400
10401 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10402 * configure.ac: Add check for vasprintf and vsnprintf.
10403 * configure, config.in: Regenerate.
10404 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10405
a778ab81 104062010-09-01 Joel Brobecker <brobecker@adacore.com>
10407
10408 * gdbreplay.c: Move include of alloca.h up, next to include of
10409 malloc.h.
10410 * server.h: Add include of malloc.h.
10411 * mem-break.c: Remove include of malloc.h.
10412 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10413
8b034a19 104142010-09-01 Joel Brobecker <brobecker@adacore.com>
10415
10416 * Makefile.in (memmem.o): Build with -Wno-error.
10417
104182010-09-01 Joel Brobecker <brobecker@adacore.com>
10419
10420 * utils.c (xsnprintf): Make non-static.
10421 * server.h: Add xsnprintf declaration.
10422 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10423 replace calls to snprintf by calls to xsnprintf throughout.
10424
104252010-09-01 Joel Brobecker <brobecker@adacore.com>
10426
10427 * configure.ac: Add configure check for alloca.
10428 * configure, config.in: Regenerate.
10429 * server.h: Include alloca.h if it exists.
10430 * gdbreplay.c: Include alloca.h if it exists.
10431
1a981360
PA
104322010-08-28 Pedro Alves <pedro@codesourcery.com>
10433
10434 * linux-low.c (__SIGRTMIN): Define if not already defined.
10435 (linux_create_inferior): Check for __ANDROID__ rather than
10436 __SIGRTMIN.
10437 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10438 are already deferred.
10439 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10440 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10441 stopped and already has a pending signal to report.
10442 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10443 a pending signal to report or is moving out of a jump pad.
10444 (linux_init_signals): Check for __ANDROID__ rather than
10445 __SIGRTMIN.
10446
b4d51a55
PA
104472010-08-28 Pedro Alves <pedro@codesourcery.com>
10448
10449 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10450 debug_threads check. Avoid a linear search when not doing debug
10451 output.
10452
ec48365d
PA
104532010-08-27 Pedro Alves <pedro@codesourcery.com>
10454
10455 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10456 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10457 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10458 (process_event): Change local fd's type to gdb_fildes_t.
10459 (create_file_handler): Adjust prototype.
10460 (delete_file_handler): Adjust prototype.
10461 (handle_file_event): Adjust prototype. Use pfildes.
10462 (create_file_event): Adjsut prototype.
10463 * remote-utils.c (remote_desc, listen_desc): Change type to
10464 gdb_fildes_t.
10465 * server.h: New gdb_fildes_t typedef.
10466 [USE_WIN32API]: Include winsock2.h.
10467 (delete_file_handler, add_file_handler): Adjust prototypes.
10468 (pfildes): Declare.
10469 * utils.c (pfildes): New.
10470
854d88f0
PA
104712010-08-27 Pedro Alves <pedro@codesourcery.com>
10472
10473 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10474 * configure: Regenerate.
10475
0146f85b
PA
104762010-08-27 Pedro Alves <pedro@codesourcery.com>
10477
10478 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10479 (linux_done_accessing_memory): ... this.
10480 (linux_target_ops): Adjust.
10481 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10482 * nto-low.c (nto_target_ops): Adjust comment.
10483 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10484 * spu-low.c (spu_target_ops): Adjust comment.
10485 * target.h (target_ops): Rename unprepare_to_access_memory field
10486 to done_accessing_memory.
10487 (unprepare_to_access_memory): Rename to ...
10488 (done_accessing_memory): ... this.
10489
90d74c30
PA
104902010-08-26 Pedro Alves <pedro@codesourcery.com>
10491
10492 * linux-low.c (linux_prepare_to_access_memory): New.
10493 (linux_unprepare_to_access_memory): New.
10494 (linux_target_ops): Install them.
10495 * server.c (read_memory): Rename to ...
10496 (gdb_read_memory): ... this. Use
10497 prepare_to_access_memory/prepare_to_access_memory.
10498 (write_memory): Rename to ...
10499 (gdb_write_memory): ... this. Use
10500 prepare_to_access_memory/prepare_to_access_memory.
10501 (handle_search_memory_1): Adjust.
10502 (process_serial_event): Adjust.
10503 * target.h (struct target_ops): New fields
10504 prepare_to_access_memory and unprepare_to_access_memory.
10505 (prepare_to_access_memory, unprepare_to_access_memory): New.
10506 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10507 prepare_to_access_memory/prepare_to_access_memory.
10508 * nto-low.c (nto_target_ops): Adjust.
10509 * spu-low.c (spu_target_ops): Adjust.
10510 * win32-low.c (win32_target_ops): Adjust.
10511
fd467969
PA
105122010-08-26 Pedro Alves <pedro@codesourcery.com>
10513
10514 * Makefile.in (WARN_CFLAGS): Get it from configure.
10515 (WERROR_CFLAGS): New.
10516 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10517 * configure.ac: Introduce --enable-werror, which adds -Werror to
10518 the compiler command line. Enabled by default. Disable with
10519 --disable-werror. Add -Wdeclaration-after-statement
10520 Wpointer-arith and -Wformat-nonliteral to warning flags.
10521 * configure: Regenerate.
10522
331e2f5f
PA
105232010-08-26 Pedro Alves <pedro@codesourcery.com>
10524
10525 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10526
e581f2b4
PA
105272010-08-26 Pedro Alves <pedro@codesourcery.com>
10528
10529 * gdbreplay.c (remote_error): New.
10530 (gdbchar): New.
10531 (expect): Use gdbchar. Check for error reading from GDB.
10532 Clarify sync error output.
10533 (play): Check for errors writing to GDB.
10534 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10535 * remote-utils.c (getpkt): Check for errors writing to the remote
10536 descriptor.
10537
3c11dd79
PA
105382010-08-25 Pedro Alves <pedro@codesourcery.com>
10539
10540 * linux-low.c (linux_wait_1): Move non-debugging code out of
10541 `debug_threads' control.
10542
d20a8ad9
PA
105432010-08-25 Pedro Alves <pedro@codesourcery.com>
10544
10545 * linux-low.c (linux_wait_1): Don't set last_status here.
10546 * server.c (push_event, queue_stop_reply_callback): Assert we're
10547 not pushing a TARGET_WAITKIND_IGNORE event.
10548 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10549 (myresume, handle_target_event): Set the thread's last_resume_kind
10550 and last_status from the target returned status.
10551
964e4306
PA
105522010-08-25 Pedro Alves <pedro@codesourcery.com>
10553
10554 PR threads/10729
10555
10556 * linux-x86-low.c (update_debug_registers_callback): New.
10557 (i386_dr_low_set_addr): Use it.
10558 (i386_dr_low_get_addr): New.
10559 (i386_dr_low_set_control): Use update_debug_registers_callback.
10560 (i386_dr_low_get_control): New.
10561 (i386_dr_low_get_status): Adjust.
10562 * linux-low.c (linux_stop_lwp): New.
10563 * linux-low.h (linux_stop_lwp): Declare.
10564
10565 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10566 argument instead of a i386_debug_reg_state.
10567 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10568 a i386_debug_reg_state.
10569 (i386_insert_aligned_watchpoint): Adjust.
10570 (i386_remove_aligned_watchpoint): Adjust.
10571 (i386_low_stopped_data_address): Read the debug registers from the
10572 inferior instead of from the mirrors.
10573 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10574 (i386_dr_low_get_addr): Declare.
10575 (i386_dr_low_get_control): Declare.
10576 (i386_dr_low_get_status): Change prototype.
10577
10578 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10579 (i386_dr_low_get_addr): New.
10580 (i386_dr_low_get_control): New.
10581 (i386_dr_low_get_status): Adjust prototype. Return
10582 dr_status_mirror.
10583 (i386_initial_stuff): Clear dr_status_mirror and
10584 dr_control_mirror.
10585 (i386_get_thread_context): Adjust.
10586 (i386_set_thread_context): Adjust.
10587 (i386_thread_added): Adjust.
10588
5f21a75b
PA
105892010-08-24 Pedro Alves <pedro@codesourcery.com>
10590
10591 * linux-low.h (linux_thread_area): Delete declaration.
10592
3e4c1235
TS
105932010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10594
10595 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10596 after its termination.
10597
1971b033
PA
105982010-08-09 Pedro Alves <pedro@codesourcery.com>
10599
10600 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10601 (gdb_wants_all_stopped): Delete.
10602 (linux_wait_1): Don't call them.
10603 * server.c (handle_v_cont): Tag all threads as want-stopped.
10604 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10605 stopped as "client-wants-stopped".
10606
310444ac
PA
106072010-07-31 Pedro Alves <pedro@codesourcery.com>
10608
10609 * Makefile.in (signals_h): New.
10610 (server_h): Depend on it.
10611 (server.o): Don't depend on $(signals_def).
10612 (signals.o): Depend on $(signals_def).
10613
a19cae16
JK
106142010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10615
10616 * Makefile.in (signals_def): New.
10617 (server_h): Append include/gdb/signals.h and signals_def.
10618 (server.o): Append signals_def.
10619
30d50328
JK
106202010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10621
10622 * server.c (handle_target_event): Use target_signal_to_host for
10623 resume_info.sig initialization.
10624 * target.h (struct thread_resume) <sig>: New comment.
10625
5c3216e2
OS
106262010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10627
c6f46ca0
OS
10628 * server.c (handle_query): strcpy() the returned string from paddress()
10629 instead of sprintf().
5c3216e2
OS
10630 * utils.c (paddress): Return phex_nz().
10631
6bd31874
JB
106322010-07-07 Joel Brobecker <brobecker@adacore.com>
10633
10634 * server.c (handle_v_cont): Call mourn_inferior if process
10635 just exited.
10636 (myresume): Likewise.
10637
0fb4aa4b
PA
106382010-07-01 Pedro Alves <pedro@codesourcery.com>
10639
10640 Static tracepoints, and integration with UST.
10641
10642 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10643 * mem-break.c (uninsert_all_breakpoints)
10644 (reinsert_all_breakpoints): New.
10645 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10646 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10647 (gdb_agent_ust_loaded, helper_thread_id)
10648 (gdb_agent_helper_thread_id): New macros.
10649 (struct ipa_sym_addresses): Add addr_ust_loaded,
10650 addr_helper_thread_id, addr_cmd_buf.
10651 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10652 (in_process_agent_loaded_ust): New.
10653 (write_e_ust_not_loaded): New.
10654 (maybe_write_ipa_ust_not_loaded): New.
10655 (struct collect_static_trace_data_action): New.
10656 (enum tracepoint_type) <static_tracepoint>: New.
10657 (struct tracepoint) <handle>: Mention static tracepoints.
10658 (struct static_tracepoint_ctx): New.
10659 (CMD_BUF_SIZE): New.
10660 (add_tracepoint_action): Handle static tracepoint actions.
10661 (unprobe_marker_at): New.
10662 (clear_installed_tracepoints): Handle static tracepoints.
10663 (cmd_qtdp): Handle static tracepoints.
10664 (probe_marker_at): New.
10665 (cmd_qtstart): Handle static tracepoints.
10666 (response_tracepoint): Handle static tracepoints.
10667 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10668 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10669 (get_context_regcache): Handle static tracepoints.
10670 (do_action_at_tracepoint): Handle static tracepoint actions.
10671 (traceframe_find_block_type): Handle static trace data blocks.
10672 (traceframe_read_sdata): New.
10673 (download_tracepoints): Download static tracepoint actions.
10674 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10675 (GDB_PROBE_NAME): New.
10676 (ust_ops): New.
10677 (GET_UST_SYM): New.
10678 (USTF): New.
10679 (dlsym_ust): New.
10680 (ust_marker_to_static_tracepoint): New.
10681 (gdb_probe): New.
10682 (collect_ust_data_at_tracepoint): New.
10683 (gdb_ust_probe): New.
10684 (UNIX_PATH_MAX, SOCK_DIR): New.
10685 (gdb_ust_connect_sync_socket): New.
10686 (resume_thread, stop_thread): New.
10687 (run_inferior_command): New.
10688 (init_named_socket): New.
10689 (gdb_ust_socket_init): New.
10690 (cstr_to_hexstr): New.
10691 (next_st): New.
10692 (first_marker, next_marker): New.
10693 (response_ust_marker): New.
10694 (cmd_qtfstm, cmd_qtsstm): New.
10695 (unprobe_marker_at, probe_marker_at): New.
10696 (cmd_qtstmat, gdb_ust_thread): New.
10697 (gdb_ust_init): New.
10698 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10699 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10700 (ST_REGENTRY): New.
10701 (x86_64_st_collect_regmap): New.
10702 (X86_64_NUM_ST_COLLECT_GREGS): New.
10703 (AMD64_RIP_REGNUM): New.
10704 (supply_static_tracepoint_registers): New.
10705 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10706 (ST_REGENTRY): New.
10707 (i386_st_collect_regmap): New.
10708 (i386_NUM_ST_COLLECT_GREGS): New.
10709 (supply_static_tracepoint_registers): New.
10710 * server.c (handle_query): Handle qXfer:statictrace:read.
10711 <qSupported>: Report support for StaticTracepoints, and
10712 qXfer:statictrace:read features.
10713 * server.h (traceframe_read_sdata)
10714 (supply_static_tracepoint_registers): Declare.
10715 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10716 (unpack_varlen_hex): Include in IPA build.
10717 * Makefile.in (ustlibs, ustinc): New.
10718 (IPA_OBJS): Add remote-utils-ipa.o.
10719 ($(IPA_LIB)): Link -ldl and -lpthread.
10720 (UST_CFLAGS): New.
10721 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10722 * config.in, configure: Regenerate.
10723
9e4344e5
PA
107242010-06-20 Ian Lance Taylor <iant@google.com>
10725 Pedro Alves <pedro@codesourcery.com>
10726
10727 * linux-x86-low.c (always_true): Delete.
10728 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10729 trying to fool the compiler with always_true.
10730
c6beb2cb
PA
107312010-06-20 Pedro Alves <pedro@codesourcery.com>
10732
10733 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10734 conditions in gdbserver.
10735
d2ed6730
UW
107362010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10737
10738 * spu-low.c (spu_read_memory): Wrap around local store limit.
10739 (spu_write_memory): Likewise.
10740
4e29fb54
PA
107412010-06-15 Pedro Alves <pedro@codesourcery.com>
10742
10743 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10744 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10745 LONGEST uses.
10746 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10747 uses.
10748 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10749 uses with LONGEST uses.
10750
6a271cae
PA
107512010-06-14 Stan Shebs <stan@codesourcery.com>
10752 Pedro Alves <pedro@codesourcery.com>
10753
10754 Bytecode compiler.
10755
10756 * linux-x86-low.c: Include limits.h.
10757 (add_insns): New.
10758 (always_true): New.
10759 (EMIT_ASM): New.
10760 (EMIT_ASM32): New.
10761 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10762 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10763 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10764 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10765 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10766 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10767 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10768 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10769 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10770 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10771 (amd64_emit_void_call_2): New.
10772 (amd64_emit_ops): New.
10773 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10774 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10775 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10776 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10777 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10778 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10779 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10780 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10781 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10782 (i386_emit_stack_adjust, i386_emit_int_call_1)
10783 (i386_emit_void_call_2): New.
10784 (i386_emit_ops): New.
10785 (x86_emit_ops): New.
10786 (the_low_target): Install x86_emit_ops.
10787 * server.h (struct emit_ops): New.
10788 (get_raw_reg_func_addr): Declare.
10789 (current_insn_ptr, emit_error): Declare.
10790 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10791 (set_trace_state_variable_value): New defines.
10792 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10793 addr_get_trace_state_variable_value and
10794 addr_set_trace_state_variable_value.
10795 (symbol_list): New fields for get_raw_reg,
10796 get_trace_state_variable_value and set_trace_state_variable_value.
10797 (condfn): New typedef.
10798 (struct tracepoint): New field `compiled_cond'.
10799 (do_action_at_tracepoint): Clear compiled_cond.
10800 (get_trace_state_variable_value, set_trace_state_variable_value):
10801 Export in the IPA.
10802 (condition_true_at_tracepoint): If there's a compiled condition,
10803 run that.
10804 (current_insn_ptr, emit_error): New globals.
10805 (struct bytecode_address): New.
10806 (get_raw_reg_func_addr): New.
10807 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10808 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10809 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10810 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10811 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10812 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10813 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10814 (compile_tracepoint_condition, compile_bytecodes): New.
10815 * target.h (emit_ops): Forward declare.
10816 (struct target_ops): New field emit_ops.
10817 (target_emit_ops): New.
10818 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10819 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10820 * linux-low.c (linux_emit_ops): New.
10821 (linux_target_ops): Install it.
10822 * linux-low.h (struct linux_target_ops): New field emit_ops.
10823
92b72907
UW
108242010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10825
10826 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10827 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10828
fa593d66
PA
108292010-06-01 Pedro Alves <pedro@codesourcery.com>
10830 Stan Shebs <stan@codesourcery.com>
10831
10832 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10833 (all): Depend on $(extra_libraries).
10834 (install-only): Install the IPA.
10835 (IPA_OBJS, IPA_LIB): New.
10836 (clean): Remove the IPA lib.
10837 (IPAGENT_CFLAGS): New.
10838 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10839 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10840 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10841 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10842 * configure.ac: Check for atomic builtins support in the compiler.
10843 (IPA_DEPFILES, extra_libraries): Define.
10844 * configure.srv (ipa_obj): Add description.
10845 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10846 (i[34567]86-*-linux*): Set ipa_obj.
10847 (x86_64-*-linux*): Set ipa_obj.
10848 * linux-low.c (stabilizing_threads): New.
10849 (supports_fast_tracepoints): New.
10850 (linux_detach): Stabilize threads before detaching.
10851 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10852 the lwp is either not stabilizing, or is moving out of a jump pad.
10853 (linux_fast_tracepoint_collecting): New.
10854 (maybe_move_out_of_jump_pad): New.
10855 (enqueue_one_deferred_signal): New.
10856 (dequeue_one_deferred_signal): New.
10857 (linux_wait_for_event_1): If moving out of a jump pad, defer
10858 pending signals to later.
10859 (linux_stabilize_threads): New.
10860 (linux_wait_1): Check if threads need moving out of jump pads, and
10861 do it if so.
10862 (stuck_in_jump_pad_callback): New.
10863 (move_out_of_jump_pad_callback): New.
10864 (lwp_running): New.
10865 (linux_resume_one_lwp): Handle moving out of jump pads.
10866 (linux_set_resume_request): Dequeue deferred signals.
10867 (need_step_over_p): Also step over fast tracepoint jumps.
10868 (start_step_over): Also uninsert fast tracepoint jumps.
10869 (finish_step_over): Also reinsert fast tracepoint jumps.
10870 (linux_install_fast_tracepoint_jump): New.
10871 (linux_target_ops): Install linux_stabilize_threads and
10872 linux_install_fast_tracepoint_jump_pad.
10873 * linux-low.h (linux_target_ops) <get_thread_area,
10874 install_fast_tracepoint_jump_pad>: New fields.
10875 (struct lwp_info) <collecting_fast_tracepoint,
10876 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10877 (linux_get_thread_area): Declare.
10878 * linux-x86-low.c (jump_insn): New.
10879 (x86_get_thread_area): New.
10880 (append_insns): New.
10881 (push_opcode): New.
10882 (amd64_install_fast_tracepoint_jump_pad): New.
10883 (i386_install_fast_tracepoint_jump_pad): New.
10884 (x86_install_fast_tracepoint_jump_pad): New.
10885 (the_low_target): Install x86_get_thread_area and
10886 x86_install_fast_tracepoint_jump_pad.
10887 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10888 (struct fast_tracepoint_jump): New.
10889 (fast_tracepoint_jump_insn): New.
10890 (fast_tracepoint_jump_shadow): New.
10891 (find_fast_tracepoint_jump_at): New.
10892 (fast_tracepoint_jump_here): New.
10893 (delete_fast_tracepoint_jump): New.
10894 (set_fast_tracepoint_jump): New.
10895 (uninsert_fast_tracepoint_jumps_at): New.
10896 (reinsert_fast_tracepoint_jumps_at): New.
10897 (set_breakpoint_at): Use write_inferior_memory.
10898 (uninsert_raw_breakpoint): Use write_inferior_memory.
10899 (check_mem_read): Mask out fast tracepoint jumps.
10900 (check_mem_write): Mask out fast tracepoint jumps.
10901 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10902 (set_fast_tracepoint_jump): Declare.
10903 (delete_fast_tracepoint_jump)
10904 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10905 (reinsert_fast_tracepoint_jumps_at): Declare.
10906 * regcache.c: Don't compile many functions when building the
10907 in-process agent library.
10908 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10909 the register buffer in the heap.
10910 (free_register_cache): If the register buffer isn't owned by the
10911 regcache, don't free it.
10912 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10913 pre-existing register caches.
10914 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10915 type.
10916 (convert_ascii_to_int): : Constify `from' parameter type.
10917 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10918 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10919 the needed buffer in-place.
10920 (relocate_instruction): New.
10921 * server.c (handle_query) <qSymbols>: If the target supports
10922 tracepoints, give it a chance of looking up symbols. Report
10923 support for fast tracepoints.
10924 (handle_status): Stabilize threads.
10925 (process_serial_event): Adjust.
10926 * server.h (struct fast_tracepoint_jump): Forward declare.
10927 (struct process_info) <fast_tracepoint_jumps>: New field.
10928 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10929 (decode_X_packet, decode_M_packet): Adjust.
10930 (relocate_instruction): Declare.
10931 (in_process_agent_loaded): Declare.
10932 (tracepoint_look_up_symbols): Declare.
10933 (struct fast_tpoint_collect_status): Declare.
10934 (fast_tracepoint_collecting): Declare.
10935 (force_unlock_trace_buffer): Declare.
10936 (handle_tracepoint_bkpts): Declare.
10937 (initialize_low_tracepoint)
10938 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10939 * target.h (struct target_ops) <stabilize_threads,
10940 install_fast_tracepoint_jump_pad>: New fields.
10941 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10942 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10943 [HAVE_STDINT_H]: Include stdint.h.
10944 (trace_debug_1): Rename to ...
10945 (trace_vdebug): ... this.
10946 (trace_debug): Rename to ...
10947 (trace_debug_1): ... this. Add `level' parameter.
10948 (trace_debug): New.
10949 (ATTR_USED, ATTR_NOINLINE): New.
10950 (IP_AGENT_EXPORT): New.
10951 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10952 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10953 (about_to_request_buffer_space, trace_buffer_is_full)
10954 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10955 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10956 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10957 (traceframe_write_count, traceframes_created)
10958 (trace_state_variables)
10959 New renaming defines.
10960 (struct ipa_sym_addresses): New.
10961 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10962 (symbol_list): New.
10963 (ipa_sym_addrs): New.
10964 (all_tracepoint_symbols_looked_up): New.
10965 (in_process_agent_loaded): New.
10966 (write_e_ipa_not_loaded): New.
10967 (maybe_write_ipa_not_loaded): New.
10968 (tracepoint_look_up_symbols): New.
10969 (debug_threads) [IN_PROCESS_AGENT]: New.
10970 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10971 (UNKNOWN_SIDE_EFFECTS): New.
10972 (stop_tracing): New.
10973 (flush_trace_buffer): New.
10974 (stop_tracing_bkpt): New.
10975 (flush_trace_buffer_bkpt): New.
10976 (read_inferior_integer): New.
10977 (read_inferior_uinteger): New.
10978 (read_inferior_data_pointer): New.
10979 (write_inferior_data_pointer): New.
10980 (write_inferior_integer): New.
10981 (write_inferior_uinteger): New.
10982 (struct collect_static_trace_data_action): Delete.
10983 (enum tracepoint_type): New.
10984 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
10985 <actions_str, step_actions, step_actions_str>: Only include in
10986 GDBserver.
fa593d66
PA
10987 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10988 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10989 (tracepoints): Use IP_AGENT_EXPORT.
10990 (last_tracepoint): Don't include in the IPA.
10991 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10992 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10993 (alloced_trace_state_variables): New.
10994 (trace_state_variables): Use IP_AGENT_EXPORT.
10995 (traceframe_t): Delete unused variable.
10996 (circular_trace_buffer): Don't include in the IPA.
10997 (trace_buffer_start): Delete.
10998 (struct trace_buffer_control): New.
10999 (trace_buffer_free): Delete.
11000 (struct ipa_trace_buffer_control): New.
11001 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11002 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11003 New.
11004 (trace_buffer_ctrl): New.
11005 (TRACE_BUFFER_CTRL_CURR): New.
11006 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11007 Reimplement as macros.
11008 (trace_buffer_wrap): Delete.
11009 (traceframe_write_count, traceframe_read_count)
11010 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11011 (struct tracepoint_hit_ctx) <type>: New field.
11012 (struct fast_tracepoint_ctx): New.
11013 (memory_barrier): New.
11014 (cmpxchg): New.
11015 (record_tracepoint_error): Update atomically in the IPA.
11016 (clear_inferior_trace_buffer): New.
11017 (about_to_request_buffer_space): New.
11018 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11019 updating the same buffer.
11020 (add_tracepoint): Default the tracepoint's type to trap
11021 tracepoint, and orig_size to -1.
11022 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11023 internal variables.
11024 (create_trace_state_variable): New parameter `gdb'. Handle it.
11025 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11026 (cmd_qtdp): Handle fast tracepoints.
11027 (cmd_qtdv): Adjust.
11028 (max_jump_pad_size): New.
11029 (gdb_jump_pad_head): New.
11030 (get_jump_space_head): New.
11031 (claim_jump_space): New.
11032 (sort_tracepoints): New.
11033 (MAX_JUMP_SIZE): New.
11034 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11035 IPA.
11036 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11037 support. Upload fast traceframes, and delete internal IPA
11038 breakpoints.
11039 (stop_tracing_handler): New.
11040 (flush_trace_buffer_handler): New.
11041 (cmd_qtstop): Upload fast tracepoints.
11042 (response_tracepoint): Handle fast tracepoints.
11043 (tracepoint_finished_step): Upload fast traceframes. Set the
11044 tracepoint hit context's tracepoint type.
11045 (handle_tracepoint_bkpts): New.
11046 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11047 type. Add comment about fast tracepoints.
11048 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11049 non-existing action_str field.
11050 (get_context_regcache): Handle fast tracepoints.
11051 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11052 to the regcache.
11053 (fast_tracepoint_from_jump_pad_address): New.
11054 (fast_tracepoint_from_ipa_tpoint_address): New.
11055 (collecting_t): New.
11056 (force_unlock_trace_buffer): New.
11057 (fast_tracepoint_collecting): New.
11058 (collecting): New.
11059 (gdb_collect): New.
11060 (write_inferior_data_ptr): New.
11061 (target_tp_heap): New.
11062 (target_malloc): New.
11063 (download_agent_expr): New.
11064 (UALIGN): New.
11065 (download_tracepoints): New.
11066 (download_trace_state_variables): New.
11067 (upload_fast_traceframes): New.
11068 (IPA_FIRST_TRACEFRAME): New.
11069 (IPA_NEXT_TRACEFRAME_1): New.
11070 (IPA_NEXT_TRACEFRAME): New.
11071 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11072 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11073 (gdb_jump_pad_buffer_end): New.
11074 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11075 (initialize_tracepoint): Adjust.
11076 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11077 buffer. Initialize the low module.
11078 * utils.c (PREFIX, TOOLNAME): New.
11079 (malloc_failure): Use PREFIX.
11080 (error): In the IPA, an error causes an exit.
11081 (fatal, warning): Use PREFIX.
11082 (internal_error): Use TOOLNAME.
11083 (NUMCELLS): Increase to 10.
11084 * configure, config.in: Regenerate.
11085
d149dd1d
PA
110862010-06-01 Pedro Alves <pedro@codesourcery.com>
11087
11088 * server.c (handle_query) <qSupported>: Do two passes over the
11089 qSupported string to avoid nesting strtok.
11090
f6528abd
JK
110912010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11092
11093 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11094 (CDEPS): New.
11095 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11096 -Wl,--dynamic-list.
11097 * configure: Regenerate.
11098 * proc-service.list: New.
11099
ca2a87a0
JK
111002010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11101
11102 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11103 New comment.
11104
363a6e9f
OS
111052010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11106
11107 * gdbreplay.c (remote_open): Check error return from socket() call by
11108 its equality to -1 not by it being negative.
11109 * remote-utils.c (remote_open): Likewise.
11110
d23b6cb1
PA
111112010-05-23 Pedro Alves <pedro@codesourcery.com>
11112
11113 * config.h: Regenerate.
11114
28d3cf85
MK
111152010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11116
11117 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11118 doesn't provide PTRACE_GET_THREAD_AREA.
11119
fea36a59
MK
111202010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11121
11122 * linux-m68k-low.c: Include <asm/ptrace.h>
11123 (ps_get_thread_area): Implement.
11124
24b066ba
DE
111252010-05-03 Doug Evans <dje@google.com>
11126
11127 * event-loop.c (struct callback_event): New struct.
11128 (callback_list): New global.
11129 (append_callback_event, delete_callback_event): New functions.
11130 (process_callback): New function.
11131 (start_event_loop): Call it.
11132 * remote-utils.c (NOT_SCHEDULED): Define.
11133 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11134 moved out of readchar.
11135 (readchar): Rewrite. Call reschedule before returning.
11136 (reset_readchar): New function.
11137 (remote_close): Call it.
11138 (process_remaining, reschedule): New functions.
11139 * server.h (callback_handler_func): New typedef.
11140 (append_callback_event, delete_callback_event): Declare.
11141
9836d6ea
PA
111422010-05-03 Pedro Alves <pedro@codesourcery.com>
11143
11144 * proc-service.c (ps_pglobal_lookup): Use
11145 thread_db_look_up_one_symbol.
11146 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11147 parameter. Use it instead of all_symbols_looked_up.
11148 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11149 field.
11150 (all_symbols_looked_up): Don't declare.
11151 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11152 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11153 field.
11154 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11155 Set all_symbols_looked_up here.
11156 (thread_db_look_up_one_symbol): New.
11157 (thread_db_get_tls_address): Adjust.
11158 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11159 thread_db object on the heap, and tentatively set it in the
11160 process structure.
11161 (thread_db_init): Don't set all_symbols_looked_up here.
11162 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11163
7984d532
PA
111642010-05-03 Pedro Alves <pedro@codesourcery.com>
11165
11166 * linux-low.c (linux_kill, linux_detach): Adjust.
11167 (status_pending_p_callback): Remove redundant statement. Check
11168 for !TARGET_WAITIKIND_IGNORE, instead of
11169 TARGET_WAITKIND_STOPPED.
11170 (handle_tracepoints): Make sure LWP is locked. Adjust.
11171 (linux_wait_for_event_1): Adjust.
11172 (linux_cancel_breakpoints): New.
11173 (unsuspend_one_lwp): New.
11174 (unsuspend_all_lwps): New.
11175 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11176 (send_sigstop_callback): Change return type to int, add new
11177 `except' parameter and handle it.
11178 (suspend_and_send_sigstop_callback): New.
11179 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11180 pass them down. If SUSPEND, also increment the lwp's suspend
11181 count.
11182 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11183 (need_step_over_p): Don't consider suspended LWPs.
11184 (start_step_over): Adjust.
11185 (proceed_one_lwp): Change return type to int, add new `except'
11186 parameter and handle it.
11187 (unsuspend_and_proceed_one_lwp): New.
11188 (proceed_all_lwps): Use find_inferior instead of
11189 for_each_inferior.
11190 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11191 also decrement the suspend count of LWPs. Pass `except' down,
11192 instead of hacking its suspend count.
11193 (linux_pause_all): Add `freeze' parameter. Adjust.
11194 (linux_unpause_all): New.
11195 (linux_target_ops): Install linux_unpause_all.
11196 * server.c (handle_status): Adjust.
11197 * target.h (struct target_ops): New fields `unpause_all' and
11198 `cancel_breakpoints'. Add new parameter to `pause_all'.
11199 (pause_all): Add new `freeze' parameter.
11200 (unpause_all): New.
11201 (cancel_breakpoints): New.
11202 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11203 cancel breakpoints.
11204 (cmd_qtstart): Pause threads.
11205 (stop_tracing): Pause threads, and cancel breakpoints.
11206 * win32-low.c (win32_target_ops): Adjust.
11207
e471f25b
PA
112082010-05-03 Pedro Alves <pedro@codesourcery.com>
11209
11210 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11211 the inferior right away from here...
11212 (linux_wait_1): ... to here, and adjust to check the thread's
11213 last_resume_kind instead of the lwp's step or stop_expected flags.
11214
1915ef4f
PA
112152010-05-02 Pedro Alves <pedro@codesourcery.com>
11216
11217 * README: Use consistent `GDB' and `GDBserver' spellings.
11218
f9e39928
PA
112192010-05-02 Pedro Alves <pedro@codesourcery.com>
11220
11221 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11222 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11223 (linux_detach_one_lwp): Assume the lwp is stopped.
11224 (any_thread_of): Delete.
11225 (linux_detach): Stop all lwps here. Don't blindly delete all
11226 breakpoints.
11227 (delete_lwp_callback): New.
11228 (linux_mourn): Delete all lwps of the process that is gone.
11229 (linux_wait_1): Don't delete the last lwp of the process here.
11230 * mem-break.h (mark_breakpoints_out): Declare.
11231 * mem-break.c (mark_breakpoints_out): New.
11232 (free_all_breakpoints): Use it.
11233 * server.c (handle_target_event): If the process is gone, mark
11234 breakpoints out.
11235 * thread-db.c (struct thread_db) <create_bp>: New field.
11236 (thread_db_enable_reporting): Fix prototype. Store a thread event
11237 breakpoint reference in the thread_db struct.
11238 (thread_db_load_search): Clear the thread_db object.
11239 (try_thread_db_load_1): Ditto.
11240 (switch_to_process): New.
11241 (disable_thread_event_reporting): Use it.
11242 (remove_thread_event_breakpoints): New.
11243 (thread_db_detach, thread_db_mourn): Use it.
11244
1e7fc18c
PA
112452010-05-01 Pedro Alves <pedro@codesourcery.com>
11246
11247 * linux-low.c (linux_enable_event_reporting): New.
11248 (linux_wait_for_event_1, handle_extended_wait): Use it.
11249
02fc4de7
PA
112502010-04-30 Pedro Alves <pedro@codesourcery.com>
11251
11252 * linux-low.c (linux_kill_one_lwp, linux_kill)
11253 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11254 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11255 SIGSTOP even if the LWP is stopped.
11256 (send_sigstop_callback): New.
11257 (stop_all_lwps): Use send_sigstop_callback instead.
11258 (linux_resume_one_thread): Adjust.
11259 (proceed_one_lwp): Still proceed an LWP that the client has
11260 requested to stop, if we haven't reported it as stopped yet. Make
11261 sure that LWPs the client want stopped, have a pending SIGSTOP.
11262
bc3b5632
DE
112632010-04-26 Doug Evans <dje@google.com>
11264
ae1ada35
DE
11265 * server.c (handle_general_set): Make static.
11266
bc3b5632
DE
11267 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11268 Print received char after testing for error/eof instead of before.
11269 (input_interrupt): Tweak comment.
11270
65730243
DE
112712010-04-23 Doug Evans <dje@google.com>
11272
11273 * server.c (start_inferior): Print inferior argv if --debug.
11274
a8ae7dc0
AR
112752010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11276
11277 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11278 * nto-x86-low.c: Include server.h
11279
1c07cc19
PM
112802010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11281
11282 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11283 be consistent with other sources of this directory.
11284 (init_registers_amd64): Correct name of source file of this function
11285 in the comment.
11286
e0a61e09
PM
112872010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11288
11289 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11290 64-bit executables.
11291
54709339
PM
112922010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11293
11294 * win32-i386-low.c: Add 64-bit support.
11295 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11296 (init_registers_amd64): Declare.
11297 (mappings): Add 64-bit version of array.
11298 (init_windows_x86): New function.
11299 (the_low_target): Change init_arch field to init_windows_x86.
11300
e8f0053d
PM
113012010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11302
11303 * win32-low.c: Adapt to support also 64-bit architecture.
11304 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11305 (get_image_name): Use SIZE_T type for local variable `done'.
11306 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11307 (toolhelp_get_dll_name): Idem.
11308 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11309 Use uintptr_t typecast to avoid warning.
11310 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11311 (handle_exception): Use phex_nz to avoid warning.
11312 (win32_wait): Remove unused local variable `process'.
11313
c481e77e
PM
113142010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11315
11316 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11317 `amd64-avx.o'.
11318
12ea4b69
PM
113192010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11320
11321 * configure.ac: Use `ws2_32' library for srv_mingw.
11322 * configure: Regenerate.
11323 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11324 * remote-utils.c: Likewise.
11325
f6d1620c
L
113262010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11327
11328 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11329 if __x86_64__ is defined.
11330
8e642873
PM
113312010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11332
11333 * configure: Regenerate.
11334
711e434b
PM
113352010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11336
11337 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11338 * target.h (target_ops): New get_tib_address field.
11339 * win32-low.h (win32_thread_info): Add thread_local_base field.
11340 * win32-low.c (child_add_thread): Add tlb argument.
11341 Set thread_local_base field to TLB.
11342 (get_child_debug_event): Adapt to child_add_thread change.
11343 (win32_get_tib_address): New function.
11344 (win32_target_ops): Set get_tib_address field to
11345 win32_get_tib_address.
11346 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11347
505106cd
PA
113482010-04-12 Pedro Alves <pedro@codesourcery.com>
11349
505106cd
PA
11350 * linux-low.c (linux_mourn): Also remove the process.
11351 * server.c (handle_target_event): Don't remove the process here.
11352 * nto-low.c (nto_mourn): New.
11353 (nto_target_ops): Install it.
11354 * spu-low.c (spu_mourn): New.
11355 (spu_target_ops): Install it.
11356 * win32-low.c (win32_mourn): New.
11357 (win32_target_ops): Install it.
11358
e8470a06
PA
113592010-04-12 Pedro Alves <pedro@codesourcery.com>
11360
11361 * server.h (buffer_xml_printf): Remove redundant `;'.
11362
45ba0d02
PA
113632010-04-12 Pedro Alves <pedro@codesourcery.com>
11364
11365 * regcache.c (set_register_cache): Invalidate regcaches before
11366 changing the register cache layout.
11367 (regcache_invalidate_one): Allow a NULL regcache.
11368 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11369 regcaches before changing the register cache layout or the target
11370 regsets.
11371
59e04013
L
113722010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11373
11374 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11375 variable warning on Linux/x86-64.
11376
8336d594
PA
113772010-04-11 Pedro Alves <pedro@codesourcery.com>
11378
11379 GDBserver disconnected tracing support.
11380
11381 * linux-low.c (linux_remove_process): Delete.
11382 (add_lwp): Don't set last_resume_kind here.
11383 (linux_kill): Use `mourn'.
11384 (linux_detach): Use `thread_db_detach', and `mourn'.
11385 (linux_mourn): New.
11386 (linux_attach_lwp_1): Adjust comment.
11387 (linux_attach): last_resume_kind moved the thread_info; adjust.
11388 (status_pending_p_callback): Adjust.
11389 (linux_wait_for_event_1): Adjust.
11390 (count_events_callback, select_singlestep_lwp_callback)
11391 (select_event_lwp_callback, cancel_breakpoints_callback)
11392 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11393 (proceed_one_lwp): Adjust.
11394 (linux_async): Add debug output.
11395 (linux_thread_stopped): New.
11396 (linux_pause_all): New.
11397 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11398 linux_pause_all.
11399 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11400 (thread_db_free): Delete declaration.
11401 (thread_db_detach, thread_db_mourn): Declare.
11402 * thread-db.c (thread_db_init): Use thread_db_mourn.
11403 (thread_db_free): Delete, split in two.
11404 (disable_thread_event_reporting): New.
11405 (thread_db_detach): New.
11406 (thread_db_mourn): New.
11407
11408 * server.h (struct thread_info) <last_resume_kind>: New field.
11409 <attached>: Add comment.
11410 <gdb_detached>: New field.
11411 (handler_func): Change return type to int.
11412 (handle_serial_event, handle_target_event): Ditto.
11413 (gdb_connected): Declare.
11414 (tracing): Delete.
11415 (disconnected_tracing): Declare.
11416 (stop_tracing): Declare.
11417
11418 * server.c (handle_query) <qSupported>: Report support for
11419 disconnected tracing.
11420 (queue_stop_reply_callback): Account for running threads.
11421 (gdb_wants_thread_stopped): New.
11422 (gdb_wants_all_threads_stopped): New.
11423 (gdb_reattached_process): New.
11424 (handle_status): Clear the `gdb_detached' flag of all processes.
11425 In all-stop, stop all threads.
11426 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11427 (process_serial_event): If the remote connection breaks, or if an
11428 exit was forced with "monitor exit", force an event loop exit.
11429 Handle disconnected tracing on detach.
11430 (handle_serial_event): Adjust.
11431 (handle_target_event): If GDB isn't connected, forward events back
11432 to the inferior, unless the last process exited, in which case,
11433 exit gdbserver. Adjust interface.
11434
11435 * remote-utils.c (remote_open): Don't block in accept. Instead
11436 register an event loop source on the listen socket file
11437 descriptor. Refactor bits into ...
11438 (listen_desc): ... this new global.
11439 (gdb_connected): ... this new function.
11440 (enable_async_notification): ... this new function.
11441 (handle_accept_event): ... this new function.
11442 (remote_close): Clear remote_desc.
11443
11444 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11445
11446 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11447 New fields.
11448 (mourn_inferior): Define.
11449 (target_process_qsupported): Avoid the dangling else problem.
11450 (thread_stopped): Define.
11451 (pause_all): Define.
11452 (target_waitstatus_to_string): Declare.
11453 * target.c (target_waitstatus_to_string): New.
11454
11455 * tracepoint.c (tracing): Make extern.
11456 (disconnected_tracing): New.
11457 (stop_tracing): Make extern. Handle tracing stops due to GDB
11458 disconnecting.
11459 (cmd_qtdisconnected): New.
11460 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11461 (handle_tracepoint_general_set): Handle QTDisconnected.
11462
11463 * event-loop.c (event_handler_func): Change return type to int.
11464 (process_event): Bail out if the event handler wants the event
11465 loop to stop.
11466 (handle_file_event): Ditto.
11467 (start_event_loop): Bail out if the event handler wants the event
11468 loop to stop.
11469
11470 * nto-low.c (nto_target_ops): Adjust.
11471 * spu-low.c (spu_wait): Don't remove the process here.
11472 (spu_target_ops): Adjust.
11473 * win32-low.c (win32_wait): Don't remove the process here.
11474 (win32_target_ops): Adjust.
11475
5d267c4c
PA
114762010-04-11 Pedro Alves <pedro@codesourcery.com>
11477
11478 * regcache.c (realloc_register_cache): Invalidate inferior's
11479 regcache before recreating it.
11480
623ccd72
PA
114812010-04-09 Pedro Alves <pedro@codesourcery.com>
11482
11483 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11484
219f2f23
PA
114852010-04-09 Stan Shebs <stan@codesourcery.com>
11486 Pedro Alves <pedro@codesourcery.com>
11487
11488 * server.h (LONGEST): New.
11489 (struct thread_info) <while_stepping>: New field.
11490 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11491 Declare.
11492 (initialize_tracepoint, handle_tracepoint_general_set)
11493 (handle_tracepoint_query, tracepoint_finished_step)
11494 (tracepoint_was_hit, release_while_stepping_state_list):
11495 (current_traceframe): Declare.
11496 * server.c (handle_general_set): Handle tracepoint packets.
11497 (read_memory): New.
11498 (write_memory): New.
11499 (handle_search_memory_1): Use read_memory.
11500 (handle_query): Report support for conditional tracepoints, trace
11501 state variables, and tracepoint sources. Handle tracepoint
11502 queries.
11503 (main): Initialize the tracepoints module.
11504 (process_serial_event): Handle traceframe reads/writes.
11505
11506 * linux-low.c (handle_tracepoints): New.
11507 (linux_wait_1): Call it.
11508 (linux_resume_one_lwp): Handle while-stepping.
11509 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11510 (linux_target_ops): Install them.
11511 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11512 New field.
11513 * linux-x86-low.c (x86_supports_tracepoints): New.
11514 (the_low_target). Install it.
11515
11516 * mem-break.h (delete_breakpoint): Declare.
11517 * mem-break.c (delete_breakpoint): Make external.
11518
11519 * target.h (struct target_ops): Add `supports_tracepoints',
11520 `read_pc', and `write_pc' fields.
11521 (target_supports_tracepoints): Define.
11522 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11523 (phex_nz): New.
11524
11525 * regcache.h (struct regcache) <registers_owned>: New field.
11526 (init_register_cache, regcache_cpy): Declare.
11527 (regcache_read_pc, regcache_write_pc): Declare.
11528 (register_cache_size): Declare.
11529 (supply_regblock): Declare.
11530 * regcache.c (init_register_cache): New.
11531 (new_register_cache): Use it.
11532 (regcache_cpy): New.
11533 (register_cache_size): New.
11534 (supply_regblock): New.
11535 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 11536
219f2f23
PA
11537 * tracepoint.c: New.
11538
11539 * Makefile.in (OBS): Add tracepoint.o.
11540 (tracepoint.o): New rule.
11541
3a13a53b
L
115422010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11543
11544 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11545 (i386-mmx.o): New.
11546 (i386-mmx.c): Likewise.
11547 (i386-mmx-linux.o): Likewise.
11548 (i386-mmx-linux.c): Likewise.
11549
11550 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11551 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11552 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11553 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11554
11555 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11556 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11557 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11558
1570b33e
L
115592010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11560
11561 * Makefile.in (clean): Updated.
11562 (i386-avx.o): New.
11563 (i386-avx.c): Likewise.
11564 (i386-avx-linux.o): Likewise.
11565 (i386-avx-linux.c): Likewise.
11566 (amd64-avx.o): Likewise.
11567 (amd64-avx.c): Likewise.
11568 (amd64-avx-linux.o): Likewise.
11569 (amd64-avx-linux.c): Likewise.
11570
11571 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11572 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11573 (srv_amd64_regobj): Add amd64-avx.o.
11574 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11575 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11576 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11577 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11578 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11579 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11580 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11581
11582 * i387-fp.c: Include "i386-xstate.h".
11583 (i387_xsave): New.
11584 (i387_cache_to_xsave): Likewise.
11585 (i387_xsave_to_cache): Likewise.
11586 (x86_xcr0): Likewise.
11587
11588 * i387-fp.h (i387_cache_to_xsave): Likewise.
11589 (i387_xsave_to_cache): Likewise.
11590 (x86_xcr0): Likewise.
11591
11592 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11593 * linux-crisv32-low.c (target_regsets): Likewise.
11594 * linux-m68k-low.c (target_regsets): Likewise.
11595 * linux-mips-low.c (target_regsets): Likewise.
11596 * linux-ppc-low.c (target_regsets): Likewise.
11597 * linux-s390-low.c (target_regsets): Likewise.
11598 * linux-sh-low.c (target_regsets): Likewise.
11599 * linux-sparc-low.c (target_regsets): Likewise.
11600 * linux-xtensa-low.c (target_regsets): Likewise.
11601
11602 * linux-low.c: Include <sys/uio.h>.
11603 (regsets_fetch_inferior_registers): Support nt_type.
11604 (regsets_store_inferior_registers): Likewise.
11605 (linux_process_qsupported): New.
11606 (linux_target_ops): Add linux_process_qsupported.
11607
11608 * linux-low.h (regset_info): Add nt_type.
11609 (linux_target_ops): Add process_qsupported.
11610
11611 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11612 and <sys/uio.h>.
11613 (init_registers_i386_avx_linux): New.
11614 (init_registers_amd64_avx_linux): Likewise.
11615 (xmltarget_i386_linux_no_xml): Likewise.
11616 (xmltarget_amd64_linux_no_xml): Likewise.
11617 (PTRACE_GETREGSET): Likewise.
11618 (PTRACE_SETREGSET): Likewise.
11619 (x86_fill_xstateregset): Likewise.
11620 (x86_store_xstateregset): Likewise.
11621 (use_xml): Likewise.
11622 (x86_linux_update_xmltarget): Likewise.
11623 (x86_linux_process_qsupported): Likewise.
11624 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11625 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11626 init_registers_i386_linux here. Call
11627 x86_linux_update_xmltarget.
11628 (the_low_target): Add x86_linux_process_qsupported.
11629
11630 * server.c (handle_query): Call target_process_qsupported.
11631
11632 * target.h (target_ops): Add process_qsupported.
11633 (target_process_qsupported): New.
11634
fc7238bb
PA
116352010-04-03 Pedro Alves <pedro@codesourcery.com>
11636
11637 * inferiors.c (add_thread): Set last_status kind to
11638 TARGET_WAITKIND_IGNORE.
11639 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11640 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11641 (linux_wait_1): Move `thread' local definition to block that uses
11642 it. Don't NULL initialize `event_child'.
11643 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11644 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11645 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11646
bdabb078
PA
116472010-04-01 Pedro Alves <pedro@codesourcery.com>
11648
11649 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11650 an extended waitstatus, or by a watchpoint.
11651 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11652 thread was stepping or has been stopped by a watchpoint.
11653
d3bbe7a0
PA
116542010-04-01 Pedro Alves <pedro@codesourcery.com>
11655
11656 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11657 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11658 of another, then delete the previous, and validate all
11659 breakpoints.
11660 (validate_inserted_breakpoint): New.
11661 (delete_disabled_breakpoints): New.
11662 (validate_breakpoints): New.
11663 (check_mem_read): Validate breakpoints before trusting their
11664 shadow. Delete disabled breakpoints.
11665 (check_mem_write): Validate breakpoints before trusting they
11666 should be inserted. Delete disabled breakpoints.
11667 * mem-break.h (validate_breakpoints):
11668 * server.c (handle_query): Validate breakpoints when we see a
11669 qSymbol query.
11670
8b07ae33
PA
116712010-04-01 Pedro Alves <pedro@codesourcery.com>
11672
11673 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11674 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11675 if we could tell there's a GDB breakpoint at stop_pc.
11676 (need_step_over_p): Don't do a step over if we find a GDB
11677 breakpoint at the resume PC.
11678
11679 * mem-break.c (struct raw_breakpoint): New.
11680 (enum bkpt_type): New type `gdb_breakpoint'.
11681 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11682 fields. New field `raw'.
11683 (find_raw_breakpoint_at): New.
11684 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11685 breakpoint instead.
11686 (set_breakpoint_at): Adjust.
11687 (delete_raw_breakpoint): New.
11688 (release_breakpoint): New.
11689 (delete_breakpoint): Rename to...
11690 (delete_breakpoint_1): ... this. Add proc parameter. Use
11691 release_breakpoint. Return ENOENT.
11692 (delete_breakpoint): Reimplement.
11693 (find_breakpoint_at): Delete.
11694 (find_gdb_breakpoint_at): New.
11695 (delete_breakpoint_at): Delete.
11696 (set_gdb_breakpoint_at): New.
11697 (delete_gdb_breakpoint_at): New.
11698 (gdb_breakpoint_here): New.
11699 (set_reinsert_breakpoint): Use release_breakpoint.
11700 (uninsert_breakpoint): Rename to ...
11701 (uninsert_raw_breakpoint): ... this.
11702 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11703 (reinsert_raw_breakpoint): Change parameter type to
11704 raw_breakpoint.
11705 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11706 instead.
11707 (check_breakpoints): Adjust. Use release_breakpoint.
11708 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11709 (breakpoint_inserted_here): Ditto.
11710 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11711 Don't trust the breakpoint's shadow if it is not inserted.
11712 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11713 (delete_all_breakpoints): Adjust.
11714 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11715 use delete_breakpoint_1.
11716
11717 * mem-break.h (breakpoints_supported): Delete declaration.
11718 (set_gdb_breakpoint_at): Declare.
11719 (gdb_breakpoint_here): Declare.
11720 (delete_breakpoint_at): Delete.
11721 (delete_gdb_breakpoint_at): Declare.
11722
11723 * server.h (struct raw_breakpoint): Forward declare.
11724 (struct process_info): New field `raw_breakpoints'.
11725
11726 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11727 breakpoints.
11728
6bf5e0ba
PA
117292010-03-24 Pedro Alves <pedro@codesourcery.com>
11730
11731 * linux-low.c (status_pending_p_callback): Fix comment.
11732 (linux_wait_for_event_1): Move most of the internal breakpoint
11733 handling from here...
11734 (linux_wait_1): ... to here.
11735 (count_events_callback): New.
11736 (select_singlestep_lwp_callback): New.
11737 (select_event_lwp_callback): New.
11738 (cancel_breakpoints_callback): New.
11739 (select_event_lwp): New.
11740 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11741 priority to all LWPs that have had events that should be reported
11742 to the client. Cancel breakpoints when about to reporting the
11743 event to the client, not while stopping lwps. No longer cancel
11744 finished single-steps here.
11745 (cancel_finished_single_step): Delete.
11746 (cancel_finished_single_steps): Delete.
11747
414a389f
PA
117482010-03-24 Pedro Alves <pedro@codesourcery.com>
11749
11750 * mem-break.c (enum bkpt_type): New.
11751 (struct breakpoint): New field `type'.
11752 (set_breakpoint_at): Change return type to struct breakpoint
11753 pointer. Set type to `other_breakpoint' by default.
11754 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11755 in the breakpoint list.
11756 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11757 (reinsert_breakpoint): Rename to ...
11758 (reinsert_raw_breakpoint): ... this.
11759 (reinsert_breakpoints_at): Adjust.
11760 * mem-break.h (struct breakpoint): Declare.
11761 (set_breakpoint_at): Change return type to struct breakpoint
11762 pointer.
11763
2280c721
PA
117642010-03-24 Pedro Alves <pedro@codesourcery.com>
11765
11766 * server.c (handle_query): Assign, not compare.
11767
d50171e4
PA
117682010-03-24 Pedro Alves <pedro@codesourcery.com>
11769
11770 Teach linux gdbserver to step-over-breakpoints.
11771
11772 * linux-low.c (can_hardware_single_step): New.
11773 (supports_breakpoints): New.
11774 (handle_extended_wait): If stopping threads, read the stop pc of
11775 the new cloned LWP.
11776 (get_pc): New.
11777 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11778 low target doesn't support retrieving the PC.
11779 (add_lwp): Set last_resume_kind to resume_continue.
11780 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11781 (linux_attach): Don't clear stop_expected. Set the lwp's
11782 last_resume_kind to resume_stop.
11783 (linux_detach_one_lwp): Don't check for removed breakpoints.
11784 (check_removed_breakpoint): Delete.
11785 (status_pending_p): Rename to ...
11786 (status_pending_p_callback): ... this. Don't check for removed
11787 breakpoints. Don't consider threads that are stopped from GDB's
11788 perspective.
11789 (linux_wait_for_lwp): Always read the stop_pc here.
11790 (cancel_breakpoint): New.
11791 (step_over_bkpt): New global.
11792 (linux_wait_for_event_1): Implement stepping over breakpoints.
11793 (gdb_wants_lwp_stopped): New.
11794 (gdb_wants_all_stopped): New.
11795 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11796 single-step traps here. Store the thread's last reported target
11797 wait status.
11798 (send_sigstop): Don't clear stop_expected. Always set it,
11799 instead.
11800 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11801 (cancel_finished_single_step): New.
11802 (cancel_finished_single_steps): New.
11803 (wait_for_sigstop): Don't cancel finished single-step traps here.
11804 (linux_resume_one_lwp): Don't check for removed breakpoints.
11805 Don't set `step' on non-hardware step archs.
11806 (linux_set_resume_request): Ignore resume_stop requests if already
11807 stopping or stopped. Set the lwp's last_resume_kind.
11808 (resume_status_pending_p): Don't check for removed breakpoints.
11809 (need_step_over_p): New.
11810 (start_step_over): New.
11811 (finish_step_over): New.
11812 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11813 requests. Clear the thread's last reported target waitstatus.
11814 Don't use the `suspended' flag. Don't consider pending breakpoints.
11815 (linux_resume): Start a step-over if necessary.
11816 (proceed_one_lwp): New.
11817 (proceed_all_lwps): New.
11818 (unstop_all_lwps): New.
11819 * linux-low.h (struct lwp_info): Rewrite comment for the
11820 `suspended' flag. Add the `stop_pc' field. Delete the
11821 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11822 Add `'last_resume_kind' and `need_step_over' fields.
11823 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11824 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11825 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11826 (set_raw_breakpoint_at): New.
11827 (set_breakpoint_at): Rewrite to use it.
11828 (reinsert_breakpoint_handler): Delete.
11829 (set_reinsert_breakpoint): New.
11830 (reinsert_breakpoint_by_bp): Delete.
11831 (delete_reinsert_breakpoints): New.
11832 (uninsert_breakpoint): Rewrite.
11833 (uninsert_breakpoints_at): New.
11834 (reinsert_breakpoint): Rewrite.
11835 (reinsert_breakpoints_at): New.
11836 (check_breakpoints): Rewrite.
11837 (breakpoint_here): New.
11838 (breakpoint_inserted_here): New.
11839 (check_mem_read): Adjust.
11840 * mem-break.h (breakpoints_supported, breakpoint_here)
11841 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11842 (reinsert_breakpoint_by_bp): Delete declaration.
11843 (delete_reinsert_breakpoints): Declare.
11844 (reinsert_breakpoint): Delete declaration.
11845 (reinsert_breakpoints_at): Declare.
11846 (uninsert_breakpoint): Delete declaration.
11847 (uninsert_breakpoints_at): Declare.
11848 (check_breakpoints): Adjust prototype.
11849 * server.h: Adjust include order.
11850 (struct thread_info): Declare here. Add a `last_status' field.
11851
30ba68cb
MS
118522010-03-23 Michael Snyder <msnyder@vmware.com>
11853
11854 * server.c (crc32): New function.
11855 (handle_query): Add handling for 'qCRC:' request.
11856
b9a881c2
PA
118572010-03-23 Pedro Alves <pedro@codesourcery.com>
11858
11859 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11860 lwp had been stopped by a watchpoint.
11861
e92d13d5
PA
118622010-03-16 Pedro Alves <pedro@codesourcery.com>
11863
11864 * server.h (internal_error): Declare.
11865 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11866 * utils.c (internal_error): New function.
11867
64daa791
AS
118682010-03-15 Andreas Schwab <schwab@redhat.com>
11869
11870 * configure.srv: Fix typo setting srv_regobj.
11871
f52cd8cd
PA
118722010-03-15 Pedro Alves <pedro@codesourcery.com>
11873
11874 * linux-low.c (fetch_register): Avoid passing a non string literal
11875 format to `error'.
11876 (usr_store_inferior_registers): Ditto.
11877
93ae6fdc
PA
118782010-03-14 Pedro Alves <pedro@codesourcery.com>
11879
11880 * linux-low.c (linux_write_memory): Bail out early if peeking
11881 memory failed.
11882
c3adc08c
PA
118832010-03-14 Pedro Alves <pedro@codesourcery.com>
11884
11885 * linux-low.h (struct lwp_info): New fields
11886 `stopped_by_watchpoint' and `stopped_data_address'.
11887 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11888 here, and cache them in the lwp object.
11889 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11890 directly.
11891 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11892 field.
11893 (linux_stopped_by_watchpoint): Rewrite.
11894 (linux_stopped_data_address): Rewrite.
11895
bce522a2
PA
118962010-03-06 Simo Melenius <simo.melenius@iki.fi>
11897
11898 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11899 switching the current inferior, not before.
11900
90884b2b
L
119012010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11902
11903 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11904 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11905 i386-linux.c and amd64-linux.c.
11906 (reg-i386.o): Removed.
11907 (reg-i386.c): Likewise.
11908 (reg-i386-linux.o): Likewise.
11909 (reg-i386-linux.c): Likewise.
11910 (reg-x86-64.o): Likewise.
11911 (reg-x86-64.c): Likewise.
11912 (reg-x86-64-linux.o): Likewise.
11913 (reg-x86-64-linux.c): Likewise.
11914 (i386.o): New.
11915 (i386.c): Likewise.
11916 (i386-linux.o): Likewise.
11917 (i386-linux.c): Likewise.
11918 (amd64.o): Likewise.
11919 (amd64.c): Likewise.
11920 (amd64-linux.o): Likewise.
11921 (amd64-linux.c): Likewise.
11922
11923 * configure.srv (srv_i386_regobj): New.
11924 (srv_i386_linux_regobj): Likewise.
11925 (srv_amd64_regobj): Likewise.
11926 (srv_amd64_linux_regobj): Likewise.
11927 (srv_i386_32bit_xmlfiles): Likewise.
11928 (srv_i386_64bit_xmlfiles): Likewise.
11929 (srv_i386_xmlfiles): Likewise.
11930 (srv_amd64_xmlfiles): Likewise.
11931 (srv_i386_linux_xmlfiles): Likewise.
11932 (srv_amd64_linux_xmlfiles): Likewise.
11933 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11934 srv_xmlfiles to $srv_i386_xmlfiles.
11935 (i[34567]86-*-mingw32ce*): Likewise.
11936 (i[34567]86-*-mingw*): Likewise.
11937 (i[34567]86-*-nto*): Likewise.
11938 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11939 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11940 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11941 (x86_64-*-linux*): Likewise.
11942
11943 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11944 (init_registers_amd64_linux): New.
11945 (x86_arch_setup): Replace init_registers_x86_64_linux with
11946 init_registers_amd64_linux.
11947
193f13e6
MK
119482010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11949
11950 * configure.ac: Check for libdl. If it is not available link against
11951 static libthread_db.
11952 * configure: Regenerate.
11953
85d721b8
PA
119542010-02-22 Pedro Alves <pedro@codesourcery.com>
11955
11956 PR9605
11957
11958 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11959 handing a read watchpoint.
11960 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11961
6076632b
DE
119622010-02-12 Doug Evans <dje@google.com>
11963
11964 * linux-low.c (linux_supports_tracefork_flag): Document.
11965 (linux_look_up_symbols): Add comment.
11966
3327ccf7
L
119672010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11968
11969 * regcache.c (supply_register): Clear regcache if buf is NULL.
11970
0718675c 119712010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 11972 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
11973
11974 * inferiors.c (find_inferior): Add function documentation.
11975 (unloaded_dll): Handle the case where the unloaded dll has not
11976 been previously registered in the dll list.
11977
177321bd
DJ
119782010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11979
11980 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11981 (thumb2_breakpoint): New.
11982 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11983
2b009048
DJ
119842010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11985
11986 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11987 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11988 breakpoints.
11989
3be029c7
PA
119902010-01-21 Pedro Alves <pedro@codesourcery.com>
11991
11992 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11993
18f5de3b
JK
119942010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11995
11996 * linux-s390-low.c (s390_collect_ptrace_register)
11997 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11998
3743bb4f
DE
119992010-01-21 Doug Evans <dje@google.com>
12000
14ce3065
DE
12001 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12002 (PTRACE_ARG4_TYPE): New macro.
12003 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12004 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12005 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12006 (usr_store_inferior_registers): Ditto.
12007 (linux_read_memory, linux_write_memory): Ditto.
12008 (linux_test_for_tracefork): Ditto.
12009
3743bb4f
DE
12010 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12011 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12012
8b315be5
PA
120132010-01-21 Pedro Alves <pedro@codesourcery.com>
12014
12015 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12016 target.
12017
85492558
PA
120182010-01-21 Pedro Alves <pedro@codesourcery.com>
12019
12020 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12021 prototype to take a regcache. Adjust.
12022
442ea881
PA
120232010-01-20 Pedro Alves <pedro@codesourcery.com>
12024
12025 * regcache.h (struct thread_info): Forward declare.
12026 (struct regcache): New.
12027 (new_register_cache): Adjust prototype.
12028 (get_thread_regcache): Declare.
12029 (free_register_cache): Adjust prototype.
12030 (registers_to_string, registers_from_string): Ditto.
12031 (supply_register, supply_register_by_name, collect_register)
12032 (collect_register_as_string, collect_register_by_name): Ditto.
12033 * regcache.c (struct inferior_regcache_data): Delete.
12034 (get_regcache): Rename to ...
12035 (get_thread_regcache): ... this. Adjust. Switch inferior before
12036 fetching registers.
12037 (regcache_invalidate_one): Adjust.
12038 (regcache_invalidate): Fix prototype.
12039 (new_register_cache): Return the new register cache.
12040 (free_register_cache): Change prototype.
12041 (realloc_register_cache): Adjust.
12042 (registers_to_string): Change prototype to take a regcache. Adjust.
12043 (registers_from_string): Ditto.
12044 (register_data): Ditto.
12045 (supply_register): Ditto.
12046 (supply_register_by_name): Ditto.
12047 (collect_register): Ditto.
12048 (collect_register_as_string): Ditto.
12049 (collect_register_by_name): Ditto.
12050 * server.c (process_serial_event): Adjust.
12051 * linux-low.h (regset_fill_func, regset_store_func): Change
12052 prototype.
12053 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12054 Change prototype.
12055 * linux-low.c (get_stop_pc): Adjust.
12056 (check_removed_breakpoint): Adjust.
12057 (linux_wait_for_event): Adjust.
12058 (linux_resume_one_lwp): Adjust.
12059 (fetch_register): Add regcache parameter. Adjust.
12060 (usr_store_inferior_registers): Ditto.
12061 (regsets_fetch_inferior_registers): Ditto.
12062 (regsets_store_inferior_registers): Ditto.
12063 (linux_fetch_registers, linux_store_registers): Ditto.
12064 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12065 regcache. Adjust.
43aaf8b6
PA
12066 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12067 Ditto.
442ea881
PA
12068 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12069 prototype to take a regcache.
12070 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12071 * remote-utils.c (convert_ascii_to_int, outreg)
12072 (prepare_resume_reply): Change prototype to take a regcache.
12073 Adjust.
12074 * target.h (struct target_ops) <fetch_registers, store_registers>:
12075 Change prototype to take a regcache.
12076 (fetch_inferior_registers, store_inferior_registers): Change
12077 prototype to take a regcache. Adjust.
12078 * proc-service.c (ps_lgetregs): Adjust.
12079 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12080 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12081 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12082 take a regcache. Adjust.
12083 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12084 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12085 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12086 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12087 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12088 (cris_cannot_fetch_register):
12089 (cris_breakpoint_at): Change prototype to take a regcache.
12090 Adjust.
12091 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12092 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12093 to take a regcache. Adjust.
12094 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12095 Adjust.
12096 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12097 take a regcache. Adjust.
12098 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12099 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12100 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12101 * linux-mips-low.c (mips_get_pc):
12102 (mips_set_pc): Change prototype to take a regcache. Adjust.
12103 (mips_reinsert_addr): Adjust.
12104 (mips_collect_register): Change prototype to take a regcache.
12105 Adjust.
12106 (mips_supply_register):
12107 (mips_collect_register_32bit, mips_supply_register_32bit)
12108 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12109 (mips_store_fpregset): Ditto.
43aaf8b6
PA
12110 * linux-ppc-low.c (ppc_supply_ptrace_register)
12111 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
12112 (parse_spufs_run): Adjust.
12113 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12114 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12115 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12116 take a regcache. Adjust.
12117 * linux-s390-low.c (s390_collect_ptrace_register)
12118 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12119 (s390_set_pc): Change prototype to take a regcache. Adjust.
12120 (s390_arch_setup): Adjust.
12121 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12122 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12123 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12124 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12125 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12126 regcache. Adjust.
12127 (sparc_breakpoint_at): Adjust.
12128 * linux-xtensa-low.c (xtensa_fill_gregset):
12129 (xtensa_store_gregset):
12130 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12131 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12132 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12133 prototype to take a regcache. Adjust.
12134 * win32-arm-low.c (arm_fetch_inferior_register)
12135 (arm_store_inferior_register): Change prototype to take a
12136 regcache. Adjust.
12137 * win32-i386-low.c (i386_fetch_inferior_register)
12138 (i386_store_inferior_register): Change prototype to take a
12139 regcache. Adjust.
12140 * win32-low.c (child_fetch_inferior_registers)
12141 (child_store_inferior_registers): Change prototype to take a
12142 regcache. Adjust.
12143 (win32_wait): Adjust.
12144 (win32_fetch_inferior_registers): Change prototype to take a
12145 regcache. Adjust.
12146 (win32_store_inferior_registers): Adjust.
12147 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12148 store_inferior_register>: Change prototype to take a regcache.
12149
60c3d7b0
DE
121502010-01-20 Doug Evans <dje@google.com>
12151
12152 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12153 #ifdef.
12154 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 12155 (W_STOPCODE): Provide definition if missing.
60c3d7b0 12156
dc146f7c
VP
121572010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12158
12159 * linux-low.c (linux_core_of_thread): New.
12160 (compare_ints, show_process, list_threads): New.
12161 (linux_qxfer_osdata): Report threads and cores.
12162 (linux_target_op): Register linux_core_of_thread.
12163 * remote-utils.c (prepare_resume_reply): Report the core.
12164 (buffer_xml_printf): Support %d specifier.
12165 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12166 New.
12167 (handle_query): Handle qXfer:threads. Announce availability
12168 thereof.
12169 * target.h (struct target_ops): New field core_of_thread.
12170
7803799a
UW
121712010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12172
12173 * Makefile.in (clean): Remove new generated files.
12174 (reg-s390.o, reg-s390.c): Remove rules.
12175 (reg-s390x.o, reg-s390x.c): Likewise.
12176 (s390-linux32.o, s390-linux32.c): Add rules.
12177 (s390-linux64.o, s390-linux64.c): Likewise.
12178 (s390x-linux64.o, s390x-linux64.c): Likewise.
12179 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12180 * linux-s390-low.c: Include <elf.h>.
12181 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12182 (init_registers_s390): Remove prototype.
12183 (init_registers_s390x): Likewise.
12184 (init_registers_s390_linux32): Add prototype.
12185 (init_registers_s390_linux64): Likewise.
12186 (init_registers_s390x_linux64): Likewise.
12187 (s390_num_regs_3264): New define.
12188 (s390_regmap_3264): New global variable.
12189 (s390_cannot_fetch_register): Remove obsolete check.
12190 (s390_cannot_store_register): Likewise.
12191 (s390_collect_ptrace_register): Handle upper/lower register halves.
12192 (s390_supply_ptrace_register): Likewise.
12193 (s390_fill_gregset): Update to register number changes.
12194 (s390_get_hwcap): New routine.
12195 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12196 Install appropriate regmap and register set.
12197
6e7ffa39
JB
121982010-01-01 Joel Brobecker <brobecker@adacore.com>
12199
12200 * server.c (gdbserver_version): Update copyright year to 2010.
12201 * gdbreplay.c (gdbreplay_version): Likewise.
12202
957f3f49
DE
122032009-12-28 Doug Evans <dje@google.com>
12204
12205 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12206 elf/external.h. Include <elf.h> instead but only if necessary.
12207
ca5c370d
PA
122082009-12-28 Pedro Alves <pedro@codesourcery.com>
12209
12210 * linux-low.c (linux_remove_process): Remove `detaching'
12211 parameter. Don't release/detach from thread_db here.
12212 (linux_kill): Release/detach from thread_db here, ...
12213 (linux_detach): ... and here, before actually detaching.
12214 (linux_wait_1): ... and here, when a process exits.
12215 * thread-db.c (any_thread_of): New.
12216 (thread_db_free): Switch the current inferior to a thread of the
12217 passed in process.
12218
4ee62156
DE
122192009-12-21 Doug Evans <dje@google.com>
12220
d90e6a88
DE
12221 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12222
c5f62d5f
DE
12223 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12224 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12225 warning ifndef __NR_tkill. Move setting of errno there too.
12226 Delete unnecessary resetting of errno after syscall.
12227 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12228
10e86dd7
DE
12229 * configure.ac: Check for dladdr.
12230 * config.in: Regenerate.
12231 * configure: Regenerate.
12232 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12233 (try_thread_db_load): Update.
12234
4ee62156
DE
12235 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12236
00f515da
DE
122372009-12-18 Doug Evans <dje@google.com>
12238
e9464885
DE
12239 * event-loop.c: Include unistd.h if it exists.
12240
07d4f67e
DE
12241 * linux-low.c (my_waitpid): Move definition away from being in
12242 between linux_tracefork_child/linux_test_for_tracefork.
12243
00f515da
DE
12244 * gdb_proc_service.h (psaddr_t): Fix type.
12245 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12246 signature to match glibc.
12247
1de1badb
DE
122482009-12-16 Doug Evans <dje@google.com>
12249
12250 * linux-low.c (linux_read_memory): Fix argument to read.
12251
aeeb81d1
PA
122522009-11-26 Pedro Alves <pedro@codesourcery.com>
12253
12254 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12255 events, don't leave current_inferior pointing at null.
12256
10357975
PA
122572009-11-26 Pedro Alves <pedro@codesourcery.com>
12258
12259 * win32-low.c (LOG): Delete.
12260 (OUTMSG): Output to stderr.
12261 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12262 on compile time LOG macro.
12263 (win32_wait): Fix debug output.
12264
cf6e3471
PA
122652009-11-26 Pedro Alves <pedro@codesourcery.com>
12266
12267 * win32-low.c (win32_add_one_solib): If the dll name is
12268 "ntdll.dll", prepend the system directory to the dll path.
12269
0c85e18e
MK
122702009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12271
12272 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12273
9ac544ce 122742009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 12275 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
12276
12277 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12278 * configure.ac: Check for __mcoldfire__ and set
12279 gdb_cv_m68k_is_coldfire.
12280 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12281 reg-cf.o and reg-m68k.o.
12282 * configure: Regenerated.
12283
fd7dd3e6
PA
122842009-11-16 Pedro Alves <pedro@codesourcery.com>
12285
12286 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12287 Pass it to thread_db_free.
12288 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12289 proper `detaching' argument to linux_remove_process.
12290 * linux-low.h (thread_db_free): Add `detaching' parameter.
12291 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12292 to thread_db_free.
12293 (thread_db_free): Add `detaching' parameter. Only
12294 call td_ta_clear_event if detaching from process.
12295
75aa492e
MK
122962009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12297
12298 * thread-db.c (thread_db_free): Fix typo.
12299
21e1bee4
PP
123002009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12301
12302 PR gdb/10838
12303 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12304
8838b45e
NS
123052009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12306
12307 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12308 with an i686 compiler.
12309 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12310 needed.
12311 * configure: Rebuilt.
12312
8a35fb51
SL
123132009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12314
12315 PR gdb/10783
12316
12317 * server.c (handle_search_memory_1): Correct read_addr initialization
12318 in loop for searching subsequent chunks.
12319
96f15937
PP
123202009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12321
12322 * configure.ac: New --with-libthread-db option.
12323 * thread-db.c: Allow direct dependence on libthread_db.
12324 (thread_db_free): Adjust.
12325 * config.in: Regenerate.
12326 * configure: Likewise.
889bf7c5 12327
5f7d1694
PP
123282009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12329
12330 PR gdb/10757
12331 * thread-db.c (attach_thread): New function.
12332 (maybe_attach_thread): Return success/failure.
12333 (find_new_threads_callback): Adjust.
889bf7c5
PA
12334 (thread_db_find_new_threads): Loop until no new threads.
12335
88e3b899
PA
123362009-10-13 Pedro Alves <pedro@codesourcery.com>
12337
12338 * proc-service.c (ps_lgetregs): Formatting.
12339
cdbfd419
PP
123402009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12341
12342 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12343 * configure.ac: Adjust.
12344 * linux-low.h (struct process_info_private): Move members to struct
12345 thread_db.
12346 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12347 * linux-low.c (linux_remove_process): Adjust.
12348 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12349 * server.c (handle_query): Move code ...
12350 (handle_monitor_command): ... here. New function.
12351 * target.h (struct target_ops): New member.
12352 * thread-db.c (struct thread_db): New.
12353 (libthread_db_search_path): New variable.
12354 (thread_db_create_event, thread_db_enable_reporting)
12355 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12356 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12357 (try_thread_db_load_1, dladdr_to_soname): New functions.
12358 (try_thread_db_load, thread_db_load_search): New functions.
12359 (thread_db_init): Search for libthread_db.
12360 (thread_db_free): New function.
12361 (thread_db_handle_monitor_command): Likewise.
12362 * config.in: Regenerate.
12363 * configure: Regenerate.
889bf7c5 12364
4168d2d6
UW
123652009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12366
12367 * spu-low.c (spu_kill): Wait for inferior to terminate.
12368 Call clear_inferiors.
12369 (spu_detach): Call clear_inferiors.
12370
81ecdfbb
RW
123712009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12372
12373 * aclocal.m4: Regenerate.
12374 * config.in: Likewise.
12375 * configure: Likewise.
12376
0b9ff2c0
UW
123772009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12378
12379 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12380 (parse_spufs_run): New function.
12381 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12382 (ppc_breakpoint_at): Handle SPU breakpoints.
12383
efcbbd14
UW
123842009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12385
12386 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12387 (SPUFS_MAGIC): Define.
12388 (spu_enumerate_spu_ids): New function.
12389 (linux_qxfer_spu): New function.
12390 (linux_target_ops): Install linux_qxfer_spu.
12391
f4d9bade
UW
123922009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12393
12394 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12395 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12396 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12397 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12398 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12399 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12400 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12401 (init_registers_powerpc_cell32l): Add prototype.
12402 (init_registers_powerpc_cell64l): Likewise.
12403 (ppc_arch_setup): Detect Cell/B.E. architecture.
12404
96e946ca
RW
124052009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12406
12407 * Makefile.in (datarootdir): New variable.
12408
58d6951d
DJ
124092009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12410
12411 * linux-low.c (linux_write_memory): Update debugging output.
12412 * Makefile.in (clean): Add new descriptions.
12413 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12414 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12415 * configure.srv: Add new files for arm*-*-linux*.
12416 * linux-arm-low.c: Add new declarations.
12417 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12418 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12419 (HWCAP_VFPv3D16): New.
12420 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12421 instead of __IWMMXT__.
12422 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12423 (arm_arch_setup): New.
12424 (target_regsets): Remove #ifdef. Add VFP regset.
12425 (the_low_target): Use arm_arch_setup.
12426
12b42a12
DJ
124272009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12428
12429 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12430 the main thread again.
12431
ac8c974e
AR
124322009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12433
12434 Adding Neutrino gdbserver.
12435 * configure: Regenerated.
12436 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12437 * configure.srv (i[34567]86-*-nto*): New target.
12438 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12439 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12440 (nto_comctrl) [__QNX__]: New function.
12441 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12442
4424e0c3 124432009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
12444
12445 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12446 srv_tgtobj.
12447
912cf4ba
PA
124482009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12449 Pedro Alves <pedro@codesourcery.com>
12450
12451 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12452 don't support CONTEXT_EXTENDED_REGISTERS.
12453 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12454 (the_low_target): Install them.
12455 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12456 failing with ERROR_PIPE_NOT_CONNECTED.
12457
aa5ca48f
DE
124582009-06-30 Doug Evans <dje@google.com>
12459 Pierre Muller <muller@ics.u-strasbg.fr>
12460
12461 Add h/w watchpoint support to x86-linux, win32-i386.
12462 * Makefile.in (SFILES): Add i386-low.c
12463 (i386_low_h): Define.
12464 (i386-low.o): Add dependencies.
12465 (linux-x86-low.o): Add i386-low.h dependency.
12466 (win32-i386-low.o): Ditto.
12467 * i386-low.c: New file.
12468 * i386-low.h: New file.
12469 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12470 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12471 * linux-low.c (linux_add_process): Initialize arch_private.
12472 (linux_remove_process): Free arch_private.
12473 (add_lwp): Initialize arch_private.
12474 (delete_lwp): Free arch_private.
12475 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12476 provided.
12477 * linux-low.h (process_info_private): New member arch_private.
12478 (lwp_info): New member arch_private.
12479 (linux_target_ops): New members new_process, new_thread,
12480 prepare_to_resume.
12481 (ptid_of): New macro.
12482 * linux-x86-low.c: Include stddef.h, i386-low.h.
12483 (arch_process_info): New struct.
12484 (arch_lwp_info): New struct.
12485 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12486 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12487 (i386_dr_low_get_status): New function.
12488 (x86_insert_point, x86_remove_point): New functions.
12489 (x86_stopped_by_watchpoint): New function.
12490 (x86_stopped_data_address): New function.
12491 (x86_linux_new_process, x86_linux_new_thread): New functions.
12492 (x86_linux_prepare_to_resume): New function.
12493 (the_low_target): Add entries for insert_point, remove_point,
12494 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12495 prepare_to_resume.
12496 * server.c (debug_hw_points): New global.
12497 (monitor_show_help): Document set debug-hw-points.
12498 (handle_query): Process "set debug-hw-points".
12499 * server.h (debug_hw_points): Declare.
12500 (paddress): Declare.
12501 * utils.c (NUMCELLS, CELLSIZE): New macros.
12502 (get_sell, xsnprintf, paddress): New functions.
12503 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12504 remove_point, stopped_by_watchpoint, stopped_data_address.
12505 * win32-i386-low.c: Include i386-low.h.
12506 (debug_reg_state): Replaces dr.
12507 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12508 (i386_dr_low_get_status): New function.
12509 (i386_insert_point, i386_remove_point): New functions.
12510 (i386_stopped_by_watchpoint): New function.
12511 (i386_stopped_data_address): New function.
12512 (i386_initial_stuff): Update.
12513 (get_thread_context,set_thread_context,i386_thread_added): Update.
12514 (the_low_target): Add entries for insert_point,
12515 remove_point, stopped_by_watchpoint, stopped_data_address.
12516 * win32-low.c (win32_insert_watchpoint): New function.
12517 (win32_remove_watchpoint): New function.
12518 (win32_stopped_by_watchpoint): New function.
12519 (win32_stopped_data_address): New function.
12520 (win32_target_ops): Add entries for insert_watchpoint,
12521 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12522 * win32-low.h (win32_target_ops): New members insert_point,
12523 remove_point, stopped_by_watchpoint, stopped_data_address.
12524
d993e290
PA
125252009-06-25 Pedro Alves <pedro@codesourcery.com>
12526
12527 * server.c (process_serial_event): Re-return unsupported, not
12528 error, if the type isn't recognized. Re-allow supporting only
12529 insert or remove packets. Also call require_running for
12530 breakpoints. Add missing break statement to default case. Tidy.
12531 * target.h (struct target_ops): Rename insert_watchpoint to
12532 insert_point, and remove_watchpoint to remove_point.
12533
12534 * linux-low.h (struct linux_target_ops): Likewise.
12535 * linux-low.c (linux_insert_watchpoint): Rename to ...
12536 (linux_insert_point): ... this. Adjust.
12537 (linux_remove_watchpoint): Rename to ...
12538 (linux_remove_point): ... this. Adjust.
12539 (linux_target_ops): Adjust.
12540 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12541 (cris_insert_point): ... this.
12542 (cris_remove_watchpoint): Rename to ...
12543 (cris_remove_point): ... this.
12544 (the_low_target): Adjust.
12545
0f54c268
PM
125462009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12547
12548 * server.c (handle_v_kill): Pass signal_pid to
12549 kill_inferior if multi_process is zero.
12550
c6314022
AR
125512009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12552
12553 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12554 * target.h (target_ops): Comment for *_watchpoint to make it clear
12555 the functions can get types '0' and '1'.
12556
4463ce24
AR
125572009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12558
12559 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12560 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12561 * regcache.c (get_regcache): Likewise.
12562 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12563 * win32-low.c (child_fetch_inferior_registers): Remove check for
12564 regno 0.
12565
cf8fd78b
PA
125662009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12567 Pedro Alves <pedro@codesourcery.com>
12568
12569 * target.h (struct target_ops) <supports_multi_process>: New
12570 callback.
12571 (target_supports_multi_process): New.
12572 * server.c (handle_query): Even if GDB reports support, only
12573 enable multi-process if the target also supports it. Report
12574 multi-process support only if the target backend supports it.
12575 * linux-low.c (linux_supports_multi_process): New function.
12576 (linux_target_ops): Install it as target_supports_multi_process
12577 callback.
12578
47c0c975
DE
125792009-05-24 Doug Evans <dje@google.com>
12580
e09875d4
DE
12581 Global renaming of find_thread_pid to find_thread_ptid.
12582 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12583 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12584 All callers updated.
12585
e27d73f6
DE
12586 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12587 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12588 directly.
12589
47c0c975
DE
12590 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12591 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12592 (linux_resume_one_lwp): Ditto.
12593
2acc282a
DE
125942009-05-23 Doug Evans <dje@google.com>
12595
12596 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12597 from struct inferior_list_entry * to struct lwp_info *.
12598 All callers updated.
12599
9f1036c1
DE
126002009-05-13 Doug Evans <dje@google.com>
12601
12602 * linux-x86-low.c: Don't include assert.h.
12603 (x86_siginfo_fixup): Use fatal, not assert.
12604 (x86_arch_setup): Fix comment.
12605
d0722149
DE
126062009-05-12 Doug Evans <dje@google.com>
12607
12608 Biarch support for i386/amd64 gdbserver.
12609 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12610 Add linux-x86-low.c.
12611 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12612 (linux-x86-low.o): Add.
12613 * linux-x86-64-low.c: Delete.
12614 * linux-i386-low.c: Delete.
12615 * linux-x86-low.c: New file.
12616 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12617 linux-x86-low.o.
12618 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12619 linux-x86-low.o.
12620 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12621 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12622 (linux_child_pid_to_exec_file): New function.
12623 (elf_64_header_p, elf_64_file_p): New functions.
12624 (siginfo_fixup): New function.
12625 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12626 give target a chance to convert layout.
12627 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12628 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12629
fdeb2a12
DE
126302009-05-07 Doug Evans <dje@google.com>
12631
12632 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12633 (regsets_store_inferior_registers): Ditto.
12634
a6dbe5df
PA
126352009-05-06 Pedro Alves <pedro@codesourcery.com>
12636
12637 PR server/10048
12638
12639 * linux-low.c (must_set_ptrace_flags): Delete.
12640 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12641 of the global.
12642 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12643 `lwp->must_set_ptrace_flags' instead.
ba42693b 12644 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
12645 (linux_wait_1): ... not here.
12646
5091eb23
DE
126472009-04-30 Doug Evans <dje@google.com>
12648
9f767825
DE
12649 * inferiors.c (started_inferior_callback): New function.
12650 (attached_inferior_callback): New function.
12651 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12652 * server.c (print_started_pid, print_attached_pid): New functions.
12653 (detach_or_kill_for_exit): New function.
12654 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12655 * server.h (have_started_inferiors_p): Declare.
12656 (have_attached_inferiors_p): Declare.
12657
5091eb23
DE
12658 * inferiors.c (remove_process): Fix memory leak, free process.
12659 * linux-low.c (linux_remove_process): New function.
12660 (linux_kill): Call it instead of remove_process.
12661 (linux_detach, linux_wait_1): Ditto.
12662
155c8968
PA
126632009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12664
12665 * configure.srv: Add x86 Windows CE target.
12666
7fe519cb
UW
126672009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12668
12669 * inferiors.c (get_thread_process): Make global.
12670 * server.h (get_thread_process): Add prototype.
12671 * thread-db.c (find_one_thread): Use get_thread_process
12672 instead of current_process.
12673 (thread_db_get_tls_address): Do not crash if called when
12674 thread layer is not yet initialized.
12675
5472f405
UW
126762009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12677
12678 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12679 * spu-low.c (current_tid): Rename to ...
12680 (current_ptid): ... this.
12681 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12682 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12683 ptid_get_lwp (current_ptid) instead of current_tid.
12684 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12685 instead of current_tid. Use find_process_pid to verify pid
12686 argument is valid. Pass proper argument to remove_process.
12687 (spu_thread_alive): Compare current_ptid instead of current_tid.
12688 (spu_resume): Likewise.
12689
55ac2b99
PA
126902009-04-02 Pedro Alves <pedro@codesourcery.com>
12691
12692 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12693 variable.
12694
95954743
PA
126952009-04-01 Pedro Alves <pedro@codesourcery.com>
12696
12697 Implement the multiprocess extensions, and add linux multiprocess
12698 support.
12699
12700 * server.h (ULONGEST): Declare.
12701 (struct ptid, ptid_t): New.
12702 (minus_one_ptid, null_ptid): Declare.
12703 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12704 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12705 (struct inferior_list_entry): Change `id' type from unsigned from
12706 to ptid_t.
12707 (struct sym_cache, struct breakpoint, struct
12708 process_info_private): Forward declare.
12709 (struct process_info): Declare.
12710 (current_process): Declare.
12711 (all_processes): Declare.
12712 (initialize_inferiors): Declare.
12713 (add_thread): Adjust to use ptid_t.
12714 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12715 (add_process, remove_process, find_thread_pid): Declare.
12716 (find_inferior_id): Adjust to use ptid_t.
12717 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12718 (multi_process): Declare.
12719 (push_event): Adjust to use ptid_t.
12720 (read_ptid, write_ptid): Declare.
12721 (prepare_resume_reply): Adjust to use ptid_t.
12722 (clear_symbol_cache): Declare.
12723 * inferiors.c (all_processes): New.
12724 (null_ptid, minus_one_ptid): New.
12725 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12726 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12727 (add_thread): Change unsigned long to ptid. Remove gdb_id
12728 parameter. Adjust.
12729 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12730 (gdb_id_to_thread): Rename to ...
12731 (find_thread_pid): ... this. Change unsigned long to ptid.
12732 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12733 (loaded_dll, pull_pid_from_list): Adjust.
12734 (add_process, remove_process, find_process_pid)
12735 (get_thread_process, current_process, initialize_inferiors): New.
12736 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12737 (struct target_waitstatus) <related_pid>: Ditto.
12738 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12739 return type to int.
12740 (struct target_ops) <join>: Add `pid' argument.
12741 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12742 (struct target_ops) <wait>: Add `ptid' field. Change return type
12743 to ptid.
12744 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12745 (mywait): Add `ptid' argument. Change return type to ptid_t.
12746 (target_pid_to_str): Declare.
12747 * target.c (set_desired_inferior): Adjust to use ptids.
12748 (mywait): Add new `ptid' argument. Adjust.
12749 (target_pid_to_str): New.
12750 * mem-break.h (free_all_breakpoints): Declare.
12751 * mem-break.c (breakpoints): Delelete.
12752 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12753 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12754 to use per-process breakpoint list.
12755 (free_all_breakpoints): New.
12756 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12757 (symbol_cache, all_symbols_looked_up): Delete.
12758 (hexchars): New.
12759 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12760 read_ptid): New.
12761 (prepare_resume_reply): Change ptid argument's type from unsigned
12762 long to ptid_t. Adjust. Implement W;process and X;process.
12763 (free_sym_cache, clear_symbol_cache): New.
12764 (look_up_one_symbol): Adjust to per-process symbol cache. *
12765 * server.c (cont_thread, general_thread, step_thread): Change type
12766 to ptid_t.
12767 (attached): Delete.
12768 (multi_process): New.
12769 (last_ptid): Change type to ptid_t.
12770 (struct vstop_notif) <ptid>: Change type to ptid_t.
12771 (queue_stop_reply, push_event): Change `ptid' argument's type to
12772 ptid_t.
12773 (discard_queued_stop_replies): Add `pid' argument.
12774 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12775 changes. Don't reference the `attached' global.
12776 (attach_inferior): Adjust to mywait interface changes.
12777 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12778 features. Handle and report "multiprocess+". Handle
12779 "qAttached:PID".
12780 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12781 changes.
12782 (handle_v_kill): New.
12783 (handle_v_stopped): Adjust to use target_pid_to_str.
12784 (handle_v_requests): Allow multiple attaches and runs when
12785 multiprocess extensions are in effect. Handle "vKill".
12786 (myresume): Adjust to use ptids.
12787 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12788 (handle_status): Adjust to discard_queued_stop_replies interface
12789 change.
12790 (first_thread_of, kill_inferior_callback)
12791 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12792 (main): Call initialize_inferiors. Adjust to use ptids, killing
12793 and detaching from all inferiors. Handle multiprocess packet
12794 variants.
12795 * linux-low.h: Include gdb_proc_service.h.
12796 (struct process_info_private): New.
12797 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12798 <lwpid_of>: Use ptid_get_lwp.
12799 (get_lwp_thread): Adjust.
12800 (struct lwp_info): Add `dead' member.
12801 (find_lwp_pid): Declare.
12802 * linux-low.c (thread_db_active): Delete.
12803 (new_inferior): Adjust comment.
12804 (inferior_pid): Delete.
12805 (linux_add_process): New.
12806 (handle_extended_wait): Adjust.
12807 (add_lwp): Change unsigned long to ptid.
12808 (linux_create_inferior): Add process to processes table. Adjust
12809 to use ptids. Don't set new_inferior here.
12810 (linux_attach_lwp): Rename to ...
12811 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12812 it. Adjust to use ptids.
12813 (linux_attach_lwp): New.
12814 (linux_attach): Add process to processes table. Don't set
12815 new_inferior here.
12816 (struct counter): New.
12817 (second_thread_of_pid_p, last_thread_of_process_p): New.
12818 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12819 multiple processes.
12820 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12821 processes. Remove process from process table.
12822 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12823 to multiple processes.
12824 (any_thread_of): New.
12825 (linux_detach): Add `pid' argument, and handle it. Remove process
12826 from processes table.
12827 (linux_join): Add `pid' argument. Handle it.
12828 (linux_thread_alive): Change unsighed long argument to ptid_t.
12829 Consider dead lwps as not being alive.
12830 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12831 threads we're not interested in.
12832 (same_lwp, find_lwp_pid): New.
12833 (linux_wait_for_lwp): Change `pid' argument's type from int to
12834 ptid_t. Adjust.
12835 (linux_wait_for_event): Rename to ...
12836 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12837 from int to ptid_t. Adjust.
12838 (linux_wait_for_event): New.
12839 (linux_wait_1): Add `ptid' argument. Change return type to
12840 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12841 that exit from the process table.
12842 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12843 Adjust.
12844 (mark_lwp_dead): New.
12845 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12846 stopping all threads, mark its main lwp as dead.
12847 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12848 ptids.
12849 (fetch_register, usr_store_inferior_registers)
12850 (regsets_fetch_inferior_registers)
12851 (regsets_store_inferior_registers, linux_read_memory)
12852 (linux_write_memory): Inline `inferior_pid'.
12853 (linux_look_up_symbols): Adjust to use per-process
12854 `thread_db_active'.
12855 (linux_request_interrupt): Adjust to use ptids.
12856 (linux_read_auxv): Inline `inferior_pid'.
12857 (initialize_low): Don't reference thread_db_active.
12858 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12859 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12860 (ps_getpid): Return the pid of the current inferior.
12861 * thread-db.c (proc_handle, thread_agent): Delete.
12862 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12863 per-process data.
12864 (find_one_thread): Change argument type to ptid_t. Adjust to
12865 per-process data.
12866 (maybe_attach_thread): Adjust to per-process data and ptids.
12867 (thread_db_find_new_threads): Ditto.
12868 (thread_db_init): Ditto.
12869 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12870 processes table. Adjust to use ptids.
12871 (spu_kill, spu_detach): Adjust interface. Remove process from
12872 processes table.
12873 (spu_join, spu_thread_alive): Adjust interface.
12874 (spu_wait): Adjust interface. Remove process from processes
12875 table. Adjust to use ptids.
12876 * win32-low.c (current_inferior_tid): Delete.
12877 (current_inferior_ptid): New.
12878 (debug_event_ptid): New.
12879 (thread_rec): Take a ptid. Adjust.
12880 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12881 (child_delete_thread): Ditto.
12882 (do_initial_child_stuff): Add `attached' argument. Add process to
12883 processes table.
12884 (child_fetch_inferior_registers, child_store_inferior_registers):
12885 Adjust.
12886 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12887 (win32_attach): Pass 1 to do_initial_child_stuff.
12888 (win32_kill): Adjust interface. Remove process from processes
12889 table.
12890 (win32_detach): Ditto.
12891 (win32_join): Adjust interface.
12892 (win32_thread_alive): Take a ptid.
12893 (win32_resume): Adjust to use ptids.
12894 (get_child_debug_event): Ditto.
12895 (win32_wait): Adjust interface. Remove exiting process from
12896 processes table.
12897
bd99dc85
PA
128982009-04-01 Pedro Alves <pedro@codesourcery.com>
12899
12900 Non-stop mode support.
12901
12902 * server.h (non_stop): Declare.
12903 (gdb_client_data, handler_func): Declare.
12904 (delete_file_handler, add_file_handler, start_event_loop):
12905 Declare.
12906 (handle_serial_event, handle_target_event, push_event)
12907 (putpkt_notif): Declare.
12908 * target.h (enum resume_kind): New.
12909 (struct thread_resume): Replace `step' field by `kind' field.
12910 (TARGET_WNOHANG): Define.
12911 (struct target_ops) <wait>: Add `options' argument.
12912 <supports_non_stop, async, start_non_stop>: New fields.
12913 (target_supports_non_stop, target_async): New.
12914 (start_non_stop): Declare.
12915 (mywait): Add `options' argument.
12916 * target.c (mywait): Add `options' argument. Print child exit
12917 notifications here.
12918 (start_non_stop): New.
12919 * server.c (non_stop, own_buf, mem_buf): New globals.
12920 (struct vstop_notif): New.
12921 (notif_queue): New global.
12922 (queue_stop_reply, push_event, discard_queued_stop_replies)
12923 (send_next_stop_reply): New.
12924 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12925 interface changes.
12926 (attach_inferior): In non-stop mode, don't wait for the target
12927 here.
12928 (handle_general_set): Handle QNonStop.
12929 (handle_query): When handling qC, return the current general
12930 thread, instead of the first thread of the list.
12931 (handle_query): If the backend supports non-stop mode, include
12932 QNonStop+ in the qSupported query response.
12933 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12934 and non-stop mode.
12935 (handle_v_attach, handle_v_run): Handle non-stop mode.
12936 (handle_v_stopped): New.
12937 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12938 (myresume): Adjust to use resume_kind. Handle non-stop.
12939 (queue_stop_reply_callback): New.
12940 (handle_status): Handle non-stop mode.
12941 (main): Clear non_stop flag on reconnection. Use the event-loop.
12942 Refactor serial protocol handling from here ...
12943 (process_serial_event): ... to this new function. When GDB
12944 selects any thread, select one here. In non-stop mode, wait until
12945 GDB acks all pending events before exiting.
12946 (handle_serial_event, handle_target_event): New.
12947 * remote-utils.c (remote_open): Install remote_desc in the event
12948 loop.
12949 (remote_close): Remove remote_desc from the event loop.
12950 (putpkt_binary): Rename to...
12951 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12952 (putpkt_binary): New as wrapper around putpkt_binary_1.
12953 (putpkt_notif): New.
12954 (prepare_resume_reply): In non-stop mode, don't change the
12955 general_thread.
12956 * event-loop.c: New.
12957 * Makefile.in (OBJ): Add event-loop.o.
12958 (event-loop.o): New rule.
12959
12960 * linux-low.h (pid_of): Moved here.
12961 (lwpid_of): New.
12962 (get_lwp_thread): Use lwpid_of.
12963 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12964 * linux-low.c (pid_of): Delete.
12965 (inferior_pid): Use lwpid_of.
12966 (linux_event_pipe): New.
12967 (target_is_async_p): New.
12968 (delete_lwp): New.
12969 (handle_extended_wait): Use lwpid_of.
12970 (add_lwp): Don't set lwpid field.
12971 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12972 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12973 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12974 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12975 first. Adjust to linux_wait_for_event interface changes. Use
12976 lwpid_of.
12977 (linux_detach): Don't delete the main lwp here.
12978 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12979 (status_pending_p): Don't consider explicitly suspended lwps.
12980 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12981 pointer. Add OPTIONS argument. Change return type to int. Use
12982 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12983 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12984 pointer. Add status pointer argument. Return a pid instead of a
12985 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12986 changes. In non-stop mode, don't switch to a random thread.
12987 (linux_wait): Rename to...
12988 (linux_wait_1): ... this. Add target_options argument, and handle
12989 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12990 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12991 clean exit and signal exit code. Don't stop all threads in
12992 non-stop mode. In all-stop mode, only stop all threads when
12993 reporting a stop to GDB. Handle explicit thread stop requests.
12994 (async_file_flush, async_file_mark): New.
12995 (linux_wait): New.
12996 (send_sigstop): Use lwpid_of.
12997 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12998 interface changes. In non-stop mode, don't switch to a random
12999 thread.
13000 (linux_resume_one_lwp): Use lwpid_of.
13001 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13002 (linux_resume_one_thread): ... this. Handle resume_stop. In
13003 non-stop mode, don't look for pending flag in all threads.
13004 (resume_status_pending_p): Don't consider explicitly suspended
13005 threads.
13006 (my_waitpid): Reimplement. Emulate __WALL.
13007 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13008 Use lwpid_of.
13009 (sigchld_handler, linux_supports_non_stop, linux_async)
13010 (linux_start_non_stop): New.
13011 (linux_target_ops): Register linux_supports_non_stop, linux_async
13012 and linux_start_non_stop.
13013 (initialize_low): Install SIGCHLD handler.
13014 * thread-db.c (thread_db_create_event, find_one_thread)
13015 (thread_db_get_tls_address): Use lwpid_of.
13016 * win32-low.c (win32_detach): Adjust to use resume_kind.
13017 (win32_wait): Add `options' argument.
13018 * spu-low.c (spu_resume): Adjust to use resume_kind.
13019 (spu_wait): Add `options' argument.
13020
5b1c542e
PA
130212009-04-01 Pedro Alves <pedro@codesourcery.com>
13022
13023 Decouple target code from remote protocol.
13024
13025 * target.h (enum target_waitkind): New.
13026 (struct target_waitstatus): New.
13027 (struct target_ops) <wait>: Return an unsigned long. Take a
13028 target_waitstatus pointer instead of a char pointer.
13029 (mywait): Likewise.
13030 * target.c (mywait): Change prototype to return an unsigned long.
13031 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13032 * server.h (thread_from_wait, old_thread_from_wait): Delete
13033 declarations.
13034 (prepare_resume_reply): Change prototype to take a
13035 target_waitstatus.
13036 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13037 (last_status, last_ptid): New.
13038 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13039 pid instead of a signal.
13040 (attach_inferior): Remove "status" and "signal" parameters.
13041 Adjust.
13042 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13043 not as an address.
13044 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13045 (handle_v_requests, myresume): Remove "status" and "signal"
13046 parameters. Adjust.
13047 (handle_status): New.
13048 (main): Delete local `status'. Adjust.
13049 * remote-utils.c: Include target.h.
13050 (prepare_resume_reply): Change prototype to take a
13051 target_waitstatus. Adjust.
13052
13053 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13054 interface.
13055 * spu-low.c (spu_wait): Adjust.
13056 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13057 Delete.
13058 (win32_wait): Adjust.
13059
2bd7c093
PA
130602009-04-01 Pedro Alves <pedro@codesourcery.com>
13061
13062 * target.h (struct thread_resume): Delete leave_stopped member.
13063 (struct target_ops): Add a `n' argument to the `resume' callback.
13064 * server.c (start_inferior): Adjust.
13065 (handle_v_cont, myresume): Adjust.
13066 * linux-low.c (check_removed_breakpoint): Adjust to resume
13067 interface change, and to removed leave_stopped field.
13068 (resume_ptr): Delete.
13069 (struct thread_resume_array): New.
13070 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13071 resume interface change.
13072 (linux_continue_one_thread, linux_queue_one_thread)
13073 (resume_status_pending_p): Check if the resume field is NULL
13074 instead of checking the leave_stopped member.
13075 (linux_resume): Adjust to the target resume interface change.
13076 * spu-low.c (spu_resume): Adjust to the target resume interface
13077 change.
13078 * win32-low.c (win32_detach, win32_resume): Ditto.
13079
c35fafde
PA
130802009-04-01 Pedro Alves <pedro@codesourcery.com>
13081
13082 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13083 flag.
13084 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13085 pending.
13086 (linux_continue_one_thread): Only preserve the stepping flag if
13087 there's a pending breakpoint.
13088
0a59d50b
PA
130892009-03-31 Pedro Alves <pedro@codesourcery.com>
13090
13091 * server.c (main): After the inferior having exited, call
13092 remote_close before exiting gdbserver.
13093
f04c6d38
TJB
130942009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13095
13096 Fix size of FPSCR in Power 7 processors.
13097 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13098 (PPC_FEATURE_HAS_DFP): New #define.
13099 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13100 size of the FPSCR.
13101
78e5cee6
PA
131022009-03-23 Pedro Alves <pedro@codesourcery.com>
13103
13104 * server.c (handle_query) Whitespace and formatting.
13105
1b3f6016
PA
131062009-03-22 Pedro Alves <pedro@codesourcery.com>
13107
13108 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13109 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13110 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13111 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13112 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13113 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13114 Makefile.in, configure.ac: Fix whitespace throughout.
13115 * configure: Regenerate.
13116
a07b2135
PA
131172009-03-22 Pedro Alves <pedro@codesourcery.com>
13118
13119 * inferiors.c (find_inferior): Make it safe for the callback
13120 function to delete the currently iterated inferior.
13121
67cc2626
PA
131222009-03-22 Pedro Alves <pedro@codesourcery.com>
13123
13124 * Makefile.in (linuw_low_h): Move higher.
13125 (thread-db.o): Depend on $(linux_low_h).
13126
54a0b537
PA
131272009-03-17 Pedro Alves <pedro@codesourcery.com>
13128
13129 Rename "process" to "lwp" throughout.
13130
13131 * linux-low.c (all_processes): Rename to...
13132 (all_lwps): ... this.
13133 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13134 (add_process): Rename to ...
13135 (add_lwp): ... this. Adjust.
13136 (linux_create_inferior): Adjust.
13137 (linux_attach_lwp): Adjust.
13138 (linux_attach): Adjust.
13139 (linux_kill_one_process): Rename to ...
13140 (linux_kill_one_lwp): ... this. Adjust.
13141 (linux_kill): Adjust.
13142 (linux_detach_one_process): Rename to ...
13143 (linux_detach_one_lwp): ... this. Adjust.
13144 (linux_detach): Adjust.
13145 (check_removed_breakpoint): Adjust.
13146 (status_pending_p): Adjust.
13147 (linux_wait_for_process): Rename to ...
13148 (linux_wait_for_lwp): ... this. Adjust.
13149 (linux_wait_for_event): Adjust.
13150 (send_sigstop): Adjust.
13151 (wait_for_sigstop): Adjust.
13152 (stop_all_processes): Rename to ...
13153 (stop_all_lwps): ... this.
13154 (linux_resume_one_process): Rename to ...
13155 (linux_resume_one_lwp): ... this. Adjust.
13156 (linux_set_resume_request, linux_continue_one_thread)
13157 (linux_queue_one_thread, resume_status_pending_p)
13158 (usr_store_inferior_registers, regsets_store_inferior_registers)
13159 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13160 Adjust.
13161 * linux-low.h (get_process): Rename to ...
13162 (get_lwp): ... this. Adjust.
13163 (get_thread_process): Rename to ...
13164 (get_thread_lwp): ... this. Adjust.
13165 (get_process_thread): Rename to ...
13166 (get_lwp_thread): ... this. Adjust.
13167 (struct process_info): Rename to ...
13168 (struct lwp_info): ... this.
13169 (all_processes): Rename to ...
13170 (all_lwps): ... this.
13171 * proc-service.c (ps_lgetregs): Adjust.
13172 * thread-db.c (thread_db_create_event, find_one_thread)
13173 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13174
0b16c5cf
PA
131752009-03-14 Pedro Alves <pedro@codesourcery.com>
13176
13177 * server.c (handle_query): Handle "qAttached".
13178
32de4b9d
NS
131792009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13180
13181 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13182 GPLv3, update license URL.
13183
2aecd87f
DE
131842009-03-01 Doug Evans <dje@google.com>
13185
93efd302 13186 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
13187 (server_h): Add gdb_signals.h.
13188 (signals.o): Update.
13189 * server.h (target_signal_from_host,target_signal_to_host_p)
13190 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13191
86b1f9c5
PM
131922009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13193
13194 * remote-utils.c (getpkt): Also generate remote-debug
13195 information if noack_mode is set.
13196
4aa995e1
PA
131972009-02-06 Pedro Alves <pedro@codesourcery.com>
13198
13199 * server.c (handle_query): Report qXfer:siginfo:read and
13200 qXfer:siginfo:write as supported and handle them.
13201 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13202 * linux-low.c (linux_xfer_siginfo): New.
13203 (linux_target_ops): Set it.
13204
62709adf
PA
132052009-01-26 Pedro Alves <pedro@codesourcery.com>
13206
13207 * server.c (gdbserver_usage): Mention --remote-debug.
13208 (main): Accept '--remote-debug' switch.
13209
aef93bd7
DE
132102009-01-18 Doug Evans <dje@google.com>
13211
13212 * regcache.c (new_register_cache): No need to check result of xcalloc.
13213 * server.c (handle_search_memory): Back out calls to xmalloc,
13214 result is checked and error is returned to user upon failure.
13215 (handle_query): Ditto. Add more checks for result of malloc.
13216 (handle_v_cont): Check result of malloc, report error back to
13217 user upon failure.
13218 (handle_v_run): Ditto. Call freeargv.
13219 * server.h (freeargv): Declare.
13220 * utils.c (freeargv): New fn.
13221
54363045
DE
132222009-01-15 Doug Evans <dje@google.com>
13223
f626972c
DE
13224 * gdbreplay.c (perror_with_name): Make arg const char *.
13225 * server.h (target_signal_to_name): Make return type const char *.
0842e787 13226 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 13227 * utils.c (perror_with_name): Make arg const char *.
54363045 13228
18aae699
PA
132292009-01-14 Pedro Alves <pedro@codesourcery.com>
13230
13231 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13232 when handling a EXIT_PROCESS_DEBUG_EVENT.
13233
ff703abe
JB
132342009-01-06 Joel Brobecker <brobecker@adacore.com>
13235
13236 * gdbreplay.c (gdbreplay_version): Update copyright year.
13237 * server.c (gdbserver_version): Likewise.
13238
f21cc1a2 132392009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
13240
13241 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 13242 (handle_extended_wait): Improve comment.
0e21c1ec 13243
bca929d3
DE
132442008-12-13 Doug Evans <dje@google.com>
13245
13246 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13247 * server.h (ATTR_MALLOC): New macro.
13248 (xmalloc,xcalloc,xstrdup): Declare.
13249 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13250 * inferiors.c: Ditto.
13251 * linux-low.c: Ditto.
13252 * mem-break.c: Ditto.
13253 * regcache.c: Ditto.
13254 * remote-utils.c: Ditto.
13255 * server.c: Ditto.
13256 * target.c: Ditto.
13257 * win32-low.c: Ditto.
13258
97438e3f
DE
132592008-12-12 Doug Evans <dje@google.com>
13260
896c7fbb
DE
13261 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13262 in debugging printf.
13263
97438e3f
DE
13264 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13265
e3b886f8
DE
132662008-12-09 Doug Evans <dje@google.com>
13267
13268 * linux-low.h (struct process_info): Delete member tid, unused.
13269 * thread-db.c (find_one_thread): Update.
13270 (maybe_attach_thread): Update.
13271
07e059b5
VP
132722008-12-02 Pedro Alves <pedro@codesourcery.com>
13273
889bf7c5
PA
13274 * target.h (struct target_ops): Add qxfer_osdata member.
13275 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13276 and dirent.h.
13277 (linux_qxfer_osdata): New functions.
13278 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13279 callback.
13280 * server.c (handle_query): Handle "qXfer:osdata:read:".
13281 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13282 (buffer_xml_printf): New functions.
13283 * server.h (struct buffer): New.
13284 (buffer_grow_str, buffer_grow_str0): New macros.
13285 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13286 (buffer_xml_printf): Declare.
07e059b5 13287
4cab47ab
DE
132882008-11-24 Doug Evans <dje@google.com>
13289
13290 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13291
f142445f
DJ
132922008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13293
13294 * server.c (handle_v_run): Always use the supplied argument list.
13295
d0107bb6 132962008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 13297
d0107bb6
BW
13298 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13299 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 13300
2c4ad781
TJB
133012008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13302
13303 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13304 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13305 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13306 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13307 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13308 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13309 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13310 XML target descriptions.
13311 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13312 when inferior is running on an ISA 2.05 or later processor. Add
13313 special case to return offset for full 64-bit slot of FPSCR when
13314 in 32-bits.
13315
dfb64f85
DJ
133162008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13317
13318 * Makefile.in (SFILES, clean): Added sparc64 files.
13319 (reg-sparc64.o, reg-sparc64.c): New.
13320 * configure.srv (sparc*-*-linux*): New configuration.
13321 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13322 syscall arguments for SPARC.
13323 (regsets_store_inferior_registers): Likewise.
13324 * linux-sparc-low.c: New file.
13325
66b6e1dd
DE
133262008-10-21 Doug Evans <dje@google.com>
13327
13328 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13329 (READLINE_DIR,READLINE_DEP): Delete.
13330 (INTERNAL_CFLAGS): Update.
13331 (LINTFLAGS): Update.
13332
9b710a42
PA
133332008-10-10 Pedro Alves <pedro@codesourcery.com>
13334
13335 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13336 whole argv from the last run, not just argv[0].
13337
5822d809
PA
133382008-09-08 Pedro Alves <pedro@codesourcery.com>
13339
13340 * regcache.c (new_register_cache): Return NULL if the register
13341 cache size isn't known yet.
13342 (free_register_cache): Avoid dereferencing a NULL regcache.
13343
74aac56f
DJ
133442008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13345
13346 * configure.srv: Merge MIPS and MIPS64.
13347
400b20f5
MR
133482008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13349
13350 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13351
677c5bb1
LM
133522008-08-18 Luis Machado <luisgpm@br.ibm.com>
13353
13354 * Makefile.in: Add required vsx dependencies.
13355
13356 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13357 Declare init_registers_powerpc_vsx32l.
13358 Declare init_registers_powerpc_vsx64l.
13359 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13360 (ppc_arch_setup): Check for VSX in hwcap.
13361 (ppc_fill_vsxregset): New function.
13362 (ppc_store_vsxregset): New function.
13363 Add new VSX entry in regset_info target_regsets.
13364
13365 * configure.srv: Add new VSX dependencies.
13366
a6f3e723
SL
133672008-08-12 Pedro Alves <pedro@codesourcery.com>
13368
13369 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13370 (remote_open): Set or clear transport_is_reliable.
13371 (putpkt_binary): Don't expect acks in noack mode.
13372 (getpkt): Don't send ack/nac in noack mode.
13373 * server.c (handle_general_set): Handle QStartNoAckMode.
13374 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13375 qSupported.
13376 (main): Reset noack_mode on every connection.
13377 * server.h (noack_mode): Declare.
13378
a417dc56
RW
133792008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13380
13381 * Makefile.in (GDBREPLAY_OBS): New variable.
13382 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13383
3221518c
UW
133842008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13385 Daniel Jacobowitz <dan@codesourcery.com>
13386
13387 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13388 (usr_store_inferior_registers): Likewise.
13389 (regsets_store_inferior_registers): Likewise.
13390
ec56be1b
PA
133912008-07-31 Rolf Jansen <rj@surtec.com>
13392 Pedro Alves <pedro@codesourcery.com>
13393
13394 * configure.ac: Check for memmem declaration.
13395 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13396 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13397 (disable_packet_qfThreadInfo): Unconditionally compile.
13398 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13399 * configure, config.in: Regenerate.
13400
2fe5e3ff
DE
134012008-07-28 Doug Kwan <dougkwan@google.com>
13402
13403 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13404 (linux_write_memory): Remove declaration of errno.
13405
836acd6d
UW
134062008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13407
13408 * linux-low.c (handle_extended_wait): Do not use "status"
13409 variable uninitialized.
13410
aeba519e
PA
134112008-07-07 Pedro Alves <pedro@codesourcery.com>
13412
13413 * server.c (handle_v_attach): Inhibit reporting dll changes.
13414
db42f210
PA
134152008-06-27 Pedro Alves <pedro@codesourcery.com>
13416
13417 * remote-utils.c (prepare_resume_reply): If requested, don't
13418 output "thread:TID" in the T stop reply.
13419
13420 * server.c (disable_packet_vCont, disable_packet_Tthread)
13421 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13422 (handle_query): If requested, disable support for qC, qfThreadInfo
13423 and qsThreadInfo.
13424 (handle_v_requests): If requested, disable support for vCont.
13425 (gdbserver_show_disableable): New.
13426 (main): Handle --disable-packet and --disable-packet=LIST.
13427
13428 * server.h (disable_packet_vCont, disable_packet_Tthread)
13429 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13430
8e4c5421
CD
134312008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13432
13433 * server.c (gdbserver_usage): Mention --version.
13434
6e23a804
DJ
134352008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13436
13437 * Makefile.in (gdbreplay.o): New rule.
13438
90aa6a40
JM
134392008-06-06 Joseph Myers <joseph@codesourcery.com>
13440
13441 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13442 message, not gdbserver.
13443
c16158bc 134442008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
13445 Nathan Sidwell <nathan@codesourcery.com>
13446 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
13447
13448 * acinclude.m4: Include ../../config/acx.m4.
13449 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13450 * configure, config.in: Regenerate.
13451 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13452 * server.c (gdbserver_version): Print PKGVERSION.
13453 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13454 (main): Adjust gdbserver_usage calls.
13455 * gdbreplay.c (version, host_name): Add declarations.
13456 (gdbreplay_version, gdbreplay_usage): New.
13457 (main): Accept --version and --help options.
13458
aeb75bf5
DJ
134592008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13460
13461 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13462 (arm_breakpoint_at): Handle Thumb.
13463 (the_low_target): Add comment.
13464
76b233dd
UW
134652008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13466
13467 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13468
08388c79
DE
134692008-05-09 Doug Evans <dje@google.com>
13470
a3c83fae
DE
13471 * server.h (decode_search_memory_packet): Declare.
13472 * remote-utils.c (decode_search_memory_packet): New fn.
13473 * server.c (handle_search_memory_1): New fn.
08388c79
DE
13474 (handle_search_memory): New fn.
13475 (handle_query): Process qSearch:memory packets.
13476
bb9c3d36
UW
134772008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13478
13479 * regcache.c (registers_length): Remove.
13480 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13481 full register packet.
13482 * regcache.h (registers_length): Remove prototype.
13483 * server.h (PBUFSIZ): Define to 16384.
13484
7284e1be
UW
134852008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13486
13487 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13488 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13489 powerpc-64l.o, and powerpc-altivec64l.o.
13490 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13491 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13492 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13493 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13494 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13495 to srv_xmlfiles.
13496
13497 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13498 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13499 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13500 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13501 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13502 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13503 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13504 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13505 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13506 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13507 (clean): Update.
13508
13509 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13510 (init_registers_powerpc_32l): ... this new prototype.
13511 (init_registers_powerpc_32): Remove, replace by ...
13512 (init_registers_powerpc_altivec32l): ... this new prototype.
13513 (init_registers_powerpc_e500): Remove, replace by ...
13514 (init_registers_powerpc_e500l): ... this new prototype.
13515 (init_registers_ppc64): Remove, replace by ...
13516 (init_registers_powerpc_64l): ... this new prototype.
13517 (init_registers_powerpc_64): Remove, replace by ...
13518 (init_registers_powerpc_altivec64l): ... this new prototype.
13519 (ppc_num_regs): Set to 73.
13520 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13521 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13522 (ppc_cannot_store_register): Handle orig_r3 and trap.
13523 (ppc_arch_setup): Update init_registers_... calls.
13524 (ppc_fill_gregset): Handle orig_r3 and trap.
13525
13526 * inferiors.c (clear_inferiors): Reset current_inferior.
13527
fdc59709
PB
135282008-04-23 Paolo Bonzini <bonzini@gnu.org>
13529
889bf7c5
PA
13530 * acinclude.m4: Add override.m4.
13531 * configure: Regenerate.
fdc59709 13532
c9b2f845
UW
135332008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13534
13535 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13536 initial call to init_register_ppc64.
13537
550512b8
UW
135382008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13539
43aaf8b6
PA
13540 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13541 single powerpc*-*-linux* case.
550512b8
UW
13542 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13543
b6430ec3
UW
135442008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13545
13546 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 13547 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
13548 from reg_xmlfiles.
13549 * linux-ppc-low.c: Include <elf.h>.
13550 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13551 (ppc_hwcap): New global variable.
13552 (ppc_regmap): Remove __SPE__ #ifdef sections.
13553 (ppc_regmap_e500): New global variable.
13554 (ppc_cannot_store_register): Update __SPE__ special case.
13555 (ppc_get_hwcap): New function.
13556 (ppc_arch_setup): Use it to determine whether inferior supports
13557 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13558 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13559 Do not access registers if target does not support AltiVec.
13560 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13561 Do not access registers if target does not support SPE.
13562 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13563
52fa2412
UW
135642008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13565
13566 * linux-low.c (disabled_regsets, num_regsets): New.
13567 (use_regsets_p): Delete.
13568 (linux_wait_for_process): Clear disabled_regsets.
13569 (regsets_fetch_inferior_registers): Check and set it.
13570 (regsets_store_inferior_registers): Likewise.
13571 (linux_fetch_registers, linux_store_registers): Do not use
13572 use_regsets_p.
13573 (initialize_low): Allocate disabled_regsets.
13574
e28b3332
DJ
135752008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13576
13577 * Makefile.in (LIBOBJS): New.
13578 (OBS): Use LIBOBJS.
13579 (memmem.o): New rule.
13580 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13581 * configure: Regenerated.
13582
4536995d
UW
135832008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13584
13585 * server.c (handle_query): Never return "unsupported" for
13586 qXfer:features:read queries.
13587
221c031f
UW
135882008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13589
13590 * server.c (get_features_xml): Fix inverted condition.
13591 (handle_query): Always support qXfer:feature:read.
13592
ccd213ac
DJ
135932008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13594
13595 * server.c (wrapper_argv): New.
13596 (start_inferior): Handle wrapper_argv. If set, expect an extra
13597 trap.
13598 (gdbserver_usage): Document --wrapper.
13599 (main): Parse --wrapper.
13600
6fe305f7
UW
136012008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13602
13603 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13604 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13605 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13606 (ppc_set_pc): Likewise.
13607 (ppc_arch_setup): New function.
13608 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13609 of collect_register.
889bf7c5 13610 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 13611
5b0a002e
UW
136122008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13613
13614 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13615 instead of linux-ppc64-low.o.
13616 * linux-ppc64-low.c: Remove file.
13617 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13618 (linux-ppc64-low.o): Remove rule.
13619
13620 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13621 (init_registers_powerpc_64): Likewise.
13622 (ppc_regmap): Conditionally define depending on __powerpc64__.
13623 (ppc_cannot_store_register): Do not special-case "fpscr" when
13624 compiled on __powerpc64__.
13625 (ppc_collect_ptrace_register): New function.
13626 (ppc_supply_ptrace_register): New function.
13627 (ppc_breakpoint): Change type to "unsigned int".
13628 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13629 (the_low_target): Conditionally provide initializers for the
889bf7c5 13630 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
13631 collect_ptrace_register and supply_ptrace_register members.
13632
9b4b61c8
UW
136332008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13634
13635 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13636 * server.c (gdbserver_xmltarget): Define.
13637 (get_features_xml): Use it to replace "target.xml" and arch_string.
13638
13639 * configure.srv: Remove srv_xmltarget. Add XML files that were
13640 mentioned there to srv_xmlfiles instead. Remove conditional tests
13641 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13642 srv_xmlfiles and srv_regobj to include all possible choices.
13643 * configure.ac (srv_xmltarget): Remove.
13644 (srv_xmlfiles): Do not add "target.xml".
13645 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13646 checks for supplementary target information.
13647 * configure: Regenerate.
13648 * Makefile.in (XML_TARGET): Remove.
13649 (target.xml): Remove rule.
13650 (clean): Do not clean up target.xml.
13651 (.PRECIOUS): Do not mention target.xml.
13652
13653 * target.h (struct target_ops): Remove arch_string member.
13654 * linux-low.c (linux_arch_string): Remove.
13655 (linux_target_ops): Remove arch_string initializer.
13656 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13657 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13658 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13659 * spu-low.c (spu_arch_string): Remove.
13660 (spu_target_ops): Remove arch_string initializer.
13661 * win32-low.c (win32_arch_string): Remove.
13662 (win32_target_ops): Remove arch_string initializer.
13663 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13664 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13665 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13666
ee1a7ae4
UW
136672008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13668
13669 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13670 by collect_ptrace_register and supply_ptrace_register hooks.
13671 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13672 instead of checking for the_low_target.left_pad_xfer.
13673 (usr_store_inferior_registers): Use collect_ptrace_register callback
13674 instead of checking for the_low_target.left_pad_xfer.
13675
13676 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13677 (s390_supply_ptrace_register): Likewise.
13678 (s390_fill_gregset): Call s390_collect_ptrace_register.
13679 (the_low_target): Update.
13680
13681 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13682 (ppc_supply_ptrace_register): Likewise.
13683 (the_low_target): Update.
13684
13685 * linux-i386-low.c (the_low_target): Update.
13686 * linux-x86-64-low.c (the_low_target): Update.
13687
d61ddec4
UW
136882008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13689
13690 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13691 reg-s390.o and reg-s390x.o.
13692
13693 * linux-low.c (new_inferior): New global variable.
13694 (linux_create_inferior, linux_attach): Set it.
13695 (linux_wait_for_process): Call the_low_target.arch_setup after the
13696 target has stopped for the first time.
13697 (initialize_low): Do not call the_low_target.arch_setup.
13698
13699 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13700 (s390_set_pc): Likewise.
13701 (s390_arch_setup): New function.
13702 (the_low_target): Use s390_arch_setup as arch_setup routine.
13703
13704 * regcache.c (realloc_register_cache): New function.
13705 (set_register_cache): Call it for each existing regcache.
13706
d05b4ac3
UW
137072008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13708
13709 * server.h (init_registers): Remove prototype.
13710
13711 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13712 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13713 instead of init_registers ().
13714 * linux-arm-low.c (init_registers_arm): Add prototype.
13715 (init_registers_arm_with_iwmmxt): Likewise.
13716 (the_low_target): Add initializer for arch_setup field.
13717 * linux-cris-low.c (init_registers_cris): Add prototype.
13718 (the_low_target): Add initializer for arch_setup field.
13719 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13720 (the_low_target): Add initializer for arch_setup field.
13721 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13722 (the_low_target): Add initializer for arch_setup field.
13723 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13724 (the_low_target): Add initializer for arch_setup field.
13725 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13726 (the_low_target): Add initializer for arch_setup field.
13727 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13728 (the_low_target): Add initializer for arch_setup field.
13729 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13730 (init_registers_mips64_linux): Likewise.
13731 (the_low_target): Add initializer for arch_setup field.
13732 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13733 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13734 (the_low_target): Add initializer for arch_setup field.
13735 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13736 (init_registers_powerpc_64): Likewise.
13737 (the_low_target): Add initializer for arch_setup field.
13738 * linux-s390-low.c (init_registers_s390): Add prototype.
13739 (init_registers_s390x): Likewise.
13740 (the_low_target): Add initializer for arch_setup field.
13741 * linux-sh-low.c (init_registers_sh): Add prototype.
13742 (the_low_target): Add initializer for arch_setup field.
13743 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13744 (the_low_target): Add initializer for arch_setup field.
13745 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13746 (the_low_target): Add initializer for arch_setup field.
13747
13748 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13749 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13750 instead of init_registers ().
13751 * win32-arm-low.c (init_registers_arm): Add prototype.
13752 (the_low_target): Add initializer for arch_setup field.
13753 * win32-i386-low.c (init_registers_i386): Add prototype.
13754 (the_low_target): Add initializer for arch_setup field.
13755
13756 * spu-low.c (init_registers_spu): Add prototype.
13757 (initialize_low): Call initialie_registers_spu () instead of
13758 initialize_registers ().
13759
fd96d250
PA
137602008-02-19 Pedro Alves <pedro@codesourcery.com>
13761
13762 * server.c (handle_v_requests): When handling the vRun and vAttach
13763 packets, if already debugging a process, don't kill it. Return an
13764 error instead.
13765
d41b6bb4
DJ
137662008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13767
13768 * server.c (handle_query): Correct length check.
13769
5ac588cf
PA
137702008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13771
13772 * win32-low.c (do_initial_child_stuff): Add process handle
13773 parameter. Set current_process_handle and current_process_id from the
13774 parameters. Clear globals.
13775 (win32_create_inferior): Don't set current_process_handle and
13776 current_process_id here. Instead pass them on the call to
13777 do_initial_child_stuff.
13778 (win32_attach): Likewise.
13779 (win32_clear_inferiors): New.
13780 (win32_kill): Don't close the current process handle or the
13781 current thread handle here. Instead call win32_clear_inferiors.
13782 (win32_detach): Don't open a new handle to the process. Call
13783 win32_clear_inferiors.
13784 (win32_join): Don't rely on current_process_handle; open a new
13785 handle using the process id.
13786 (win32_wait): Call win32_clear_inferiors when the inferior process
13787 has exited.
13788
ecd7ecbc
DJ
137892008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13790
13791 * server.c (monitor_show_help): Add "exit".
13792
1525d545
MG
137932008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13794
ecd7ecbc 13795 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
13796 (clean): Add reg-xtensa.c.
13797 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
13798 * configure.srv (xtensa*-*-linux*) New target.
13799 * linux-xtensa-low.c: New.
13800 * xtensa-xtregs.c: New.
1525d545 13801
59a016f0
PA
138022008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13803
13804 * hostio.c: Don't include errno.h.
13805 (errno_to_fileio_errno): Move to hostio-errno.
13806 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13807 error number outputting to the target->hostio_last_error callback.
13808 (hostio_packet_error): Use FILEIO_EINVAL directly.
13809 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13810 calls to hostio_error.
13811 * hostio-errno.c: New.
13812 * server.h (hostio_last_error_from_errno): Declare.
13813 * target.h (target_ops): Add hostio_last_error member.
13814 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13815 as hostio_last_error handler.
889bf7c5 13816 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
13817 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13818 (wince_hostio_last_error): New functions.
13819 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13820 as hostio_last_error handler.
13821 (win32_target_ops) [!_WIN32_WCE]: Register
13822 hostio_last_error_from_errno as hostio_last_error handler.
13823 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13824 (hostio-errno.o): New rule.
13825 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13826 * configure.srv (srv_hostio_err_objs): New variable. Default to
13827 hostio-errno.o.
13828 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13829 * configure: Regenerate.
13830
2d717e4f
DJ
138312008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13832
13833 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13834 (linux_kill, linux_detach): Clean up the process list.
13835 * remote-utils.c (remote_open): Improve port number parsing.
13836 (putpkt_binary, input_interrupt): Only send interrupts if the target
13837 is running.
13838 * server.c (extended_protocol): Make static.
13839 (attached): Define earlier.
13840 (exit_requested, response_needed, program_argv): New variables.
13841 (target_running): New.
13842 (start_inferior): Clear attached here.
13843 (attach_inferior): Set attached here.
13844 (require_running): Define.
13845 (handle_query): Use require_running and target_running. Implement
13846 "monitor exit".
13847 (handle_v_attach, handle_v_run): New.
13848 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13849 (gdbserver_usage): Update.
13850 (main): Redo argument parsing. Handle --debug and --multi. Handle
13851 --attach along with other options or after the port. Save
13852 program_argv. Support no initial program. Resynchronize
13853 communication with GDB after an error. Handle "monitor exit".
13854 Use require_running and target_running. Always allow the extended
13855 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13856 restart in extended mode.
13857 * README: Refer to the GDB manual. Update --attach usage.
13858
7407e2de
AS
138592007-12-20 Andreas Schwab <schwab@suse.de>
13860
13861 * linux-low.c (STACK_SIZE): Define.
13862 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13863 (linux_test_for_tracefork): Likewise.
13864
b65d95c5
DJ
138652007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13866
13867 * linux-low.c (linux_wait_for_event): Update messages. Do not
13868 reinsert auto-delete breakpoints.
13869 * mem-break.c (struct breakpoint): Change return type of handler to
13870 int.
13871 (set_breakpoint_at): Update handler type.
13872 (reinsert_breakpoint_handler): Return 1 instead of calling
13873 delete_breakpoint.
13874 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13875 setting a new one.
13876 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13877 * mem-break.h (set_breakpoint_at): Update handler type.
13878 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13879 * win32-low.c (auto_delete_breakpoint): New.
13880 (get_child_debug_event): Use it.
13881
4e799345
DJ
138822007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13883
13884 * configure.ac: Check for pread and pwrite.
13885 * hostio.c (handle_pread): Fall back to lseek and read.
13886 (handle_pwrite): Fall back to lseek and write.
13887 * config.in, configure: Regenerated.
13888
27524b67
DJ
138892007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13890
13891 * server.c (myresume): Add own_buf argument.
13892 (main): Update calls.
13893
a20d5e98
DJ
138942007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13895
13896 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13897 * remote-utils.c (remote_open): Do not call disable_async_io.
13898 (block_async_io): Delete.
13899 (unblock_async_io): Make static.
13900 (initialize_async_io): New.
13901 * server.c (handle_v_cont): Handle async I/O here.
13902 (myresume): Likewise. Move other common resume tasks here...
13903 (main): ... from here. Call initialize_async_io. Disable async
13904 I/O before the main loop.
13905 * server.h (initialize_async_io): Declare.
13906 (block_async_io, unblock_async_io): Delete prototypes.
13907 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13908
b79d787e
DJ
139092007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13910
13911 * remote-utils.c (readchar): Allow binary data in received messages.
13912
d97903b2
PA
139132007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13914
13915 * win32-low.c (attaching): New global.
13916 (win32_create_inferior): Clear the `attaching' global.
13917 (win32_attach): Set the `attaching' global.
13918 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13919 attaching. Only set a breakpoint at the entry point if not
13920 attaching.
13921
311de423
PA
139222007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13923
13924 * server.c (main): Don't report dll events on the initial
13925 connection on attaches.
13926
6c2d16d2
PA
139272007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13928
13929 * server.c (main): Relax numerical bases supported for the pid of
13930 the --attach command line argument.
13931
5ca906e6
PA
139322007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13933
13934 * win32-low.c (win32_attach): Call OpenProcess before
13935 DebugActiveProcess, not after. Add last error output to error
13936 call.
13937
9c6c8194
PA
139382007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13939
13940 * win32-low.c (win32_get_thread_context)
13941 (win32_set_thread_context): New functions.
13942 (thread_rec): Use win32_get_thread_context.
13943 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13944 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13945 field.
13946
4d5d1aaa
PA
139472007-12-03 Leo Zayas
13948 Pedro Alves <pedro_alves@portugalmail.pt>
13949
13950 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13951 global variables.
13952 (child_add_thread): Minor cleanup.
13953 (child_continue): Resume artificially suspended threads before
13954 calling ContinueDebugEvent.
13955 (suspend_one_thread): New.
13956 (fake_breakpoint_event): New.
13957 (get_child_debug_event): Change return type to int. Check here if
13958 gdb sent an interrupt request. If a soft interrupt was requested,
13959 fake a breakpoint event. Return 0 if there is no event to handle,
13960 and 1 otherwise.
13961 (win32_wait): Don't check here if gdb sent an interrupt request.
13962 Ensure there is a valid event to handle.
13963 (win32_request_interrupt): Add soft interruption method as last
13964 resort.
13965
c436e841
PA
139662007-12-03 Leo Zayas
13967 Pedro Alves <pedro_alves@portugalmail.pt>
13968
13969 * win32-low.h (win32_thread_info): Add descriptions to the
13970 structure members. Replace `suspend_count' counter by a
13971 `suspended' flag.
13972 * win32-low.c (thread_rec): Update condition of when to get the
13973 context from the inferior. Rely on ContextFlags being set if it
13974 has already been retrieved. Only suspend the inferior thread if
13975 we haven't already. Warn if that fails.
13976 (continue_one_thread): s/suspend_count/suspended/. Only call
13977 ResumeThread once. Warn if that fails.
13978
e7b5fa67
PA
139792007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13980
13981 * win32-low.c (win32_wait): Don't read from the inferior when it
13982 has already exited.
13983
a385171d
PA
139842007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13985
13986 * Makefile.in (win32_low_h): New variable.
13987 (win32-low.o): Add dependency on $(win32_low_h).
13988 (win32-arm-low.o, win32-i386-low.o): New rules.
13989
f80c84b3
DJ
139902007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13991
13992 * hostio.c: Correct copyright year.
13993
a6b151f1
DJ
139942007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13995
13996 * Makefile.in (OBS): Add hostio.o.
13997 (hostio.o): New rule.
13998 * server.h (handle_vFile): Declare.
13999 * hostio.c: New file.
14000 * server.c (handle_v_requests): Take packet_len and new_packet_len
14001 for binary packets. Call handle_vFile.
14002 (main): Update call to handle_v_requests.
14003
f9387fc3
DJ
140042007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14005
14006 * linux-low.c: Include <sched.h>.
14007
51c2684e
DJ
140082007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14009
14010 * linux-low.c (linux_tracefork_grandchild): New.
14011 (linux_tracefork_child): Use clone.
14012 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14013
75f83163
JB
140142007-10-31 Joel Brobecker <brobecker@adacore.com>
14015
14016 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14017
da5898ce
DJ
140182007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14019
14020 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14021
24a09b5f
DJ
140222007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14023
14024 * inferiors.c (change_inferior_id): Delete.
14025 (add_pid_to_list, pull_pid_from_list): New.
14026 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14027 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14028 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14029 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14030 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14031 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14032 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14033 (using_threads): Always set to 1.
14034 (handle_extended_wait): New.
14035 (add_process): Do not set TID.
14036 (linux_create_inferior): Set must_set_ptrace_flags.
14037 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14038 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14039 (linux_thread_alive): Rename TID argument to LWPID.
14040 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14041 (linux_wait_for_event): Do not use TID or check using_threads. Update
14042 call to dead_thread_notify. Call handle_extended_wait.
14043 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14044 (send_sigstop): Delete sigstop_sent.
14045 (wait_for_sigstop): Avoid TID.
14046 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14047 (linux_test_for_tracefork): New.
14048 (linux_lookup_signals): Use thread_db_active and
14049 linux_supports_tracefork_flag.
14050 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14051 * linux-low.h (get_process_thread): Avoid TID.
14052 (struct process_ifo): Move thread_known and tid to the end. Remove
14053 sigstop_sent.
14054 (linux_attach_lwp, thread_db_init): Update prototypes.
14055 * server.h (change_inferior_id): Delete prototype.
14056 (add_pid_to_list, pull_pid_from_list): New prototypes.
14057 * thread-db.c (thread_db_use_events): New.
14058 (find_first_thread): Rename to...
14059 (find_one_thread): ...this. Update callers and messages. Do not
14060 call fatal. Check thread_db_use_events. Do not call
14061 change_inferior_id or new_thread_notify.
14062 (maybe_attach_thread): Update. Do not call new_thread_notify.
14063 (thread_db_init): Set thread_db_use_events. Check use_events.
14064 * utils.c (fatal, warning): Correct message prefix.
14065
30ed0a8f
DJ
140662007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14067
14068 * Makefile.in (clean): Remove new files.
14069 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14070 (powerpc-64.o, powerpc-64.c): New rules.
14071 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14072 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14073 with SPE.
14074 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14075 SPE targets.
14076 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14077 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14078 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14079 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14080 (target_regsets): Add AltiVec and SPE register sets.
14081 * configure.ac: Check for AltiVec and SPE.
14082 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14083 (ppc_fill_vrregset, ppc_store_vrregset): New.
14084 (target_regsets): Add AltiVec register set.
14085 * configure: Regenerated.
14086
fd462a61
DJ
140872007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14088
14089 * linux-low.c (O_LARGEFILE): Define.
14090 (linux_read_memory): Use /proc/PID/mem.
14091 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14092 * configure, config.in: Regenerated.
14093
69f223ed
DJ
140942007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14095
14096 * linux-low.c (linux_wait_for_event): Do not pass signals while
14097 single-stepping.
14098
aec18585
PA
140992007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14100
14101 * win32-low.c (create_process): New.
14102 (win32_create_inferior): Use create_process instead of
14103 CreateProcess. If create_process failed retry appending an ".exe"
14104 suffix. Store the GetLastError result immediatelly after
14105 create_process calls and use it on the call to error.
14106
34d86ddd
PA
141072007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14108
14109 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14110
5a0e3bd0
JB
141112007-08-23 Joel Brobecker <brobecker@adacore.com>
14112
14113 * configure.ac: Switch license to GPLv3.
14114
f88c79e6
MS
141152007-08-01 Michael Snyder <msnyder@access-company.com>
14116
14117 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14118
6b3d9b83
PA
141192007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14120
14121 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14122 typedef.
14123 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14124 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14125 CloseToolhelp32Snapshot.
14126 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14127 CloseToolhelp32Snapshot.
14128
c588c53c
MS
141292007-07-27 Michael Snyder <michael.snyder@access-company.com>
14130
14131 * server.c (main): Check for inferior exit before main loop.
14132
aa0403d9
PA
141332007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14134
14135 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14136 instead of on tmp_desc.
14137
255e7678
DJ
141382007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14139 Daniel Jacobowitz <dan@codesourcery.com>
14140
14141 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14142 (add_thread): Minor cleanups.
14143 (clear_inferiors): Move lower in the file. Clear the DLL
14144 list.
14145 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14146 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14147 (xml_escape_text): New.
14148 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14149 for qSupported.
14150 (handle_v_cont): Report errors.
14151 (gdbserver_version): Update.
14152 (main): Correct size of own_buf. Do not report initial DLL events.
14153 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14154 (unloaded_dll, xml_escape_text): New.
14155 * win32-low.c (enum target_waitkind): Update comments.
14156 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14157 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14158 (win32_EnumProcessModules, win32_GetModuleInformation)
14159 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14160 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14161 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14162 (win32_Module32First, win32_Module32Next, load_toolhelp)
14163 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14164 (get_child_debug_event): Handle DLL events.
14165 (win32_wait): Likewise.
14166
0d37add9
DJ
141672007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14168
14169 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14170 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14171
45e2715e
PA
141722007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14173
14174 * win32-low.c (handle_output_debug_string): Ignore event if not
14175 waiting.
14176
c5674cf1
PA
141772007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14178
14179 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14180
2bbe3cc1
DJ
141812007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14182
14183 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14184
ae13219e
DJ
141852007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14186
14187 * inferiors.c (change_inferior_id): Add comment.
14188 * linux-low.c (check_removed_breakpoint): Add an early
14189 prototype. Improve debug output.
14190 (linux_attach): Doc update.
14191 (linux_detach_one_process, linux_detach): Clean up before releasing
14192 each process.
14193 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14194 * linux-low.h (struct process_info): Doc improvement.
14195 * mem-break.c (delete_all_breakpoints): New.
14196 * mem-break.h (delete_all_breakpoints): New prototype.
14197 * thread-db.c (find_first_thread): New.
14198 (thread_db_create_event): Call it instead of
14199 thread_db_find_new_threads. Clean up unused variables.
14200 (maybe_attach_thread): Remove first thread handling.
14201 (thread_db_find_new_threads): Use find_first_thread.
14202 (thread_db_get_tls_address): Likewise.
14203
4105de34
DJ
142042007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14205
14206 * thread-db.c (thread_db_find_new_threads): Add prototype.
14207 (thread_db_create_event): Check for the main thread before adding
14208 a new thread.
14209 (maybe_attach_thread): Only enable event reporting if TID == 0.
14210 (thread_db_get_tls_address): Check for new threads.
14211
2b876972
DJ
142122007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14213
14214 * linux-low.c (linux_create_inferior): Try execv before execvp.
14215 * spu-low.c (spu_create_inferior): Likewise.
14216
7a245884
DJ
142172007-06-13 Mike Frysinger <vapier@gentoo.org>
14218
14219 * linux-low.c (linux_create_inferior): Change execv to execvp.
14220 * spu-low.c (spu_create_inferior): Likewies.
14221
117ce543
DJ
142222007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14223
14224 * Makefile.in (clean): Clean new files instead of deleted ones.
14225 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14226 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14227 rules.
14228 * configure.srv: Specify XML files and new regformats for MIPS and
14229 MIPS64 GNU/Linux.
14230 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14231 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14232 an entry for the restart register.
14233 (mips_cannot_fetch_register, mips_cannot_store_register)
14234 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14235 register names to match the XML descriptions.
14236 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14237 restart register instead of $0.
14238
0e7f50da
UW
142392007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14240 Markus Deuling <deuling@de.ibm.com>
14241
14242 * remote-utils.c (decode_xfer_write): New function.
14243 * server.h (decode_xfer_write): Add prototype.
14244 * server.c (handle_query): Add PACKET_LEN argument. Support
14245 qXfer:spu:read and qXfer:spu:write packets.
14246 (main): Pass packet_len to handle_query.
14247 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14248 * target.h (target_ops): Add qxfer_spu.
14249
374c1d38
UW
142502007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14251
14252 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14253 accessing non-seekable spufs files.
14254
bb63802a
UW
142552007-05-16 Markus Deuling <deuling@de.ibm.com>
14256
889bf7c5 14257 * server.c (handle_query): Add reply for qC packet.
bb63802a 14258
7390519e
PA
142592007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14260 Leo Zayas <lerele@champenstudios@com>
14261
14262 * server.h (check_remote_input_interrupt_request): New function.
14263 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14264 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14265 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14266 (check_remote_input_interrupt_request): New function.
14267 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 14268 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
14269 winapi_GenerateConsoleCtrlEvent): New typedefs.
14270 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14271 to 250 ms.
14272 (win32_wait): Check for remote interrupt request
14273 with check_remote_input_interrupt_request.
14274 (win32_request_interrupt): New function.
14275 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14276
34b34921
PA
142772007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14278
14279 * win32-low.c (debug_registers_changed,
14280 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14281 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14282 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14283 (thread_rec): Get context using the low target.
14284 (child_add_thread): Call thread_added on the low target,
14285 which does the same thing.
14286 (regptr): Delete.
14287 (do_initial_child_stuff): Remove debug registers references.
14288 Set context using the low target. Resume threads after
14289 setting the contexts.
14290 (child_continue): Remove dead variable. Remove debug
14291 registers references.
14292 (child_fetch_inferior_registers): Go through the low target.
14293 (do_child_store_inferior_registers): Remove.
14294 (child_store_inferior_registers): Go through the low target.
14295 (win32_resume): Remove debug registers references.
14296 Set context using the low target.
14297 (handle_exception): Change return type to void. Don't record
14298 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14299 first chance exception.
889bf7c5 14300 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
14301 goto loop. Always return after waiting for debug event.
14302 (win32_wait): Convert to switch statement. Handle spurious
14303 events.
14304
14305 * win32-i386-low.c (debug_registers_changed,
14306 debug_registers_used): New.
14307 (initial_stuff): Rename to ...
14308 (i386_initial_stuff): ... this. Clear debug registers
14309 state variables.
14310 (store_debug_registers): Delete.
14311 (i386_get_thread_context): New.
14312 (load_debug_registers): Delete.
14313 (i386_set_thread_context): New.
14314 (i386_thread_added): New.
14315 (single_step): Rename to ...
14316 (i386_single_step): ... this.
14317 (do_fetch_inferior_registers): Rename to ...
14318 (i386_fetch_inferior_register): ... this.
14319 (i386_store_inferior_register): New.
14320 (the_low_target): Adapt to new interface.
14321
14322 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14323 (arm_get_thread_context): New.
14324 (arm_set_thread_context): New.
14325 (regptr): New.
14326 (do_fetch_inferior_registers): Rename to ...
14327 (arm_fetch_inferior_register): ... this.
14328 (arm_store_inferior_register): New.
14329 (arm_wince_breakpoint): Reimplement as unsigned long.
14330 (arm_wince_breakpoint_len): Define.
14331 (the_low_target): Adapt to new interface.
14332
14333 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14334 load_debug_registers. Add get_thread_context, set_thread_context,
14335 thread_added and store_inferior_register. Rename
14336 fetch_inferior_registers to fetch_inferior_register.
14337 (regptr): Remove declaration.
14338
dd6953e1
PA
143392007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14340
14341 * linux-low.c (linux_detach): Change return type to int. Return 0.
14342 * spu-low.c (spu_detach): Likewise.
14343
444d6139
PA
143442007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14345
14346 * target.h (target_ops): Change return type of detach to int.
14347 Add join.
14348 (join_inferior): New.
14349 * server.c (main): Don't skip detach support on mingw32.
14350 If the inferior doesn't support detaching return error.
14351 Call join_inferior instead of using waitpid.
14352 * linux-low.c (linux_join): New.
14353 (linux_target_op): Add linux_join.
14354 * spu-low.c (spu_join): New.
14355 (spu_target_ops): Add spu_join.
14356 * win32-low.c (win32_detach): Adapt to new interface.
14357 Reopen current_process_handle before detaching. Issue a child
14358 resume before detaching.
14359 (win32_join): New.
14360 (win32_target_op): Add win32_join.
14361
1d5315fe
PA
143622007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14363
14364 * win32-low.c (win32-attach): Fix return value.
14365 * target.h (target_ops): Describe ATTACH return values.
14366
bf914831
PA
143672007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14368
14369 * win32-low.c (GETPROCADDRESS): Define.
14370 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14371 (winapi_DebugSetProcessKillOnExit): Likewise.
14372 (win32_create_inferior): Force usage of ansi CreateProcessA.
14373 (win32_attach): Use GETPROCADDRESS.
14374 (win32_detach): Likewise.
14375
f72f3e60
PA
143762007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14377
14378 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14379
ed50f18f
PA
143802007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14381
14382 * win32-low.c: Commit leftover changes from 2007-03-29.
14383
0c2ead7e
DJ
143842007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14385
14386 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14387 fields short instead of int. Add explicit padding.
14388 (i387_cache_to_fsave): Remove unnecessary casts.
14389 (i387_fsave_to_cache): Doc fix.
14390 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14391
73725ff3
DJ
143922007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14393
14394 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14395 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14396
d99f33d8
PA
143972007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14398
14399 * configure.srv (arm*-*-mingw32ce*): Move near the other
14400 arm targets.
14401
68070c10
PA
144022007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14403
2482afc6 14404 * configure.ac: Add errno checking.
68070c10
PA
14405 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14406 sys/file.h and malloc.h.
14407 (AC_CHECK_DECLS): Add perror.
14408 (srv_mingwce): Handle.
2482afc6 14409 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
14410 win32-i386-low.o to srv_tgtobj.
14411 (i[34567]86-*-mingw*): Likewise.
14412 (arm*-*-mingw32ce*): Add case.
14413 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14414 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14415 [__MINGW32CE__] (strerror): New function.
14416 [__MINGW32CE__] (errno): Define to GetLastError.
14417 [__MINGW32CE__] (COUNTOF): New macro.
14418 (remote_open): Remove extra close call.
14419 * mem-break.c (delete_breakpoint_at): New function.
14420 * mem-break.h (delete_breakpoint_at): Declare.
14421 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14422 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14423 [USE_WIN32API] (read, write): Add char* casts.
14424 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14425 * server.h: Include wincecompat.h on Windows CE.
14426 [HAVE_ERRNO_H]: Check.
14427 (perror): Declare if not declared.
14428 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14429 (perror_with_name): Remove errno declaration.
14430 * wincecompat.h: New.
14431 * wincecompat.c: New.
14432 * win32-low.h: New.
14433 * win32-arm-low.c: New.
14434 * win32-i386-low.c: New.
14435 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14436 (OUTMSG2): Make it safe.
14437 (_T): New macro.
14438 (COUNTOF): New macro.
14439 (NUM_REGS): Get it from the low target.
14440 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14441 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14442 (thread_rec): Let low target handle debug registers.
14443 (child_add_thread): Likewise.
14444 (child_init_thread_list): Likewise.
14445 (continue_one_thread): Likewise.
14446 (regptr): New.
14447 (do_child_fetch_inferior_registers): Move to ...
14448 * win32-i386-low.c: ... here, and rename to ...
14449 (do_fetch_inferior_registers): ... this.
889bf7c5 14450 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
14451 Go through the low target.
14452 (do_child_store_inferior_registers): Use regptr.
14453 (strwinerror): New function.
14454 (win32_create_inferior): Handle Windows CE.
14455 Use strwinerror instead of strerror on Windows error
14456 codes. Add program to the error output.
14457 Don't close the main thread handle on Windows CE.
14458 (win32_attach): Use coredll.dll on Windows CE.
14459 (win32_kill): Close current process and current
14460 thread handles.
14461 (win32_detach): Use coredll.dll on Windows CE.
14462 (win32_resume): Let low target handle debug registers, and
14463 step request.
14464 (handle_exception): Add/Remove initial breakpoint. Avoid
14465 non-existant WSTOPSIG on Windows CE.
14466 (win32_read_inferior_memory): Cast to remove warning.
14467 (win32_arch_string): Go through the low target.
14468 (initialize_low): Call set_breakpoint_data with the low
14469 target's breakpoint.
14470 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14471 FOP_REGNUM, mappings): Move to ...
14472 * win32-i386-low.c: ... here.
14473 * win32-low.c (win32_thread_info): Move to ...
14474 * win32-low.h: ... here.
14475 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14476 win32-arm-low.c and wincecompat.c.
14477 (all:): Add $EXEEXT.
14478 (install-only:): Likewise.
14479 (gdbserver:): Likewise.
14480 (gdbreplay:): Likewise.
14481 * config.in: Regenerate.
14482 * configure: Regenerate.
14483
41093d81
PA
144842007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14485
14486 * win32-low.c: Rename typedef thread_info to
14487 win32_thread_info throughout.
14488
544afa54
PA
144892007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14490
14491 * win32-i386-low.c: Rename to ...
14492 * win32-low.c: ... this.
14493 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14494 * Makefile.in: Likewise.
14495
bce7165d
PA
144962007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14497
14498 * remote-utils.c (monitor_output): Constify msg parameter.
14499 * server.h (monitor_output): Likewise.
14500 * win32-i386-low.c (handle_output_debug_string): New.
14501 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14502 handle_output_debug_string.
14503 (get_child_debug_event): Likewise.
14504
506c7aa0
DJ
145052007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14506
14507 * server.c (main): Correct strtoul check.
14508
42c81e2a
DJ
145092007-03-27 Jon Ringle <jon@ringle.org>
14510
14511 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14512
9453113a
DJ
145132007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14514
14515 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14516
64a69107
DJ
145172007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14518
14519 * terminal.h: Check HAVE_SGTTY_H.
14520
145212007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
14522
14523 * remote-utils.c (remote_open): Print out the assigned port number.
14524
c74d0ad8
DJ
145252007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14526
14527 * remote-utils.c (monitor_output): New function.
14528 * server.c (debug_threads): Define here.
14529 (monitor_show_help): New function.
14530 (handle_query): Handle qRcmd.
14531 (main): Do not handle 'd' packet.
14532 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14533 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14534 of debug_threads.
14535
de7c3b4a
PA
145362007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14537
14538 * Makefile.in (EXEEXT): New.
14539 (clean): Use $(EXEEXT).
14540
ef57601b
PA
145412007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14542
14543 * target.h (target_ops): Rename send_signal to request_interrupt,
14544 and remove enum target_signal parameter.
14545 * linux-low.c (linux_request_interrupt): Rename from
14546 linux_send_signal, and always send SIGINT.
14547 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14548 and always send SIGINT.
14549 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14550 of send_signal.
14551 (input_interrupt): Likewise.
14552
820f2bda
PA
145532007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14554
14555 * server.c (get_features_xml): Check if target implemented
14556 arch_string.
14557 * win32-i386-low.c (win32_arch_string): New.
14558 (win32_target_ops): Add win32_arch_string as arch_string member.
14559
ab39bf24
UW
145602007-02-22 Markus Deuling <deuling@de.ibm.com>
14561
14562 * spu-low.c (spu_arch_string): New.
14563 (spu_target_ops): Add spu_arch_string.
14564
61ff6e04
DJ
145652007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14566
14567 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14568 * configure.ac: Do not check for terminal.h.
14569 * configure, config.in: Regenerated.
14570
fb1e4ffc
DJ
145712007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14572
14573 * Makefile.in (OBS): Add $(XML_BUILTIN).
14574 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14575 (clean): Update.
14576 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14577 (arm-with-iwmmxt.c): New.
14578 * config.in, configure: Regenerate.
14579 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14580 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14581 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14582 (arm*-*-linux*): Add iWMMXt and regset support.
14583 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14584 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14585 (arm_store_wmmxregset, target_regsets): New.
14586 * server.c (get_features_xml): Take annex argument. Check builtin
14587 XML documents.
14588 (handle_query): Handle multiple annexes.
14589
0f48aa01
DJ
145902007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14591
14592 * remote-utils.c [USE_WIN32API] (read, write): Define.
14593 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14594 write.
14595
23181151
DJ
145962007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14597
14598 * linux-i386-low.c (the_low_target): Set arch_string.
14599 * linux-x86-64-low.c (the_low_target): Likewise.
14600 * linux-low.c (linux_arch_string): New.
14601 (linux_target_ops): Add it.
14602 * linux-low.h (struct linux_target_ops): Add arch_string.
14603 * server.c (write_qxfer_response): Use const void * for DATA.
14604 (get_features_xml): New.
14605 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14606 * target.h (struct target_ops): Add arch_string method.
14607
9d606399
DJ
146082007-01-03 Denis Pilat <denis.pilat@st.com>
14609 Daniel Jacobowitz <dan@codesourcery.com>
14610
14611 * linux-low.c (linux_kill): Handle being called with no threads.
14612 * win32-i386-low.c (win32_kill): Likewise.
14613 (get_child_debug_event): Clear current_process_handle.
14614
146152006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
14616 Daniel Jacobowitz <dan@codesourcery.com>
14617
14618 * remote-utils.c (remote_open): Check the type of specified
14619 serial port devices before opening them.
14620 * server.c (main): Kill the inferior if an error occurs during
14621 the first remote_open.
14622
a5e13d24
DJ
146232006-12-05 Markus Deuling <deuling@de.ibm.com>
14624
14625 * README: Update supported targets.
14626
186947f7
DJ
146272006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14628
14629 * Makefile.in (clean): Remove reg-mips64.c.
14630 (reg-mips64.c, reg-mips64.o): New rules.
14631 * configure.srv: Handle mips64. Include regset support for mips.
14632 * linux-mips-low.c (union mips_register): New.
14633 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14634 (mips_breakpoint, mips_breakpoint_at): Use int.
14635 (mips_collect_register, mips_supply_register)
14636 (mips_collect_register_32bit, mips_supply_register_32bit)
14637 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14638 (mips_store_fpregset, target_regsets): New.
14639 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14640
a13e2c95
UW
146412006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14642
14643 * configure.srv: Add target "spu*-*-*".
14644 * Makefile.in (clean): Remove reg-spu.c.
14645 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14646 * spu-low.c: New file.
14647
cb7283db
DJ
146482006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14649
14650 * configure.ac: Correct td_thr_tls_get_addr test.
14651 * configure: Regenerated.
14652
89be2091
DJ
146532006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14654
14655 * linux-low.c (linux_wait_for_event): Reformat. Use the
14656 pass_signals array.
14657 * remote-utils.c (decode_address_to_semicolon): New.
14658 * server.c (pass_signals, handle_general_set): New.
14659 (handle_query): Mention QPassSignals for qSupported.
14660 (main): Call handle_general_set.
14661 * server.h (pass_signals, decode_address_to_semicolon): New.
14662
000ef4f0
DJ
146632006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14664
14665 * server.c (handle_query): Correct error handling for read_auxv.
14666
b7149293
UW
146672005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14668
14669 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14670 and srv_linux_thread_db to yes.
14671 * linux-s390-low.c (s390_fill_gregset): New function.
14672 (target_regsets): Define data structure.
14673
dae5f5cf
DJ
146742006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14675
14676 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14677 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14678 * config.in, configure: Regenerated.
14679 * inferiors.c (gdb_id_to_thread): New function.
14680 (gdb_id_to_thread_id): Use it.
14681 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14682 * linux-low.h (struct process_info): Add th member.
14683 (thread_db_get_tls_address): New prototype.
14684 * remote-utils.c (decode_address): Make non-static.
14685 * server.c (handle_query): Handle qGetTLSAddr.
14686 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14687 * target.h (struct target_ops): Add get_tls_address.
14688 * thread-db.c (maybe_attach_thread): Save the thread handle.
14689 (thread_db_get_tls_address): New.
14690
32ca6d61
DJ
146912006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14692
14693 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14694 (linux_resume_one_process): Take a siginfo_t *. Update all
14695 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14696 (struct pending_signals): Add a siginfo_t.
14697 (linux_wait_for_process): Always set last_status.
14698 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14699 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14700 * linux-low.h (struct process_info): Add last_status.
14701
5ffff7c1
DJ
147022006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14703
14704 * remote-utils.c (try_rle): New function.
14705 (putpkt_binary): Use it.
14706
8695c747
DJ
147072006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14708
14709 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14710 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14711 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14712 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14713 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14714 point registers.
14715
290fadea
RS
147162006-08-08 Richard Sandiford <richard@codesourcery.com>
14717
14718 * server.c (terminal_fd): New variable.
14719 (old_foreground_pgrp): Likewise.
14720 (restore_old_foreground_pgrp): New function.
14721 (start_inferior): Record the terminal file descriptor in terminal_fd
14722 and its original foreground group in old_foreground_pgrp. Register
14723 restore_old_foreground_pgrp with atexit().
14724
9f2e1e63
DJ
147252006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14726
14727 * server.c (handle_query): Correct qPart to qXfer.
14728
b80864fb
DJ
147292006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14730
14731 * configure.ac: Check for more headers which are missing on
14732 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14733 * configure.srv: Add Cygwin and mingw32.
14734 * remote-utils.c: Don't include headers unconditionally which
14735 are missing on mingw32. Include <winsock.h> for mingw32.
14736 (remote_open): Adjust for mingw32 support. Flush
14737 standard error after writing to it.
14738 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14739 (unblock_async_io, enable_async_io, disable_async_io)
14740 (readchar, getpkt): Update for Winsock support.
14741 (prepare_resume_reply): Expect a protocol signal number.
14742 * server.c: Disable <sys/wait.h> on mingw32.
14743 (start_inferior): Adjust for mingw32 support. Flush
14744 standard error after writing to it.
14745 (attach_inferior): Likewise. Use protocol signal
14746 numbers.
14747 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14748 and names.
14749 * win32-i386-low.c: New file.
14750 * Makefile.in (XM_CLIBS): Set.
14751 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14752 (win32-i386-low.o): New dependency rule.
14753 * linux-low.c (linux_wait): Use target signal numbers.
14754 * target.h (struct target_ops): Doc fix.
14755 * server.h (target_signal_to_name): New prototype.
14756 * gdbreplay.c: Don't include headers unconditionally which
14757 are missing on mingw32. Include <winsock.h> for mingw32.
14758 (remote_close, remote_open): Adjust for Winsock support.
14759 * configure, config.in: Regenerated.
14760
0876f84a
DJ
147612006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14762
14763 * server.c (decode_xfer_read, write_qxfer_response): New.
14764 (handle_query): Take a packet length argument. Handle
14765 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14766 the qSupported response.
14767 (main): Update call to handle_query.
14768
01f9e8fa
DJ
147692006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14770
14771 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14772 (putpkt_binary): Renamed from putpkt and adjusted for binary
14773 data.
14774 (putpkt): New wrapper for putpkt_binary.
14775 (readchar): Don't mask off the high bit.
14776 (decode_X_packet): New function.
14777 * server.c (main): Call putpkt_binary if a handler sets the packet
14778 length. Save the length of the incoming packet. Handle 'X'.
14779 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14780
be2a5f71
DJ
147812006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14782
14783 * server.c (handle_query): Handle qSupported.
14784
ea025f5f
DJ
147852006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14786
14787 * remote-utils.c (all_symbols_looked_up): New variable.
14788 (look_up_one_symbol): Check it.
14789 * server.h (look_up_one_symbol): New declaration.
14790 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14791
9308fc88
DJ
147922006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14793
14794 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 14795 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
14796 (PTRACE_GET_THREAD_AREA): Define.
14797 (ps_get_thread_area): New function.
14798
52fb6437
NS
147992006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14800
14801 * configure.srv (m68k*-*-uclinux*): New target.
14802 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14803 (linux_resume_one_process): Remove extraneous cast.
14804 (linux_read_offsets): New.
14805 (linux_target_op): Add linux_read_offsets on mmuless systems.
14806 * server.c (handle_query): Add qOffsets logic.
14807 * target.h (struct target_ops): Add read_offsets.
14808
21b0f40c
DJ
148092006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14810
14811 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14812 (PTRACE_GET_THREAD_AREA): Define.
14813 (ps_get_thread_area): New function.
14814 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14815 (linux-x86-64-low.o): Update.
14816
0050a760
DJ
148172006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14818
14819 * configure.ac: Remove checks for prfpregset_t.
14820 * gdb_proc_service.h: New file.
14821 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14822 new "gdb_proc_service.h".
14823 * proc-service.c: Likewise.
14824 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14825 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14826 * Makefile.in (gdb_proc_service_h): Updated.
14827 * configure, config.in: Regenerated.
14828
b92a518e
DJ
148292006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14830
14831 * remote-utils.c (prepare_resume_reply): Move declaration
14832 of gdb_id_from_wait to the top of the block.
14833
545587ee
DJ
148342006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14835
14836 * linux-low.c (regsets_store_inferior_registers): Read the regset
14837 from the target before filling it.
14838
9db87ebd
DJ
148392006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14840
14841 * server.c (attach_inferior): Return SIGTRAP for a successful
14842 attach.
14843
dd24457d
DJ
148442006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14845
14846 * Makefile.in (OBS): Add version.o.
14847 (STAGESTUFF): Delete.
14848 (version.o): Add dependencies.
14849 (version.c): Replace rule.
14850 (clean): Remove version.c.
14851 * server.c (gdbserver_version): New.
14852 (gdbserver_usage): Use printf.
14853 (main): Handle --version and --help.
14854 * server.h (version, host_name): Add declarations.
14855
6f0f660e
EZ
148562005-12-23 Eli Zaretskii <eliz@gnu.org>
14857
889bf7c5
PA
14858 * linux-arm-low.c:
14859 * linux-arm-low.c:
14860 * inferiors.c:
14861 * i387-fp.h:
14862 * i387-fp.c:
14863 * gdbreplay.c:
14864 * regcache.c:
14865 * proc-service.c:
14866 * mem-break.h:
14867 * mem-break.c:
14868 * linux-x86-64-low.c:
14869 * linux-sh-low.c:
14870 * linux-s390-low.c:
14871 * linux-ppc64-low.c:
14872 * linux-ppc-low.c:
14873 * linux-mips-low.c:
14874 * linux-m68k-low.c:
14875 * linux-m32r-low.c:
14876 * linux-low.h:
14877 * linux-low.c:
14878 * linux-ia64-low.c:
14879 * linux-i386-low.c:
14880 * linux-crisv32-low.c:
14881 * thread-db.c:
14882 * terminal.h:
14883 * target.h:
14884 * target.c:
14885 * server.h:
14886 * server.c:
14887 * remote-utils.c:
14888 * regcache.h:
14889 * utils.c:
14890 * Makefile.in:
14891 * configure.ac:
6f0f660e
EZ
14892 * gdbserver.1: Add (C) after Copyright. Update the FSF
14893 address.
14894
9d1fb177
DJ
148952005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14896
14897 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14898 (arm_breakpoint_at): Recognize both breakpoints.
14899 (the_low_target): Use the correct breakpoint instruction.
14900
011a70c2
DJ
149012005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14902
14903 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14904 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14905 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14906 (the_low_target): Update.
14907
7fb85e41
AS
149082005-10-25 Andreas Schwab <schwab@suse.de>
14909
14910 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14911
14912 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14913 (ia64_num_regs): Reduce to 462.
14914
3db0444b
DJ
149152005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14916
14917 * acinclude.m4: Correct quoting.
14918 * aclocal.m4: Regenerated.
14919
14920 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14921 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14922 (thread_db_init): Call thread_db_err_str.
14923 * configure.ac: Check for TD_VERSION.
14924 * config.in, configure: Regenerated.
14925
bee0189a
DJ
149262005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14927
14928 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14929
e9d25b98
DJ
149302005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14931
14932 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14933 is not available. Define HAVE_PTRACE_GETREGS if it is.
14934 * config.in, configure: Regenerated.
14935 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14936 * linux-i386-low.c, linux-m68k-low.c: Update to use
14937 HAVE_PTRACE_GETREGS.
14938 * linux-low.c (regsets_fetch_inferior_registers)
14939 (regsets_store_inferior_registers): Only return 0 if we processed
14940 GENERAL_REGS.
14941 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14942 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14943
a06660f7
DJ
149442005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14945
14946 * inferiors.c (struct thread_info): Add gdb_id.
14947 (add_thread): Add gdb_id argument.
14948 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14949 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14950 calls to add_thread.
14951 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14952 * server.c (handle_query): Use thread_to_gdb_id.
14953 (handle_v_cont, main): Use gdb_id_to_thread_id.
14954 * server.h (add_thread): Update prototype.
14955 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14956 prototypes.
14957
5a1f5858
DJ
149582005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14959
14960 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14961 left-padded registers.
14962 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14963 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14964
e122f1f5
SE
149652005-07-01 Steve Ellcey <sje@cup.hp.com>
14966
14967 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14968 * configure: Regenerate.
14969 * config.in: Regenerate.
14970 * server.h (NEED_DECLARATION_STRERROR):
14971 Replace with !HAVE_DECL_STRERROR.
14972
d592fa2f
DJ
149732005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14974
14975 * linux-low.c (linux_wait, linux_send_signal): Don't test
14976 an unsigned long variable for > 0 if it could be MAX_ULONG.
14977 * server.c (myresume): Likewise.
14978 * target.c (set_desired_inferior): Likewise.
14979
ccbd4912
MK
149802005-06-13 Mark Kettenis <kettenis@gnu.org>
14981
14982 * configure.ac: Simplify and improve check for socklen_t.
14983 * configure, config.in: Regenerate.
14984
f450004a
DJ
149852005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14986
14987 * acconfig.h: Remove.
14988 * configure.ac: Add a test for socklen_t. Use three-argument
14989 AC_DEFINE throughout.
14990 * config.in: Regenerated using autoheader 2.59.
14991 * configure: Regenerated.
14992
14993 * gdbreplay.c (socklen_t): Provide a default.
14994 (remote_open): Use socklen_t.
14995 * remote-utils.c (socklen_t): Provide a default.
14996 (remote_open): Use socklen_t.
14997 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14998 unsigned char.
14999
15000 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15001 char for buffers.
15002 * linux-low.c (linux_read_memory, linux_write_memory)
15003 (linux_read_auxv): Likewise.
15004 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15005 (check_mem_write): Likewise.
15006 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15007 Likewise.
15008 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15009 (registers_from_string, register_data): Likewise.
15010 * server.c (handle_query, main): Likewise.
15011 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15012 (decode_M_packet): Likewise.
15013 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15014 * target.h (struct target_ops): Update read_memory, write_memory,
15015 and read_auxv.
15016 (read_inferior_memory, write_inferior_memory): Update.
15017 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15018 to unsigned char *.
15019 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15020 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15021 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15022 linux-s390-low.c, linux-sh-low.c: Update for changes in
15023 read_inferior_memory and the_low_target->breakpoint.
15024
eee84df1
DJ
150252005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15026
15027 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15028 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15029 * configure.srv: Add powerpc64-*-linux*.
15030 * linux-ppc64-low.c: New file.
15031
45b134e5
OF
150322005-05-23 Orjan Friberg <orjanf@axis.com>
15033
15034 * linux-cris-low.c: New file with support for CRIS.
15035 * linux-crisv32-low.c: Ditto for CRISv32.
15036 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15037 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 15038 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
15039 reg-crisv32.o, and reg-crisv32.c to make rules.
15040 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15041 recognized targets.
15042
48d93c75
UW
150432005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15044
15045 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15046 of sizeof (PTRACE_XFER_TYPE).
15047 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15048
e013ee27
OF
150492005-05-12 Orjan Friberg <orjanf@axis.com>
15050
889bf7c5 15051 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
15052 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15053 pointers for hardware watchpoint support.
15054 * linux-low.h (struct linux_target_ops): Ditto.
15055 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15056 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15057 to linux_target_ops.
15058 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15059 reply packet.
15060 * server.c (main): Recognize 'Z' and 'z' packets.
15061
b0ded00b
UW
150622005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15063
15064 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15065 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15066 (the_low_target): Add new members.
15067
8643e2ad
DJ
150682005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15069
15070 * proc-service.c (ps_lgetregs): Search all_processes instead of
15071 all_threads.
15072
fc620387
DJ
150732005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15074
15075 * server.c (start_inferior): Change return type to int.
15076 (attach_inferior): Change sigptr to int *.
15077 (handle_v_cont, handle_v_requests): Change signal to int *.
15078 (main): Change signal to int.
15079
150802005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
15081
15082 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15083 * configure.srv: Add m32r*-*-linux*.
15084 * linux-m32r-low.c: New file.
15085
e0e76420
DJ
150862005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15087
15088 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15089
a1928bad
DJ
150902005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15091
15092 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15093 Take unsigned long arguments for PIDs.
15094 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15095 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15096 (wait_for_sigstop, linux_resume_one_process)
15097 (regsets_fetch_inferior_registers, linux_send_signal)
15098 (linux_read_auxv): Likewise. Update the types of variables holding
15099 PIDs. Update format string specifiers.
15100 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15101 * remote-utils.c (prepare_resume_reply): Likewise.
15102 * server.c (cont_thread, general_thread, step_thread)
15103 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15104 unsigned long.
15105 (handle_query): Update format specifiers.
15106 (handle_v_cont, main): Use strtoul for thread IDs.
15107 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15108 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15109 (general_thread, step_thread, thread_from_wait)
15110 (old_thread_from_wait): Update.
15111 * target.h (struct thread_resume): Use unsigned long for THREAD.
15112 (struct target_ops): Use unsigned long for arguments to attach and
15113 thread_alive.
15114
dcdb98d2
DJ
151152005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15116
15117 * acinclude.m4: Include bfd/bfd.m4 directly.
15118 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15119 <agriffis@toolchain.org>.
15120 * aclocal.m4, configure: Regenerated.
15121
bec39cab
AC
151222005-01-07 Andrew Cagney <cagney@gnu.org>
15123
15124 * configure.ac: Rename configure.in, require autoconf 2.59.
15125 * configure: Re-generate.
15126
434c4c77
DJ
151272004-12-08 Daniel Jacobowitz <dan@debian.org>
15128
15129 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15130 LIBS when finished.
15131 * aclocal.m4: Regenerated.
15132 * configure: Regenerated.
15133
db1d3e1b
AS
151342004-11-21 Andreas Schwab <schwab@suse.de>
15135
15136 * linux-m68k-low.c (m68k_num_gregs): Define.
15137 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15138 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15139 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15140 (m68k_breakpoint_at): New. Add to the_low_target.
15141
15142 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15143 srv_linux_thread_db to yes.
15144
43360365
JB
151452004-10-20 Joel Brobecker <brobecker@gnat.com>
15146
15147 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15148 (ARCH_SET_FS): Likewise.
15149 (ARCH_GET_FS): Likewise.
15150 (ARCH_GET_GS): Likewise.
15151
fd500816
DJ
151522004-10-16 Daniel Jacobowitz <dan@debian.org>
15153
15154 * linux-i386-low.c (ps_get_thread_area): New.
15155 * linux-x86-64-low.c (ps_get_thread_area): New.
15156 * linux-low.c: Include <sys/syscall.h>.
15157 (linux_kill_one_process): Don't kill the first thread here.
15158 (linux_kill): Kill the first thread here.
15159 (kill_lwp): New function.
15160 (send_sigstop, linux_send_signal): Use it.
15161 * proc-service.c: Clean up #ifdefs.
15162 (fpregset_info): Delete.
15163 (ps_lgetregs): Update and enable implementation.
15164 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15165 implementations.
15166 * remote-utils.c (struct sym_cache, symbol_cache): New.
15167 (input_interrupt): Print a clearer message.
15168 (async_io_enabled): New variable.
15169 (enable_async_io, disable_async_io): Use it. Update comments.
15170 (look_up_one_symbol): Use the symbol cache.
15171 * thread-db.c (thread_db_look_up_symbols): New function.
15172 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15173
f6de3c42
DJ
151742004-10-16 Daniel Jacobowitz <dan@debian.org>
15175
15176 * configure.in: Test for -rdynamic.
15177 * configure: Regenerated.
15178 * Makefile (INTERNAL_LDFLAGS): New.
15179 (gdbserver, gdbreplay): Use it.
15180
2c0fc042
AC
151812004-09-02 Andrew Cagney <cagney@gnu.org>
15182
15183 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15184
075b3282
DJ
151852004-03-23 Daniel Jacobowitz <drow@mvista.com>
15186
15187 * linux-low.c (linux_wait): Clear all_processes list also.
15188
fa6a77dc
DJ
151892004-03-12 Daniel Jacobowitz <drow@mvista.com>
15190
15191 * linux-low.c: Include <errno.h>. Remove extern declaration of
15192 errno.
15193
6d782a97
DJ
151942004-03-12 Daniel Jacobowitz <drow@mvista.com>
15195
15196 * gdbreplay.c, server.h, utils.c: Update copyright years.
15197
3a7fb99b
DJ
151982004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15199
15200 * server.c (main): Print child status or termination signal from
15201 variable 'signal', not 'sig'.
15202
c3e735a6
DJ
152032004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15204
15205 * linux-low.c (linux_read_memory): Change return type to
15206 int. Check for and return error from ptrace().
15207 * target.c (read_inferior_memory): Change return type to int. Pass
15208 back return status from the_target->read_memory().
15209 * target.h (struct target_ops): Adapt *read_memory() prototype.
15210 Update comment.
15211 (read_inferior_memory): Adapt prototype.
15212 * server.c (main): Return an error packet if
15213 read_inferior_memory() returns an error.
15214
a59d1c82
DJ
152152004-03-04 Daniel Jacobowitz <drow@mvista.com>
15216
15217 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15218 Unify with other clean targets.
15219
dc3f8883
DJ
152202004-02-29 Daniel Jacobowitz <drow@mvista.com>
15221
15222 * server.c (handle_v_cont): Call set_desired_inferior.
15223
89a208da
DJ
152242004-02-29 Daniel Jacobowitz <drow@mvista.com>
15225
15226 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15227
62ea82f5
DJ
152282004-02-29 Daniel Jacobowitz <drow@mvista.com>
15229
15230 * linux-low.c (linux_wait): Unblock async I/O.
15231 (linux_resume): Block and enable async I/O.
15232 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15233 * server.h (block_async_io, unblock_async_io): Add prototypes.
15234
6910d122
DJ
152352004-02-29 Daniel Jacobowitz <drow@mvista.com>
15236
15237 * remote-utils.c (remote_open): Print a status notice after
15238 opening a TCP port.
15239 * server.c (attach_inferior): Print a status notice after
15240 attaching.
15241
152422004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
15243
15244 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15245
c89dc5d4
DJ
152462004-02-26 Daniel Jacobowitz <drow@mvista.com>
15247
15248 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15249 error packet.
15250 * server.c, target.h: Update copyright years.
15251
4b8dad4a
RM
152522004-02-25 Roland McGrath <roland@redhat.com>
15253
15254 * target.h (struct target_ops): New member `read_auxv'.
15255 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15256 * linux-low.c (linux_read_auxv): New function.
15257 (linux_target_ops): Initialize `read_auxv' member to that.
15258
d7446758
JB
152592004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15260
15261 Committed by Jim Blandy <jimb@redhat.com>.
15262
15263 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 15264 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
15265 instead of GPR_SIZE to distiguish s390 and s390x targets.
15266
5544ad89
DJ
152672004-01-31 Daniel Jacobowitz <drow@mvista.com>
15268
15269 * linux-low.c: Update copyright year.
15270 (check_removed_breakpoint): Clear pending_is_breakpoint.
15271 (linux_set_resume_request, linux_queue_one_thread)
15272 (resume_status_pending_p): New functions.
15273 (linux_continue_one_thread): Use process->resume.
15274 (linux_resume): Only resume threads if there are no pending events.
15275 * linux-low.h (struct process_info): Add resume request
15276 pointer.
15277
2a68b70e
DJ
152782004-01-30 Daniel Jacobowitz <drow@mvista.com>
15279
15280 * regcache.c (new_register_cache): Clear the allocated register
15281 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15282
64386c31
DJ
152832003-10-13 Daniel Jacobowitz <drow@mvista.com>
15284
15285 * linux-low.c (linux_resume): Take a struct thread_resume *
15286 argument.
15287 (linux_wait): Update call.
15288 (resume_ptr): New static variable.
15289 (linux_continue_one_thread): Renamed from
15290 linux_continue_one_process. Use resume_ptr.
15291 (linux_resume): Use linux_continue_one_thread.
15292 * server.c (handle_v_cont, handle_v_requests): New functions.
15293 (myresume): New function.
15294 (main): Handle 'v' case.
15295 * target.h (struct thread_resume): New type.
15296 (struct target_ops): Change argument of "resume" to struct
15297 thread_resume *.
15298 (myresume): Delete macro.
15299
c938e9b0
L
153002003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15301
15302 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15303 (uninstall): Support DESTDIR.
15304
7f313d07
BC
15305Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15306
15307 * configure.srv: Add xscale*linux copy of arm*linux entry.
15308
3b2fc2ea
DJ
153092003-07-24 Daniel Jacobowitz <drow@mvista.com>
15310
15311 * linux-arm-low.c (arm_reinsert_addr): New function.
15312 (the_low_target): Add arm_reinsert_addr.
15313
1c0a559e
MK
153142003-07-08 Mark Kettenis <kettenis@gnu.org>
15315
15316 * mem-break.c: Remove whitespace at end of file.
15317
43d5792c
DJ
153182003-06-28 Daniel Jacobowitz <drow@mvista.com>
15319
15320 * configure.in: Check whether we need to prototype strerror.
15321 * server.h: Optionally prototype strerror.
15322 * gdbreplay.c (perror_with_name): Use strerror.
15323 * linux-low.c (linux_attach_lwp): Use strerror.
15324 * utils.c (perror_with_name): Use strerror.
15325 * config.in, configure: Regenerated.
15326
c8a86edf
DJ
153272003-06-28 Daniel Jacobowitz <drow@mvista.com>
15328
15329 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15330 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15331
73d37363
DJ
153322003-06-20 Daniel Jacobowitz <drow@mvista.com>
15333
15334 * Makefile.in (SFILES): Update.
15335 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15336 low-sun3.c: Remove files.
15337
6ad8ae5c
DJ
153382003-06-17 Daniel Jacobowitz <drow@mvista.com>
15339
15340 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15341 (linux_detach_one_process, linux_detach): New functions.
15342 (linux_target_ops): Add linux_detach.
15343 * server.c (main): Handle 'D' packet.
15344 * target.h (struct target_ops): Add "detach" member.
15345 (detach_inferior): Define.
15346
1581182a
MK
153472003-06-13 Mark Kettenis <kettenis@gnu.org>
15348
15349 From Kelley Cook <kelleycook@wideopenwest.com>:
15350 * configure.srv: Accept i[34567]86 variants.
15351
e5379b03
DJ
153522003-06-05 Daniel Jacobowitz <drow@mvista.com>
15353
15354 * linux-low.c (linux_wait_for_event): Correct comment typos.
15355 (linux_resume_one_process): Call check_removed_breakpoint.
15356 (linux_send_signal): New function.
15357 (linux_target_ops): Add linux_send_signal.
15358 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15359 of kill.
15360 * target.h (struct target_ops): Add send_signal.
15361
2ff29de4
JB
153622003-05-29 Jim Blandy <jimb@redhat.com>
15363
15364 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15365 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15366 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15367 away part of the register's value.
15368
254787d4
DJ
153692003-03-26 Daniel Jacobowitz <drow@mvista.com>
15370
15371 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15372 (linux_wait_for_event, linux_init_signals): Likewise.
15373
94e10508
DJ
153742003-03-17 Daniel Jacobowitz <drow@mvista.com>
15375
15376 * configure.in: Check for stdlib.h.
15377 * configure: Regenerated.
15378 * config.in: Regenerated.
15379
4c0711e0
DJ
153802003-01-04 Andreas Schwab <schwab@suse.de>
15381
15382 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15383
ef66e766
AC
153842003-01-02 Andrew Cagney <ac131313@redhat.com>
15385
15386 * Makefile.in: Remove obsolete code.
15387
a1358604
DJ
153882002-11-20 Daniel Jacobowitz <drow@mvista.com>
15389
15390 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15391 defined(PT_FPR0_HI).
15392
23ce3b1c
DJ
153932002-11-17 Stuart Hughes <seh@zee2.com>
15394
15395 * linux-arm-low.c (arm_num_regs): Increase.
15396 (arm_regmap): Include status register.
15397
153982002-11-17 Daniel Jacobowitz <drow@mvista.com>
15399
15400 * linux-low.c (register_addr): Remove incorrect -1 check.
15401
a9fa9f7d
DJ
154022002-08-29 Daniel Jacobowitz <drow@mvista.com>
15403
15404 * linux-low.c (linux_create_inferior): Call setpgid. Return
15405 the new PID.
15406 (unstopped_p, linux_signal_pid): Remove.
15407 (linux_target_ops): Remove linux_signal_pid.
15408 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15409 global instead of target method.
15410 * target.h (struct target_ops): Remove signal_pid. Update comment
15411 for create_inferior.
15412 * server.c (signal_pid): New variable.
15413 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 15414 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
15415 (attach_inferior): Set signal_pid.
15416
17574093
DJ
154172002-08-23 Daniel Jacobowitz <drow@mvista.com>
15418
15419 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15420
154212002-08-20 Jim Blandy <jimb@redhat.com>
15422
15423 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15424 default for this.
15425
154262002-08-01 Andrew Cagney <cagney@redhat.com>
15427
15428 * Makefile.in: Make chill references obsolete.
15429
154302002-07-24 Kevin Buettner <kevinb@redhat.com>
15431
15432 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15433 * configure: Regenerate.
15434 * config.in: Regenerate.
15435
154362002-07-09 David O'Brien <obrien@FreeBSD.org>
15437
15438 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15439 (perror_with_name, remote_close, remote_open, expect, play): Static.
15440
154412002-07-04 Michal Ludvig <mludvig@suse.cz>
15442
4b8dad4a 15443 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
15444 byte offsets instead of an array of indexes.
15445 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15446
154472002-06-13 Daniel Jacobowitz <drow@mvista.com>
15448
15449 * regcache.c: Add comment.
15450
154512002-06-11 Daniel Jacobowitz <drow@mvista.com>
15452
15453 * thread-db.c: New file.
15454 * proc-service.c: New file.
15455 * acinclude.m4: New file.
15456 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15457 proc-service.o, and thread-db.o.
15458 (linux-low.o): Add USE_THREAD_DB.
15459 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15460 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15461 * aclocal.m4: Regenerated.
15462 * config.in: Regenerated.
15463 * configure: Regenerated.
15464 * configure.in: Check for proc_service.h, sys/procfs.h,
15465 thread_db.h, and linux/elf.h headrs.
15466 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15467 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15468 Check for -lthread_db and thread support.
15469 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15470 PowerPC, and SuperH.
15471 * i387-fp.c: Constify arguments.
15472 * i387-fp.h: Likewise.
15473 * inferiors.c: (struct thread_info): Renamed from
15474 `struct inferior_info'. Remove PID member. Use generic inferior
15475 list header. All uses updated.
15476 (inferiors, signal_pid): Removed.
15477 (all_threads): New variable.
15478 (get_thread): Define.
15479 (add_inferior_to_list): New function.
15480 (for_each_inferior): New function.
15481 (change_inferior_id): New function.
15482 (add_inferior): Removed.
15483 (remove_inferior): New function.
15484 (add_thread): New function.
15485 (free_one_thread): New function.
15486 (remove_thread): New function.
15487 (clear_inferiors): Use for_each_inferior and free_one_thread.
15488 (find_inferior): New function.
15489 (find_inferior_id): New function.
15490 (inferior_target_data): Update argument type.
15491 (set_inferior_target_data): Likewise.
15492 (inferior_regcache_data): Likewise.
15493 (set_inferior_regcache_data): Likewise.
15494 * linux-low.c (linux_bp_reinsert): Remove.
15495 (all_processes, stopping_threads, using_thrads)
15496 (struct pending_signals, debug_threads, pid_of): New.
15497 (inferior_pid): Replace with macro.
15498 (struct inferior_linux_data): Remove.
15499 (get_stop_pc, add_process): New functions.
15500 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15501 Use add_process and add_thread.
15502 (linux_attach_lwp): New function, based on old linux_attach. Use
15503 add_process and add_thread. Set stop_expected for new threads.
15504 (linux_attach): New function.
15505 (linux_kill_one_process): New function.
15506 (linux_kill): Kill all LWPs.
15507 (linux_thread_alive): Use find_inferior_id.
15508 (check_removed_breakpoints, status_pending_p): New functions.
15509 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15510 Update. Use WNOHANG. Wait for cloned processes also. Update process
15511 struct for the found process.
15512 (linux_wait_for_event): New function.
15513 (linux_wait): Use it. Support LWPs.
15514 (send_sigstop, wait_for_sigstop, stop_all_processes)
15515 (linux_resume_one_process, linux_continue_one_process): New functions.
15516 (linux_resume): Support LWPs.
15517 (REGISTER_RAW_SIZE): Remove.
15518 (fetch_register): Use register_size instead. Call supply_register.
15519 (usr_store_inferior_registers): Likewise. Call collect_register.
15520 Fix recursive case.
15521 (regsets_fetch_inferior_registers): Improve error message.
15522 (regsets_store_inferior_registers): Add debugging.
15523 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15524 (unstopped_p, linux_signal_pid): New functions.
15525 (linux_target_ops): Add linux_signal_pid.
15526 (linux_init_signals): New function.
15527 (initialize_low): Call it. Initialize using_threads.
15528 * regcache.c (inferior_regcache_data): Add valid
15529 flag.
15530 (get_regcache): Fetch registers lazily. Add fetch argument
15531 and update all callers.
15532 (regcache_invalidate_one, regcache_invalidate): New
15533 functions.
15534 (new_register_cache): Renamed from create_register_cache.
15535 Return the new regcache.
15536 (free_register_cache): Change argument to a void *.
15537 (registers_to_string, registers_from_string): Call get_regcache
15538 with fetch flag set.
15539 (register_data): Make static. Pass fetch flag to get_regcache.
15540 (supply_register): Call get_regcache with fetch flag clear.
15541 (collect_register): Call get_regcache with fetch flag set.
15542 (collect_register_as_string): New function.
15543 * regcache.h: Update.
15544 * remote-utils.c (putpkt): Flush after debug output and use
15545 stderr.
15546 Handle input interrupts while waiting for an ACK.
15547 (input_interrupt): Use signal_pid method.
15548 (getpkt): Flush after debug output and use stderr.
15549 (outreg): Use collect_register_as_string.
15550 (new_thread_notify, dead_thread_notify): New functions.
15551 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15552 and general_thread.
15553 (look_up_one_symbol): Flush after debug output.
15554 * server.c (step_thread, server_waiting): New variables.
15555 (start_inferior): Don't use signal_pid. Update call to mywait.
15556 (attach_inferior): Update call to mywait.
15557 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15558 (main): Don't fetch/store registers explicitly. Use
15559 set_desired_inferior. Support proposed ``Hs'' packet. Update
15560 calls to mywait.
15561 * server.h: Update.
15562 (struct inferior_list, struct_inferior_list_entry): New.
15563 * target.c (set_desired_inferior): New.
15564 (write_inferior_memory): Constify.
15565 (mywait): New function.
15566 * target.h: Update.
15567 (struct target_ops): New signal_pid method.
15568 (mywait): Removed macro, added prototype.
15569
15570 * linux-low.h (regset_func): Removed.
15571 (regset_fill_func, regset_store_func): New.
15572 (enum regset_type): New.
15573 (struct regset_info): Add type field. Use new operation types.
15574 (struct linux_target_ops): stop_pc renamed to get_pc.
15575 Add decr_pc_after_break and breakpoint_at.
15576 (get_process, get_thread_proess, get_process_thread)
15577 (strut process_info, all_processes, linux_attach_lwp)
15578 (thread_db_init): New.
15579
15580 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15581 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15582 (the_low_target): Add new members.
15583 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15584 (i386_store_fpxregset): Constify.
15585 (target_regsets): Add new kind identifier.
15586 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15587 (i386_set_pc): Add debugging.
15588 (i386_breakpoint_at): New function.
15589 (the_low_target): Add new members.
15590 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15591 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15592 (mips_breakpoint_at): New.
15593 (the_low_target): Add new members.
15594 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15595 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15596 (the_low_target): Add new members.
15597 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15598 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15599 (the_low_target): Add new members.
15600 * linux-x86-64-low.c (target_regsets): Add new kind
15601 identifier.
15602
156032002-05-15 Daniel Jacobowitz <drow@mvista.com>
15604
15605 From Martin Pool <mbp@samba.org>:
15606 * server.c (gdbserver_usage): New function.
15607 (main): Call it.
15608
156092002-05-14 Daniel Jacobowitz <drow@mvista.com>
15610
15611 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15612 stop_at -> stop_pc.
15613
156142002-05-04 Andrew Cagney <ac131313@redhat.com>
15615
15616 * Makefile.in: Remove obsolete code.
15617
156182002-04-24 Michal Ludvig <mludvig@suse.cz>
15619
15620 * linux-low.c (regsets_fetch_inferior_registers),
15621 (regsets_store_inferior_registers): Removed cast to int from
15622 ptrace() calls.
15623 * regcache.h: Added declaration of struct inferior_info.
15624
156252002-04-20 Daniel Jacobowitz <drow@mvista.com>
15626
15627 * inferiors.c (struct inferior_info): Add regcache_data.
15628 (add_inferior): Call create_register_cache.
15629 (clear_inferiors): Call free_register_cache.
15630 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15631 * regcache.c (struct inferior_regcache_data): New.
15632 (registers): Remove.
15633 (get_regcache): New function.
15634 (create_register_cache, free_register_cache): New functions.
15635 (set_register_cache): Don't initialize the register cache here.
15636 (registers_to_string, registers_from_string, register_data): Call
15637 get_regcache.
15638 * regcache.h: Add prototypes.
15639 * server.h: Likewise.
15640
156412002-04-20 Daniel Jacobowitz <drow@mvista.com>
15642
15643 * mem-break.c: New file.
15644 * mem-break.h: New file.
15645 * Makefile.in: Add mem-break.o rule; update server.h
15646 dependencies.
15647 * inferiors.c (struct inferior_info): Add target_data
15648 member.
15649 (clear_inferiors): Free target_data member if set.
15650 (inferior_target_data, set_inferior_target_data): New functions.
15651 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15652 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15653 * linux-low.c (linux_bp_reinsert): New variable.
15654 (struct inferior_linux_data): New.
15655 (linux_create_inferior): Use set_inferior_target_data.
15656 (linux_attach): Likewise. Call add_inferior.
15657 (linux_wait_for_one_inferior): New function.
15658 (linux_wait): Call it.
15659 (linux_write_memory): Add const.
15660 (initialize_low): Call set_breakpoint_data.
15661 * linux-low.h (struct linux_target_ops): Add breakpoint
15662 handling members.
15663 * server.c (attach_inferior): Remove extra add_inferior
15664 call.
15665 * server.h: Include mem-break.h. Update inferior.c
15666 prototypes.
15667 * target.c (read_inferior_memory)
15668 (write_inferior_memory): New functions.
15669 * target.h (read_inferior_memory)
15670 (write_inferior_memory): Change macros to prototypes.
15671 (struct target_ops): Update comments. Add const to write_memory
15672 definition.
15673
156742002-04-11 Daniel Jacobowitz <drow@mvista.com>
15675
15676 * linux-low.c (usr_store_inferior_registers): Support
15677 registers which are allowed to fail to store.
15678 * linux-low.h (linux_target_ops): Likewise.
15679 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15680 (ppc_cannot_store_register): FPSCR may not be storable.
15681
156822002-04-09 Daniel Jacobowitz <drow@mvista.com>
15683
15684 * server.h: Include <string.h> if HAVE_STRING_H.
15685 * ChangeLog: Correct paths in last ChangeLog entry.
15686
156872002-04-09 Daniel Jacobowitz <drow@mvista.com>
15688
15689 * linux-low.h: Remove obsolete prototypes.
15690 (struct linux_target_ops): New.
15691 (extern the_low_target): New.
15692 * linux-low.c (num_regs, regmap): Remove declarations.
15693 (register_addr): Use the_low_target explicitly.
15694 (fetch_register): Likewise.
15695 (usr_fetch_inferior_registers): Likewise.
15696 (usr_store_inferior_registers): Likewise.
15697 * linux-arm-low.c (num_regs): Remove.
15698 (arm_num_regs): Define.
15699 (arm_regmap): Renamed from regmap, made static.
15700 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15701 made static.
15702 (arm_cannot_store_register): Renamed from cannot_store_register,
15703 made static.
15704 (the_low_target): New.
15705 * linux-i386-low.c (num_regs): Remove.
15706 (i386_num_regs): Define.
15707 (i386_regmap): Renamed from regmap, made static.
15708 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15709 made static.
15710 (i386_cannot_store_register): Renamed from cannot_store_register,
15711 made static.
15712 (the_low_target): New.
15713 * linux-ia64-low.c (num_regs): Remove.
15714 (ia64_num_regs): Define.
15715 (ia64_regmap): Renamed from regmap, made static.
15716 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15717 made static.
15718 (ia64_cannot_store_register): Renamed from cannot_store_register,
15719 made static.
15720 (the_low_target): New.
15721 * linux-m68k-low.c (num_regs): Remove.
15722 (m68k_num_regs): Define.
15723 (m68k_regmap): Renamed from regmap, made static.
15724 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15725 made static.
15726 (m68k_cannot_store_register): Renamed from cannot_store_register,
15727 made static.
15728 (the_low_target): New.
15729 * linux-mips-low.c (num_regs): Remove.
15730 (mips_num_regs): Define.
15731 (mips_regmap): Renamed from regmap, made static.
15732 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15733 made static.
15734 (mips_cannot_store_register): Renamed from cannot_store_register,
15735 made static.
15736 (the_low_target): New.
15737 * linux-ppc-low.c (num_regs): Remove.
15738 (ppc_num_regs): Define.
15739 (ppc_regmap): Renamed from regmap, made static.
15740 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15741 made static.
15742 (ppc_cannot_store_register): Renamed from cannot_store_register,
15743 made static.
15744 (the_low_target): New.
15745 * linux-s390-low.c (num_regs): Remove.
15746 (s390_num_regs): Define.
15747 (s390_regmap): Renamed from regmap, made static.
15748 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15749 made static.
15750 (s390_cannot_store_register): Renamed from cannot_store_register,
15751 made static.
15752 (the_low_target): New.
15753 * linux-sh-low.c (num_regs): Remove.
15754 (sh_num_regs): Define.
15755 (sh_regmap): Renamed from regmap, made static.
15756 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15757 made static.
15758 (sh_cannot_store_register): Renamed from cannot_store_register,
15759 made static.
15760 (the_low_target): New.
15761 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15762 (the_low_target): New.
15763
157642002-04-09 Daniel Jacobowitz <drow@mvista.com>
15765
15766 * Makefile.in: Add stamp-h target.
15767 * configure.in: Create stamp-h.
15768 * configure: Regenerated.
15769
157702002-04-09 Daniel Jacobowitz <drow@mvista.com>
15771
15772 * inferiors.c: New file.
15773 * target.c: New file.
15774 * target.h: New file.
15775 * Makefile.in: Add target.o and inferiors.o. Update
15776 dependencies.
15777 * linux-low.c (inferior_pid): New static variable,
15778 moved from server.c.
15779 (linux_create_inferior): Renamed from create_inferior.
15780 Call add_inferior. Return 0 on success instead of a PID.
15781 (linux_attach): Renamed from myattach.
15782 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15783 (linux_thread_alive): Renamed from mythread_alive.
15784 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15785 child dies.
15786 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15787 (regsets_store_inferior_registers): Correct error message.
15788 Add missing ``return 0''.
15789 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15790 (linux_store_registers): Renamed from store_inferior_registers.
15791 (linux_read_memory): Renamed from read_inferior_memory.
15792 (linux_write_memory): Renamed from write_inferior_memory.
15793 (linux_target_ops): New structure.
15794 (initialize_low): Call set_target_ops ().
15795 * remote-utils.c (unhexify): New function.
15796 (hexify): New function.
15797 (input_interrupt): Send signals to ``signal_pid''.
15798 * server.c (inferior_pid): Remove.
15799 (start_inferior): Update create_inferior call.
15800 (attach_inferior): Call add_inferior.
15801 (handle_query): New function.
15802 (main): Call handle_query for `q' packets.
15803 * server.h: Include "target.h". Remove obsolete prototypes.
15804 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15805
158062002-04-09 Daniel Jacobowitz <drow@mvista.com>
15807
15808 * Makefile.in: Add WARN_CFLAGS. Update configury
15809 dependencies.
15810 * configure.in: Check for <string.h>
15811 * configure: Regenerate.
15812 * config.in: Regenerate.
15813 * gdbreplay.c: Include needed system headers.
15814 (remote_open): Remove strchr prototype.
15815 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15816 * regcache.c (supply_register): Change buf argument to const void *.
15817 (supply_register_by_name): Likewise.
15818 (collect_register): Change buf argument to void *.
15819 (collect_register_by_name): Likewise.
15820 * regcache.h: Add missing prototypes.
15821 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15822 * server.c (handle_query): New function.
15823 (attached): New static variable, moved out of main.
15824 (main): Quiet longjmp clobber warnings.
15825 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15826 * utils.c (error): Remove NORETURN.
15827 (fatal): Likewise.